]>
Commit | Line | Data |
---|---|---|
2895972e | 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 | //////////////////////////////////////////////////////////////////////////////// | |
17 | // | |
18 | // This class contains all code which is used to compute any of the values | |
19 | // which can be of interest within a resonance analysis. Besides the obvious | |
20 | // invariant mass, it allows to compute other utility values on all possible | |
21 | // targets, in order to allow a wide spectrum of binning and checks. | |
22 | // When needed, this object can also define a binning in the variable which | |
23 | // it is required to compute, which is used for initializing axes of output | |
24 | // histograms (see AliRsnFunction). | |
25 | // The value computation requires this object to be passed the object whose | |
26 | // informations will be used. This object can be of any allowed input type | |
27 | // (track, Daughter, event), then this class must inherit from AliRsnTarget. | |
28 | // Then, when value computation is attempted, a check on target type is done | |
29 | // and computation is successful only if expected target matches that of the | |
30 | // passed object. | |
31 | // In some cases, the value computation can require a support external object, | |
32 | // which must then be passed to this class. It can be of any type inheriting | |
33 | // from TObject. | |
34 | // | |
35 | // authors: A. Pulvirenti (alberto.pulvirenti@ct.infn.it) | |
36 | // M. Vala (martin.vala@cern.ch) | |
37 | // | |
38 | //////////////////////////////////////////////////////////////////////////////// | |
39 | ||
b63357a0 | 40 | #include <Riostream.h> |
2895972e | 41 | #include "AliVVertex.h" |
42 | #include "AliMultiplicity.h" | |
43 | #include "AliESDtrackCuts.h" | |
44 | #include "AliESDpid.h" | |
45 | #include "AliAODPid.h" | |
46 | #include "AliCentrality.h" | |
47 | #include "AliESDUtils.h" | |
b63357a0 | 48 | #include "AliPIDResponse.h" |
2895972e | 49 | |
50 | #include "AliRsnEvent.h" | |
51 | #include "AliRsnDaughter.h" | |
52 | #include "AliRsnMother.h" | |
53 | #include "AliRsnDaughterDef.h" | |
54 | #include "AliRsnDaughterDef.h" | |
55 | ||
56 | #include "AliRsnValueDaughter.h" | |
57 | ||
58 | ClassImp(AliRsnValueDaughter) | |
59 | ||
60 | //_____________________________________________________________________________ | |
61 | AliRsnValueDaughter::AliRsnValueDaughter(const char *name, EType type) : | |
62 | AliRsnValue(name, AliRsnTarget::kDaughter), | |
63 | fType(type) | |
64 | { | |
65 | // | |
66 | // Constructor | |
67 | // | |
68 | } | |
69 | ||
70 | //_____________________________________________________________________________ | |
61f275d1 | 71 | AliRsnValueDaughter::AliRsnValueDaughter(const AliRsnValueDaughter ©) : |
2895972e | 72 | AliRsnValue(copy), |
73 | fType(copy.fType) | |
74 | { | |
75 | // | |
76 | // Copy constructor | |
77 | // | |
78 | } | |
79 | ||
80 | //_____________________________________________________________________________ | |
61f275d1 | 81 | AliRsnValueDaughter &AliRsnValueDaughter::operator=(const AliRsnValueDaughter ©) |
2895972e | 82 | { |
83 | // | |
84 | // Assignment operator. | |
85 | // Works like copy constructor. | |
86 | // | |
87 | ||
88 | AliRsnValue::operator=(copy); | |
e6f3a909 | 89 | if (this == ©) |
61f275d1 | 90 | return *this; |
2895972e | 91 | fType = copy.fType; |
61f275d1 | 92 | |
2895972e | 93 | return (*this); |
94 | } | |
95 | ||
96 | //_____________________________________________________________________________ | |
61f275d1 | 97 | const char *AliRsnValueDaughter::GetTypeName() const |
2895972e | 98 | { |
99 | // | |
100 | // This method returns a string to give a name to each possible | |
101 | // computation value. | |
102 | // | |
103 | ||
104 | switch (fType) { | |
92932daf | 105 | case kP: return "SingleTrackPtot"; |
106 | case kPt: return "SingleTrackPt"; | |
107 | case kPtpc: return "SingleTrackPtpc"; | |
108 | case kEta: return "SingleTrackEta"; | |
109 | case kMass: return "SingleTrackMass"; | |
110 | case kITSsignal: return "SingleTrackITSsignal"; | |
111 | case kTPCsignal: return "SingleTrackTPCsignal"; | |
112 | case kTOFsignal: return "SingleTrackTOFsignal"; | |
113 | case kTPCnsigmaPi: return "SingleTrackTPCnsigmaPion"; | |
114 | case kTPCnsigmaK: return "SingleTrackTPCnsigmaKaon"; | |
115 | case kTPCnsigmaP: return "SingleTrackTPCnsigmaProton"; | |
116 | case kTOFnsigmaPi: return "SingleTrackTOFnsigmaPion"; | |
117 | case kTOFnsigmaK: return "SingleTrackTOFnsigmaKaon"; | |
118 | case kTOFnsigmaP: return "SingleTrackTOFnsigmaProton"; | |
e1fec9d4 | 119 | case kTOFdeltaPi: return "SingleTrackTOFdeltaPion"; |
120 | case kTOFdeltaK: return "SingleTrackTOFdeltaKaon"; | |
121 | case kTOFdeltaP: return "SingleTrackTOFdeltaProton"; | |
122 | case kNITSclusters: return "SingleTrackNITSclusters"; | |
123 | case kNTPCclusters: return "SingleTrackNTPCclusters"; | |
124 | case kNTPCcrossedRows: return "SingleTrackNTPCcrossedRows"; | |
125 | case kNTPCcrossedRowsFclusters: return "SingleTrackNTPCcrossedRowsFclusters"; | |
126 | case kITSchi2: return "SingleTrackITSchi2"; | |
127 | case kTPCchi2: return "SingleTrackTPCchi2"; | |
128 | case kDCAXY: return "SingleTrackDCAz"; | |
129 | case kDCAZ: return "SingleTrackDCAz"; | |
1f47c0ae | 130 | case kCharge: return "SingleTrackCharge"; |
131 | case kPhi: return "SingleTrackPhi"; | |
132 | case kPhiOuterTPC: return "SingleTrackPhiOuterTPC"; | |
92932daf | 133 | case kV0DCA: return "V0DCAToPrimaryVertex"; |
134 | case kDaughterDCA: return "V0DaughterDCA"; | |
135 | case kCosPointAng: return "V0CosineOfPointingAngle"; | |
136 | case kLambdaProtonPIDCut: return "V0LambdaProtonNsigma"; | |
137 | case kAntiLambdaAntiProtonPIDCut: return "V0AntiLambdaAntiProtonNsigma"; | |
138 | case kLambdaPionPIDCut: return "V0LambdaPionNsigma"; | |
139 | case kAntiLambdaAntiPionPIDCut: return "V0AntiLambdaPionNsigma"; | |
140 | default: return "Undefined"; | |
2895972e | 141 | } |
142 | } | |
143 | ||
144 | //_____________________________________________________________________________ | |
145 | Bool_t AliRsnValueDaughter::Eval(TObject *object) | |
146 | { | |
147 | // | |
148 | // Evaluation of the required value. | |
149 | // Checks that the passed object is of the right type | |
150 | // and if this check is successful, computes the required value. | |
151 | // The output of the function tells if computing was successful, | |
152 | // and the values must be taken with GetValue(). | |
153 | // | |
61f275d1 | 154 | |
155 | // coherence check, which also casts object | |
2895972e | 156 | // to AliRsnTarget data members and returns kFALSE |
157 | // in case the object is NULL | |
158 | if (!TargetOK(object)) return kFALSE; | |
159 | ||
160 | // set a reference to the mother momentum | |
b63357a0 | 161 | AliVParticle *ref = fDaughter->GetRef(); |
162 | AliVParticle *refMC = fDaughter->GetRefMC(); | |
2895972e | 163 | AliVTrack *track = fDaughter->Ref2Vtrack(); |
92932daf | 164 | AliESDv0 *v0esd = fDaughter->Ref2ESDv0(); |
165 | AliAODv0 *v0aod = fDaughter->Ref2AODv0(); | |
166 | AliESDEvent *lESDEvent = fEvent->GetRefESD(); | |
167 | ||
bb5fd8a1 | 168 | Double_t xPrimaryVertex = -999.9; |
169 | Double_t yPrimaryVertex = -999.9; | |
170 | Double_t zPrimaryVertex = -999.9; | |
171 | ||
172 | if(lESDEvent){ | |
173 | ||
174 | xPrimaryVertex = lESDEvent->GetPrimaryVertex()->GetX(); | |
175 | yPrimaryVertex = lESDEvent->GetPrimaryVertex()->GetY(); | |
176 | zPrimaryVertex = lESDEvent->GetPrimaryVertex()->GetZ(); | |
177 | ||
178 | } | |
92932daf | 179 | |
b63357a0 | 180 | if (fUseMCInfo && !refMC) { |
181 | AliError("No MC"); | |
182 | return kFALSE; | |
183 | } | |
184 | if (!fUseMCInfo && !ref) { | |
185 | AliError("No DATA"); | |
186 | return kFALSE; | |
187 | } | |
61f275d1 | 188 | |
2895972e | 189 | // compute value depending on types in the enumeration |
190 | // if the type does not match any available choice, or if | |
191 | // the computation is not doable due to any problem | |
192 | // (not initialized support object, wrong values, risk of floating point errors) | |
193 | // the method returng kFALSE and sets the computed value to a meaningless number | |
194 | switch (fType) { | |
e1fec9d4 | 195 | case kP: |
196 | fComputedValue = (fUseMCInfo ? refMC->P() : ref->P()); | |
197 | return kTRUE; | |
198 | ||
199 | case kPt: | |
200 | fComputedValue = (fUseMCInfo ? refMC->Pt() : ref->Pt()); | |
201 | return kTRUE; | |
202 | ||
203 | case kEta: | |
204 | fComputedValue = (fUseMCInfo ? refMC->Eta() : ref->Eta()); | |
205 | return kTRUE; | |
206 | ||
207 | case kMass: | |
208 | fComputedValue = (fUseMCInfo ? refMC->M() : ref->M()); | |
209 | return kTRUE; | |
210 | ||
211 | case kPtpc: | |
212 | if (track) { | |
213 | fComputedValue = track->GetTPCmomentum(); | |
214 | return kTRUE; | |
215 | } else { | |
216 | AliWarning("Cannot get TPC momentum for non-track object"); | |
217 | fComputedValue = 0.0; | |
218 | return kFALSE; | |
219 | } | |
220 | ||
221 | case kITSsignal: | |
222 | if (track) { | |
223 | fComputedValue = track->GetITSsignal(); | |
224 | return kTRUE; | |
225 | } else { | |
226 | AliWarning("Cannot get ITS signal for non-track object"); | |
227 | fComputedValue = 0.0; | |
228 | return kFALSE; | |
229 | } | |
230 | ||
231 | case kTPCsignal: | |
232 | if (track) { | |
233 | fComputedValue = track->GetTPCsignal(); | |
234 | return kTRUE; | |
235 | } else { | |
236 | AliWarning("Cannot get TPC signal for non-track object"); | |
237 | fComputedValue = 0.0; | |
238 | return kFALSE; | |
239 | } | |
240 | ||
241 | case kTOFsignal: | |
242 | if (track) { | |
243 | fComputedValue = track->GetTOFsignal(); | |
244 | return kTRUE; | |
245 | } else { | |
246 | AliWarning("Cannot get TOF signal for non-track object"); | |
247 | fComputedValue = 0.0; | |
248 | return kFALSE; | |
249 | } | |
250 | ||
251 | case kTPCnsigmaPi: | |
252 | if (track) { | |
253 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
254 | fComputedValue = pid->NumberOfSigmasTPC(track, AliPID::kPion); | |
255 | return kTRUE; | |
256 | } else { | |
257 | AliWarning("Cannot get TOF signal for non-track object"); | |
258 | fComputedValue = 0.0; | |
259 | return kFALSE; | |
260 | } | |
261 | ||
262 | case kTPCnsigmaK: | |
263 | if (track) { | |
264 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
265 | fComputedValue = pid->NumberOfSigmasTPC(track, AliPID::kKaon); | |
266 | return kTRUE; | |
267 | } else { | |
268 | AliWarning("Cannot get TOF signal for non-track object"); | |
269 | fComputedValue = 0.0; | |
270 | return kFALSE; | |
271 | } | |
272 | ||
273 | case kTPCnsigmaP: | |
274 | if (track) { | |
275 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
276 | fComputedValue = pid->NumberOfSigmasTPC(track, AliPID::kProton); | |
277 | return kTRUE; | |
278 | } else { | |
279 | AliWarning("Cannot get TOF signal for non-track object"); | |
280 | fComputedValue = 0.0; | |
281 | return kFALSE; | |
282 | } | |
283 | ||
284 | case kTOFnsigmaPi: | |
285 | if (track) { | |
286 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
287 | fComputedValue = pid->NumberOfSigmasTOF(track, AliPID::kPion); | |
288 | return kTRUE; | |
289 | } else { | |
290 | AliWarning("Cannot get TOF signal for non-track object"); | |
291 | fComputedValue = 0.0; | |
292 | return kFALSE; | |
293 | } | |
294 | ||
295 | case kTOFnsigmaK: | |
296 | if (track) { | |
297 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
298 | fComputedValue = pid->NumberOfSigmasTOF(track, AliPID::kKaon); | |
299 | return kTRUE; | |
300 | } else { | |
301 | AliWarning("Cannot get TOF signal for non-track object"); | |
302 | fComputedValue = 0.0; | |
303 | return kFALSE; | |
304 | } | |
305 | ||
306 | case kTOFnsigmaP: | |
307 | if (track) { | |
308 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
309 | fComputedValue = pid->NumberOfSigmasTOF(track, AliPID::kProton); | |
310 | return kTRUE; | |
311 | } else { | |
312 | AliWarning("Cannot get TOF signal for non-track object"); | |
313 | fComputedValue = 0.0; | |
314 | return kFALSE; | |
315 | } | |
316 | ||
317 | case kTOFdeltaPi: | |
318 | if (track) { | |
319 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
320 | pid->GetSignalDelta(AliPIDResponse::kTOF, track, AliPID::kPion, fComputedValue, kFALSE);//(==AliPIDResponse::kDetPidOk); | |
321 | return kTRUE; | |
322 | } else { | |
323 | AliWarning("Cannot get TOF delta for non-track object"); | |
324 | fComputedValue = 0.0; | |
325 | return kFALSE; | |
326 | } | |
327 | ||
328 | case kTOFdeltaK: | |
329 | if (track) { | |
330 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
331 | pid->GetSignalDelta(AliPIDResponse::kTOF, track, AliPID::kKaon, fComputedValue, kFALSE);//(==AliPIDResponse::kDetPidOk); | |
332 | return kTRUE; | |
333 | } else { | |
334 | AliWarning("Cannot get TOF delta for non-track object"); | |
335 | fComputedValue = 0.0; | |
336 | return kFALSE; | |
337 | } | |
338 | ||
339 | case kTOFdeltaP: | |
340 | if (track) { | |
341 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
342 | pid->GetSignalDelta(AliPIDResponse::kTOF, track, AliPID::kProton, fComputedValue, kFALSE);//(==AliPIDResponse::kDetPidOk); | |
343 | return kTRUE; | |
344 | } else { | |
345 | AliWarning("Cannot get TOF delta for non-track object"); | |
346 | fComputedValue = 0.0; | |
347 | return kFALSE; | |
348 | } | |
1f47c0ae | 349 | |
e1fec9d4 | 350 | case kNITSclusters: |
351 | if (track) { | |
352 | AliESDtrack *trackESD = dynamic_cast<AliESDtrack *>(track); | |
353 | if (trackESD) { | |
354 | fComputedValue = trackESD->GetITSclusters(0); | |
355 | } else { | |
356 | fComputedValue = ((AliAODTrack *)track)->GetITSNcls(); | |
357 | } | |
358 | return kTRUE; | |
359 | } else { | |
360 | AliWarning("Cannot get n ITS clusters for non-track object"); | |
361 | fComputedValue = 0.0; | |
362 | return kFALSE; | |
363 | } | |
364 | ||
365 | case kNTPCclusters: | |
366 | if (track) { | |
367 | AliESDtrack *trackESD = dynamic_cast<AliESDtrack *>(track); | |
368 | if (trackESD) { | |
369 | fComputedValue = trackESD->GetTPCclusters(0); | |
370 | } else { | |
371 | fComputedValue = ((AliAODTrack *)track)->GetTPCNcls(); | |
372 | } | |
373 | return kTRUE; | |
374 | } else { | |
375 | AliWarning("Cannot get n TPC clusters for non-track object"); | |
376 | fComputedValue = 0.0; | |
377 | return kFALSE; | |
378 | } | |
379 | ||
380 | case kNTPCcrossedRows: | |
381 | if (track) { | |
382 | AliESDtrack *trackESD = dynamic_cast<AliESDtrack *>(track); | |
383 | if (trackESD) { | |
384 | fComputedValue = trackESD->GetTPCCrossedRows(); | |
385 | } else { | |
386 | fComputedValue = ((AliAODTrack *)track)->GetTPCNCrossedRows(); | |
387 | } | |
388 | return kTRUE; | |
389 | } else { | |
390 | AliWarning("Cannot get n TPC crossed rows for non-track object"); | |
391 | fComputedValue = 0.0; | |
392 | return kFALSE; | |
393 | } | |
394 | ||
395 | case kNTPCcrossedRowsFclusters: | |
396 | if (track) { | |
397 | AliESDtrack *trackESD = dynamic_cast<AliESDtrack *>(track); | |
398 | fComputedValue = 1.0; | |
399 | if (trackESD) { | |
400 | if (trackESD->GetTPCNclsF()>0) fComputedValue = trackESD->GetTPCCrossedRows() / trackESD->GetTPCNclsF(); | |
401 | } else { | |
402 | Float_t nCrossedRows = ((AliAODTrack*) track)->GetTPCNCrossedRows(); | |
403 | Float_t nFcls = ((AliAODTrack*) track)->GetTPCNclsF(); | |
404 | if (nFcls>0) fComputedValue = nCrossedRows / nFcls; | |
405 | } | |
406 | return kTRUE; | |
407 | } else { | |
408 | AliWarning("Cannot get n TPC crossed rows/findable clusters for non-track object"); | |
409 | fComputedValue = 0.0; | |
410 | return kFALSE; | |
411 | } | |
412 | ||
413 | case kITSchi2: | |
414 | if (track) { | |
415 | AliESDtrack *trackESD = dynamic_cast<AliESDtrack *>(track); | |
416 | if (trackESD) { | |
417 | UShort_t nClustersITS = trackESD->GetITSclusters(0); | |
418 | fComputedValue = trackESD->GetITSchi2()/Float_t(nClustersITS); | |
419 | } else { | |
420 | fComputedValue = ((AliAODTrack *)track)->Chi2perNDF(); | |
421 | } | |
422 | return kTRUE; | |
423 | } else { | |
424 | AliWarning("Cannot get ITS chi^2 for non-track object"); | |
425 | fComputedValue = 0.0; | |
426 | return kFALSE; | |
427 | } | |
428 | case kTPCchi2: | |
429 | if (track) { | |
430 | AliESDtrack *trackESD = dynamic_cast<AliESDtrack *>(track); | |
431 | if (trackESD) { | |
432 | UShort_t nClustersTPC = trackESD->GetTPCclusters(0); | |
433 | fComputedValue = trackESD->GetTPCchi2()/Float_t(nClustersTPC); | |
434 | } else { | |
435 | fComputedValue = ((AliAODTrack *)track)->Chi2perNDF(); | |
436 | } | |
437 | return kTRUE; | |
438 | } else { | |
439 | AliWarning("Cannot get TPC chi^2 for non-track object"); | |
440 | fComputedValue = 0.0; | |
441 | return kFALSE; | |
442 | } | |
443 | case kDCAXY: | |
444 | if (track) { | |
445 | AliESDtrack *trackESD = dynamic_cast<AliESDtrack *>(track); | |
446 | if (trackESD) { | |
447 | Float_t b[2], bCov[3]; | |
448 | trackESD->GetImpactParameters(b, bCov); | |
449 | fComputedValue = b[0]; | |
450 | } else { | |
451 | Double_t b[2]= {-999,-999}, cov[3]; | |
452 | AliAODVertex *vertex = fEvent->GetRefAOD()->GetPrimaryVertex(); | |
453 | if(vertex) { | |
454 | track->PropagateToDCA(vertex, fEvent->GetRefAOD()->GetMagneticField(),kVeryBig, b, cov); | |
455 | fComputedValue = b[0]; | |
456 | } else { | |
457 | fComputedValue = -999; | |
92932daf | 458 | } |
e1fec9d4 | 459 | } |
460 | return kTRUE; | |
461 | } else { | |
462 | AliWarning("Cannot get TPC chi^2 for non-track object"); | |
463 | fComputedValue = 0.0; | |
464 | return kFALSE; | |
465 | } | |
466 | case kDCAZ: | |
467 | if (track) { | |
468 | AliESDtrack *trackESD = dynamic_cast<AliESDtrack *>(track); | |
469 | if (trackESD) { | |
470 | Float_t b[2], bCov[3]; | |
471 | trackESD->GetImpactParameters(b, bCov); | |
472 | fComputedValue = b[1]; | |
473 | } else { | |
474 | Double_t b[2]= {-999,-999}, cov[3]; | |
475 | AliAODVertex *vertex = fEvent->GetRefAOD()->GetPrimaryVertex(); | |
476 | if(vertex) { | |
477 | track->PropagateToDCA(vertex, fEvent->GetRefAOD()->GetMagneticField(),kVeryBig, b, cov); | |
478 | fComputedValue = b[1]; | |
479 | } else { | |
480 | fComputedValue = -999; | |
92932daf | 481 | } |
e1fec9d4 | 482 | |
483 | } | |
484 | return kTRUE; | |
485 | } else { | |
486 | AliWarning("Cannot get TPC chi^2 for non-track object"); | |
487 | fComputedValue = 0.0; | |
488 | return kFALSE; | |
489 | } | |
490 | ||
491 | case kCharge: | |
492 | fComputedValue = (fUseMCInfo ? refMC->Charge() : ref->Charge()); | |
493 | return kTRUE; | |
494 | ||
495 | case kPhi: | |
496 | fComputedValue = (fUseMCInfo ? (refMC->Phi()*TMath::RadToDeg()) : (ref->Phi()*TMath::RadToDeg())); | |
497 | return kTRUE; | |
498 | ||
499 | case kPhiOuterTPC: | |
500 | if (track) { | |
501 | Double_t pos[3]={0.,0.,0.}; | |
502 | Double_t phiOut = -999.0; | |
503 | Double_t radius = 278.;//TPC outer (vessel) = 278 cm, TOF radius (active surf.) = 378 cm; ref. PPR.1 | |
504 | AliExternalTrackParam etp; //thanks to Andrea and Cristina | |
505 | etp.CopyFromVTrack(track); | |
506 | if(etp.GetXYZAt(radius, 5., pos)){ | |
507 | phiOut=TMath::ATan2(pos[1],pos[0])*TMath::RadToDeg(); | |
508 | if (phiOut<0) phiOut+= (2*TMath::Pi()*TMath::RadToDeg()); | |
509 | } | |
510 | fComputedValue = phiOut; | |
511 | } else { | |
512 | AliWarning("Cannot get phi at outer TPC radius for non-track object"); | |
513 | fComputedValue = -99.0; | |
514 | return kFALSE; | |
515 | } | |
516 | return kTRUE; | |
517 | ||
518 | case kV0DCA: | |
519 | if(v0esd) { | |
520 | AliESDv0 *v0ESD = dynamic_cast<AliESDv0 *>(v0esd); | |
521 | fComputedValue = v0ESD->GetD(xPrimaryVertex,yPrimaryVertex,zPrimaryVertex); | |
522 | return kTRUE; | |
523 | } | |
524 | if(v0aod) { | |
525 | AliAODv0 *v0AOD = dynamic_cast<AliAODv0 *>(v0aod); | |
526 | fComputedValue = v0AOD->DcaV0ToPrimVertex(); | |
527 | return kTRUE; | |
528 | } | |
529 | else { | |
530 | fComputedValue = -999; | |
531 | return kFALSE; | |
532 | } | |
533 | ||
534 | case kDaughterDCA: | |
535 | if(v0esd) { | |
536 | AliESDv0 *v0ESD = dynamic_cast<AliESDv0 *>(v0esd); | |
537 | fComputedValue = v0ESD->GetDcaV0Daughters(); | |
538 | return kTRUE; | |
539 | } | |
540 | if(v0aod) { | |
541 | AliAODv0 *v0AOD = dynamic_cast<AliAODv0 *>(v0aod); | |
542 | fComputedValue = v0AOD->DcaV0Daughters(); | |
543 | return kTRUE; | |
544 | } | |
545 | else { | |
546 | fComputedValue = -999; | |
547 | return kFALSE; | |
548 | } | |
549 | ||
550 | case kCosPointAng: | |
551 | if(v0esd) { | |
552 | AliESDv0 *v0ESD = dynamic_cast<AliESDv0 *>(v0esd); | |
553 | fComputedValue = v0ESD->GetV0CosineOfPointingAngle(); | |
554 | return kTRUE; | |
555 | } | |
556 | if(v0aod) { | |
557 | AliAODv0 *v0AOD = dynamic_cast<AliAODv0 *>(v0aod); | |
558 | fComputedValue = TMath::Cos(v0AOD->OpenAngleV0()); | |
559 | return kTRUE; | |
560 | } | |
561 | else { | |
562 | fComputedValue = -999; | |
563 | return kFALSE; | |
564 | } | |
565 | ||
566 | case kLambdaProtonPIDCut: | |
567 | if(v0esd && lESDEvent) { | |
568 | AliESDv0 *v0ESD = dynamic_cast<AliESDv0 *>(v0esd); | |
569 | // retrieve the V0 daughters | |
570 | UInt_t lIdxPos = (UInt_t) TMath::Abs(v0ESD->GetPindex()); | |
571 | AliESDtrack *pTrack = lESDEvent->GetTrack(lIdxPos); | |
572 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
573 | fComputedValue = TMath::Abs(pid->NumberOfSigmasTPC(pTrack, AliPID::kProton)); | |
574 | return kTRUE; | |
575 | } | |
576 | if(v0aod) { | |
577 | AliAODv0 *v0AOD = dynamic_cast<AliAODv0 *>(v0aod); | |
578 | AliAODTrack *pTrack = (AliAODTrack *) (v0AOD->GetSecondaryVtx()->GetDaughter(0)); | |
579 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
580 | fComputedValue = TMath::Abs(pid->NumberOfSigmasTPC(pTrack, AliPID::kProton)); | |
581 | return kTRUE; | |
582 | } | |
583 | else { | |
584 | fComputedValue = -999; | |
585 | return kFALSE; | |
586 | } | |
587 | ||
588 | case kAntiLambdaAntiProtonPIDCut: | |
589 | if(v0esd && lESDEvent) { | |
590 | AliESDv0 *v0ESD = dynamic_cast<AliESDv0 *>(v0esd); | |
591 | // retrieve the V0 daughters | |
592 | UInt_t lIdxNeg = (UInt_t) TMath::Abs(v0ESD->GetNindex()); | |
593 | AliESDtrack *nTrack = lESDEvent->GetTrack(lIdxNeg); | |
594 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
595 | fComputedValue = TMath::Abs(pid->NumberOfSigmasTPC(nTrack, AliPID::kProton)); | |
596 | return kTRUE; | |
597 | } | |
598 | if(v0aod) { | |
599 | AliAODv0 *v0AOD = dynamic_cast<AliAODv0 *>(v0aod); | |
600 | AliAODTrack *nTrack = (AliAODTrack *) (v0AOD->GetSecondaryVtx()->GetDaughter(1)); | |
601 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
602 | fComputedValue = TMath::Abs(pid->NumberOfSigmasTPC(nTrack, AliPID::kProton)); | |
603 | return kTRUE; | |
604 | } | |
605 | else { | |
606 | fComputedValue = -999; | |
607 | return kFALSE; | |
608 | } | |
609 | ||
610 | case kLambdaPionPIDCut: | |
611 | if(v0esd && lESDEvent) { | |
612 | AliESDv0 *v0ESD = dynamic_cast<AliESDv0 *>(v0esd); | |
613 | // retrieve the V0 daughters | |
614 | UInt_t lIdxNeg = (UInt_t) TMath::Abs(v0ESD->GetNindex()); | |
615 | AliESDtrack *nTrack = lESDEvent->GetTrack(lIdxNeg); | |
616 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
617 | fComputedValue = TMath::Abs(pid->NumberOfSigmasTPC(nTrack, AliPID::kPion)); | |
618 | return kTRUE; | |
619 | } | |
620 | if(v0aod) { | |
621 | AliAODv0 *v0AOD = dynamic_cast<AliAODv0 *>(v0aod); | |
622 | AliAODTrack *nTrack = (AliAODTrack *) (v0AOD->GetSecondaryVtx()->GetDaughter(1)); | |
623 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
624 | fComputedValue = TMath::Abs(pid->NumberOfSigmasTPC(nTrack, AliPID::kPion)); | |
625 | return kTRUE; | |
626 | } | |
627 | else { | |
628 | fComputedValue = -999; | |
629 | return kFALSE; | |
630 | } | |
631 | ||
632 | case kAntiLambdaAntiPionPIDCut: | |
633 | if(v0esd && lESDEvent) { | |
634 | AliESDv0 *v0ESD = dynamic_cast<AliESDv0 *>(v0esd); | |
635 | // retrieve the V0 daughters | |
636 | UInt_t lIdxPos = (UInt_t) TMath::Abs(v0ESD->GetPindex()); | |
637 | AliESDtrack *pTrack = lESDEvent->GetTrack(lIdxPos); | |
638 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
639 | fComputedValue = TMath::Abs(pid->NumberOfSigmasTPC(pTrack, AliPID::kPion)); | |
640 | return kTRUE; | |
641 | } | |
642 | if(v0aod) { | |
643 | AliAODv0 *v0AOD = dynamic_cast<AliAODv0 *>(v0aod); | |
644 | AliAODTrack *pTrack = (AliAODTrack *) (v0AOD->GetSecondaryVtx()->GetDaughter(0)); | |
645 | AliPIDResponse *pid = fEvent->GetPIDResponse(); | |
646 | fComputedValue = TMath::Abs(pid->NumberOfSigmasTPC(pTrack, AliPID::kPion)); | |
647 | return kTRUE; | |
648 | } | |
649 | else { | |
650 | fComputedValue = -999; | |
651 | return kFALSE; | |
652 | } | |
653 | ||
654 | default: | |
655 | AliError(Form("[%s] Invalid value type for this computation", GetName())); | |
656 | return kFALSE; | |
2895972e | 657 | } |
658 | } |