00001
00002 #ifndef PARTICLEPROPERTY_H
00003 #define PARTICLEPROPERTY_H
00004
00005
00006 #include <string>
00007 #include <iomanip>
00008
00009
00010 class MsgStream;
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 class ParticleProperty {
00026 public:
00028 ParticleProperty() {}
00029
00030 ParticleProperty( const std::string& particle,
00031 int geantId, int jetsetId, int type, double charge,
00032 double mass, double tlife ) :
00033 m_name( particle ), m_idgeant( geantId ),
00034 m_idjetset( jetsetId ), m_type( type ), m_charge( charge ),
00035 m_mass( mass ), m_tlife( tlife ) {}
00036
00038 ~ParticleProperty() {}
00039
00041 const std::string& particle() const { return m_name; }
00042
00044 void setParticle( const std::string& particle ) { m_name = particle; }
00045
00047 int geantID() const { return m_idgeant; }
00048
00050 void setGeantID( int id ) { m_idgeant = id; }
00051
00053 int jetsetID() const { return m_idjetset; }
00054
00056 void setJetsetID( int id ) { m_idjetset = id; }
00057
00059 int type() const { return m_type; }
00060
00062 void setType( int id ) { m_type = id; }
00063
00065 double charge() const { return m_charge; }
00066
00068 void setCharge( double q ) { m_charge = q; }
00069
00071 double mass() const { return m_mass; }
00072
00074 void setMass( double m ) { m_mass = m; }
00075
00077 double lifetime() const { return m_tlife; }
00078
00080 void setLifetime( double t ) { m_tlife = t; }
00081
00082 friend MsgStream& operator<< ( MsgStream& stream, const ParticleProperty& pp)
00083 {
00084 stream << "Name : " << pp.m_name
00085 << ", Geant ID : " << pp.m_idgeant
00086 << ", JetSet ID : " << pp.m_idjetset
00087 << ", Type : " << pp.m_type
00088 << ", Charge (/e): " << pp.m_charge
00089 << ", Mass (MeV): " << pp.m_mass
00090 << ", Lifetime (ns): " << pp.m_tlife;
00091 return stream;
00092 }
00093
00094 private:
00096 std::string m_name;
00097
00099 int m_idgeant;
00100
00102 int m_idjetset;
00103
00105 int m_type;
00106
00108 double m_charge;
00109
00111 double m_mass;
00112
00114 double m_tlife;
00115 };
00116
00117 #endif