]>
Commit | Line | Data |
---|---|---|
02523d54 | 1 | #ifndef ALITRDTRACKINFO_H |
2 | #define ALITRDTRACKINFO_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
72f5f463 | 4 | * See cxx source for full Copyright notice */ |
02523d54 | 5 | |
6 | /* $Id: AliTRDtrackInfo.h 27496 2008-07-22 08:35:45Z cblume $ */ | |
7 | ||
8 | //////////////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // Reconstruction QA // | |
11 | // // | |
12 | //////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #ifndef Root_TObject | |
15 | #include "TObject.h" | |
16 | #endif | |
17 | ||
18 | #ifndef ALIPID_H | |
19 | #include "AliPID.h" | |
20 | #endif | |
21 | ||
22 | class AliTRDseedV1; | |
23 | class AliTRDtrackV1; | |
24 | class AliTrackReference; | |
25 | class AliExternalTrackParam; | |
26 | class AliTRDtrackInfo : public TObject{ | |
27 | public: | |
28 | enum{ | |
29 | kNTrackRefs = 12 | |
30 | }; | |
31 | class AliESDinfo{ | |
11e786b7 | 32 | friend class AliTRDtrackInfo; // Friend class |
02523d54 | 33 | public: |
34 | AliESDinfo(); | |
11e786b7 | 35 | AliESDinfo(const AliESDinfo &esd); |
02523d54 | 36 | virtual ~AliESDinfo(); |
11e786b7 | 37 | AliESDinfo& operator=(const AliESDinfo &esd); |
02523d54 | 38 | |
39 | Int_t GetId() const {return fId;} | |
40 | ULong_t GetStatus() const {return fStatus;} | |
41 | Int_t GetKinkIndex() const {return fKinkIndex;} | |
42 | UShort_t GetTPCncls() const {return fTPCncls;} | |
43 | UChar_t GetPidQuality() const {return fTRDpidQuality;} | |
44 | Int_t GetNSlices() const {return fTRDnSlices;} | |
45 | Double32_t* GetSliceIter() const {return fTRDslices;} | |
46 | const Double32_t* GetResponseIter() const {return &fTRDr[0];} | |
47 | AliExternalTrackParam* GetOuterParam() const { return fOP;} | |
48 | ||
49 | protected: | |
50 | Int_t fId; // ESD track id | |
51 | ULong_t fStatus; // ESD track status | |
52 | Int_t fKinkIndex; // ESD kink index | |
53 | UShort_t fTPCncls; // Number of Clusters inside TPC | |
11e786b7 | 54 | Double32_t fTRDr[AliPID::kSPECIES]; // TRD radial position |
02523d54 | 55 | UChar_t fTRDpidQuality; // TRD PID quality |
56 | Int_t fTRDnSlices; // number of slices used for PID | |
57 | Double32_t *fTRDslices; //[fTRDnSlices] | |
58 | AliExternalTrackParam *fOP; // outer param | |
59 | ||
60 | ClassDef(AliESDinfo, 2) // ESD info related to TRD | |
61 | }; | |
62 | ||
63 | class AliMCinfo{ | |
64 | friend class AliTRDtrackInfo; | |
65 | public: | |
66 | //typedef AliTrackReference (const* constAliTrackReference); | |
67 | AliMCinfo(); | |
11e786b7 | 68 | AliMCinfo(const AliMCinfo &mc); |
02523d54 | 69 | virtual ~AliMCinfo(); |
11e786b7 | 70 | AliMCinfo& operator=(const AliMCinfo &mc); |
02523d54 | 71 | Int_t GetLabel() const {return fLabel;} |
72 | Int_t GetNTrackRefs() const {return fNTrackRefs;} | |
73 | Int_t GetPDG() const {return fPDG;} | |
74 | Bool_t GetDirections(Float_t &x0, Float_t &y0, Float_t &z0, Float_t &dydx, Float_t &dzdx, Float_t &pt, UChar_t &s) const; | |
75 | AliTrackReference const* GetTrackRef(Int_t ref=0) const {return fTrackRefs[ref];} | |
76 | void PropagateKalman(Double_t dx[kNTrackRefs], Double_t dy[kNTrackRefs], Double_t dz[kNTrackRefs], Double_t dpt[kNTrackRefs], Double_t c[kNTrackRefs][15], Double_t step = 2.) const; | |
77 | ||
78 | protected: | |
79 | Int_t fLabel; // MC label | |
80 | Int_t fPDG; // particle code | |
81 | Int_t fNTrackRefs; // number of track refs | |
82 | AliTrackReference *fTrackRefs[kNTrackRefs]; // track refs array | |
83 | ClassDef(AliMCinfo, 1) // MC info related to TRD | |
84 | }; | |
85 | ||
86 | AliTRDtrackInfo(); | |
11e786b7 | 87 | AliTRDtrackInfo(const AliTRDtrackInfo &trdInfo); |
02523d54 | 88 | ~AliTRDtrackInfo(); |
89 | ||
90 | // void Clear(const Option_t *){} | |
91 | void Delete(const Option_t *); | |
92 | ||
11e786b7 | 93 | AliTRDtrackInfo& operator=(const AliTRDtrackInfo &trdInfo); |
02523d54 | 94 | |
95 | void AddTrackRef(const AliTrackReference *trackRef); | |
96 | ||
11e786b7 | 97 | Int_t GetTrackId() const { return fESD.fId;} |
02523d54 | 98 | const AliESDinfo* GetESDinfo() const { return &fESD; } |
99 | const AliMCinfo* GetMCinfo() const { return fMC; } | |
100 | Int_t GetNumberOfClusters() const; | |
101 | Int_t GetNumberOfClustersRefit() const {return fNClusters;} | |
102 | Int_t GetNTracklets() const; | |
103 | Int_t GetNTrackRefs() const {return fMC ? fMC->fNTrackRefs:0;} | |
104 | Int_t GetLabel() const { return fMC ? fMC->fLabel:0; } | |
105 | Int_t GetKinkIndex() const { return fESD.fKinkIndex;} | |
106 | UShort_t GetTPCncls() const { return fESD.fTPCncls;} | |
107 | Int_t GetPDG() const { return fMC ? fMC->fPDG : 0; } | |
108 | ULong_t GetStatus() const {return fESD.fStatus;} | |
109 | AliTRDtrackV1* GetTrack() const { return fTRDtrack; } | |
110 | AliTrackReference* GetTrackRef(Int_t entry) const; | |
11e786b7 | 111 | AliTrackReference* GetTrackRef(AliTRDseedV1* const tracklet) const; |
02523d54 | 112 | |
113 | Bool_t IsCurved() const {return TestBit(kCurv);} | |
114 | Bool_t IsPrimary() const {return TestBit(kPrim);} | |
72f5f463 | 115 | Bool_t HasESDtrack() const{return ((fTRDtrack != 0x0) ||(fESD.fOP != 0));} |
116 | Bool_t HasMCinfo() const { return (Bool_t)fMC; } | |
02523d54 | 117 | |
118 | void SetCurved(Bool_t curv = kTRUE) {SetBit(kCurv, curv);} | |
119 | void SetLabel(Int_t lab) { SetMC(); fMC->fLabel = lab; } | |
120 | void SetNumberOfClustersRefit(Int_t n) {fNClusters = n;} | |
121 | inline void SetMC(); | |
122 | void SetPDG(Int_t pdg) { SetMC(); fMC->fPDG = pdg; } | |
123 | void SetPrimary(Bool_t prim = kTRUE) {SetBit(kPrim, prim);} | |
124 | void SetOuterParam(const AliExternalTrackParam *op); | |
125 | void SetStatus(ULong_t stat) {fESD.fStatus = stat;} | |
126 | void SetKinkIndex(Int_t kinkIndex) {fESD.fKinkIndex = kinkIndex;} | |
127 | void SetTPCncls(UShort_t TPCncls) {fESD.fTPCncls = TPCncls;} | |
128 | void SetTrackId(Int_t id) {fESD.fId = id;} | |
129 | void SetTrack(const AliTRDtrackV1 *track); | |
130 | void SetESDpidQuality(UChar_t q) { fESD.fTRDpidQuality = q;} | |
11e786b7 | 131 | void SetSlices(Int_t n, Double32_t *s); |
02523d54 | 132 | inline void SetESDpid(Double_t *); |
133 | ||
134 | private: | |
135 | enum{ | |
136 | kCurv = 14, | |
137 | kPrim = 15 | |
138 | }; | |
139 | // this 2 data members have to go to ESD header. | |
140 | Int_t fNClusters; // Numer of clusters from refit | |
141 | AliTRDtrackV1 *fTRDtrack; // tracklets data array | |
142 | AliMCinfo *fMC; // MC extract for TRD | |
143 | AliESDinfo fESD; // ESD extract for TRD | |
72f5f463 | 144 | |
02523d54 | 145 | ClassDef(AliTRDtrackInfo, 3) // TRD track info |
146 | }; | |
147 | ||
148 | ||
149 | //________________________________________________________ | |
150 | inline void AliTRDtrackInfo::SetMC() | |
151 | { | |
152 | if(!fMC) fMC = new AliMCinfo(); | |
153 | } | |
154 | ||
155 | //________________________________________________________ | |
11e786b7 | 156 | inline void AliTRDtrackInfo::SetESDpid(Double_t * const r) |
02523d54 | 157 | { |
158 | for(Int_t is = AliPID::kSPECIES; is--;) fESD.fTRDr[is] = r[is]; | |
159 | } | |
160 | ||
161 | #endif |