| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

ParticleProperty.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_PARTICLEPROPERTY_H
2 #define GAUDIKERNEL_PARTICLEPROPERTY_H 1
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 #include <string>
7 #include <ostream>
8 #include <iomanip>
9 // ============================================================================
10
18 class ParticleProperty final {
19 public:
21 ParticleProperty() = default;
22
23 ParticleProperty
24 ( std::string particle ,
25 int geantId ,
26 int jetsetId ,
27 double charge ,
28 double mass ,
29 double tlife ,
30 std::string evtgenName ,
31 int pythiaId ,
32 double maxWidth )
33 : m_name ( std::move(particle) )
34 , m_idgeant ( geantId )
35 , m_idjetset ( jetsetId )
36 , m_charge ( charge )
37 , m_mass ( mass )
38 , m_tlife ( tlife )
39 , m_evtgenName ( std::move(evtgenName) )
40 , m_pythiaId ( pythiaId )
41 , m_maxWidth ( maxWidth )
42 {}
43
45 ~ParticleProperty() = default;
46
48 const std::string& particle() const { return m_name; }
49
51 void setParticle( const std::string& particle ) { m_name = particle; }
52
54 int geantID() const { return m_idgeant; }
55
57 void setGeantID( int id ) { m_idgeant = id; }
58
60 int pdgID() const { return m_idjetset; }
61
63 void setPdgID( int id) { m_idjetset = id; }
64
66 int jetsetID() const { return m_idjetset; }
67
69 void setJetsetID( int id ) { m_idjetset = id; }
70
72 double charge() const { return m_charge; }
73
75 void setCharge( double q ) { m_charge = q; }
76
78 double mass() const { return m_mass; }
79
81 void setMass( double m ) { m_mass = m; }
82
84 double lifetime() const { return m_tlife; }
85
87 void setLifetime( double t ) { m_tlife = t; }
88
90 const std::string& evtGenName() const { return m_evtgenName ; }
91
93 void setEvtGenName( const std::string & name ) { m_evtgenName = name ; }
94
96 int pythiaID() const { return m_pythiaId ; }
97
99 void setPythiaID( int pId ) { m_pythiaId = pId ; }
100
102 double maxWidth() const { return m_maxWidth ; }
103
105 void setMaxWidth( double mW ) { m_maxWidth = mW ; }
106
108 const ParticleProperty* antiParticle() const { return m_anti ; }
110 void setAntiParticle( const ParticleProperty* p ) { m_anti = p ; }
111
112 friend std::ostream& operator<<
113 ( std::ostream& stream, const ParticleProperty& pp)
114 {
115 stream << "Name : " << pp.m_name
116 << ", Geant ID : " << pp.m_idgeant
117 << ", JetSet ID : " << pp.m_idjetset
118 << ", Charge (/e): " << pp.m_charge
119 << ", Mass (MeV): " << pp.m_mass
120 << ", Lifetime (ns): " << pp.m_tlife
121 << ", EvtGen Name: " << pp.m_evtgenName
122 << ", Pythia ID: " << pp.m_pythiaId
123 << ", Max width deviation (MeV): " << pp.m_maxWidth ;
124 return stream;
125 }
126
127 private:
129 std::string m_name;
130
132 int m_idgeant;
133
135 int m_idjetset;
136
138 double m_charge;
139
141 double m_mass;
142
144 double m_tlife;
145
147 std::string m_evtgenName ;
148
150 int m_pythiaId ;
151
153 double m_maxWidth ;
154
156 const ParticleProperty* m_anti = nullptr;
157 };
158
159 #endif
160
ParticleProperty::pdgID
int pdgID() const
Get the PDG (= JETSET) ID.
Definition: ParticleProperty.h:60
ParticleProperty::m_name
std::string m_name
The particle name.
Definition: ParticleProperty.h:129
ParticleProperty::setMass
void setMass(double m)
Set the particle charge.
Definition: ParticleProperty.h:81
ParticleProperty::setPythiaID
void setPythiaID(int pId)
Set the Pythia ID.
Definition: ParticleProperty.h:99
ParticleProperty::geantID
int geantID() const
Get the GEANT3 ID.
Definition: ParticleProperty.h:54
ParticleProperty::setEvtGenName
void setEvtGenName(const std::string &name)
Set the EvtGen name.
Definition: ParticleProperty.h:93
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
ParticleProperty::ParticleProperty
ParticleProperty()=default
Constructors.
ParticleProperty::maxWidth
double maxWidth() const
Get the max width deviation.
Definition: ParticleProperty.h:102
ParticleProperty
A trivial class to hold information about a single particle properties.
Definition: ParticleProperty.h:18
ParticleProperty::setParticle
void setParticle(const std::string &particle)
Set the particle name.
Definition: ParticleProperty.h:51
ParticleProperty::m_charge
double m_charge
The charge.
Definition: ParticleProperty.h:138
ParticleProperty::setLifetime
void setLifetime(double t)
Set the particle lifetime.
Definition: ParticleProperty.h:87
std::string
STL class.
ParticleProperty::m_tlife
double m_tlife
The lifetime.
Definition: ParticleProperty.h:144
ParticleProperty::~ParticleProperty
~ParticleProperty()=default
Destructor.
ParticleProperty::jetsetID
int jetsetID() const
Get the JETSET(StdHep) ID.
Definition: ParticleProperty.h:66
ParticleProperty::lifetime
double lifetime() const
Get the particle lifetime.
Definition: ParticleProperty.h:84
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:93
ParticleProperty::m_idjetset
int m_idjetset
The Jetset ID.
Definition: ParticleProperty.h:135
ParticleProperty::setCharge
void setCharge(double q)
Set the particle charge.
Definition: ParticleProperty.h:75
ParticleProperty::setPdgID
void setPdgID(int id)
Set the PDG (= JETSET) ID.
Definition: ParticleProperty.h:63
ParticleProperty::antiParticle
const ParticleProperty * antiParticle() const
get the pointer to the antiparticle
Definition: ParticleProperty.h:108
std::move
T move(T...args)
ParticleProperty::setGeantID
void setGeantID(int id)
Set the GEANT3 ID.
Definition: ParticleProperty.h:57
ParticleProperty::m_pythiaId
int m_pythiaId
The Pythia ID.
Definition: ParticleProperty.h:150
ParticleProperty::m_idgeant
int m_idgeant
The GEANT ID.
Definition: ParticleProperty.h:132
ParticleProperty::m_evtgenName
std::string m_evtgenName
The EvtGen Name.
Definition: ParticleProperty.h:147
ParticleProperty::m_maxWidth
double m_maxWidth
The maximum width deviation.
Definition: ParticleProperty.h:153
ParticleProperty::charge
double charge() const
Get the particle charge.
Definition: ParticleProperty.h:72
compareOutputFiles.pp
pp
Definition: compareOutputFiles.py:417
ParticleProperty::setJetsetID
void setJetsetID(int id)
Set the JETSET(StdHep) ID.
Definition: ParticleProperty.h:69
ParticleProperty::setAntiParticle
void setAntiParticle(const ParticleProperty *p)
set the pointer to the antiparticle
Definition: ParticleProperty.h:110
ParticleProperty::particle
const std::string & particle() const
Get the particle name.
Definition: ParticleProperty.h:48
std::ostream
STL class.
ParticleProperty::mass
double mass() const
Get the particle mass.
Definition: ParticleProperty.h:78
ParticleProperty::pythiaID
int pythiaID() const
Get the Pythia ID.
Definition: ParticleProperty.h:96
ParticleProperty::setMaxWidth
void setMaxWidth(double mW)
Set the max width deviation.
Definition: ParticleProperty.h:105
ParticleProperty::m_anti
const ParticleProperty * m_anti
the antiparticle
Definition: ParticleProperty.h:156
ParticleProperty::evtGenName
const std::string & evtGenName() const
Get the EvtGen name.
Definition: ParticleProperty.h:90
ParticleProperty::m_mass
double m_mass
The mass.
Definition: ParticleProperty.h:141