MARLEY (Model of Argon Reaction Low Energy Yields)  v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Public Member Functions | Static Public Member Functions | List of all members
marley::StructureDatabase Class Reference

Container for nuclear structure information organized by nuclide. More...

#include <StructureDatabase.hh>

Public Member Functions

 StructureDatabase ()
 Creates an empty database.
 
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. More...
 
void clear ()
 Removes all previously stored data from the database.
 
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 specific nuclide. More...
 
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. More...
 
marley::DecaySchemeget_decay_scheme (const int particle_id)
 Retrieves discrete level data from the database. More...
 
marley::DecaySchemeget_decay_scheme (const int Z, const int A)
 Retrieves discrete level data from the database. More...
 
int get_fragment_l_max () const
 Returns the maximum orbital angular momentum to consider when simulating fragment emission to the continuum.
 
int get_gamma_l_max () const
 Returns the maximum multipolarity to consider when simulating gamma-ray emission to the continuum.
 
marley::GammaStrengthFunctionModelget_gamma_strength_function_model (const int nuc_pdg)
 Retrieves a gamma-ray strength function model object from the database, creating it if one did not already exist. More...
 
marley::GammaStrengthFunctionModelget_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 already exist. More...
 
marley::LevelDensityModelget_level_density_model (const int nucleus_pid)
 Retrieves a level density model object from the database, creating it if one did not already exist. More...
 
marley::LevelDensityModelget_level_density_model (const int Z, const int A)
 Retrieves a level density model object from the database, creating it if one did not already exist. More...
 
marley::OpticalModelget_optical_model (const int Z, const int A)
 Retrieves an optical model object from the database, creating it if one did not already exist. More...
 
marley::OpticalModelget_optical_model (int nucleus_pid)
 Retrieves an optical model object from the database, creating it if one did not already exist. More...
 
void remove_decay_scheme (int pdg)
 Deletes the discrete level data in the database associated with a given nuclide. More...
 
void set_fragment_l_max (int ell)
 Sets the maximum orbital angular momentum to consider when simulating fragment emission to the continuum.
 
void set_gamma_l_max (int ell)
 Sets the maximum multipolarity to consider when simulating gamma-ray emission to the continuum.
 

Static Public Member Functions

static const std::map< int, marley::Fragment > & fragments ()
 Retrieves a const reference to the table of Fragment objects.
 
static const marley::Fragmentget_fragment (const int fragment_pdg)
 Retrieves nuclear fragment data from the database. More...
 
static const marley::Fragmentget_fragment (const int Z, const int A)
 Retrieves nuclear fragment data from the database. More...
 
static void get_gs_spin_parity (const int Z, const int A, int &twoJ, marley::Parity &Pi)
 Looks up the ground-state spin-parity for a particular nuclide. More...
 
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. More...
 

Detailed Description

Container for nuclear structure information organized by nuclide.

Currently, the StructureDatabase object can hold nuclear discrete level data (DecayScheme objects), optical models (OpticalModel objects), \(\gamma\)-ray strength function models (GammaStrengthFunctionModel objects), and level density models (LevelDensityModel objects)

Member Function Documentation

◆ add_decay_scheme()

void marley::StructureDatabase::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.

Parameters
pdgPDG code for the desired nuclide
dsA unique_ptr to DecayScheme object to move into the database.

◆ emplace_decay_scheme()

void marley::StructureDatabase::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 specific nuclide.

Parameters
pdgPDG code for the desired nuclide
filenameName of the file that contains the discrete level data
formatDecayScheme::FileFormat specifier that indicates which nuclear data format is used in the file

◆ find_all_nuclides()

std::set< int > marley::StructureDatabase::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.

Parameters
filenameName of the file that contains the discrete level data
formatDecayScheme::FileFormat specifier that indicates which nuclear data format is used in the file

◆ get_decay_scheme() [1/2]

marley::DecayScheme * marley::StructureDatabase::get_decay_scheme ( const int  particle_id)

Retrieves discrete level data from the database.

Parameters
particle_idPDG code for the desired nuclide
Returns
pointer to the requested nuclide's DecayScheme object, or nullptr if one could not be found

◆ get_decay_scheme() [2/2]

marley::DecayScheme * marley::StructureDatabase::get_decay_scheme ( const int  Z,
const int  A 
)

Retrieves discrete level data from the database.

Parameters
Zatomic number
Amass number
Returns
pointer to the requested nuclide's DecayScheme object, or nullptr if one could not be found

◆ get_fragment() [1/2]

const marley::Fragment * marley::StructureDatabase::get_fragment ( const int  fragment_pdg)
static

Retrieves nuclear fragment data from the database.

Parameters
fragment_pdgPDG code for the desired fragment
Returns
Pointer to the requested Fragment object, or nullptr if it could not be found

◆ get_fragment() [2/2]

const marley::Fragment * marley::StructureDatabase::get_fragment ( const int  Z,
const int  A 
)
static

Retrieves nuclear fragment data from the database.

Parameters
ZFragment proton number
AFragment mass number
Returns
Pointer to the requested Fragment object, or nullptr if it could not be found

◆ get_gamma_strength_function_model() [1/2]

marley::GammaStrengthFunctionModel & marley::StructureDatabase::get_gamma_strength_function_model ( const int  nuc_pdg)

Retrieves a gamma-ray strength function model object from the database, creating it if one did not already exist.

Parameters
nuc_pdgPDG code for the nuclide of interest

◆ get_gamma_strength_function_model() [2/2]

marley::GammaStrengthFunctionModel & marley::StructureDatabase::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 already exist.

Parameters
Zatomic number
Amass number

◆ get_gs_spin_parity() [1/2]

void marley::StructureDatabase::get_gs_spin_parity ( const int  Z,
const int  A,
int &  twoJ,
marley::Parity Pi 
)
static

Looks up the ground-state spin-parity for a particular nuclide.

Parameters
[in]ZProton number for the nuclide of interest
[in]AMass number for the nuclide of interest
[out]twoJTwo times the ground-state nuclear spin
[out]PiGround-state nuclear parity

◆ get_gs_spin_parity() [2/2]

void marley::StructureDatabase::get_gs_spin_parity ( int  nuc_pdg,
int &  twoJ,
marley::Parity Pi 
)
static

Looks up the ground-state spin-parity for a particular nuclide.

Parameters
[in]nuc_pdgPDG code for the nuclide of interest
[out]twoJTwo times the ground-state nuclear spin
[out]PiGround-state nuclear parity

◆ get_level_density_model() [1/2]

marley::LevelDensityModel & marley::StructureDatabase::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.

Parameters
nucleus_pidPDG particle ID for the desired nucleus

◆ get_level_density_model() [2/2]

marley::LevelDensityModel & marley::StructureDatabase::get_level_density_model ( const int  Z,
const int  A 
)

Retrieves a level density model object from the database, creating it if one did not already exist.

Parameters
Zatomic number
Amass number

◆ get_optical_model() [1/2]

marley::OpticalModel & marley::StructureDatabase::get_optical_model ( const int  Z,
const int  A 
)

Retrieves an optical model object from the database, creating it if one did not already exist.

Parameters
Zatomic number
Amass number

◆ get_optical_model() [2/2]

marley::OpticalModel & marley::StructureDatabase::get_optical_model ( int  nucleus_pid)

Retrieves an optical model object from the database, creating it if one did not already exist.

Parameters
particle_idPDG particle ID for the desired nuclide
Todo:
add check for invalid nucleus particle ID value

◆ remove_decay_scheme()

void marley::StructureDatabase::remove_decay_scheme ( int  pdg)

Deletes the discrete level data in the database associated with a given nuclide.

If a decay scheme does not exist in the database for the requested nuclide, then this function will return without making any changes.

Parameters
pdgPDG code for the nuclide to remove

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