hej is hosted by Hepforge, IPPP Durham
HEJ 2.1.4
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
18namespace HEJ {
19
21 namespace pid {
23 enum ParticleID: int{
26 d = 1,
27 down = d,
28 u = 2,
29 up = u,
30 s = 3,
32 c = 4,
33 charm = c,
34 b = 5,
36 t = 6,
37 top = t,
38 e = 11,
40 nu_e = 12,
42 mu = 13,
43 muon = mu,
44 nu_mu = 14,
46 tau = 15,
47 nu_tau = 16,
49 d_bar = -d,
51 u_bar = -u,
52 antiup = -u,
53 s_bar = -s,
55 c_bar = -c,
57 b_bar = -b,
59 t_bar = -t,
61 e_bar = -e,
74 gluon = 21,
75 g = gluon,
76 photon = 22,
78 Z = 23,
81 Wp = 24,
82 Wm = -Wp,
83 h = 25,
84 Higgs = h,
85 higgs = h,
86 p = 2212,
88 p_bar = -p,
90 };
91
93 std::string name(ParticleID id);
94
97
98 } // namespace pid
99
101
103 ParticleID to_ParticleID(std::string const & name);
104
105
111 inline
112 constexpr bool is_quark(ParticleID id){
113 return (id >= pid::down && id <= pid::top);
114 }
115
121 inline
122 constexpr bool is_antiquark(ParticleID id){
123 return (id <= pid::d_bar && id >= pid::t_bar);
124 }
125
131 inline
132 constexpr bool is_anyquark(ParticleID id){
133 return is_quark(id) || is_antiquark(id);
134 }
135
141 inline
142 constexpr bool is_gluon(ParticleID id){
143 return id == pid::gluon;
144 }
150 inline
151 constexpr bool is_parton(ParticleID id){
152 return is_gluon(id)
153 || (is_anyquark(id) && std::abs(id) != pid::top);
154 }
155
161 inline
162 constexpr bool is_AWZ_boson(ParticleID id){
163 return id == pid::Wm || (id >= pid::photon && id <= pid::Wp)
164 || id == pid::Z_photon_mix;
165 }
166
173 inline
174 constexpr bool is_AWZH_boson(ParticleID id){
175 return is_AWZ_boson(id) || (id == pid::Higgs);
176 }
177
183 inline
184 constexpr bool is_lepton(ParticleID id){
185 return (id >= pid::electron && id <= pid::tau_neutrino);
186 }
187
193 inline
194 constexpr bool is_antilepton(ParticleID id){
195 return (id <= pid::positron && id >= pid::nu_tau_bar);
196 }
197
204 inline
205 constexpr bool is_anylepton(ParticleID id){
206 return ( is_lepton(id) || is_antilepton(id));
207 }
208
214 inline
215 constexpr bool is_neutrino(ParticleID id){
216 return (id == pid::nu_e || id == pid::tau_neutrino
217 || id == pid::muon_neutrino);
218 }
219
225 inline
226 constexpr bool is_antineutrino(ParticleID id){
227 return (id == pid::nu_e_bar || id == pid::nu_tau_bar
228 || id == pid::nu_mu_bar);
229 }
230
237 inline
238 constexpr bool is_anyneutrino(ParticleID id){
239 return ( is_neutrino(id) || is_antineutrino(id));
240 }
241} // 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:23
@ Wp
Definition: PDG_codes.hh:81
@ unspecified
Unspecified type, should never be used!, debug only.
Definition: PDG_codes.hh:25
@ antibottom
Definition: PDG_codes.hh:58
@ muon_neutrino
Definition: PDG_codes.hh:45
@ nu_mu
Definition: PDG_codes.hh:44
@ t_bar
Definition: PDG_codes.hh:59
@ bottom
Definition: PDG_codes.hh:35
@ s
Definition: PDG_codes.hh:30
@ antitau
Definition: PDG_codes.hh:71
@ nu_e
Definition: PDG_codes.hh:40
@ d
Definition: PDG_codes.hh:26
@ d_bar
Definition: PDG_codes.hh:49
@ antiproton
Definition: PDG_codes.hh:89
@ Z_gamma_mix
Definition: PDG_codes.hh:80
@ g
Definition: PDG_codes.hh:75
@ s_bar
Definition: PDG_codes.hh:53
@ nu_mu_bar
Definition: PDG_codes.hh:68
@ p
Definition: PDG_codes.hh:86
@ tau_neutrino
Definition: PDG_codes.hh:48
@ antistrange
Definition: PDG_codes.hh:54
@ muon
Definition: PDG_codes.hh:43
@ electron_neutrino
Definition: PDG_codes.hh:41
@ top
Definition: PDG_codes.hh:37
@ nu_tau_bar
Definition: PDG_codes.hh:72
@ tau_antineutrino
Definition: PDG_codes.hh:73
@ tau_bar
Definition: PDG_codes.hh:70
@ nu_e_bar
Definition: PDG_codes.hh:64
@ nu_tau
Definition: PDG_codes.hh:47
@ positron
Definition: PDG_codes.hh:62
@ photon
Definition: PDG_codes.hh:76
@ electron
Definition: PDG_codes.hh:39
@ t
Definition: PDG_codes.hh:36
@ gamma
Definition: PDG_codes.hh:77
@ proton
Definition: PDG_codes.hh:87
@ h
Definition: PDG_codes.hh:83
@ Z_photon_mix
Definition: PDG_codes.hh:79
@ strange
Definition: PDG_codes.hh:31
@ b
Definition: PDG_codes.hh:34
@ Z
Definition: PDG_codes.hh:78
@ p_bar
Definition: PDG_codes.hh:88
@ c_bar
Definition: PDG_codes.hh:55
@ antidown
Definition: PDG_codes.hh:50
@ Wm
Definition: PDG_codes.hh:82
@ antiup
Definition: PDG_codes.hh:52
@ down
Definition: PDG_codes.hh:27
@ u
Definition: PDG_codes.hh:28
@ higgs
Definition: PDG_codes.hh:85
@ e
Definition: PDG_codes.hh:38
@ tau
Definition: PDG_codes.hh:46
@ antimuon
Definition: PDG_codes.hh:67
@ electron_antineutrino
Definition: PDG_codes.hh:65
@ anticharm
Definition: PDG_codes.hh:56
@ Higgs
Definition: PDG_codes.hh:84
@ antielectron
Definition: PDG_codes.hh:63
@ charm
Definition: PDG_codes.hh:33
@ antitop
Definition: PDG_codes.hh:60
@ mu_bar
Definition: PDG_codes.hh:66
@ u_bar
Definition: PDG_codes.hh:51
@ c
Definition: PDG_codes.hh:32
@ up
Definition: PDG_codes.hh:29
@ e_bar
Definition: PDG_codes.hh:61
@ gluon
Definition: PDG_codes.hh:74
@ mu
Definition: PDG_codes.hh:42
@ muon_antineutrino
Definition: PDG_codes.hh:69
@ b_bar
Definition: PDG_codes.hh:57
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_antineutrino(Particle const &p)
Function to determine if particle is an antineutrino.
Definition: Particle.hh:175
constexpr bool is_parton(Particle const &p)
Check if a particle is a parton, i.e. quark, antiquark, or gluon.
Definition: Particle.hh:107
constexpr bool is_antiquark(Particle const &p)
Check if a particle is an anti-quark.
Definition: Particle.hh:119
constexpr bool is_lepton(Particle const &p)
Function to determine if particle is a lepton.
Definition: Particle.hh:135
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:113
constexpr bool is_anylepton(Particle const &p)
Function to determine if particle is an (anti-)lepton.
Definition: Particle.hh:155
constexpr bool is_gluon(ParticleID id)
Function to determine if particle is a gluon.
Definition: PDG_codes.hh:142
constexpr bool is_anyneutrino(Particle const &p)
Function to determine if particle is an (anti-)neutrino.
Definition: Particle.hh:185
constexpr bool is_AWZH_boson(Particle const &particle)
Check if a particle is a photon, W, Z, or Higgs boson.
Definition: Particle.hh:197
constexpr bool is_antilepton(Particle const &p)
Function to determine if particle is an antilepton.
Definition: Particle.hh:145
constexpr bool is_neutrino(Particle const &p)
Function to determine if particle is a neutrino.
Definition: Particle.hh:165
constexpr bool is_anyquark(Particle const &p)
Check if a particle is a quark or anit-quark.
Definition: Particle.hh:125
constexpr bool is_AWZ_boson(Particle const &particle)
Check if a particle is a photon, W or Z boson.
Definition: Particle.hh:191