StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StParticleDefinition.hh
1 /***************************************************************************
2  *
3  * $Id: StParticleDefinition.hh,v 1.5 2021/01/12 14:34:12 jwebb Exp $
4  *
5  * Author: Thomas Ullrich, May 99 (based on Geant4 code, see below)
6  ***************************************************************************
7  *
8  * The design of the StParticleDefinition class and all concrete
9  * classes derived from it is largely based on the design of the
10  * G4ParticleDefinition class from Geant4 (RD44).
11  * Although the code is in large parts different (modified or rewritten)
12  * and adapted to the STAR framework the basic idea stays the same.
13  *
14  ***************************************************************************
15  *
16  * $Log: StParticleDefinition.hh,v $
17  * Revision 1.5 2021/01/12 14:34:12 jwebb
18  * Update to gstar_part.g and StarClassLibrary to support simulation of
19  * H4 Lambda , He4 Lambda and He5 Lambda hypernuclei.
20  *
21  * Revision 1.4 2005/09/22 20:09:20 fisyak
22  * Make StLorentzVector persistent
23  *
24  * Revision 1.3 2003/09/02 17:59:35 perev
25  * gcc 3.2 updates + WarnOff
26  *
27  * Revision 1.2 1999/12/21 15:14:21 ullrich
28  * Modified to cope with new compiler version on Sun (CC5.0).
29  *
30  * Revision 1.1 1999/05/14 18:49:58 ullrich
31  * Initial Revision
32  *
33  **************************************************************************/
34 #ifndef StParticleDefinition_hh
35 #define StParticleDefinition_hh
36 #ifdef __ROOT__
37 #include "Rtypes.h"
38 #endif
39 
40 #include <string>
41 #include <Stiostream.h>
42 #if !defined(ST_NO_NAMESPACES)
43 using std::string;
44 #endif
45 
46 class StParticleTable;
47 
49 public:
50  StParticleDefinition(const string & aName,
51  double mass,
52  double width,
53  double charge,
54  int iSpin,
55  int iParity,
56  int iConjugation,
57  int iIsospin,
58  int iIsospinZ,
59  int gParity,
60  const string & pType,
61  int lepton,
62  int baryon,
63  int encoding,
64  bool stable,
65  double lifetime);
66  virtual ~StParticleDefinition();
67 
68  int operator==(const StParticleDefinition &right) const;
69  int operator!=(const StParticleDefinition &right) const;
70 
71  string name() const {return mParticleName;}
72  double mass() const {return mPDGMass;}
73  double width() const {return mPDGWidth;}
74  double charge() const {return mPDGCharge;}
75  double spin() const {return mPDGSpin;}
76  int iSpin() const {return mPDGiSpin;}
77  int iParity() const {return mPDGiParity;}
78  int iConjugation() const {return mPDGiConjugation;}
79  double isospin() const {return mPDGiIsospin;}
80  double isospin3() const {return mPDGiIsospin3;}
81  int iIsospin() const {return mPDGiIsospin;}
82  int iIsospin3() const {return mPDGiIsospin3;}
83  int iGParity() const {return mPDGiGParity;}
84  string type() const {return mParticleType;}
85  int leptonNumber() const {return mLeptonNumber;}
86  int baryonNumber() const {return mBaryonNumber;}
87  int pdgEncoding() const {return mPDGEncoding;}
88  int antiPdgEncoding() const {return mAntiPDGEncoding;}
89  bool stable() const {return mPDGStable;}
90  double lifeTime() const {return mPDGLifeTime;}
91 
92  StParticleTable* particleTable() const {return mParticleTable;}
93 
94 private:
97  const StParticleDefinition & operator=(const StParticleDefinition &);
98 
99  string mParticleName; // name of the particle.
100  double mPDGMass; // mass of the particle, in units of equivalent energy.
101  double mPDGWidth; // decay width of the particle, usually the width of a
102  // Breit-Wigner function, assuming that you are near the
103  // mass center anyway. (in units of equivalent energy)
104  double mPDGCharge; // charge of the particle.(in units of Coulomb)
105  int mPDGiSpin; // total spin of the particle, also often denoted as
106  // capital J, in units of 1/2.
107  double mPDGSpin; // total spin of the particle, in units of 1.
108  int mPDGiParity; // parity quantum number, in units of 1. If the parity
109  // is not defined for this particle, we will set this to 0.
110  int mPDGiConjugation; // charge conjugation quantum number in units of 1.
111  int mPDGiIsospin; // isospin and its 3rd-component in units of 1/2.
112  int mPDGiIsospin3;
113  double mPDGIsospin;
114  double mPDGIsospin3; // isospin quantum number in units of 1.
115  int mPDGiGParity; // value of the G-parity quantum number.
116  int mLeptonNumber; // lepton quantum number.
117  int mBaryonNumber; // baryon quantum number.
118  string mParticleType; // general textual type description of the particle.
119  int mPDGEncoding; // Particle Data Group integer identifier of this particle
120  int mAntiPDGEncoding; // Particle Data Group integer identifier of the anti-particle
121  bool mPDGStable;
122  double mPDGLifeTime; // related to the decay width of the particle. The mean
123  // life time is given in seconds.
124  StParticleTable *mParticleTable;
125 #ifdef __ROOT__
126  ClassDef(StParticleDefinition,1)
127 #endif
128 };
129 
130 ostream& operator<<(ostream&, const StParticleDefinition&);
131 
132 
133 #endif
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152 
153 
154