1 #ifndef RIVET_PARTICLENAME_HH 2 #define RIVET_PARTICLENAME_HH 4 #include "Rivet/Particle.fhh" 5 #include "Rivet/Exceptions.hh" 13 static const PdgId ELECTRON = 11;
14 static const PdgId POSITRON = -11;
15 static const PdgId PROTON = 2212;
16 static const PdgId ANTIPROTON = -2212;
17 static const PdgId PHOTON = 22;
18 static const PdgId NEUTRON = 2112;
19 static const PdgId ANTINEUTRON = -2112;
20 static const PdgId MUON = 13;
21 static const PdgId ANTIMUON = -13;
22 static const PdgId NU_E = 12;
23 static const PdgId NU_EBAR = -12;
24 static const PdgId NU_MU = 14;
25 static const PdgId NU_MUBAR = -14;
26 static const PdgId NU_TAU = 16;
27 static const PdgId NU_TAUBAR = -16;
28 static const PdgId PIPLUS = 211;
29 static const PdgId PIMINUS = -211;
30 static const PdgId PI0 = 111;
31 static const PdgId K0L = 130;
32 static const PdgId K0S = 310;
33 static const PdgId KPLUS = 321;
34 static const PdgId KMINUS = -321;
35 static const PdgId LAMBDA = 3122;
36 static const PdgId LAMBDABAR = -3122;
37 static const PdgId XIMINUS = 3312;
38 static const PdgId XIPLUS = -3312;
39 static const PdgId OMEGAMINUS = 3334;
40 static const PdgId OMEGAPLUS = -3334;
41 static const PdgId TAU = 15;
42 static const PdgId ANTITAU = -15;
43 static const PdgId EMINUS = 11;
44 static const PdgId EPLUS = -11;
45 static const PdgId P = 2212;
46 static const PdgId PBAR = -2212;
47 static const PdgId GLUON = 21;
48 static const PdgId GAMMA = 22;
49 static const PdgId WPLUSBOSON = 24;
50 static const PdgId WMINUSBOSON = -24;
51 static const PdgId ZBOSON = 23;
52 static const PdgId HIGGS = 25;
53 static const PdgId DQUARK = 1;
54 static const PdgId UQUARK = 2;
55 static const PdgId SQUARK = 3;
56 static const PdgId CQUARK = 4;
57 static const PdgId BQUARK = 5;
58 static const PdgId TQUARK = 6;
59 static const PdgId ANY = 10000;
72 static const std::string& particleName(PdgId pid) {
74 return _instance->_particleName(pid);
77 static PdgId particleId(
const std::string& pname) {
79 return _instance->_particleId(pname);
85 const std::string& _particleName(PdgId pid);
88 PdgId _particleId(
const std::string& pname);
94 _add_pid_name(ELECTRON,
"ELECTRON");
95 _add_pid_name(POSITRON,
"POSITRON");
96 _add_pid_name(PROTON,
"PROTON");
97 _add_pid_name(ANTIPROTON,
"ANTIPROTON");
98 _add_pid_name(PHOTON,
"PHOTON");
99 _add_pid_name(NEUTRON,
"NEUTRON");
100 _add_pid_name(ANTINEUTRON,
"ANTINEUTRON");
101 _add_pid_name(MUON,
"MUON");
102 _add_pid_name(ANTIMUON,
"ANTIMUON");
103 _add_pid_name(NU_E,
"NU_E");
104 _add_pid_name(NU_EBAR,
"NU_EBAR");
105 _add_pid_name(NU_MU,
"NU_MU");
106 _add_pid_name(NU_MUBAR,
"NU_MUBAR");
107 _add_pid_name(NU_TAU,
"NU_TAU");
108 _add_pid_name(NU_TAUBAR,
"NU_TAUBAR");
109 _add_pid_name(PIPLUS,
"PIPLUS");
110 _add_pid_name(PIMINUS,
"PIMINUS");
111 _add_pid_name(TAU,
"TAU");
112 _add_pid_name(WPLUSBOSON,
"WPLUSBOSON");
113 _add_pid_name(WMINUSBOSON,
"WMINUSBOSON");
114 _add_pid_name(ZBOSON,
"ZBOSON");
115 _add_pid_name(HIGGS,
"HIGGS");
116 _add_pid_name(ANTITAU,
"ANTITAU");
123 _add_pid_name(ANY,
"*");
126 void _add_pid_name(PdgId pid,
const std::string& pname) {
127 _ids_names[pid] = pname;
128 _names_ids[pname] = pid;
134 std::map<PdgId, std::string> _ids_names;
136 std::map<std::string, PdgId> _names_ids;
143 return ParticleNames::particleName(p);
149 return ParticleNames::particleId(pname);
155 return make_pair(a, b);
160 inline std::pair<PdgId,PdgId>
make_pdgid_pair(
const std::string& a,
const std::string& b) {
163 return make_pair(pa, pb);
Definition: MC_JetAnalysis.hh:9
PdgId toParticleId(const std::string &pname)
Print a PdgId as a named string.
Definition: ParticleName.hh:148
std::string toBeamsString(const PdgIdPair &pair)
Print a PdgIdPair as a string.
Definition: ParticleName.hh:168
const std::string & toParticleName(PdgId p)
Print a PdgId as a named string.
Definition: ParticleName.hh:142
Definition: ParticleName.hh:69
std::pair< PdgId, PdgId > make_pdgid_pair(PdgId a, PdgId b)
Convenience maker of particle ID pairs from PdgIds.
Definition: ParticleName.hh:154