MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Loading...
Searching...
No Matches
marley::MassTable Class Reference

Singleton lookup table for particle and atomic masses. More...

#include <MassTable.hh>

Public Member Functions

 MassTable (const MassTable &)=delete
 Deleted copy constructor.
 
 MassTable (MassTable &&)=delete
 Deleted move constructor.
 
double fragment_emission_threshold (const int Zi, const int Ai, const marley::Fragment &f) const
 Get the approximate excitation energy threshold for emission of a particular nuclear fragment.
 
double get_atomic_mass (int pdg_code, bool theory_ok=true) const
 Get the mass of an atom.
 
double get_atomic_mass (int Z, int A, bool theory_ok=true) const
 Get the mass of an atom.
 
double get_binding_energy (int Z, int A, bool theory_ok=true) const
 Get the binding energy of a nucleus.
 
double get_fragment_separation_energy (int nuc_pdg, int frag_pdg, bool theory_ok=true) const
 Get the separation energy for emission of a nuclear fragment from a nucleus.
 
double get_fragment_separation_energy (int Z, int A, int pdg, bool theory_ok=true) const
 Get the separation energy for emission of a nuclear fragment from a nucleus.
 
double get_mass_excess (int Z, int A, bool theory_ok=true) const
 Get the mass excess of a nucleus.
 
double get_particle_mass (int pdg_code) const
 Get the mass of a particle.
 
double liquid_drop_model_atomic_mass (int Z, int A) const
 Calculate a theoretical atomic mass using the liquid drop model.
 
double liquid_drop_model_mass_excess (int Z, int A) const
 Calculate a theoretical mass excess for a nucleus using the liquid drop model.
 
MassTableoperator= (const MassTable &)=delete
 Deleted copy assignment operator.
 
MassTableoperator= (MassTable &&)=delete
 Deleted move assignment operator.
 
double unbound_threshold (const int initial_nucleus_pdg) const
 Computes the lowest excitation energy at which one of the nuclear fragments considered by the HauserFeshbachDecay class may be emitted.
 
double unbound_threshold (const int Zi, const int Ai) const
 Computes the lowest excitation energy at which one of the nuclear fragments considered by the HauserFeshbachDecay class may be emitted.
 

Static Public Member Functions

static const MassTableInstance ()
 Get a const reference to the singleton instance of the MassTable.
 

Protected Member Functions

 MassTable ()
 Create the singleton MassTable object.
 

Detailed Description

Singleton lookup table for particle and atomic masses.

Definition at line 30 of file MassTable.hh.

Constructor & Destructor Documentation

◆ MassTable()

marley::MassTable::MassTable ( )
protected

Create the singleton MassTable object.

Definition at line 30 of file MassTable.cc.

30 {
31
32 // Instantiate the file manager and use it to find
33 // the mass table data file
34 const auto& fm = marley::FileManager::Instance();
35 std::string full_mt_file_name
36 = fm.find_file( data_file_name_ );
37
38 if ( full_mt_file_name.empty() ) {
39 throw marley::Error("Could not find the MARLEY mass table"
40 " data file " + data_file_name_ + ". Please ensure that"
41 " the folder containing it is on the MARLEY search path."
42 " If needed, the folder can be appended to the MARLEY_SEARCH_PATH"
43 " environment variable.");
44 }
45
46 MARLEY_LOG( INFO, "init.structure" ) << "Loading particle and atomic masses from "
47 << full_mt_file_name;
48
49 // Read in the mass table from a JSON data file
50 auto json_table = marley::JSON::load_file( full_mt_file_name );
51
52 // Store the JSON entries in the relevant unordered maps
53 if ( !json_table.has_key("particle_masses") ) {
54 throw marley::Error("Problem reading the mass table data file "
55 + data_file_name_ + ". Missing \"particle_masses\" JSON array.");
56 }
57 const auto& pm_json = json_table.at("particle_masses");
58 assign_masses( pm_json, "particle_masses", this->particle_masses_ );
59
60 if ( !json_table.has_key("atomic_masses") ) {
61 throw marley::Error("Problem reading the mass table data file "
62 + data_file_name_ + ". Missing \"atomic_masses\" JSON array.");
63 }
64 const auto& am_json = json_table.at("atomic_masses");
65 assign_masses( am_json, "atomic_masses", this->atomic_masses_ );
66
67}
static const FileManager & Instance()
Get a const reference to the singleton instance of the FileManager.

References marley::FileManager::Instance().

Member Function Documentation

◆ fragment_emission_threshold()

double marley::MassTable::fragment_emission_threshold ( const int Zi,
const int Ai,
const marley::Fragment & f ) const

Get the approximate excitation energy threshold for emission of a particular nuclear fragment.

Parameters
ZiProton number of the initial nucleus
AiMass number of the initial nucleus
fFragment to be emitted

Definition at line 270 of file MassTable.cc.

272{
273 // Separation energy for the fragment
274 double Sa = this->get_fragment_separation_energy( Zi, Ai, f.get_pid() );
275 return Sa;
276}
int get_pid() const
Get the PDG particle ID for this fragment.
Definition Fragment.hh:73
double get_fragment_separation_energy(int Z, int A, int pdg, bool theory_ok=true) const
Get the separation energy for emission of a nuclear fragment from a nucleus.
Definition MassTable.cc:206

References get_fragment_separation_energy(), and marley::Fragment::get_pid().

Referenced by unbound_threshold().

◆ get_atomic_mass() [1/2]

double marley::MassTable::get_atomic_mass ( int pdg_code,
bool theory_ok = true ) const

Get the mass of an atom.

Parameters
pdg_codePDG code identifying the nucleus of the atom
theory_okWhether to calculate a theoretical mass using the liquid drop model if an experimental mass cannot be found. If theory_ok is false, then a marley::Error will be thrown if an experimental mass cannot be found.
Returns
Atomic mass (MeV)

Definition at line 95 of file MassTable.cc.

96{
97 bool exp;
98 double mass = lookup_atomic_mass(nucleus_pid, exp,
99 theory_ok);
100 if (exp) mass *= micro_amu_;
101 return mass;
102}

Referenced by marley::NuclearReaction::NuclearReaction(), and marley::DecayScheme::do_cascade().

◆ get_atomic_mass() [2/2]

double marley::MassTable::get_atomic_mass ( int Z,
int A,
bool theory_ok = true ) const

Get the mass of an atom.

Parameters
ZAtomic number of the atom
AMass number of the atom
theory_okWhether to calculate a theoretical mass using the liquid drop model if an experimental mass cannot be found. If theory_ok is false, then a marley::Error will be thrown if an experimental mass cannot be found.
Returns
Atomic mass (MeV)

Definition at line 191 of file MassTable.cc.

191 {
192 bool exp;
193 double mass = lookup_atomic_mass(Z, A, exp, theory_ok);
194 if (exp) mass *= micro_amu_;
195 return mass;
196}

◆ get_binding_energy()

double marley::MassTable::get_binding_energy ( int Z,
int A,
bool theory_ok = true ) const

Get the binding energy of a nucleus.

Parameters
ZAtomic number
AMass number
theory_okWhether to use a theoretical (liquid drop model) atomic mass during the calculation if an experimental atomic mass cannot be found. If theory_ok is false, then a marley::Error will be thrown if an experimental atomic mass cannot be found.
Returns
Binding energy (MeV)

Definition at line 167 of file MassTable.cc.

168{
169 int N = A - Z;
170 double m_hydrogen_1 = atomic_masses_.at(1000010010);
171 double mn = particle_masses_.at(marley_utils::NEUTRON);
172
173 bool exp;
174 double mN = lookup_atomic_mass(Z, A, exp, theory_ok);
175
176 // Experimental masses are given in micro-amu, while our liquid drop model
177 // estimates are given in MeV, so adjust the calculation appropriately
178 // depending on which unit we are using for mN.
179 if (exp) return micro_amu_ * (Z*m_hydrogen_1 + N*mn - mN);
180 else return micro_amu_ * (Z*m_hydrogen_1 + N*mn) - mN;
181}

◆ get_fragment_separation_energy() [1/2]

double marley::MassTable::get_fragment_separation_energy ( int nuc_pdg,
int frag_pdg,
bool theory_ok = true ) const

Get the separation energy for emission of a nuclear fragment from a nucleus.

Parameters
nuc_pdgPDG code for the mother nucleus
frag_pdgPDG code for the emitted nuclear fragment
theory_okWhether to calculate a theoretical mass using the liquid drop model if an experimental mass cannot be found. If theory_ok is false, then a marley::Error will be thrown if an experimental mass cannot be found.
Returns
Separation energy (MeV)

Definition at line 198 of file MassTable.cc.

200{
201 int Zi = marley_utils::get_particle_Z( nuc_pdg );
202 int Ai = marley_utils::get_particle_A( nuc_pdg );
203 return this->get_fragment_separation_energy( Zi, Ai, frag_pdg, theory_ok );
204}

References get_fragment_separation_energy().

◆ get_fragment_separation_energy() [2/2]

double marley::MassTable::get_fragment_separation_energy ( int Z,
int A,
int pdg,
bool theory_ok = true ) const

Get the separation energy for emission of a nuclear fragment from a nucleus.

Parameters
ZAtomic number for the mother nucleus
AMass number for the mother nucleus
pdgPDG code for the emitted nuclear fragment
theory_okWhether to calculate a theoretical mass using the liquid drop model if an experimental mass cannot be found. If theory_ok is false, then a marley::Error will be thrown if an experimental mass cannot be found.
Returns
Separation energy (MeV)

Definition at line 206 of file MassTable.cc.

208{
209 int Zx = marley_utils::get_particle_Z(pid);
210 int Zf = Z - Zx;
211 int Af = A - marley_utils::get_particle_A(pid);
212
213 // This value is in micro-atomic-mass-units (micro-AMU)
214 double extra_mass = Zx*particle_masses_.at(marley_utils::ELECTRON)
215 + particle_masses_.at(pid);
216
217 // These values may be in micro-AMU or MeV
218 bool exp_i, exp_f;
219 double m_atom_initial = lookup_atomic_mass(Z, A, exp_i, theory_ok);
220 double m_atom_final = lookup_atomic_mass(Zf, Af, exp_f, theory_ok);
221
222 // Experimental values are tabulated in micro-AMU, while theoretical
223 // estimates use MeV. Adjust application of the conversion factor
224 // appropriately for each case so that we always return something in MeV.
225 if (exp_i) {
226 if (exp_f) return micro_amu_*(m_atom_final - m_atom_initial + extra_mass);
227 else return m_atom_final + micro_amu_*(extra_mass - m_atom_initial);
228 }
229 else if (exp_f) return micro_amu_*(m_atom_final + extra_mass)
230 - m_atom_initial;
231 else return micro_amu_*extra_mass + m_atom_final - m_atom_initial;
232}

Referenced by marley::BackshiftedFermiGasModel::BackshiftedFermiGasModel(), fragment_emission_threshold(), and get_fragment_separation_energy().

◆ get_mass_excess()

double marley::MassTable::get_mass_excess ( int Z,
int A,
bool theory_ok = true ) const

Get the mass excess of a nucleus.

Parameters
ZAtomic number
AMass number
theory_okWhether to use a theoretical (liquid drop model) atomic mass during the calculation if an experimental atomic mass cannot be found. If theory_ok is false, then a marley::Error will be thrown if an experimental atomic mass cannot be found.
Returns
Mass excess (MeV)

Definition at line 183 of file MassTable.cc.

184{
185 bool exp;
186 double mN = lookup_atomic_mass(Z, A, exp, theory_ok);
187 if (exp) return micro_amu_*(mN - A*1e6);
188 else return mN - micro_amu_*A*1e6;
189}

Referenced by marley::BackshiftedFermiGasModel::BackshiftedFermiGasModel().

◆ get_particle_mass()

double marley::MassTable::get_particle_mass ( int pdg_code) const

Get the mass of a particle.

Parameters
pdg_codePDG code identifying the type of particle
Returns
Particle mass (MeV)

Definition at line 84 of file MassTable.cc.

84 {
85 int id = particle_id;
86 // The lookup table only includes entries for particles (as opposed to
87 // antiparticles), so flip the sign of the input particle id for the
88 // lookup if it represents an antiparticle.
89 if (id < 0) id *= -1;
90 // Find the particle's mass in the lookup table, and convert its
91 // value from micro-amu to MeV
92 return micro_amu_ * particle_masses_.at(id);
93}

Referenced by marley::CoulombCorrector::CoulombCorrector(), marley::NuclearReaction::NuclearReaction(), marley::DecayScheme::do_cascade(), marley::Fragment::get_mass(), and marley::WeisskopfSingleParticleModel::strength_function().

◆ Instance()

◆ liquid_drop_model_atomic_mass()

double marley::MassTable::liquid_drop_model_atomic_mass ( int Z,
int A ) const

Calculate a theoretical atomic mass using the liquid drop model.

Parameters
ZAtomic number
AMass number
Returns
Atomic mass (MeV)

Definition at line 80 of file MassTable.cc.

80 {
81 return liquid_drop_model_mass_excess(Z, A) + micro_amu_*1e6*A;
82}
double liquid_drop_model_mass_excess(int Z, int A) const
Calculate a theoretical mass excess for a nucleus using the liquid drop model.
Definition MassTable.cc:238

References liquid_drop_model_mass_excess().

◆ liquid_drop_model_mass_excess()

double marley::MassTable::liquid_drop_model_mass_excess ( int Z,
int A ) const

Calculate a theoretical mass excess for a nucleus using the liquid drop model.

Parameters
ZAtomic number
AMass number
Returns
Mass excess (MeV)

The liquid drop model parameters used here are based on those given in A. J. Koning, et al., Nucl. Phys. A 810 (2008) pp. 13-76 for use with the back-shifted Fermi gas nuclear level density model.

Definition at line 238 of file MassTable.cc.

238 {
239
240 // Liquid drop model parameters (taken from paper by A. J. Koning, et al.)
241 static constexpr double Mn = 8.07144; // MeV
242 static constexpr double MH = 7.28899; // MeV
243 static constexpr double a1 = 15.677; // MeV
244 static constexpr double a2 = 18.56; // MeV
245 static constexpr double kappa = 1.79;
246 static constexpr double c3 = 0.717; // MeV
247 static constexpr double c4 = 1.21129; // MeV
248
249 int N = A - Z;
250
251 double kappa_term = kappa * std::pow((N - Z) / static_cast<double>(A), 2);
252 double c1 = a1 * (1 - kappa_term);
253 double c2 = a2 * (1 - kappa_term);
254
255 double Evol = -c1 * A;
256 double Esur = c2 * std::pow(A, 2.0/3.0);
257 double Ecoul = (c3 / std::pow(A, 1.0/3.0) - c4 / A) * std::pow(Z, 2);
258
259 double delta_LDM = 0;
260 bool z_odd = Z % 2;
261 bool n_odd = N % 2;
262
263 // delta_LDM will be zero if the nucleus is odd-even
264 if (z_odd && n_odd) delta_LDM = 11/std::sqrt(A);
265 else if (!z_odd && !n_odd) delta_LDM = -11/std::sqrt(A);
266
267 return Mn * N + MH * Z + Evol + Esur + Ecoul + delta_LDM;
268}

Referenced by marley::BackshiftedFermiGasModel::BackshiftedFermiGasModel(), and liquid_drop_model_atomic_mass().

◆ unbound_threshold() [1/2]

double marley::MassTable::unbound_threshold ( const int initial_nucleus_pdg) const

Computes the lowest excitation energy at which one of the nuclear fragments considered by the HauserFeshbachDecay class may be emitted.

Parameters
initial_nucleus_pdgPDG code of the initial nucleus

Definition at line 303 of file MassTable.cc.

304{
305 int Zi = marley_utils::get_particle_Z( initial_nucleus_pdg );
306 int Ai = marley_utils::get_particle_A( initial_nucleus_pdg );
307 return this->unbound_threshold( Zi, Ai );
308}
double unbound_threshold(const int Zi, const int Ai) const
Computes the lowest excitation energy at which one of the nuclear fragments considered by the HauserF...
Definition MassTable.cc:281

References unbound_threshold().

◆ unbound_threshold() [2/2]

double marley::MassTable::unbound_threshold ( const int Zi,
const int Ai ) const

Computes the lowest excitation energy at which one of the nuclear fragments considered by the HauserFeshbachDecay class may be emitted.

Parameters
ZiProton number of the initial nucleus
AiMass number of the initial nucleus

Definition at line 281 of file MassTable.cc.

282{
283 // Before looking up the separation energies, start by setting the unbound
284 // threshold to infinity.
285 double unbound_threshold = std::numeric_limits<double>::max();
286 MARLEY_LOG( TRACE, "init.structure.masstable" ) << "unbound_threshold = " << unbound_threshold << '\n';
287
288 // Loop over each available nuclear fragment. If it has a smaller separation
289 // energy than the current value of unbound_threshold, update the stored value
290 for ( const auto& pair : marley::StructureDatabase::fragments() ) {
291 const marley::Fragment& f = pair.second;
292 double thresh = this->fragment_emission_threshold( Zi, Ai, f );
293 MARLEY_LOG( TRACE, "init.structure.masstable" ) << f.get_pid()
294 << " emission threshold = " << thresh << '\n';
295 if ( thresh < unbound_threshold ) unbound_threshold = thresh;
296 MARLEY_LOG( TRACE, "init.structure.masstable" ) << "unbound_threshold = "
297 << unbound_threshold << '\n';
298 }
299
300 return unbound_threshold;
301}
double fragment_emission_threshold(const int Zi, const int Ai, const marley::Fragment &f) const
Get the approximate excitation energy threshold for emission of a particular nuclear fragment.
Definition MassTable.cc:270
static const std::map< int, marley::Fragment > & fragments()
Retrieves a const reference to the table of Fragment objects.

References fragment_emission_threshold(), marley::StructureDatabase::fragments(), marley::Fragment::get_pid(), and unbound_threshold().

Referenced by unbound_threshold(), and unbound_threshold().


The documentation for this class was generated from the following files: