]>
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]; } | |
69 | ||
70 | Bool_t TestFilterBit(Int_t ibit) const { return fFilterBit.TestBitNumber(ibit); } | |
71 | Int_t GetTrackID() const { return fTrackID; } | |
72 | Bool_t HasITSrefit() const { return fTrackStatus.TestBitNumber(kITSrefit); } | |
73 | Bool_t HasTPCrefit() const { return fTrackStatus.TestBitNumber(kTPCrefit); } | |
74 | Bool_t HasTOFpid() const { return fTrackStatus.TestBitNumber(kTOFpid); } | |
75 | Bool_t IsTOFmismatch() const { return fTrackStatus.TestBitNumber(kTOFmismatch); } | |
76 | Bool_t HasEMCALpid() const { return fTrackStatus.TestBitNumber(kEMCALpid); } | |
77 | Bool_t IsDoubleCounted() const { return fTrackStatus.TestBitNumber(kDoubleCounted); } | |
78 | ||
79 | Int_t GetITSnclusters() const { return static_cast<Int_t>(fNclustersITS); } | |
80 | Int_t GetTPCnclusters() const { return static_cast<Int_t>(fNclustersTPC); } | |
81 | Int_t GetTRDnclusters() const { return static_cast<Int_t>(fNclustersTRD); } | |
82 | Bool_t HasITScluster(int nly) const { | |
83 | if(nly > 5) return kFALSE; | |
84 | return fITSclusterMap.TestBitNumber(nly); | |
85 | } | |
86 | Bool_t GetITSlayerStatus(int nly) const { | |
87 | if(nly > 5) return kFALSE; | |
88 | return fITSstatusMap.TestBitNumber(nly); | |
89 | } | |
90 | Int_t GetTPCnclusterPID() const { return static_cast<Int_t>(fNclustersTPCPID); } | |
91 | Int_t GetTPCnclustersAll() const { return static_cast<Int_t>(fNclustersTPCAll); } | |
92 | Int_t GetTPCcrossedRows() const { return static_cast<Int_t>(fTPCcrossedRows); } | |
93 | Int_t GetTPCsharedClusters() const { return static_cast<Int_t>(fTPCsharedClusters); } | |
94 | Float_t GetTPCclusterRatio() const { return fTPCclusterRatio; } | |
95 | Float_t GetTPCclusterRatioAll() const { return fTPCclusterRatioAll; } | |
96 | Int_t GetTRDntrackletsPID() const { return static_cast<UChar_t>(fTRDtrackletsPID); } | |
97 | Int_t GetTRDnslices() const { return static_cast<Int_t>(fTRDnslices); } | |
98 | Bool_t GetTRDstatus(Int_t layer) const { | |
99 | if(layer > 5) return kFALSE; | |
100 | return fTRDlayer.TestBitNumber(layer); | |
101 | } | |
102 | Float_t GetTRDchi2() const { return fTRDchi2; } | |
103 | ||
104 | Double_t GetTPCdEdx() const { return fTPCdEdx; } | |
105 | Double_t GetTPCdEdxCorrected() const { return fTPCdEdxCorrected; } | |
106 | Double_t GetTPCsigmaEl() const { return fTPCsigmaEl; } | |
107 | Double_t GetTPCsigmaElCorrected() const { return fTPCsigmaElCorrected; } | |
108 | Double_t GetTOFsigmaEl() const { return fTOFsigmaEl; } | |
109 | Float_t GetTOFmismatchProb() const { return fTOFmismatchProb; } | |
110 | Double_t GetEMCALEoverP() const { return fEoverP; } | |
111 | Double_t GetEMCALSigmaEl() const { return fEMCALsigmaEl; } | |
112 | void GetEMCALShowerShape(Double_t showershape[4]) const{ | |
113 | for(Int_t is = 0; is < 4; is++) showershape[is] = fShowerShape[is]; | |
114 | } | |
115 | ||
116 | Bool_t IsV0electron() const { return fV0PID == kV0electron; } | |
117 | Bool_t IsV0pion() const { return fV0PID == kV0pion; } | |
118 | Bool_t IsV0proton() const { return fV0PID == kV0proton; } | |
119 | ||
120 | ||
121 | // -------------- Setters ------------------------ | |
122 | void SetSignedPt(Double_t abspt, Bool_t positivecharge) { | |
123 | Double_t charge = positivecharge ? 1. : -1; | |
124 | fSignedPt = abspt * charge; | |
125 | } | |
126 | void SetP(Double_t p) { fP = p; } | |
127 | void SetTPCmomentum(Double_t p) { fTPCmomentum = p; } | |
128 | void SetEta(Double_t eta) { fEta = eta; } | |
129 | void SetPhi(Double_t phi) { fPhi = phi; } | |
130 | ||
131 | void SetFilterBit(Int_t ibit) { fFilterBit.SetBitNumber(ibit); } | |
132 | void SetTrackID(Int_t trackID) { fTrackID = trackID; } | |
133 | void SetITSrefit() { fTrackStatus.SetBitNumber(kITSrefit); } | |
134 | void SetTPCrefit() { fTrackStatus.SetBitNumber(kTPCrefit); } | |
135 | void SetTOFpid() { fTrackStatus.SetBitNumber(kTOFpid); } | |
136 | void SetTOFmismatch() { fTrackStatus.SetBitNumber(kTOFmismatch); } | |
137 | void SetEMCALpid() { fTrackStatus.SetBitNumber(kEMCALpid); } | |
138 | void SetDoubleCounted() { fTrackStatus.SetBitNumber(kDoubleCounted); } | |
139 | ||
140 | void SetMCSignedPt(Double_t abspt, Bool_t positivecharge){ | |
141 | Double_t charge = positivecharge ? 1. : -1; | |
142 | fSignedPt = abspt * charge; | |
143 | } | |
144 | void SetMCP(Double_t mcp) { fMCP = mcp; } | |
145 | void SetMCEta(Double_t mceta) { fMCEta = mceta; } | |
146 | void SetMCPhi(Double_t mcphi) { fMCPhi = mcphi; } | |
147 | void SetMCPDG(Int_t mcpdg) {fMCPDG = mcpdg; } | |
148 | void SetMCMotherPdg(Int_t pdg) { fMCMotherPdg = pdg; } | |
149 | void SetMCSignal() { fMCSignal = kTRUE; } | |
150 | void SetMCSource(Int_t mcsource) { fMCSource = mcsource; } | |
151 | void SetMCProdVtx(Double_t vx, Double_t vy, Double_t vz){ | |
152 | fMCProdVtx[0] = vx; | |
153 | fMCProdVtx[1] = vy; | |
154 | fMCProdVtx[2] = vz; | |
155 | } | |
156 | ||
157 | void SetDCA(Float_t dcaR, Float_t dcaZ){ | |
158 | fDCA[0] = dcaR; | |
159 | fDCA[1] = dcaZ; | |
160 | } | |
161 | ||
162 | void SetITSnclusters(int ncls) { fNclustersITS = ncls; } | |
163 | void SetTPCnclusters(int ncls) { fNclustersTPC = ncls; } | |
164 | void SetTRDnclusters(int ncls) { fNclustersTRD = ncls; } | |
165 | void SetITScluster(UInt_t ly){ | |
166 | if(ly > 5) return; | |
167 | fITSclusterMap.SetBitNumber(ly); | |
168 | } | |
169 | void SetITSstatus(UInt_t ly){ | |
170 | if(ly > 5) return; | |
171 | fITSstatusMap.SetBitNumber(ly); | |
172 | } | |
173 | void SetTPCnclustersPID(Int_t ncls) { fNclustersTPCPID = static_cast<UChar_t>(ncls); } | |
174 | void SetTPCnclustersAll(Int_t ncls) { fNclustersTPCAll = static_cast<UChar_t>(ncls); } | |
175 | void SetTPCcrossedRows(int nrows) { fTPCcrossedRows = static_cast<UChar_t>(nrows); } | |
176 | void SetTPCsharedClusters(Int_t ncls) { fTPCsharedClusters = static_cast<UChar_t>(ncls); } | |
177 | void SetTPCclusterRatio(Float_t ratio) { fTPCclusterRatio = ratio; } | |
178 | void SetTPCclusterRatioAll(Float_t ratio) { fTPCclusterRatioAll = ratio; } | |
179 | void SetTRDntrackletsPID(Int_t ntracklets) { fTRDtrackletsPID = static_cast<UChar_t>(ntracklets); } | |
180 | void SetTRDnslices(Int_t nslices) { fTRDnslices = static_cast<UChar_t>(nslices); } | |
181 | void SetTRDstatus(Int_t layer) { | |
182 | if(layer > 5) return; | |
183 | fTRDlayer.SetBitNumber(static_cast<UInt_t>(layer)); | |
184 | } | |
185 | void SetTRDchi2(Float_t chi2) { fTRDchi2 = chi2; } | |
186 | ||
187 | void SetTPCdEdx(Double_t dEdx) { fTPCdEdx = dEdx; } | |
188 | void SetTPCdEdxCorrected(Double_t dEdx) { fTPCdEdxCorrected = dEdx; } | |
189 | void SetTPCsigmaEl(Double_t sigma) { fTPCsigmaEl = sigma; } | |
190 | void SetTPCsigmaElCorrected(Double_t sigma) { fTPCsigmaElCorrected = sigma; } | |
191 | void SetTOFsigmaEl(Double_t sigma) { fTOFsigmaEl = sigma; } | |
192 | void SetTOFmismatchProbability(Float_t mismatchProb) { fTOFmismatchProb = mismatchProb; } | |
193 | void SetEMCALEoverP(Double_t eop) { fEoverP = eop; } | |
194 | void SetEMCALSigmaEl(Double_t sigma) { fEMCALsigmaEl = sigma; } | |
195 | void SetEMCALShowerShape(Double_t showershape[4]){ | |
196 | for(Int_t is = 0; is < 4; is++) fShowerShape[is] = showershape[is]; | |
197 | } | |
198 | void SetV0PID(AliHFEreducedTrack::EV0PID_t v0pid) { fV0PID = v0pid; } | |
199 | ||
200 | private: | |
201 | typedef enum{ | |
202 | kITSrefit = 0, | |
203 | kTPCrefit = 1, | |
204 | kTOFpid = 2, | |
205 | kTOFmismatch = 3, | |
206 | kEMCALpid =4, | |
207 | kDoubleCounted = 5, | |
208 | kKink = 6 | |
209 | } TrackStatus_t; | |
210 | Double_t fSignedPt; // signed pt | |
211 | Double_t fP; // p | |
212 | Double_t fEta; // eta | |
213 | Double_t fPhi; // phi | |
214 | Double_t fTPCmomentum; // TPC p | |
215 | TBits fFilterBit; // filterbit | |
216 | Int_t fTrackID; // trackID | |
217 | Double_t fMCSignedPt; // MCSignedPt | |
218 | Double_t fMCP; // MCP | |
219 | Double_t fMCEta; // MCEta | |
220 | Double_t fMCPhi; // MCPhi | |
221 | Int_t fMCPDG; // MCPDG | |
222 | Int_t fMCMotherPdg; // MCMP | |
223 | Bool_t fMCSignal; // MCSignal | |
224 | Int_t fMCSource; // MCSource | |
225 | Double_t fMCProdVtx[3]; // MC prod Vtx | |
226 | TBits fTrackStatus; // Track Status | |
227 | UChar_t fNclustersITS; // ITS nb cls | |
228 | UChar_t fNclustersTPC; // TPC nb cls | |
229 | UChar_t fNclustersTRD; // TRD nb cls | |
230 | TBits fITSclusterMap; // ITS maps | |
231 | TBits fITSstatusMap; // ITS status map | |
232 | UChar_t fNclustersTPCPID; // TPC PID nb cls | |
233 | UChar_t fNclustersTPCAll; // TPC all nb cls | |
234 | UChar_t fTPCcrossedRows; // TPC crossed rows | |
235 | UChar_t fTPCsharedClusters; // TPC shared clusters | |
236 | Float_t fTPCclusterRatio; // TPC cls ratio | |
237 | Float_t fTPCclusterRatioAll; // TPC cls ratio all | |
238 | UChar_t fTRDtrackletsPID; // TRD tracklet PID | |
239 | UChar_t fTRDnslices; // TRD nslices | |
240 | TBits fTRDlayer; // TRD layer | |
241 | Float_t fTRDchi2; // TRD chi2 | |
242 | Double_t fTPCdEdx; // TPC dedx | |
243 | Double_t fTPCdEdxCorrected; // TPC dedx corrected | |
244 | Double_t fTPCsigmaEl; // TPC sigma el | |
245 | Double_t fTPCsigmaElCorrected; // TPC sigma el corrected | |
246 | Double_t fTOFsigmaEl; // TOF sigma el | |
247 | Float_t fTOFmismatchProb; // TOF mismatch prob | |
248 | Double_t fEoverP; // Eoverp | |
249 | Double_t fEMCALsigmaEl; // EMCAl sigmal el | |
250 | Double_t fShowerShape[4]; // showershape | |
251 | Float_t fDCA[2]; // dca | |
252 | EV0PID_t fV0PID; // V0pid | |
253 | ||
254 | ClassDef(AliHFEreducedTrack, 1) | |
255 | }; | |
256 | #endif |