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

Discrete level and γ-ray data for a specific nuclide. More...

#include <DecayScheme.hh>

Public Types

enum class  FileFormat { native , talys }
 The FileFormat type is used to tell the DecayScheme class which format to assume when parsing a discrete level data file. More...
 

Public Member Functions

 DecayScheme (int Z, int A)
 Create a DecayScheme without any levels. More...
 
 DecayScheme (int Z, int A, const std::string &filename, FileFormat format=FileFormat::talys)
 Create a DecayScheme using discrete level data from a file. More...
 
int A () const
 Get the mass number.
 
marley::Leveladd_level (const marley::Level &level)
 Add a level to the DecayScheme. More...
 
void do_cascade (marley::Level &initial_level, marley::Event &event, marley::Generator &gen, int qIon)
 Simulates nuclear de-excitation via γ-ray emission(s) More...
 
const std::vector< std::unique_ptr< marley::Level > > & get_levels () const
 Get a const reference to the vector that holds the Level objects.
 
marley::Levelget_pointer_to_closest_level (double E_level)
 Gets a pointer to the Level in the DecayScheme whose excitation energy is closest to E_level. More...
 
int pdg () const
 Returns the nuclear PDG code corresponding to Z and A.
 
void print (std::ostream &out=std::cout) const
 Print this DecayScheme object to a std::ostream.
 
void print_latex_table (std::ostream &ostr=std::cout)
 Print LaTeX source code that gives a tabular representation of the DecayScheme object.
 
void print_report (std::ostream &ostr=std::cout) const
 Print a human-readable text representation of the DecayScheme object.
 
void read_from_stream (std::istream &in)
 Use a std::istream to initialize this DecayScheme object, replacing any previous data. More...
 
int Z () const
 Get the atomic number.
 

Protected Member Functions

size_t level_lower_bound_index (double Ex)
 Get the index of the first level whose energy is not less than Ex. More...
 

Protected Attributes

int A_
 Mass number.
 
std::vector< std::unique_ptr< marley::Level > > levels_
 Level objects owned by this DecayScheme.
 
int Z_
 Atomic number.
 

Detailed Description

Discrete level and γ-ray data for a specific nuclide.

Member Enumeration Documentation

◆ FileFormat

The FileFormat type is used to tell the DecayScheme class which format to assume when parsing a discrete level data file.

Currently, only discrete level data in MARLEY's native format (which may be read from a std::istream to initialize a marley::DecayScheme object via the >> operator) or in the format used by the TALYS nuclear code are allowed.

Constructor & Destructor Documentation

◆ DecayScheme() [1/2]

marley::DecayScheme::DecayScheme ( int  Z,
int  A 
)

Create a DecayScheme without any levels.

Parameters
ZAtomic number of the desired nuclide
AMass number of the desired nuclide

◆ DecayScheme() [2/2]

marley::DecayScheme::DecayScheme ( int  Z,
int  A,
const std::string &  filename,
FileFormat  format = FileFormat::talys 
)

Create a DecayScheme using discrete level data from a file.

Parameters
ZAtomic number of the desired nuclide
AMass number of the desired nuclide
filenameName of the file containing the discrete level data
formatFileFormat specifier that indicates which nuclear data format is used in the file

Member Function Documentation

◆ add_level()

marley::Level & marley::DecayScheme::add_level ( const marley::Level level)

Add a level to the DecayScheme.

Returns
A reference to the newly-added Level object

◆ do_cascade()

void marley::DecayScheme::do_cascade ( marley::Level initial_level,
marley::Event event,
marley::Generator gen,
int  qIon 
)

Simulates nuclear de-excitation via γ-ray emission(s)

Gamma-rays will be randomly emitted until the nucleus reaches its ground state.

Parameters
[in]initial_levelReference to the first level that will de-excite via γ-ray emission
[in,out]eventReference to an Event object that will store the emitted γs
[in]genReference to the Generator to use for random sampling
qIonNet charge of the atom or ion whose nucleus is de-exciting

◆ get_pointer_to_closest_level()

marley::Level * marley::DecayScheme::get_pointer_to_closest_level ( double  E_level)

Gets a pointer to the Level in the DecayScheme whose excitation energy is closest to E_level.

Parameters
E_levelexcitation energy (MeV)
Note
Returns nullptr if the DecayScheme doesn't own any Level objects

◆ level_lower_bound_index()

size_t marley::DecayScheme::level_lower_bound_index ( double  Ex)
protected

Get the index of the first level whose energy is not less than Ex.

Parameters
ExExcitation energy (MeV)
Note
Returns levels_.size() if all levels have energies below Ex

◆ read_from_stream()

void marley::DecayScheme::read_from_stream ( std::istream &  in)

Use a std::istream to initialize this DecayScheme object, replacing any previous data.

The expected format for data in the std::istream is the same as the output format in DecayScheme::print()


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