All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ParticleProperty.h
Go to the documentation of this file.
1 // $Id: ParticleProperty.h,v 1.6 2004/08/05 09:58:08 mato Exp $
2 #ifndef GAUDIKERNEL_PARTICLEPROPERTY_H
3 #define GAUDIKERNEL_PARTICLEPROPERTY_H 1
4 // ============================================================================
5 // Include files
6 // ============================================================================
7 #include <string>
8 #include <ostream>
9 #include <iomanip>
10 // ============================================================================
11 
20 public:
23 
25  ( const std::string& particle ,
26  int geantId ,
27  int jetsetId ,
28  double charge ,
29  double mass ,
30  double tlife ,
31  const std::string& evtgenName ,
32  int pythiaId ,
33  double maxWidth )
34  : m_name ( particle )
35  , m_idgeant ( geantId )
36  , m_idjetset ( jetsetId )
37  , m_charge ( charge )
38  , m_mass ( mass )
39  , m_tlife ( tlife )
40  , m_evtgenName ( evtgenName )
41  , m_pythiaId ( pythiaId )
42  , m_maxWidth ( maxWidth )
43  , m_anti ( 0 )
44  {}
45 
48 
50  const std::string& particle() const { return m_name; }
51 
53  void setParticle( const std::string& particle ) { m_name = particle; }
54 
56  int geantID() const { return m_idgeant; }
57 
59  void setGeantID( int id ) { m_idgeant = id; }
60 
62  int pdgID() const { return m_idjetset; }
63 
65  void setPdgID( int id) { m_idjetset = id; }
66 
68  int jetsetID() const { return m_idjetset; }
69 
71  void setJetsetID( int id ) { m_idjetset = id; }
72 
74  double charge() const { return m_charge; }
75 
77  void setCharge( double q ) { m_charge = q; }
78 
80  double mass() const { return m_mass; }
81 
83  void setMass( double m ) { m_mass = m; }
84 
86  double lifetime() const { return m_tlife; }
87 
89  void setLifetime( double t ) { m_tlife = t; }
90 
92  const std::string& evtGenName() const { return m_evtgenName ; }
93 
95  void setEvtGenName( const std::string & name ) { m_evtgenName = name ; }
96 
98  int pythiaID() const { return m_pythiaId ; }
99 
101  void setPythiaID( int pId ) { m_pythiaId = pId ; }
102 
104  double maxWidth() const { return m_maxWidth ; }
105 
107  void setMaxWidth( double mW ) { m_maxWidth = mW ; }
108 
110  const ParticleProperty* antiParticle() const { return m_anti ; }
112  void setAntiParticle( const ParticleProperty* p ) { m_anti = p ; }
113 
114  friend std::ostream& operator<<
115  ( std::ostream& stream, const ParticleProperty& pp)
116  {
117  stream << "Name : " << pp.m_name
118  << ", Geant ID : " << pp.m_idgeant
119  << ", JetSet ID : " << pp.m_idjetset
120  << ", Charge (/e): " << pp.m_charge
121  << ", Mass (MeV): " << pp.m_mass
122  << ", Lifetime (ns): " << pp.m_tlife
123  << ", EvtGen Name: " << pp.m_evtgenName
124  << ", Pythia ID: " << pp.m_pythiaId
125  << ", Max width deviation (MeV): " << pp.m_maxWidth ;
126  return stream;
127  }
128 
129 private:
131  std::string m_name;
132 
135 
138 
140  double m_charge;
141 
143  double m_mass;
144 
146  double m_tlife;
147 
149  std::string m_evtgenName ;
150 
153 
155  double m_maxWidth ;
156 
159 };
160 
161 #endif
162 
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.
double maxWidth() const
Get the max width deviation.
A trivial class to hold information about a single particle properties.
void setParticle(const std::string &particle)
Set the particle name.
double m_charge
The charge.
void setLifetime(double t)
Set the particle lifetime.
double m_tlife
The lifetime.
int jetsetID() const
Get the JETSET(StdHep) ID.
double lifetime() const
Get the particle lifetime.
int m_idjetset
The Jetset ID.
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.
~ParticleProperty()
Destructor.
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.
ParticleProperty()
Constructors.
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.