]>
Commit | Line | Data |
---|---|---|
3513afb7 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | // | |
16 | // Debug tree to look at the distribution of the variable we are cutting on | |
17 | // | |
18 | // | |
19 | #ifndef ALIHFEREDUCEDTRACK_H | |
20 | #define ALIHFEREDUCEDTRACK_H | |
21 | ||
22 | #include <TObject.h> | |
23 | #include <TMath.h> | |
24 | #include <TBits.h> | |
25 | ||
26 | class AliHFEreducedTrack : public TObject{ | |
27 | public: | |
28 | typedef enum{ | |
29 | kV0electron = 0, | |
30 | kV0proton = 1, | |
31 | kV0pion = 2, | |
32 | kV0undef = 3 | |
33 | } EV0PID_t; | |
34 | AliHFEreducedTrack(); | |
35 | AliHFEreducedTrack(const AliHFEreducedTrack &ref); | |
36 | AliHFEreducedTrack &operator=(const AliHFEreducedTrack &ref); | |
37 | ~AliHFEreducedTrack() {} | |
38 | ||
39 | // -------------- Getters ------------------------ | |
40 | Double_t Pt() const { return TMath::Abs(fSignedPt); } | |
41 | Double_t P() const { return fP; } | |
42 | Double_t TPCmomentum() const { return fTPCmomentum; } | |
43 | Double_t Eta() const { return fEta; } | |
44 | Double_t Phi() const { return fPhi; } | |
45 | Int_t Charge() const { | |
46 | if(fSignedPt >= 0.) return 1.; | |
47 | return -1; | |
48 | } | |
49 | ||
50 | Double_t MCPt() const { return TMath::Abs(fMCSignedPt); } | |
51 | Double_t MCP() const { return fMCP; } | |
52 | Double_t MCEta() const { return fMCEta; } | |
53 | Double_t MCPhi() const { return fMCPhi; } | |
54 | Int_t MCCharge() const { | |
55 | if(fMCSignedPt >= 0.) return 1.; | |
56 | return -1; | |
57 | } | |
58 | Int_t MCPDG() const { return fMCPDG; } | |
59 | Int_t MCMotherPdg() const { return fMCMotherPdg; } | |
60 | Bool_t MCSignal() const { return fMCSignal; } | |
61 | Int_t MCSource() const { return fMCSource; } | |
62 | Double_t MCProdVtxX() const { return fMCProdVtx[0]; } | |
63 | Double_t MCProdVtxY() const { return fMCProdVtx[1]; } | |
64 | Double_t MCProdVtxZ() const { return fMCProdVtx[2]; } | |
65 | Double_t MCProdRadius() const { return TMath::Sqrt(fMCProdVtx[0]*fMCProdVtx[0]+fMCProdVtx[1]*fMCProdVtx[1]); } | |
66 | ||
67 | Double_t DCAr() const { return fDCA[0]; } | |
68 | Double_t DCAz() const { return fDCA[1]; } | |
4437a0d2 | 69 | Double_t HFEImpactParameter() const { return fHFEImpactParam[0]; } |
70 | Double_t HFEImpactParameterResolution() const { return fHFEImpactParam[1]; } | |
3513afb7 | 71 | |
72 | Bool_t TestFilterBit(Int_t ibit) const { return fFilterBit.TestBitNumber(ibit); } | |
73 | Int_t GetTrackID() const { return fTrackID; } | |
74 | Bool_t HasITSrefit() const { return fTrackStatus.TestBitNumber(kITSrefit); } | |
75 | Bool_t HasTPCrefit() const { return fTrackStatus.TestBitNumber(kTPCrefit); } | |
76 | Bool_t HasTOFpid() const { return fTrackStatus.TestBitNumber(kTOFpid); } | |
77 | Bool_t IsTOFmismatch() const { return fTrackStatus.TestBitNumber(kTOFmismatch); } | |
78 | Bool_t HasEMCALpid() const { return fTrackStatus.TestBitNumber(kEMCALpid); } | |
79 | Bool_t IsDoubleCounted() const { return fTrackStatus.TestBitNumber(kDoubleCounted); } | |
4437a0d2 | 80 | Bool_t IsKinkMother() const { return fTrackStatus.TestBitNumber(kKinkMother); } |
81 | Bool_t IsKinkDaughter() const { return fTrackStatus.TestBitNumber(kKinkDaughter); } | |
3513afb7 | 82 | |
83 | Int_t GetITSnclusters() const { return static_cast<Int_t>(fNclustersITS); } | |
84 | Int_t GetTPCnclusters() const { return static_cast<Int_t>(fNclustersTPC); } | |
85 | Int_t GetTRDnclusters() const { return static_cast<Int_t>(fNclustersTRD); } | |
86 | Bool_t HasITScluster(int nly) const { | |
87 | if(nly > 5) return kFALSE; | |
88 | return fITSclusterMap.TestBitNumber(nly); | |
89 | } | |
90 | Bool_t GetITSlayerStatus(int nly) const { | |
91 | if(nly > 5) return kFALSE; | |
92 | return fITSstatusMap.TestBitNumber(nly); | |
93 | } | |
4437a0d2 | 94 | Double_t GetChi2PerTPCcluster() const { return fChi2PerTPCcluster; } |
3513afb7 | 95 | Int_t GetTPCnclusterPID() const { return static_cast<Int_t>(fNclustersTPCPID); } |
96 | Int_t GetTPCnclustersAll() const { return static_cast<Int_t>(fNclustersTPCAll); } | |
97 | Int_t GetTPCcrossedRows() const { return static_cast<Int_t>(fTPCcrossedRows); } | |
98 | Int_t GetTPCsharedClusters() const { return static_cast<Int_t>(fTPCsharedClusters); } | |
99 | Float_t GetTPCclusterRatio() const { return fTPCclusterRatio; } | |
100 | Float_t GetTPCclusterRatioAll() const { return fTPCclusterRatioAll; } | |
101 | Int_t GetTRDntrackletsPID() const { return static_cast<UChar_t>(fTRDtrackletsPID); } | |
102 | Int_t GetTRDnslices() const { return static_cast<Int_t>(fTRDnslices); } | |
103 | Bool_t GetTRDstatus(Int_t layer) const { | |
104 | if(layer > 5) return kFALSE; | |
105 | return fTRDlayer.TestBitNumber(layer); | |
106 | } | |
107 | Float_t GetTRDchi2() const { return fTRDchi2; } | |
108 | ||
109 | Double_t GetTPCdEdx() const { return fTPCdEdx; } | |
110 | Double_t GetTPCdEdxCorrected() const { return fTPCdEdxCorrected; } | |
111 | Double_t GetTPCsigmaEl() const { return fTPCsigmaEl; } | |
112 | Double_t GetTPCsigmaElCorrected() const { return fTPCsigmaElCorrected; } | |
113 | Double_t GetTOFsigmaEl() const { return fTOFsigmaEl; } | |
114 | Float_t GetTOFmismatchProb() const { return fTOFmismatchProb; } | |
4437a0d2 | 115 | Double_t GetITSsigmaEl() const { return fITSsigmaEl; } |
3513afb7 | 116 | Double_t GetEMCALEoverP() const { return fEoverP; } |
117 | Double_t GetEMCALSigmaEl() const { return fEMCALsigmaEl; } | |
118 | void GetEMCALShowerShape(Double_t showershape[4]) const{ | |
119 | for(Int_t is = 0; is < 4; is++) showershape[is] = fShowerShape[is]; | |
120 | } | |
121 | ||
122 | Bool_t IsV0electron() const { return fV0PID == kV0electron; } | |
123 | Bool_t IsV0pion() const { return fV0PID == kV0pion; } | |
124 | Bool_t IsV0proton() const { return fV0PID == kV0proton; } | |
125 | ||
126 | ||
127 | // -------------- Setters ------------------------ | |
128 | void SetSignedPt(Double_t abspt, Bool_t positivecharge) { | |
129 | Double_t charge = positivecharge ? 1. : -1; | |
130 | fSignedPt = abspt * charge; | |
131 | } | |
132 | void SetP(Double_t p) { fP = p; } | |
133 | void SetTPCmomentum(Double_t p) { fTPCmomentum = p; } | |
134 | void SetEta(Double_t eta) { fEta = eta; } | |
135 | void SetPhi(Double_t phi) { fPhi = phi; } | |
136 | ||
137 | void SetFilterBit(Int_t ibit) { fFilterBit.SetBitNumber(ibit); } | |
138 | void SetTrackID(Int_t trackID) { fTrackID = trackID; } | |
139 | void SetITSrefit() { fTrackStatus.SetBitNumber(kITSrefit); } | |
140 | void SetTPCrefit() { fTrackStatus.SetBitNumber(kTPCrefit); } | |
141 | void SetTOFpid() { fTrackStatus.SetBitNumber(kTOFpid); } | |
142 | void SetTOFmismatch() { fTrackStatus.SetBitNumber(kTOFmismatch); } | |
143 | void SetEMCALpid() { fTrackStatus.SetBitNumber(kEMCALpid); } | |
144 | void SetDoubleCounted() { fTrackStatus.SetBitNumber(kDoubleCounted); } | |
4437a0d2 | 145 | void SetIsKinkMother() { fTrackStatus.SetBitNumber(kKinkMother); } |
146 | void SetIsKinkDaughter() { fTrackStatus.SetBitNumber(kKinkDaughter); } | |
147 | ||
3513afb7 | 148 | |
149 | void SetMCSignedPt(Double_t abspt, Bool_t positivecharge){ | |
150 | Double_t charge = positivecharge ? 1. : -1; | |
4437a0d2 | 151 | fMCSignedPt = abspt * charge; |
3513afb7 | 152 | } |
153 | void SetMCP(Double_t mcp) { fMCP = mcp; } | |
154 | void SetMCEta(Double_t mceta) { fMCEta = mceta; } | |
155 | void SetMCPhi(Double_t mcphi) { fMCPhi = mcphi; } | |
156 | void SetMCPDG(Int_t mcpdg) {fMCPDG = mcpdg; } | |
157 | void SetMCMotherPdg(Int_t pdg) { fMCMotherPdg = pdg; } | |
158 | void SetMCSignal() { fMCSignal = kTRUE; } | |
159 | void SetMCSource(Int_t mcsource) { fMCSource = mcsource; } | |
160 | void SetMCProdVtx(Double_t vx, Double_t vy, Double_t vz){ | |
161 | fMCProdVtx[0] = vx; | |
162 | fMCProdVtx[1] = vy; | |
163 | fMCProdVtx[2] = vz; | |
164 | } | |
165 | ||
166 | void SetDCA(Float_t dcaR, Float_t dcaZ){ | |
167 | fDCA[0] = dcaR; | |
168 | fDCA[1] = dcaZ; | |
169 | } | |
4437a0d2 | 170 | void SetHFEImpactParam(Double_t impactParam, Double_t impactParamResolution){ |
171 | fHFEImpactParam[0] = impactParam; | |
172 | fHFEImpactParam[1] = impactParamResolution; | |
173 | } | |
3513afb7 | 174 | |
175 | void SetITSnclusters(int ncls) { fNclustersITS = ncls; } | |
176 | void SetTPCnclusters(int ncls) { fNclustersTPC = ncls; } | |
177 | void SetTRDnclusters(int ncls) { fNclustersTRD = ncls; } | |
178 | void SetITScluster(UInt_t ly){ | |
179 | if(ly > 5) return; | |
180 | fITSclusterMap.SetBitNumber(ly); | |
181 | } | |
182 | void SetITSstatus(UInt_t ly){ | |
183 | if(ly > 5) return; | |
184 | fITSstatusMap.SetBitNumber(ly); | |
185 | } | |
4437a0d2 | 186 | void SetChi2PerTPCcluster(Double_t value) { fChi2PerTPCcluster = value; } |
3513afb7 | 187 | void SetTPCnclustersPID(Int_t ncls) { fNclustersTPCPID = static_cast<UChar_t>(ncls); } |
188 | void SetTPCnclustersAll(Int_t ncls) { fNclustersTPCAll = static_cast<UChar_t>(ncls); } | |
189 | void SetTPCcrossedRows(int nrows) { fTPCcrossedRows = static_cast<UChar_t>(nrows); } | |
190 | void SetTPCsharedClusters(Int_t ncls) { fTPCsharedClusters = static_cast<UChar_t>(ncls); } | |
191 | void SetTPCclusterRatio(Float_t ratio) { fTPCclusterRatio = ratio; } | |
192 | void SetTPCclusterRatioAll(Float_t ratio) { fTPCclusterRatioAll = ratio; } | |
193 | void SetTRDntrackletsPID(Int_t ntracklets) { fTRDtrackletsPID = static_cast<UChar_t>(ntracklets); } | |
194 | void SetTRDnslices(Int_t nslices) { fTRDnslices = static_cast<UChar_t>(nslices); } | |
195 | void SetTRDstatus(Int_t layer) { | |
196 | if(layer > 5) return; | |
197 | fTRDlayer.SetBitNumber(static_cast<UInt_t>(layer)); | |
198 | } | |
199 | void SetTRDchi2(Float_t chi2) { fTRDchi2 = chi2; } | |
200 | ||
201 | void SetTPCdEdx(Double_t dEdx) { fTPCdEdx = dEdx; } | |
202 | void SetTPCdEdxCorrected(Double_t dEdx) { fTPCdEdxCorrected = dEdx; } | |
203 | void SetTPCsigmaEl(Double_t sigma) { fTPCsigmaEl = sigma; } | |
204 | void SetTPCsigmaElCorrected(Double_t sigma) { fTPCsigmaElCorrected = sigma; } | |
205 | void SetTOFsigmaEl(Double_t sigma) { fTOFsigmaEl = sigma; } | |
206 | void SetTOFmismatchProbability(Float_t mismatchProb) { fTOFmismatchProb = mismatchProb; } | |
4437a0d2 | 207 | void SetITSsigmaEl(Double_t sigma) { fITSsigmaEl = sigma; } |
3513afb7 | 208 | void SetEMCALEoverP(Double_t eop) { fEoverP = eop; } |
209 | void SetEMCALSigmaEl(Double_t sigma) { fEMCALsigmaEl = sigma; } | |
210 | void SetEMCALShowerShape(Double_t showershape[4]){ | |
211 | for(Int_t is = 0; is < 4; is++) fShowerShape[is] = showershape[is]; | |
212 | } | |
213 | void SetV0PID(AliHFEreducedTrack::EV0PID_t v0pid) { fV0PID = v0pid; } | |
214 | ||
215 | private: | |
216 | typedef enum{ | |
217 | kITSrefit = 0, | |
218 | kTPCrefit = 1, | |
219 | kTOFpid = 2, | |
220 | kTOFmismatch = 3, | |
221 | kEMCALpid =4, | |
222 | kDoubleCounted = 5, | |
4437a0d2 | 223 | kKinkMother = 6, |
224 | kKinkDaughter = 7 | |
3513afb7 | 225 | } TrackStatus_t; |
226 | Double_t fSignedPt; // signed pt | |
227 | Double_t fP; // p | |
228 | Double_t fEta; // eta | |
229 | Double_t fPhi; // phi | |
230 | Double_t fTPCmomentum; // TPC p | |
231 | TBits fFilterBit; // filterbit | |
232 | Int_t fTrackID; // trackID | |
233 | Double_t fMCSignedPt; // MCSignedPt | |
234 | Double_t fMCP; // MCP | |
235 | Double_t fMCEta; // MCEta | |
236 | Double_t fMCPhi; // MCPhi | |
237 | Int_t fMCPDG; // MCPDG | |
238 | Int_t fMCMotherPdg; // MCMP | |
239 | Bool_t fMCSignal; // MCSignal | |
240 | Int_t fMCSource; // MCSource | |
241 | Double_t fMCProdVtx[3]; // MC prod Vtx | |
242 | TBits fTrackStatus; // Track Status | |
243 | UChar_t fNclustersITS; // ITS nb cls | |
244 | UChar_t fNclustersTPC; // TPC nb cls | |
245 | UChar_t fNclustersTRD; // TRD nb cls | |
246 | TBits fITSclusterMap; // ITS maps | |
247 | TBits fITSstatusMap; // ITS status map | |
248 | UChar_t fNclustersTPCPID; // TPC PID nb cls | |
249 | UChar_t fNclustersTPCAll; // TPC all nb cls | |
250 | UChar_t fTPCcrossedRows; // TPC crossed rows | |
251 | UChar_t fTPCsharedClusters; // TPC shared clusters | |
252 | Float_t fTPCclusterRatio; // TPC cls ratio | |
253 | Float_t fTPCclusterRatioAll; // TPC cls ratio all | |
4437a0d2 | 254 | Double_t fChi2PerTPCcluster; // Chi2/TPC cluster |
3513afb7 | 255 | UChar_t fTRDtrackletsPID; // TRD tracklet PID |
256 | UChar_t fTRDnslices; // TRD nslices | |
257 | TBits fTRDlayer; // TRD layer | |
258 | Float_t fTRDchi2; // TRD chi2 | |
259 | Double_t fTPCdEdx; // TPC dedx | |
260 | Double_t fTPCdEdxCorrected; // TPC dedx corrected | |
261 | Double_t fTPCsigmaEl; // TPC sigma el | |
262 | Double_t fTPCsigmaElCorrected; // TPC sigma el corrected | |
263 | Double_t fTOFsigmaEl; // TOF sigma el | |
264 | Float_t fTOFmismatchProb; // TOF mismatch prob | |
4437a0d2 | 265 | Double_t fITSsigmaEl; // ITS sigma el |
3513afb7 | 266 | Double_t fEoverP; // Eoverp |
267 | Double_t fEMCALsigmaEl; // EMCAl sigmal el | |
268 | Double_t fShowerShape[4]; // showershape | |
269 | Float_t fDCA[2]; // dca | |
4437a0d2 | 270 | Double_t fHFEImpactParam[2]; // HFE impact paramter (value, resolution) for beauty analysis |
3513afb7 | 271 | EV0PID_t fV0PID; // V0pid |
272 | ||
273 | ClassDef(AliHFEreducedTrack, 1) | |
274 | }; | |
275 | #endif |