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