]>
Commit | Line | Data |
---|---|---|
37dde34e | 1 | // $Id: AliJMCTrack.h,v 1.3 2008/05/08 15:19:52 djkim Exp $ |
2 | ||
3 | //////////////////////////////////////////////////// | |
4 | /*! | |
5 | \file AliJMCTrack.h | |
6 | \brief | |
7 | \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla) | |
8 | \email: djkim@jyu.fi | |
9 | \version $Revision: 1.3 $ | |
10 | \date $Date: 2008/05/08 15:19:52 $ | |
11 | */ | |
12 | //////////////////////////////////////////////////// | |
13 | ||
14 | #ifndef ALIJMCTRACK_H | |
15 | #define ALIJMCTRACK_H | |
16 | ||
17 | // include ROOT lib | |
18 | #ifndef ROOT_TObject | |
19 | #include <TObject.h> | |
20 | #endif | |
21 | #include <TDatabasePDG.h> | |
22 | ||
23 | // include Inharitance | |
24 | #include "AliJBaseTrack.h" | |
25 | ||
26 | class AliJMCTrack : public AliJBaseTrack { | |
27 | ||
28 | public: | |
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 ); | |
33 | ||
34 | AliJMCTrack(); //default constructor | |
35 | AliJMCTrack(const AliJMCTrack& a); //copy constructor | |
36 | ||
37 | ~AliJMCTrack(){;} //destructor | |
38 | ||
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;} | |
45 | ||
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;} | |
52 | ||
53 | ||
54 | AliJMCTrack& operator=(const AliJMCTrack& trk); | |
55 | ||
56 | ||
57 | //Extra | |
58 | Bool_t IsFinal() const { return IsTrue( kFinal ); } | |
59 | void SetIsFinal(Bool_t t){ SetFlag( kFinal, t );} | |
60 | //TODO | |
61 | Bool_t IsHadron() const; | |
62 | Bool_t IsCharged() const { return GetCharge(); } | |
63 | Bool_t IsParton() const {return ( fPdgCode < -7 && fPdgCode < 7 && fPdgCode !=0 );} | |
64 | ||
65 | private: | |
66 | ||
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 | |
70 | ||
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 | |
74 | ||
75 | ClassDef(AliJMCTrack,2) | |
76 | }; | |
77 | ||
78 | #endif |