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