22#include <unordered_map>
24#include "marley/DecayScheme.hh"
25#include "marley/JSON.hh"
125 const int Z,
const int A);
134 inline const std::unordered_map<int,
137 return decay_scheme_table_;
141 static inline const std::map<int, marley::Fragment>&
fragments() {
142 if ( !initialized_gs_spin_parity_table_ ) initialize_jpi_table();
143 return fragment_table_;
198 static std::unordered_map<int, std::unique_ptr<marley::DecayScheme> >
203 std::unordered_map<int, std::unique_ptr<marley::OpticalModel> >
204 optical_model_table_;
209 std::unordered_map<int, std::unique_ptr<marley::LevelDensityModel> >
210 level_density_table_;
215 std::unordered_map<int, std::unique_ptr<
220 static std::map<int, marley::Fragment> fragment_table_;
223 static constexpr int DEFAULT_FRAGMENT_L_MAX = 5;
226 static constexpr int DEFAULT_GAMMA_L_MAX = DEFAULT_FRAGMENT_L_MAX;
231 int fragment_l_max_ = DEFAULT_FRAGMENT_L_MAX;
236 int gamma_l_max_ = DEFAULT_GAMMA_L_MAX;
240 static bool initialized_gs_spin_parity_table_;
243 const std::string structure_index_filename_ =
"nuclide_index.txt";
247 bool loaded_structure_index_ =
false;
251 std::map< int, std::string > decay_scheme_filenames_;
255 static const std::string jpi_data_file_name_;
258 static std::map< int, std::pair<int, marley::Parity> > jpi_table_;
262 static void initialize_jpi_table();
266 void load_structure_index();
270 std::map< std::string, marley::JSON > om_config_map_;
Discrete level and γ-ray data for a specific nuclide.
FileFormat
The FileFormat type is used to tell the DecayScheme class which format to assume when parsing a discr...
Simple container for storing reference data about each of the nuclear fragments considered by MARLEY'...
Abstract base class for models of gamma-ray strength functions.
Abstract base class for models of nuclear level densities.
Abstract base class for nuclear optical model implementations.
Type-safe representation of a parity value (either +1 or -1)
marley::GammaStrengthFunctionModel & get_gamma_strength_function_model(const int Z, const int A)
Retrieves a gamma-ray strength function model object from the database, creating it if one did not al...
void remove_decay_scheme(int pdg)
Deletes the discrete level data in the database associated with a given nuclide.
static const marley::Fragment * get_fragment(const int fragment_pdg)
Retrieves nuclear fragment data from the database.
void load_optical_model_params(const marley::JSON *om_config=nullptr)
Helper function that initializes the map of JSON settings for the optical model parameters.
void set_fragment_l_max(int ell)
Sets the maximum orbital angular momentum to consider when simulating fragment emission to the contin...
marley::OpticalModel & get_optical_model(int nucleus_pid)
Retrieves an optical model object from the database, creating it if one did not already exist.
void add_decay_scheme(int pdg, std::unique_ptr< marley::DecayScheme > &ds)
Add a DecayScheme object to the database that contains discrete level data for a specific nuclide.
std::set< int > find_all_nuclides(const std::string &filename, DecayScheme::FileFormat format=DecayScheme::FileFormat::talys)
Create a set of Particle Data Group codes for every nuclide in a discrete level data file.
static void get_gs_spin_parity(int nuc_pdg, int &twoJ, marley::Parity &Pi)
Looks up the ground-state spin-parity for a particular nuclide.
StructureDatabase()
Creates an empty database.
void set_gamma_l_max(int ell)
Sets the maximum multipolarity to consider when simulating gamma-ray emission to the continuum.
const std::unordered_map< int, std::unique_ptr< marley::DecayScheme > > & decay_schemes() const
Retrieves a const reference to the table of DecayScheme objects.
void emplace_decay_scheme(int pdg, const std::string &filename, DecayScheme::FileFormat format=DecayScheme::FileFormat::talys)
Construct and add a DecayScheme object to the database that contains discrete level data for a specif...
static const std::map< int, marley::Fragment > & fragments()
Retrieves a const reference to the table of Fragment objects.
int get_gamma_l_max() const
Returns the maximum multipolarity to consider when simulating gamma-ray emission to the continuum.
int get_fragment_l_max() const
Returns the maximum orbital angular momentum to consider when simulating fragment emission to the con...
marley::DecayScheme * get_decay_scheme(const int particle_id)
Retrieves discrete level data from the database.
marley::LevelDensityModel & get_level_density_model(const int nucleus_pid)
Retrieves a level density model object from the database, creating it if one did not already exist.
void clear()
Removes all previously stored data from the database.