Public Member Functions |
Static Public Member Functions |
Private Member Functions |
Private Attributes |
Static Private Attributes
ParticleNames Class Reference
Detailed Description
Handler for particle name code <-> string conversion
Definition at line 162 of file ParticleName.hh. Constructor & Destructor Documentation
Definition at line 184 of file ParticleName.hh. { _add_pid_name(ELECTRON, "ELECTRON"); _add_pid_name(POSITRON, "POSITRON"); _add_pid_name(PROTON, "PROTON"); _add_pid_name(ANTIPROTON, "ANTIPROTON"); _add_pid_name(PHOTON, "PHOTON"); _add_pid_name(NEUTRON, "NEUTRON"); _add_pid_name(ANTINEUTRON, "ANTINEUTRON"); _add_pid_name(MUON, "MUON"); _add_pid_name(ANTIMUON, "ANTIMUON"); _add_pid_name(NU_E, "NU_E"); _add_pid_name(NU_EBAR, "NU_EBAR"); _add_pid_name(NU_MU, "NU_MU"); _add_pid_name(NU_MUBAR, "NU_MUBAR"); _add_pid_name(NU_TAU, "NU_TAU"); _add_pid_name(NU_TAUBAR, "NU_TAUBAR"); _add_pid_name(PIPLUS, "PIPLUS"); _add_pid_name(PIMINUS, "PIMINUS"); _add_pid_name(TAU, "TAU"); _add_pid_name(WPLUSBOSON, "WPLUSBOSON"); _add_pid_name(WMINUSBOSON, "WMINUSBOSON"); _add_pid_name(ZBOSON, "ZBOSON"); _add_pid_name(HIGGS, "HIGGS"); _add_pid_name(ANTITAU, "ANTITAU"); _add_pid_name(ANY, "*"); } Member Function Documentation
Definition at line 211 of file ParticleName.hh. { _ids_names[pid] = pname; _names_ids[pname] = pid; }
Definition at line 21 of file ParticleName.cc. { if (_names_ids.find(pname) == _names_ids.end()) { if (toUpper(pname) == "P+" || toUpper(pname) == "P") return PROTON; if (toUpper(pname) == "P-" || toUpper(pname) == "PBAR") return ANTIPROTON; if (toUpper(pname) == "E-") return ELECTRON; if (toUpper(pname) == "E+") return POSITRON; if (toUpper(pname) == "GAMMA") return PHOTON; if (toUpper(pname) == "N") return NEUTRON; try { PdgId rtn = lexical_cast<PdgId>(pname); return rtn; } catch (const bad_lexical_cast& blc) { throw PidError("Particle name '" + pname + "' not known and could not be directly cast to a PDG ID."); } } return _names_ids[pname]; }
Definition at line 13 of file ParticleName.cc. { if (_ids_names.find(pid) == _ids_names.end()) { throw PidError("Particle ID '" + lexical_cast<string>(pid) + "' not known."); } return _ids_names[pid]; }
Definition at line 171 of file ParticleName.hh. { /// @todo Isn't there a nicer, pointerless way to do singletons? if (!_instance) _instance = unique_ptr<ParticleNames>(new ParticleNames); return _instance->_particleId(pname); }
Definition at line 165 of file ParticleName.hh. { /// @todo Isn't there a nicer, pointerless way to do singletons? if (!_instance) _instance = unique_ptr<ParticleNames>(new ParticleNames); return _instance->_particleName(pid); } Member Data Documentation
Definition at line 218 of file ParticleName.hh.
Definition at line 216 of file ParticleName.hh.
Definition at line 220 of file ParticleName.hh. The documentation for this class was generated from the following files: Generated on Tue Dec 13 2016 16:34:19 for The Rivet MC analysis system by ![]() |