]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDmcTrack.h
Boost method added.
[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 #include <TObject.h> 
8
9 class AliTRDgeometry;
10
11 const Int_t kMAX_TB=30;  
12
13 class AliTRDmcTrack : public TObject {
14
15 // Represents TRD related info about generated track
16
17 public:
18
19   AliTRDmcTrack();
20   AliTRDmcTrack(Int_t label, Int_t seedLabel, Bool_t primary, Float_t mass, 
21                 Int_t charge, Int_t pdg); 
22
23   void SetPin(Int_t plane, Double_t px, Double_t py, Double_t pz)
24               { Pin[plane][0] = px; Pin[plane][1] = py; Pin[plane][2] = pz; }
25
26   void SetPout(Int_t plane, Double_t px, Double_t py, Double_t pz)
27               {Pout[plane][0] = px; Pout[plane][1] = py; Pout[plane][2] = pz;}
28
29   void SetXYZin(Int_t plane, Double_t x, Double_t y, Double_t z)
30     { XYZin[plane][0] = x; XYZin[plane][1] = y; XYZin[plane][2] = z; }
31
32   void SetXYZout(Int_t plane, Double_t x, Double_t y, Double_t z)
33     { XYZout[plane][0] = x; XYZout[plane][1] = y; XYZout[plane][2] = z; }
34
35   void GetPxPyPzXYZ(Double_t &px, Double_t &py, Double_t &pz, 
36                     Double_t &x,  Double_t &y,  Double_t &z, 
37                     Int_t opt = 0) const;
38
39   void GetPlanePxPyPz(Double_t &px, Double_t &py, Double_t &pz
40                      ,Int_t plane, Int_t opt = 0) const;
41
42   void GetXYZin(Int_t plane, Double_t &x, Double_t &y, Double_t &z) const 
43     { x = XYZin[plane][0]; y = XYZin[plane][1]; z = XYZin[plane][2]; return; }
44
45   void GetXYZout(Int_t plane, Double_t &x, Double_t &y, Double_t &z) const
46     {x = XYZout[plane][0]; y = XYZout[plane][1]; z = XYZout[plane][2]; return;}
47
48   void Update(Int_t ltb, Int_t p, Int_t n, Int_t index) 
49                                               { fIndex[ltb][p][n] = index; }
50
51   Int_t   GetTrackIndex()          const { return fLab;      }
52   Int_t   GetSeedLabel()           const { return fSeedLab;  }
53   void    SetSeedLabel(Int_t l)          { fSeedLab = l;     }
54   void    SetNumberOfClusters(Int_t n)   { fN = n;           }
55   Bool_t  IsPrimary()              const { return fPrimary;  }
56   Float_t GetMass()                const { return fMass;     }
57   Int_t   GetCharge()              const { return fCharge;   }
58   Int_t   GetPdgCode()             const { return fPDG;      }
59
60   Int_t   GetNumberOfClusters()    const { return fN;        }
61   Int_t   GetClusterIndex(Int_t ltb, Int_t p, Int_t n) 
62                                    const { return fIndex[ltb][p][n]; }
63
64 protected:
65
66    Int_t    fLab;             // Track index  
67    Int_t    fSeedLab;         // Seed track index  
68    Bool_t   fPrimary;         // TRUE if it's a primary particle
69    Float_t  fMass;            // Mass of the MC track
70    Int_t    fCharge;          // Charge of the MC track
71    Int_t    fPDG;             // PDG code of the MC track
72
73    Int_t  fN;               // Number of TRD clusters associated with the track
74    Int_t  fIndex[kMAX_TB][6][2]; // Indices of these clusters  
75                            
76    Double_t Pin[6][3];        // Px,Py,Pz at the entrance of each TRD plane   
77    Double_t Pout[6][3];       // Px,Py,Pz at the exit of each TRD plane
78
79    Double_t XYZin[6][3];        // x,y,z at the entrance of the TRD  
80    Double_t XYZout[6][3];        // x,y,z at the exit of the TRD    
81
82    ClassDef(AliTRDmcTrack,1)  // TRD MC track
83
84 };                   
85
86 #endif