Commit for Simone - fix of issues with cuts
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / LambdaK0PbPb / AliAnalysisTaskV0ForRAA.cxx
CommitLineData
aa3d4e29 1/*************************************************************** *
2 * Authors : Simone Schuchmann
3 * Contributors are mentioned in the code where appropriate. *
4 * *
5 * Permission to use, copy, modify and distribute this software and its *
6 * documentation strictly for non-commercial purposes is hereby granted *
7 * without fee, provided that the above copyright notice appears in all *
8 * copies and that both the copyright notice and this permission notice *
9 * appear in the supporting documentation. The authors make no claims *
10 * about the suitability of this software for any purpose. It is *
11 * provided "as is" without express or implied warranty. *
12 **************************************************************************/
13
14//-----------------------------------------------------------------
15// AliAnalysisTaskV0ForRAA class
16// This task is for analysing Lambda and K0s pt spectra in PbPb and
17// pp as well as with MC. The flag for pp and MC must be set
18// accordingly, default is PbPb data.
19// It works with ESD files only.
20//-----------------------------------------------------------------
21
22
23#define AliAnalysisTaskV0ForRAA_cxx
24
25#include "AliAnalysisTaskV0ForRAA.h"
26
27#include "Riostream.h"
28
29#include "TROOT.h"
30#include "TH1.h"
31#include "TH2.h"
5842a526 32#include "TH3.h"//xxx
aa3d4e29 33#include "TLorentzVector.h"
34
35#include "AliAnalysisTaskSE.h"
36#include "AliAnalysisManager.h"
37#include "AliESDInputHandler.h"
38#include "AliMCEventHandler.h"
39
40#include "AliESDVZERO.h"
41#include "AliMultiplicity.h"
42#include "AliCentrality.h"
43
44#include "AliKFParticle.h"
45#include "AliKFVertex.h"
46#include "AliESDtrackCuts.h"
47#include "AliESDpid.h"
48#include "AliESDv0.h"
49#include "AliESDEvent.h"
50#include "AliMCEvent.h"
51#include "AliStack.h"
52#include "AliGenEventHeader.h"
53
54
55ClassImp(AliAnalysisTaskV0ForRAA)
56
57//________________________________________________________________________
76a4d7a7 58AliAnalysisTaskV0ForRAA::AliAnalysisTaskV0ForRAA()
59:AliAnalysisTaskSE("default_AliAnalysisTaskV0ForRAA"),
60 fESD(0),
61 fMCev(0),
62//other objects
63 fESDpid(0),
64 fESDTrackCuts(0),
65 fESDTrackCutsCharged(0),
66 fESDTrackCutsLowPt(0),
67 fOutputContainer(0),
68//event histos
69 fHistITSLayerHits(0),
70 fHistOneHitWithSDD(0),
71 fHistNEvents(0),
72 fHistPrimVtxZESDVSNContributors(0),
73 fHistPrimVtxZESDTPCVSNContributors(0),
74 fHistPrimVtxZESDSPDVSNContributors(0),
75 fHistPrimVtxZESD(0),
76 fHistPrimVtxZESDTPC(0),
77 fHistPrimVtxZESDSPD(0),
78 fHistESDVertexZ(0),
79 fHistMuliplicity(0),
80 fHistMuliplicityRaw(0),
81 fHistCentBinRaw(0),
82 fHistCentBin(0),
83 fHistMultiplicityPrimary(0),
84 fHistNPrim(0),
85 fHistPiPiK0sVsLambdaMass(0),
86 fHistPiPiK0sVsALambdaMass(0),
87 fHistPiPK0sVsLambdaMass(0),
88 fHistPiAPK0sVsALambdaMass(0),
89 fHistPiPALambdaVsLambdaMass(0),
90 fHistPiAPLambdaVsALambdaMass(0),
91//-----------K0 histos -------------------//
92 fHistPiPiMass(0),
93 fHistPiPiMassVSPt(0),
94 fHistPiPiMassVSPtMCTruth(0),
95 fHistPiPiMassVSY(0),
96 fHistPiPiPtVSY(0),
97// fHistPiPiMassVSAlpha(0),
98 fHistPiPiRadiusXY(0),
99 fHistPiPiCosPointAng(0),
100 fHistPiPiDCADaughterPosToPrimVtxVSMass(0),
101 fHistPiPiDecayLengthVsPt(0),
102 fHistPiPiDecayLengthVsMass(0),
103 fHistPiPiDecayLengthVsCtau(0),
104// fHistPiPiMassVSPtK0L(0),
105 fHistPiPiDCADaughters(0),
106// fHistPiPiPtDaughters(0),
107 fHistPiPiDCAVSMass(0),
108 fHistPiPiDCAZPos(0),
109 fHistPiPiDCAZNeg(0),
110 fHistPiPiTrackLengthPosVsMass(0),
111 fHistPiPiTrackLengthNegVsMass(0),
112 fHistPiPiMonitorCuts(0),
113 fHistPiPiMonitorMCCuts(0),
114 fHistPiPiDecayLengthResolution(0),
115 fHistNclsITSPosK0(0),
116 fHistNclsITSNegK0(0),
117 fHistNclsTPCPosK0(0),
118 fHistNclsTPCNegK0(0),
119 fHistChi2PerNclsITSPosK0(0),
120 fHistChi2PerNclsITSNegK0(0),
121 fHistNCRowsTPCPosK0(0),
122 fHistNCRowsTPCNegK0(0),
123 fHistRatioFoundOverFinableTPCK0Pos(0),
124 fHistRatioFoundOverFinableTPCK0Neg(0),
125//------------MC only histos-----------
126 fHistPrimVtxZESDVSNContributorsMC(0),
127 fHistPrimVtxZESDTPCVSNContributorsMC(0),
128 fHistPrimVtxZESDSPDVSNContributorsMC(0),
129 fHistMCVertexZ(0),
130 fHistPiPiPDGCode(0),
131 fHistPiPPDGCode(0),
132 fHistPiAPPDGCode(0),
133//cosine of pointing angle of Xi vs pt histos
134 fHistPiPCosPointAngXiVsPt(0),
135 fHistPiAPCosPointAngXiVsPt(0),
136 fHistPiPMassVSPtSecXiMCTruth(0),
137 fHistPiPMassVSPtSecOmegaMCTruth(0),
138 fHistPiAPMassVSPtSecXiMCTruth(0),
139 fHistPiAPMassVSPtSecOmegaMCTruth(0),
140 // fHistUserPtShift(0),
141// fHistPiPiPhiPosVsPtPosVsMass(0),//xxx
142// fHistPiPPhiPosVsPtPosVsMass(0),//xxx
143//selection booleans and values
144 fMCMode(0),
145 fMCTruthMode(0),
146 fSelectInjected(0),
147 fSelectMBMotherMC(0),
148 fCheckNegLabelReco(0),
149 fOnlyFoundRecoV0(0),
150 fUseCentrality(0),
151 fUseCentralityBin(0),
152 fUseCentralityRange(0),
153 fAnapp(0),
154 fRejectPileUpSPD(0),
155 fSelSDD(0),
156 fSelNoSDD(0),
157 fOntheFly(0),
158 fVertexZCut(0),
159 fVtxStatus(0),
160 fNcr(0),
161 fChi2cls(0),
162 fTPCrefit(0),
163 fNcrCh(0),
164 fChi2clsCh(0),
165 fTPCrefitCh(0),
166 fNcrLpt(0),
167 fChi2clsLpt(0),
168 fTPCrefitLpt(0),
169 fUsePID(0),
170 fUsePIDPion(0),
171 fNSigma(0),
172 fNSigma2(0),
173 fPPIDcut(0),
174 fPtTPCCut(0),
175 fMoreNclsThanRows(0),
176 fMoreNclsThanFindable(0),
177 fMoreNclsThanFindableMax(0),
178 fRatioFoundOverFindable(0),
179 fRatioMaxCRowsOverFindable(0),
180 fChi2PerClusterITS(0),
181 fDistanceTPCInner(0),
182 fMinNCLSITSPos(0),
183 fMinNCLSITSNeg(0),
184 fMaxNCLSITSPos(0),
185 fMaxNCLSITSNeg(0),
186 fSwitchCaseITSCls(0),
187 fCutMITrackLength(0),
188 fCutMICrossedR(0),
189 fCutMITPCncls(0),
190 fCutMITrackLengthLengthF(0),
191 fCutMICrossedRLengthF(0),
192 fRapCutV0(0),
193 fRap(0),
194 fEtaCutMCDaughters(0),
195 fEtaCutMCDaughtersVal(0),
196 fMinPt(0),
197 fAlfaCut(0),
198 fQtCut(0),
199 fQtCutPt(0),
200 fQtCutPtLow(0),
201 fArmCutK0(0),
202 fArmCutL(0),
203 fArmQtSlope(0),
204 fExcludeLambdaFromK0s(0),
205 fExcludeK0sFromLambda(0),
206 fDCAToVertexK0(0),
207 fDCAToVertexL(0),
208 fDCAXK(0),
209 fDCAYK(0),
210 fDCAXL(0),
211 fDCAYL(0),
212 fDCAZ(0),
213 fDCADaughtersL(0),
214 fDCADaughtersAL(0),
215 fDCADaughtersK0(0),
216 fDCADaughtersToVtxLarge(0),
217 fDCADaughtersToVtxSmall(0),
218 fDecayRadXYMin(0),
219 fDecayRadXYMax(0),
220 fCosPointAngL(0),
221 fCosPointAngK(0),
222 fCPAPtCutK0(0),
223 fCPAPtCutL(0),
224 fOpengAngleDaughters(0),
225 fOpAngPtCut(0),
226 fDecayLengthMax(0),
227 fDecayLengthMin(0),
228 fDecRadCutITSMin(0),
229 fDecRadCutITSMax(0),
230 fCtauK0s(0),
231 fCtauL(0),
232 fCtauPtCutK0(0),
233 fCtauPtCutL(0),
234 fChiCutKf(0),
235 fK0sLowMassCut(0),
236 fK0sHighMassCut(0),
237 fLLowMassCut(0),
238 fLHighMassCut(0),
239 fSetFillDetAL(0),
240 fSetPtDepHist(0)
241 // fShift(0),
242 // fDeltaInvP(0)
243{ // Constructor.
244
245 DefineOutput(1,TList::Class());
246
247 // define defaults for globals
248 /*
249 fShift = kFALSE; // shift in charge/pt yes/no
250 fDeltaInvP = 0.00; // shift value
251 */
252
253 fMCMode = kFALSE;
254 fMCTruthMode = kFALSE;
255
256 fUseCentrality = 0;
257 fUseCentralityBin = 0;
258 fUseCentralityRange =0;
259
260 fAnapp = kFALSE;
261 fRejectPileUpSPD = kFALSE;
262 fSelSDD = kFALSE;
263 fSelNoSDD= kFALSE;
264
265 fSelectInjected = kFALSE;
266 fSelectMBMotherMC = kFALSE;
267 fCheckNegLabelReco = kFALSE;
268 fOnlyFoundRecoV0= kFALSE;
269
270 fVertexZCut = 100000.0;
271 fVtxStatus = kFALSE;
272
273 fOntheFly = kTRUE;
274
275 //----- define defaults for V0 and track cuts ----//
276
277
278 fNcr = 70;
279 fChi2cls = 4;
280 fTPCrefit = kTRUE;
281 fNcrCh = 70;
282 fChi2clsCh =4;
283 fTPCrefitCh = kTRUE;
284 fNcrLpt = 70;
285 fChi2clsLpt = 4;
286 fTPCrefitLpt = kTRUE;
287
288
289 fUsePID = kFALSE;
290 fUsePIDPion = kFALSE;
291 fMoreNclsThanRows = kFALSE;
292 fMoreNclsThanFindable = kFALSE;
293 fMoreNclsThanFindableMax = kFALSE;
294 fRatioFoundOverFindable = -1.0;
295 fRatioMaxCRowsOverFindable = 1000.0;
296
297
298 fChi2PerClusterITS = 100000.0;
299 fDistanceTPCInner = -1.0;
300 fMinNCLSITSPos = -1;
301 fMaxNCLSITSPos = 1000;
302 fMinNCLSITSNeg = -1;
303 fMaxNCLSITSNeg = 1000;
304 fSwitchCaseITSCls = kFALSE;
305
306 fCutMITrackLength = kFALSE;
307 fCutMICrossedR = kFALSE;
308 fCutMITPCncls = kFALSE;
309 fCutMITrackLengthLengthF = 1.0;
310 fCutMICrossedRLengthF = 0.85;
311
312 fNSigma = 100000.0;
313 fNSigma2 = 100000.0;
314 fPPIDcut = 100.0;
315 fPtTPCCut = -1.0;
316
317
318 fRapCutV0=kFALSE;
319 fRap=1000.0;
320 fRap=1000.0;
321
322 fAlfaCut= -100.0;
323 fQtCut = -1.0;
324 fQtCutPt = 100.0;
325 fQtCutPtLow = -1.0;
326 fArmCutK0=kFALSE;
327 fArmCutL=kFALSE;
328 fArmQtSlope =0.2;
329 fExcludeLambdaFromK0s = -1.0;
330 fExcludeK0sFromLambda = -1.0;
331
332 fEtaCutMCDaughters = kFALSE;
333 fEtaCutMCDaughtersVal = 50.0;
334
335 fMinPt= -1.0;
336
337 fDCAToVertexK0 = 10000.0;
338 fDCAToVertexL = 10000.0;
339 fDCAXK=10000.0;
340 fDCAYK=10000.0;
341 fDCAXL=10000.0;
342 fDCAYL=10000.0;
343 fDCAZ=10000.0;
344
345 fDCADaughtersL=10000.0;
346 fDCADaughtersAL=10000.0;
347 fDCADaughtersK0=10000.0;
348
349 fDCADaughtersToVtxLarge=-1.0;
350 fDCADaughtersToVtxSmall=-1.0;
351
352 fDecayRadXYMin=-100000.0;
353 fDecayRadXYMax=1000000.0;
354 fDecayLengthMax=100000.0;
355 fDecayLengthMin=-1000000.0;
356
357 fDecRadCutITSMin = 0.0000;
358 fDecRadCutITSMax = 10000.0;
359
360 fCosPointAngL=-1.0;
361 fCosPointAngK=-1.0;
362 fCPAPtCutK0 = 1000.0;
363 fCPAPtCutL =1000.0;
364 fOpengAngleDaughters = -1.0;
365 fOpAngPtCut = -1.0;
366
367 fCtauK0s=10e6;
368 fCtauL=10e6;
369 fCtauPtCutK0=10e6;
370 fCtauPtCutL=10e6;
371
372 fChiCutKf=1000000.0;
373
374 fK0sLowMassCut = 0.25;
375 fK0sHighMassCut = 0.75;
376
377 fLLowMassCut = 1.05;
378 fLHighMassCut = 1.25;
379
380
381 fSetFillDetAL = kFALSE;
382
383 fSetPtDepHist=kFALSE;
384
385 //---- histograms ----//
386 for(Int_t j=0;j<2;j++){
387 fHistArmenteros[j]=NULL;
388 fHistV0RadiusZ[j] =NULL;
389 fHistV0RadiusZVSPt[j] =NULL;
390 fHistV0RadiusXY[j] =NULL;
391 fHistV0RadiusXYVSY[j] =NULL;
392
393 //Lambda
394 fHistPiPMass[j]=NULL;
395 fHistPiPMassVSPt[j]=NULL;
396 fHistPiPMassVSY[j] = NULL;
397 fHistPiPMassVSPtMCTruth[j]=NULL;
398 fHistPiPRadiusXY[j]=NULL;
399 fHistPiPCosPointAng[j]=NULL;
400 fHistPiPDecayLengthVsPt[j]=NULL;
401 fHistPiPDecayLengthVsMass[j]=NULL;
402 fHistPiPDecayLengthVsCtau[j]=NULL;
403 fHistPiPDCADaughterPosToPrimVtxVSMass[j]=NULL;
404 fHistPiPDCADaughterNegToPrimVtxVSMass[j]=NULL;
405 fHistPiPMassVSPtSecSigma[j]=NULL;
406 fHistPiPMassVSPtSecXi[j]=NULL;
407 fHistPiPMassVSPtSecOmega[j]=NULL;
408 fHistPiPMassVSYSecXi[j]=NULL;
409 fHistPiPXi0PtVSLambdaPt[j]=NULL;
410 fHistPiPXiMinusPtVSLambdaPt[j]=NULL;
411 fHistPiPOmegaPtVSLambdaPt[j]=NULL;
412 fHistPiPDCADaughters[j]=NULL;
413 // fHistPiPPtDaughters[j]=NULL;
414 fHistPiPPtVSY[j]=NULL;
415 fHistPiPDCAVSMass[j]=NULL;
416 fHistPiPMonitorCuts[j] =NULL;
417 fHistPiPMonitorMCCuts[j] =NULL;
418 fHistPiPDecayLengthResolution[j] =NULL;
419 // fHistPiPDCAZPos[j] =NULL;
420 //fHistPiPDCAZNeg[j] =NULL;
421 fHistPiPTrackLengthPosVsMass[j] = NULL;
422 fHistPiPTrackLengthNegVsMass[j] = NULL;
423
424 //ALambda
425 fHistPiAPMass[j]=NULL;
426 fHistPiAPMassVSPt[j]=NULL;
427 fHistPiAPMassVSY[j] = NULL;
428 fHistPiAPMassVSPtMCTruth[j]=NULL;
429 fHistPiAPRadiusXY[j]=NULL;
430 fHistPiAPCosPointAng[j]=NULL;
431 fHistPiAPDecayLengthVsPt[j]=NULL;
432 fHistPiAPDecayLengthVsMass[j]=NULL;
433 fHistPiAPDecayLengthVsCtau[j]=NULL;
434 fHistPiAPDCADaughterPosToPrimVtxVSMass[j]=NULL;
435 fHistPiAPDCADaughterNegToPrimVtxVSMass[j]=NULL;
436 fHistPiAPMassVSPtSecSigma[j]=NULL;
437 fHistPiAPMassVSPtSecXi[j]=NULL;
438 fHistPiAPMassVSPtSecOmega[j]=NULL;
439 fHistPiAPMassVSYSecXi[j]=NULL;
440 fHistPiAPXi0PtVSLambdaPt[j]=NULL;
441 fHistPiAPXiMinusPtVSLambdaPt[j]=NULL;
442 fHistPiAPOmegaPtVSLambdaPt[j] =NULL;
443 fHistPiAPDCADaughters[j]=NULL;
444 // fHistPiAPPtDaughters[j]=NULL;
445 fHistPiAPPtVSY[j]=NULL;
446 fHistPiAPDCAVSMass[j]=NULL;
447 fHistPiAPMonitorCuts[j] =NULL;
448 fHistPiAPMonitorMCCuts[j] =NULL;
449 fHistPiAPDecayLengthResolution[j] =NULL;
450 // fHistPiAPDCAZPos[j] =NULL;
451 //fHistPiAPDCAZNeg[j] =NULL;
452 fHistPiAPTrackLengthPosVsMass[j] = NULL;
453 fHistPiAPTrackLengthNegVsMass[j] = NULL;
454
455 //other
456 fHistDedxSecProt[j]=NULL;
457 fHistDedxSecAProt[j]=NULL;
458 fHistDedxSecPiMinus[j]=NULL;
459 fHistDedxSecPiPlus[j]=NULL;
460 fHistDedxProt[j]=NULL;
461 fHistDedxAProt[j]=NULL;
462 fHistDedxPiMinus[j]=NULL;
463 fHistDedxPiPlus[j]=NULL;
464 fHistNclsITS[j]=NULL;
465 fHistNclsTPC[j]=NULL;
466 fHistNclsITSPosL[j]=NULL;
467 fHistNclsITSNegL[j]=NULL;
468 fHistNclsTPCPosL[j]=NULL;
469 fHistNclsTPCNegL[j]=NULL;
470 fHistChi2PerNclsITSPosL[j]=NULL;
471 fHistChi2PerNclsITSNegL[j]=NULL;
472 fHistNCRowsTPCPosL[j]=NULL;
473 fHistNCRowsTPCNegL[j]=NULL;
474 fHistRatioFoundOverFinableTPCLPos[j]=NULL;
475 fHistRatioFoundOverFinableTPCLNeg[j]=NULL;
476 fHistPiPiEtaDMC[j] = NULL;
477 fHistPiPiEtaDReco[j] = NULL;
478 fHistPiPEtaDMC[j] = NULL;
479 fHistPiPEtaDReco[j] = NULL;
480 }
481
482}
483//________________________________________________________________________
aa3d4e29 484AliAnalysisTaskV0ForRAA::AliAnalysisTaskV0ForRAA(const char *name)
485:AliAnalysisTaskSE(name),
486 fESD(0),
487 fMCev(0),
5842a526 488//other objects
aa3d4e29 489 fESDpid(0),
490 fESDTrackCuts(0),
491 fESDTrackCutsCharged(0),
492 fESDTrackCutsLowPt(0),
493 fOutputContainer(0),
5842a526 494//event histos
aa3d4e29 495 fHistITSLayerHits(0),
496 fHistOneHitWithSDD(0),
497 fHistNEvents(0),
498 fHistPrimVtxZESDVSNContributors(0),
499 fHistPrimVtxZESDTPCVSNContributors(0),
500 fHistPrimVtxZESDSPDVSNContributors(0),
aa3d4e29 501 fHistPrimVtxZESD(0),
502 fHistPrimVtxZESDTPC(0),
503 fHistPrimVtxZESDSPD(0),
504 fHistESDVertexZ(0),
aa3d4e29 505 fHistMuliplicity(0),
506 fHistMuliplicityRaw(0),
507 fHistCentBinRaw(0),
508 fHistCentBin(0),
509 fHistMultiplicityPrimary(0),
510 fHistNPrim(0),
5842a526 511 fHistPiPiK0sVsLambdaMass(0),
512 fHistPiPiK0sVsALambdaMass(0),
513 fHistPiPK0sVsLambdaMass(0),
514 fHistPiAPK0sVsALambdaMass(0),
515 fHistPiPALambdaVsLambdaMass(0),
516 fHistPiAPLambdaVsALambdaMass(0),
517//-----------K0 histos -------------------//
518 fHistPiPiMass(0),
519 fHistPiPiMassVSPt(0),
520 fHistPiPiMassVSPtMCTruth(0),
521 fHistPiPiMassVSY(0),
522 fHistPiPiPtVSY(0),
523// fHistPiPiMassVSAlpha(0),
524 fHistPiPiRadiusXY(0),
525 fHistPiPiCosPointAng(0),
526 fHistPiPiDCADaughterPosToPrimVtxVSMass(0),
527 fHistPiPiDecayLengthVsPt(0),
528 fHistPiPiDecayLengthVsMass(0),
529 fHistPiPiDecayLengthVsCtau(0),
530// fHistPiPiMassVSPtK0L(0),
531 fHistPiPiDCADaughters(0),
532// fHistPiPiPtDaughters(0),
533 fHistPiPiDCAVSMass(0),
534 fHistPiPiDCAZPos(0),
535 fHistPiPiDCAZNeg(0),
536 fHistPiPiTrackLengthPosVsMass(0),
537 fHistPiPiTrackLengthNegVsMass(0),
538 fHistPiPiMonitorCuts(0),
539 fHistPiPiMonitorMCCuts(0),
540 fHistPiPiDecayLengthResolution(0),
541 fHistNclsITSPosK0(0),
542 fHistNclsITSNegK0(0),
543 fHistNclsTPCPosK0(0),
544 fHistNclsTPCNegK0(0),
545 fHistChi2PerNclsITSPosK0(0),
546 fHistChi2PerNclsITSNegK0(0),
547 fHistNCRowsTPCPosK0(0),
548 fHistNCRowsTPCNegK0(0),
549 fHistRatioFoundOverFinableTPCK0Pos(0),
550 fHistRatioFoundOverFinableTPCK0Neg(0),
551//------------MC only histos-----------
552 fHistPrimVtxZESDVSNContributorsMC(0),
553 fHistPrimVtxZESDTPCVSNContributorsMC(0),
554 fHistPrimVtxZESDSPDVSNContributorsMC(0),
555 fHistMCVertexZ(0),
aa3d4e29 556 fHistPiPiPDGCode(0),
aa3d4e29 557 fHistPiPPDGCode(0),
5842a526 558 fHistPiAPPDGCode(0),
559//cosine of pointing angle of Xi vs pt histos
aa3d4e29 560 fHistPiPCosPointAngXiVsPt(0),
5842a526 561 fHistPiAPCosPointAngXiVsPt(0),
aa3d4e29 562 fHistPiPMassVSPtSecXiMCTruth(0),
563 fHistPiPMassVSPtSecOmegaMCTruth(0),
aa3d4e29 564 fHistPiAPMassVSPtSecXiMCTruth(0),
565 fHistPiAPMassVSPtSecOmegaMCTruth(0),
76a4d7a7 566 // fHistUserPtShift(0),
5842a526 567// fHistPiPiPhiPosVsPtPosVsMass(0),//xxx
568// fHistPiPPhiPosVsPtPosVsMass(0),//xxx
569//selection booleans and values
aa3d4e29 570 fMCMode(0),
571 fMCTruthMode(0),
572 fSelectInjected(0),
573 fSelectMBMotherMC(0),
574 fCheckNegLabelReco(0),
575 fOnlyFoundRecoV0(0),
576 fUseCentrality(0),
577 fUseCentralityBin(0),
578 fUseCentralityRange(0),
579 fAnapp(0),
5842a526 580 fRejectPileUpSPD(0),
aa3d4e29 581 fSelSDD(0),
582 fSelNoSDD(0),
583 fOntheFly(0),
584 fVertexZCut(0),
585 fVtxStatus(0),
76a4d7a7 586 fNcr(0),
11e769d9 587 fChi2cls(0),
588 fTPCrefit(0),
589 fNcrCh(0),
590 fChi2clsCh(0),
591 fTPCrefitCh(0),
592 fNcrLpt(0),
593 fChi2clsLpt(0),
594 fTPCrefitLpt(0),
aa3d4e29 595 fUsePID(0),
5842a526 596 fUsePIDPion(0),
aa3d4e29 597 fNSigma(0),
5842a526 598 fNSigma2(0),
aa3d4e29 599 fPPIDcut(0),
600 fPtTPCCut(0),
601 fMoreNclsThanRows(0),
602 fMoreNclsThanFindable(0),
603 fMoreNclsThanFindableMax(0),
604 fRatioFoundOverFindable(0),
605 fRatioMaxCRowsOverFindable(0),
606 fChi2PerClusterITS(0),
76a4d7a7 607 fDistanceTPCInner(0),
5842a526 608 fMinNCLSITSPos(0),
609 fMinNCLSITSNeg(0),
610 fMaxNCLSITSPos(0),
611 fMaxNCLSITSNeg(0),
612 fSwitchCaseITSCls(0),
613 fCutMITrackLength(0),
614 fCutMICrossedR(0),
615 fCutMITPCncls(0),
616 fCutMITrackLengthLengthF(0),
617 fCutMICrossedRLengthF(0),
aa3d4e29 618 fRapCutV0(0),
619 fRap(0),
620 fEtaCutMCDaughters(0),
621 fEtaCutMCDaughtersVal(0),
622 fMinPt(0),
623 fAlfaCut(0),
624 fQtCut(0),
5842a526 625 fQtCutPt(0),
aa3d4e29 626 fQtCutPtLow(0),
627 fArmCutK0(0),
628 fArmCutL(0),
629 fArmQtSlope(0),
630 fExcludeLambdaFromK0s(0),
631 fExcludeK0sFromLambda(0),
632 fDCAToVertexK0(0),
633 fDCAToVertexL(0),
634 fDCAXK(0),
635 fDCAYK(0),
636 fDCAXL(0),
637 fDCAYL(0),
638 fDCAZ(0),
639 fDCADaughtersL(0),
640 fDCADaughtersAL(0),
641 fDCADaughtersK0(0),
642 fDCADaughtersToVtxLarge(0),
643 fDCADaughtersToVtxSmall(0),
644 fDecayRadXYMin(0),
645 fDecayRadXYMax(0),
646 fCosPointAngL(0),
647 fCosPointAngK(0),
648 fCPAPtCutK0(0),
649 fCPAPtCutL(0),
650 fOpengAngleDaughters(0),
651 fOpAngPtCut(0),
652 fDecayLengthMax(0),
653 fDecayLengthMin(0),
5842a526 654 fDecRadCutITSMin(0),
655 fDecRadCutITSMax(0),
aa3d4e29 656 fCtauK0s(0),
657 fCtauL(0),
658 fCtauPtCutK0(0),
659 fCtauPtCutL(0),
5842a526 660 fChiCutKf(0),
661 fK0sLowMassCut(0),
662 fK0sHighMassCut(0),
663 fLLowMassCut(0),
664 fLHighMassCut(0),
665 fSetFillDetAL(0),
666 fSetPtDepHist(0)
aa3d4e29 667 // fShift(0),
668 // fDeltaInvP(0)
5842a526 669{ // Constructor.
aa3d4e29 670
671 DefineOutput(1,TList::Class());
672
673 // define defaults for globals
674 /*
675 fShift = kFALSE; // shift in charge/pt yes/no
676 fDeltaInvP = 0.00; // shift value
677 */
aa3d4e29 678
5842a526 679 fMCMode = kFALSE;
680 fMCTruthMode = kFALSE;
aa3d4e29 681
5842a526 682 fUseCentrality = 0;
683 fUseCentralityBin = 0;
684 fUseCentralityRange =0;
aa3d4e29 685
5842a526 686 fAnapp = kFALSE;
687 fRejectPileUpSPD = kFALSE;
688 fSelSDD = kFALSE;
689 fSelNoSDD= kFALSE;
690
691 fSelectInjected = kFALSE;
692 fSelectMBMotherMC = kFALSE;
693 fCheckNegLabelReco = kFALSE;
694 fOnlyFoundRecoV0= kFALSE;
aa3d4e29 695
5842a526 696 fVertexZCut = 100000.0;
697 fVtxStatus = kFALSE;
698
699 fOntheFly = kTRUE;
700
701 //----- define defaults for V0 and track cuts ----//
11e769d9 702
703 fNcr = 70;
704 fChi2cls = 4;
705 fTPCrefit = kTRUE;
706 fNcrCh = 70;
707 fChi2clsCh =4;
708 fTPCrefitCh = kTRUE;
709 fNcrLpt = 70;
710 fChi2clsLpt = 4;
711 fTPCrefitLpt = kTRUE;
712
76a4d7a7 713
714
5842a526 715 fUsePID = kFALSE;
716 fUsePIDPion = kFALSE;
717 fMoreNclsThanRows = kFALSE;
718 fMoreNclsThanFindable = kFALSE;
719 fMoreNclsThanFindableMax = kFALSE;
720 fRatioFoundOverFindable = -1.0;
721 fRatioMaxCRowsOverFindable = 1000.0;
722
723
724 fChi2PerClusterITS = 100000.0;
76a4d7a7 725 fDistanceTPCInner = -1.0;
5842a526 726 fMinNCLSITSPos = -1;
727 fMaxNCLSITSPos = 1000;
728 fMinNCLSITSNeg = -1;
729 fMaxNCLSITSNeg = 1000;
730 fSwitchCaseITSCls = kFALSE;
731
732 fCutMITrackLength = kFALSE;
733 fCutMICrossedR = kFALSE;
734 fCutMITPCncls = kFALSE;
735 fCutMITrackLengthLengthF = 1.0;
736 fCutMICrossedRLengthF = 0.85;
737
738 fNSigma = 100000.0;
739 fNSigma2 = 100000.0;
740 fPPIDcut = 100.0;
741 fPtTPCCut = -1.0;
742
743
744 fRapCutV0=kFALSE;
745 fRap=1000.0;
746 fRap=1000.0;
747
748 fAlfaCut= -100.0;
749 fQtCut = -1.0;
750 fQtCutPt = 100.0;
751 fQtCutPtLow = -1.0;
752 fArmCutK0=kFALSE;
753 fArmCutL=kFALSE;
754 fArmQtSlope =0.2;
755 fExcludeLambdaFromK0s = -1.0;
756 fExcludeK0sFromLambda = -1.0;
757
758 fEtaCutMCDaughters = kFALSE;
759 fEtaCutMCDaughtersVal = 50.0;
760
761 fMinPt= -1.0;
762
763 fDCAToVertexK0 = 10000.0;
764 fDCAToVertexL = 10000.0;
765 fDCAXK=10000.0;
766 fDCAYK=10000.0;
767 fDCAXL=10000.0;
768 fDCAYL=10000.0;
769 fDCAZ=10000.0;
770
771 fDCADaughtersL=10000.0;
772 fDCADaughtersAL=10000.0;
773 fDCADaughtersK0=10000.0;
aa3d4e29 774
5842a526 775 fDCADaughtersToVtxLarge=-1.0;
776 fDCADaughtersToVtxSmall=-1.0;
aa3d4e29 777
5842a526 778 fDecayRadXYMin=-100000.0;
779 fDecayRadXYMax=1000000.0;
780 fDecayLengthMax=100000.0;
781 fDecayLengthMin=-1000000.0;
782
783 fDecRadCutITSMin = 0.0000;
784 fDecRadCutITSMax = 10000.0;
aa3d4e29 785
5842a526 786 fCosPointAngL=-1.0;
787 fCosPointAngK=-1.0;
788 fCPAPtCutK0 = 1000.0;
789 fCPAPtCutL =1000.0;
790 fOpengAngleDaughters = -1.0;
791 fOpAngPtCut = -1.0;
792
793 fCtauK0s=10e6;
794 fCtauL=10e6;
795 fCtauPtCutK0=10e6;
796 fCtauPtCutL=10e6;
aa3d4e29 797
5842a526 798 fChiCutKf=1000000.0;
aa3d4e29 799
5842a526 800 fK0sLowMassCut = 0.25;
801 fK0sHighMassCut = 0.75;
aa3d4e29 802
5842a526 803 fLLowMassCut = 1.05;
804 fLHighMassCut = 1.25;
aa3d4e29 805
aa3d4e29 806
5842a526 807 fSetFillDetAL = kFALSE;
aa3d4e29 808
5842a526 809 fSetPtDepHist=kFALSE;
aa3d4e29 810
aa3d4e29 811 //---- histograms ----//
812 for(Int_t j=0;j<2;j++){
5842a526 813 fHistArmenteros[j]=NULL;
814 fHistV0RadiusZ[j] =NULL;
aa3d4e29 815 fHistV0RadiusZVSPt[j] =NULL;
5842a526 816 fHistV0RadiusXY[j] =NULL;
aa3d4e29 817 fHistV0RadiusXYVSY[j] =NULL;
5842a526 818
aa3d4e29 819 //Lambda
5842a526 820 fHistPiPMass[j]=NULL;
821 fHistPiPMassVSPt[j]=NULL;
822 fHistPiPMassVSY[j] = NULL;
823 fHistPiPMassVSPtMCTruth[j]=NULL;
824 fHistPiPRadiusXY[j]=NULL;
825 fHistPiPCosPointAng[j]=NULL;
826 fHistPiPDecayLengthVsPt[j]=NULL;
827 fHistPiPDecayLengthVsMass[j]=NULL;
828 fHistPiPDecayLengthVsCtau[j]=NULL;
829 fHistPiPDCADaughterPosToPrimVtxVSMass[j]=NULL;
830 fHistPiPDCADaughterNegToPrimVtxVSMass[j]=NULL;
831 fHistPiPMassVSPtSecSigma[j]=NULL;
832 fHistPiPMassVSPtSecXi[j]=NULL;
833 fHistPiPMassVSPtSecOmega[j]=NULL;
834 fHistPiPMassVSYSecXi[j]=NULL;
835 fHistPiPXi0PtVSLambdaPt[j]=NULL;
836 fHistPiPXiMinusPtVSLambdaPt[j]=NULL;
837 fHistPiPOmegaPtVSLambdaPt[j]=NULL;
838 fHistPiPDCADaughters[j]=NULL;
aa3d4e29 839 // fHistPiPPtDaughters[j]=NULL;
5842a526 840 fHistPiPPtVSY[j]=NULL;
841 fHistPiPDCAVSMass[j]=NULL;
842 fHistPiPMonitorCuts[j] =NULL;
843 fHistPiPMonitorMCCuts[j] =NULL;
844 fHistPiPDecayLengthResolution[j] =NULL;
845 // fHistPiPDCAZPos[j] =NULL;
846 //fHistPiPDCAZNeg[j] =NULL;
847 fHistPiPTrackLengthPosVsMass[j] = NULL;
848 fHistPiPTrackLengthNegVsMass[j] = NULL;
849
850 //ALambda
851 fHistPiAPMass[j]=NULL;
852 fHistPiAPMassVSPt[j]=NULL;
853 fHistPiAPMassVSY[j] = NULL;
854 fHistPiAPMassVSPtMCTruth[j]=NULL;
855 fHistPiAPRadiusXY[j]=NULL;
856 fHistPiAPCosPointAng[j]=NULL;
857 fHistPiAPDecayLengthVsPt[j]=NULL;
858 fHistPiAPDecayLengthVsMass[j]=NULL;
859 fHistPiAPDecayLengthVsCtau[j]=NULL;
860 fHistPiAPDCADaughterPosToPrimVtxVSMass[j]=NULL;
861 fHistPiAPDCADaughterNegToPrimVtxVSMass[j]=NULL;
862 fHistPiAPMassVSPtSecSigma[j]=NULL;
863 fHistPiAPMassVSPtSecXi[j]=NULL;
864 fHistPiAPMassVSPtSecOmega[j]=NULL;
865 fHistPiAPMassVSYSecXi[j]=NULL;
866 fHistPiAPXi0PtVSLambdaPt[j]=NULL;
867 fHistPiAPXiMinusPtVSLambdaPt[j]=NULL;
868 fHistPiAPOmegaPtVSLambdaPt[j] =NULL;
869 fHistPiAPDCADaughters[j]=NULL;
aa3d4e29 870 // fHistPiAPPtDaughters[j]=NULL;
5842a526 871 fHistPiAPPtVSY[j]=NULL;
872 fHistPiAPDCAVSMass[j]=NULL;
873 fHistPiAPMonitorCuts[j] =NULL;
874 fHistPiAPMonitorMCCuts[j] =NULL;
875 fHistPiAPDecayLengthResolution[j] =NULL;
876 // fHistPiAPDCAZPos[j] =NULL;
877 //fHistPiAPDCAZNeg[j] =NULL;
878 fHistPiAPTrackLengthPosVsMass[j] = NULL;
879 fHistPiAPTrackLengthNegVsMass[j] = NULL;
880
881 //other
882 fHistDedxSecProt[j]=NULL;
883 fHistDedxSecAProt[j]=NULL;
884 fHistDedxSecPiMinus[j]=NULL;
885 fHistDedxSecPiPlus[j]=NULL;
886 fHistDedxProt[j]=NULL;
887 fHistDedxAProt[j]=NULL;
888 fHistDedxPiMinus[j]=NULL;
889 fHistDedxPiPlus[j]=NULL;
890 fHistNclsITS[j]=NULL;
891 fHistNclsTPC[j]=NULL;
892 fHistNclsITSPosL[j]=NULL;
893 fHistNclsITSNegL[j]=NULL;
894 fHistNclsTPCPosL[j]=NULL;
895 fHistNclsTPCNegL[j]=NULL;
896 fHistChi2PerNclsITSPosL[j]=NULL;
897 fHistChi2PerNclsITSNegL[j]=NULL;
898 fHistNCRowsTPCPosL[j]=NULL;
899 fHistNCRowsTPCNegL[j]=NULL;
900 fHistRatioFoundOverFinableTPCLPos[j]=NULL;
901 fHistRatioFoundOverFinableTPCLNeg[j]=NULL;
902 fHistPiPiEtaDMC[j] = NULL;
903 fHistPiPiEtaDReco[j] = NULL;
904 fHistPiPEtaDMC[j] = NULL;
905 fHistPiPEtaDReco[j] = NULL;
aa3d4e29 906 }
907
908}
76a4d7a7 909
aa3d4e29 910//_____________________________________________________
911AliAnalysisTaskV0ForRAA::~AliAnalysisTaskV0ForRAA()
912{
913 //---- Remove all pointers ----//
5842a526 914 if(fOutputContainer) delete fOutputContainer;fOutputContainer=0;
915 if(fESDTrackCuts) delete fESDTrackCuts;fESDTrackCuts=0;
916 if(fESDTrackCutsCharged) delete fESDTrackCutsCharged;fESDTrackCutsCharged=0;
917 if(fESDTrackCutsLowPt) delete fESDTrackCutsLowPt; fESDTrackCutsLowPt=0;
aa3d4e29 918}
aa3d4e29 919//________________________________________________________________________
76a4d7a7 920void AliAnalysisTaskV0ForRAA::UserCreateOutputObjects(){
921
11e769d9 922 //--- esd track cuts V0 daughters ---//
76a4d7a7 923 TString cutsname = "esdtrackcuts";
11e769d9 924 // esd track cuts for pions high pt
925 fESDTrackCuts = new AliESDtrackCuts(cutsname);
926 fESDTrackCuts->SetMaxChi2PerClusterTPC(fChi2cls);
927 fESDTrackCuts->SetMinNCrossedRowsTPC(fNcr);
928 fESDTrackCuts->SetAcceptKinkDaughters(kFALSE);
929 fESDTrackCuts->SetRequireTPCRefit(fTPCrefit);
930 fESDTrackCuts->SetRequireSigmaToVertex(kFALSE);
931
932 // esd track cuts for protons high pt
933 TString cutsnameCh = cutsname;
934 cutsnameCh +="_charged";
935 fESDTrackCutsCharged = new AliESDtrackCuts(cutsnameCh);
936 fESDTrackCutsCharged->SetMaxChi2PerClusterTPC(fChi2clsCh);
937 fESDTrackCutsCharged->SetMinNCrossedRowsTPC(fNcrCh);
938 fESDTrackCutsCharged->SetAcceptKinkDaughters(kFALSE);
939 fESDTrackCutsCharged->SetRequireTPCRefit(fTPCrefitCh);
940 fESDTrackCutsCharged->SetRequireSigmaToVertex(kFALSE);
941
942 // esd track cuts for all low pt
943 TString cutsnameLowPt = cutsname;
944 cutsnameLowPt +="_lowpt";
945 fESDTrackCutsLowPt = new AliESDtrackCuts(cutsnameLowPt);
946 fESDTrackCutsLowPt->SetMaxChi2PerClusterTPC(fChi2clsLpt);
947 fESDTrackCutsLowPt->SetMinNCrossedRowsTPC(fNcrLpt);
948 fESDTrackCutsLowPt->SetAcceptKinkDaughters(kFALSE);
949 fESDTrackCutsLowPt->SetRequireTPCRefit(fTPCrefitLpt);
76a4d7a7 950 fESDTrackCutsLowPt->SetRequireSigmaToVertex(kFALSE);
951
952 //create output objects
11e769d9 953
5842a526 954 Int_t nbPt=800;
955 Int_t nbMass=500;
aa3d4e29 956
76a4d7a7 957
958 //----------------- create output container -----------------//
959
aa3d4e29 960 fOutputContainer = new TList() ;
961 fOutputContainer->SetName(GetName()) ;
76a4d7a7 962 fOutputContainer->SetOwner();
aa3d4e29 963
5842a526 964 Int_t mchist = 1;// for Data
965 if((fMCMode && fMCTruthMode) || fMCTruthMode) mchist = 2;
aa3d4e29 966
967
968 //------------ create allways -----------------------//
969 fHistNEvents = new TH1F("fHistNEvents","no of events before cuts =0, after cuts=1, after process =2",5,0.0,5.0);
970 fOutputContainer->Add(fHistNEvents);
971
972 fHistMuliplicity = new TH1F("fHistMuliplicity","V0 multiplicity",3000,0.0,30000);
973 fOutputContainer->Add(fHistMuliplicity);
974
975 fHistMuliplicityRaw = new TH1F("fHistMuliplicityRaw","V0 multiplicity before process",3000,0.0,30000);
976 fOutputContainer->Add(fHistMuliplicityRaw);
977
978 fHistMultiplicityPrimary = new TH1F("fHistMultiplicityPrimary","number of charged tracks",5000,0.0,20000);
979 fOutputContainer->Add(fHistMultiplicityPrimary);
980
5842a526 981 fHistESDVertexZ= new TH1F("fHistESDVertexZ"," z vertex distr in cm",500,-50,50);
aa3d4e29 982 fOutputContainer->Add(fHistESDVertexZ);
983
984 fHistPrimVtxZESD = new TH1F("fHistPrimVtxZESD","z vertex pos ESD",250,-50,50);
985 fOutputContainer->Add(fHistPrimVtxZESD);
986
987 fHistPrimVtxZESDVSNContributors = new TH2F("fHistPrimVtxZESDVSNContributors","prim vtx pos z ESD vs no. of contributers TPC",250,-50,50,500,0.0,500.0);
988 fOutputContainer->Add(fHistPrimVtxZESDVSNContributors);
989
5842a526 990 fHistNPrim = new TH1F("fHistNPrim","Number of contributers to vertex",2500,0.0,5000);
aa3d4e29 991 fOutputContainer->Add(fHistNPrim);
992
993 //------------------------ pp analysis only -------------------------//
994 if(fAnapp){
5842a526 995 fHistITSLayerHits = new TH1F("fHistITSLayerHits","SDD layer -1=0,1=1,2=2 ... 5=5,0=nothing",7,-1.5,5.5);
aa3d4e29 996 fOutputContainer->Add(fHistITSLayerHits);
5842a526 997 fHistOneHitWithSDD = new TH1F("fHistOneHitWithSDD","min one hit in SDD",2,-0.5,1.5);
aa3d4e29 998 fOutputContainer->Add(fHistOneHitWithSDD);
999 fHistPrimVtxZESDTPC = new TH1F("fHistPrimVtxZESDTPC","z vertex pos TPC",250,-50,50);
1000 fOutputContainer->Add(fHistPrimVtxZESDTPC);
1001 fHistPrimVtxZESDSPD = new TH1F("fHistPrimVtxZESDSPD","z vertex pos SPD",250,-50,50);
1002 fOutputContainer->Add(fHistPrimVtxZESDSPD);
1003 fHistPrimVtxZESDTPCVSNContributors = new TH2F("fHistPrimVtxZESDTPCVSNContributors","prim vtx pos z TPC vs no. of contributers TPC",250,-50,50,500,0.0,500.0);
1004 fOutputContainer->Add(fHistPrimVtxZESDTPCVSNContributors);
1005 fHistPrimVtxZESDSPDVSNContributors = new TH2F("fHistPrimVtxZESDSPDVSNContributors","prim vtx pos z SPD vs no. of contributers TPC",250,-50,50,500,0.0,500.0);
1006 fOutputContainer->Add(fHistPrimVtxZESDSPDVSNContributors);
1007
1008 }
1009 else {
1010 Double_t binsCent[12]={0.0,5.0,10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0};
1011 fHistCentBinRaw = new TH1F("fHistCentBinRaw","centrality bin before cent selection",11,binsCent);
1012 fOutputContainer->Add(fHistCentBinRaw);
5842a526 1013 fHistCentBin = new TH1F("fHistCentBin","centrality bin",11,binsCent);
aa3d4e29 1014 fOutputContainer->Add(fHistCentBin);
1015
1016 }
1017
1018 // ------------------- add always ---------------------------//
5842a526 1019 fHistV0RadiusZ[0] = new TH2F("fHistV0RadiusZ","z of decay radius vs 2D radius",100,0.0,100.0,250,-125.0,125.0);
aa3d4e29 1020 fHistV0RadiusZVSPt[0] = new TH2F("fHistV0RadiusZVSPt","z of decay radius vs pt radius",200,0.0,20.0,125,0.0,125.0);
5842a526 1021 fHistV0RadiusXY[0] = new TH2F("fHistV0RadiusXY","y vs x decay radius",250,-125.0,125.0,250,-125.0,125.0);
aa3d4e29 1022 fHistV0RadiusXYVSY[0] = new TH2F("fHistV0RadiusXYVSY","2D decay radius vs rap",100,-1,1,100,0.0,100.0);
5842a526 1023 fHistArmenteros[0] = new TH2F("fHistArmenteros"," pi+pi- armenteros",nbMass,-1.,1.,500,0.,0.5);
1024
1025 // fHistPiPiPhiPosVsPtPosVsMass = new TH3F("fHistPiPiPhiPosVsPtPosVsMass","ctau K0s vs pt vs mass",250,0.25,0.75,440,0.0,110.0,200,0.0,20.0);//4.0);//xxx
1026 // fHistPiPPhiPosVsPtPosVsMass = new TH3F("fHistPiPPhiPosVsPtPosVsMass","ctau L vs pt vs mass",250,0.25,0.75,440,0.0,110.0,200,0.0,20.0);//4.0);//xxx
1027 fHistPiPiK0sVsLambdaMass = new TH2F("fHistPiPiK0sVsLambdaMass","K0s mass vs Lambda mass for all pt for K0s",250,1.05,1.25,250,0.25,0.75);
1028 fHistPiPiK0sVsALambdaMass = new TH2F("fHistPiPiK0sVsALambdaMass","K0s mass vs ALambda mass for all pt for K0s",250,1.05,1.25,250,0.25,0.75);
1029
1030 fHistPiPK0sVsLambdaMass = new TH2F("fHistPiPK0sVsLambdaMass","K0s mass vs Lambda mass for all pt for Lambda",250,1.05,1.25,250,0.25,0.75);
1031
1032 fHistPiAPK0sVsALambdaMass = new TH2F("fHistPiAPK0sVsALambdaMass","K0s mass vs ALambda mass for all pt for ALambda",250,1.05,1.25,250,0.25,0.75);
1033
1034 fHistPiPALambdaVsLambdaMass = new TH2F("fHistPiPALambdaVsLambdaMass","ALambda mass vs Lambda mass for Lambda",250,1.05,1.25,250,1.05,1.25);
1035 fHistPiAPLambdaVsALambdaMass = new TH2F("fHistPiAPLambdaVsALambdaMass","Lambda mass vs ALambda mass for ALambda",250,1.05,1.25,250,1.05,1.25);
1036
1037 //-----K0s
1038 fHistPiPiMass = new TH1F("fHistPiPiMass"," pi+pi- InvMass distribution",2*nbMass,0.,2.);
1039 fHistPiPiMassVSPt = new TH2F("fHistPiPiMassVSPt","pi+pi- InvMass distribution",nbMass,0.25,0.75,300,0.0,30.0);
1040 fHistPiPiMassVSPtMCTruth = new TH2F("fHistPiPiMassVSPtMCTruth","pi+pi- InvMass distribution vs pt MCTruth",nbMass,0.25,0.75,300,0.0,30.0);
1041 fHistPiPiMassVSY = new TH2F("fHistPiPiMassVSY","pi+pi- InvMass distribution vs rapidity",nbMass,0.25,0.75,200,-1.0,1.0);
1042 fHistPiPiPtVSY = new TH2F("fHistPiPiPtVSY","phi vs mass",100,-1,1,100,0.0,20);
1043 fHistPiPiDecayLengthVsPt = new TH2F("fHistPiPiDecayLengthVsPt","K0 decay length vs pt",200,0.0,20.0,220,0.0,110.0);
1044 fHistPiPiDecayLengthVsMass = new TH2F("fHistPiPiDecayLengthVsMass","K0s decay length vs mass",nbMass,0.25,0.75,220,0.0,110.0);
1045 if(!fSetPtDepHist){
1046 fHistPiPiDecayLengthVsCtau = new TH2F("fHistPiPiDecayLengthVsCtau","K0s ctau vs mass",nbMass,0.25,0.75,250,0.0,50.0);
1047 }
76a4d7a7 1048 else{
1049 fHistPiPiDecayLengthVsCtau = new TH2F("fHistPiPiDecayLengthVsCtau","K0s ctau vs pt",200,0,20.0,250,0.0,50.0);
1050 }
11e769d9 1051
76a4d7a7 1052 fHistPiPiMonitorCuts = new TH1F("fHistPiPiMonitorCuts","K0 cut monitor",35,0.5,35.5);
1053 fHistPiPiMonitorMCCuts = new TH1F("fHistPiPiMonitorMCCuts","K0 cut monitor mc",35,0.5,35.5);
aa3d4e29 1054
76a4d7a7 1055 //---------------Lambda
1056 fHistPiPMass[0] = new TH1F("fHistPiPMass"," p+pi- InvMass distribution",2*nbMass,0.,2.);
1057 fHistPiPMassVSPt[0] = new TH2F("fHistPiPMassVSPt","p+pi- InvMass distribution",nbMass,1.05,1.25,300,0.0,30.0);
1058 fHistPiPMassVSPtMCTruth[0] = new TH2F("fHistPiPMassVSPtMCTruth","p+pi- InvMass distribution vs pt MCTruth",nbMass,1.05,1.25,300,0.0,30.0);
1059 fHistPiPMassVSY[0] = new TH2F("fHistPiPMassVSY","p+pi- InvMass distribution vs rapidity",nbMass,1.05,1.25,200,-1.0,1.0);
1060 fHistPiPPtVSY[0] = new TH2F("fHistPiPPtVSY","p{t} vs y",100,-1,1,100,0.0,20);
1061 fHistPiPDecayLengthVsPt[0] = new TH2F("fHistPiPDecayLengthVsPt","#Lambda decay length vs pt",200,0.0,20.0,220,0.0,110.0);
1062 fHistPiPDecayLengthVsMass[0] = new TH2F("fHistPiPDecayLengthVsMass","#Lambda decay length vs mass",nbMass,1.05,1.25,220,0.0,110.0);
5842a526 1063 if(!fSetPtDepHist){
76a4d7a7 1064 fHistPiPDecayLengthVsCtau[0] = new TH2F("fHistPiPDecayLengthVsCtau","L ctau vs mass",nbMass,1.05,1.25,250,0.0,50.0);
5842a526 1065 }
1066 else{
76a4d7a7 1067 fHistPiPDecayLengthVsCtau[0] = new TH2F("fHistPiPDecayLengthVsCtau","L ctau vs pt",200,0.0,20.0,250,0.0,50.0);
5842a526 1068 }
76a4d7a7 1069 fHistPiPMonitorCuts[0] = new TH1F("fHistPiPMonitorCuts","#Lambda cut monitor",35,0.5,35.5);
1070 fHistPiPMonitorMCCuts[0] = new TH1F("fHistPiPMonitorMCCuts","#Lambda cut monitor mc ",35,0.5,35.5);
1071
1072 //-------------ALamda
1073 fHistPiAPMass[0] = new TH1F("fHistPiAPMass"," ap-pi+ InvMass distribution",2*nbMass,0.,2.);
1074 fHistPiAPMassVSPt[0] = new TH2F("fHistPiAPMassVSPt","p-pi+ InvMass distribution",nbMass,1.05,1.25,300,0.0,30.0);
1075 fHistPiAPMassVSPtMCTruth[0] = new TH2F("fHistPiAPMassVSPtMCTruth","p-pi+ InvMass distribution vs pt MCTruth",nbMass,1.05,1.25,300,0.0,30.0);
1076 fHistPiAPMassVSY[0] = new TH2F("fHistPiAPMassVSY","p-pi+ InvMass distribution vs rapidity",nbMass,1.05,1.25,200,-1.0,1.0);
1077 fHistPiAPPtVSY[0] = new TH2F("fHistPiAPPtVSY","p{t} vs y",100,-1,1,100,0.0,20);
1078 fHistPiAPDecayLengthVsPt[0] = new TH2F("fHistPiAPDecayLengthVsPt","#bar{#Lambda} decay length vs pt",200,0.0,20.0,220,0.0,110.0);
1079 fHistPiAPDecayLengthVsMass[0] = new TH2F("fHistPiAPDecayLengthVsMass","#bar{#Lambda} decay length vs mass",nbMass,1.05,1.25,220,0.0,110.0);
5842a526 1080 if(!fSetPtDepHist){
76a4d7a7 1081 fHistPiAPDecayLengthVsCtau[0] = new TH2F("fHistPiAPDecayLengthVsCtau","AL ctau vs mass",nbMass,1.05,1.25,250,0.0,50.0);
5842a526 1082 }
1083 else{
76a4d7a7 1084 fHistPiAPDecayLengthVsCtau[0] = new TH2F("fHistPiAPDecayLengthVsCtau","AL ctau vs pt",200,0.0,20.0,250,0.0,50.0);
5842a526 1085 }
76a4d7a7 1086 fHistPiAPMonitorCuts[0] = new TH1F("fHistPiAPMonitorCuts","#bar{#Lambda} cut monitor",35,0.5,35.5);
1087 fHistPiAPMonitorMCCuts[0] = new TH1F("fHistPiAPMonitorMCCuts","#bar{#Lambda} cut monitor mc",35,0.5,35.5);
5842a526 1088
76a4d7a7 1089 // ---------------------------------------------for MC reco secondaries -----------------------------------------//
1090 if(mchist==2){
1091 fHistV0RadiusZ[1] = new TH2F("fHistV0RadiusZSec","z of decay radius vs 2D radius",100,0.0,100.0,250,-125.0,125.0);
1092 fHistV0RadiusZVSPt[1] = new TH2F("fHistV0RadiusZVSPtSec","z of decay radius vs pt radius",200,0.0,20.0,125,0.0,125.0);
1093 fHistV0RadiusXY[1] = new TH2F("fHistV0RadiusXYSec","y vs x decay radius",250,-125.0,125.0,250,-125.0,125.0);
1094 fHistV0RadiusXYVSY[1] = new TH2F("fHistV0RadiusXYVSYSec","2D decay radius vs rap",100,-1,1,100,0.0,100.0);
1095 fHistArmenteros[1] = new TH2F("fHistArmenterosSec"," pi+pi- armenteros",nbMass,-1.,1.,500,0.,0.5);
5842a526 1096
76a4d7a7 1097 //K0s
1098 //--------------- Lambda
1099 fHistPiPMass[1] = new TH1F("fHistPiPMassSec"," p+pi- InvMass distribution",2*nbMass,0.,2.);
1100 fHistPiPMassVSPt[1] = new TH2F("fHistPiPMassVSPtSec","p+pi- InvMass distribution",nbMass,1.05,1.25,300,0.0,30.0);
1101 fHistPiPMassVSPtMCTruth[1] = new TH2F("fHistPiPMassVSPtMCTruthSec","p+pi- InvMass distribution vs pt MCTruth",nbMass,1.05,1.25,300,0.0,30.0);
1102 fHistPiPMassVSY[1] = new TH2F("fHistPiPMassVSYSec","p+pi- InvMass distribution vs rapidity",nbMass,1.05,1.25,200,-1.0,1.0);
1103 fHistPiPPtVSY[1] = new TH2F("fHistPiPPtVSYSec","p{t} vs y",100,-1,1,100,0.0,20);
1104 fHistPiPDecayLengthVsPt[1] = new TH2F("fHistPiPDecayLengthVsPtSec","#Lambda decay length vs pt",200,0.0,20.0,220,0.0,110.0);
1105 fHistPiPDecayLengthVsMass[1] = new TH2F("fHistPiPDecayLengthVsMassSec","#Lambda decay length vs mass",nbMass,1.05,1.25,220,0.0,110.0);
1106 if(!fSetPtDepHist){
1107 fHistPiPDecayLengthVsCtau[1] = new TH2F("fHistPiPDecayLengthVsCtauSec","L ctau vs mass",nbMass,1.05,1.25,250,0.0,50.0);
1108 }
1109 else{
1110 fHistPiPDecayLengthVsCtau[1] = new TH2F("fHistPiPDecayLengthVsCtauSec","L ctau vs pt",200,0.0,20.0,250,0.0,50.0);
1111 }
1112 fHistPiPMonitorCuts[1] = new TH1F("fHistPiPMonitorCutsSec","#Lambda cut monitor",35,0.5,35.5);
1113 fHistPiPMonitorMCCuts[1] = new TH1F("fHistPiPMonitorMCCutsSec","#Lambda cut monitor mc",35,0.5,35.5);
1114
1115 //----------------ALambda
1116 fHistPiAPMass[1] = new TH1F("fHistPiAPMassSec"," ap-pi+ InvMass distribution",2*nbMass,0.,2.);
1117 fHistPiAPMassVSPt[1] = new TH2F("fHistPiAPMassVSPtSec","p-pi+ InvMass distribution",nbMass,1.05,1.25,300,0.0,30.0);
1118 fHistPiAPMassVSPtMCTruth[1] = new TH2F("fHistPiAPMassVSPtMCTruthSec","p-pi+ InvMass distribution vs pt MCTruth",nbMass,1.05,1.25,300,0.0,30.0);
1119 fHistPiAPMassVSY[1] = new TH2F("fHistPiAPMassVSYSec","p-pi+ InvMass distribution vs rapidity",nbMass,1.05,1.25,200,-1.0,1.0);
1120 fHistPiAPPtVSY[1] = new TH2F("fHistPiAPPtVSYSec","p{t} vs y",100,-1,1,100,0.0,20);
1121 fHistPiAPDecayLengthVsPt[1] = new TH2F("fHistPiAPDecayLengthVsPtSec","#bar{#Lambda} decay length vs pt",200,0.0,20.0,220,0.0,110.0);
1122 fHistPiAPDecayLengthVsMass[1] = new TH2F("fHistPiAPDecayLengthVsMassSec","#bar{#Lambda} decay length vs mass",nbMass,1.05,1.25,220,0.0,110.0);
1123 if(!fSetPtDepHist){
1124 fHistPiAPDecayLengthVsCtau[1] = new TH2F("fHistPiAPDecayLengthVsCtauSec","AL ctau vs mass",nbMass,1.05,1.25,250,0.0,50.0);
1125 }
1126 else{
1127 fHistPiAPDecayLengthVsCtau[1] = new TH2F("fHistPiAPDecayLengthVsCtauSec","AL ctau vs pt",200,0.0,20.0,250,0.0,50.0);
1128 }
1129
1130 fHistPiAPMonitorCuts[1] = new TH1F("fHistPiAPMonitorCutsSec","#bar{#Lambda} cut monitor",35,0.5,35.5);
1131 fHistPiAPMonitorMCCuts[1] = new TH1F("fHistPiAPMonitorMCCutsSec","#bar{#Lambda} cut monitor mc",35,0.5,35.5);
1132 }
1133
1134 //add
1135 //------------ K0s ------------------
1136 fOutputContainer->Add(fHistPiPiMass);
1137 fOutputContainer->Add(fHistPiPiMassVSPt);
1138 fOutputContainer->Add(fHistPiPiMassVSPtMCTruth);
1139 fOutputContainer->Add(fHistPiPiMassVSY);
1140 fOutputContainer->Add(fHistPiPiPtVSY);
1141 fOutputContainer->Add(fHistPiPiDecayLengthVsPt);
1142 fOutputContainer->Add(fHistPiPiDecayLengthVsCtau);
1143 fOutputContainer->Add(fHistPiPiDecayLengthVsMass);
1144 fOutputContainer->Add(fHistPiPiMonitorCuts);
1145 fOutputContainer->Add(fHistPiPiMonitorMCCuts);
1146 fOutputContainer->Add(fHistPiPiK0sVsLambdaMass);
1147 fOutputContainer->Add(fHistPiPiK0sVsALambdaMass);
1148 // fOutputContainer->Add(fHistPiPiPhiPosVsPtPosVsMass);//xxx
1149
1150 // --------------- Lambda ---------------
1151 fOutputContainer->Add(fHistPiPK0sVsLambdaMass);
1152 fOutputContainer->Add(fHistPiPALambdaVsLambdaMass);
1153 // fOutputContainer->Add(fHistPiPPhiPosVsPtPosVsMass);//xxx
1154
1155 // --------------- ALambda ---------------
1156 fOutputContainer->Add(fHistPiAPK0sVsALambdaMass);
1157 fOutputContainer->Add(fHistPiAPLambdaVsALambdaMass);
aa3d4e29 1158
aa3d4e29 1159
76a4d7a7 1160 for(Int_t j=0;j<mchist;j++){
1161 fOutputContainer->Add(fHistArmenteros[j]);
1162 fOutputContainer->Add(fHistV0RadiusZ[j]);
1163 fOutputContainer->Add(fHistV0RadiusZVSPt[j]);
1164 fOutputContainer->Add(fHistV0RadiusXY[j]);
1165 fOutputContainer->Add(fHistV0RadiusXYVSY[j]);
1166 fOutputContainer->Add(fHistPiPMass[j]);
1167 fOutputContainer->Add(fHistPiAPMass[j]);
1168 fOutputContainer->Add(fHistPiPMassVSPt[j]);
1169 fOutputContainer->Add(fHistPiAPMassVSPt[j]);
1170 fOutputContainer->Add(fHistPiPMassVSPtMCTruth[j]);
1171 fOutputContainer->Add(fHistPiAPMassVSPtMCTruth[j]);
1172 fOutputContainer->Add(fHistPiPMassVSY[j]);
1173 fOutputContainer->Add(fHistPiAPMassVSY[j]);
1174 fOutputContainer->Add(fHistPiPPtVSY[j]);
1175 fOutputContainer->Add(fHistPiAPPtVSY[j]);
1176 fOutputContainer->Add(fHistPiPDecayLengthVsPt[j]);
1177 fOutputContainer->Add(fHistPiAPDecayLengthVsPt[j]);
1178 fOutputContainer->Add(fHistPiPDecayLengthVsCtau[j]);
1179 fOutputContainer->Add(fHistPiAPDecayLengthVsCtau[j]);
1180 fOutputContainer->Add(fHistPiPDecayLengthVsMass[j]);
1181 fOutputContainer->Add(fHistPiAPDecayLengthVsMass[j]);
1182 fOutputContainer->Add(fHistPiPMonitorCuts[j]);
1183 fOutputContainer->Add(fHistPiAPMonitorCuts[j]);
1184 fOutputContainer->Add(fHistPiPMonitorMCCuts[j]);
1185 fOutputContainer->Add(fHistPiAPMonitorMCCuts[j]);
1186 }
5842a526 1187
aa3d4e29 1188
76a4d7a7 1189 //----------------- for reco or data or mc data like MC reco only -----------------//
1190 if((fMCMode) || (!fMCTruthMode && !fMCMode)){
5842a526 1191
76a4d7a7 1192 fHistPiPiEtaDReco[0] = new TH2F("fHistPiPiEtaDRecoRaw","K0s daughters eta raw",300,-6,6,100,0,20);
1193 fOutputContainer->Add(fHistPiPiEtaDReco[0]);
1194 fHistPiPiEtaDReco[1] = new TH2F("fHistPiPiEtaDReco","K0s daughters eta after rap V0 cut pos",300,-3,3,300,-3.00,3.0);
1195 fOutputContainer->Add(fHistPiPiEtaDReco[1]);
1196 fHistPiPEtaDReco[0] = new TH2F("fHistPiPEtaDRecoRaw","#Lambda daughters eta raw",300,-6,6,100,0,20);
1197 fOutputContainer->Add(fHistPiPEtaDReco[0]);
1198 fHistPiPEtaDReco[1] = new TH2F("fHistPiPEtaDReco","#Lambda daughters eta after rap V0 cut neg",300,-3,3,300,-3.00,3.0);
1199 fOutputContainer->Add(fHistPiPEtaDReco[1]);
5842a526 1200
76a4d7a7 1201 //K0
aa3d4e29 1202
76a4d7a7 1203 // fHistPiPiMassVSAlpha = new TH2F("fHistPiPiMassVSAlpha"," alpha armenteros vs pi+pi- InvMass distribution",nbMass,0.25,0.75,500,-1.,1.);
1204 if(!fSetPtDepHist){
1205 fHistPiPiDCADaughters = new TH2F("fHistPiPiDCADaughters","dca of K0 daughters",nbMass,0.25,0.75,250,0.0,2);
1206 fHistPiPiDCADaughterPosToPrimVtxVSMass = new TH2F("fHistPiPiDCADaughterPosToPrimVtxVSMass","pi+ DCA daughter to prim vtx vsinvmass",nbMass,0.25,0.75,250,0.0,10.0);
1207 fHistPiPiDCAVSMass = new TH2F("fHistPiPiDCAVSMass","pi+pi- dca vs pt",nbMass,0.25,0.75,250,0.0,5.0);
1208 fHistPiPiCosPointAng = new TH2F("fHistPiPiCosPointAng","K0 cosine of pointing angle vs mass ",nbMass,0.25,0.75,200,0.99,1.00);
1209 fHistPiPiRadiusXY = new TH2F("fHistPiPiRadiusXY","pi+pi- phi dist vs mass",nbMass,0.25,0.75,200,0.0,4.0);
1210 // fHistPiPiPtDaughters = new TH2F("fHistPiPiPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);
1211 fHistPiPiDCAZPos = new TH2F("fHistPiPiDCAZPos","dca z of K0 pos daughters",nbMass,0.25,0.75,200,-20.0,20.0);
1212 fHistPiPiDCAZNeg = new TH2F("fHistPiPiDCAZNeg","dca z of K0 neg daughters",nbMass,0.25,0.75,200,-20.0,20.0);
1213 fHistPiPiTrackLengthPosVsMass = new TH2F("fHistPiPiTrackLengthPosVsMass","track lenght of pos K0s daughter in TPC",nbMass,0.25,0.75,250,0.0,250.0);
1214 fHistPiPiTrackLengthNegVsMass = new TH2F("fHistPiPiTrackLengthNegVsMass","track lenght of neg K0s daughter in TPC",nbMass,0.25,0.75,250,0.0,250.0);
1215 }
1216 else{//pt dependence
1217 fHistPiPiDCADaughters = new TH2F("fHistPiPiDCADaughters","dca of K0 daughters",200,0.0,20.0,250,0.0,2);
1218 fHistPiPiDCADaughterPosToPrimVtxVSMass = new TH2F("fHistPiPiDCADaughterPosToPrimVtxVSMass","pi+ DCA daughter to prim vtx vsinvmass",200,0.0,20.0,250,0.0,10.0);
1219 fHistPiPiDCAVSMass = new TH2F("fHistPiPiDCAVSMass","pi+pi- dca vs pt",200,0.0,20.0,250,0.0,5.0);
1220 fHistPiPiCosPointAng = new TH2F("fHistPiPiCosPointAng","K0 cosine of pointing angle vs mass ",200,0.0,20.0,200,0.99,1.00);
1221 fHistPiPiRadiusXY = new TH2F("fHistPiPiRadiusXY","pi+pi- phi dist vs mass",200,0.0,20.0,200,0.0,4.0);
1222 fHistPiPiDCAZPos = new TH2F("fHistPiPiDCAZPos","dca z of K0 pos daughters",200,0.0,20.0,200,-20.0,20.0);
1223 fHistPiPiDCAZNeg = new TH2F("fHistPiPiDCAZNeg","dca z of K0 neg daughters",200,0.0,20.0,200,-20.0,20.0);
1224 fHistPiPiTrackLengthPosVsMass = new TH2F("fHistPiPiTrackLengthPosVsMass","track lenght of pos K0s daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1225 fHistPiPiTrackLengthNegVsMass = new TH2F("fHistPiPiTrackLengthNegVsMass","track lenght of neg K0s daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1226 }
5842a526 1227
76a4d7a7 1228 //Lambda
1229 if(!fSetPtDepHist){
1230 fHistPiPDCADaughters[0] = new TH2F("fHistPiPDCADaughters","dca of #Lambda daughters",nbMass,1.05,1.25,250,0.0,2.0);
1231 fHistPiPDCADaughterPosToPrimVtxVSMass[0] = new TH2F("fHistPiPDCADaughterPosToPrimVtxVSMass","pos DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,10.0);
1232 fHistPiPDCADaughterNegToPrimVtxVSMass[0] = new TH2F("fHistPiPDCADaughterNegToPrimVtxVSMass","neg DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,10.0);
1233 fHistPiPDCAVSMass[0] = new TH2F("fHistPiPDCAVSMass","ppi- dca vs pt",nbMass,1.05,1.25,250,0.0,5.0);
1234 fHistPiPCosPointAng[0] = new TH2F("fHistPiPCosPointAng","#Lambda cosine of pointing angle vs mass ",nbMass,1.05,1.25,200,0.99,1.00);
1235 fHistPiPRadiusXY[0] = new TH2F("fHistPiPRadiusXY","pi-p+ phi dist vs mass",nbMass,1.05,1.25,200,0.0,4.0);
1236 // fHistPiPPtDaughters[0] = new TH2F("fHistPiPPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);
1237 // fHistPiPDCAZPos[0] = new TH2F("fHistPiPDCAZPos","dca z of Lambda pos daughters",nbMass,1.05,1.25,200,-20.0,20.0);
1238 //fHistPiPDCAZNeg[0] = new TH2F("fHistPiPDCAZNeg","dca z of Lambda neg daughters",nbMass,1.05,1.25,200,-20.0,20.0);
1239 fHistPiPTrackLengthPosVsMass[0] = new TH2F("fHistPiPTrackLengthPosVsMass","track length of pos Lambda daughter in TPC",nbMass,1.05,1.25,250,0.0,250.0);
1240 fHistPiPTrackLengthNegVsMass[0] = new TH2F("fHistPiPTrackLengthNegVsMass","track length of neg Lambda daughter in TPC",nbMass,1.05,1.25,250,0.0,250.0);
1241 }
1242 else{//pt dependence
1243 fHistPiPDCADaughters[0] = new TH2F("fHistPiPDCADaughters","dca of #Lambda daughters",200,0.0,20.0,250,0.0,2.0);
1244 fHistPiPDCADaughterPosToPrimVtxVSMass[0] = new TH2F("fHistPiPDCADaughterPosToPrimVtxVSMass","pos DCA daughter to prim vtx vs invmass",200,0.0,20.0,250,0.0,10.0);
1245 fHistPiPDCADaughterNegToPrimVtxVSMass[0] = new TH2F("fHistPiPDCADaughterNegToPrimVtxVSMass","neg DCA daughter to prim vtx vs invmass",200,0.0,20.0,250,0.0,10.0);
1246 fHistPiPDCAVSMass[0] = new TH2F("fHistPiPDCAVSMass","ppi- dca vs pt",200,0.0,20.0,250,0.0,5.0);
1247 fHistPiPCosPointAng[0] = new TH2F("fHistPiPCosPointAng","#Lambda cosine of pointing angle vs mass ",200,0.0,20.0,200,0.99,1.00);
1248 fHistPiPRadiusXY[0] = new TH2F("fHistPiPRadiusXY","pi-p+ phi dist vs mass",200,0.0,20.0,200,0.0,4.0);
1249 //fHistPiPDCAZPos[0] = new TH2F("fHistPiPDCAZPos","dca z of Lambda pos daughters",200,0.0,20.0,200,-20.0,20.0);
1250 //fHistPiPDCAZNeg[0] = new TH2F("fHistPiPDCAZNeg","dca z of Lambda neg daughters",200,0.0,20.0,200,-20.0,20.0);
1251 fHistPiPTrackLengthPosVsMass[0] = new TH2F("fHistPiPTrackLengthPosVsMass","track length of pos Lambda daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1252 fHistPiPTrackLengthNegVsMass[0] = new TH2F("fHistPiPTrackLengthNegVsMass","track length of neg Lambda daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1253 }
5842a526 1254
76a4d7a7 1255 //AntiLambda
1256 if(!fSetPtDepHist){
1257 fHistPiAPDCADaughters[0] = new TH2F("fHistPiAPDCADaughters","dca of #bar{#Lambda} daughters",nbMass,1.05,1.25,250,0.0,2.0);
1258 fHistPiAPDCADaughterPosToPrimVtxVSMass[0] = new TH2F("fHistPiAPDCADaughterPosToPrimVtxVSMass","pos DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,10.0);
1259 fHistPiAPDCADaughterNegToPrimVtxVSMass[0] = new TH2F("fHistPiAPDCADaughterNegToPrimVtxVSMass","neg DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,10.0);
1260 fHistPiAPDCAVSMass[0] = new TH2F("fHistPiAPDCAVSMass","pi+p- dca vs pt",nbMass,1.05,1.25,250,0.0,5.0);
1261 fHistPiAPCosPointAng[0] = new TH2F("fHistPiAPCosPointAng","#bar{#Lambda} cosine of pointing angle vs mass",nbMass,1.05,1.25,200,0.99,1.00);
1262 fHistPiAPRadiusXY[0] = new TH2F("fHistPiAPRadiusXY","pi+p- phi dist vs mass",nbMass,1.05,1.25,200,0.0,4.0);
1263 // fHistPiAPPtDaughters[0] = new TH2F("fHistPiAPPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);
1264 // fHistPiAPDCAZPos[0] = new TH2F("fHistPiAPDCAZPos","dca z of ALambda pos daughters",nbMass,1.05,1.25,200,-20.0,20.0);
1265 //fHistPiAPDCAZNeg[0] = new TH2F("fHistPiAPDCAZNeg","dca z of ALambda neg daughters",nbMass,1.05,1.25,200,-20.0,20.0);
1266 fHistPiAPTrackLengthPosVsMass[0] = new TH2F("fHistPiAPTrackLengthPosVsMass","track length of pos ALambda daughter in TPC",nbMass,1.05,1.25,250,0.0,250.0);
1267 fHistPiAPTrackLengthNegVsMass[0] = new TH2F("fHistPiAPTrackLengthNegVsMass","track length of neg ALambda daughter in TPC",nbMass,1.05,1.25,250,0.0,250.0);
1268 }
1269 else{//pt dependence
1270 fHistPiAPDCADaughters[0] = new TH2F("fHistPiAPDCADaughters","dca of #bar{#Lambda} daughters",200,0.0,20.0,250,0.0,2.0);
1271 fHistPiAPDCADaughterPosToPrimVtxVSMass[0] = new TH2F("fHistPiAPDCADaughterPosToPrimVtxVSMass","pos DCA daughter to prim vtx vs invmass",200,0.0,20.0,250,0.0,10.0);
1272 fHistPiAPDCADaughterNegToPrimVtxVSMass[0] = new TH2F("fHistPiAPDCADaughterNegToPrimVtxVSMass","neg DCA daughter to prim vtx vs invmass",200,0.0,20.0,250,0.0,10.0);
1273 fHistPiAPDCAVSMass[0] = new TH2F("fHistPiAPDCAVSMass","pi+p- dca vs pt",200,0.0,20.0,250,0.0,5.0);
1274 fHistPiAPCosPointAng[0] = new TH2F("fHistPiAPCosPointAng","#bar{#Lambda} cosine of pointing angle vs mass",200,0.0,20.0,200,0.99,1.00);
1275 fHistPiAPRadiusXY[0] = new TH2F("fHistPiAPRadiusXY","pi+p- phi dist vs mass",200,0.0,20.0,200,0.0,4.0);
1276 // fHistPiAPDCAZPos[0] = new TH2F("fHistPiAPDCAZPos","dca z of ALambda pos daughters",200,0.0,20.0,200,-20.0,20.0);
1277 //fHistPiAPDCAZNeg[0] = new TH2F("fHistPiAPDCAZNeg","dca z of ALambda neg daughters",200,0.0,20.0,200,-20.0,20.0);
1278 fHistPiAPTrackLengthPosVsMass[0] = new TH2F("fHistPiAPTrackLengthPosVsMass","track length of pos ALambda daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1279 fHistPiAPTrackLengthNegVsMass[0] = new TH2F("fHistPiAPTrackLengthNegVsMass","track length of neg ALambda daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1280 }
aa3d4e29 1281
76a4d7a7 1282 //dedx
1283 fHistDedxSecProt[0] = new TH2F("fHistDedxSecProt","proton", nbPt, 0, 20, 100, 0, 400);
1284 fHistDedxSecPiPlus[0] = new TH2F("fHistDedxSecPiPlus","pi plus", nbPt, 0, 20, 100, 0, 400);
1285 fHistDedxSecAProt[0] = new TH2F("fHistDedxSecAProt","antiproton", nbPt, 0, 20, 100, 0, 400);
1286 fHistDedxSecPiMinus[0] = new TH2F("fHistDedxSecPiMinus","pi minus", nbPt, 0, 20, 100, 0, 400);
1287 fHistDedxProt[0] = new TH2F("fHistDedxProt","proton", nbPt, 0, 20, 100, 0, 400);
1288 fHistDedxPiPlus[0] = new TH2F("fHistDedxPiPlus","pi plus", nbPt, 0, 20, 100, 0, 400);
1289 fHistDedxAProt[0] = new TH2F("fHistDedxAProt","antiproton", nbPt, 0, 20, 100, 0, 400);
1290 fHistDedxPiMinus[0] = new TH2F("fHistDedxPiMinus","pi minus", nbPt, 0, 20, 100, 0, 400);
5842a526 1291
1292
76a4d7a7 1293 // ------------------------------------------ clusters --------------------------------------------------//
1294 fHistNclsITS[0] = new TH2F("fHistNclsITS","fHistNclsITS pos vs neg L",10,-0.5,9.5,10,-0.5,9.5);
1295 fHistNclsTPC[0] = new TH2F("fHistNclsTPC","ncls TPC neg vs crossed rows neg L",200,-0.5,199.5,200,-0.5,199.5);
5842a526 1296
76a4d7a7 1297 fHistNclsITS[1] = new TH2F("fHistNclsITSSec","fHistNclsITS pos vs neg K0",10,-0.5,9.5,10,-0.5,9.5);
1298 fHistNclsTPC[1] = new TH2F("fHistNclsTPCSec","ncls TPC neg vs crossed rows neg K0",200,-0.5,199.5,200,-0.5,199.5);
5842a526 1299
76a4d7a7 1300 if(!fSetPtDepHist){
1301 //K0s
1302 fHistNclsITSPosK0 = new TH2F("fHistNclsITSPosK0","fHistNclsITSPos vs pt K0 pos",nbMass,0.25,0.75,7,-0.5,6.5);
1303 fHistNclsITSNegK0 = new TH2F("fHistNclsITSNegK0","fHistNclsITSNeg vs pt K0 neg",nbMass,0.25,0.75,7,-0.5,6.5);
5842a526 1304
76a4d7a7 1305 fHistNclsTPCPosK0 = new TH2F("fHistNclsTPCPosK0","K0 mass vs phi pos",nbMass,0.25,0.75,200,0.0,200.0);
1306 fHistNclsTPCNegK0 = new TH2F("fHistNclsTPCNegK0","K0 mass vs phi neg",nbMass,0.25,0.75,200,0.0,200.0);
5842a526 1307
76a4d7a7 1308 fHistChi2PerNclsITSPosK0 = new TH2F("fHistChi2PerNclsITSPosK0","chi2 per cluster ITS K0 pos",nbMass,0.25,0.75,250,0.0,25.0);
1309 fHistChi2PerNclsITSNegK0 = new TH2F("fHistChi2PerNclsITSNegK0","chi2 per cluster ITS K0 neg",nbMass,0.25,0.75,250,0.0,25.0);
5842a526 1310
76a4d7a7 1311 fHistNCRowsTPCPosK0 = new TH2F("fHistNCRowsTPCPosK0","n crossed rows vs K0 pos",nbMass,0.25,0.75,200,0.0,200.0);
1312 fHistNCRowsTPCNegK0 = new TH2F("fHistNCRowsTPCNegK0","n crossed rows vs K0 neg",nbMass,0.25,0.75,200,0.0,200.0);
aa3d4e29 1313
76a4d7a7 1314 fHistRatioFoundOverFinableTPCK0Pos = new TH2F("fHistRatioFoundOverFinableTPCK0Pos","ncls found over findable K0 pos sec",nbMass,0.25,0.75,200,0.0,2.0);
1315 fHistRatioFoundOverFinableTPCK0Neg = new TH2F("fHistRatioFoundOverFinableTPCK0Neg","ncls found over findable K0 neg sec",nbMass,0.25,0.75,200,0.0,2.0);
1316 //Lambda
1317 fHistNclsITSPosL[0] = new TH2F("fHistNclsITSPosL","fHistNclsITSPos vs pt L pos",nbMass,1.05,1.25,7,-0.5,6.5);
1318 fHistNclsITSNegL[0] = new TH2F("fHistNclsITSNegL","fHistNclsITSNeg vs pt L neg",nbMass,1.05,1.25,7,-0.5,6.5);
5842a526 1319
76a4d7a7 1320 fHistNclsTPCPosL[0] = new TH2F("fHistNclsTPCPosL","L mass vs phi pos",nbMass,1.05,1.25,200,0.0,200.0);
1321 fHistNclsTPCNegL[0] = new TH2F("fHistNclsTPCNegL","L mass vs phi neg",nbMass,1.05,1.25,200,0.0,200.0);
5842a526 1322
76a4d7a7 1323 fHistChi2PerNclsITSPosL[0] = new TH2F("fHistChi2PerNclsITSPosL","chi2 per cluster ITS L pos",nbMass,1.05,1.25,250,0.0,25.0);
1324 fHistChi2PerNclsITSNegL[0] = new TH2F("fHistChi2PerNclsITSNegL","chi2 per cluster ITS L neg",nbMass,1.05,1.25,250,0.0,25.0);
5842a526 1325
76a4d7a7 1326 fHistNCRowsTPCPosL[0] = new TH2F("fHistNCRowsTPCPosL","n crossed rows vs L pos",nbMass,1.05,1.25,200,0.0,200.0);
1327 fHistNCRowsTPCNegL[0] = new TH2F("fHistNCRowsTPCNegL","n crossed rows vs L neg",nbMass,1.05,1.25,200,0.0,200.0);
5842a526 1328
76a4d7a7 1329 fHistRatioFoundOverFinableTPCLPos[0] = new TH2F("fHistRatioFoundOverFinableTPCLPos","ncls found over findable L pos sec",nbMass,1.05,1.25,200,0.0,2.0);
1330 fHistRatioFoundOverFinableTPCLNeg[0] = new TH2F("fHistRatioFoundOverFinableTPCLNeg","ncls found over findable L neg sec",nbMass,1.05,1.25,200,0.0,2.0);
1331 }
1332 else{//pt dependence
1333 //K0s
1334 fHistNclsITSPosK0 = new TH2F("fHistNclsITSPosK0","fHistNclsITSPos vs pt L pos",200,0.0,20.0,7,-0.5,6.5);
1335 fHistNclsITSNegK0 = new TH2F("fHistNclsITSNegK0","fHistNclsITSNeg vs pt L neg",200,0.0,20.0,7,-0.5,6.5);
5842a526 1336
76a4d7a7 1337 fHistNclsTPCPosK0 = new TH2F("fHistNclsTPCPosK0","L mass vs phi pos",200,0.0,20.0,200,0.0,200.0);
1338 fHistNclsTPCNegK0 = new TH2F("fHistNclsTPCNegK0","L mass vs phi neg",200,0.0,20.0,200,0.0,200.0);
5842a526 1339
76a4d7a7 1340 fHistChi2PerNclsITSPosK0 = new TH2F("fHistChi2PerNclsITSPosK0","chi2 per cluster ITS L pos",200,0.0,20.0,250,0.0,25.0);
1341 fHistChi2PerNclsITSNegK0 = new TH2F("fHistChi2PerNclsITSNegK0","chi2 per cluster ITS L neg",200,0.0,20.0,250,0.0,25.0);
5842a526 1342
76a4d7a7 1343 fHistNCRowsTPCPosK0 = new TH2F("fHistNCRowsTPCPosK0","n crossed rows vs L pos",200,0.0,20.0,200,0.0,200.0);
1344 fHistNCRowsTPCNegK0 = new TH2F("fHistNCRowsTPCNegK0","n crossed rows vs L neg",200,0.0,20.0,200,0.0,200.0);
aa3d4e29 1345
76a4d7a7 1346 fHistRatioFoundOverFinableTPCK0Pos = new TH2F("fHistRatioFoundOverFinableTPCK0Pos","ncls found over findable L pos sec",200,0.0,20.0,200,0.0,2.0);
1347 fHistRatioFoundOverFinableTPCK0Neg = new TH2F("fHistRatioFoundOverFinableTPCK0Neg","ncls found over findable L neg sec",200,0.0,20.0,200,0.0,2.0);
1348 //Lambda
1349 fHistNclsITSPosL[0] = new TH2F("fHistNclsITSPosL","fHistNclsITSPos vs pt L pos",200,0.0,20.0,7,-0.5,6.5);
1350 fHistNclsITSNegL[0] = new TH2F("fHistNclsITSNegL","fHistNclsITSNeg vs pt L neg",200,0.0,20.0,7,-0.5,6.5);
5842a526 1351
76a4d7a7 1352 fHistNclsTPCPosL[0] = new TH2F("fHistNclsTPCPosL","L mass vs phi pos",200,0.0,20.0,200,0.0,200.0);
1353 fHistNclsTPCNegL[0] = new TH2F("fHistNclsTPCNegL","L mass vs phi neg",200,0.0,20.0,200,0.0,200.0);
5842a526 1354
76a4d7a7 1355 fHistChi2PerNclsITSPosL[0] = new TH2F("fHistChi2PerNclsITSPosL","chi2 per cluster ITS L pos",200,0.0,20.0,250,0.0,25.0);
1356 fHistChi2PerNclsITSNegL[0] = new TH2F("fHistChi2PerNclsITSNegL","chi2 per cluster ITS L neg",200,0.0,20.0,250,0.0,25.0);
5842a526 1357
76a4d7a7 1358 fHistNCRowsTPCPosL[0] = new TH2F("fHistNCRowsTPCPosL","n crossed rows vs L pos",200,0.0,20.0,200,0.0,200.0);
1359 fHistNCRowsTPCNegL[0] = new TH2F("fHistNCRowsTPCNegL","n crossed rows vs L neg",200,0.0,20.0,200,0.0,200.0);
aa3d4e29 1360
76a4d7a7 1361 fHistRatioFoundOverFinableTPCLPos[0] = new TH2F("fHistRatioFoundOverFinableTPCLPos","ncls found over findable L pos sec",200,0.0,20.0,200,0.0,2.0);
1362 fHistRatioFoundOverFinableTPCLNeg[0] = new TH2F("fHistRatioFoundOverFinableTPCLNeg","ncls found over findable L neg sec",200,0.0,20.0,200,0.0,2.0);
aa3d4e29 1363
11e769d9 1364 }
1365
76a4d7a7 1366 // --------------------------------------------- for MC reco secondaries -----------------------------------------//
1367 if(mchist==2){// for MC reco
1368
1369 //K0
1370 //Lambda
1371 if(!fSetPtDepHist){
1372 fHistPiPDCADaughters[1] = new TH2F("fHistPiPDCADaughtersSec","dca of #Lambda daughters",nbMass,1.05,1.25,250,0.0,2.0);
1373 fHistPiPDCADaughterPosToPrimVtxVSMass[1] = new TH2F("fHistPiPDCADaughterPosToPrimVtxVSMassSec","pos sec DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,10.0);
1374 fHistPiPDCADaughterNegToPrimVtxVSMass[1] = new TH2F("fHistPiPDCADaughterNegToPrimVtxVSMassSec","neg sec DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,10.0);
1375 fHistPiPDCAVSMass[1] = new TH2F("fHistPiPDCAVSMassSec","ppi- dca vs pt",nbMass,1.05,1.25,250,0.0,5.0);
1376 fHistPiPCosPointAng[1] = new TH2F("fHistPiPCosPointAngSec","#Lambda cosine of pointing angle vs mass",nbMass,1.05,1.25,200,0.99,1.00);
1377 // fHistPiPDecayLengthVsMass[1] = new TH2F("fHistPiPDecayLengthVsMassSec","#Lambda decay length vs mass",nbMass,1.05,1.25,200,0.0,100.0);
1378 fHistPiPRadiusXY[1] = new TH2F("fHistPiPRadiusXYSec","pi-p+ phi dist vs mass",nbMass,1.05,1.25,200,0.0,4.0);
1379 // fHistPiPPtDaughters[0] = new TH2F("fHistPiPPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);
1380 // fHistPiPDCAZPos[1] = new TH2F("fHistPiPDCAZPosSec","dca z of Lambda sec pos daughters",nbMass,1.05,1.25,200,-20.0,20.0);
1381 // fHistPiPDCAZNeg[1] = new TH2F("fHistPiPDCAZNegSec","dca z of Lambda sec neg daughters",nbMass,1.05,1.25,200,-20.0,20.0);
1382 fHistPiPTrackLengthPosVsMass[1] = new TH2F("fHistPiPTrackLengthPosVsMassSec","track length of pos sec Lambda daughter in TPC",nbMass,1.05,1.25,250,0.0,250.0);
1383 fHistPiPTrackLengthNegVsMass[1] = new TH2F("fHistPiPTrackLengthNegVsMassSec","track length of neg sec Lambda daughter in TPC",nbMass,1.05,1.25,250,0.0,250.0);
1384 }
1385 else{
1386 fHistPiPDCADaughters[1] = new TH2F("fHistPiPDCADaughtersSec","dca of #Lambda daughters",200,0.0,20.0,250,0.0,2.0);
1387 fHistPiPDCADaughterPosToPrimVtxVSMass[1] = new TH2F("fHistPiPDCADaughterPosToPrimVtxVSMassSec","pos sec DCA daughter to prim vtx vs invmass",200,0.0,20.0,250,0.0,10.0);
1388 fHistPiPDCADaughterNegToPrimVtxVSMass[1] = new TH2F("fHistPiPDCADaughterNegToPrimVtxVSMassSec","neg sec DCA daughter to prim vtx vs invmass",200,0.0,20.0,250,0.0,10.0);
1389 fHistPiPDCAVSMass[1] = new TH2F("fHistPiPDCAVSMassSec","ppi- dca vs pt",200,0.0,20.0,250,0.0,5.0);
1390 fHistPiPCosPointAng[1] = new TH2F("fHistPiPCosPointAngSec","#Lambda cosine of pointing angle vs mass",200,0.0,20.0,200,0.99,1.00);
1391 fHistPiPRadiusXY[1] = new TH2F("fHistPiPRadiusXYSec","pi-p+ phi dist vs mass",200,0.0,20.0,200,0.0,4.0);
1392 // fHistPiPDCAZPos[1] = new TH2F("fHistPiPDCAZPosSec","dca z of Lambda sec pos daughters",200,0.0,20.0,200,-20.0,20.0);
1393 //fHistPiPDCAZNeg[1] = new TH2F("fHistPiPDCAZNegSec","dca z of Lambda sec neg daughters",200,0.0,20.0,200,-20.0,20.0);
1394 fHistPiPTrackLengthPosVsMass[1] = new TH2F("fHistPiPTrackLengthPosVsMassSec","track length of pos sec Lambda daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1395 fHistPiPTrackLengthNegVsMass[1] = new TH2F("fHistPiPTrackLengthNegVsMassSec","track length of neg sec Lambda daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1396 }
1397
1398 //ALambda
1399 if(!fSetPtDepHist){
1400 fHistPiAPDCADaughters[1] = new TH2F("fHistPiAPDCADaughtersSec","dca of #bar{#Lambda} daughters",nbMass,1.05,1.25,250,0.0,2.0);
1401 fHistPiAPDCADaughterPosToPrimVtxVSMass[1] = new TH2F("fHistPiAPDCADaughterPosToPrimVtxVSMassSec","pos sec DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,10.0);
1402 fHistPiAPDCADaughterNegToPrimVtxVSMass[1] = new TH2F("fHistPiAPDCADaughterNegToPrimVtxVSMassSec","neg sec DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,10.0);
1403 fHistPiAPDCAVSMass[1] = new TH2F("fHistPiAPDCAVSMassSec","pi+p- dca vs pt",nbMass,1.05,1.25,250,0.0,5.0);
1404 fHistPiAPCosPointAng[1] = new TH2F("fHistPiAPCosPointAngSec","#bar{#Lambda} cosine of pointing angle vs mass",nbMass,1.05,1.25,200,0.99,1.00);
1405 // fHistPiAPDecayLengthVsMass[1] = new TH2F("fHistPiAPDecayLengthVsMassSec","#bar{#Lambda} decay length vs mass",nbMass,1.05,1.25,200,0.0,100.0);
1406 fHistPiAPRadiusXY[1] = new TH2F("fHistPiAPRadiusXYSec","pi+p- phi dist vs mass",nbMass,1.05,1.25,200,0.0,4.0);
1407 // fHistPiAPPtDaughters[0] = new TH2F("fHistPiAPPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);
1408 // fHistPiAPDCAZPos[1] = new TH2F("fHistPiAPDCAZPosSec","dca z of ALambda sec pos daughters",nbMass,1.05,1.25,200,-20.0,20.0);
1409 //fHistPiAPDCAZNeg[1] = new TH2F("fHistPiAPDCAZNegSec","dca z of ALambda sec neg daughters",nbMass,1.05,1.25,200,-20.0,20.0);
1410 fHistPiAPTrackLengthPosVsMass[1] = new TH2F("fHistPiAPTrackLengthPosVsMassSec","track length of pos sec ALambda daughter in TPC",nbMass,1.05,1.25,250,0.0,250.0);
1411 fHistPiAPTrackLengthNegVsMass[1] = new TH2F("fHistPiAPTrackLengthNegVsMassSec","track length of neg sec ALambda daughter in TPC",nbMass,1.05,1.25,250,0.0,250.0);
1412 }
1413 else{
1414 fHistPiAPDCADaughters[1] = new TH2F("fHistPiAPDCADaughtersSec","dca of #bar{#Lambda} daughters",200,0.0,20.0,250,0.0,2.0);
1415 fHistPiAPDCADaughterPosToPrimVtxVSMass[1] = new TH2F("fHistPiAPDCADaughterPosToPrimVtxVSMassSec","pos sec DCA daughter to prim vtx vs invmass",200,0.0,20.0,250,0.0,10.0);
1416 fHistPiAPDCADaughterNegToPrimVtxVSMass[1] = new TH2F("fHistPiAPDCADaughterNegToPrimVtxVSMassSec","neg sec DCA daughter to prim vtx vs invmass",200,0.0,20.0,250,0.0,10.0);
1417 fHistPiAPDCAVSMass[1] = new TH2F("fHistPiAPDCAVSMassSec","pi+p- dca vs pt",200,0.0,20.0,250,0.0,5.0);
1418 fHistPiAPCosPointAng[1] = new TH2F("fHistPiAPCosPointAngSec","#bar{#Lambda} cosine of pointing angle vs mass",200,0.0,20.0,200,0.99,1.00);
1419 fHistPiAPRadiusXY[1] = new TH2F("fHistPiAPRadiusXYSec","pi+p- phi dist vs mass",200,0.0,20.0,200,0.0,4.0);
1420 // fHistPiAPDCAZPos[1] = new TH2F("fHistPiAPDCAZPosSec","dca z of ALambda sec pos daughters",200,0.0,20.0,200,-20.0,20.0);
1421 //fHistPiAPDCAZNeg[1] = new TH2F("fHistPiAPDCAZNegSec","dca z of ALambda sec neg daughters",200,0.0,20.0,200,-20.0,20.0);
1422 fHistPiAPTrackLengthPosVsMass[1] = new TH2F("fHistPiAPTrackLengthPosVsMassSec","track length of pos sec ALambda daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1423 fHistPiAPTrackLengthNegVsMass[1] = new TH2F("fHistPiAPTrackLengthNegVsMassSec","track length of neg sec ALambda daughter in TPC",200,0.0,20.0,250,0.0,250.0);
1424 }
aa3d4e29 1425
76a4d7a7 1426 //dedx
1427 fHistDedxSecProt[1] = new TH2F("fHistDedxSecProtSec","proton", nbPt, 0, 20, 100, 0, 400);
1428 fHistDedxSecPiPlus[1] = new TH2F("fHistDedxSecPiPlusSec","pi plus", nbPt, 0, 20, 100, 0, 400);
1429 fHistDedxSecAProt[1] = new TH2F("fHistDedxSecAProtSec","antiproton", nbPt, 0, 20, 100, 0, 400);
1430 fHistDedxSecPiMinus[1] = new TH2F("fHistDedxSecPiMinusSec","pi minus", nbPt, 0, 20, 100, 0, 400);
1431 fHistDedxProt[1] = new TH2F("fHistDedxProtSec","proton", nbPt, 0, 20, 100, 0, 400);
1432 fHistDedxPiPlus[1] = new TH2F("fHistDedxPiPlusSec","pi plus", nbPt, 0, 20, 100, 0, 400);
1433 fHistDedxAProt[1] = new TH2F("fHistDedxAProtSec","antiproton", nbPt, 0, 20, 100, 0, 400);
1434 fHistDedxPiMinus[1] = new TH2F("fHistDedxPiMinusSec","pi minus", nbPt, 0, 20, 100, 0, 400);
1435
1436 // ------------------------------------------ clusters --------------------------------------------------//
1437 if(!fSetPtDepHist){
1438 fHistNclsITSPosL[1] = new TH2F("fHistNclsITSPosLSec","fHistNclsITSPos vs pt L pos",nbMass,1.05,1.25,7,-0.5,6.5);
1439 fHistNclsITSNegL[1] = new TH2F("fHistNclsITSNegLSec","fHistNclsITSNeg vs pt L neg",nbMass,1.05,1.25,7,-0.5,6.5);
5842a526 1440
76a4d7a7 1441 fHistNclsTPCPosL[1] = new TH2F("fHistNclsTPCPosLSec","L mass vs phi pos",nbMass,1.05,1.25,200,0.0,200.0);
1442 fHistNclsTPCNegL[1] = new TH2F("fHistNclsTPCNegLSec","L mass vs phi neg",nbMass,1.05,1.25,200,0.0,200.0);
5842a526 1443
76a4d7a7 1444 fHistChi2PerNclsITSPosL[1] = new TH2F("fHistChi2PerNclsITSPosLSec","chi2 per cluster ITS L pos",nbMass,1.05,1.25,250,0.0,25.0);
1445 fHistChi2PerNclsITSNegL[1] = new TH2F("fHistChi2PerNclsITSNegLSec","chi2 per cluster ITS L neg",nbMass,1.05,1.25,250,0.0,25.0);
5842a526 1446
76a4d7a7 1447 fHistNCRowsTPCPosL[1] = new TH2F("fHistNCRowsTPCPosLSec","n crossed rows vs L pos",nbMass,1.05,1.25,200,0.0,200.0);
1448 fHistNCRowsTPCNegL[1] = new TH2F("fHistNCRowsTPCNegLSec","n crossed rows vs L neg",nbMass,1.05,1.25,200,0.0,200.0);
aa3d4e29 1449
76a4d7a7 1450 fHistRatioFoundOverFinableTPCLPos[1] = new TH2F("fHistRatioFoundOverFinableTPCLPosSec","ncls found over findable L pos sec",nbMass,1.05,1.25,200,0.0,2.0);
1451 fHistRatioFoundOverFinableTPCLNeg[1] = new TH2F("fHistRatioFoundOverFinableTPCLNegSec","ncls found over findable L neg sec",nbMass,1.05,1.25,200,0.0,2.0);
1452 }
1453 else{
1454 fHistNclsITSPosL[1] = new TH2F("fHistNclsITSPosLSec","fHistNclsITSPos vs pt L pos",200,0.0,20.0,7,-0.5,6.5);
1455 fHistNclsITSNegL[1] = new TH2F("fHistNclsITSNegLSec","fHistNclsITSNeg vs pt L neg",200,0.0,20.0,7,-0.5,6.5);
5842a526 1456
76a4d7a7 1457 fHistNclsTPCPosL[1] = new TH2F("fHistNclsTPCPosLSec","L mass vs phi pos",200,0.0,20.0,200,0.0,200.0);
1458 fHistNclsTPCNegL[1] = new TH2F("fHistNclsTPCNegLSec","L mass vs phi neg",200,0.0,20.0,200,0.0,200.0);
5842a526 1459
76a4d7a7 1460 fHistChi2PerNclsITSPosL[1] = new TH2F("fHistChi2PerNclsITSPosLSec","chi2 per cluster ITS L pos",200,0.0,20.0,250,0.0,25.0);
1461 fHistChi2PerNclsITSNegL[1] = new TH2F("fHistChi2PerNclsITSNegLSec","chi2 per cluster ITS L neg",200,0.0,20.0,250,0.0,25.0);
5842a526 1462
76a4d7a7 1463 fHistNCRowsTPCPosL[1] = new TH2F("fHistNCRowsTPCPosLSec","n crossed rows vs L pos",200,0.0,20.0,200,0.0,200.0);
1464 fHistNCRowsTPCNegL[1] = new TH2F("fHistNCRowsTPCNegLSec","n crossed rows vs L neg",200,0.0,20.0,200,0.0,200.0);
aa3d4e29 1465
76a4d7a7 1466 fHistRatioFoundOverFinableTPCLPos[1] = new TH2F("fHistRatioFoundOverFinableTPCLPosSec","ncls found over findable L pos sec",200,0.0,20.0,200,0.0,2.0);
1467 fHistRatioFoundOverFinableTPCLNeg[1] = new TH2F("fHistRatioFoundOverFinableTPCLNegSec","ncls found over findable L neg sec",200,0.0,20.0,200,0.0,2.0);
1468 }
11e769d9 1469
76a4d7a7 1470 }
aa3d4e29 1471
76a4d7a7 1472 //------ ITS TPC clusters --------------
1473 fOutputContainer->Add(fHistNclsITS[0]) ;
1474 fOutputContainer->Add(fHistNclsTPC[0]);
1475 fOutputContainer->Add(fHistNclsITS[1]);
1476 fOutputContainer->Add(fHistNclsTPC[1]);
1477
1478 //-----------K0s ------------------
1479 fOutputContainer->Add(fHistPiPiDCAZNeg);
1480 fOutputContainer->Add(fHistPiPiDCAZPos);
1481 fOutputContainer->Add(fHistPiPiDCADaughters);
1482 fOutputContainer->Add(fHistPiPiDCADaughterPosToPrimVtxVSMass);
1483 fOutputContainer->Add(fHistPiPiDCAVSMass);
1484 fOutputContainer->Add(fHistPiPiCosPointAng);
1485 fOutputContainer->Add(fHistPiPiTrackLengthPosVsMass);
1486 fOutputContainer->Add(fHistPiPiTrackLengthNegVsMass);
1487 fOutputContainer->Add(fHistPiPiRadiusXY);
1488 // fOutputContainer->Add( fHistPiPiPtDaughters);
1489 fOutputContainer->Add(fHistNclsITSPosK0);
1490 fOutputContainer->Add(fHistNclsITSNegK0);
1491 fOutputContainer->Add(fHistNclsTPCPosK0);
1492 fOutputContainer->Add(fHistNclsTPCNegK0);
1493 fOutputContainer->Add(fHistChi2PerNclsITSPosK0);
1494 fOutputContainer->Add(fHistChi2PerNclsITSNegK0);
1495 fOutputContainer->Add(fHistNCRowsTPCPosK0);
1496 fOutputContainer->Add(fHistNCRowsTPCNegK0);
1497 fOutputContainer->Add(fHistRatioFoundOverFinableTPCK0Pos);
1498 fOutputContainer->Add(fHistRatioFoundOverFinableTPCK0Neg);
1499
1500 //----------- Lambda Antilambda -------------
1501 for(Int_t j=0;j<mchist;j++){
1502 fOutputContainer->Add(fHistPiPDCADaughters[j]);
1503 fOutputContainer->Add(fHistPiAPDCADaughters[j]);
1504 fOutputContainer->Add( fHistPiPDCADaughterPosToPrimVtxVSMass[j]);
1505 fOutputContainer->Add( fHistPiPDCADaughterNegToPrimVtxVSMass[j]);
1506 fOutputContainer->Add( fHistPiAPDCADaughterPosToPrimVtxVSMass[j]);
1507 fOutputContainer->Add( fHistPiAPDCADaughterNegToPrimVtxVSMass[j]);
1508 //fOutputContainer->Add( fHistPiPPtDaughters[j]);
1509 //fOutputContainer->Add( fHistPiAPPtDaughters[j]);
1510 fOutputContainer->Add(fHistPiPDCAVSMass[j]);
1511 fOutputContainer->Add(fHistPiAPDCAVSMass[j]);
1512 fOutputContainer->Add(fHistPiPCosPointAng[j]);
1513 fOutputContainer->Add(fHistPiAPCosPointAng[j]);
1514 //fOutputContainer->Add(fHistPiPDCAZNeg[j]);
1515 //fOutputContainer->Add(fHistPiPDCAZPos[j]);
1516 //fOutputContainer->Add(fHistPiAPDCAZNeg[j]);
1517 //fOutputContainer->Add(fHistPiAPDCAZPos[j]);
1518 fOutputContainer->Add(fHistPiPTrackLengthPosVsMass[j]);
1519 fOutputContainer->Add(fHistPiPTrackLengthNegVsMass[j]);
1520 fOutputContainer->Add(fHistPiAPTrackLengthPosVsMass[j]);
1521 fOutputContainer->Add(fHistPiAPTrackLengthNegVsMass[j]);
1522 fOutputContainer->Add(fHistPiPRadiusXY[j]);
1523 fOutputContainer->Add(fHistPiAPRadiusXY[j]);
5842a526 1524
76a4d7a7 1525 //--------- dEdx --------------------------//
1526 fOutputContainer->Add(fHistDedxSecProt[j]);
1527 fOutputContainer->Add(fHistDedxSecAProt[j]);
1528 fOutputContainer->Add(fHistDedxSecPiPlus[j]);
1529 fOutputContainer->Add(fHistDedxSecPiMinus[j]);
1530 fOutputContainer->Add(fHistDedxProt[j]);
1531 fOutputContainer->Add(fHistDedxAProt[j]);
1532 fOutputContainer->Add(fHistDedxPiPlus[j]);
1533 fOutputContainer->Add(fHistDedxPiMinus[j]);
1534
1535 //--------- TPC Lambda-----------------
1536 fOutputContainer->Add(fHistNclsITSPosL[j]);
1537 fOutputContainer->Add(fHistNclsITSNegL[j]);
1538 fOutputContainer->Add(fHistNclsTPCPosL[j]);
1539 fOutputContainer->Add(fHistNclsTPCNegL[j]);
1540 fOutputContainer->Add(fHistChi2PerNclsITSPosL[j]);
1541 fOutputContainer->Add(fHistChi2PerNclsITSNegL[j]);
1542 fOutputContainer->Add(fHistNCRowsTPCPosL[j]);
1543 fOutputContainer->Add(fHistNCRowsTPCNegL[j]);
1544 fOutputContainer->Add(fHistRatioFoundOverFinableTPCLPos[j]);
1545 fOutputContainer->Add(fHistRatioFoundOverFinableTPCLNeg[j]);
1546 }
11e769d9 1547 }
76a4d7a7 1548
1549 //----------------------------- MC reco or MC truth only --------------------------//
1550 if((fMCMode && fMCTruthMode) || fMCTruthMode){//mc reco truth only
1551 if(fAnapp){
1552 fHistPrimVtxZESDVSNContributorsMC = new TH2F("fHistPrimVtxZESDVSNContributorsMC","prim vtx pos z ESD vs no. of contributers MC",250,-50,50,500,0.0,500.0);
1553 fOutputContainer->Add(fHistPrimVtxZESDVSNContributorsMC);
1554 fHistPrimVtxZESDTPCVSNContributorsMC = new TH2F("fHistPrimVtxZESDTPCVSNContributorsMC","prim vtx pos z TPC vs no. of contributers MC",250,-50,50,500,0.0,500.0);
1555 fOutputContainer->Add(fHistPrimVtxZESDTPCVSNContributorsMC);
1556 fHistPrimVtxZESDSPDVSNContributorsMC = new TH2F("fHistPrimVtxZESDSPDVSNContributorsMC","prim vtx pos z SPD vs no. of contributers MC",250,-50,50,500,0.0,500.0);
1557 fOutputContainer->Add(fHistPrimVtxZESDSPDVSNContributorsMC);
1558 }
1559 fHistMCVertexZ= new TH1F("fHistMCVertexZ"," z vertex distr in cm MC",500,-50,50);
1560 fOutputContainer->Add(fHistMCVertexZ);
1561 fHistPiPiPDGCode = new TH1F("fHistPiPiPDGCode","PDG code of K0s mothers",3500,0,3500);
1562 fOutputContainer->Add(fHistPiPiPDGCode);
1563 fHistPiPPDGCode = new TH1F("fHistPiPPDGCode","PDG code of #Lambda mothers",3500,0,3500);
1564 fOutputContainer->Add(fHistPiPPDGCode);
1565 fHistPiAPPDGCode = new TH1F("fHistPiAPPDGCode","PDG code of #bar{#Lambda} mothers",3500,0,3500);
1566 fOutputContainer->Add(fHistPiAPPDGCode);
1567 fHistPiPCosPointAngXiVsPt= new TH2F("fHistPiPCosPointAngXiVsPt","pi-p cos of pointing angle vs pt from xi",200,0.0,20.0,250,0.99,1.00);
1568 fOutputContainer->Add(fHistPiPCosPointAngXiVsPt);
1569 fHistPiAPCosPointAngXiVsPt= new TH2F("fHistPiAPCosPointAngXiVsPt","pi+p- cos of pointing angle vs pt from xi",200,0.0,20.0,250,0.99,1.00);
1570 fOutputContainer->Add(fHistPiAPCosPointAngXiVsPt);
1571 fHistPiPiEtaDMC[0] = new TH2F("fHistPiPiEtaDMCRaw","K0s daughters etaMC raw",300,-6,6,100,0,20);//
1572 fOutputContainer->Add(fHistPiPiEtaDMC[0]);
1573 fHistPiPiEtaDMC[1] = new TH2F("fHistPiPiEtaDMC","K0s daughters etaMC after rap V0 cut",300,-6,6,100,0,20);
1574 fOutputContainer->Add(fHistPiPiEtaDMC[1]);
1575 fHistPiPEtaDMC[0] = new TH2F("fHistPiPEtaDMCRaw","#Lambda daughters etaMC raw",300,-6,6,100,0,20);
1576 fOutputContainer->Add(fHistPiPEtaDMC[0]);
1577 fHistPiPEtaDMC[1] = new TH2F("fHistPiPEtaDMC","#Lambda daughters etaMC after rap V0 cut",300,-6,6,100,0,20);
1578 fOutputContainer->Add(fHistPiPEtaDMC[1]);
1579
1580 //-------------K0s
aa3d4e29 1581
76a4d7a7 1582 fHistPiPiDecayLengthResolution = new TH2F("fHistPiPiDecayLengthResolution","K0s decay length resolution MC",220,0.0,110.0,220,0.0,110);
5842a526 1583
76a4d7a7 1584 //-------------Lambda
1585 fHistPiPDecayLengthResolution[0] = new TH2F("fHistPiPDecayLengthResolution","Lambda decay length resolution MC",220,0.0,110.0,220,0.0,110);
1586 fHistPiPDecayLengthResolution[1] = new TH2F("fHistPiPDecayLengthResolutionSec","Lambda sec decay length resolution MC",220,0.0,110.0,220,0.0,110);
aa3d4e29 1587
76a4d7a7 1588 fHistPiPMassVSPtSecSigma[0] = new TH2F("fHistPiPMassVSPtSecSigmaMC"," pi-p+ InvMass distribution secondaries from sigma MC",nbMass,1.05,1.25,200,0.,20);
1589 fHistPiPMassVSPtSecSigma[1] = new TH2F("fHistPiPMassVSPtSecSigma"," pi-p+ InvMass distribution secondaries from Sigma reco",nbMass,1.05,1.25,200,0.,20);
aa3d4e29 1590
76a4d7a7 1591 fHistPiPMassVSPtSecXi[0] = new TH2F("fHistPiPMassVSPtSecXiMC"," pi-p+ InvMass distribution secondaries from xi MC",nbMass,1.05,1.25,200,0.,20);
1592 fHistPiPMassVSPtSecXi[1] = new TH2F("fHistPiPMassVSPtSecXi"," pi-p+ InvMass distribution secondaries from xi reco",nbMass,1.05,1.25,200,0.,20);
aa3d4e29 1593
76a4d7a7 1594 fHistPiPMassVSPtSecXiMCTruth = new TH2F("fHistPiPMassVSPtSecXiMCTruth","Lambda mass reco vs pt sec Lambda from xi MC truth pt",nbMass,1.05,1.25,200,0.0,20.0);
aa3d4e29 1595
76a4d7a7 1596 fHistPiPMassVSYSecXi[0] = new TH2F("fHistPiPMassVSYSecXiMC"," pi-p+ InvMass distribution secondaries from xi MC",nbMass,1.05,1.25,100,-2.,2);
1597 fHistPiPMassVSYSecXi[1] = new TH2F("fHistPiPMassVSYSecXi"," pi-p+ InvMass distribution secondaries from xi reco",nbMass,1.05,1.25,100,-2.,2);
aa3d4e29 1598
76a4d7a7 1599 fHistPiPXi0PtVSLambdaPt[0]= new TH2F("fHistPiPXi0PtVSLambdaPtMC"," pt xi 0 vs pt lambda MC truth",200,0.0,20.0,200,0.0,20.0);
1600 fHistPiPXi0PtVSLambdaPt[1]= new TH2F("fHistPiPXi0PtVSLambdaPt"," pt xi 0 truth vs pt lambda reco",200,0.0,20.0,200,0.0,20.0);
aa3d4e29 1601
76a4d7a7 1602 fHistPiPXiMinusPtVSLambdaPt[0]= new TH2F("fHistPiPXiMinusPtVSLambdaPtMC","pt xi- vs pt lambda MC truth",200,0.0,20.0,200,0.0,20.0);
1603 fHistPiPXiMinusPtVSLambdaPt[1]= new TH2F("fHistPiPXiMinusPtVSLambdaPt","pt xi- truth vs pt lambda reco",200,0.0,20.0,200,0.0,20.0);
aa3d4e29 1604
76a4d7a7 1605 fHistPiPOmegaPtVSLambdaPt[0] = new TH2F("fHistPiPOmegaPtVSLambdaPtMC","pt omega vs pt lambda MC truth",200,0.0,20.0,200,0.0,20.0);
1606 fHistPiPOmegaPtVSLambdaPt[1] = new TH2F("fHistPiPOmegaPtVSLambdaPt","pt omega vs pt lambda MC reco",200,0.0,20.0,200,0.0,20.0);
aa3d4e29 1607
76a4d7a7 1608 fHistPiPMassVSPtSecOmega[0] = new TH2F("fHistPiPMassVSPtSecOmegaMC","Lambda mass vs pt omega MCtruth",nbMass,1.05,1.25,200,0.0,20.0);
1609 fHistPiPMassVSPtSecOmega[1] = new TH2F("fHistPiPMassVSPtSecOmega","Lambda mass vs pt omega MCreco",nbMass,1.05,1.25,200,0.0,20.0);
1610 fHistPiPMassVSPtSecOmegaMCTruth= new TH2F("fHistPiPMassVSPtSecOmegaMCTruth","Lambda mass vs pt sec Lambda from Omega MC truth pt",nbMass,1.05,1.25,200,0.0,20.0);
aa3d4e29 1611
76a4d7a7 1612 //--------------ALambda
1613 fHistPiAPDecayLengthResolution[0] = new TH2F("fHistPiAPDecayLengthResolution","ALambda decay length resolution MC",220,0.0,110.0,220,0.0,110);
1614 fHistPiAPDecayLengthResolution[1] = new TH2F("fHistPiAPDecayLengthResolutionSec","ALambda sec decay length resolution MC",220,0.0,110.0,220,0.0,110);
aa3d4e29 1615
76a4d7a7 1616 fHistPiAPMassVSPtSecSigma[0] = new TH2F("fHistPiAPMassVSPtSecSigmaMC"," pi+p- InvMass distribution secondaries from Sigma MC",nbMass,1.05,1.25,200,0.,20);
1617 fHistPiAPMassVSPtSecSigma[1] = new TH2F("fHistPiAPMassVSPtSecSigma"," pi+p- InvMass distribution secondaries from Sigma reco",nbMass,1.05,1.25,200,0.,20);
aa3d4e29 1618
76a4d7a7 1619 fHistPiAPMassVSPtSecXi[0] = new TH2F("fHistPiAPMassVSPtSecXiMC"," pi+p- InvMass distribution secondaries from xi MC",nbMass,1.05,1.25,200,0.,20);
1620 fHistPiAPMassVSPtSecXi[1] = new TH2F("fHistPiAPMassVSPtSecXi"," pi+p- InvMass distribution secondaries from Xi reco",nbMass,1.05,1.25,200,0.,20);
aa3d4e29 1621
76a4d7a7 1622 fHistPiAPMassVSPtSecXiMCTruth = new TH2F("fHistPiAPMassVSPtSecXiMCTruth","ALambda mass reco vs pt sec Lambda from xi MC truth pt",nbMass,1.05,1.25,200,0.0,20.0);
aa3d4e29 1623
76a4d7a7 1624 fHistPiAPMassVSYSecXi[0] = new TH2F("fHistPiAPMassVSYSecXiMC"," pi+p- InvMass distribution secondaries from xi MC",nbMass,1.05,1.25,100,-2,2);
1625 fHistPiAPMassVSYSecXi[1] = new TH2F("fHistPiAPMassVSYSecXi"," pi+p- InvMass distribution secondaries from xi reco",nbMass,1.05,1.25,100,-2.,2);
aa3d4e29 1626
1627
76a4d7a7 1628 fHistPiAPXi0PtVSLambdaPt[0]= new TH2F("fHistPiAPXi0PtVSLambdaPtMC"," pt xi 0 vs pt Alambda MC truth",200,0.0,20.0,200,0.0,20.0);
1629 fHistPiAPXi0PtVSLambdaPt[1]= new TH2F("fHistPiAPXi0PtVSLambdaPt"," pt xi 0 truth vs pt Alambda reco",200,0.0,20.0,200,0.0,20.0);
aa3d4e29 1630
76a4d7a7 1631 fHistPiAPXiMinusPtVSLambdaPt[0]= new TH2F("fHistPiAPXiMinusPtVSLambdaPtMC","pt xi- vs pt Alambda MC truth",200,0.0,20.0,200,0.0,20.0);
1632 fHistPiAPXiMinusPtVSLambdaPt[1]= new TH2F("fHistPiAPXiMinusPtVSLambdaPt","pt xi- truth vs pt Alambda reco",200,0.0,20.0,200,0.0,20.0);
aa3d4e29 1633
76a4d7a7 1634 fHistPiAPOmegaPtVSLambdaPt[0] = new TH2F("fHistPiAPOmegaPtVSLambdaPtMC","pt omega vs pt alambda MC truth",200,0.0,20.0,200,0.0,20.0);
1635 fHistPiAPOmegaPtVSLambdaPt[1] = new TH2F("fHistPiAPOmegaPtVSLambdaPt","pt omega vs pt alambda MC reco",200,0.0,20.0,200,0.0,20.0);
aa3d4e29 1636
76a4d7a7 1637 fHistPiAPMassVSPtSecOmega[0] = new TH2F("fHistPiAPMassVSPtSecOmegaMC","ALambda mass vs pt omega MCtruth",nbMass,1.05,1.25,200,0.0,20.0);
1638 fHistPiAPMassVSPtSecOmega[1] = new TH2F("fHistPiAPMassVSPtSecOmega","ALambda mass vs pt omega MCreco",nbMass,1.05,1.25,200,0.0,20.0);
1639 fHistPiAPMassVSPtSecOmegaMCTruth= new TH2F("fHistPiAPMassVSPtSecOmegaMCTruth","ALambda mass vs pt sec Lambda from Omega MC truth pt",nbMass,1.05,1.25,200,0.0,20.0);
5842a526 1640
76a4d7a7 1641 fOutputContainer->Add(fHistPiPMassVSPtSecXiMCTruth);
1642 fOutputContainer->Add(fHistPiPMassVSPtSecOmegaMCTruth);
aa3d4e29 1643
76a4d7a7 1644 fOutputContainer->Add(fHistPiAPMassVSPtSecXiMCTruth);
1645 fOutputContainer->Add(fHistPiAPMassVSPtSecOmegaMCTruth);
aa3d4e29 1646
76a4d7a7 1647 fOutputContainer->Add(fHistPiPiDecayLengthResolution);
5842a526 1648
1649
76a4d7a7 1650 for(Int_t j=0;j<2;j++){
1651
1652 fOutputContainer->Add(fHistPiPDecayLengthResolution[j]);
1653 fOutputContainer->Add(fHistPiAPDecayLengthResolution[j]);
1654 fOutputContainer->Add(fHistPiPMassVSPtSecXi[j]);
1655 fOutputContainer->Add(fHistPiAPMassVSPtSecXi[j]);
1656 fOutputContainer->Add(fHistPiPMassVSYSecXi[j]);
1657 fOutputContainer->Add(fHistPiAPMassVSYSecXi[j]);
1658 fOutputContainer->Add(fHistPiPXi0PtVSLambdaPt[j]);
1659 fOutputContainer->Add(fHistPiAPXi0PtVSLambdaPt[j]);
1660 fOutputContainer->Add(fHistPiPXiMinusPtVSLambdaPt[j]);
1661 fOutputContainer->Add(fHistPiAPXiMinusPtVSLambdaPt[j]);
1662 fOutputContainer->Add(fHistPiPMassVSPtSecSigma[j]);
1663 fOutputContainer->Add(fHistPiAPMassVSPtSecSigma[j]);
1664 fOutputContainer->Add(fHistPiPOmegaPtVSLambdaPt[j]);
1665 fOutputContainer->Add(fHistPiAPOmegaPtVSLambdaPt[j]);
1666 fOutputContainer->Add(fHistPiPMassVSPtSecOmega[j]);
1667 fOutputContainer->Add(fHistPiAPMassVSPtSecOmega[j]);
1668 }
aa3d4e29 1669 }
aa3d4e29 1670
76a4d7a7 1671 /*
1672 //shift q/pt
1673 fHistUserPtShift = new TH1F("fHistUserPtShift","user defined shift in 1/pt",100,-0.5,1.5);
1674 */
aa3d4e29 1675
11e769d9 1676 }
5842a526 1677
76a4d7a7 1678 //________________________________________________________________________
1679 void AliAnalysisTaskV0ForRAA::UserExec(Option_t *) {
1680 //user exec
1681
1682 //-- esd handler --//
1683 AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*>
1684 (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
1685 if (!esdH) {
1686 printf("ERROR: Could not get ESDInputHandler");
aa3d4e29 1687 return;
76a4d7a7 1688 }
1689 fESD = esdH->GetEvent();
1690 if(!fESD) {
1691 printf("ERROR: fESD not available \n");
11e769d9 1692 return ;
5842a526 1693 }
76a4d7a7 1694
1695 //-- mc handler --//
1696 if(fMCMode || fMCTruthMode){
1697 AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler*>
1698 (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
1699 if(!mcH) {
1700 printf("ERROR: Could not get MCInputHandler");
1701 return;
1702 }
1703 fMCev = mcH->MCEvent();
1704 if (!fMCev) {
1705 printf("ERROR: fMCev not available \n");
1706 return ;
1707 }
1708 }
aa3d4e29 1709
76a4d7a7 1710 //-- AliPIDResponse --//
1711 fESDpid = esdH->GetPIDResponse();
aa3d4e29 1712
76a4d7a7 1713 //-- Count events before cuts --//
1714 fHistNEvents->Fill(0);
aa3d4e29 1715
76a4d7a7 1716 //-- Check object existence --//
1717 const AliESDVertex * vtxESD = fESD->GetPrimaryVertexTracks();
1718 const AliESDVertex * vtxESDTPC = fESD->GetPrimaryVertexTPC();
1719 const AliESDVertex * vtxESDSPD = fESD->GetPrimaryVertexSPD();
1720 const AliMultiplicity * multESD = fESD->GetMultiplicity();
5842a526 1721
76a4d7a7 1722 if ( !vtxESD ){
1723 AliError("No Tracks Vertex");
1724 return;
1725 }
5842a526 1726
76a4d7a7 1727 if ( !vtxESDTPC ){
1728 AliError("No TPC Vertex");
1729 return ;
1730 }
1731
1732 if ( !vtxESDSPD ){
1733 AliError("No SPD Vertex");
1734 return ;
1735 }
1736
1737 if ( !multESD ){
1738 AliError("No Multiplicity");
1739 return ;
1740 }
aa3d4e29 1741
1742
76a4d7a7 1743 // ----------- MC vertex -----------------------------------//
aa3d4e29 1744
76a4d7a7 1745 Int_t nContr =0;
aa3d4e29 1746
76a4d7a7 1747 if(fMCTruthMode){
1748 Double_t vVertexPrim[3];
1749 fMCev->GetPrimaryVertex()->GetXYZ(vVertexPrim);
1750 fHistMCVertexZ->Fill(vVertexPrim[2]);
aa3d4e29 1751
76a4d7a7 1752 if(fMCMode && fAnapp){
1753 if (vtxESD->GetStatus()){
1754 nContr=vtxESD->GetNContributors();
1755 fHistPrimVtxZESDVSNContributorsMC->Fill(vVertexPrim[2],nContr);
aa3d4e29 1756 fHistPrimVtxZESDTPCVSNContributorsMC->Fill(vVertexPrim[2],nContr);
aa3d4e29 1757 }
76a4d7a7 1758 else {
1759 if(vtxESDSPD->GetStatus()){
1760 nContr=vtxESDSPD->GetNContributors();
1761 fHistPrimVtxZESDTPCVSNContributorsMC->Fill(vVertexPrim[2],nContr);
1762 fHistPrimVtxZESDSPDVSNContributorsMC->Fill(vVertexPrim[2],nContr);
1763 }
1764 else{
1765 fHistPrimVtxZESDVSNContributorsMC->Fill(vVertexPrim[2],nContr);//add for correction ESD and ESDPSD!!!!
1766 fHistPrimVtxZESDTPCVSNContributorsMC->Fill(vVertexPrim[2],nContr);
1767 }
aa3d4e29 1768 }
1769 }
1770 }
aa3d4e29 1771
1772
1773
76a4d7a7 1774 // -- Check fo centrality
1775 Bool_t process = kTRUE;
1776 Int_t centBin = -1;
1777 if(fUseCentrality) {
1778 centBin = CalculateCentralityBin();
1779 if(!fUseCentralityRange){
1780 if(centBin!= fUseCentralityBin) process=kFALSE;
1781 }
1782 else if(centBin < fUseCentralityBin || centBin > fUseCentralityBin+fUseCentralityRange)
1783 process = kFALSE;
aa3d4e29 1784 }
aa3d4e29 1785
76a4d7a7 1786 AliESDVZERO* esdV0 = fESD->GetVZEROData();
1787 Float_t multV0 = esdV0->GetMTotV0A() + esdV0->GetMTotV0C();
5842a526 1788
76a4d7a7 1789 if(fAnapp){// pp Analysis
aa3d4e29 1790
76a4d7a7 1791 // SDD test for 2.76TeV pp
1792 // select events with SDD
1793 // TString trCl = fESD->GetFiredTriggerClasses();
1794 //if(!(trCl.Contains("ALLNOTRD")) && fSelSDD) return;
1795 UInt_t maskSel = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1796 if(maskSel& AliVEvent::kFastOnly && fSelSDD) return;
1797 if(!(maskSel& AliVEvent::kFastOnly) && fSelNoSDD) return;
aa3d4e29 1798
1799
76a4d7a7 1800 //-- Monitor event cuts --//
1801 fHistNEvents->Fill(1);
aa3d4e29 1802
76a4d7a7 1803 //ask for pileup from SPD
1804 Bool_t pileUpSPD = fESD->IsPileupFromSPD();
1805 if(fRejectPileUpSPD && pileUpSPD) return;
5842a526 1806
76a4d7a7 1807 Int_t ntracks = fESD->GetNumberOfTracks();
1808 for(Int_t i=0;i<ntracks;i++){//check sdd event selection
1809 AliESDtrack *tr= fESD->GetTrack(i);
aa3d4e29 1810
76a4d7a7 1811 Bool_t sdd0 = tr->HasPointOnITSLayer(0);
1812 Bool_t sdd1 = tr->HasPointOnITSLayer(1);
1813 Bool_t sdd2 = tr->HasPointOnITSLayer(2);
1814 Bool_t sdd3 = tr->HasPointOnITSLayer(3);
1815 Bool_t sdd4 = tr->HasPointOnITSLayer(4);
1816 Bool_t sdd5 = tr->HasPointOnITSLayer(5);
aa3d4e29 1817
76a4d7a7 1818 fHistITSLayerHits->Fill(Int_t(sdd0)*(-1),ntracks);
1819 fHistITSLayerHits->Fill(Int_t(sdd1)*1,ntracks);
1820 fHistITSLayerHits->Fill(Int_t(sdd2)*2,ntracks);
1821 fHistITSLayerHits->Fill(Int_t(sdd3)*3,ntracks);
1822 fHistITSLayerHits->Fill(Int_t(sdd4)*4,ntracks);
1823 fHistITSLayerHits->Fill(Int_t(sdd5)*5,ntracks);
11e769d9 1824 }
76a4d7a7 1825
1826 //vertex selection
1827 if (vtxESD->GetStatus()){
aa3d4e29 1828 fHistNEvents->Fill(2);
76a4d7a7 1829 fHistESDVertexZ->Fill(vtxESD->GetZv());
1830 if(fabs(vtxESD->GetZv()) < fVertexZCut){
aa3d4e29 1831 fHistMuliplicityRaw->Fill(multV0);
1832 fHistNEvents->Fill(3);
1833 fHistNPrim->Fill(nContr);
76a4d7a7 1834
aa3d4e29 1835 Process();
76a4d7a7 1836
aa3d4e29 1837 fHistMuliplicity->Fill(multV0);
76a4d7a7 1838
1839 nContr = vtxESD->GetNContributors();
5842a526 1840 // if(nContr<501){
76a4d7a7 1841 fHistPrimVtxZESDVSNContributors->Fill(vtxESD->GetZv(),nContr);
aa3d4e29 1842 fHistPrimVtxZESDTPCVSNContributors->Fill(vtxESDTPC->GetZv(),nContr);
76a4d7a7 1843 //fHistPrimVtxZESDSPDVSNContributorsTPC->Fill(vtxESDSPD->GetZv(),nContr);
1844 // }
1845 fHistPrimVtxZESD->Fill(vtxESD->GetZv());
aa3d4e29 1846 fHistPrimVtxZESDTPC->Fill(vtxESDTPC->GetZv());
76a4d7a7 1847 // fHistPrimVtxZESDSPD->Fill(vtxESDSPD->GetZv());
aa3d4e29 1848 // -- count events after processing
1849 fHistNEvents->Fill(4);
1850 }
1851 }
76a4d7a7 1852 else{
1853 if(vtxESDSPD->GetStatus()){
1854 fHistNEvents->Fill(2);
1855
1856 fHistESDVertexZ->Fill(vtxESDSPD->GetZv());
1857 if(fabs(vtxESDSPD->GetZv()) < fVertexZCut){
1858
1859 fHistMuliplicityRaw->Fill(multV0);
1860 fHistNEvents->Fill(3);
1861 fHistNPrim->Fill(nContr);
1862
1863 Process();
1864
1865 fHistMuliplicity->Fill(multV0);
1866
1867 nContr = vtxESDSPD->GetNContributors();
1868 // if(nContr<501){
1869 //fHistPrimVtxZESDVSNContributors->Fill(vtxESD->GetZv(),nContr);
1870 fHistPrimVtxZESDTPCVSNContributors->Fill(vtxESDTPC->GetZv(),nContr);
1871 fHistPrimVtxZESDSPDVSNContributors->Fill(vtxESDSPD->GetZv(),nContr);
1872 // }
1873 // fHistPrimVtxZESD->Fill(vtxESD->GetZv());
1874 fHistPrimVtxZESDTPC->Fill(vtxESDTPC->GetZv());
1875 fHistPrimVtxZESDSPD->Fill(vtxESDSPD->GetZv());
1876 // -- count events after processing
1877 fHistNEvents->Fill(4);
1878 }
1879 }
1880 //else return;
1881 }
aa3d4e29 1882 }
76a4d7a7 1883 else{// PbPb analysis
1884 //-- Monitor event cuts --//
1885 fHistNEvents->Fill(1);
1886
1887 if(vtxESD->GetStatus()){
1888 Double_t vtxZ = vtxESD->GetZv();
1889 fHistESDVertexZ->Fill(vtxZ);
1890 if(process){
1891 fHistNEvents->Fill(2);
1892 if(fabs(vtxZ) < fVertexZCut){
1893 nContr = vtxESD->GetNContributors();
1894 fHistMuliplicityRaw->Fill(multV0);
1895 fHistNEvents->Fill(3);
1896 fHistNPrim->Fill(nContr);
1897 Process();
1898 fHistMuliplicity->Fill(multV0);
1899 fHistPrimVtxZESD->Fill(vtxZ);
1900 fHistPrimVtxZESDVSNContributors->Fill(vtxZ,nContr);
1901 // -- count events after processing --//
1902 fHistCentBin->Fill(centBin);
1903 fHistNEvents->Fill(4);
1904 }
aa3d4e29 1905 }
76a4d7a7 1906 if(fabs(vtxZ) < fVertexZCut) fHistCentBinRaw->Fill(centBin);
aa3d4e29 1907 }
aa3d4e29 1908 }
76a4d7a7 1909 PostData(1,fOutputContainer);
aa3d4e29 1910
76a4d7a7 1911 }
aa3d4e29 1912
76a4d7a7 1913 //________________________________________________________________________
1914 void AliAnalysisTaskV0ForRAA::Terminate(Option_t *) {
1915 //terminate
1916 }
1917 //________________________________________________________________________
1918 void AliAnalysisTaskV0ForRAA::Process(){
1919 //run the analysis
aa3d4e29 1920
76a4d7a7 1921 Int_t ntracks = fESD->GetNumberOfTracks();
1922 Int_t count = 0;
11e769d9 1923
76a4d7a7 1924 //-- count number of tracks --//
aa3d4e29 1925
76a4d7a7 1926 if(!(!fMCMode && fMCTruthMode)){
1927 for(Int_t i=0;i<ntracks;i++){
1928 AliESDtrack *track = (AliESDtrack*)fESD->GetTrack(i);
1929 if(!fESDTrackCuts->AcceptTrack(track)) continue;
1930 if( track->Eta() > fEtaCutMCDaughtersVal) continue;
1931 count++;
1932 }
1933 fHistMultiplicityPrimary->Fill(count);
aa3d4e29 1934 }
aa3d4e29 1935
76a4d7a7 1936 //-- check number of V0s in case of data or mc data like analysis--//
1937 Int_t nV0 = fESD->GetNumberOfV0s();
1938 if(!fMCTruthMode) if(nV0 < 1) return;
aa3d4e29 1939
76a4d7a7 1940 //-- run analysis --//
1941 if(fMCTruthMode) V0MCTruthLoop();
1942 else V0RecoLoop(0,0,0,0,0.0,0,0.0,0.0);
aa3d4e29 1943
76a4d7a7 1944 }
1945 //________________________________________________________________________
1946 void AliAnalysisTaskV0ForRAA::V0MCTruthLoop(){
1947 //loop over MC truth particles
aa3d4e29 1948
76a4d7a7 1949 //-- get MC stack --//
1950 AliStack *stack = fMCev->Stack();
aa3d4e29 1951
76a4d7a7 1952 /*
1953 //histo fo user defined shift in charge/pt
1954 if(fShift){
1955 fHistUserPtShift->Fill(fDeltaInvP);
1956 }
1957 */
1958 /*
1959 AliKFVertex primVtxStart(*(fESD->GetPrimaryVertex()));
1960 Int_t nTracksPrim=primVtxStart.GetNContributors();
1961 fHistNPrim->Fill(nTracksPrim);
1962 */
1963 /*
1964 // MC
aa3d4e29 1965
76a4d7a7 1966 Int_t mcPrimaries = stack->GetNprimary();
1967 Int_t mcParticles = stack->GetNtrack();
aa3d4e29 1968
76a4d7a7 1969 fHistMultiplicityPrimary->Fill(mcPrimaries);
1970 fHistMCMultiplicityTracks->Fill(mcParticles);
aa3d4e29 1971
76a4d7a7 1972 // number of V0
1973 fHistNV0->Fill(nV0);
1974 if(nTracksPrim>0) {
1975 fHistNV0WithVertex->Fill(nV0);
11e769d9 1976 }
76a4d7a7 1977 */
5842a526 1978
76a4d7a7 1979 //-- MC truht loop for V0s --//
1980 for (Int_t iMc = 0; iMc < (stack->GetNtrack()); iMc++){//MC truth loop
1981 Int_t fillMCtruth= int(fMCTruthMode);
1982 if(fMCTruthMode){
1983 fHistPiPiMonitorMCCuts->Fill(1*fillMCtruth);
1984 fHistPiPMonitorMCCuts[0]->Fill(1*fillMCtruth);
1985 fHistPiAPMonitorMCCuts[0]->Fill(1*fillMCtruth);
1986 }
1987 TParticle *p0 = stack->Particle(iMc);
1988 if(!p0) continue;
1989
1990 if(fMCTruthMode){
1991 fHistPiPiMonitorMCCuts->Fill(2*fillMCtruth);
1992 fHistPiPMonitorMCCuts[0]->Fill(2*fillMCtruth);
1993 fHistPiAPMonitorMCCuts[0]->Fill(2*fillMCtruth);
1994 }
aa3d4e29 1995
1996
1997
76a4d7a7 1998 Int_t pdgCode = p0->GetPdgCode();
aa3d4e29 1999
76a4d7a7 2000 //-------------- only K0s and Lambda ----------//
2001 if( (pdgCode != 310 ) && ( fabs(pdgCode) != 3122 ) ) continue;
2002 Int_t fillFlagK0 = (3122- fabs(pdgCode))/(3122-310)*fillMCtruth;
2003 Int_t fillFlagL = (fabs(pdgCode) - 310)/(3122-310)*(pdgCode+3122)/(2*3122)*fillMCtruth;
2004 Int_t fillFlagAL = (fabs(pdgCode) - 310)/(3122-310)*(pdgCode-3122)/(-2*3122)*fillMCtruth;
aa3d4e29 2005
76a4d7a7 2006 fHistPiPiMonitorMCCuts->Fill(3*fillFlagK0);
2007 fHistPiPMonitorMCCuts[0]->Fill(3*fillFlagL);
2008 fHistPiAPMonitorMCCuts[0]->Fill(3*fillFlagAL);
aa3d4e29 2009
76a4d7a7 2010 if(p0->GetNDaughters() !=2) continue;
2011 fHistPiPiMonitorMCCuts->Fill(4*fillFlagK0);
2012 fHistPiPMonitorMCCuts[0]->Fill(4*fillFlagL);
2013 fHistPiAPMonitorMCCuts[0]->Fill(4*fillFlagAL);
aa3d4e29 2014
76a4d7a7 2015 //-------------- unique ID check-------------- //
2016 Int_t uniqueID = p0->GetUniqueID();
2017 if(uniqueID==13) continue;
aa3d4e29 2018
76a4d7a7 2019 fHistPiPiMonitorMCCuts->Fill(5*fillFlagK0);
2020 fHistPiPMonitorMCCuts[0]->Fill(5*fillFlagL);
2021 fHistPiAPMonitorMCCuts[0]->Fill(5*fillFlagAL);
aa3d4e29 2022
76a4d7a7 2023 //-------------- daughters --------------------//
2024 Int_t id0 = p0->GetDaughter(0);
2025 Int_t id1 = p0->GetDaughter(1);
2026 if(id0<0 || id1 <0) continue;
aa3d4e29 2027
76a4d7a7 2028 fHistPiPiMonitorMCCuts->Fill(6*fillFlagK0);
2029 fHistPiPMonitorMCCuts[0]->Fill(6*fillFlagL);
2030 fHistPiAPMonitorMCCuts[0]->Fill(6*fillFlagAL);
aa3d4e29 2031
76a4d7a7 2032 Int_t pdgCodeD0 = stack->Particle(id0)->GetPdgCode();
2033 Int_t pdgCodeD1 = stack->Particle(id1)->GetPdgCode();
aa3d4e29 2034
76a4d7a7 2035 if(pdgCodeD0 == pdgCodeD1) continue;
2036 if(pdgCodeD0*pdgCodeD1>0) continue;
aa3d4e29 2037
76a4d7a7 2038 fHistPiPiMonitorMCCuts->Fill(7*fillFlagK0);
2039 fHistPiPMonitorMCCuts[0]->Fill(7*fillFlagL);
2040 fHistPiAPMonitorMCCuts[0]->Fill(7*fillFlagAL);
aa3d4e29 2041
76a4d7a7 2042 if((fabs(pdgCodeD0) != 211 ) && ( fabs(pdgCodeD0) != 2212 )) continue;
2043 if((fabs(pdgCodeD1) != 211 ) && ( fabs(pdgCodeD1) != 2212 )) continue;
aa3d4e29 2044
76a4d7a7 2045 fHistPiPiMonitorMCCuts->Fill(8*fillFlagK0);
2046 fHistPiPMonitorMCCuts[0]->Fill(8*fillFlagL);
2047 fHistPiAPMonitorMCCuts[0]->Fill(8*fillFlagAL);
aa3d4e29 2048
76a4d7a7 2049 TParticle *p00 =stack->Particle(id0);
2050 TParticle *p01 =stack->Particle(id1);
2051 Double_t etaMC00 = p00->Eta();
2052 Double_t etaMC01 = p01->Eta();
2053
2054 //----------- unique ID check daughters-------- //
2055 Int_t uniqueIDdaughter0 = p00->GetUniqueID();
2056 Int_t uniqueIDdaughter1 = p01->GetUniqueID();
2057 if (uniqueIDdaughter0 !=4 || uniqueIDdaughter1 !=4 ) continue;
aa3d4e29 2058
76a4d7a7 2059 fHistPiPiMonitorMCCuts->Fill(9*fillFlagK0);
2060 fHistPiPMonitorMCCuts[0]->Fill(9*fillFlagL);
2061 fHistPiAPMonitorMCCuts[0]->Fill(9*fillFlagAL);
aa3d4e29 2062
76a4d7a7 2063 fHistPiPMonitorMCCuts[1]->Fill(9*fillFlagL);
2064 fHistPiAPMonitorMCCuts[1]->Fill(9*fillFlagAL);
aa3d4e29 2065
76a4d7a7 2066 //------------ check label reco -------------------//
2067 if(fCheckNegLabelReco || fOnlyFoundRecoV0){ // check label reco
2068 Bool_t found =kFALSE;
2069 Int_t label0=0,label1=0;
2070 AliESDv0 * v0MIsMC=NULL;
2071 AliESDtrack *tr0 = NULL;
2072 AliESDtrack *tr1 = NULL;
2073 for(Int_t recL=0;recL < fESD->GetNumberOfV0s();recL++){
2074 v0MIsMC = fESD->GetV0(recL);
2075 if(!v0MIsMC) continue;
2076 tr0 = fESD->GetTrack(v0MIsMC->GetPindex());
2077 tr1 = fESD->GetTrack(v0MIsMC->GetNindex());
2078 if(tr0 && tr1){
2079 label0 = tr0->GetLabel();
2080 label1 = tr1->GetLabel();
2081 if((fabs(label0) == id0 && fabs(label1) == id1) ||
2082 (fabs(label0) == id1 && fabs(label1) == id0)){
2083 found =kTRUE;
2084 break;
2085 }
2086 }
2087 }
2088 if(fCheckNegLabelReco && !fOnlyFoundRecoV0) {
2089 if(found && (label0 <0 || label1 < 0)) continue;
2090 }
2091 else{
2092 if(!found) continue;
2093 if(fCheckNegLabelReco && found && (label0 <0 || label1 < 0)) continue;
aa3d4e29 2094 }
11e769d9 2095
76a4d7a7 2096 }
2097 //-----------get geometric properties --------------//
2098 // DCA of mother to prim vertex = production vertex
2099 //-- primary and secondary vetex --//
2100 Double_t vVertexPrimMC[3];
2101 fMCev->GetPrimaryVertex()->GetXYZ(vVertexPrimMC);
2102 // Double_t x0=p0->Vx(),y0=p0->Vy(),z0=p0->Vz();//mother production vertex
aa3d4e29 2103
76a4d7a7 2104 Double_t x=p00->Vx(),y=p00->Vy(),z=p00->Vz();//daughter vertex =V0 decay vertex
2105 Double_t rx = x - vVertexPrimMC[0];
2106 Double_t ry = y - vVertexPrimMC[1];
2107 Double_t rz = z - vVertexPrimMC[2];
2108 Double_t sdeclength = rx*rx+ry*ry;//+rz*rz;//=p00->Rho();
2109 Double_t declength =0.0;
2110 if(sdeclength>0) declength = sqrt(sdeclength);
2111 Double_t declength3d = sqrt( rx*rx+ry*ry+rz*rz);
2112 //-- decay radii --//
2113 Double_t rMC2D = sqrt(x*x+y*y);
2114 const Double_t xyzMC[3] = {x,y,z};
2115 // Double_t rMC = p00->R();
aa3d4e29 2116
76a4d7a7 2117 //-- phi --//
2118 Double_t pi = TMath::Pi();
2119 Double_t phi = p0->Phi();
2120 if(phi>pi) phi -=2*pi;
aa3d4e29 2121
76a4d7a7 2122 //-------------------- V0 variables ----------------//
2123 Double_t rapidity = p0->Y();
2124 Double_t massV0MC = p0->GetMass();
2125 Double_t ptV0MC = p0->Pt();
2126 Double_t pV0MC = p0->P();
aa3d4e29 2127
2128
76a4d7a7 2129 //----------------- mother variables-----------------//
2130 Int_t indexMother1 = p0->GetMother(0);
2131 Int_t isSecd=0;
2132 Int_t pdgMother =0;
2133 // Int_t goodMother=1;
2134 Int_t uniqueIDmother=0;
2135 Double_t ptXiMother=0.0;
2136 Double_t rapXiMother = 0.0;
2137
2138
2139 //------check mother and fill mother histos---------//
2140 Bool_t isPrim= stack->IsPhysicalPrimary(iMc);
5842a526 2141
76a4d7a7 2142 if(!isPrim){//prim or sec
2143 isSecd=1;// is secondary V0s
2144 // cout<<notinjected<<endl;
2145 if(indexMother1 >-1){// && !isPrim){//secondary V0s
2146 // isSecd=1;// is secondary V0s
2147 // cout<<fMCev->IsFromBGEvent(indexMother1)<<endl;
2148 // if(fSelectMBMotherMC && !fMCev->IsFromBGEvent(indexMother1)) continue;//xxx only standard hijing particles for sec. lambdas:not needed
2149 //-- check for mother --//
2150 TParticle *mother = stack->Particle(indexMother1);
2151 if(!mother) {
2152 Printf("no mother pointer!");continue;
2153 }
2154 pdgMother = mother->GetPdgCode();
2155 fHistPiPMonitorMCCuts[1]->Fill(11*fillFlagL);
2156 fHistPiAPMonitorMCCuts[1]->Fill(11*fillFlagAL);
aa3d4e29 2157
76a4d7a7 2158 //-- check for injejcted --//
2159 Bool_t notinjectedMother = kTRUE;
2160 notinjectedMother = fMCev->IsFromBGEvent(indexMother1);
aa3d4e29 2161
76a4d7a7 2162 if(fSelectInjected && !notinjectedMother ) continue;
2163 fHistPiPMonitorMCCuts[1]->Fill(10*fillMCtruth);
2164 fHistPiAPMonitorMCCuts[1]->Fill(10*fillMCtruth);
2165
2166 Bool_t isPrimMother= stack->IsPhysicalPrimary(indexMother1);
2167 if(!isPrimMother) continue;
2168 fHistPiPMonitorMCCuts[1]->Fill(12*fillFlagL);
2169 fHistPiAPMonitorMCCuts[1]->Fill(12*fillFlagAL);
aa3d4e29 2170
76a4d7a7 2171 uniqueIDmother = mother->GetUniqueID();
aa3d4e29 2172
76a4d7a7 2173 if(uniqueIDmother==13){
2174 // goodMother =0;
2175 continue;
2176 }
2177 fHistPiPMonitorMCCuts[1]->Fill(13*fillFlagL);
2178 fHistPiAPMonitorMCCuts[1]->Fill(13*fillFlagAL);
aa3d4e29 2179
2180
76a4d7a7 2181 //-- fill secondary V0s histos and pdg histos --//
2182 ptXiMother=mother->Pt();
2183 rapXiMother=mother->Y();
aa3d4e29 2184
2185
76a4d7a7 2186 //-- K0s --//
2187 if(pdgCode==310){
2188 if(fabs(pdgMother)==311 || fabs(pdgMother)==313 || fabs(pdgMother)==323 ) isSecd=0; // from K0L, K0 and K* as primary
2189 else fHistPiPiPDGCode->Fill(fabs(pdgMother));
2190 //goodMother=1;
2191 }
2192 //-- Lambda --//
2193 if(pdgCode==3122){
2194 fHistPiPPDGCode->Fill(fabs(pdgMother));
2195 if (//sigma family
2196 ( TMath::Abs(pdgMother) == 3112) || //sigma minus
2197 ( TMath::Abs(pdgMother) == 3222) || //sigma plus
2198 ( TMath::Abs(pdgMother) == 3224) || //sigma *plus
2199 ( TMath::Abs(pdgMother) == 3114) || //sigma *minus
2200 ( TMath::Abs(pdgMother) == 3214) || //sigma *0 counts as primary????
2201 ( TMath::Abs(pdgMother) == 3212) //sigma 0 counts as primary
2202 )
2203 {
2204 isSecd=0;
2205 //goodMother=1;
2206 }
aa3d4e29 2207
76a4d7a7 2208 if( pdgMother == 3322) //xi0
2209 {
2210 if(!fRapCutV0 || fabs(rapidity)<fRap){
2211 if(!fEtaCutMCDaughters || (fabs(etaMC00)<fEtaCutMCDaughtersVal|| fabs(etaMC01)<fEtaCutMCDaughtersVal)){
2212 fHistPiPMassVSPtSecXi[0]->Fill(massV0MC,ptV0MC);
2213 fHistPiPMassVSYSecXi[0]->Fill(massV0MC,rapidity);
2214 if(!fRapCutV0 || fabs(rapXiMother)<fRap) fHistPiPXi0PtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);
2215 }
aa3d4e29 2216 }
76a4d7a7 2217 //goodMother=1;
aa3d4e29 2218 }
76a4d7a7 2219 if(pdgMother == 3312) //xi minus
2220 {
2221 if(!fRapCutV0 || fabs(rapidity)<fRap){
2222 if(!fEtaCutMCDaughters || (fabs(etaMC00)<fEtaCutMCDaughtersVal|| fabs(etaMC01)<fEtaCutMCDaughtersVal)){
2223 fHistPiPMassVSPtSecXi[0]->Fill(massV0MC,ptV0MC);
2224 fHistPiPMassVSYSecXi[0]->Fill(massV0MC,rapidity);
2225 if(!fRapCutV0 || fabs(rapXiMother)<fRap) fHistPiPXiMinusPtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);
2226 }
aa3d4e29 2227 }
76a4d7a7 2228 //goodMother=1;
2229
2230 }
2231 if(pdgMother == 3334)//omega-
2232 {
2233 // fHistPiPDCAtoPrimVtxOmega[0]->Fill(p0->GetMass(),dcaV0ToPrimVertex);
2234 if(!fRapCutV0 || fabs(rapXiMother)<fRap) fHistPiPOmegaPtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);
2235 fHistPiPMassVSPtSecOmega[0]->Fill(massV0MC,ptV0MC);
2236 //goodMother=1;
2237 }
2238 }
2239 //-- AntiLambda --//
2240 if(pdgCode==-3122 ){
2241 fHistPiAPPDGCode->Fill(fabs(pdgMother));
2242 if (//sigma family
2243 ( TMath::Abs(pdgMother) == 3112) ||//sigma minus
2244 ( TMath::Abs(pdgMother) == 3222) ||//sigma plus
2245 ( TMath::Abs(pdgMother) == 3224) ||//sigma *plus
2246 ( TMath::Abs(pdgMother) == 3114) ||//sigma *minus
2247 ( TMath::Abs(pdgMother) == 3214) || //sigma *0
2248 ( TMath::Abs(pdgMother) == 3212) //sigma 0 counts as primary
2249 )
2250 {
2251 isSecd=0;
2252 // goodMother=1;
aa3d4e29 2253 }
aa3d4e29 2254
76a4d7a7 2255 if( pdgMother == -3322) //xi0
2256 {
2257 if(!fRapCutV0 || fabs(rapidity)<fRap){
2258 if(!fEtaCutMCDaughters || (fabs(etaMC00)<fEtaCutMCDaughtersVal|| fabs(etaMC01)<fEtaCutMCDaughtersVal)){
2259 fHistPiAPMassVSPtSecXi[0]->Fill(massV0MC,ptV0MC);
2260 fHistPiAPMassVSYSecXi[0]->Fill(massV0MC,rapidity);
2261 if(!fRapCutV0 || fabs(rapXiMother)<fRap) fHistPiAPXi0PtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);
2262 }
aa3d4e29 2263 }
76a4d7a7 2264 // goodMother=1;
aa3d4e29 2265 }
76a4d7a7 2266 if(pdgMother == -3312) //xi plus
2267 {
2268 if(!fRapCutV0 || fabs(rapidity)<fRap){
2269 if(!fEtaCutMCDaughters || (fabs(etaMC00)<fEtaCutMCDaughtersVal|| fabs(etaMC01)<fEtaCutMCDaughtersVal)){
2270 fHistPiAPMassVSPtSecXi[0]->Fill(massV0MC,ptV0MC);
2271 fHistPiAPMassVSYSecXi[0]->Fill(massV0MC,rapidity);
2272 if(!fRapCutV0 || fabs(rapXiMother)<fRap) fHistPiAPXiMinusPtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);
2273 }
aa3d4e29 2274 }
76a4d7a7 2275 //goodMother=1;
aa3d4e29 2276 }
76a4d7a7 2277 if(pdgMother == -3334)//omega+
2278 {
2279 fHistPiAPOmegaPtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);
2280 if(!fRapCutV0 || fabs(rapXiMother)<fRap) fHistPiAPMassVSPtSecOmega[0]->Fill(massV0MC,ptV0MC);
2281 // fHistPiAPDCAtoPrimVtxOmega[0]->Fill(p0->GetMass(),dcaV0ToPrimVertex);
2282 // goodMother=1;
2283 }
2284 }
2285 }
2286 }//end secondaries
2287 else{
2288 //-- check for injejcted --//
2289 Bool_t notinjected = kTRUE;
2290 notinjected = fMCev->IsFromBGEvent(iMc);
aa3d4e29 2291
76a4d7a7 2292 if(fSelectInjected && !notinjected ) continue;
2293 fHistPiPiMonitorMCCuts->Fill(10*fillMCtruth);
2294 fHistPiPMonitorMCCuts[0]->Fill(10*fillMCtruth);
2295 fHistPiAPMonitorMCCuts[0]->Fill(10*fillMCtruth);
2296 }
2297 //else goodMother=1;
2298 // if(!goodMother) continue;// for (A)Lambda important
2299
2300 //-------------- MC truth or reco mode -----------------//
2301 if(fMCTruthMode && !fMCMode){//MC true ana
2302 fHistPiPiMonitorMCCuts->Fill(14*fillFlagK0);
2303 fHistPiPMonitorMCCuts[isSecd]->Fill(14*fillFlagL);
2304 fHistPiAPMonitorMCCuts[isSecd]->Fill(14*fillFlagAL);
aa3d4e29 2305
76a4d7a7 2306 //-- DCA daughters --//
2307 // values of one daugher, should be the same
2308 /*
2309 //to primary vertex
2310 trackPos->GetImpactParameters(tdcaPosToVertex[0],tdcaPosToVertex[1]);
2311 trackNeg->GetImpactParameters(tdcaNegToVertex[0],tdcaNegToVertex[1]);
aa3d4e29 2312
76a4d7a7 2313 Double_t dcaPosToVertex = TMath::Sqrt(tdcaPosToVertex[0]*tdcaPosToVertex[0]+tdcaPosToVertex[1]*tdcaPosToVertex[1]);
2314 Double_t dcaNegToVertex = TMath::Sqrt(tdcaNegToVertex[0]*tdcaNegToVertex[0]+tdcaNegToVertex[1]*tdcaNegToVertex[1]);
2315 fHistDCADaughtersToPrimVtx[isSecd]->Fill(dcaPosToVertex,dcaNegToVertex);
2316 */
aa3d4e29 2317
2318
76a4d7a7 2319 //-- armenteros values --//
2320 TVector3 vecPip;
2321 TVector3 vecPin;
aa3d4e29 2322
76a4d7a7 2323 Double_t ptPlus=0, ptMinus=0;
2324 Double_t pt00 = p00->Pt();
2325 Double_t pt01 = p01->Pt();
2326 Double_t phiPosMC=0.0;
aa3d4e29 2327
76a4d7a7 2328 if(p00->GetPdgCode()<0)
2329 {
2330 vecPip.SetXYZ(p01->Px(),p01->Py(),p01->Pz());
2331 vecPin.SetXYZ(p00->Px(),p00->Py(),p00->Pz());
2332 ptMinus = pt00;
2333 ptPlus = pt01;
2334 phiPosMC = p01->Phi();
2335 }
2336 else{
2337 vecPin.SetXYZ(p01->Px(),p01->Py(),p01->Pz());
2338 vecPip.SetXYZ(p00->Px(),p00->Py(),p00->Pz());
2339 ptMinus = pt01;
2340 ptPlus = pt00;
2341 phiPosMC = p00->Phi();
aa3d4e29 2342 }
aa3d4e29 2343
76a4d7a7 2344 TVector3 momTot(p0->Px(),p0->Py(),p0->Pz());
2345 Double_t lQlNeg = fabs(vecPin.Dot(momTot)/momTot.Mag());
2346 Double_t lQlPos = fabs(vecPip.Dot(momTot)/momTot.Mag());
2347 Double_t alfa =0.0;
2348 Double_t den = lQlPos + lQlNeg;
2349 if(den>0) alfa = (lQlPos - lQlNeg)/den;
2350 TVector3 qtvec= vecPin.Cross(momTot);//vecPip.Mag()*sqrt(1-pow(thetapip,2));
2351 Float_t qt = qtvec.Mag()/momTot.Mag();
aa3d4e29 2352
76a4d7a7 2353 //clalc masses for test
2354 Double_t massPi=0.13957018;
2355 Double_t massP=0.93827203;
5842a526 2356
76a4d7a7 2357 TLorentzVector pionPTest(vecPip, massPi);
2358 TLorentzVector pionNTest(vecPin, massPi);
2359 TLorentzVector k0sTest = pionPTest+pionNTest;
5842a526 2360
76a4d7a7 2361 TLorentzVector protPTest(vecPip, massP);
2362 TLorentzVector lambdaTest = protPTest+pionNTest;
5842a526 2363
76a4d7a7 2364 TLorentzVector protNTest(vecPin, massP);
2365 TLorentzVector alambdaTest = protNTest+pionPTest;
5842a526 2366
76a4d7a7 2367 Double_t calcK0smass = fabs(k0sTest.M());
2368 Double_t calcLambdamass = fabs(lambdaTest.M());
2369 Double_t calcALambdamass = fabs(alambdaTest.M());
5842a526 2370
76a4d7a7 2371 if(pdgCode == 310) {
2372 fHistPiPiEtaDMC[isSecd]->Fill(etaMC00,ptV0MC);
2373 fHistPiPiEtaDMC[isSecd]->Fill(etaMC01,ptV0MC);
2374 }
2375 if(fabs(pdgCode) == 3122) {
2376 fHistPiPEtaDMC[isSecd]->Fill(etaMC00,ptV0MC);
2377 fHistPiPEtaDMC[isSecd]->Fill(etaMC01,ptV0MC);
2378 }
aa3d4e29 2379
76a4d7a7 2380 //-- rapidity and eta cut --//
2381 if(fRapCutV0 && fabs(rapidity)>fRap) continue;
2382 fHistPiPiMonitorMCCuts->Fill(15*fillFlagK0);
2383 fHistPiPMonitorMCCuts[isSecd]->Fill(15*fillFlagL);
2384 fHistPiAPMonitorMCCuts[isSecd]->Fill(15*fillFlagAL);
aa3d4e29 2385
76a4d7a7 2386 if(fEtaCutMCDaughters) { if(fabs(etaMC00)>fEtaCutMCDaughtersVal || fabs(etaMC01)>fEtaCutMCDaughtersVal ) continue; }
2387 fHistPiPiMonitorMCCuts->Fill(16*fillFlagK0);
2388 fHistPiPMonitorMCCuts[isSecd]->Fill(16*fillFlagL);
2389 fHistPiAPMonitorMCCuts[isSecd]->Fill(16*fillFlagAL);
aa3d4e29 2390
2391
76a4d7a7 2392 // Double_t phiMC = p0->Phi();
5842a526 2393
aa3d4e29 2394
76a4d7a7 2395 //-- Fill Particle histos --//
2396 if (pdgCode==310){//K0s
2397 fHistPiPiMonitorMCCuts->Fill(17);
aa3d4e29 2398
76a4d7a7 2399 fHistPiPiEtaDMC[1]->Fill(etaMC00,ptV0MC);
2400 fHistPiPiEtaDMC[1]->Fill(etaMC01,ptV0MC);
aa3d4e29 2401
76a4d7a7 2402 fHistPiPiMass->Fill(massV0MC);
2403 fHistPiPiMassVSPt->Fill(massV0MC,ptV0MC);
2404 fHistPiPiMassVSY->Fill(massV0MC,rapidity);
2405 // fHistPiPiPtDaughters->Fill(ptMinus,ptPlus);
2406 fHistPiPiPtVSY->Fill(rapidity,ptV0MC);
aa3d4e29 2407
76a4d7a7 2408 Double_t ctTK0s=0.0,ctK0s=0.0;
2409 if(pV0MC>0.0) ctK0s=declength3d*0.497614/pV0MC;
2410 if(ptV0MC>0.0) ctTK0s=declength*0.497614/ptV0MC;
2411 fHistPiPiDecayLengthResolution->Fill(declength3d,declength);
2412 fHistPiPiDecayLengthVsPt->Fill(ptV0MC,declength);//ptV0MC,ctK0s);
2413 fHistPiPiDecayLengthVsCtau->Fill(massV0MC,ctTK0s);
2414 fHistPiPiDecayLengthVsMass->Fill(massV0MC,declength);
2415 //all V0s histo
2416 fHistArmenteros[isSecd]->Fill(alfa,qt);
2417 fHistV0RadiusZ[isSecd]->Fill(rMC2D,xyzMC[2]);
2418 fHistV0RadiusXY[isSecd]->Fill(xyzMC[0],xyzMC[1]);
2419 fHistV0RadiusZVSPt[isSecd]->Fill(ptV0MC,xyzMC[2]);
2420 // fHistPiPiPhiPosVsPtPosVsMass->Fill(massV0MC,declength,ptV0MC);//,ctK0s);//phiPosMC);//xxx
2421 fHistPiPiK0sVsLambdaMass->Fill(calcLambdamass,calcK0smass);
2422 fHistPiPiK0sVsALambdaMass->Fill(calcALambdamass,calcK0smass);
2423 }
2424 if (pdgCode==3122){ //Lambda
2425 fHistPiPMonitorMCCuts[isSecd]->Fill(17);
aa3d4e29 2426
76a4d7a7 2427 fHistPiPEtaDMC[1]->Fill(etaMC00,ptV0MC);
2428 fHistPiPEtaDMC[1]->Fill(etaMC01,ptV0MC);
2429
2430 fHistPiPMassVSPt[isSecd]->Fill(massV0MC,ptV0MC);
2431 fHistPiPMass[isSecd]->Fill(massV0MC);
2432 fHistPiPMassVSY[isSecd]->Fill(massV0MC,rapidity);
2433 // fHistPiPPtDaughters[isSecd]->Fill(ptMinus,ptPlus);
2434 fHistPiPPtVSY[isSecd]->Fill(rapidity,ptV0MC);
aa3d4e29 2435
76a4d7a7 2436 Double_t ctTL=0.0, ctL=0.0;
2437 if(pV0MC>0.0) ctL=declength3d*1.115683/pV0MC;
2438 if(ptV0MC>0.0) ctTL=declength*1.115683/ptV0MC;
2439 fHistPiPDecayLengthResolution[0]->Fill(declength3d,declength);
2440 fHistPiPDecayLengthVsPt[isSecd]->Fill(ptV0MC,declength);//(ptV0MC,ctL);
2441 fHistPiPDecayLengthVsCtau[isSecd]->Fill(massV0MC,ctTL);
2442 fHistPiPDecayLengthVsMass[isSecd]->Fill(massV0MC,declength);
2443 //all V0s hito
2444 fHistArmenteros[isSecd]->Fill(alfa,qt);
2445 fHistV0RadiusZ[isSecd]->Fill(rMC2D,xyzMC[2]);
2446 fHistV0RadiusXY[isSecd]->Fill(xyzMC[0],xyzMC[1]);
2447 fHistV0RadiusZVSPt[isSecd]->Fill(ptV0MC,xyzMC[2]);
2448 // fHistPiPPhiPosVsPtPosVsMass->Fill(massV0MC,declength,ptV0MC);//,ctK0s);//phiPosMC);//xxx
2449 fHistPiPK0sVsLambdaMass->Fill(calcLambdamass,calcK0smass);
2450 }
2451 if (pdgCode==-3122){ //AntiLambda
2452 fHistPiAPMonitorMCCuts[isSecd]->Fill(17);
aa3d4e29 2453
76a4d7a7 2454 fHistPiPEtaDMC[1]->Fill(etaMC00,ptV0MC);
2455 fHistPiPEtaDMC[1]->Fill(etaMC01,ptV0MC);
2456
2457 fHistPiAPMassVSPt[isSecd]->Fill(massV0MC,ptV0MC);
2458 fHistPiAPMass[isSecd]->Fill(massV0MC);
2459 fHistPiPMassVSY[isSecd]->Fill(massV0MC,rapidity);
2460 // fHistPiAPPtDaughters[isSecd]->Fill(ptMinus,ptPlus);
2461 fHistPiAPPtVSY[isSecd]->Fill(rapidity,ptV0MC);
aa3d4e29 2462
76a4d7a7 2463 Double_t ctTL=0.0, ctL=0.0;
2464 if(pV0MC>0.0) ctL=declength3d*1.115683/pV0MC;
2465 if(ptV0MC>0.0) ctTL=declength*1.115683/ptV0MC;
2466 fHistPiAPDecayLengthResolution[0]->Fill(declength3d,declength);
2467 fHistPiAPDecayLengthVsPt[isSecd]->Fill(ptV0MC,declength);//(ptV0MC,ctAL);
2468 fHistPiAPDecayLengthVsCtau[isSecd]->Fill(massV0MC,ctL);
2469 fHistPiAPDecayLengthVsMass[isSecd]->Fill(massV0MC,ctTL);//declength);
2470 //all V0s histo
2471 fHistArmenteros[isSecd]->Fill(alfa,qt);
2472 fHistV0RadiusZ[isSecd]->Fill(rMC2D,xyzMC[2]);
2473 fHistV0RadiusXY[isSecd]->Fill(xyzMC[0],xyzMC[1]);
2474 fHistV0RadiusZVSPt[isSecd]->Fill(ptV0MC,xyzMC[2]);
2475 fHistV0RadiusXYVSY[isSecd]->Fill(rapidity,rMC2D);
2476 fHistPiAPK0sVsALambdaMass->Fill(calcALambdamass,calcK0smass);
2477 }
2478 }//MC true ana
2479 else{// V0 reco ana
2480 V0RecoLoop(id0,id1,isSecd,pdgCode,ptV0MC,pdgMother,ptXiMother,declength);
aa3d4e29 2481 }
aa3d4e29 2482
76a4d7a7 2483 }//end MC stack loop
2484 }
2485 //________________________________________________________________________
2486 void AliAnalysisTaskV0ForRAA::V0RecoLoop(Int_t id0,Int_t id1,Int_t isSecd,Int_t what,Double_t ptV0MC, Int_t pdgMother,Double_t ptXiMother,Double_t declengthV0MC){
2487 //loop over reconstructed particles
aa3d4e29 2488
2489
76a4d7a7 2490 //--------------------- define variables -----------------------//
2491 Double_t pp[3];
2492 Double_t pm[3];
2493 Double_t xr[3];
aa3d4e29 2494
76a4d7a7 2495 Double_t massPi=0.13957018;
2496 Double_t massP=0.93827203;
aa3d4e29 2497
76a4d7a7 2498 TLorentzVector positivesMIP;
2499 TLorentzVector negativesMIAP;
2500 TLorentzVector positivesMIPi;
2501 TLorentzVector negativesMIPi;
aa3d4e29 2502
76a4d7a7 2503 /*
2504 AliKFParticle::SetField(fESD->GetMagneticField());
2505 AliKFVertex primVtx(*(fESD->GetPrimaryVertex()));
2506 AliKFVertex primVtxImproved = primVtx;
2507
2508 AliKFParticle* negPiKF=NULL;
2509 AliKFParticle* posPiKF=NULL;
2510 AliKFParticle* posPKF=NULL;
2511 AliKFParticle* negAPKF=NULL;
2512 */
aa3d4e29 2513
76a4d7a7 2514 AliESDtrack* trackPos=NULL;
2515 AliESDtrack* trackNeg=NULL;
2516 AliESDtrack* trackPosTest = NULL;
2517 AliESDtrack* trackNegTest =NULL;
aa3d4e29 2518
76a4d7a7 2519 Double_t primaryVtxPosition[3];
2520 primaryVtxPosition[0] = fESD->GetPrimaryVertex()->GetXv();
2521 primaryVtxPosition[1] = fESD->GetPrimaryVertex()->GetYv();
2522 primaryVtxPosition[2] = fESD->GetPrimaryVertex()->GetZv();
aa3d4e29 2523
76a4d7a7 2524 Int_t nV0 = fESD->GetNumberOfV0s();
2525 AliESDv0 * v0MIs=NULL;
aa3d4e29 2526
aa3d4e29 2527
76a4d7a7 2528 // Int_t on =0,off=0;
2529 Bool_t stopLoop = kFALSE;
2530 //------------------------ V0 reco loop --------------------//
2531 for(Int_t iV0MI = 0; iV0MI < nV0; iV0MI++) {//V0 loop
2532 //-- get V0 info --//
2533 // cout<<iV0MI<<endl;
2534 if(stopLoop) break;
5842a526 2535
76a4d7a7 2536 v0MIs = fESD->GetV0(iV0MI);
2537 if(!v0MIs ) continue;
2538
2539 // cout<<"after: "<<iV0MI<<endl;
2540 fHistPiPiMonitorCuts->Fill(1);
2541 fHistPiPMonitorCuts[isSecd]->Fill(1);
2542 fHistPiAPMonitorCuts[isSecd]->Fill(1);
2543
2544 //------------ get references of daughters --------------//
2545 //-- esd tracks --//
2546 trackPosTest = fESD->GetTrack(v0MIs->GetPindex());
2547 trackNegTest = fESD->GetTrack(v0MIs->GetNindex());
aa3d4e29 2548
76a4d7a7 2549 if ( trackPosTest->GetSign() == trackNegTest->GetSign()) continue;
aa3d4e29 2550
76a4d7a7 2551 fHistPiPiMonitorCuts->Fill(2);
2552 fHistPiPMonitorCuts[isSecd]->Fill(2);
2553 fHistPiAPMonitorCuts[isSecd]->Fill(2);
2554
2555 Bool_t onthefly = v0MIs->GetOnFlyStatus();
2556 if(fOntheFly!=onthefly) continue;
2557 // cout<<"onthefly "<<onthefly<<endl;
2558 // if(onthefly) on++;
2559 // else off++;
5842a526 2560
76a4d7a7 2561 fHistPiPiMonitorCuts->Fill(3);
2562 fHistPiPMonitorCuts[isSecd]->Fill(3);
2563 fHistPiAPMonitorCuts[isSecd]->Fill(3);
aa3d4e29 2564
76a4d7a7 2565 //-- for MC mode --//
2566 if(fMCMode){
2567 //check MC labels (and find partners for MC truth V0 daughters for fMCTruthMode=kTRUE)
2568 if(!GetMCTruthPartner(trackPosTest,trackNegTest,id0,id1)) continue;
2569 else stopLoop = kTRUE;
2570 }
aa3d4e29 2571
76a4d7a7 2572 fHistPiPiMonitorCuts->Fill(4);
2573 fHistPiPMonitorCuts[isSecd]->Fill(4);
2574 fHistPiAPMonitorCuts[isSecd]->Fill(4);
aa3d4e29 2575
76a4d7a7 2576 //-- onthefly selection --//
2577 // Bool_t onthefly = v0MIs->GetOnFlyStatus();
2578 // if(fOntheFly!=onthefly) continue;
aa3d4e29 2579
5842a526 2580
76a4d7a7 2581 // fHistPiPiMonitorCuts[isSecd]->Fill(4);
2582 // fHistPiPMonitorCuts[isSecd]->Fill(4);
2583 // fHistPiAPMonitorCuts[isSecd]->Fill(4);
5842a526 2584
76a4d7a7 2585 //-- get eta from V0 daughters --//
2586 Double_t posDaughterEta=0.0;
2587 Double_t negDaughterEta=0.0;
2588 Double_t posDaughterPhi=0.0;
2589 Double_t negDaughterPhi=0.0;
5842a526 2590
76a4d7a7 2591 Double_t eta00 = trackPosTest->Eta();
2592 Double_t eta01 = trackNegTest->Eta();
5842a526 2593
aa3d4e29 2594
76a4d7a7 2595 Int_t indexPos = 0,indexNeg=0;
2596 //---------- check sign assignment for daughters --------//
2597 Bool_t switchSign = kFALSE;
aa3d4e29 2598
76a4d7a7 2599 if( trackPosTest->GetSign() >0){//pos
2600 indexPos = v0MIs->GetPindex();
2601 indexNeg = v0MIs->GetNindex();
2602
2603 // trackPos =fESD->GetTrack(indexPos);
2604 // trackNeg =fESD->GetTrack(indexNeg);
2605
2606 v0MIs->GetPPxPyPz(pp[0],pp[1],pp[2]);
2607 v0MIs->GetNPxPyPz(pm[0],pm[1],pm[2]);
2608
2609 posDaughterEta = v0MIs->GetParamP()->Eta();
2610 negDaughterEta = v0MIs->GetParamN()->Eta();
2611 posDaughterPhi = v0MIs->GetParamP()->Phi();
2612 negDaughterPhi = v0MIs->GetParamN()->Phi();
2613 /*
2614 if (negPiKF) delete negPiKF; negPiKF=NULL;
2615 if (posPiKF) delete posPiKF; posPiKF=NULL;
2616 if (posPKF) delete posPKF; posPKF=NULL;
2617 if (negAPKF) delete negAPKF; negAPKF=NULL;
2618
2619 negPiKF = new AliKFParticle( *(v0MIs->GetParamN()) ,-211);
2620 posPiKF = new AliKFParticle( *(v0MIs->GetParamP()) ,211);
2621 posPKF = new AliKFParticle( *(v0MIs->GetParamP()) ,2212);
2622 negAPKF = new AliKFParticle( *(v0MIs->GetParamN()) ,-2212);
2623 */
aa3d4e29 2624
76a4d7a7 2625 }
2626 if( trackPosTest->GetSign() <0){//neg
aa3d4e29 2627
76a4d7a7 2628 indexPos = v0MIs->GetNindex();
2629 indexNeg = v0MIs->GetPindex();
aa3d4e29 2630
76a4d7a7 2631 // trackPos =fESD->GetTrack(indexPos);
2632 // trackNeg =fESD->GetTrack(indexNeg);
5842a526 2633
76a4d7a7 2634 v0MIs->GetNPxPyPz(pp[0],pp[1],pp[2]);
2635 v0MIs->GetPPxPyPz(pm[0],pm[1],pm[2]);
aa3d4e29 2636
76a4d7a7 2637 posDaughterEta = v0MIs->GetParamN()->Eta();
2638 negDaughterEta = v0MIs->GetParamP()->Eta();
2639 posDaughterPhi = v0MIs->GetParamN()->Phi();
2640 negDaughterPhi = v0MIs->GetParamP()->Phi();
2641 /*
2642 if (negPiKF) delete negPiKF; negPiKF=NULL;
2643 if (posPiKF) delete posPiKF; posPiKF=NULL;
2644 if (posPKF) delete posPKF; posPKF=NULL;
2645 if (negAPKF) delete negAPKF; negAPKF=NULL;
2646
2647
2648 negPiKF = new AliKFParticle( *(v0MIs->GetParamP()) ,-211);
2649 posPiKF = new AliKFParticle( *(v0MIs->GetParamN()) ,211);
2650 posPKF = new AliKFParticle( *(v0MIs->GetParamN()) ,2212);
2651 negAPKF = new AliKFParticle( *(v0MIs->GetParamP()) ,-2212);
2652 */
aa3d4e29 2653
76a4d7a7 2654 switchSign = kTRUE;
2655 eta01 = trackPosTest->Eta();
2656 eta00 = trackNegTest->Eta();
aa3d4e29 2657
76a4d7a7 2658 }
aa3d4e29 2659
76a4d7a7 2660 trackPos =fESD->GetTrack(indexPos);
2661 trackNeg =fESD->GetTrack(indexNeg);
aa3d4e29 2662
76a4d7a7 2663 // ------------- calc masses and 4 vectors -------------- //
2664 //K0
2665 positivesMIPi.SetXYZM(pp[0],pp[1],pp[2],massPi);
2666 negativesMIPi.SetXYZM(pm[0],pm[1],pm[2],massPi);
2667 TLorentzVector v0K0=positivesMIPi+negativesMIPi;
aa3d4e29 2668
76a4d7a7 2669 //Lambda
2670 positivesMIP.SetXYZM(pp[0],pp[1],pp[2],massP);
2671 TLorentzVector v0Lambda=positivesMIP+negativesMIPi;
aa3d4e29 2672
76a4d7a7 2673 //Anitlambda
2674 negativesMIAP.SetXYZM(pm[0],pm[1],pm[2],massP);
2675 TLorentzVector v0ALambda=positivesMIPi+negativesMIAP;
aa3d4e29 2676
76a4d7a7 2677 //---------------------AliKFParticle ---------------------//
2678 /*
2679 Double_t chi2K0C=0.0;
2680 Double_t chi2LambdaC=0.0;
2681 Double_t chi2ALambdaC=0.0;
aa3d4e29 2682
2683
76a4d7a7 2684 AliKFParticle v0K0KF;
2685 v0K0KF +=(*negPiKF);
2686 v0K0KF +=(*posPiKF);
2687 //v0K0C.SetVtxGuess(xr[0],xr[1],xr[2]);
2688 v0K0KF.SetProductionVertex(primVtxImproved);
aa3d4e29 2689
76a4d7a7 2690 AliKFParticle v0LambdaKF;
2691 v0LambdaKF +=(*negPiKF);
2692 v0LambdaKF +=(*posPKF);
2693 //v0LambdaC.SetVtxGuess(xr[0],xr[1],xr[2]);
2694 v0LambdaKF.SetProductionVertex(primVtxImproved);
aa3d4e29 2695
76a4d7a7 2696 AliKFParticle v0ALambdaKF;
2697 v0ALambdaKF +=(*negAPKF);
2698 v0ALambdaKF +=(*posPiKF);
2699 //v0ALambdaC.SetVtxGuess(xr[0],xr[1],xr[2]);
2700 v0ALambdaKF.SetProductionVertex(primVtxImproved);
aa3d4e29 2701
76a4d7a7 2702 if( v0K0KF.GetNDF() != 0) {
2703 chi2K0C = v0K0KF.GetChi2()/v0K0KF.GetNDF();
2704 }
11e769d9 2705
76a4d7a7 2706 Double_t chi2LambdaC=100000.;
2707 if( v0LambdaKF.GetNDF() != 0) {
2708 chi2LambdaC = v0LambdaKF.GetChi2()/v0LambdaKF.GetNDF();
2709 }
11e769d9 2710
76a4d7a7 2711 Double_t chi2ALambdaC=100000.;
2712 if( v0ALambdaKF.GetNDF() != 0) {
2713 chi2ALambdaC = v0ALambdaKF.GetChi2()/v0ALambdaKF.GetNDF();
2714 }
2715 */
11e769d9 2716
76a4d7a7 2717 // ----------------- for MC mode ------------------------ //
2718 Bool_t fillK0sMC = kTRUE;
2719 Bool_t fillLambdaMC = kTRUE;
2720 Bool_t fillALambdaMC = kTRUE;
2721
2722 if(fMCMode && fMCTruthMode) {
2723 if(what == 310) {
2724 fillLambdaMC = kFALSE;
2725 fillALambdaMC = kFALSE;
2726 }
2727 else if(what == 3122){
2728 fillALambdaMC = kFALSE;
2729 fillK0sMC = kFALSE;
2730 }
2731 else if(what == -3122){
2732 fillLambdaMC = kFALSE;
2733 fillK0sMC = kFALSE;
2734 }
11e769d9 2735 }
5842a526 2736
76a4d7a7 2737 //----------------- prepare for V0 ana ------------------//
2738 TVector3 ppTrack(pp);
2739 TVector3 pmTrack(pm);
aa3d4e29 2740
76a4d7a7 2741 // Double_t posDaughterPt = ppTrack.Pt();
2742 // Double_t negDaughterPt = pmTrack.Pt();
aa3d4e29 2743
aa3d4e29 2744
76a4d7a7 2745 // Double_t phiPos = trackPos->Phi();
2746 //Double_t phiNeg = trackNeg->Phi();
aa3d4e29 2747
76a4d7a7 2748 /*
2749 Double_t v0sPt=v0MIs->Pt();
2750 if(what == 310 || what ==0){
2751 fHistPiPiEtaDReco[0]->Fill(posDaughterPt,v0sPt);
2752 fHistPiPiEtaDReco[0]->Fill(negDaughterPt,v0sPt);
2753 }
2754 if(fabs(what) == 3122 || what == 0){
2755 fHistPiPEtaDReco[0]->Fill(posDaughterPt,v0sPt);
2756 fHistPiPEtaDReco[0]->Fill(negDaughterPt,v0sPt);
2757 }
2758 */
5842a526 2759
76a4d7a7 2760 //------------------- DCA daughters ---------------------//
2761 v0MIs->GetXYZ(xr[0],xr[1],xr[2]);
5842a526 2762
76a4d7a7 2763 //-- between the daughters --//
2764 Double_t dcaDaughters = v0MIs->GetDcaV0Daughters();
5842a526 2765
76a4d7a7 2766 //-- to primary vertex --
2767 /*
2768 Float_t bP[2],bN[2];
2769 Float_t bCovP[3],bCovN[3];
5842a526 2770
76a4d7a7 2771 trackPos->GetImpactParameters(bP,bCovP);
2772 trackNeg->GetImpactParameters(bN,bCovN);
5842a526 2773
76a4d7a7 2774 if (bCovP[0]<=0 || bCovP[2]<=0) {
2775 AliDebug(1, "Estimated b resolution lower or equal zero!");
2776 bCovP[0]=0; bCovP[2]=0;
2777 }
2778 if (bCovN[0]<=0 || bCovN[2]<=0) {
2779 AliDebug(1, "Estimated b resolution lower or equal zero!");
2780 bCovN[0]=0; bCovN[2]=0;
2781 }
aa3d4e29 2782
76a4d7a7 2783 Float_t dcaToVertexZPos = bP[1];//Float_t dcaToVertexXY = b[0];
2784 Float_t dcaToVertexZNeg = bN[1];//Float_t dcaToVertexXY = b[0];
2785 */
2786 /*
2787 Float_t dcaToVertexZPos = 0.0, dcaToVertexZNeg = 0.0;
2788 Float_t bP=0.0,bN=0.0;
2789 trackPos->GetImpactParameters(bP,dcaToVertexZPos);
2790 trackNeg->GetImpactParameters(bN,dcaToVertexZNeg);
2791 */
5842a526 2792
76a4d7a7 2793 Double_t dcaToVertexZPos = 0.0, dcaToVertexZNeg = 0.0;
2794 AliExternalTrackParam *parPos = NULL;
2795 AliExternalTrackParam *parNeg = NULL;
2796 Double_t dcaYZP[2],dcaYZN[2],covar[3];
2797 if(!switchSign){
2798 parPos = new AliExternalTrackParam( *v0MIs->GetParamP());
2799 parNeg = new AliExternalTrackParam( *v0MIs->GetParamN());
2800 }
2801 else{
2802 parPos = new AliExternalTrackParam( *v0MIs->GetParamN());
2803 parNeg = new AliExternalTrackParam( *v0MIs->GetParamP());
2804 }
2805 Bool_t checkProp = parPos->PropagateToDCA(fESD->GetPrimaryVertex(),fESD->GetMagneticField(),40.0,dcaYZP,covar);
2806 dcaToVertexZPos = dcaYZP[1];
2807 delete parPos;
2808 checkProp = parNeg->PropagateToDCA(fESD->GetPrimaryVertex(),fESD->GetMagneticField(),40.0,dcaYZN,covar);
2809 dcaToVertexZNeg = dcaYZN[1];
2810 delete parNeg;
2811
2812
2813 Double_t dcaPosToVertex=0.0,dcaNegToVertex=0.0;
2814 Double_t dzPos=(primaryVtxPosition[0]-xr[0])*ppTrack.Y() - (primaryVtxPosition[1]-xr[1])*ppTrack.X();
2815 dcaPosToVertex=TMath::Sqrt(dzPos*dzPos/(pow(ppTrack.X(),2)+pow(ppTrack.Y(),2)));
2816 Double_t dzNeg=(primaryVtxPosition[0]-xr[0])*pmTrack.Y() - (primaryVtxPosition[1]-xr[1])*pmTrack.X();
2817 dcaNegToVertex=TMath::Sqrt(dzNeg*dzNeg/(pow(pmTrack.X(),2)+pow(pmTrack.Y(),2)));
5842a526 2818
76a4d7a7 2819 // Double_t dcaPosToVertex[3];dcaNegToVertex[3];
2820 // trackPos->GetImpactParameters(dcaPosToVertex[0],dcaPosToVertex[1]);
2821 // trackNeg->GetImpactParameters(dcaNegToVertex[0],dcaNegToVertex[1]);
5842a526 2822
76a4d7a7 2823 // dcaPosToVertex = TMath::Sqrt(dcaPosToVertex[0]*dcaPosToVertex[0]+dcaPosToVertex[1]*dcaPosToVertex[1]);
2824 // dcaNegToVertex = TMath::Sqrt(dcaNegToVertex[0]*dcaNegToVertex[0]+dcaNegToVertex[1]*dcaNegToVertex[1]);
5842a526 2825
76a4d7a7 2826 //dcaPosToVertex = posPKF->GetDistanceFromVertexXY(primaryVtxPosition);
2827 //dcaNegToVertex = negPiKF->GetDistanceFromVertexXY(primaryVtxPosition);
5842a526 2828
76a4d7a7 2829 //------------------- dca and decay radius V0 -------------//
aa3d4e29 2830
5842a526 2831
76a4d7a7 2832 Double_t dim2V0Radius= sqrt( pow(xr[0] - primaryVtxPosition[0],2.0)
2833 +pow(xr[1] - primaryVtxPosition[1],2.0));//TMath::Sqrt(xr[0]*xr[0]+xr[1]*xr[1]);
aa3d4e29 2834
76a4d7a7 2835 Double_t decayLength = sqrt( pow(xr[0] - primaryVtxPosition[0],2.0)
2836 +pow(xr[1] - primaryVtxPosition[1],2.0)
2837 +pow(xr[2] - primaryVtxPosition[2],2.0)
2838 );
aa3d4e29 2839
5842a526 2840
76a4d7a7 2841 Double_t dcaV0ToPrimVertex= v0MIs->GetD(primaryVtxPosition[0],primaryVtxPosition[1]);////v0K0KF.GetDistanceFromVertexXY(tPrimaryVtxPosition);
2842
2843 //-------------------- general cuts -------------------//
2844 //-- esd track cuts for daughters --//
2845 // if(fESDTrackCuts){
2846 // if(!fESDTrackCuts->AcceptTrack(trackPosTest)) continue;
2847 // if(!fESDTrackCuts->AcceptTrack(trackNegTest)) continue;
2848 // }
aa3d4e29 2849
76a4d7a7 2850 // fHistPiPiMonitorCuts->Fill(5);
2851 // fHistPiPMonitorCuts[isSecd]->Fill(5);
2852 // fHistPiAPMonitorCuts[isSecd]->Fill(5);
aa3d4e29 2853
76a4d7a7 2854 //-- eta cut --//
2855 if( fabs(posDaughterEta) > fEtaCutMCDaughtersVal || fabs(negDaughterEta) > fEtaCutMCDaughtersVal) continue;
2856 fHistPiPiMonitorCuts->Fill(5);
2857 fHistPiPMonitorCuts[isSecd]->Fill(5);
2858 fHistPiAPMonitorCuts[isSecd]->Fill(5);
aa3d4e29 2859
5842a526 2860
2861
76a4d7a7 2862 //-- radius xy min cut --//
2863 if(dim2V0Radius < fDecayRadXYMin) continue;
2864 // if(fabs(xr[1])<fDecayRadY) continue;
2865 fHistPiPiMonitorCuts->Fill(6);
2866 fHistPiPMonitorCuts[isSecd]->Fill(6);
2867 fHistPiAPMonitorCuts[isSecd]->Fill(6);
2868
2869 //-- radius xy max cut --//
2870 if(dim2V0Radius > fDecayRadXYMax) continue;
2871 // if(fabs(xr[1])<fDecayRadY) continue;
2872 fHistPiPiMonitorCuts->Fill(7);
2873 fHistPiPMonitorCuts[isSecd]->Fill(7);
2874 fHistPiAPMonitorCuts[isSecd]->Fill(7);
5842a526 2875
76a4d7a7 2876 //-- decay length min ->ctau --//
2877 if(decayLength > fDecayLengthMax) continue;
2878 fHistPiPiMonitorCuts->Fill(8);
2879 fHistPiPMonitorCuts[isSecd]->Fill(8);
2880 fHistPiAPMonitorCuts[isSecd]->Fill(8);
aa3d4e29 2881
76a4d7a7 2882 //-- decay length min cut --//
2883 if(decayLength < fDecayLengthMin) continue;
2884 fHistPiPiMonitorCuts->Fill(9);
2885 fHistPiPMonitorCuts[isSecd]->Fill(9);
2886 fHistPiAPMonitorCuts[isSecd]->Fill(9);
5842a526 2887
76a4d7a7 2888 //------------------------ detector values -------------------------------//
2889 //-- TPC ITS values pos --//
2890 Int_t nclsTPCPos = trackPos->GetNcls(1);
2891 Int_t nclsTPCFindablePos = trackPos->GetTPCNclsF();
2892 Int_t nclsITSPos = trackPos->GetNcls(0);
2893 Double_t chi2PerClusterITSPos = -1.0;
2894 if(nclsITSPos>0) chi2PerClusterITSPos = trackPos->GetITSchi2()/Double_t(nclsITSPos);
2895 Double_t crossedRowsTPCPos = trackPos->GetTPCCrossedRows();
aa3d4e29