1 #ifndef ALITRDMCTRACK_H
2 #define ALITRDMCTRACK_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
11 const Int_t kMAX_CLUSTERS_PER_MC_TRACK=210;
13 class AliTRDmcTrack : public TObject {
15 // Represents TRD related info about generated track
20 AliTRDmcTrack(Int_t label, Bool_t primary, Float_t mass, Int_t charge, Int_t pdg);
22 void SetPin(Int_t plane, Double_t px, Double_t py, Double_t pz)
23 { Pin[plane][0] = px; Pin[plane][1] = py; Pin[plane][2] = pz; }
25 void SetPout(Int_t plane, Double_t px, Double_t py, Double_t pz)
26 {Pout[plane][0] = px; Pout[plane][1] = py; Pout[plane][2] = pz;}
28 void SetXYZin(Int_t plane, Double_t x, Double_t y, Double_t z)
29 { XYZin[plane][0] = x; XYZin[plane][1] = y; XYZin[plane][2] = z; }
31 void SetXYZout(Int_t plane, Double_t x, Double_t y, Double_t z)
32 { XYZout[plane][0] = x; XYZout[plane][1] = y; XYZout[plane][2] = z; }
34 void GetPxPyPzXYZ(Double_t &px, Double_t &py, Double_t &pz,
35 Double_t &x, Double_t &y, Double_t &z,
38 void GetPlanePxPyPz(Double_t &px, Double_t &py, Double_t &pz
39 ,Int_t plane, Int_t opt = 0) const;
41 void GetXYZin(Int_t plane, Double_t &x, Double_t &y, Double_t &z) const
42 { x = XYZin[plane][0]; y = XYZin[plane][1]; z = XYZin[plane][2]; return; }
44 void GetXYZout(Int_t plane, Double_t &x, Double_t &y, Double_t &z) const
45 {x = XYZout[plane][0]; y = XYZout[plane][1]; z = XYZout[plane][2]; return;}
47 void Update(Int_t index) {
48 if (fN < kMAX_CLUSTERS_PER_MC_TRACK-1) fIndex[fN++] = index; }
50 Int_t GetTrackIndex() const { return fLab; }
51 Bool_t IsPrimary() const { return fPrimary; }
52 Float_t GetMass() const { return fMass; }
53 Int_t GetCharge() const { return fCharge; }
54 Int_t GetPdgCode() const { return fPDG; }
56 Int_t GetNumberOfClusters() const { return fN; }
57 Int_t GetClusterIndex(Int_t i) const { return fIndex[i]; }
61 Int_t fLab; // Track index
62 Bool_t fPrimary; // TRUE if it's a primary particle
63 Float_t fMass; // Mass of the MC track
64 Int_t fCharge; // Charge of the MC track
65 Int_t fPDG; // PDG code of the MC track
67 Int_t fN; // Number of TRD clusters associated with the track
68 Int_t fIndex[kMAX_CLUSTERS_PER_MC_TRACK]; // Indices of these clusters
70 Double_t Pin[6][3]; // Px,Py,Pz at the entrance of each TRD plane
71 Double_t Pout[6][3]; // Px,Py,Pz at the exit of each TRD plane
73 Double_t XYZin[6][3]; // x,y,z at the entrance of the TRD
74 Double_t XYZout[6][3]; // x,y,z at the exit of the TRD
76 ClassDef(AliTRDmcTrack,1) // TRD MC track