| The Gaudi Framework v29r1 (5cd95fa2)

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