619b9b459958c625f171ba06c41a783c795bacc7
[u/mrichter/AliRoot.git] / TRD / AliTRDmcTrack.h
1 #ifndef ALITRDMCTRACK_H
2 #define ALITRDMCTRACK_H  
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */ 
6
7 /* $Id$ */
8
9 ////////////////////////////////////////////////////////////////////////////
10 //                                                                        //
11 //  TRD MC track                                                          //
12 //  Used for efficiency estimates and matching of reconstructed tracks    //
13 //  to MC particles                                                       //                    
14 //                                                                        //
15 ////////////////////////////////////////////////////////////////////////////
16
17 #include <TObject.h> 
18
19 class AliTRDgeometry;
20
21 class AliTRDmcTrack : public TObject {
22
23  public:
24
25   enum { kMAXTB = 30 };
26
27   AliTRDmcTrack();
28   AliTRDmcTrack(Int_t label, Int_t seedLabel, Bool_t primary
29               , Float_t mass, Int_t charge, Int_t pdg); 
30
31           void     SetSeedLabel(Int_t l)                    { fSeedLab           = l;    }
32           void     SetNumberOfClusters(Int_t n)             { fN                 = n;    }
33           void     SetPin(Int_t plane, Double_t px, Double_t py, Double_t pz)
34                                                             { fPin[plane][0]      = px; 
35                                                               fPin[plane][1]      = py; 
36                                                               fPin[plane][2]      = pz;  }
37           void     SetPout(Int_t plane, Double_t px, Double_t py, Double_t pz)
38                                                             { fPout[plane][0]     = px; 
39                                                               fPout[plane][1]     = py; 
40                                                               fPout[plane][2]     = pz;  }
41           void     SetXYZin(Int_t plane, Double_t x, Double_t y, Double_t z)
42                                                             { fXYZin[plane][0]    = x; 
43                                                               fXYZin[plane][1]    = y; 
44                                                               fXYZin[plane][2]    = z;   }
45           void     SetXYZout(Int_t plane, Double_t x, Double_t y, Double_t z)
46                                                             { fXYZout[plane][0]   = x; 
47                                                               fXYZout[plane][1]   = y; 
48                                                               fXYZout[plane][2]   = z;   }
49
50           Int_t    GetTrackIndex() const                    { return fLab;               }
51           Int_t    GetSeedLabel() const                     { return fSeedLab;           }
52           Float_t  GetMass() const                          { return fMass;              }
53           Int_t    GetCharge() const                        { return fCharge;            }
54           Int_t    GetPdgCode() const                       { return fPDG;               }
55           Int_t    GetNumberOfClusters() const              { return fN;                 }
56           Int_t    GetClusterIndex(Int_t ltb, Int_t p, Int_t n) const 
57                                                             { return fIndex[ltb][p][n];  }
58           void     GetPxPyPzXYZ(Double_t &px, Double_t &py, Double_t &pz
59                               , Double_t &x,  Double_t &y,  Double_t &z
60                               , Int_t opt = 0) const;
61           void     GetPlanePxPyPz(Double_t &px, Double_t &py, Double_t &pz
62                                 , Int_t plane, Int_t opt = 0) const;
63           void     GetXYZin(Int_t plane, Double_t &x, Double_t &y, Double_t &z) const 
64                                                             { x = fXYZin[plane][0]; 
65                                                               y = fXYZin[plane][1]; 
66                                                               z = fXYZin[plane][2]; 
67                                                               return;                    }
68           void     GetXYZout(Int_t plane, Double_t &x, Double_t &y, Double_t &z) const
69                                                             { x = fXYZout[plane][0]; 
70                                                               y = fXYZout[plane][1]; 
71                                                               z = fXYZout[plane][2]; 
72                                                               return;                    }
73
74           Bool_t   IsPrimary() const                        { return fPrimary;           }
75           void     Update(Int_t ltb, Int_t p, Int_t n, Int_t index) 
76                                                             { fIndex[ltb][p][n] = index; }
77
78  protected:
79
80           Int_t    fLab;                  //  Track index  
81           Int_t    fSeedLab;              //  Seed track index  
82           Bool_t   fPrimary;              //  TRUE if it's a primary particle
83           Float_t  fMass;                 //  Mass of the MC track
84           Int_t    fCharge;               //  Charge of the MC track
85           Int_t    fPDG;                  //  PDG code of the MC track
86
87           Int_t    fN;                    //  Number of TRD clusters associated with the track
88           Int_t    fIndex[kMAXTB][6][2];  //  Indices of these clusters  
89                            
90           Double_t fPin[6][3];            //  Px,Py,Pz at the entrance of each TRD plane   
91           Double_t fPout[6][3];           //  Px,Py,Pz at the exit of each TRD plane
92
93           Double_t fXYZin[6][3];          //  X,Y,Z at the entrance of the TRD  
94           Double_t fXYZout[6][3];         //  X,Y,Z at the exit of the TRD    
95
96   ClassDef(AliTRDmcTrack,2)               //  TRD MC track
97
98 };                   
99 #endif