hej is hosted by Hepforge, IPPP Durham
HEJ 2.2.2
High energy resummation for hadron colliders
Loading...
Searching...
No Matches
PDG_codes.hh
Go to the documentation of this file.
1
13#pragma once
14
15#include <cstdlib>
16#include <string>
17
18#include "boost/rational.hpp"
19
20namespace HEJ {
21
23 namespace pid {
25 enum ParticleID: int{
28 d = 1,
29 down = d,
30 u = 2,
31 up = u,
32 s = 3,
34 c = 4,
35 charm = c,
36 b = 5,
38 t = 6,
39 top = t,
40 e = 11,
42 nu_e = 12,
44 mu = 13,
45 muon = mu,
46 nu_mu = 14,
48 tau = 15,
49 nu_tau = 16,
51 d_bar = -d,
53 u_bar = -u,
54 antiup = -u,
55 s_bar = -s,
57 c_bar = -c,
59 b_bar = -b,
61 t_bar = -t,
63 e_bar = -e,
76 gluon = 21,
77 g = gluon,
78 photon = 22,
80 Z = 23,
83 Wp = 24,
84 Wm = -Wp,
85 h = 25,
86 Higgs = h,
87 higgs = h,
88 p = 2212,
90 p_bar = -p,
92 };
93
95 std::string name(ParticleID id);
96
99
100 } // namespace pid
101
103
105 ParticleID to_ParticleID(std::string const & name);
106
112 inline
113 constexpr bool is_antiparticle(ParticleID id) {
114 return id < 0;
115 }
116
122 inline
123 constexpr bool is_quark(ParticleID id){
124 return (id >= pid::down && id <= pid::top);
125 }
126
132 inline
133 constexpr bool is_antiquark(ParticleID id){
134 return (id <= pid::d_bar && id >= pid::t_bar);
135 }
136
142 inline
143 constexpr bool is_anyquark(ParticleID id){
144 return is_quark(id) || is_antiquark(id);
145 }
146
152 inline
153 constexpr bool is_gluon(ParticleID id){
154 return id == pid::gluon;
155 }
161 inline
162 constexpr bool is_parton(ParticleID id){
163 return is_gluon(id)
164 || (is_anyquark(id) && std::abs(id) != pid::top);
165 }
166
172 inline
173 constexpr bool is_AWZ_boson(ParticleID id){
174 return id == pid::Wm || (id >= pid::photon && id <= pid::Wp)
175 || id == pid::Z_photon_mix;
176 }
177
184 inline
185 constexpr bool is_AWZH_boson(ParticleID id){
186 return is_AWZ_boson(id) || (id == pid::Higgs);
187 }
188
194 inline
195 constexpr bool is_lepton(ParticleID id){
196 return (id >= pid::electron && id <= pid::tau_neutrino);
197 }
198
204 inline
205 constexpr bool is_antilepton(ParticleID id){
206 return (id <= pid::positron && id >= pid::nu_tau_bar);
207 }
208
215 inline
216 constexpr bool is_anylepton(ParticleID id){
217 return ( is_lepton(id) || is_antilepton(id));
218 }
219
225 inline
226 constexpr bool is_neutrino(ParticleID id){
227 return (id == pid::nu_e || id == pid::tau_neutrino
228 || id == pid::muon_neutrino);
229 }
230
236 inline
237 constexpr bool is_antineutrino(ParticleID id){
238 return (id == pid::nu_e_bar || id == pid::nu_tau_bar
239 || id == pid::nu_mu_bar);
240 }
241
248 inline
249 constexpr bool is_anyneutrino(ParticleID id){
250 return ( is_neutrino(id) || is_antineutrino(id));
251 }
252
254 inline
255 constexpr bool is_massless(ParticleID id){
256 // cannot use `std::abs` because it's not `constexpr`
257 const int abs_id = (id >= 0)?id:-id;
258 switch(abs_id){
259 case pid::bottom:
260 case pid::top:
261 case pid::tau:
262 case pid::Z:
264 case pid::Wp:
265 case pid::Higgs:
266 case pid::proton:
267 return false;
268 default:
269 return true;
270 }
271 }
272
274 inline
275 constexpr bool is_massive(ParticleID id){
276 return !is_massless(id);
277 }
278
284 inline
285 constexpr bool is_charged_lepton(ParticleID id){
286 return is_lepton(id) && !is_neutrino(id);
287 }
288
294 inline
296 return is_antilepton(id) && !is_antineutrino(id);
297 }
298
304 inline
306 return is_anylepton(id) && !is_anyneutrino(id);
307 }
308
314 boost::rational<int> charge(ParticleID id);
315
316} // namespace HEJ
ParticleID anti(ParticleID id)
return the negative flavour of the given PDG ID
ParticleID
The possible particle identities. We use PDG IDs as standard.
Definition: PDG_codes.hh:25
@ Wp
Definition: PDG_codes.hh:83
@ unspecified
Unspecified type, should never be used!, debug only.
Definition: PDG_codes.hh:27
@ antibottom
Definition: PDG_codes.hh:60
@ muon_neutrino
Definition: PDG_codes.hh:47
@ nu_mu
Definition: PDG_codes.hh:46
@ t_bar
Definition: PDG_codes.hh:61
@ bottom
Definition: PDG_codes.hh:37
@ s
Definition: PDG_codes.hh:32
@ antitau
Definition: PDG_codes.hh:73
@ nu_e
Definition: PDG_codes.hh:42
@ d
Definition: PDG_codes.hh:28
@ d_bar
Definition: PDG_codes.hh:51
@ antiproton
Definition: PDG_codes.hh:91
@ Z_gamma_mix
Definition: PDG_codes.hh:82
@ g
Definition: PDG_codes.hh:77
@ s_bar
Definition: PDG_codes.hh:55
@ nu_mu_bar
Definition: PDG_codes.hh:70
@ p
Definition: PDG_codes.hh:88
@ tau_neutrino
Definition: PDG_codes.hh:50
@ antistrange
Definition: PDG_codes.hh:56
@ muon
Definition: PDG_codes.hh:45
@ electron_neutrino
Definition: PDG_codes.hh:43
@ top
Definition: PDG_codes.hh:39
@ nu_tau_bar
Definition: PDG_codes.hh:74
@ tau_antineutrino
Definition: PDG_codes.hh:75
@ tau_bar
Definition: PDG_codes.hh:72
@ nu_e_bar
Definition: PDG_codes.hh:66
@ nu_tau
Definition: PDG_codes.hh:49
@ positron
Definition: PDG_codes.hh:64
@ photon
Definition: PDG_codes.hh:78
@ electron
Definition: PDG_codes.hh:41
@ t
Definition: PDG_codes.hh:38
@ gamma
Definition: PDG_codes.hh:79
@ proton
Definition: PDG_codes.hh:89
@ h
Definition: PDG_codes.hh:85
@ Z_photon_mix
Definition: PDG_codes.hh:81
@ strange
Definition: PDG_codes.hh:33
@ b
Definition: PDG_codes.hh:36
@ Z
Definition: PDG_codes.hh:80
@ p_bar
Definition: PDG_codes.hh:90
@ c_bar
Definition: PDG_codes.hh:57
@ antidown
Definition: PDG_codes.hh:52
@ Wm
Definition: PDG_codes.hh:84
@ antiup
Definition: PDG_codes.hh:54
@ down
Definition: PDG_codes.hh:29
@ u
Definition: PDG_codes.hh:30
@ higgs
Definition: PDG_codes.hh:87
@ e
Definition: PDG_codes.hh:40
@ tau
Definition: PDG_codes.hh:48
@ antimuon
Definition: PDG_codes.hh:69
@ electron_antineutrino
Definition: PDG_codes.hh:67
@ anticharm
Definition: PDG_codes.hh:58
@ Higgs
Definition: PDG_codes.hh:86
@ antielectron
Definition: PDG_codes.hh:65
@ charm
Definition: PDG_codes.hh:35
@ antitop
Definition: PDG_codes.hh:62
@ mu_bar
Definition: PDG_codes.hh:68
@ u_bar
Definition: PDG_codes.hh:53
@ c
Definition: PDG_codes.hh:34
@ up
Definition: PDG_codes.hh:31
@ e_bar
Definition: PDG_codes.hh:63
@ gluon
Definition: PDG_codes.hh:76
@ mu
Definition: PDG_codes.hh:44
@ muon_antineutrino
Definition: PDG_codes.hh:71
@ b_bar
Definition: PDG_codes.hh:59
std::string name(ParticleID id)
Get the of the particle with the given PDG ID.
Main HEJ 2 Namespace.
Definition: mainpage.dox:1
constexpr bool is_antiparticle(Particle const &p)
Check if the argument is an antiparticle.
Definition: Particle.hh:120
constexpr bool is_antineutrino(Particle const &p)
Function to determine if particle is an antineutrino.
Definition: Particle.hh:194
constexpr bool is_parton(Particle const &p)
Check if a particle is a parton, i.e. quark, antiquark, or gluon.
Definition: Particle.hh:126
constexpr bool is_antiquark(Particle const &p)
Check if a particle is an anti-quark.
Definition: Particle.hh:138
constexpr bool is_lepton(Particle const &p)
Function to determine if particle is a lepton.
Definition: Particle.hh:154
ParticleID to_ParticleID(std::string const &name)
Convert a particle name to the corresponding PDG particle ID.
constexpr bool is_quark(Particle const &p)
Check if a particle is a quark.
Definition: Particle.hh:132
constexpr bool is_anylepton(Particle const &p)
Function to determine if particle is an (anti-)lepton.
Definition: Particle.hh:174
constexpr bool is_gluon(ParticleID id)
Function to determine if particle is a gluon.
Definition: PDG_codes.hh:153
constexpr bool is_anyneutrino(Particle const &p)
Function to determine if particle is an (anti-)neutrino.
Definition: Particle.hh:204
constexpr bool is_charged_antilepton(Particle const &p)
Function to determine if particle is a charged lepton.
Definition: Particle.hh:236
constexpr bool is_AWZH_boson(Particle const &particle)
Check if a particle is a photon, W, Z, or Higgs boson.
Definition: Particle.hh:258
constexpr bool is_charged_anylepton(Particle const &p)
Function to determine if particle is a charged lepton or charged antilepton.
Definition: Particle.hh:246
constexpr bool is_massless(Particle const &p)
Check if a particle is massless.
Definition: Particle.hh:210
constexpr bool is_antilepton(Particle const &p)
Function to determine if particle is an antilepton.
Definition: Particle.hh:164
constexpr bool is_charged_lepton(Particle const &p)
Function to determine if particle is a charged lepton.
Definition: Particle.hh:226
boost::rational< int > charge(Particle const &p)
Particle electric charge.
constexpr bool is_neutrino(Particle const &p)
Function to determine if particle is a neutrino.
Definition: Particle.hh:184
constexpr bool is_massive(Particle const &p)
Check if a particle is massive.
Definition: Particle.hh:216
constexpr bool is_anyquark(Particle const &p)
Check if a particle is a quark or anit-quark.
Definition: Particle.hh:144
constexpr bool is_AWZ_boson(Particle const &particle)
Check if a particle is a photon, W or Z boson.
Definition: Particle.hh:252