StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGenParticle.h
1 // @(#)STAR/eg:$Id: StGenParticle.h,v 1.6 2016/06/21 20:28:51 jwebb Exp $
2 
128 #ifndef ROOT_StGenParticle
129 #define ROOT_StGenParticle
130 
131 
134 
135 protected:
136  // ****** constructors and destructor
137  StGenParticle(int idx=0){mIdx=idx;}
138 
139  virtual ~StGenParticle(){;}
140 
141 void SetIdx(int idx) { mIdx = idx;}
142 int GetIdx() const { return mIdx;}
143 
144 public:
145 
146 virtual void Print(const char *opt="") const;
147 virtual int GetStatusCode() const=0;
148 virtual int GetPdgCode() const;
149 virtual int GetGeaCode() const;
150 virtual const StGenParticle *GetMother(int i=0) const=0;
151 virtual const StGenParticle *GetDaughter(int i) const=0;
152 virtual double GetCalcMass () const;
153 virtual double GetMass () const=0;
154 virtual int GetNDaughters () const=0;
155 virtual double GetWeight () const { return 1.;}
156 virtual void Momentum(double p4[4]) const=0 ;
157 virtual void Vertex(double v[3]) const=0;
158 virtual double Time() const=0;
159  int IsPrimary () const { return !GetMother(0);} //Is this particle primary one?
160  int IsFinal () const { return !GetStatusCode()==1;} //Is this particle final one?
161 
162 double R () const;
163 double Rho () const;
164 double P () const;
165 double Pt () const;
166 double Energy() const;
167 double Eta () const;
168 double Phi () const;
169 double Theta () const;
170 
171 protected:
172 
173  int mIdx;
174 };
175 
177 
178 
179 protected:
180  // ****** constructors and destructor
181  StGenParticleMaster() : mNTk(0) {;}
182 
183 public:
184 int Size() const { return mNTk;}
185 
186 virtual ~StGenParticleMaster(){;}
187 virtual void Update()=0;
188 virtual void Print(const char *tit) const;
189 
190 virtual const StGenParticle *operator()(int idx) const=0;
191 static int Gea2Pdg(int igea);
192 static int Pdg2Gea(int ipdg);
193 static double Gea2Mas(int igea);
194 
195 
196 protected:
197 int mNTk;
198 
199 
200 };
201 
202 #endif
203 
Abstract base class for particles related to common /HEPEVT/.