Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
The identification of a particle with its PDG code This follows the scheme from http://pdg.lbl.gov/2014/reviews/rpp2014-rev-monte-carlo-numbering.pdf. More...
#include <bayeux/genbb_help/pdg_particle_tools.h>
Public Member Functions | |
particle () | |
Default constructor. More... | |
particle (int32_t pdg_code_, const std::string &name_, const std::string &latex_repr_) | |
Constructor. More... | |
particle (int32_t pdg_code_, const std::string &name_, const std::string &alt_name_, const std::string &latex_repr_) | |
Constructor. More... | |
virtual | ~particle () |
Destructor. More... | |
bool | is_valid () const |
Check validity. More... | |
void | reset () |
Reset. More... | |
int32_t | get_code () const |
Return the PDG code. More... | |
particle & | set_code (int32_t) |
Set the PDG code. More... | |
const std::string & | get_name () const |
Return the name. More... | |
particle & | set_name (const std::string &) |
Set the name. More... | |
bool | has_alt_name () const |
Check if an alternative name is defined. More... | |
const std::string & | get_alt_name () const |
Return the alternative name. More... | |
particle & | set_alt_name (const std::string &) |
Set the alternative name. More... | |
const std::string & | get_latex_repr () const |
Return the LaTeX representation. More... | |
particle & | set_latex_repr (const std::string &) |
Set the LaTeX representation. More... | |
const datatools::properties & | get_auxiliaries () const |
Return a const reference to the embedded auxiliary properties. More... | |
datatools::properties & | grab_auxiliaries () |
Return a mutable reference to the embedded auxiliary properties. More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. More... | |
virtual void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const |
Main new interface method for printing. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const |
Printing with jsonized options. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const |
Printing with jsonized options. More... | |
void | tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const |
void | tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const |
void | smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const |
Static Public Member Functions | |
static int32_t | build_nuclear_code (int z_, int a_, int i_=0) |
Static Public Member Functions inherited from datatools::i_tree_dumpable | |
static const boost::property_tree::ptree & | empty_options () |
static boost::property_tree::ptree | make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false) |
static std::ostream & | last_skip_tag (std::ostream &out_) |
static std::ostream & | skip_tag (std::ostream &out_) |
static std::ostream & | last_tag (std::ostream &out_) |
static std::ostream & | tag (std::ostream &out_) |
The identification of a particle with its PDG code This follows the scheme from http://pdg.lbl.gov/2014/reviews/rpp2014-rev-monte-carlo-numbering.pdf.
Supported PDG particle codes.
genbb::pdg::particle::particle | ( | ) |
Default constructor.
genbb::pdg::particle::particle | ( | int32_t | pdg_code_, |
const std::string & | name_, | ||
const std::string & | latex_repr_ | ||
) |
Constructor.
genbb::pdg::particle::particle | ( | int32_t | pdg_code_, |
const std::string & | name_, | ||
const std::string & | alt_name_, | ||
const std::string & | latex_repr_ | ||
) |
Constructor.
|
virtual |
Destructor.
|
static |
Build the nuclear code from (Z, A and isomer level). This is not for single hadrons like p, n,... I is the isomer level with the following possible values:
const std::string& genbb::pdg::particle::get_alt_name | ( | ) | const |
Return the alternative name.
const datatools::properties& genbb::pdg::particle::get_auxiliaries | ( | ) | const |
Return a const reference to the embedded auxiliary properties.
int32_t genbb::pdg::particle::get_code | ( | ) | const |
Return the PDG code.
const std::string& genbb::pdg::particle::get_latex_repr | ( | ) | const |
Return the LaTeX representation.
const std::string& genbb::pdg::particle::get_name | ( | ) | const |
Return the name.
datatools::properties& genbb::pdg::particle::grab_auxiliaries | ( | ) |
Return a mutable reference to the embedded auxiliary properties.
bool genbb::pdg::particle::has_alt_name | ( | ) | const |
Check if an alternative name is defined.
bool genbb::pdg::particle::is_valid | ( | ) | const |
Check validity.
void genbb::pdg::particle::reset | ( | ) |
Reset.
particle& genbb::pdg::particle::set_alt_name | ( | const std::string & | ) |
Set the alternative name.
particle& genbb::pdg::particle::set_code | ( | int32_t | ) |
Set the PDG code.
particle& genbb::pdg::particle::set_latex_repr | ( | const std::string & | ) |
Set the LaTeX representation.
particle& genbb::pdg::particle::set_name | ( | const std::string & | ) |
Set the name.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.