11 class GParticle : public TObject {
15 Int_t fKS; // status of particle ( LUJETS K[1] )
16 Int_t fKF; // Geant3 particle type
17 Int_t fParent; // parent id
18 Int_t fFirstChild; // id of first child
19 Int_t fLastChild; // id of last child
21 Float_t fPx; // X momentum [GeV/c]
22 Float_t fPy; // Y momentum [GeV/c]
23 Float_t fPz; // Z momentum [GeV/c]
24 Float_t fEnergy; // Energy [GeV]
25 Float_t fMass; // Mass [Gev/c^2]
27 Float_t fVx; // X vertex [cm]
28 Float_t fVy; // Y vertex [cm]
29 Float_t fVz; // Z vertex [cm]
31 Float_t fPolx; // X component of polarisation
32 Float_t fPoly; // Y component of polarisation
33 Float_t fPolz; // Z component of polarisation
35 Float_t fTime; // time of procuction
36 Float_t fLifeTime; // proper lifetime
37 Float_t fProcessTime; // Cpu Time to process this track
39 char fOrigin[11]; // generation mechanism
49 GParticle(const GParticle &p);
51 GParticle(const Int_t kS, const Int_t kF,
52 const Int_t parent, const Int_t firstchild, const Int_t lastchild,
53 const Float_t px, const Float_t py, const Float_t pz,
54 const Float_t energy, const Float_t mass,
55 const Float_t vx, const Float_t vy, const Float_t vz,
56 const Float_t polx, const Float_t poly, const Float_t polz,
57 const Float_t time, const Float_t lifetime,
58 const char *Origin="Unknown",Float_t wgt=1.) :
63 fFirstChild(firstchild),
64 fLastChild(lastchild),
81 while((fOrigin[p]=Origin[p]) && p++<10);fOrigin[10]=0;
82 fPT =TMath::Sqrt(fPx*fPx+fPy*fPy);
83 fTheta =Float_t(TMath::ATan2(Double_t(fPT),Double_t(fPz)));
84 fPhi =Float_t(TMath::ATan2(Double_t(fPy),Double_t(fPx)))+TMath::Pi();
85 fEta =-TMath::Log(TMath::Tan(fTheta/2));
88 virtual ~GParticle() { }
90 inline Int_t GetKS() const {return fKS;}
91 inline Int_t GetKF() const {return fKF;}
92 inline Int_t GetParent() const {return fParent;}
93 inline Int_t GetFirstChild() const {return fFirstChild;}
94 inline Int_t GetLastChild() const {return fLastChild;}
96 inline Float_t GetPx() const {return fPx;}
97 inline Float_t GetPy() const {return fPy;}
98 inline Float_t GetPz() const {return fPz;}
100 inline Float_t GetPolx() const {return fPolx;}
101 inline Float_t GetPoly() const {return fPoly;}
102 inline Float_t GetPolz() const {return fPolz;}
104 inline Float_t GetEnergy() const {return fEnergy;}
105 inline Float_t GetMass() const {return fMass;}
106 inline Float_t GetMomentum() const {return TMath::Sqrt(fPx*fPx+fPy*fPy+fPz*fPz);}
107 inline void GetOrigin(char *Origin) {strcpy(Origin,fOrigin);}
108 inline Float_t GetPT() const {return fPT;}
109 inline Float_t GetTheta() const {return fTheta;}
110 inline Float_t GetEta() const {return fEta;}
111 inline Float_t GetPhi() const {return fPhi;}
113 inline Float_t GetVx() const {return fVx;}
114 inline Float_t GetVy() const {return fVy;}
115 inline Float_t GetVz() const {return fVz;}
116 inline Float_t GetTime() const {return fTime;}
117 inline Float_t GetLifeTime() const {return fLifeTime;}
118 inline Float_t GetWgt() const {return fWgt;}
119 inline void SetWgt(Float_t wgt) {fWgt=wgt;}
120 inline Float_t GetProcessTime() const {return fProcessTime;}
121 virtual const Text_t *GetName() const;
122 virtual const Text_t *GetTitle() const;
124 inline void SetKS(Int_t KS) {fKS=KS;}
125 inline void SetFirstChild(const Int_t firstchild) {fFirstChild=firstchild;}
126 inline void SetLastChild(const Int_t lastchild) {fLastChild=lastchild;}
127 inline void SetParent(const Int_t parent) {fParent=parent;}
128 inline void SetProcessTime(Float_t cputime) {fProcessTime=cputime;}
130 GParticle &operator=(const GParticle &p);
132 ClassDef(GParticle,1) // MonteCarlo Particle Class
135 inline GParticle &GParticle::operator = (const GParticle &p)
140 fFirstChild = p.fFirstChild;
141 fLastChild = p.fLastChild;
154 fLifeTime = p.fLifeTime;
155 fProcessTime = p.fProcessTime;
161 strcpy(fOrigin,p.fOrigin);
166 inline GParticle::GParticle(const GParticle &p) { *this = p; }