31 #ifndef GENBB_HELP_PDG_PARTICLE_TOOLS_H 32 #define GENBB_HELP_PDG_PARTICLE_TOOLS_H 40 #include <boost/cstdint.hpp> 133 const std::string & name_,
134 const std::string & latex_repr_);
138 const std::string & name_,
139 const std::string & alt_name_,
140 const std::string & latex_repr_);
158 const std::string &
get_name()
const;
185 virtual void tree_dump(std::ostream & out_ = std::clog,
186 const std::string & title_ =
"",
187 const std::string & indent_ =
"",
188 bool inherit_ =
false)
const;
204 std::string _alt_name_;
205 std::string _latex_repr_;
250 virtual void tree_dump(std::ostream & out_ = std::clog,
251 const std::string & title_ =
"",
252 const std::string & indent_ =
"",
253 bool inherit_ =
false)
const;
277 #endif // GENBB_HELP_PDG_PARTICLE_TOOLS_H particle & set_alt_name(const std::string &)
Set the alternative name.
Definition: pdg_particle_tools.h:62
Definition: pdg_particle_tools.h:114
const std::string & get_name() const
Return the name.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
Definition: pdg_particle_tools.h:68
Definition: pdg_particle_tools.h:98
Definition: pdg_particle_tools.h:102
void unregistration(const std::string &name_)
Unregistration of a particle record given its name.
Definition: pdg_particle_tools.h:103
void register_standard_particles()
Register standard particles.
Definition: pdg_particle_tools.h:104
particle_code
Supported PDG particle codes.
Definition: pdg_particle_tools.h:57
static const particle_registry & const_system_registry()
Access to the non mutable system singleton registry.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
Definition: pdg_particle_tools.h:86
Definition: pdg_particle_tools.h:63
particle()
Default constructor.
Definition: pdg_particle_tools.h:82
particle & registration(const particle &part_)
Registration of a particle record.
Definition: pdg_particle_tools.h:97
bool has_particle_by_name(const std::string &name_) const
Check particle given its name.
Definition: pdg_particle_tools.h:112
Definition: pdg_particle_tools.h:79
Definition: pdg_particle_tools.h:67
Definition: pdg_particle_tools.h:91
Definition: pdg_particle_tools.h:101
Definition: pdg_particle_tools.h:124
bool has_particle(int32_t pdg_code_) const
Check particle.
Utility macros for exception handling.
Definition: pdg_particle_tools.h:85
Definition: pdg_particle_tools.h:106
Definition: pdg_particle_tools.h:120
Definition: pdg_particle_tools.h:92
particle & set_code(int32_t)
Set the PDG code.
Definition: pdg_particle_tools.h:110
const particle & get_particle_by_name(const std::string &name_) const
Return a registered particle given its name.
Definition: pdg_particle_tools.h:108
particle & set_name(const std::string &)
Set the name.
Definition: pdg_particle_tools.h:119
Invalid PDG code.
Definition: pdg_particle_tools.h:58
std::map< int32_t, particle > particle_dict_type
Type of dictionary of particle records.
Definition: pdg_particle_tools.h:217
Definition: pdg_particle_tools.h:117
Definition: pdg_particle_tools.h:94
virtual ~particle()
Destructor.
Definition: pdg_particle_tools.h:113
static int32_t build_nuclear_code(int z_, int a_, int i_=0)
void clear()
Clear the registry.
Definition: pdg_particle_tools.h:107
bool is_valid() const
Check validity.
Top-level namespace of the Bayeux/genbb_help module library.
Definition: alpha_decay.h:51
Definition: pdg_particle_tools.h:100
int32_t get_code() const
Return the PDG code.
Definition: pdg_particle_tools.h:69
particle_registry(uint32_t flags_=0)
Default constructor.
const particle & get_particle(int32_t pdg_code_) const
Return a registered unit.
Definition: pdg_particle_tools.h:70
datatools::properties & grab_auxiliaries()
Return a mutable reference to the embedded auxiliary properties.
The identification of a particle with its PDG code This follows the scheme from http://pdg....
Definition: pdg_particle_tools.h:52
const std::string & get_alt_name() const
Return the alternative name.
Definition: pdg_particle_tools.h:65
Definition: pdg_particle_tools.h:75
const datatools::properties & get_auxiliaries() const
Return a const reference to the embedded auxiliary properties.
Definition: pdg_particle_tools.h:105
Definition: pdg_particle_tools.h:111
Definition: pdg_particle_tools.h:88
Definition: pdg_particle_tools.h:123
Definition: pdg_particle_tools.h:109
Definition: pdg_particle_tools.h:87
Definition: pdg_particle_tools.h:64
A registry for particle entries.
Definition: pdg_particle_tools.h:211
Definition: pdg_particle_tools.h:66
Definition: pdg_particle_tools.h:78
Definition: pdg_particle_tools.h:99
Definition: pdg_particle_tools.h:72
Definition: pdg_particle_tools.h:89
particle & set_latex_repr(const std::string &)
Set the LaTeX representation.
Definition: pdg_particle_tools.h:122
Definition: pdg_particle_tools.h:90
static particle_registry & system_registry()
Access to the mutable system singleton registry.
Definition: pdg_particle_tools.h:93
const std::string & get_latex_repr() const
Return the LaTeX representation.
Definition: pdg_particle_tools.h:80
bool has_alt_name() const
Check if an alternative name is defined.
Definition: pdg_particle_tools.h:81
Definition: pdg_particle_tools.h:118
Definition: pdg_particle_tools.h:71
~particle_registry()
Destructor.
Definition: pdg_particle_tools.h:61
Definition: pdg_particle_tools.h:121