Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Static Public Member Functions | List of all members
genbb::pdg::particle Class Reference

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>

Inheritance diagram for genbb::pdg::particle:
datatools::i_tree_dumpable

Public Types

enum  particle_code {
  INVALID_CODE = 0, ELECTRON = 11, POSITRON = -11, NEUTRINO_ELECTRON = 12,
  ANTI_NEUTRINO_ELECTRON = -12, MUON_MINUS = 13, MUON_PLUS = -13, NEUTRINO_MUON = 14,
  ANTI_NEUTRINO_MUON = -14, TAU_MINUS = 15, TAU_PLUS = -15, NEUTRINO_TAU = 16,
  ANTI_NEUTRINO_TAU = -16, GAMMA = 22, MC_GEANTINO = 81, MC_OPTICAL_PHOTON = 82,
  MC_CERENKOV = 82, MC_SCINTILLATION = 82, MC_UNSPECIFIED = 100, PION_ZERO = 111,
  PION_PLUS = 211, PION_MINUS = -211, KAON_ZERO_LONG = 130, KAON_ZERO_SHORT = 310,
  KAON_ZERO = 311, ANTI_KAON_ZERO = -311, KAON_PLUS = 321, KAON_MINUS = -321,
  ETA = 221, PROTON = 2212, ANTI_PROTON = -2212, NEUTRON = 2112,
  ANTI_NEUTRON = -2112, LAMBDA = 3122, ANTI_LAMBDA = -3122, SIGMA_PLUS = 3222,
  ANTI_SIGMA_PLUS = -3222, SIGMA_ZERO = 3212, ANTI_SIGMA_ZERO = -3212, SIGMA_MINUS = 3112,
  ANTI_SIGMA_MINUS = -3112, XI_ZERO = 3322, ANTI_XI_ZERO = -3322, XI_MINUS = 3312,
  ANTI_XI_MINUS = -3312, OMEGA_MINUS = 3334, ANTI_OMEGA_MINUS = -3334, DEUTERON = 1000010020,
  ANTI_DEUTERON = -1000010020, TRITON = 1000010030, ANTI_TRITON = -1000010030, HE3 = 1000020030,
  ANTI_HE3 = -1000020030, ALPHA = 1000020040, ANTI_ALPHA = -1000020040
}
 Supported PDG particle codes. More...
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 

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...
 
particleset_code (int32_t)
 Set the PDG code. More...
 
const std::string & get_name () const
 Return the name. More...
 
particleset_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...
 
particleset_alt_name (const std::string &)
 Set the alternative name. More...
 
const std::string & get_latex_repr () const
 Return the LaTeX representation. More...
 
particleset_latex_repr (const std::string &)
 Set the LaTeX representation. More...
 
const datatools::propertiesget_auxiliaries () const
 Return a const reference to the embedded auxiliary properties. More...
 
datatools::propertiesgrab_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_)
 

Detailed Description

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.

Member Enumeration Documentation

◆ particle_code

Supported PDG particle codes.

Enumerator
INVALID_CODE 

Invalid PDG code.

ELECTRON 
POSITRON 
NEUTRINO_ELECTRON 
ANTI_NEUTRINO_ELECTRON 
MUON_MINUS 
MUON_PLUS 
NEUTRINO_MUON 
ANTI_NEUTRINO_MUON 
TAU_MINUS 
TAU_PLUS 
NEUTRINO_TAU 
ANTI_NEUTRINO_TAU 
GAMMA 
MC_GEANTINO 
MC_OPTICAL_PHOTON 
MC_CERENKOV 
MC_SCINTILLATION 
MC_UNSPECIFIED 
PION_ZERO 
PION_PLUS 
PION_MINUS 
KAON_ZERO_LONG 
KAON_ZERO_SHORT 
KAON_ZERO 
ANTI_KAON_ZERO 
KAON_PLUS 
KAON_MINUS 
ETA 
PROTON 
ANTI_PROTON 
NEUTRON 
ANTI_NEUTRON 
LAMBDA 
ANTI_LAMBDA 
SIGMA_PLUS 
ANTI_SIGMA_PLUS 
SIGMA_ZERO 
ANTI_SIGMA_ZERO 
SIGMA_MINUS 
ANTI_SIGMA_MINUS 
XI_ZERO 
ANTI_XI_ZERO 
XI_MINUS 
ANTI_XI_MINUS 
OMEGA_MINUS 
ANTI_OMEGA_MINUS 
DEUTERON 
ANTI_DEUTERON 
TRITON 
ANTI_TRITON 
HE3 
ANTI_HE3 
ALPHA 
ANTI_ALPHA 

Constructor & Destructor Documentation

◆ particle() [1/3]

genbb::pdg::particle::particle ( )

Default constructor.

◆ particle() [2/3]

genbb::pdg::particle::particle ( int32_t  pdg_code_,
const std::string &  name_,
const std::string &  latex_repr_ 
)

Constructor.

◆ particle() [3/3]

genbb::pdg::particle::particle ( int32_t  pdg_code_,
const std::string &  name_,
const std::string &  alt_name_,
const std::string &  latex_repr_ 
)

Constructor.

◆ ~particle()

virtual genbb::pdg::particle::~particle ( )
virtual

Destructor.

Member Function Documentation

◆ build_nuclear_code()

static int32_t genbb::pdg::particle::build_nuclear_code ( int  z_,
int  a_,
int  i_ = 0 
)
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:

  • I = 0 -> ground state (g.s.)
  • I = 1 -> m
  • I = 2 -> n
  • I = 3 -> p
  • I = 4 -> q

◆ get_alt_name()

const std::string& genbb::pdg::particle::get_alt_name ( ) const

Return the alternative name.

◆ get_auxiliaries()

const datatools::properties& genbb::pdg::particle::get_auxiliaries ( ) const

Return a const reference to the embedded auxiliary properties.

◆ get_code()

int32_t genbb::pdg::particle::get_code ( ) const

Return the PDG code.

◆ get_latex_repr()

const std::string& genbb::pdg::particle::get_latex_repr ( ) const

Return the LaTeX representation.

◆ get_name()

const std::string& genbb::pdg::particle::get_name ( ) const

Return the name.

◆ grab_auxiliaries()

datatools::properties& genbb::pdg::particle::grab_auxiliaries ( )

Return a mutable reference to the embedded auxiliary properties.

◆ has_alt_name()

bool genbb::pdg::particle::has_alt_name ( ) const

Check if an alternative name is defined.

◆ is_valid()

bool genbb::pdg::particle::is_valid ( ) const

Check validity.

◆ reset()

void genbb::pdg::particle::reset ( )

Reset.

◆ set_alt_name()

particle& genbb::pdg::particle::set_alt_name ( const std::string &  )

Set the alternative name.

◆ set_code()

particle& genbb::pdg::particle::set_code ( int32_t  )

Set the PDG code.

◆ set_latex_repr()

particle& genbb::pdg::particle::set_latex_repr ( const std::string &  )

Set the LaTeX representation.

◆ set_name()

particle& genbb::pdg::particle::set_name ( const std::string &  )

Set the name.

◆ tree_dump()

virtual void genbb::pdg::particle::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.


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