00001
00008
00009
00010 #ifndef STAR_StGENParticle
00011 #define STAR_StGENParticle
00012 #include <vector>
00013 #include "StGenParticle.h"
00014
00016 class StGENParticle : public StGenParticle {
00017 public:
00018
00019
00020
00021 StGENParticle(int idx);
00022
00023 virtual ~StGENParticle();
00024
00025 virtual int GetStatusCode() const {return fStatusCode;}
00026 virtual int GetPdgCode() const {return fPdgCode ;}
00027 virtual int GetGeaCode() const {return fGeaCode ;}
00028 virtual const StGenParticle *GetMother(int i=0) const {return fMother[i] ;}
00029 virtual const StGenParticle *GetDaughter(int i) const;
00030 virtual double GetMass () const {return fP[4];}
00031 virtual int GetNDaughters () const {return fDaughter.size();}
00032 virtual void Momentum(double p4[4]) const ;
00033 virtual void Vertex(double v[3]) const;
00034 virtual double Time() const {return fV[3];}
00035
00036
00037 void Clear();
00038 void SetPdg(int pdg) {fPdgCode=pdg;}
00039 void SetGea(int gea) {fGeaCode=gea;}
00040 void SetVert(float v[4]);
00041 void SetMom (float p[5]);
00042 void SetMother(int i,const StGENParticle *m) {fMother[i]=m;}
00043 void AddDaughter(const StGENParticle *m);
00044
00045
00046 protected:
00047
00048 char fBeg[1];
00049 int fPdgCode;
00050 int fGeaCode;
00051 int fStatusCode;
00052 const StGENParticle *fMother[2];
00053 double fWeight;
00054 double fP[5];
00055 double fV[4];
00056 char fEnd[1];
00057 std::vector<const StGENParticle*> fDaughter;
00058
00059 };
00060
00061 #endif
00062