MARLEY (Model of Argon Reaction Low Energy Yields)  v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Gamma.hh
1 //
5 // This file is part of MARLEY (Model of Argon Reaction Low Energy Yields)
6 //
7 // MARLEY is free software: you can redistribute it and/or modify it under the
8 // terms of version 3 of the GNU General Public License as published by the
9 // Free Software Foundation.
10 //
11 // For the full text of the license please see COPYING or
12 // visit http://opensource.org/licenses/GPL-3.0
13 //
14 // Please respect the MCnet academic usage guidelines. See GUIDELINES
15 // or visit https://www.montecarlonet.org/GUIDELINES for details.
16 
17 #pragma once
18 #include "marley/IteratorToMember.hh"
19 
20 namespace marley {
21 
22  class Level;
23 
25  class Gamma {
26 
27  public:
28 
33  Gamma(double energy = 0., double rel_intensity = 0.,
34  marley::Level* start_lev = nullptr, marley::Level* end_lev = nullptr);
35 
37  inline marley::Level* start_level() const;
38 
40  inline void set_start_level(marley::Level* start_lev);
41 
43  inline marley::Level* end_level() const;
44 
46  inline void set_end_level(marley::Level* end_lev);
47 
49  inline double energy() const;
50 
52  inline double relative_intensity() const;
53 
60  template<typename It> inline static marley::IteratorToMember<It, double>
62 
63  protected:
64 
65  double energy_;
67 
70 
73  };
74 
75  // Inline function definitions
76  inline marley::Level* Gamma::start_level() const { return start_level_; }
77  inline void Gamma::set_start_level(marley::Level* start_lev)
78  { start_level_ = start_lev; }
79 
80  inline marley::Level* Gamma::end_level() const { return end_level_; }
81  inline void Gamma::set_end_level(marley::Level* end_lev)
82  { end_level_ = end_lev; }
83 
84  inline double Gamma::energy() const { return energy_; }
85  inline double Gamma::relative_intensity() const
86  { return relative_intensity_; }
87 
88  template<typename It> inline marley::IteratorToMember<It, double>
90  {
93  }
94 }
A gamma-ray transition between two nuclear levels.
Definition: Gamma.hh:25
double relative_intensity() const
Get the relative intensity for this transition.
Definition: Gamma.hh:85
double energy_
Energy of the emitted gamma (MeV)
Definition: Gamma.hh:65
marley::Level * start_level() const
Get a pointer to the Level that emits this γ-ray.
Definition: Gamma.hh:76
marley::Level * start_level_
Pointer to the Level that emits this γ-ray.
Definition: Gamma.hh:69
void set_end_level(marley::Level *end_lev)
Set the Level that abosrbs this γ-ray.
Definition: Gamma.hh:81
marley::Level * end_level() const
Get a pointer to the Level that absorbs this γ-ray.
Definition: Gamma.hh:80
double relative_intensity_
Relative intensity of the transition.
Definition: Gamma.hh:66
void set_start_level(marley::Level *start_lev)
Set the Level that emits this γ-ray.
Definition: Gamma.hh:77
double energy() const
Get the energy of the emitted γ-ray (MeV)
Definition: Gamma.hh:84
marley::Level * end_level_
Pointer to the Level that absorbs this γ-ray.
Definition: Gamma.hh:72
static marley::IteratorToMember< It, double > make_intensity_iterator(It it)
Convert an iterator that points to a Gamma object into an iterator that points to the Gamma's relativ...
Definition: Gamma.hh:89
Gamma(double energy=0., double rel_intensity=0., marley::Level *start_lev=nullptr, marley::Level *end_lev=nullptr)
Definition: Gamma.cc:19
Template class that creates an iterator to a class member based on an iterator to the class object.
Definition: IteratorToMember.hh:30
A discrete nuclear energy level.
Definition: Level.hh:29