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