Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 public:
21  ParticleProperty() = default;
22 
23  ParticleProperty( std::string particle, int geantId, int jetsetId, double charge, double mass, double tlife,
24  std::string evtgenName, int pythiaId, double maxWidth )
25  : m_name( std::move( particle ) )
26  , m_idgeant( geantId )
27  , m_idjetset( jetsetId )
28  , m_charge( charge )
29  , m_mass( mass )
30  , m_tlife( tlife )
31  , m_evtgenName( std::move( evtgenName ) )
32  , m_pythiaId( pythiaId )
33  , m_maxWidth( maxWidth ) {}
34 
36  ~ParticleProperty() = default;
37 
39  const std::string& particle() const { return m_name; }
40 
43 
45  int geantID() const { return m_idgeant; }
46 
48  void setGeantID( int id ) { m_idgeant = id; }
49 
51  int pdgID() const { return m_idjetset; }
52 
54  void setPdgID( int id ) { m_idjetset = id; }
55 
57  int jetsetID() const { return m_idjetset; }
58 
60  void setJetsetID( int id ) { m_idjetset = id; }
61 
63  double charge() const { return m_charge; }
64 
66  void setCharge( double q ) { m_charge = q; }
67 
69  double mass() const { return m_mass; }
70 
72  void setMass( double m ) { m_mass = m; }
73 
75  double lifetime() const { return m_tlife; }
76 
78  void setLifetime( double t ) { m_tlife = t; }
79 
81  const std::string& evtGenName() const { return m_evtgenName; }
82 
85 
87  int pythiaID() const { return m_pythiaId; }
88 
90  void setPythiaID( int pId ) { m_pythiaId = pId; }
91 
93  double maxWidth() const { return m_maxWidth; }
94 
96  void setMaxWidth( double mW ) { m_maxWidth = mW; }
97 
99  const ParticleProperty* antiParticle() const { return m_anti; }
101  void setAntiParticle( const ParticleProperty* p ) { m_anti = p; }
102 
104  stream << "Name : " << pp.m_name << ", Geant ID : " << pp.m_idgeant << ", JetSet ID : " << pp.m_idjetset
105  << ", Charge (/e): " << pp.m_charge << ", Mass (MeV): " << pp.m_mass << ", Lifetime (ns): " << pp.m_tlife
106  << ", EvtGen Name: " << pp.m_evtgenName << ", Pythia ID: " << pp.m_pythiaId
107  << ", Max width deviation (MeV): " << pp.m_maxWidth;
108  return stream;
109  }
110 
111 private:
114 
117 
120 
122  double m_charge;
123 
125  double m_mass;
126 
128  double m_tlife;
129 
132 
135 
137  double m_maxWidth;
138 
140  const ParticleProperty* m_anti = nullptr;
141 };
142 
143 #endif
int pdgID() const
Get the PDG (= JETSET) ID.
std::string m_name
The particle name.
void setMass(double m)
Set the particle charge.
void setPythiaID(int pId)
Set the Pythia ID.
int geantID() const
Get the GEANT3 ID.
void setEvtGenName(const std::string &name)
Set the EvtGen name.
ParticleProperty()=default
Constructors.
double maxWidth() const
Get the max width deviation.
A trivial class to hold information about a single particle properties.
STL namespace.
void setParticle(const std::string &particle)
Set the particle name.
double m_charge
The charge.
void setLifetime(double t)
Set the particle lifetime.
ParticleProperty(std::string particle, int geantId, int jetsetId, double charge, double mass, double tlife, std::string evtgenName, int pythiaId, double maxWidth)
STL class.
double m_tlife
The lifetime.
~ParticleProperty()=default
Destructor.
int jetsetID() const
Get the JETSET(StdHep) ID.
double lifetime() const
Get the particle lifetime.
constexpr double m
Definition: SystemOfUnits.h:92
int m_idjetset
The Jetset ID.
friend std::ostream & operator<<(std::ostream &stream, const ParticleProperty &pp)
void setCharge(double q)
Set the particle charge.
void setPdgID(int id)
Set the PDG (= JETSET) ID.
const ParticleProperty * antiParticle() const
get the pointer to the antiparticle
void setGeantID(int id)
Set the GEANT3 ID.
int m_pythiaId
The Pythia ID.
int m_idgeant
The GEANT ID.
std::string m_evtgenName
The EvtGen Name.
double m_maxWidth
The maximum width deviation.
double charge() const
Get the particle charge.
void setJetsetID(int id)
Set the JETSET(StdHep) ID.
void setAntiParticle(const ParticleProperty *p)
set the pointer to the antiparticle
const std::string & particle() const
Get the particle name.
STL class.
double mass() const
Get the particle mass.
int pythiaID() const
Get the Pythia ID.
void setMaxWidth(double mW)
Set the max width deviation.
const ParticleProperty * m_anti
the antiparticle
const std::string & evtGenName() const
Get the EvtGen name.
double m_mass
The mass.