Bayeux  3.4.1
Core Foundation library for SuperNEMO
alpha_decay.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2014-11-08
4  * Last modified: 2014-11-10
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  * Alpha decay driver.
27  *
28  * History:
29  *
30  */
31 
32 #ifndef GENBB_HELP_ALPHA_DECAY_H
33 #define GENBB_HELP_ALPHA_DECAY_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 // - Bayeux/mygsl:
44 #include <mygsl/rng.h>
45 
46 // This project:
50 
51 namespace genbb {
52 
53  // Forward declaration:
54  class nuclear_level;
55 
58  {
59 
60  public:
61 
63  alpha_decay();
64 
66  virtual ~alpha_decay();
67 
69  bool has_q_alpha() const;
70 
72  void set_q_alpha(double);
73 
75  double get_q_alpha() const;
76 
78  bool has_A() const;
79 
81  void set_A(int);
82 
84  int get_A() const;
85 
87  bool has_Z() const;
88 
90  void set_Z(int);
91 
93  int get_Z() const;
94 
96  int get_Z_parent() const;
97 
99  int get_Z_daughter() const;
100 
102  int get_A_parent() const;
103 
105  int get_A_daughter() const;
106 
108  void set_mass_parent(double);
109 
111  double get_mass_parent() const;
112 
114  void set_mass_daughter(double);
115 
117  double get_mass_daughter() const;
118 
120  void set_energy_parent(double);
121 
123  double get_energy_parent() const;
124 
126  void set_energy_daughter(double);
127 
129  double get_energy_daughter() const;
130 
132  bool is_alpha_generated() const;
133 
135  void set_alpha_generated(bool);
136 
138  bool is_daughter_generated() const;
139 
141  void set_daughter_generated(bool);
142 
144  void set_levels(const nuclear_level & lstart_, const nuclear_level & lstop_);
145 
147  virtual void tree_dump(std::ostream & out_ = std::clog,
148  const std::string & title_ = "",
149  const std::string & indent_ = "",
150  bool inherit_ = false) const;
151 
157  int fire_event_kinematics(mygsl::rng & prng_,
158  double & ka_,
159  double & thetaa_,
160  double & phia_,
161  double & kr_,
162  double & thetar,
163  double & phir_) const;
164 
166  virtual void initialize(const datatools::properties & config_);
167 
169  virtual void reset();
170 
172  virtual int fill(mygsl::rng & prng_, genbb::primary_event & event_);
173 
174  protected:
175 
177  void _set_default();
178 
180  void _init();
181 
182  private:
183 
184  double _q_alpha_;
185  int _A_;
186  int _Z_;
187  double _mass_parent_;
188  double _energy_parent_;
189  double _mass_daughter_;
190  double _energy_daughter_;
191  bool _alpha_generated_;
192  bool _daughter_generated_;
193 
194  // Working data:
195  double _M_;
196  double _m1_;
197  double _m2_;
198  two_body_decay _tbd_;
199 
201 
202  };
203 
204 } // end of namespace genbb
205 
206 /***************
207  * OCD support *
208  ***************/
209 #include <datatools/ocd_macros.h>
211 
212 #endif // GENBB_HELP_ALPHA_DECAY_H
213 
214 // Local Variables: --
215 // mode: c++ --
216 // End: --
bool has_q_alpha() const
Check if Q alpha is set.
void set_mass_daughter(double)
Set the isotopic mass of the daughter nucleus (not the atomic mass)
void set_alpha_generated(bool)
Set the alpha generation flag.
int get_A_parent() const
Return the A of the parent nucleus.
virtual ~alpha_decay()
Destructor.
void set_q_alpha(double)
Set the Q alpha of the decay.
Description of a two body decay.
Definition: two_body_decay.h:41
bool is_alpha_generated() const
Check the alpha generation flag.
void set_Z(int)
Set the Z of the parent nucleus.
int get_Z_daughter() const
Return the Z of the daughter nucleus.
virtual void reset()
Reset.
double get_q_alpha() const
Return the Q alpha of the decay.
double get_energy_parent() const
Return the excitation energy of the parent nucleus.
Base decay driver.
Definition: base_decay_driver.h:60
void _init()
Compute some internal data.
Description of an alpha decay.
Definition: alpha_decay.h:57
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
void set_energy_parent(double)
Set the excitation energy of the parent nucleus.
int get_Z_parent() const
Return the Z of the parent nucleus.
double get_energy_daughter() const
Return the isotopic mass of the daughter nucleus.
#define GENBB_BDD_REGISTRATION_INTERFACE(GENBB_CLASS_NAME)
Definition: genbb_macros.h:35
double get_mass_parent() const
Return the isotopic mass of the parent nucleus (not the atomic mass)
alpha_decay()
Default constructor.
bool is_daughter_generated() const
Check the daughter nucleus generation flag.
void set_daughter_generated(bool)
Set the daughter nucleus generation flag.
int fire_event_kinematics(mygsl::rng &prng_, double &ka_, double &thetaa_, double &phia_, double &kr_, double &thetar, double &phir_) const
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
void set_energy_daughter(double)
Set the excitation energy of the daughter nucleus.
bool has_A() const
Check if A is set.
void _set_default()
Set default values (initialization)
Top-level namespace of the Bayeux/genbb_help module library.
Definition: alpha_decay.h:51
bool has_Z() const
Check if Z parent is set.
void set_levels(const nuclear_level &lstart_, const nuclear_level &lstop_)
Set the transition parameter from the start and stop levels.
int get_A_daughter() const
Return the A of the daughter nucleus.
A primary event from a Monte-Carlo generator.
Definition: primary_event.h:60
double get_mass_daughter() const
Return the isotopic mass of the daughter nucleus (not the atomic mass)
virtual void initialize(const datatools::properties &config_)
Initialization.
void set_mass_parent(double)
Set the isotopic mass of the parent nucleus (not the atomic mass)
virtual int fill(mygsl::rng &prng_, genbb::primary_event &event_)
Shoot the kinematics of the decay and fill a primary event.
int get_A() const
Return the A of the parent nucleus.
int get_Z() const
Return the Z of the parent nucleus.
Description of a nuclear level.
Definition: nuclear_level.h:53
void set_A(int)
Set the A of the parent nucleus.
Pseudo random number generator.
Definition: rng.h:53
A dictionary of arbitrary properties.
Definition: properties.h:125