Bayeux  3.4.1
Core Foundation library for SuperNEMO
nuclear_transition.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2014-07-08
4  * Last modified: 2014-07-08
5  *
6  * License:
7  * Copyright 2014 F. Mauger
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or (at
12  * your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  *
24  * Description:
25  *
26  * Utilities related to gamma transitions.
27  *
28  * History:
29  *
30  */
31 
32 #ifndef GENBB_HELP_NUCLEAR_TRANSITION_H
33 #define GENBB_HELP_NUCLEAR_TRANSITION_H 1
34 
35 // Standard library:
36 #include <string>
37 #include <fstream>
38 
39 // Third party:
40 // - Bayeux/datatools:
41 #include <datatools/properties.h>
42 #include <datatools/i_tree_dump.h>
43 #include <datatools/bit_mask.h>
44 // - Bayeux/mygsl:
45 #include <mygsl/rng.h>
46 
47 // This project:
50 
51 namespace genbb {
52 
53  // Forward declaration:
54  class nuclear_level;
55 
58  {
59 
60  public:
61 
68  };
69 
71  enum mode_type {
72  MODE_INVALID = -1,
73  MODE_GAMMA = 0,
74  MODE_IC_K = 1,
75  MODE_IC_L = 2,
76  MODE_IC_M = 3,
77  MODE_PC = 4
78  };
79 
82 
84  virtual ~nuclear_transition();
85 
87  bool has_A() const;
88 
90  void set_A(int);
91 
93  int get_A() const;
94 
96  bool has_Z() const;
97 
99  void set_Z(int);
100 
102  int get_Z() const;
103 
105  bool has_energy() const;
106 
108  void set_energy(double);
109 
111  double get_energy() const;
112 
114  void set_ic_k_shell_binding_energy(double b_);
115 
117  void set_ic_l_shell_binding_energy(double b_);
118 
120  void set_ic_m_shell_binding_energy(double b_);
121 
123  double get_ic_k_shell_binding_energy() const;
124 
126  double get_ic_l_shell_binding_energy() const;
127 
129  double get_ic_m_shell_binding_energy() const;
130 
132  void set_ic_k_shell_coefficient(double b_);
133 
135  void set_ic_l_shell_coefficient(double b_);
136 
138  void set_ic_m_shell_coefficient(double b_);
139 
141  double get_ic_k_shell_coefficient() const;
142 
144  double get_ic_l_shell_coefficient() const;
145 
147  double get_ic_m_shell_coefficient() const;
148 
150  void set_pc_coefficient(double c_);
151 
153  double get_pc_coefficient() const;
154 
156  bool is_gamma_generated() const;
157 
159  void set_gamma_generated(bool);
160 
163 
166 
168  bool is_conversion_pair_generated() const;
169 
172 
174  void set_levels(const nuclear_level & lstart_, const nuclear_level & lstop_);
175 
177  virtual void tree_dump(std::ostream & out_ = std::clog,
178  const std::string & title_ = "",
179  const std::string & indent_ = "",
180  bool inherit_ = false) const;
181 
194  int fire_event_kinematics(mygsl::rng & prng_,
195  mode_type & mode_,
196  double & eg_,
197  double & thetag_,
198  double & phig_,
199  double & e1_,
200  double & theta1_,
201  double & phi1_,
202  double & e2_,
203  double & theta2_,
204  double & phi2_) const;
205 
207  virtual void initialize(const datatools::properties & config_);
208 
210  virtual void reset();
211 
213  virtual int fill(mygsl::rng & prng_, genbb::primary_event & event_);
214 
215  protected:
216 
218  void _set_default();
219 
221  void _init();
222 
223  private:
224 
225  int _A_;
226  int _Z_;
227  double _energy_;
228  unsigned int _approx_flags_;
229  double _ic_k_shell_binding_energy_;
230  double _ic_l_shell_binding_energy_;
231  double _ic_m_shell_binding_energy_;
232  double _ic_k_shell_coefficient_;
233  double _ic_l_shell_coefficient_;
234  double _ic_m_shell_coefficient_;
235  double _pc_coefficient_;
236 
237  bool _gamma_generated_;
238  bool _conversion_electron_generated_;
239  bool _conversion_pair_generated_;
240 
241  // Working data:
242  double _cumul_g_;
243  double _cumul_pK_;
244  double _cumul_pL_;
245  double _cumul_pM_;
246  double _cumul_pp_;
247 
248 
250 
251  };
252 
253 } // end of namespace genbb
254 
255 /***************
256  * OCD support *
257  ***************/
258 #include <datatools/ocd_macros.h>
260 
261 #endif // GENBB_HELP_NUCLEAR_TRANSITION_H
262 
263 // Local Variables: --
264 // mode: c++ --
265 // End: --
bool is_gamma_generated() const
Check the gamma generation flag.
bool is_conversion_pair_generated() const
Check the conversion pair generation flag.
Pair conversion.
Definition: nuclear_transition.h:77
void _set_default()
Set default values (initialization)
void set_ic_k_shell_binding_energy(double b_)
Set the binding energy of electron on K-shell.
void set_pc_coefficient(double c_)
Set the pair conversion coefficient.
void set_A(int)
Set the A of the excited nucleus.
void set_energy(double)
Set the energy.
nuclear_transition()
Constructor.
double get_ic_l_shell_coefficient() const
Return the IC coefficient of electron on L-shell.
static const uint32_t bit01
Definition: bit_mask.h:28
Approximation mode with concurrent gamma emission, internal conversion from K/L/M shells and pair con...
Definition: nuclear_transition.h:66
void set_Z(int)
Set the Z of the excited nucleus.
void set_conversion_electron_generated(bool)
Set the conversion electron generation flag.
void set_ic_m_shell_coefficient(double b_)
Set the IC coefficient of electron on M-shell.
void set_ic_k_shell_coefficient(double b_)
Set the IC coefficient of electron on K-shell.
Base decay driver.
Definition: base_decay_driver.h:60
double get_ic_l_shell_binding_energy() const
Return the binding energy of electron on L-shell.
bool is_conversion_electron_generated() const
Check the conversion electron generation flag.
void set_ic_m_shell_binding_energy(double b_)
Set the binding energy of electron on M-shell.
void set_ic_l_shell_coefficient(double b_)
Set the IC coefficient of electron on L-shell.
#define GENBB_BDD_REGISTRATION_INTERFACE(GENBB_CLASS_NAME)
Definition: genbb_macros.h:35
Approximation mode with only gamma emission, neglecting conversion from K/L/M shells and pair convers...
Definition: nuclear_transition.h:65
virtual int fill(mygsl::rng &prng_, genbb::primary_event &event_)
Shoot the kinematics of the decay and fill a primary event.
double get_ic_m_shell_binding_energy() const
Return the binding energy of electron on M-shell.
Default approximation mode.
Definition: nuclear_transition.h:67
bool has_A() const
Check if A is set.
int get_A() const
Return the A of the excited nucleus.
virtual void initialize(const datatools::properties &config_)
Initialization.
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
double get_energy() const
Return the energy.
double get_ic_m_shell_coefficient() const
Return the IC coefficient of electron on M-shell.
Gamma emission.
Definition: nuclear_transition.h:73
Internal conversion on K-shell.
Definition: nuclear_transition.h:74
Internal conversion on M-shell.
Definition: nuclear_transition.h:76
Description of a deexcitation nuclear transition between two levels of the same nuclide (gamma + IC)
Definition: nuclear_transition.h:57
approx_flag_type
Approximation mode.
Definition: nuclear_transition.h:63
bool has_Z() const
Check if Z is set.
virtual void reset()
Reset.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
int get_Z() const
Return the Z of the excited nucleus.
double get_pc_coefficient() const
Return the pair conversion coefficient.
Top-level namespace of the Bayeux/genbb_help module library.
Definition: alpha_decay.h:51
void set_gamma_generated(bool)
Set the gamma generation flag.
A primary event from a Monte-Carlo generator.
Definition: primary_event.h:60
int fire_event_kinematics(mygsl::rng &prng_, mode_type &mode_, double &eg_, double &thetag_, double &phig_, double &e1_, double &theta1_, double &phi1_, double &e2_, double &theta2_, double &phi2_) const
bool has_energy() const
Check if energy is set.
Internal conversion on L-shell.
Definition: nuclear_transition.h:75
void _init()
Compute some internal data.
mode_type
Deexcitation mode.
Definition: nuclear_transition.h:71
void set_conversion_pair_generated(bool)
Set the conversion pair generation flag.
double get_ic_k_shell_binding_energy() const
Return the binding energy of electron on K-shell.
static const uint32_t bit00
Definition: bit_mask.h:27
double get_ic_k_shell_coefficient() const
Return the IC coefficient of electron on K-shell.
Null flag.
Definition: nuclear_transition.h:64
void set_ic_l_shell_binding_energy(double b_)
Set the binding energy of electron on L-shell.
virtual ~nuclear_transition()
Destructor.
Description of a nuclear level.
Definition: nuclear_level.h:53
void set_levels(const nuclear_level &lstart_, const nuclear_level &lstop_)
Set the transition parameter from the start and stop levels.
Pseudo random number generator.
Definition: rng.h:53
Invalid mode.
Definition: nuclear_transition.h:72
A dictionary of arbitrary properties.
Definition: properties.h:125