1 // $Id: AliJMCTrack.h,v 1.3 2008/05/08 15:19:52 djkim Exp $
3 ////////////////////////////////////////////////////
7 \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
9 \version $Revision: 1.3 $
10 \date $Date: 2008/05/08 15:19:52 $
12 ////////////////////////////////////////////////////
21 #include <TDatabasePDG.h>
23 // include Inharitance
24 #include "AliJBaseTrack.h"
26 class AliJMCTrack : public AliJBaseTrack {
29 enum { kPrimary=AliJBaseTrack::kNFlag, kPHOS, kEMCAL, kTPC, kNFlag };//For ALICE
30 enum { kFinal=AliJBaseTrack::kNFlag };// for MC
31 //usage : this->SetFlag( kPrimary, kTRUE );
32 //usage : this->IsTrue( kFinal );
34 AliJMCTrack(); //default constructor
35 AliJMCTrack(const AliJMCTrack& a); //copy constructor
37 ~AliJMCTrack(){;} //destructor
39 Int_t GetPdgCode() const {return fPdgCode;}
40 Int_t GetMother (Int_t i) const {return fMother[i];}
41 Int_t GetDaughter(Int_t i) const {return fDaughter[i];}
42 Double32_t GetVx() const{return fVx;}
43 Double32_t GetVy() const{return fVy;}
44 Double32_t GetVz() const{return fVz;}
46 const TParticlePDG& GetPDGData() const ;
47 void SetPdgCode(Int_t icode);// Set PDG and E,charge
48 void SetMother (int m0, int m1){ fMother[0] = m0;fMother[1]=m1; }
49 void SetDaughter(int d0, int d1){ fDaughter[0]=d0;fDaughter[1]=d1; }
50 void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz)
51 {fVx=vx; fVy=vy; fVz=vz;}
54 AliJMCTrack& operator=(const AliJMCTrack& trk);
58 Bool_t IsFinal() const { return IsTrue( kFinal ); }
59 void SetIsFinal(Bool_t t){ SetFlag( kFinal, t );}
61 Bool_t IsHadron() const;
62 Bool_t IsCharged() const { return GetCharge(); }
63 Bool_t IsParton() const {return ( fPdgCode < -7 && fPdgCode < 7 && fPdgCode !=0 );}
67 Short_t fPdgCode; // PDG code of the particle
68 Short_t fMother[2]; // Index of the mother particles
69 Short_t fDaughter[2]; // Indices of the daughter particles
71 Double32_t fVx; //[0.,0.,12] x of production vertex
72 Double32_t fVy; //[0.,0.,12] y of production vertex
73 Double32_t fVz; //[0.,0.,12] z of production vertex
75 ClassDef(AliJMCTrack,2)