1 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
4 // Short comment describing what this class does needed!
6 // $Id: AliJMCTrack.h,v 1.3 2008/05/08 15:19:52 djkim Exp $
8 ////////////////////////////////////////////////////
12 \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
14 \version $Revision: 1.3 $
15 \date $Date: 2008/05/08 15:19:52 $
17 ////////////////////////////////////////////////////
26 #include <TDatabasePDG.h>
28 // include Inharitance
29 #include "AliJBaseTrack.h"
31 class AliJMCTrack : public AliJBaseTrack {
34 enum { kPrimary=AliJBaseTrack::kNFlag, kPHOS, kEMCAL, kTPC, kInjected, kNFlag };//For ALICE
35 enum { kFinal=AliJBaseTrack::kNFlag };// for MC
36 //usage : this->SetFlag( kPrimary, kTRUE );
37 //usage : this->IsTrue( kFinal );
39 AliJMCTrack(); //default constructor
40 AliJMCTrack(const AliJMCTrack& a); //copy constructor
42 ~AliJMCTrack(){;} //destructor
44 Int_t GetPdgCode() const {return fPdgCode;}
45 Int_t GetMother (Int_t i) const {return fMother[i];}
46 Int_t GetDaughter(Int_t i) const {return fDaughter[i];}
47 Double32_t GetVx() const{return fVx;}
48 Double32_t GetVy() const{return fVy;}
49 Double32_t GetVz() const{return fVz;}
51 const TParticlePDG& GetPDGData() const ;
52 void SetPdgCode(Int_t icode);// Set PDG and E,charge
53 void SetMother (int m0, int m1){ fMother[0] = m0;fMother[1]=m1; }
54 void SetDaughter(int d0, int d1){ fDaughter[0]=d0;fDaughter[1]=d1; }
55 void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz)
56 {fVx=vx; fVy=vy; fVz=vz;}
59 AliJMCTrack& operator=(const AliJMCTrack& trk);
63 Bool_t IsFinal() const { return IsTrue( kFinal ); }
64 void SetIsFinal(Bool_t t){ SetFlag( kFinal, t );}
66 Bool_t IsHadron() const;
67 Bool_t IsCharged() const { return GetCharge(); }
68 Bool_t IsParton() const {return ( fPdgCode > -7 && fPdgCode < 7 && fPdgCode !=0 );}
72 Short_t fPdgCode; // PDG code of the particle
73 Short_t fMother[2]; // Index of the mother particles
74 Short_t fDaughter[2]; // Indices of the daughter particles
76 Double32_t fVx; //[0.,0.,12] x of production vertex
77 Double32_t fVy; //[0.,0.,12] y of production vertex
78 Double32_t fVz; //[0.,0.,12] z of production vertex
80 ClassDef(AliJMCTrack,2)