]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDmcTrack.h
Introducing Id
[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
7#include <TObject.h>
8
9class AliTRDgeometry;
10
fd621f36 11const Int_t kMAX_CLUSTERS_PER_MC_TRACK=210;
12
16bf9884 13class AliTRDmcTrack : public TObject {
14
15// Represents TRD related info about generated track
16
17public:
18
19 AliTRDmcTrack();
20 AliTRDmcTrack(Int_t label, Bool_t primary, Float_t mass, Int_t charge, Int_t pdg);
21
22 void SetPin(Int_t plane, Double_t px, Double_t py, Double_t pz)
fd621f36 23 { Pin[plane][0] = px; Pin[plane][1] = py; Pin[plane][2] = pz; }
16bf9884 24
25 void SetPout(Int_t plane, Double_t px, Double_t py, Double_t pz)
fd621f36 26 {Pout[plane][0] = px; Pout[plane][1] = py; Pout[plane][2] = pz;}
27
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; }
30
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; }
33
34 void GetPxPyPzXYZ(Double_t &px, Double_t &py, Double_t &pz,
35 Double_t &x, Double_t &y, Double_t &z,
36 Int_t opt = 0) const;
16bf9884 37
16bf9884 38 void GetPlanePxPyPz(Double_t &px, Double_t &py, Double_t &pz
39 ,Int_t plane, Int_t opt = 0) const;
40
fd621f36 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; }
43
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;}
46
47 void Update(Int_t index) {
48 if (fN < kMAX_CLUSTERS_PER_MC_TRACK-1) fIndex[fN++] = index; }
16bf9884 49
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; }
55
56 Int_t GetNumberOfClusters() const { return fN; }
57 Int_t GetClusterIndex(Int_t i) const { return fIndex[i]; }
58
59protected:
60
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
66
fd621f36 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
16bf9884 69
fd621f36 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
72
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
16bf9884 75
76 ClassDef(AliTRDmcTrack,1) // TRD MC track
77
78};
79
80#endif