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
MassTable.hh
1
4//
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
19// Standard library includes
20#include <string>
21#include <unordered_map>
22
23namespace marley {
24
25 // Forward-declare some classes
26 class Fragment;
27 class JSON;
28
30 class MassTable {
31
32 public:
33
35 MassTable(const MassTable&) = delete;
36
38 MassTable(MassTable&&) = delete;
39
41 MassTable& operator=(const MassTable&) = delete;
42
45
48 static const MassTable& Instance();
49
53 double get_particle_mass(int pdg_code) const;
54
62 double get_atomic_mass(int pdg_code, bool theory_ok = true) const;
63
72 double get_atomic_mass(int Z, int A, bool theory_ok = true) const;
73
84 double get_fragment_separation_energy(int Z, int A, int pdg,
85 bool theory_ok = true) const;
86
96 double get_fragment_separation_energy(int nuc_pdg, int frag_pdg,
97 bool theory_ok = true) const;
98
107 double get_binding_energy(int Z, int A, bool theory_ok = true) const;
108
118 double get_mass_excess(int Z, int A, bool theory_ok = true) const;
119
126 double liquid_drop_model_mass_excess(int Z, int A) const;
127
132 double liquid_drop_model_atomic_mass(int Z, int A) const;
133
139 double fragment_emission_threshold(const int Zi, const int Ai,
140 const marley::Fragment& f) const;
141
147 double unbound_threshold(const int Zi, const int Ai) const;
148
153 double unbound_threshold(const int initial_nucleus_pdg) const;
154
155 protected:
156
158 MassTable();
159
160 private:
161
162 // Helper function that converts the input JSON array into
163 // (PDG code, mass) pairs and stores them in map_to_use
164 void assign_masses(const marley::JSON& obj_array,
165 const std::string& array_key,
166 std::unordered_map<int, double>& map_to_use);
167
168 // Function used internally by the mass table. Returns an atomic mass and
169 // loads the boolean value exp with true if it is an experimental value
170 // from the lookup table (and therefore has units of micro-amu) or false
171 // if it is a theoretical value computed using the liquid drop model (and
172 // has units of MeV). This method of looking up masses is used to avoid
173 // unnecessary unit conversions that can lead to losses of precision.
174 double lookup_atomic_mass(int nucleus_pid, bool& exp,
175 bool theory_ok = true) const;
176 double lookup_atomic_mass(int Z, int A, bool& exp,
177 bool theory_ok = true) const;
178
179 // Lookup table for particle masses. Keys are PDG particle
180 // ID numbers, values are masses in micro-amu.
181 std::unordered_map<int, double> particle_masses_;
182
183 // Lookup table for atomic masses. Keys are PDG particle
184 // ID numbers for the nuclei, values are masses in micro-amu.
185 std::unordered_map<int, double> atomic_masses_;
186
187 // Factor to use when converting from micro-amu to MeV
188 static constexpr double micro_amu_ = 0.000931494061; // MeV/uAMU
189
191 static const std::string data_file_name_;
192 };
193
194}
Simple container for storing reference data about each of the nuclear fragments considered by MARLEY'...
Definition Fragment.hh:27
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.
Definition MassTable.cc:270
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
static const MassTable & Instance()
Get a const reference to the singleton instance of the MassTable.
Definition MassTable.cc:69
double get_mass_excess(int Z, int A, bool theory_ok=true) const
Get the mass excess of a nucleus.
Definition MassTable.cc:183
double get_atomic_mass(int pdg_code, bool theory_ok=true) const
Get the mass of an atom.
Definition MassTable.cc:95
double liquid_drop_model_atomic_mass(int Z, int A) const
Calculate a theoretical atomic mass using the liquid drop model.
Definition MassTable.cc:80
double get_binding_energy(int Z, int A, bool theory_ok=true) const
Get the binding energy of a nucleus.
Definition MassTable.cc:167
double get_particle_mass(int pdg_code) const
Get the mass of a particle.
Definition MassTable.cc:84
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
MassTable & operator=(const MassTable &)=delete
Deleted copy assignment operator.
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
MassTable(const MassTable &)=delete
Deleted copy constructor.
MassTable & operator=(MassTable &&)=delete
Deleted move assignment operator.
MassTable()
Create the singleton MassTable object.
Definition MassTable.cc:30