hej
is hosted by
Hepforge
,
IPPP Durham
HEJ
2.2.2
High energy resummation for hadron colliders
Loading...
Searching...
No Matches
include
HEJ
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
20
namespace
HEJ
{
21
23
namespace
pid {
25
enum
ParticleID
:
int
{
27
unspecified
= 0,
28
d
= 1,
29
down
=
d
,
30
u
= 2,
31
up
=
u
,
32
s
= 3,
33
strange
=
s
,
34
c
= 4,
35
charm
=
c
,
36
b
= 5,
37
bottom
=
b
,
38
t
= 6,
39
top
=
t
,
40
e
= 11,
41
electron
=
e
,
42
nu_e
= 12,
43
electron_neutrino
=
nu_e
,
44
mu
= 13,
45
muon
=
mu
,
46
nu_mu
= 14,
47
muon_neutrino
=
nu_mu
,
48
tau
= 15,
49
nu_tau
= 16,
50
tau_neutrino
=
nu_tau
,
51
d_bar
= -
d
,
52
antidown
=
d_bar
,
53
u_bar
= -
u
,
54
antiup
= -
u
,
55
s_bar
= -
s
,
56
antistrange
= -
s
,
57
c_bar
= -
c
,
58
anticharm
= -
c
,
59
b_bar
= -
b
,
60
antibottom
= -
b
,
61
t_bar
= -
t
,
62
antitop
= -
t
,
63
e_bar
= -
e
,
64
positron
=
e_bar
,
65
antielectron
=
positron
,
66
nu_e_bar
= -
nu_e
,
67
electron_antineutrino
=
nu_e_bar
,
68
mu_bar
= -
mu
,
69
antimuon
= -
mu
,
70
nu_mu_bar
= -
nu_mu
,
71
muon_antineutrino
=
nu_mu_bar
,
72
tau_bar
= -
tau
,
73
antitau
=
tau_bar
,
74
nu_tau_bar
= -
nu_tau
,
75
tau_antineutrino
=
nu_tau_bar
,
76
gluon
= 21,
77
g
=
gluon
,
78
photon
= 22,
79
gamma
=
photon
,
80
Z
= 23,
81
Z_photon_mix
= 81,
82
Z_gamma_mix
=
Z_photon_mix
,
83
Wp
= 24,
84
Wm
= -
Wp
,
85
h
= 25,
86
Higgs
=
h
,
87
higgs
=
h
,
88
p
= 2212,
89
proton
=
p
,
90
p_bar
= -
p
,
91
antiproton
=
p_bar
,
92
};
93
95
std::string
name
(
ParticleID
id
);
96
98
ParticleID
anti
(
ParticleID
id
);
99
100
}
// namespace pid
101
102
using
ParticleID
=
pid::ParticleID
;
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
:
263
case
pid::Z_photon_mix
:
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
295
constexpr
bool
is_charged_antilepton
(
ParticleID
id
){
296
return
is_antilepton
(
id
) && !
is_antineutrino
(
id
);
297
}
298
304
inline
305
constexpr
bool
is_charged_anylepton
(
ParticleID
id
){
306
return
is_anylepton
(
id
) && !
is_anyneutrino
(
id
);
307
}
308
314
boost::rational<int>
charge
(
ParticleID
id
);
315
316
}
// namespace HEJ
HEJ::pid::anti
ParticleID anti(ParticleID id)
return the negative flavour of the given PDG ID
HEJ::pid::ParticleID
ParticleID
The possible particle identities. We use PDG IDs as standard.
Definition:
PDG_codes.hh:25
HEJ::pid::Wp
@ Wp
Definition:
PDG_codes.hh:83
HEJ::pid::unspecified
@ unspecified
Unspecified type, should never be used!, debug only.
Definition:
PDG_codes.hh:27
HEJ::pid::antibottom
@ antibottom
Definition:
PDG_codes.hh:60
HEJ::pid::muon_neutrino
@ muon_neutrino
Definition:
PDG_codes.hh:47
HEJ::pid::nu_mu
@ nu_mu
Definition:
PDG_codes.hh:46
HEJ::pid::t_bar
@ t_bar
Definition:
PDG_codes.hh:61
HEJ::pid::bottom
@ bottom
Definition:
PDG_codes.hh:37
HEJ::pid::s
@ s
Definition:
PDG_codes.hh:32
HEJ::pid::antitau
@ antitau
Definition:
PDG_codes.hh:73
HEJ::pid::nu_e
@ nu_e
Definition:
PDG_codes.hh:42
HEJ::pid::d
@ d
Definition:
PDG_codes.hh:28
HEJ::pid::d_bar
@ d_bar
Definition:
PDG_codes.hh:51
HEJ::pid::antiproton
@ antiproton
Definition:
PDG_codes.hh:91
HEJ::pid::Z_gamma_mix
@ Z_gamma_mix
Definition:
PDG_codes.hh:82
HEJ::pid::g
@ g
Definition:
PDG_codes.hh:77
HEJ::pid::s_bar
@ s_bar
Definition:
PDG_codes.hh:55
HEJ::pid::nu_mu_bar
@ nu_mu_bar
Definition:
PDG_codes.hh:70
HEJ::pid::p
@ p
Definition:
PDG_codes.hh:88
HEJ::pid::tau_neutrino
@ tau_neutrino
Definition:
PDG_codes.hh:50
HEJ::pid::antistrange
@ antistrange
Definition:
PDG_codes.hh:56
HEJ::pid::muon
@ muon
Definition:
PDG_codes.hh:45
HEJ::pid::electron_neutrino
@ electron_neutrino
Definition:
PDG_codes.hh:43
HEJ::pid::top
@ top
Definition:
PDG_codes.hh:39
HEJ::pid::nu_tau_bar
@ nu_tau_bar
Definition:
PDG_codes.hh:74
HEJ::pid::tau_antineutrino
@ tau_antineutrino
Definition:
PDG_codes.hh:75
HEJ::pid::tau_bar
@ tau_bar
Definition:
PDG_codes.hh:72
HEJ::pid::nu_e_bar
@ nu_e_bar
Definition:
PDG_codes.hh:66
HEJ::pid::nu_tau
@ nu_tau
Definition:
PDG_codes.hh:49
HEJ::pid::positron
@ positron
Definition:
PDG_codes.hh:64
HEJ::pid::photon
@ photon
Definition:
PDG_codes.hh:78
HEJ::pid::electron
@ electron
Definition:
PDG_codes.hh:41
HEJ::pid::t
@ t
Definition:
PDG_codes.hh:38
HEJ::pid::gamma
@ gamma
Definition:
PDG_codes.hh:79
HEJ::pid::proton
@ proton
Definition:
PDG_codes.hh:89
HEJ::pid::h
@ h
Definition:
PDG_codes.hh:85
HEJ::pid::Z_photon_mix
@ Z_photon_mix
Definition:
PDG_codes.hh:81
HEJ::pid::strange
@ strange
Definition:
PDG_codes.hh:33
HEJ::pid::b
@ b
Definition:
PDG_codes.hh:36
HEJ::pid::Z
@ Z
Definition:
PDG_codes.hh:80
HEJ::pid::p_bar
@ p_bar
Definition:
PDG_codes.hh:90
HEJ::pid::c_bar
@ c_bar
Definition:
PDG_codes.hh:57
HEJ::pid::antidown
@ antidown
Definition:
PDG_codes.hh:52
HEJ::pid::Wm
@ Wm
Definition:
PDG_codes.hh:84
HEJ::pid::antiup
@ antiup
Definition:
PDG_codes.hh:54
HEJ::pid::down
@ down
Definition:
PDG_codes.hh:29
HEJ::pid::u
@ u
Definition:
PDG_codes.hh:30
HEJ::pid::higgs
@ higgs
Definition:
PDG_codes.hh:87
HEJ::pid::e
@ e
Definition:
PDG_codes.hh:40
HEJ::pid::tau
@ tau
Definition:
PDG_codes.hh:48
HEJ::pid::antimuon
@ antimuon
Definition:
PDG_codes.hh:69
HEJ::pid::electron_antineutrino
@ electron_antineutrino
Definition:
PDG_codes.hh:67
HEJ::pid::anticharm
@ anticharm
Definition:
PDG_codes.hh:58
HEJ::pid::Higgs
@ Higgs
Definition:
PDG_codes.hh:86
HEJ::pid::antielectron
@ antielectron
Definition:
PDG_codes.hh:65
HEJ::pid::charm
@ charm
Definition:
PDG_codes.hh:35
HEJ::pid::antitop
@ antitop
Definition:
PDG_codes.hh:62
HEJ::pid::mu_bar
@ mu_bar
Definition:
PDG_codes.hh:68
HEJ::pid::u_bar
@ u_bar
Definition:
PDG_codes.hh:53
HEJ::pid::c
@ c
Definition:
PDG_codes.hh:34
HEJ::pid::up
@ up
Definition:
PDG_codes.hh:31
HEJ::pid::e_bar
@ e_bar
Definition:
PDG_codes.hh:63
HEJ::pid::gluon
@ gluon
Definition:
PDG_codes.hh:76
HEJ::pid::mu
@ mu
Definition:
PDG_codes.hh:44
HEJ::pid::muon_antineutrino
@ muon_antineutrino
Definition:
PDG_codes.hh:71
HEJ::pid::b_bar
@ b_bar
Definition:
PDG_codes.hh:59
HEJ::pid::name
std::string name(ParticleID id)
Get the of the particle with the given PDG ID.
HEJ
Main HEJ 2 Namespace.
Definition:
mainpage.dox:1
HEJ::is_antiparticle
constexpr bool is_antiparticle(Particle const &p)
Check if the argument is an antiparticle.
Definition:
Particle.hh:120
HEJ::is_antineutrino
constexpr bool is_antineutrino(Particle const &p)
Function to determine if particle is an antineutrino.
Definition:
Particle.hh:194
HEJ::is_parton
constexpr bool is_parton(Particle const &p)
Check if a particle is a parton, i.e. quark, antiquark, or gluon.
Definition:
Particle.hh:126
HEJ::is_antiquark
constexpr bool is_antiquark(Particle const &p)
Check if a particle is an anti-quark.
Definition:
Particle.hh:138
HEJ::is_lepton
constexpr bool is_lepton(Particle const &p)
Function to determine if particle is a lepton.
Definition:
Particle.hh:154
HEJ::to_ParticleID
ParticleID to_ParticleID(std::string const &name)
Convert a particle name to the corresponding PDG particle ID.
HEJ::is_quark
constexpr bool is_quark(Particle const &p)
Check if a particle is a quark.
Definition:
Particle.hh:132
HEJ::is_anylepton
constexpr bool is_anylepton(Particle const &p)
Function to determine if particle is an (anti-)lepton.
Definition:
Particle.hh:174
HEJ::is_gluon
constexpr bool is_gluon(ParticleID id)
Function to determine if particle is a gluon.
Definition:
PDG_codes.hh:153
HEJ::is_anyneutrino
constexpr bool is_anyneutrino(Particle const &p)
Function to determine if particle is an (anti-)neutrino.
Definition:
Particle.hh:204
HEJ::is_charged_antilepton
constexpr bool is_charged_antilepton(Particle const &p)
Function to determine if particle is a charged lepton.
Definition:
Particle.hh:236
HEJ::is_AWZH_boson
constexpr bool is_AWZH_boson(Particle const &particle)
Check if a particle is a photon, W, Z, or Higgs boson.
Definition:
Particle.hh:258
HEJ::is_charged_anylepton
constexpr bool is_charged_anylepton(Particle const &p)
Function to determine if particle is a charged lepton or charged antilepton.
Definition:
Particle.hh:246
HEJ::is_massless
constexpr bool is_massless(Particle const &p)
Check if a particle is massless.
Definition:
Particle.hh:210
HEJ::is_antilepton
constexpr bool is_antilepton(Particle const &p)
Function to determine if particle is an antilepton.
Definition:
Particle.hh:164
HEJ::is_charged_lepton
constexpr bool is_charged_lepton(Particle const &p)
Function to determine if particle is a charged lepton.
Definition:
Particle.hh:226
HEJ::charge
boost::rational< int > charge(Particle const &p)
Particle electric charge.
HEJ::is_neutrino
constexpr bool is_neutrino(Particle const &p)
Function to determine if particle is a neutrino.
Definition:
Particle.hh:184
HEJ::is_massive
constexpr bool is_massive(Particle const &p)
Check if a particle is massive.
Definition:
Particle.hh:216
HEJ::is_anyquark
constexpr bool is_anyquark(Particle const &p)
Check if a particle is a quark or anit-quark.
Definition:
Particle.hh:144
HEJ::is_AWZ_boson
constexpr bool is_AWZ_boson(Particle const &particle)
Check if a particle is a photon, W or Z boson.
Definition:
Particle.hh:252
Generated by
1.9.5