cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PDG.h
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2013-2024 Laurent Forthomme
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef CepGen_Physics_PDG_h
20
#define CepGen_Physics_PDG_h
21
22
#include <cstddef>
// size_t
23
24
#include "
CepGen/Physics/ParticleProperties.h
"
25
26
namespace
cepgen
{
28
class
PDG
{
29
public
:
33
enum
PdgIdEnum
:
pdgid_t
{
34
invalid
= 0,
35
down
= 1,
36
up
= 2,
37
electron
= 11,
38
muon
= 13,
39
tau
= 15,
40
gluon
= 21,
41
photon
= 22,
42
W
= 24,
43
pomeron
= 990,
44
reggeon
= 110,
45
piZero
= 111,
46
piPlus
= 211,
47
eta
= 221,
48
phi1680
= 100333,
49
neutron
= 2112,
50
proton
= 2212,
51
diffractiveProton
= 9902210
52
};
53
55
class
Id
{
56
public
:
57
inline
Id
(
pdgid_t
pdgid) : pdgid_(pdgid) {}
58
inline
operator
pdgid_t
()
const
{
return
pdgid_; }
59
friend
std::ostream&
operator<<
(std::ostream&,
const
Id
&);
60
61
private
:
62
pdgid_t
pdgid_;
63
};
64
65
static
PDG
&
get
();
66
PDG
(
const
PDG
&) =
delete
;
67
void
operator=
(
const
PDG
&) =
delete
;
68
~PDG
() =
default
;
69
70
void
define
(
const
ParticleProperties
&);
71
pdgids_t
particles
()
const
;
72
void
dump
(std::ostream* =
nullptr
)
const
;
73
size_t
size
()
const
;
74
75
//--- per-particles information
76
77
bool
has
(
spdgid_t
)
const
;
78
const
ParticleProperties
&
operator()
(
spdgid_t
)
const
;
79
ParticleProperties
&
operator[]
(
spdgid_t
id
);
80
const
std::string&
name
(
spdgid_t
)
const
;
81
double
colours
(
spdgid_t
)
const
;
82
double
mass
(
spdgid_t
)
const
;
83
double
width
(
spdgid_t
)
const
;
84
double
charge
(
spdgid_t
)
const
;
85
std::vector<double>
charges
(
spdgid_t
)
const
;
86
87
private
:
88
explicit
PDG
();
89
std::unordered_map<pdgid_t, ParticleProperties> particles_;
90
};
91
}
// namespace cepgen
92
93
#endif
ParticleProperties.h
cepgen::PDG::Id
A class-in-the-middle PDG identifier for printout operations.
Definition
PDG.h:55
cepgen::PDG::Id::Id
Id(pdgid_t pdgid)
Construct an object from a PDG identifier.
Definition
PDG.h:57
cepgen::PDG::Id::operator<<
friend std::ostream & operator<<(std::ostream &, const Id &)
Human-readable PDG name.
Definition
PDG.cpp:27
cepgen::PDG
A singleton holding all physics constants associated to particles.
Definition
PDG.h:28
cepgen::PDG::colours
double colours(spdgid_t) const
Colour factor for this particle.
Definition
PDG.cpp:88
cepgen::PDG::size
size_t size() const
Number of particles defined in this library.
Definition
PDG.cpp:107
cepgen::PDG::particles
pdgids_t particles() const
All particles ids in this library.
Definition
PDG.cpp:74
cepgen::PDG::PDG
PDG(const PDG &)=delete
cepgen::PDG::operator[]
ParticleProperties & operator[](spdgid_t id)
Definition
PDG.cpp:58
cepgen::PDG::has
bool has(spdgid_t) const
Is the particle defined for a given PDG id.
Definition
PDG.cpp:46
cepgen::PDG::charges
std::vector< double > charges(spdgid_t) const
Electric charges (in ) for this particle and anti-particles.
Definition
PDG.cpp:100
cepgen::PDG::PdgIdEnum
PdgIdEnum
PDG ids of all known particles.
Definition
PDG.h:33
cepgen::PDG::down
@ down
Definition
PDG.h:35
cepgen::PDG::tau
@ tau
Definition
PDG.h:39
cepgen::PDG::electron
@ electron
Definition
PDG.h:37
cepgen::PDG::diffractiveProton
@ diffractiveProton
Definition
PDG.h:51
cepgen::PDG::photon
@ photon
Definition
PDG.h:41
cepgen::PDG::reggeon
@ reggeon
Definition
PDG.h:44
cepgen::PDG::neutron
@ neutron
Definition
PDG.h:49
cepgen::PDG::muon
@ muon
Definition
PDG.h:38
cepgen::PDG::pomeron
@ pomeron
Definition
PDG.h:43
cepgen::PDG::proton
@ proton
Definition
PDG.h:50
cepgen::PDG::phi1680
@ phi1680
Definition
PDG.h:48
cepgen::PDG::piZero
@ piZero
Definition
PDG.h:45
cepgen::PDG::invalid
@ invalid
Definition
PDG.h:34
cepgen::PDG::W
@ W
Definition
PDG.h:42
cepgen::PDG::piPlus
@ piPlus
Definition
PDG.h:46
cepgen::PDG::gluon
@ gluon
Definition
PDG.h:40
cepgen::PDG::up
@ up
Definition
PDG.h:36
cepgen::PDG::eta
@ eta
Definition
PDG.h:47
cepgen::PDG::operator()
const ParticleProperties & operator()(spdgid_t) const
All physical properties for one particle.
Definition
PDG.cpp:48
cepgen::PDG::dump
void dump(std::ostream *=nullptr) const
Dump all particles in this library.
Definition
PDG.cpp:109
cepgen::PDG::~PDG
~PDG()=default
Default destructor.
cepgen::PDG::width
double width(spdgid_t) const
Resonance width (in GeV)
Definition
PDG.cpp:96
cepgen::PDG::mass
double mass(spdgid_t) const
Particle mass (in GeV)
Definition
PDG.cpp:90
cepgen::PDG::name
const std::string & name(spdgid_t) const
Accessor for particle properties.
Definition
PDG.cpp:81
cepgen::PDG::define
void define(const ParticleProperties &)
Add a new particle definition to the library.
Definition
PDG.cpp:60
cepgen::PDG::get
static PDG & get()
Retrieve a unique instance of this particles info collection.
Definition
PDG.cpp:41
cepgen::PDG::charge
double charge(spdgid_t) const
Electric charge (in ) for this particle.
Definition
PDG.cpp:98
cepgen::PDG::operator=
void operator=(const PDG &)=delete
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
cepgen::pdgids_t
std::vector< pdgid_t > pdgids_t
Definition
ParticleProperties.h:27
cepgen::pdgid_t
unsigned long long pdgid_t
Alias for the integer-like particle PDG id.
Definition
ParticleProperties.h:26
cepgen::spdgid_t
long long spdgid_t
Definition
ParticleProperties.h:28
cepgen::ParticleProperties
A collection of physics constants associated to a single particle.
Definition
ParticleProperties.h:31
CepGen
Physics
PDG.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7