add task macro to go with the AliTaskConfigOCDB class
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / LambdaK0PbPb / AliAnalysisTaskV0ForRAA.cxx
CommitLineData
68bb6c03 1/*************************************************************** *\r
2 * Authors : Simone Schuchmann \r
3 * Contributors are mentioned in the code where appropriate. *\r
4 * *\r
5 * Permission to use, copy, modify and distribute this software and its *\r
6 * documentation strictly for non-commercial purposes is hereby granted *\r
7 * without fee, provided that the above copyright notice appears in all *\r
8 * copies and that both the copyright notice and this permission notice *\r
9 * appear in the supporting documentation. The authors make no claims *\r
10 * about the suitability of this software for any purpose. It is *\r
11 * provided "as is" without express or implied warranty. *\r
12 **************************************************************************/\r
13\r
14//-----------------------------------------------------------------\r
15// AliAnalysisTaskV0ForRAA class\r
16// This task is for analysing Lambda and K0s pt spectra in PbPb and\r
17// pp as well as with MC. The flag for pp and MC must be set\r
18// accordingly, default is PbPb data.\r
19// It works with ESD files only.\r
20//-----------------------------------------------------------------\r
21\r
22\r
23#define AliAnalysisTaskV0ForRAA_cxx\r
24\r
25#include "AliAnalysisTaskV0ForRAA.h"\r
26\r
27#include "Riostream.h"\r
28\r
29#include "TROOT.h"\r
30#include "TH1.h"\r
31#include "TH2.h"\r
32#include "TLorentzVector.h"\r
33\r
34#include "AliAnalysisTaskSE.h"\r
35#include "AliAnalysisManager.h"\r
36#include "AliESDInputHandler.h"\r
37#include "AliMCEventHandler.h"\r
38\r
39#include "AliESDVZERO.h"\r
40#include "AliMultiplicity.h"\r
41#include "AliCentrality.h"\r
42\r
43#include "AliKFParticle.h"\r
44#include "AliKFVertex.h"\r
45#include "AliESDtrackCuts.h"\r
46#include "AliESDpid.h"\r
47#include "AliESDv0.h"\r
48#include "AliESDEvent.h"\r
49#include "AliMCEvent.h"\r
50#include "AliStack.h"\r
51#include "AliGenEventHeader.h"\r
52\r
53\r
54\r
55ClassImp(AliAnalysisTaskV0ForRAA)\r
56\r
57//________________________________________________________________________\r
58AliAnalysisTaskV0ForRAA::AliAnalysisTaskV0ForRAA(const char *name)\r
59:AliAnalysisTaskSE(name),\r
60 fESD(0),\r
61 fMCev(0),\r
62//other objects\r
63 fESDpid(0),\r
64 fESDTrackCuts(0),\r
65 fESDTrackCutsCharged(0),\r
66 fOutputContainer(0),\r
67//event histos\r
68 fHistNEvents(0), \r
69 fHistMuliplicity(0),\r
70 fHistMuliplicityRaw(0),\r
71 fHistMultiplicityPrimary(0),\r
72 fHistESDVertexZ(0),\r
73 fHistPrimVtxZESD(0),\r
74 fHistPrimVtxZESDVSNContributors(0),\r
75 fHistNPrim(0),\r
76 fHistITSLayerHits(0),\r
77 fHistOneHitWithSDD(0),\r
78 fHistPrimVtxZESDTPC(0),\r
79 fHistPrimVtxZESDSPD(0), \r
80 fHistPrimVtxZESDTPCVSNContributors(0),\r
81 fHistPrimVtxZESDSPDVSNContributors(0),\r
82 fHistCentBinRaw(0),\r
83 fHistCentBin(0),\r
84 fHistPrimVtxZESDVSNContributorsMC(0),\r
85 fHistPrimVtxZESDTPCVSNContributorsMC(0),\r
86 fHistPrimVtxZESDSPDVSNContributorsMC(0),\r
87 fHistMCVertexZ(0),\r
88//MC pdg code histos\r
89 fHistPiPiPDGCode(0),\r
90 fHistPiPPDGCode(0),\r
91 fHistPiAPPDGCode(0),\r
92//cosine of pointing angle of Xi vs pt histos\r
93 fHistPiPCosPointAngXiVsPt(0),\r
94 fHistPiAPCosPointAngXiVsPt(0),\r
95// fHistUserPtShift(0),\r
96//selection booleans and values\r
97 fMCMode(0),\r
98 fMCTruthMode(0),\r
99 fSelectInjected(0),\r
100 fUseCentrality(0),\r
101 fUseCentralityBin(0),\r
102 fUseCentralityRange(0),\r
103 fAnapp(0),\r
104 fSelSDD(0),\r
105 fOntheFly(0),\r
106 fVertexZCut(0),\r
107 fVtxStatus(0),\r
108 fUsePID(0),\r
109 fNSigma(0),\r
110 fPPIDcut(0),\r
111 fMoreNclsThanRows(0),\r
112 fMoreNclsThanFindable(0),\r
113 fChi2PerClusterITS(0),\r
114 fRapCutV0(0),\r
115 fRap(0),\r
116 fEtaCutMCDaughters(0),\r
117 fEtaCutMCDaughtersVal(0),\r
118 fMinPt(0),\r
119 fAlfaCut(0),\r
120 fQtCut(0),\r
121 fQtCutPtLow(0),\r
122 fArmCutK0(0), \r
123 fArmCutL(0), \r
124 fDCAToVertexK0(0),\r
125 fDCAToVertexL(0),\r
126 fDCAXK(0),\r
127 fDCAYK(0),\r
128 fDCAXL(0),\r
129 fDCAYL(0),\r
130 fDCAZ(0),\r
131 fDCADaughtersL(0),\r
132 fDCADaughtersAL(0),\r
133 fDCADaughtersK0(0),\r
134 fDCADaughtersToVtxLarge(0),\r
135 fDCADaughtersToVtxSmall(0),\r
136 fDecayRadXYMin(0),\r
137 fDecayRadXYMax(0),\r
138 fCosPointAngL(0),\r
139 fCosPointAngK(0),\r
140 fCPAPtCutK0(0),\r
141 fCPAPtCutL(0),\r
142 fOpengAngleDaughters(0),\r
143 fOpAngPtCut(0),\r
144 fDecayLengthMax(0),\r
145 fDecayLengthMin(0),\r
146 fCtauK0s(0),\r
147 fCtauL(0),\r
148 fCtauPtCutK0(0),\r
149 fCtauPtCutL(0),\r
150 fChiCutKf(0) // fShift(0),\r
151 // fDeltaInvP(0)\r
152{ // Constructor.\r
153\r
154 DefineOutput(1,TList::Class());\r
155\r
156 // define defaults for globals\r
157 /*\r
158 fShift = kFALSE; // shift in charge/pt yes/no\r
159 fDeltaInvP = 0.00; // shift value\r
160 */\r
161 \r
162 fMCMode = kFALSE;\r
163 fMCTruthMode = kFALSE;\r
164\r
165 fUseCentrality = 0;\r
166 fUseCentralityBin = 0;\r
167 fUseCentralityRange =0;\r
168\r
169 fAnapp = kFALSE;\r
170 fSelSDD = kFALSE;\r
171\r
172 fSelectInjected = kFALSE;\r
173\r
174 fVertexZCut = 100000.0;\r
175 fVtxStatus = kFALSE;\r
176 \r
177 fOntheFly = kTRUE;\r
178\r
179 //----- define defaults for V0 and track cuts ----//\r
180 fUsePID = kFALSE;\r
181 fMoreNclsThanRows = kFALSE;\r
182 fMoreNclsThanFindable = kFALSE;\r
183 fChi2PerClusterITS = 100000.0;\r
184 fNSigma = 100000.0;\r
185 fPPIDcut = 100.0;\r
186\r
187 fRapCutV0=kFALSE;\r
188 fRap=1000.0;\r
189 fRap=1000.0;\r
190\r
191 fAlfaCut= -100.0;\r
192 fQtCut = 100.0;\r
193 fQtCutPtLow = -1.0;\r
194 fArmCutK0=kFALSE; \r
195 fArmCutL=kFALSE; \r
196\r
197 fEtaCutMCDaughters = kFALSE;\r
198 fEtaCutMCDaughtersVal = 50.0;\r
199\r
200 fMinPt= -1.0;\r
201\r
202 fDCAToVertexK0 = 10000.0;\r
203 fDCAToVertexL = 10000.0;\r
204 fDCAXK=10000.0;\r
205 fDCAYK=10000.0;\r
206 fDCAXL=10000.0;\r
207 fDCAYL=10000.0;\r
208 fDCAZ=10000.0;\r
209 \r
210 fDCADaughtersL=10000.0;\r
211 fDCADaughtersAL=10000.0;\r
212 fDCADaughtersK0=10000.0;\r
213\r
214 fDCADaughtersToVtxLarge=-1.0;\r
215 fDCADaughtersToVtxSmall=-1.0;\r
216\r
217 fDecayRadXYMin=-1.0;\r
218 fDecayRadXYMax=1000000.0;\r
219 fDecayLengthMax=100000.0;\r
220 fDecayLengthMin=-1.0;\r
221 \r
222 fCosPointAngL=-1.0;\r
223 fCosPointAngK=-1.0;\r
224 fCPAPtCutK0 = 1000.0;\r
225 fCPAPtCutL =1000.0;\r
226 fOpengAngleDaughters = -1.0;\r
227 fOpAngPtCut = -1.0;\r
228 \r
229 fCtauK0s=10000.0;\r
230 fCtauL=10000.0;\r
231 fCtauPtCutK0=1000.0;\r
232 fCtauPtCutL=10000.0;\r
233\r
234 fChiCutKf=1000000.0;\r
235\r
236 \r
237 //---- histograms ----//\r
238 for(Int_t j=0;j<2;j++){\r
239 fHistV0RadiusZ[j] =NULL;\r
240 fHistV0RadiusZVSPt[j] =NULL;\r
241 fHistV0RadiusXY[j] =NULL;\r
242 fHistV0RadiusXYVSY[j] =NULL;\r
243 fHistArmenteros[j]=NULL;\r
244 \r
245 //K0\r
246 fHistPiPiMass[j]=NULL;\r
247 fHistPiPiMassVSPt[j]=NULL;\r
248 fHistPiPiMassVSPtMCTruth[j]=NULL;\r
249 fHistPiPiPtVSY[j]=NULL;\r
250 // fHistPiPiMassVSAlpha[j]=NULL;\r
251 fHistPiPiDecayLengthVsPt[j]=NULL;\r
252 fHistPiPiMonitorCuts[j] =NULL;\r
253 \r
254 //Lambda\r
255 fHistPiPMass[j]=NULL;\r
256 fHistPiPMassVSPt[j]=NULL;\r
257 fHistPiPMassVSPtMCTruth[j]=NULL;\r
258 fHistPiPPtVSY[j]=NULL;\r
259 fHistPiPDecayLengthVsPt[j]=NULL;\r
260 fHistPiPMonitorCuts[j] =NULL;\r
261 //ALambda\r
262 fHistPiAPMass[j]=NULL;\r
263 fHistPiAPMassVSPt[j]=NULL;\r
264 fHistPiAPMassVSPtMCTruth[j]=NULL;\r
265 fHistPiAPPtVSY[j]=NULL;\r
266 fHistPiAPDecayLengthVsPt[j]=NULL;\r
267 fHistPiAPMonitorCuts[j] =NULL;\r
268\r
269 //eta daughters reco\r
270 fHistPiPiEtaDReco[j] = NULL;\r
271 fHistPiPEtaDReco[j] = NULL; \r
272\r
273 //K0s\r
274 fHistPiPiDCADaughters[j]=NULL; \r
275 fHistPiPiDCADaughterPosToPrimVtxVSMass[j]=NULL;\r
276 // fHistPiPiMassVSPtK0L[j]=NULL;\r
277 fHistPiPiDCAVSMass[j]=NULL;\r
278 fHistPiPiCosPointAng[j]=NULL;\r
279 fHistPiPiDecayLengthVsMass[j]=NULL;\r
280 fHistPiPiRadiusXY[j]=NULL;\r
281\r
282\r
283 //Lambda\r
284 fHistPiPDCADaughters[j]=NULL;\r
285 fHistPiPDCADaughterPosToPrimVtxVSMass[j]=NULL;\r
286 fHistPiPDCAVSMass[j]=NULL;\r
287 fHistPiPCosPointAng[j]=NULL;\r
288 fHistPiPDecayLengthVsMass[j]=NULL;\r
289 fHistPiPRadiusXY[j]=NULL; \r
290 //ALambda\r
291 fHistPiAPDCADaughters[j]=NULL;\r
292 fHistPiAPDCADaughterPosToPrimVtxVSMass[j]=NULL;\r
293 fHistPiAPDCAVSMass[j]=NULL;\r
294 fHistPiAPCosPointAng[j]=NULL;\r
295 fHistPiAPDecayLengthVsMass[j]=NULL;\r
296 fHistPiAPRadiusXY[j]=NULL;\r
297\r
298 //other \r
299 fHistDedxSecProt[j]=NULL;\r
300 fHistDedxSecPiPlus[j]=NULL;\r
301 fHistDedxSecAProt[j]=NULL;\r
302 fHistDedxSecPiMinus[j]=NULL;\r
303\r
304 fHistNclsITSPosK0[j]=NULL;\r
305 fHistNclsITSNegK0[j]=NULL;\r
306 fHistNclsTPCPosK0[j]=NULL;\r
307 fHistNclsTPCNegK0[j]=NULL;\r
308 fHistChi2PerNclsITSPosK0[j]=NULL;\r
309 fHistChi2PerNclsITSNegK0[j]=NULL;\r
310\r
311 fHistNclsITSPosL[j]=NULL;\r
312 fHistNclsITSNegL[j]=NULL;\r
313 fHistNclsTPCPosL[j]=NULL;\r
314 fHistNclsTPCNegL[j]=NULL;\r
315 fHistChi2PerNclsITSPosL[j]=NULL;\r
316 fHistChi2PerNclsITSNegL[j]=NULL;\r
317\r
318 fHistNclsITSPos[j]=NULL;\r
319 fHistNclsITSNeg[j]=NULL;\r
320 fHistNclsTPCPos[j]=NULL;\r
321 fHistNclsTPCNeg[j]=NULL;\r
322 fHistChi2PerNclsITSPos[j]=NULL;\r
323 fHistChi2PerNclsITSNeg[j]=NULL;\r
324 fHistNclsITS[j]=NULL;\r
325 fHistNclsTPC[j]=NULL;\r
326 fHistNCRowsTPCPos[j]=NULL;\r
327 fHistNCRowsTPCNeg[j]=NULL;\r
328 \r
329 // eta daughters MC\r
330 fHistPiPiEtaDMC[j] = NULL;\r
331 fHistPiPEtaDMC[j] = NULL; \r
332\r
333 //Lambda sec \r
334 fHistPiPMassVSPtSecSigma[j]=NULL;\r
335 fHistPiPMassVSPtSecXi[j]=NULL;\r
336 fHistPiPMassVSYSecXi[j]=NULL;\r
337 fHistPiPXi0PtVSLambdaPt[j]=NULL;\r
338 fHistPiPXiMinusPtVSLambdaPt[j]=NULL;\r
339 \r
340 //ALambda sec\r
341 fHistPiAPMassVSPtSecSigma[j]=NULL;\r
342 fHistPiAPMassVSPtSecXi[j]=NULL;\r
343 fHistPiAPMassVSYSecXi[j]=NULL;\r
344 fHistPiAPXi0PtVSLambdaPt[j]=NULL;\r
345 fHistPiAPXiMinusPtVSLambdaPt[j]=NULL;\r
346\r
347 }\r
348 \r
349}\r
350//_____________________________________________________\r
351AliAnalysisTaskV0ForRAA::~AliAnalysisTaskV0ForRAA()\r
352{\r
353 //---- Remove all pointers ----//\r
354 if(fOutputContainer) delete fOutputContainer;fOutputContainer=0;\r
355 if(fESDTrackCuts) delete fESDTrackCuts;fESDTrackCuts=0;\r
356 if(fESDTrackCutsCharged) delete fESDTrackCutsCharged;fESDTrackCutsCharged=0;\r
357\r
358}\r
359//________________________________________________________________________\r
360void AliAnalysisTaskV0ForRAA::UserCreateOutputObjects(){\r
361 //create output objects\r
362\r
363 Int_t nbPt=800;\r
364 Int_t nbMass=500;\r
365\r
366 \r
367 //----------------- create output container -----------------//\r
368\r
369 fOutputContainer = new TList() ;\r
370 fOutputContainer->SetName(GetName()) ;\r
371 fOutputContainer->SetOwner();\r
372 \r
373\r
374 //------------ create allways -----------------------//\r
375 fHistNEvents = new TH1F("fHistNEvents","no of events before cuts =0, after cuts=1, after process =2",5,0.0,5.0);\r
376 fOutputContainer->Add(fHistNEvents);\r
377 \r
378 fHistMuliplicity = new TH1F("fHistMuliplicity","V0 multiplicity",3000,0.0,30000);\r
379 fOutputContainer->Add(fHistMuliplicity);\r
380 \r
381 fHistMuliplicityRaw = new TH1F("fHistMuliplicityRaw","V0 multiplicity before process",3000,0.0,30000); \r
382 fOutputContainer->Add(fHistMuliplicityRaw);\r
383 \r
384 fHistMultiplicityPrimary = new TH1F("fHistMultiplicityPrimary","number of charged tracks",5000,0.0,20000);\r
385 fOutputContainer->Add(fHistMultiplicityPrimary);\r
386 \r
387 fHistESDVertexZ= new TH1F("fHistESDVertexZ"," z vertex distr in cm",500,-50,50);\r
388 fOutputContainer->Add(fHistESDVertexZ);\r
389 \r
390 fHistPrimVtxZESD = new TH1F("fHistPrimVtxZESD","z vertex pos ESD",250,-50,50);\r
391 fOutputContainer->Add(fHistPrimVtxZESD);\r
392 \r
393 fHistPrimVtxZESDVSNContributors = new TH2F("fHistPrimVtxZESDVSNContributors","prim vtx pos z ESD vs no. of contributers TPC",250,-50,50,500,0.0,500.0);\r
394 fOutputContainer->Add(fHistPrimVtxZESDVSNContributors);\r
395 \r
396 fHistNPrim = new TH1F("fHistNPrim","Number of contributers to vertex",2500,0.0,5000);\r
397 fOutputContainer->Add(fHistNPrim);\r
398 \r
399 //------------------------ pp analysis only -------------------------//\r
400 if(fAnapp){\r
401 fHistITSLayerHits = new TH1F("fHistITSLayerHits","SDD layer -1=0,1=1,2=2 ... 5=5,0=nothing",7,-1.5,5.5);\r
402 fOutputContainer->Add(fHistITSLayerHits);\r
403 fHistOneHitWithSDD = new TH1F("fHistOneHitWithSDD","min one hit in SDD",2,-0.5,1.5);\r
404 fOutputContainer->Add(fHistOneHitWithSDD);\r
405 fHistPrimVtxZESDTPC = new TH1F("fHistPrimVtxZESDTPC","z vertex pos TPC",250,-50,50);\r
406 fOutputContainer->Add(fHistPrimVtxZESDTPC);\r
407 fHistPrimVtxZESDSPD = new TH1F("fHistPrimVtxZESDSPD","z vertex pos SPD",250,-50,50);\r
408 fOutputContainer->Add(fHistPrimVtxZESDSPD); \r
409 fHistPrimVtxZESDTPCVSNContributors = new TH2F("fHistPrimVtxZESDTPCVSNContributors","prim vtx pos z TPC vs no. of contributers TPC",250,-50,50,500,0.0,500.0);\r
410 fOutputContainer->Add(fHistPrimVtxZESDTPCVSNContributors);\r
411 fHistPrimVtxZESDSPDVSNContributors = new TH2F("fHistPrimVtxZESDSPDVSNContributors","prim vtx pos z SPD vs no. of contributers TPC",250,-50,50,500,0.0,500.0);\r
412 fOutputContainer->Add(fHistPrimVtxZESDSPDVSNContributors);\r
413\r
414 }\r
415 else {\r
416 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};\r
417 fHistCentBinRaw = new TH1F("fHistCentBinRaw","centrality bin before cent selection",11,binsCent);\r
418 fOutputContainer->Add(fHistCentBinRaw);\r
419 fHistCentBin = new TH1F("fHistCentBin","centrality bin",11,binsCent);\r
420 fOutputContainer->Add(fHistCentBin);\r
421 \r
422 }\r
423 \r
424\r
425 \r
426 fHistPrimVtxZESDVSNContributorsMC = new TH2F("fHistPrimVtxZESDVSNContributorsMC","prim vtx pos z ESD vs no. of contributers MC",250,-50,50,500,0.0,500.0);\r
427 fOutputContainer->Add(fHistPrimVtxZESDVSNContributorsMC);\r
428 fHistPrimVtxZESDTPCVSNContributorsMC = new TH2F("fHistPrimVtxZESDTPCVSNContributorsMC","prim vtx pos z TPC vs no. of contributers MC",250,-50,50,500,0.0,500.0);\r
429 fOutputContainer->Add(fHistPrimVtxZESDTPCVSNContributorsMC);\r
430 fHistPrimVtxZESDSPDVSNContributorsMC = new TH2F("fHistPrimVtxZESDSPDVSNContributorsMC","prim vtx pos z SPD vs no. of contributers MC",250,-50,50,500,0.0,500.0);\r
431 fOutputContainer->Add(fHistPrimVtxZESDSPDVSNContributorsMC);\r
432 fHistMCVertexZ= new TH1F("fHistMCVertexZ"," z vertex distr in cm MC",500,-50,50);\r
433 fOutputContainer->Add(fHistMCVertexZ);\r
434 fHistPiPiPDGCode = new TH1F("fHistPiPiPDGCode","PDG code of K0s mothers",3500,0,3500);\r
435 fOutputContainer->Add(fHistPiPiPDGCode);\r
436 fHistPiPPDGCode = new TH1F("fHistPiPPDGCode","PDG code of #Lambda mothers",3500,0,3500);\r
437 fOutputContainer->Add(fHistPiPPDGCode);\r
438 fHistPiAPPDGCode = new TH1F("fHistPiAPPDGCode","PDG code of #bar{#Lambda} mothers",3500,0,3500);\r
439 fOutputContainer->Add(fHistPiAPPDGCode);\r
440 fHistPiPCosPointAngXiVsPt= new TH2F("fHistPiPCosPointAngXiVsPt","pi-p cos of pointing angle vs pt from xi",200,0.0,20.0,250,0.99,1.00);\r
441 fOutputContainer->Add(fHistPiPCosPointAngXiVsPt);\r
442 fHistPiAPCosPointAngXiVsPt= new TH2F("fHistPiAPCosPointAngXiVsPt","pi+p- cos of pointing angle vs pt from xi",200,0.0,20.0,250,0.98,1.00); \r
443 fOutputContainer->Add(fHistPiAPCosPointAngXiVsPt); \r
444\r
445\r
446\r
447 // ------------------- add always ---------------------------//\r
448 fHistV0RadiusZ[0] = new TH2F("fHistV0RadiusZ","z of decay radius vs 2D radius",100,0.0,100.0,250,-125.0,125.0);\r
449 fOutputContainer->Add(fHistV0RadiusZ[0]);\r
450\r
451 fHistV0RadiusZVSPt[0] = new TH2F("fHistV0RadiusZVSPt","z of decay radius vs pt radius",200,0.0,20.0,125,0.0,125.0);\r
452 fOutputContainer->Add( fHistV0RadiusZVSPt[0]);\r
453 fHistV0RadiusXY[0] = new TH2F("fHistV0RadiusXY","y vs x decay radius",250,-125.0,125.0,250,-125.0,125.0);\r
454 fOutputContainer->Add( fHistV0RadiusXY[0]);\r
455 fHistV0RadiusXYVSY[0] = new TH2F("fHistV0RadiusXYVSY","2D decay radius vs rap",100,-10,10,100,0.0,100.0);\r
456 fOutputContainer->Add( fHistV0RadiusXYVSY[0] );\r
457 fHistArmenteros[0] = new TH2F("fHistArmenteros"," pi+pi- armenteros",nbMass,-1.,1.,500,0.,0.5);\r
458 fOutputContainer->Add(fHistArmenteros[0]);\r
459 //***************************************** K0s **********************************//\r
460 fHistPiPiMass[0] = new TH1F("fHistPiPiMass"," pi+pi- InvMass distribution",2*nbMass,0.,2.);\r
461 fOutputContainer->Add( fHistPiPiMass[0]);\r
462 fHistPiPiMassVSPt[0] = new TH2F("fHistPiPiMassVSPt","pi+pi- InvMass distribution",nbMass,0.25,0.75,300,0.0,30.0);\r
463 fOutputContainer->Add( fHistPiPiMassVSPt[0]);\r
464 fHistPiPiMassVSPtMCTruth[0] = new TH2F("fHistPiPiMassVSPtMCTruth","pi+pi- InvMass distribution vs pt MCTruth",nbMass,0.25,0.75,300,0.0,30.0);\r
465 fOutputContainer->Add( fHistPiPiMassVSPtMCTruth[0]);\r
466 fHistPiPiPtVSY[0] = new TH2F("fHistPiPiPtVSY","p{t} vs y",100,-1,1,100,0.0,20);\r
467 fOutputContainer->Add( fHistPiPiPtVSY[0]);\r
468 fHistPiPiDecayLengthVsPt[0] = new TH2F("fHistPiPiDecayLengthVsPt","K0 decay length vs pt",200,0.0,20.0,200,0.0,100.0);\r
469 fOutputContainer->Add(fHistPiPiDecayLengthVsPt[0]); \r
470 fHistPiPiMonitorCuts[0] = new TH1F("fHistPiPiMonitorCuts","K0 cut monitor",25,0.5,25.5);\r
471 fOutputContainer->Add( fHistPiPiMonitorCuts[0]);\r
472 //***************************************** Lambda **********************************//\r
473 fHistPiPMass[0] = new TH1F("fHistPiPMass"," p+pi- InvMass distribution",2*nbMass,0.,2.);\r
474 fOutputContainer->Add( fHistPiPMass[0]); \r
475 fHistPiPMassVSPt[0] = new TH2F("fHistPiPMassVSPt","p+pi- InvMass distribution",nbMass,1.05,1.25,300,0.0,30.0);\r
476 fOutputContainer->Add( fHistPiPMassVSPt[0]);\r
477 fHistPiPMassVSPtMCTruth[0] = new TH2F("fHistPiPMassVSPtMCTruth","p+pi- InvMass distribution vs pt MCTruth",nbMass,1.05,1.25,300,0.0,30.0);\r
478 fOutputContainer->Add( fHistPiPMassVSPtMCTruth[0]);\r
479 fHistPiPPtVSY[0] = new TH2F("fHistPiPPtVSY","p{t} vs y",100,-1,1,100,0.0,20);\r
480 fOutputContainer->Add( fHistPiPPtVSY[0]);\r
481 fHistPiPDecayLengthVsPt[0] = new TH2F("fHistPiPDecayLengthVsPt","#Lambda decay length vs pt",200,0.0,20.0,200,0.0,100.0);\r
482 fOutputContainer->Add( fHistPiPDecayLengthVsPt[0] );\r
483 fHistPiPMonitorCuts[0] = new TH1F("fHistPiPMonitorCuts","#Lambda cut monitor",25,0.5,25.5);\r
484 fOutputContainer->Add( fHistPiPMonitorCuts[0]);\r
485 //***************************************** AntiLambda **********************************//\r
486 fHistPiAPMass[0] = new TH1F("fHistPiAPMass"," ap-pi+ InvMass distribution",2*nbMass,0.,2.);\r
487 fOutputContainer->Add( fHistPiAPMass[0] );\r
488 fHistPiAPMassVSPt[0] = new TH2F("fHistPiAPMassVSPt","p-pi+ InvMass distribution",nbMass,1.05,1.25,300,0.0,30.0);\r
489 fOutputContainer->Add( fHistPiAPMassVSPt[0]);\r
490 fHistPiAPMassVSPtMCTruth[0] = new TH2F("fHistPiAPMassVSPtMCTruth","p-pi+ InvMass distribution vs pt MCTruth",nbMass,1.05,1.25,300,0.0,30.0);\r
491 fOutputContainer->Add( fHistPiAPMassVSPtMCTruth[0]); \r
492 fHistPiAPPtVSY[0] = new TH2F("fHistPiAPPtVSY","p{t} vs y",100,-1,1,100,0.0,20);\r
493 fOutputContainer->Add( fHistPiAPPtVSY[0]);\r
494 fHistPiAPDecayLengthVsPt[0] = new TH2F("fHistPiAPDecayLengthVsPt","#bar{#Lambda} decay length vs pt",200,0.0,20.0,200,0.0,100.0);\r
495 fOutputContainer->Add( fHistPiAPDecayLengthVsPt[0] );\r
496 fHistPiAPMonitorCuts[0] = new TH1F("fHistPiAPMonitorCuts","#bar{#Lambda} cut monitor",25,0.5,25.5); \r
497 fOutputContainer->Add( fHistPiAPMonitorCuts[0]);\r
498 // if(mchist==2){// for MC reco\r
499 fHistV0RadiusZ[1] = new TH2F("fHistV0RadiusZSec","z of decay radius vs 2D radius",100,0.0,100.0,250,-125.0,125.0);\r
500 fOutputContainer->Add( fHistV0RadiusZ[1]); \r
501 fHistV0RadiusZVSPt[1] = new TH2F("fHistV0RadiusZVSPtSec","z of decay radius vs pt radius",200,0.0,20.0,125,0.0,125.0);\r
502 fOutputContainer->Add( fHistV0RadiusZVSPt[1]);\r
503 fHistV0RadiusXY[1] = new TH2F("fHistV0RadiusXYSec","y vs x decay radius",250,-125.0,125.0,250,-125.0,125.0);\r
504 fOutputContainer->Add( fHistV0RadiusXY[1] );\r
505 fHistV0RadiusXYVSY[1] = new TH2F("fHistV0RadiusXYVSYSec","2D decay radius vs rap",100,-10,10,100,0.0,100.0);\r
506 fOutputContainer->Add( fHistV0RadiusXYVSY[1]); \r
507 fHistArmenteros[1] = new TH2F("fHistArmenterosSec"," pi+pi- armenteros",nbMass,-1.,1.,500,0.,0.5);\r
508 fOutputContainer->Add( fHistArmenteros[1]);\r
509 //***************************************** K0s **********************************//\r
510 fHistPiPiMass[1] = new TH1F("fHistPiPiMassSec"," pi+pi- InvMass distribution",2*nbMass,0.,2.);\r
511 fOutputContainer->Add( fHistPiPiMass[1] );\r
512 fHistPiPiMassVSPt[1] = new TH2F("fHistPiPiMassVSPtSec","pi+pi- InvMass distribution",nbMass,0.25,0.75,300,0.0,30.0);\r
513 fOutputContainer->Add(fHistPiPiMassVSPt[1]);\r
514 fHistPiPiMassVSPtMCTruth[1] = new TH2F("fHistPiPiMassVSPtMCTruthSec","pi+pi- InvMass distribution vs pt MCTruth",nbMass,0.25,0.75,300,0.0,30.0);\r
515 fOutputContainer->Add( fHistPiPiMassVSPtMCTruth[1] );\r
516 fHistPiPiPtVSY[1] = new TH2F("fHistPiPiPtVSYSec","p{t} vs y",100,-1,1,100,0.0,20);\r
517 fOutputContainer->Add(fHistPiPiPtVSY[1]);\r
518 fHistPiPiDecayLengthVsPt[1] = new TH2F("fHistPiPiDecayLengthVsPtSec","K0 decay length vs pt",200,0.0,20.0,200,0.0,100.0);\r
519 fOutputContainer->Add(fHistPiPiDecayLengthVsPt[1]);\r
520 fHistPiPiMonitorCuts[1] = new TH1F("fHistPiPiMonitorCutsSec","K0 cut monitor",25,0.5,25.5);\r
521 fOutputContainer->Add(fHistPiPiMonitorCuts[1]);\r
522 //***************************************** Lambda **********************************//\r
523 fHistPiPMass[1] = new TH1F("fHistPiPMassSec"," p+pi- InvMass distribution",2*nbMass,0.,2.);\r
524 fOutputContainer->Add( fHistPiPMass[1]);\r
525 fHistPiPMassVSPt[1] = new TH2F("fHistPiPMassVSPtSec","p+pi- InvMass distribution",nbMass,1.05,1.25,300,0.0,30.0);\r
526 fOutputContainer->Add( fHistPiPMassVSPt[1]);\r
527 fHistPiPMassVSPtMCTruth[1] = new TH2F("fHistPiPMassVSPtMCTruthSec","p+pi- InvMass distribution vs pt MCTruth",nbMass,1.05,1.25,300,0.0,30.0);\r
528 fOutputContainer->Add(fHistPiPMassVSPtMCTruth[1]);\r
529 fHistPiPPtVSY[1] = new TH2F("fHistPiPPtVSYSec","p{t} vs y",100,-1,1,100,0.0,20);\r
530 fOutputContainer->Add( fHistPiPPtVSY[1]);\r
531 fHistPiPDecayLengthVsPt[1] = new TH2F("fHistPiPDecayLengthVsPtSec","#Lambda decay length vs pt",200,0.0,20.0,200,0.0,100.0);\r
532 fOutputContainer->Add( fHistPiPDecayLengthVsPt[1]); \r
533 fHistPiPMonitorCuts[1] = new TH1F("fHistPiPMonitorCutsSec","#Lambda cut monitor",25,0.5,25.5);\r
534 fOutputContainer->Add( fHistPiPMonitorCuts[1]);\r
535 //***************************************** AntiLambda **********************************//\r
536 fHistPiAPMass[1] = new TH1F("fHistPiAPMassSec"," ap-pi+ InvMass distribution",2*nbMass,0.,2.);\r
537 fOutputContainer->Add( fHistPiAPMass[1]);\r
538 fHistPiAPMassVSPt[1] = new TH2F("fHistPiAPMassVSPtSec","p-pi+ InvMass distribution",nbMass,1.05,1.25,300,0.0,30.0);\r
539 fOutputContainer->Add( fHistPiAPMassVSPt[1]);\r
540 fHistPiAPMassVSPtMCTruth[1] = new TH2F("fHistPiAPMassVSPtMCTruthSec","p-pi+ InvMass distribution vs pt MCTruth",nbMass,1.05,1.25,300,0.0,30.0);\r
541 fOutputContainer->Add(fHistPiAPMassVSPtMCTruth[1]);\r
542 fHistPiAPPtVSY[1] = new TH2F("fHistPiAPPtVSYSec","p{t} vs y",100,-1,1,100,0.0,20);\r
543 fOutputContainer->Add( fHistPiAPPtVSY[1]);\r
544 fHistPiAPDecayLengthVsPt[1] = new TH2F("fHistPiAPDecayLengthVsPtSec","#bar{#Lambda} decay length vs pt",200,0.0,20.0,200,0.0,100.0);\r
545 fOutputContainer->Add( fHistPiAPDecayLengthVsPt[1] );\r
546 fHistPiAPMonitorCuts[1] = new TH1F("fHistPiAPMonitorCutsSec","#bar{#Lambda} cut monitor",25,0.5,25.5);\r
547 fOutputContainer->Add( fHistPiAPMonitorCuts[1]);\r
548 \r
549\r
550 //----------------- for reco or data or mc data like MC reco only -----------------//\r
551 \r
552 \r
553 fHistPiPiEtaDReco[0] = new TH2F("fHistPiPiEtaDRecoRaw","K0s daughters eta raw",300,-6,6,100,0,20);\r
554 fOutputContainer->Add(fHistPiPiEtaDReco[0]);\r
555 fHistPiPiEtaDReco[1] = new TH2F("fHistPiPiEtaDReco","K0s daughters eta after rap V0 cut pos",300,-3,3,300,-3.00,3.0);\r
556 fOutputContainer->Add(fHistPiPiEtaDReco[1]); \r
557 fHistPiPEtaDReco[0] = new TH2F("fHistPiPEtaDRecoRaw","#Lambda daughters eta raw",300,-6,6,100,0,20);\r
558 fOutputContainer->Add(fHistPiPEtaDReco[0]);\r
559 fHistPiPEtaDReco[1] = new TH2F("fHistPiPEtaDReco","#Lambda daughters eta after rap V0 cut neg",300,-3,3,300,-3.00,3.0);\r
560 fOutputContainer->Add(fHistPiPEtaDReco[1]);\r
561 \r
562 //********************************************** K0 *************************************************//\r
563 \r
564 // fHistPiPiMassVSAlpha[0] = new TH2F("fHistPiPiMassVSAlpha"," alpha armenteros vs pi+pi- InvMass distribution",nbMass,0.25,0.75,500,-1.,1.);\r
565\r
566 fHistPiPiDCADaughters[0] = new TH2F("fHistPiPiDCADaughters","dca of K0 daughters",nbMass,0.25,0.75,250,0.0,2);\r
567 fOutputContainer->Add( fHistPiPiDCADaughters[0]); \r
568 fHistPiPiDCADaughterPosToPrimVtxVSMass[0] = new TH2F("fHistPiPiDCADaughterPosToPrimVtxVSMass","pi+ DCA daughter to prim vtx vsinvmass",nbMass,0.25,0.75,250,0.0,25.0);\r
569 fOutputContainer->Add( fHistPiPiDCADaughterPosToPrimVtxVSMass[0] );\r
570 fHistPiPiDCAVSMass[0] = new TH2F("fHistPiPiDCAVSMass","pi+pi- dca vs pt",nbMass,0.25,0.75,250,0.0,5.0);\r
571 fOutputContainer->Add( fHistPiPiDCAVSMass[0]);\r
572 fHistPiPiCosPointAng[0] = new TH2F("fHistPiPiCosPointAng","K0 cosine of pointing angle vs dca to prim vtx",200,0.0,10.0,250,0.99,1.00);\r
573 fOutputContainer->Add( fHistPiPiCosPointAng[0] );\r
574 fHistPiPiDecayLengthVsMass[0] = new TH2F("fHistPiPiDecayLengthVsMass","K0 decay length vs mass",nbMass,0.25,0.75,200,0.0,100.0);\r
575 fOutputContainer->Add(fHistPiPiDecayLengthVsMass[0]);\r
576 fHistPiPiRadiusXY[0] = new TH2F("fHistPiPiRadiusXY","pi+pi- opening angle vs mass",nbMass,0.25,0.75,200,0.0,4.0);\r
577 fOutputContainer->Add( fHistPiPiRadiusXY[0]);\r
578 // fHistPiPiPtDaughters[0] = new TH2F("fHistPiPiPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);\r
579\r
580 \r
581 //***************************************** Lambda *********************************************//\r
582 fHistPiPDCADaughters[0] = new TH2F("fHistPiPDCADaughters","dca of #Lambda daughters",nbMass,1.05,1.25,250,0.0,2.0);\r
583 fOutputContainer->Add(fHistPiPDCADaughters[0]);\r
584 fHistPiPDCADaughterPosToPrimVtxVSMass[0] = new TH2F("fHistPiPDCADaughterPosToPrimVtxVSMass","p DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,25.0);\r
585 fOutputContainer->Add( fHistPiPDCADaughterPosToPrimVtxVSMass[0]);\r
586 fHistPiPDCAVSMass[0] = new TH2F("fHistPiPDCAVSMass","ppi- dca vs pt",nbMass,1.05,1.25,250,0.0,5.0);\r
587 fOutputContainer->Add( fHistPiPDCAVSMass[0]);\r
588 fHistPiPCosPointAng[0] = new TH2F("fHistPiPCosPointAng","#Lambda cosine of pointing angle vs dca to prim vtx",200,0.0,10.0,250,0.99,1.00);\r
589 fOutputContainer->Add( fHistPiPCosPointAng[0] );\r
590 fHistPiPDecayLengthVsMass[0] = new TH2F("fHistPiPDecayLengthVsMass","#Lambda decay length vs mass",nbMass,1.05,1.25,200,0.0,100.0);\r
591 fOutputContainer->Add( fHistPiPDecayLengthVsMass[0]);\r
592 fHistPiPRadiusXY[0] = new TH2F("fHistPiPRadiusXY","pi-p+ opening angle vs mass",nbMass,1.05,1.25,200,0.0,4.0);\r
593 fOutputContainer->Add( fHistPiPRadiusXY[0]);\r
594 // fHistPiPPtDaughters[0] = new TH2F("fHistPiPPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);\r
595 \r
596 //************************************** Antilambda **********************************************//\r
597 fHistPiAPDCADaughters[0] = new TH2F("fHistPiAPDCADaughters","dca of #bar{#Lambda} daughters",nbMass,1.05,1.25,250,0.0,2.0);\r
598 fOutputContainer->Add( fHistPiAPDCADaughters[0]);\r
599 fHistPiAPDCADaughterPosToPrimVtxVSMass[0] = new TH2F("fHistPiAPDCADaughterPosToPrimVtxVSMass","pi+ DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,25.0);\r
600 fOutputContainer->Add(fHistPiAPDCADaughterPosToPrimVtxVSMass[0]);\r
601 fHistPiAPDCAVSMass[0] = new TH2F("fHistPiAPDCAVSMass","pi+p- dca vs pt",nbMass,1.05,1.25,250,0.0,5.0);\r
602 fOutputContainer->Add( fHistPiAPDCAVSMass[0]);\r
603 fHistPiAPCosPointAng [0] = new TH2F("fHistPiAPCosPointAng","#bar{#Lambda} cosine of pointing angle vs dcs to prim vtx",200,0.0,10.0,250,0.99,1.00);\r
604 fOutputContainer->Add( fHistPiAPCosPointAng [0] );\r
605 fHistPiAPDecayLengthVsMass[0] = new TH2F("fHistPiAPDecayLengthVsMass","#bar{#Lambda} decay length vs mass",nbMass,1.05,1.25,200,0.0,100.0);\r
606 fOutputContainer->Add( fHistPiAPDecayLengthVsMass[0]);\r
607 fHistPiAPRadiusXY[0] = new TH2F("fHistPiAPRadiusXY","pi+p- opening angle vs mass",nbMass,1.05,1.25,200,0.0,4.0);\r
608 fOutputContainer->Add( fHistPiAPRadiusXY[0]);\r
609 // fHistPiAPPtDaughters[0] = new TH2F("fHistPiAPPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);\r
610 \r
611 //**********************************************TPC*****************************************************//\r
612\r
613 fHistDedxSecProt[0] = new TH2F("fHistDedxSecProt","proton", nbPt, 0, 20, 100, 0, 400);\r
614 fOutputContainer->Add( fHistDedxSecProt[0]);\r
615 fHistDedxSecPiPlus[0] = new TH2F("fHistDedxSecPiPlus","pi plus", nbPt, 0, 20, 100, 0, 400);\r
616 fOutputContainer->Add( fHistDedxSecPiPlus[0]);\r
617 fHistDedxSecAProt[0] = new TH2F("fHistDedxSecAProt","antiproton", nbPt, 0, 20, 100, 0, 400);\r
618 fOutputContainer->Add( fHistDedxSecAProt[0]);\r
619 fHistDedxSecPiMinus[0] = new TH2F("fHistDedxSecPiMinus","pi minus", nbPt, 0, 20, 100, 0, 400);\r
620 fOutputContainer->Add( fHistDedxSecPiMinus[0]);\r
621 fHistNclsITSPosK0[0] = new TH1F("fHistNclsITSPosK0","fHistNclsITSPos K0",10,-0.5,9.5);\r
622 fOutputContainer->Add(fHistNclsITSPosK0[0]);\r
623 fHistNclsITSNegK0[0] = new TH1F("fHistNclsITSNegK0","fHistNclsITSNeg K0",10,-0.5,9.5);\r
624 fOutputContainer->Add( fHistNclsITSNegK0[0]);\r
625 fHistNclsTPCPosK0[0] = new TH1F("fHistNclsTPCPosK0","fHistNclsTPCPos K0",200,-0.5,199.5);\r
626 fOutputContainer->Add( fHistNclsTPCPosK0[0]);\r
627 fHistNclsTPCNegK0[0] = new TH1F("fHistNclsTPCNegK0","fHistNclsTPCNeg K0",200,-0.5,199.5);\r
628 fOutputContainer->Add( fHistNclsTPCNegK0[0] );\r
629 fHistChi2PerNclsITSPosK0[0] = new TH1F("fHistChi2PerNclsITSPosK0","chi2 per cluster ITS pi+pi-",250,0.0,50.0);\r
630 fOutputContainer->Add(fHistChi2PerNclsITSPosK0[0]);\r
631 fHistChi2PerNclsITSNegK0[0] = new TH1F("fHistChi2PerNclsITSNegK0","chi2 per cluster ITS pi+pi- neg",250,0.0,50.0);\r
632 fOutputContainer->Add(fHistChi2PerNclsITSNegK0[0]);\r
633 fHistNclsITSPosL[0] = new TH1F("fHistNclsITSPosL","fHistNclsITSPos #Lambda",10,-0.5,9.5);\r
634 fOutputContainer->Add( fHistNclsITSPosL[0] );\r
635 fHistNclsITSNegL[0] = new TH1F("fHistNclsITSNegL","fHistNclsITSNeg #Lambda",10,-0.5,9.5);\r
636 fOutputContainer->Add(fHistNclsITSNegL[0]);\r
637 fHistNclsTPCPosL[0] = new TH1F("fHistNclsTPCPosL","fHistNclsTPCPos #Lambda",200,-0.5,199.5);\r
638 fOutputContainer->Add(fHistNclsTPCPosL[0]);\r
639 fHistNclsTPCNegL[0] = new TH1F("fHistNclsTPCNegL","fHistNclsTPCNeg #Lambda",200,-0.5,199.5);\r
640 fOutputContainer->Add( fHistNclsTPCNegL[0]);\r
641 fHistChi2PerNclsITSPosL[0] = new TH1F("fHistChi2PerNclsITSPosL","chi2 per cluster ITS pi-p+ pos",250,0.0,50.0);\r
642 fOutputContainer->Add( fHistChi2PerNclsITSPosL[0]);\r
643 fHistChi2PerNclsITSNegL[0] = new TH1F("fHistChi2PerNclsITSNegL","chi2 per cluster ITS pi-p+ neg",250,0.0,50.0);\r
644 fOutputContainer->Add( fHistChi2PerNclsITSNegL[0]);\r
645 //for 2d pt dep studies\r
646 fHistNclsITSPos[0] = new TH2F("fHistNclsITSPos","fHistNclsITSPos vs pt pos",200,0.0,20.0,10,-0.5,9.5);\r
647 fOutputContainer->Add( fHistNclsITSPos[0]);\r
648 fHistNclsITSNeg[0] = new TH2F("fHistNclsITSNeg","fHistNclsITSNeg vs pt neg",200,0.0,20.0,10,-0.5,9.5);\r
649 fOutputContainer->Add( fHistNclsITSNeg[0]);\r
650 fHistNclsTPCPos[0] = new TH2F("fHistNclsTPCPos","ncls vs findable ncls pos",200,0.0,200.0,200,0.0,200.0);\r
651 fOutputContainer->Add(fHistNclsTPCPos[0] );\r
652 fHistNclsTPCNeg[0] = new TH2F("fHistNclsTPCNeg","ncls vs findable ncls neg",200,0.0,200.0,200,0.0,200.0);\r
653 fOutputContainer->Add( fHistNclsTPCNeg[0]);\r
654 fHistChi2PerNclsITSPos[0] = new TH2F("fHistChi2PerNclsITSPos","chi2 per cluster ITS pi+p-vs pt pos",200,0.0,20.0,250,0.0,50.0);\r
655 fOutputContainer->Add( fHistChi2PerNclsITSPos[0] );\r
656 fHistChi2PerNclsITSNeg[0] = new TH2F("fHistChi2PerNclsITSNeg","chi2 per cluster ITS pi+p- neg vs pt neg",200,0.0,20.0,250,0.0,50.0);\r
657 fOutputContainer->Add( fHistChi2PerNclsITSNeg[0] );\r
658 fHistNclsITS[0] = new TH2F("fHistNclsITS","fHistNclsITS pos vs neg",10,-0.5,9.5,10,-0.5,9.5);\r
659 fOutputContainer->Add( fHistNclsITS[0]);\r
660 fHistNclsTPC[0] = new TH2F("fHistNclsTPC","ncls TPC neg vs crossed rows neg",200,-0.5,199.5,200,-0.5,199.5);\r
661 fOutputContainer->Add( fHistNclsTPC[0]);\r
662 fHistNCRowsTPCPos[0] = new TH2F("fHistNCRowsTPCPos","n crossed rows vs pt pos",200,0.0,20.0,200,0.0,200.0);\r
663 fOutputContainer->Add( fHistNCRowsTPCPos[0] );\r
664 fHistNCRowsTPCNeg[0] = new TH2F("fHistNCRowsTPCNeg","n crossed rows vs pt neg",200,0.0,20.0,200,0.0,200.0);\r
665 fOutputContainer->Add( fHistNCRowsTPCNeg[0] );\r
666\r
667 \r
668 // if(mchist==2){// for MC reco\r
669\r
670 //********************************************** K0 *************************************************//\r
671 // fHistPiPiMassVSAlpha[0] = new TH2F("fHistPiPiMassVSAlpha"," alpha armenteros vs pi+pi- InvMass distribution",nbMass,0.25,0.75,500,-1.,1.);\r
672 fHistPiPiDCADaughters[1] = new TH2F("fHistPiPiDCADaughtersSec","dca of K0 daughters",nbMass,0.25,0.75,250,0.0,2);\r
673 fOutputContainer->Add( fHistPiPiDCADaughters[1] );\r
674 fHistPiPiDCADaughterPosToPrimVtxVSMass[1] = new TH2F("fHistPiPiDCADaughterPosToPrimVtxVSMassSec","pi+ DCA daughter to prim vtx vsinvmass",nbMass,0.25,0.75,250,0.0,25.0);\r
675 fOutputContainer->Add( fHistPiPiDCADaughterPosToPrimVtxVSMass[1]);\r
676 fHistPiPiDCAVSMass[1] = new TH2F("fHistPiPiDCAVSMassSec","pi+pi- dca vs pt",nbMass,0.25,0.75,250,0.0,5.0);\r
677 fOutputContainer->Add(fHistPiPiDCAVSMass[1]);\r
678 fHistPiPiCosPointAng[1] = new TH2F("fHistPiPiCosPointAngSec","K0 cosine of pointing angle vs dca to prim vtx",200,0.0,10.0,250,0.99,1.00);\r
679 fOutputContainer->Add( fHistPiPiCosPointAng[1]);\r
680 fHistPiPiDecayLengthVsMass[1] = new TH2F("fHistPiPiDecayLengthVsMassSec","K0 decay length vs mass",nbMass,0.25,0.75,200,0.0,100.0);\r
681 fOutputContainer->Add( fHistPiPiDecayLengthVsMass[1]);\r
682 fHistPiPiRadiusXY[1] = new TH2F("fHistPiPiRadiusXYSec","pi+pi- opening angle vs mass",nbMass,0.25,0.75,200,0.0,4.0);\r
683 fOutputContainer->Add(fHistPiPiRadiusXY[1]);\r
684 // fHistPiPiPtDaughters[0] = new TH2F("fHistPiPiPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);\r
685\r
686 \r
687 //********************************************** Lambda ***********************************************//\r
688 fHistPiPDCADaughters[1] = new TH2F("fHistPiPDCADaughtersSec","dca of #Lambda daughters",nbMass,1.05,1.25,250,0.0,2.0);\r
689 fOutputContainer->Add( fHistPiPDCADaughters[1]);\r
690 fHistPiPDCADaughterPosToPrimVtxVSMass[1] = new TH2F("fHistPiPDCADaughterPosToPrimVtxVSMassSec","p DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,25.0);\r
691 fOutputContainer->Add( fHistPiPDCADaughterPosToPrimVtxVSMass[1]);\r
692 fHistPiPDCAVSMass[1] = new TH2F("fHistPiPDCAVSMassSec","ppi- dca vs pt",nbMass,1.05,1.25,250,0.0,5.0);\r
693 fOutputContainer->Add( fHistPiPDCAVSMass[1] );\r
694 fHistPiPCosPointAng[1] = new TH2F("fHistPiPCosPointAngSec","#Lambda cosine of pointing angle vs dca to prim vtx",200,0.0,10.0,250,0.99,1.00);\r
695 fOutputContainer->Add( fHistPiPCosPointAng[1] );\r
696 fHistPiPDecayLengthVsMass[1] = new TH2F("fHistPiPDecayLengthVsMassSec","#Lambda decay length vs mass",nbMass,1.05,1.25,200,0.0,100.0);\r
697 fOutputContainer->Add( fHistPiPDecayLengthVsMass[1]);\r
698 fHistPiPRadiusXY[1] = new TH2F("fHistPiPRadiusXYSec","pi-p+ opening angle vs mass",nbMass,1.05,1.25,200,0.0,4.0);\r
699 // fHistPiPPtDaughters[0] = new TH2F("fHistPiPPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);\r
700 fOutputContainer->Add( fHistPiPRadiusXY[1]);\r
701 //******************************************* Antilambda **********************************************//\r
702 fHistPiAPDCADaughters[1] = new TH2F("fHistPiAPDCADaughtersSec","dca of #bar{#Lambda} daughters",nbMass,1.05,1.25,250,0.0,2.0);\r
703 fOutputContainer->Add( fHistPiAPDCADaughters[1]);\r
704 fHistPiAPDCADaughterPosToPrimVtxVSMass[1] = new TH2F("fHistPiAPDCADaughterPosToPrimVtxVSMassSec","pi+ DCA daughter to prim vtx vs invmass",nbMass,1.05,1.25,250,0.0,25.0);\r
705 fOutputContainer->Add( fHistPiAPDCADaughterPosToPrimVtxVSMass[1]);\r
706 fHistPiAPDCAVSMass[1] = new TH2F("fHistPiAPDCAVSMassSec","pi+p- dca vs pt",nbMass,1.05,1.25,250,0.0,5.0);\r
707 fOutputContainer->Add( fHistPiAPDCAVSMass[1]);\r
708 fHistPiAPCosPointAng[1] = new TH2F("fHistPiAPCosPointAngSec","#bar{#Lambda} cosine of pointing angle vs dcs to prim vtx",200,0.0,10.0,250,0.99,1.00);\r
709 fOutputContainer->Add( fHistPiAPCosPointAng[1]);\r
710 fHistPiAPDecayLengthVsMass[1] = new TH2F("fHistPiAPDecayLengthVsMassSec","#bar{#Lambda} decay length vs mass",nbMass,1.05,1.25,200,0.0,100.0);\r
711 fOutputContainer->Add( fHistPiAPDecayLengthVsMass[1]);\r
712 fHistPiAPRadiusXY[1] = new TH2F("fHistPiAPRadiusXYSec","pi+p- opening angle vs mass",nbMass,1.05,1.25,200,0.0,4.0);\r
713 fOutputContainer->Add( fHistPiAPRadiusXY[1] );\r
714 // fHistPiAPPtDaughters[0] = new TH2F("fHistPiAPPtDaughters","p_{t} pos vs p_{t} neg of daughters",400,0.0,20.0,400,0,20.0);\r
715\r
716 //******************************************* TPC ****************************************************//\r
717 \r
718 fHistDedxSecProt[1] = new TH2F("fHistDedxSecProtSec","proton", nbPt, 0, 20, 100, 0, 400);\r
719 fOutputContainer->Add( fHistDedxSecProt[1]); \r
720 fHistDedxSecPiPlus[1] = new TH2F("fHistDedxSecPiPlusSec","pi plus", nbPt, 0, 20, 100, 0, 400);\r
721 fOutputContainer->Add( fHistDedxSecPiPlus[1]);\r
722 fHistDedxSecAProt[1] = new TH2F("fHistDedxSecAProtSec","antiproton", nbPt, 0, 20, 100, 0, 400);\r
723 fOutputContainer->Add(fHistDedxSecAProt[1]);\r
724 fHistDedxSecPiMinus[1] = new TH2F("fHistDedxSecPiMinusSec","pi minus", nbPt, 0, 20, 100, 0, 400);\r
725 fOutputContainer->Add( fHistDedxSecPiMinus[1]);\r
726 fHistNclsITSPosK0[1] = new TH1F("fHistNclsITSPosK0Sec","fHistNclsITSPos K0 ",10,-0.5,9.5);\r
727 fOutputContainer->Add( fHistNclsITSPosK0[1]);\r
728 fHistNclsITSNegK0[1] = new TH1F("fHistNclsITSNegK0Sec","fHistNclsITSNeg K0",10,-0.5,9.5);\r
729 fOutputContainer->Add( fHistNclsITSNegK0[1]);\r
730 fHistNclsTPCPosK0[1] = new TH1F("fHistNclsTPCPosK0Sec","fHistNclsTPCPos K0",200,-0.5,199.5);\r
731 fOutputContainer->Add( fHistNclsTPCPosK0[1]);\r
732 fHistNclsTPCNegK0[1] = new TH1F("fHistNclsTPCNegK0Sec","fHistNclsTPCNeg K0",200,-0.5,199.5);\r
733 fOutputContainer->Add(fHistNclsTPCNegK0[1] );\r
734 fHistChi2PerNclsITSPosK0[1] = new TH1F("fHistChi2PerNclsITSPosK0Sec","chi2 per cluster ITS pi+pi- pos",250,0.0,50.0);\r
735 fOutputContainer->Add( fHistChi2PerNclsITSPosK0[1] );\r
736 fHistChi2PerNclsITSNegK0[1] = new TH1F("fHistChi2PerNclsITSNegK0Sec","chi2 per cluster ITS pi+pi- neg",250,0.0,50.0);\r
737 fOutputContainer->Add( fHistChi2PerNclsITSNegK0[1]);\r
738 fHistNclsITSPosL[1] = new TH1F("fHistNclsITSPosLSec","fHistNclsITSPos #Lambda",10,-0.5,9.5);\r
739 fOutputContainer->Add( fHistNclsITSPosL[1]);\r
740 fHistNclsITSNegL[1] = new TH1F("fHistNclsITSNegLSec","fHistNclsITSNeg #Lambda",10,-0.5,9.5);\r
741 fOutputContainer->Add( fHistNclsITSNegL[1]);\r
742 fHistNclsTPCPosL[1] = new TH1F("fHistNclsTPCPosLSec","fHistNclsTPCPos #Lambda",200,-0.5,199.5);\r
743 fOutputContainer->Add( fHistNclsTPCPosL[1]);\r
744 fHistNclsTPCNegL[1] = new TH1F("fHistNclsTPCNegLSec","fHistNclsTPCNeg #Lambda",200,-0.5,199.5);\r
745 fOutputContainer->Add( fHistNclsTPCNegL[1] );\r
746 fHistChi2PerNclsITSPosL[1] = new TH1F("fHistChi2PerNclsITSPosLSec","chi2 per cluster ITS pi-p+ pos",250,0.0,50.0);\r
747 fOutputContainer->Add( fHistChi2PerNclsITSPosL[1]);\r
748 fHistChi2PerNclsITSNegL[1] = new TH1F("fHistChi2PerNclsITSNegLSec","chi2 per cluster ITS pi-p+ neg",250,0.0,50.0);\r
749 fOutputContainer->Add( fHistChi2PerNclsITSNegL[1]);\r
750 //for 2d pt dep studies\r
751 fHistNclsITSPos[1] = new TH2F("fHistNclsITSPosSec","fHistNclsITSPos vs pt pos",200,0.0,20.0,10,-0.5,9.5);\r
752 fOutputContainer->Add( fHistNclsITSPos[1]);\r
753 fHistNclsITSNeg[1] = new TH2F("fHistNclsITSNegSec","fHistNclsITSNeg vs pt neg",200,0.0,20.0,10,-0.5,9.5);\r
754 fOutputContainer->Add(fHistNclsITSNeg[1]);\r
755 fHistNclsTPCPos[1] = new TH2F("fHistNclsTPCPosSec","ncls vs findable ncls pos",200,0.0,200.0,200,0.0,200.0);\r
756 fOutputContainer->Add( fHistNclsTPCPos[1] );\r
757 fHistNclsTPCNeg[1] = new TH2F("fHistNclsTPCNegSec","ncls vs findable ncls neg",200,0.0,200.0,200,0.0,200.0);\r
758 fOutputContainer->Add( fHistNclsTPCNeg[1]);\r
759 fHistChi2PerNclsITSPos[1] = new TH2F("fHistChi2PerNclsITSPosSec","chi2 per cluster ITS pi+p-vs pt pos",200,0.0,20.0,250,0.0,50.0);\r
760 fOutputContainer->Add( fHistChi2PerNclsITSPos[1]);\r
761 fHistChi2PerNclsITSNeg[1] = new TH2F("fHistChi2PerNclsITSNegSec","chi2 per cluster ITS pi+p- neg vs pt neg",200,0.0,20.0,250,0.0,50.0);\r
762 fOutputContainer->Add( fHistChi2PerNclsITSNeg[1]);\r
763 fHistNclsITS[1] = new TH2F("fHistNclsITSSec","fHistNclsITS pos vs neg",10,-0.5,9.5,10,-0.5,9.5);\r
764 fOutputContainer->Add( fHistNclsITS[1]);\r
765 fHistNclsTPC[1] = new TH2F("fHistNclsTPCSec","ncls TPC neg vs crossed rows neg",200,-0.5,199.5,200,-0.5,199.5);\r
766 fOutputContainer->Add(fHistNclsTPC[1] );\r
767 fHistNCRowsTPCPos[1] = new TH2F("fHistNCRowsTPCPosSec","n crossed rows vs pt pos",200,0.0,20.0,200,0.0,200.0);\r
768 fOutputContainer->Add( fHistNCRowsTPCPos[1]);\r
769 fHistNCRowsTPCNeg[1] = new TH2F("fHistNCRowsTPCNegSec","n crossed rows vs pt neg",200,0.0,20.0,200,0.0,200.0);\r
770 fOutputContainer->Add( fHistNCRowsTPCNeg[1]);\r
771\r
772 fHistPiPiEtaDMC[0] = new TH2F("fHistPiPiEtaDMCRaw","K0s daughters etaMC raw",300,-6,6,100,0,20);//\r
773 fOutputContainer->Add(fHistPiPiEtaDMC[0]);\r
774 fHistPiPiEtaDMC[1] = new TH2F("fHistPiPiEtaDMC","K0s daughters etaMC after rap V0 cut",300,-6,6,100,0,20);\r
775 fOutputContainer->Add(fHistPiPiEtaDMC[1]); \r
776 fHistPiPEtaDMC[0] = new TH2F("fHistPiPEtaDMCRaw","#Lambda daughters etaMC raw",300,-6,6,100,0,20);\r
777 fOutputContainer->Add(fHistPiPEtaDMC[0]); \r
778 fHistPiPEtaDMC[1] = new TH2F("fHistPiPEtaDMC","#Lambda daughters etaMC after rap V0 cut",300,-6,6,100,0,20);\r
779 fOutputContainer->Add(fHistPiPEtaDMC[1]);\r
780\r
781 //********************************************** K0 *************************************************//\r
782 \r
783 \r
784 \r
785 //********************************************** Lambda **********************************************//\r
786 \r
787 fHistPiPMassVSPtSecSigma[0] = new TH2F("fHistPiPMassVSPtSecSigmaMC"," pi-p+ InvMass distribution secondaries from sigma MC",nbMass,1.05,1.25,200,0.,20);\r
788 fOutputContainer->Add( fHistPiPMassVSPtSecSigma[0]);\r
789 fHistPiPMassVSPtSecSigma[1] = new TH2F("fHistPiPMassVSPtSecSigma"," pi-p+ InvMass distribution secondaries from Sigma reco",nbMass,1.05,1.25,200,0.,20);\r
790 fOutputContainer->Add( fHistPiPMassVSPtSecSigma[1]);\r
791 fHistPiPMassVSPtSecXi[0] = new TH2F("fHistPiPMassVSPtSecXiMC"," pi-p+ InvMass distribution secondaries from xi MC",nbMass,1.05,1.25,200,0.,20);\r
792 fOutputContainer->Add( fHistPiPMassVSPtSecXi[0]);\r
793 fHistPiPMassVSPtSecXi[1] = new TH2F("fHistPiPMassVSPtSecXi"," pi-p+ InvMass distribution secondaries from xi reco",nbMass,1.05,1.25,200,0.,20);\r
794 fOutputContainer->Add( fHistPiPMassVSPtSecXi[1] );\r
795 fHistPiPMassVSYSecXi[0] = new TH2F("fHistPiPMassVSYSecXiMC"," pi-p+ InvMass distribution secondaries from xi MC",nbMass,1.05,1.25,100,-2.,2);\r
796 fOutputContainer->Add( fHistPiPMassVSYSecXi[0]);\r
797 fHistPiPMassVSYSecXi[1] = new TH2F("fHistPiPMassVSYSecXi"," pi-p+ InvMass distribution secondaries from xi reco",nbMass,1.05,1.25,100,-2.,2);\r
798 fOutputContainer->Add(fHistPiPMassVSYSecXi[1] );\r
799 fHistPiPXi0PtVSLambdaPt[0]= new TH2F("fHistPiPXi0PtVSLambdaPtMC"," pt xi 0 vs pt lambda MC truth",200,0.0,20.0,200,0.0,20.0);\r
800 fOutputContainer->Add(fHistPiPXi0PtVSLambdaPt[0]);\r
801 fHistPiPXi0PtVSLambdaPt[1]= new TH2F("fHistPiPXi0PtVSLambdaPt"," pt xi 0 truth vs pt lambda reco",200,0.0,20.0,200,0.0,20.0);\r
802 fOutputContainer->Add( fHistPiPXi0PtVSLambdaPt[1]);\r
803 fHistPiPXiMinusPtVSLambdaPt[0]= new TH2F("fHistPiPXiMinusPtVSLambdaPtMC","pt xi- vs pt lambda MC truth",200,0.0,20.0,200,0.0,20.0);\r
804 fOutputContainer->Add( fHistPiPXiMinusPtVSLambdaPt[0]);\r
805 fHistPiPXiMinusPtVSLambdaPt[1]= new TH2F("fHistPiPXiMinusPtVSLambdaPt","pt xi- truth vs pt lambda reco",200,0.0,20.0,200,0.0,20.0);\r
806 fOutputContainer->Add( fHistPiPXiMinusPtVSLambdaPt[1]);\r
807 //******************************************* Antilambda **********************************************//\r
808\r
809 fHistPiAPMassVSPtSecSigma[0] = new TH2F("fHistPiAPMassVSPtSecSigmaMC"," pi+p- InvMass distribution secondaries from Sigma MC",nbMass,1.05,1.25,200,0.,20);\r
810 fOutputContainer->Add(fHistPiAPMassVSPtSecSigma[0]);\r
811 fHistPiAPMassVSPtSecSigma[1] = new TH2F("fHistPiAPMassVSPtSecSigma"," pi+p- InvMass distribution secondaries from Sigma reco",nbMass,1.05,1.25,200,0.,20);\r
812 fOutputContainer->Add( fHistPiAPMassVSPtSecSigma[1]);\r
813 fHistPiAPMassVSPtSecXi[0] = new TH2F("fHistPiAPMassVSPtSecXiMC"," pi+p- InvMass distribution secondaries from xi MC",nbMass,1.05,1.25,200,0.,20);\r
814 fOutputContainer->Add( fHistPiAPMassVSPtSecXi[0]);\r
815 fHistPiAPMassVSPtSecXi[1] = new TH2F("fHistPiAPMassVSPtSecXi"," pi+p- InvMass distribution secondaries from Xi reco",nbMass,1.05,1.25,200,0.,20);\r
816 fOutputContainer->Add(fHistPiAPMassVSPtSecXi[1]);\r
817\r
818 fHistPiAPMassVSYSecXi[0] = new TH2F("fHistPiAPMassVSYSecXiMC"," pi+p- InvMass distribution secondaries from xi MC",nbMass,1.05,1.25,100,-2,2);\r
819 fOutputContainer->Add(fHistPiAPMassVSYSecXi[0]);\r
820 fHistPiAPMassVSYSecXi[1] = new TH2F("fHistPiAPMassVSYSecXi"," pi+p- InvMass distribution secondaries from xi reco",nbMass,1.05,1.25,100,-2.,2);\r
821 fOutputContainer->Add( fHistPiAPMassVSYSecXi[1]);\r
822 fHistPiAPXi0PtVSLambdaPt[0]= new TH2F("fHistPiAPXi0PtVSLambdaPtMC"," pt xi 0 vs pt Alambda MC truth",200,0.0,20.0,200,0.0,20.0);\r
823 fOutputContainer->Add( fHistPiAPXi0PtVSLambdaPt[0]);\r
824 fHistPiAPXi0PtVSLambdaPt[1]= new TH2F("fHistPiAPXi0PtVSLambdaPt"," pt xi 0 truth vs pt Alambda reco",200,0.0,20.0,200,0.0,20.0);\r
825 fOutputContainer->Add(fHistPiAPXi0PtVSLambdaPt[1]);\r
826 fHistPiAPXiMinusPtVSLambdaPt[0]= new TH2F("fHistPiAPXiMinusPtVSLambdaPtMC","pt xi- vs pt Alambda MC truth",200,0.0,20.0,200,0.0,20.0);\r
827 fOutputContainer->Add(fHistPiAPXiMinusPtVSLambdaPt[0]);\r
828 fHistPiAPXiMinusPtVSLambdaPt[1]= new TH2F("fHistPiAPXiMinusPtVSLambdaPt","pt xi- truth vs pt Alambda reco",200,0.0,20.0,200,0.0,20.0);\r
829 fOutputContainer->Add( fHistPiAPXiMinusPtVSLambdaPt[1]);\r
830 \r
831 PostData(1,fOutputContainer); \r
832 \r
833}\r
834\r
835//________________________________________________________________________\r
836void AliAnalysisTaskV0ForRAA::UserExec(Option_t *) {\r
837 //user exec\r
838\r
839 //-- esd handler --//\r
840 AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> \r
841 (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());\r
842 if (!esdH) {\r
843 printf("ERROR: Could not get ESDInputHandler");\r
844 return;\r
845 } \r
846 fESD = esdH->GetEvent();\r
847 if(!fESD) {\r
848 printf("ERROR: fESD not available \n");\r
849 return ;\r
850 }\r
851\r
852 //-- mc handler --//\r
853 if(fMCMode || fMCTruthMode){\r
854 AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler*> \r
855 (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());\r
856 if(!mcH) {\r
857 printf("ERROR: Could not get MCInputHandler");\r
858 return;\r
859 }\r
860 fMCev = mcH->MCEvent();\r
861 if (!fMCev) {\r
862 printf("ERROR: fMCev not available \n");\r
863 return ;\r
864 }\r
865 }\r
866 \r
867\r
868 //-- AliPIDResponse --//\r
869 fESDpid = esdH->GetPIDResponse();\r
870 \r
871 //-- Count events before cuts --//\r
872 fHistNEvents->Fill(0);\r
873\r
874 //-- Check object existence --//\r
875 const AliESDVertex * vtxESD = fESD->GetPrimaryVertexTracks();\r
876 const AliESDVertex * vtxESDTPC = fESD->GetPrimaryVertexTPC(); \r
877 const AliESDVertex * vtxESDSPD = fESD->GetPrimaryVertexSPD(); \r
878 const AliMultiplicity * multESD = fESD->GetMultiplicity(); \r
879\r
880 if ( !vtxESD ){\r
881 AliError("No Tracks Vertex");\r
882 return;\r
883 }\r
884\r
885 if ( !vtxESDTPC ){\r
886 AliError("No TPC Vertex");\r
887 return ;\r
888 }\r
889\r
890 if ( !vtxESDSPD ){\r
891 AliError("No SPD Vertex");\r
892 return ;\r
893 }\r
894\r
895 if ( !multESD ){\r
896 AliError("No Multiplicity");\r
897 return ;\r
898 }\r
899 \r
900\r
901 // ----------- MC vertex -----------------------------------//\r
902 \r
903 Int_t nContr =0;\r
904 if(fMCMode && fMCTruthMode){\r
905 Double_t vVertexPrim[3];\r
906 fMCev->GetPrimaryVertex()->GetXYZ(vVertexPrim);\r
907 fHistMCVertexZ->Fill(vVertexPrim[2]);\r
908 \r
909 if (vtxESD->GetStatus()){\r
910 nContr=vtxESD->GetNContributors();\r
911 fHistPrimVtxZESDVSNContributorsMC->Fill(vVertexPrim[2],nContr);\r
912 fHistPrimVtxZESDTPCVSNContributorsMC->Fill(vVertexPrim[2],nContr);\r
913 }\r
914 else {\r
915 if(vtxESDSPD->GetStatus()){\r
916 nContr=vtxESDSPD->GetNContributors();\r
917 fHistPrimVtxZESDTPCVSNContributorsMC->Fill(vVertexPrim[2],nContr);\r
918 fHistPrimVtxZESDSPDVSNContributorsMC->Fill(vVertexPrim[2],nContr);\r
919 }\r
920 else{\r
921 fHistPrimVtxZESDVSNContributorsMC->Fill(vVertexPrim[2],nContr);//add for correction ESD and ESDPSD!!!!\r
922 fHistPrimVtxZESDTPCVSNContributorsMC->Fill(vVertexPrim[2],nContr);\r
923 }\r
924 }\r
925 }\r
926 \r
927 //-- Monitor event cuts --//\r
928 fHistNEvents->Fill(1);\r
929 \r
930 // -- Check fo centrality\r
931 Bool_t process = kTRUE;\r
932 Int_t centBin = -1;\r
933 if(fUseCentrality) {\r
934 centBin = CalculateCentralityBin();\r
935 if(!fUseCentralityRange){\r
936 if(centBin!= fUseCentralityBin) process=kFALSE;\r
937 }\r
938 else if(centBin < fUseCentralityBin || centBin > fUseCentralityBin+fUseCentralityRange)\r
939 process = kFALSE;\r
940 }\r
941\r
942 AliESDVZERO* esdV0 = fESD->GetVZEROData();\r
943 Float_t multV0 = esdV0->GetMTotV0A() + esdV0->GetMTotV0C();\r
944 \r
945 if(fAnapp){// pp Analysis\r
946 // SDD test for 2.76TeV pp\r
947 // select events with SDD\r
948 // TString trCl = fESD->GetFiredTriggerClasses();\r
949 //if(!(trCl.Contains("ALLNOTRD")) && fSelSDD) return;\r
950 UInt_t maskSel = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();\r
951 if(maskSel& AliVEvent::kFastOnly && fSelSDD) return; \r
952\r
953 Int_t ntracks = fESD->GetNumberOfTracks();\r
954 for(Int_t i=0;i<ntracks;i++){//check sdd event selection\r
955 AliESDtrack *tr= fESD->GetTrack(i);\r
956 \r
957 Bool_t sdd0 = tr->HasPointOnITSLayer(0);\r
958 Bool_t sdd1 = tr->HasPointOnITSLayer(1);\r
959 Bool_t sdd2 = tr->HasPointOnITSLayer(2);\r
960 Bool_t sdd3 = tr->HasPointOnITSLayer(3);\r
961 Bool_t sdd4 = tr->HasPointOnITSLayer(4);\r
962 Bool_t sdd5 = tr->HasPointOnITSLayer(5);\r
963 \r
964 fHistITSLayerHits->Fill(Int_t(sdd0)*(-1),ntracks);\r
965 fHistITSLayerHits->Fill(Int_t(sdd1)*1,ntracks);\r
966 fHistITSLayerHits->Fill(Int_t(sdd2)*2,ntracks);\r
967 fHistITSLayerHits->Fill(Int_t(sdd3)*3,ntracks);\r
968 fHistITSLayerHits->Fill(Int_t(sdd4)*4,ntracks);\r
969 fHistITSLayerHits->Fill(Int_t(sdd5)*5,ntracks);\r
970 }\r
971 \r
972 //vertex selection\r
973 if (vtxESD->GetStatus()){\r
974 fHistNEvents->Fill(2);\r
975 fHistESDVertexZ->Fill(vtxESD->GetZv());\r
976 if(fabs(vtxESD->GetZv()) < fVertexZCut){\r
977 fHistMuliplicityRaw->Fill(multV0);\r
978 fHistNEvents->Fill(3);\r
979 fHistNPrim->Fill(nContr);\r
980 \r
981 Process();\r
982 \r
983 fHistMuliplicity->Fill(multV0);\r
984 \r
985 nContr = vtxESD->GetNContributors();\r
986 // if(nContr<501){\r
987 fHistPrimVtxZESDVSNContributors->Fill(vtxESD->GetZv(),nContr);\r
988 fHistPrimVtxZESDTPCVSNContributors->Fill(vtxESDTPC->GetZv(),nContr);\r
989 //fHistPrimVtxZESDSPDVSNContributorsTPC->Fill(vtxESDSPD->GetZv(),nContr);\r
990 // }\r
991 fHistPrimVtxZESD->Fill(vtxESD->GetZv());\r
992 fHistPrimVtxZESDTPC->Fill(vtxESDTPC->GetZv());\r
993 // fHistPrimVtxZESDSPD->Fill(vtxESDSPD->GetZv());\r
994 // -- count events after processing\r
995 fHistNEvents->Fill(4);\r
996 }\r
997 }\r
998 else{\r
999 if(vtxESDSPD->GetStatus()){\r
1000 fHistNEvents->Fill(2);\r
1001 \r
1002 fHistESDVertexZ->Fill(vtxESDSPD->GetZv());\r
1003 if(fabs(vtxESDSPD->GetZv()) < fVertexZCut){\r
1004 \r
1005 fHistMuliplicityRaw->Fill(multV0);\r
1006 fHistNEvents->Fill(3);\r
1007 fHistNPrim->Fill(nContr);\r
1008 \r
1009 Process();\r
1010 \r
1011 fHistMuliplicity->Fill(multV0);\r
1012 \r
1013 nContr = vtxESDSPD->GetNContributors();\r
1014 // if(nContr<501){\r
1015 //fHistPrimVtxZESDVSNContributors->Fill(vtxESD->GetZv(),nContr);\r
1016 fHistPrimVtxZESDTPCVSNContributors->Fill(vtxESDTPC->GetZv(),nContr);\r
1017 fHistPrimVtxZESDSPDVSNContributors->Fill(vtxESDSPD->GetZv(),nContr);\r
1018 // }\r
1019 // fHistPrimVtxZESD->Fill(vtxESD->GetZv());\r
1020 fHistPrimVtxZESDTPC->Fill(vtxESDTPC->GetZv());\r
1021 fHistPrimVtxZESDSPD->Fill(vtxESDSPD->GetZv());\r
1022 // -- count events after processing\r
1023 fHistNEvents->Fill(4);\r
1024 }\r
1025 }\r
1026 //else return;\r
1027 }\r
1028 }\r
1029 else{// PbPb analysis\r
1030 if(vtxESD->GetStatus()){\r
1031 Double_t vtxZ = vtxESD->GetZv();\r
1032 fHistESDVertexZ->Fill(vtxZ);\r
1033 if(process){\r
1034 fHistNEvents->Fill(2);\r
1035 if(fabs(vtxZ) < fVertexZCut){\r
1036 nContr = vtxESD->GetNContributors();\r
1037 fHistMuliplicityRaw->Fill(multV0);\r
1038 fHistNEvents->Fill(3);\r
1039 fHistNPrim->Fill(nContr);\r
1040 Process();\r
1041 fHistMuliplicity->Fill(multV0);\r
1042 fHistPrimVtxZESD->Fill(vtxZ);\r
1043 fHistPrimVtxZESDVSNContributors->Fill(vtxZ,nContr);\r
1044 // -- count events after processing --//\r
1045 fHistCentBin->Fill(centBin);\r
1046 fHistNEvents->Fill(4);\r
1047 }\r
1048 }\r
1049 if(fabs(vtxZ) < fVertexZCut) fHistCentBinRaw->Fill(centBin);\r
1050 }\r
1051 }\r
1052 \r
1053 \r
1054}\r
1055\r
1056//________________________________________________________________________\r
1057void AliAnalysisTaskV0ForRAA::Terminate(Option_t *) {\r
1058 //terminate\r
1059}\r
1060//________________________________________________________________________\r
1061void AliAnalysisTaskV0ForRAA::Process(){\r
1062 //run the analysis\r
1063\r
1064 Int_t ntracks = fESD->GetNumberOfTracks();\r
1065 Int_t count = 0;\r
1066\r
1067 //-- count number of tracks --//\r
1068 \r
1069 if(!(!fMCMode && fMCTruthMode)){\r
1070 for(Int_t i=0;i<ntracks;i++){\r
1071 AliESDtrack *track = (AliESDtrack*)fESD->GetTrack(i);\r
1072 if(!fESDTrackCuts->AcceptTrack(track)) continue;\r
1073 if( track->Eta() > fEtaCutMCDaughtersVal) continue;\r
1074 count++;\r
1075 }\r
1076 fHistMultiplicityPrimary->Fill(count);\r
1077 }\r
1078 \r
1079 //-- check number of V0s in case of data or mc data like analysis--//\r
1080 Int_t nV0 = fESD->GetNumberOfV0s();\r
1081 if(!fMCTruthMode) if(nV0 < 1) return;\r
1082 \r
1083 //-- run analysis --//\r
1084 if(fMCTruthMode) V0MCTruthLoop();\r
1085 else V0RecoLoop(0,0,0,0,0.0,0,0.0);\r
1086\r
1087}\r
1088//________________________________________________________________________\r
1089void AliAnalysisTaskV0ForRAA::V0MCTruthLoop(){\r
1090 //loop over MC truth particles\r
1091\r
1092 //-- get MC stack --//\r
1093 AliStack *stack = fMCev->Stack();\r
1094\r
1095 /*\r
1096 //histo fo user defined shift in charge/pt \r
1097 if(fShift){\r
1098 fHistUserPtShift->Fill(fDeltaInvP);\r
1099 }\r
1100 */\r
1101 /*\r
1102 AliKFVertex primVtxStart(*(fESD->GetPrimaryVertex()));\r
1103 Int_t nTracksPrim=primVtxStart.GetNContributors();\r
1104 fHistNPrim->Fill(nTracksPrim);\r
1105 */\r
1106 /*\r
1107 // MC\r
1108 \r
1109 Int_t mcPrimaries = stack->GetNprimary();\r
1110 Int_t mcParticles = stack->GetNtrack();\r
1111 \r
1112 fHistMultiplicityPrimary->Fill(mcPrimaries);\r
1113 fHistMCMultiplicityTracks->Fill(mcParticles);\r
1114 \r
1115 // number of V0\r
1116 fHistNV0->Fill(nV0);\r
1117 if(nTracksPrim>0) {\r
1118 fHistNV0WithVertex->Fill(nV0);\r
1119 }\r
1120 */\r
1121\r
1122\r
1123 //-- MC truht loop for V0s --//\r
1124 for (Int_t iMc = 0; iMc < (stack->GetNtrack()); iMc++){//MC truth loop\r
1125 Int_t fillMCtruth= int(fMCTruthMode);\r
1126 if(fMCTruthMode){\r
1127 fHistPiPiMonitorCuts[0]->Fill(1*fillMCtruth);\r
1128 fHistPiPMonitorCuts[0]->Fill(1*fillMCtruth);\r
1129 fHistPiAPMonitorCuts[0]->Fill(1*fillMCtruth);\r
1130 }\r
1131 TParticle *p0 = stack->Particle(iMc);\r
1132 if(!p0) continue;\r
1133\r
1134 if(fMCTruthMode){\r
1135 fHistPiPiMonitorCuts[0]->Fill(2*fillMCtruth);\r
1136 fHistPiPMonitorCuts[0]->Fill(2*fillMCtruth);\r
1137 fHistPiAPMonitorCuts[0]->Fill(2*fillMCtruth);\r
1138 }\r
1139\r
1140 Int_t pdgCode = p0->GetPdgCode();\r
1141\r
1142 //-------------- only K0s and Lambda ----------//\r
1143 if( (pdgCode != 310 ) && ( fabs(pdgCode) != 3122 ) ) continue;\r
1144 Int_t fillFlagK0 = (3122- fabs(pdgCode))/(3122-310)*fillMCtruth;\r
1145 Int_t fillFlagL = (fabs(pdgCode) - 310)/(3122-310)*(pdgCode+3122)/(2*3122)*fillMCtruth;\r
1146 Int_t fillFlagAL = (fabs(pdgCode) - 310)/(3122-310)*(pdgCode-3122)/(-2*3122)*fillMCtruth;\r
1147 \r
1148 fHistPiPiMonitorCuts[0]->Fill(3*fillFlagK0);\r
1149 fHistPiPMonitorCuts[0]->Fill(3*fillFlagL);\r
1150 fHistPiAPMonitorCuts[0]->Fill(3*fillFlagAL);\r
1151 \r
1152 if(p0->GetNDaughters() !=2) continue;\r
1153 fHistPiPiMonitorCuts[0]->Fill(4*fillFlagK0);\r
1154 fHistPiPMonitorCuts[0]->Fill(4*fillFlagL);\r
1155 fHistPiAPMonitorCuts[0]->Fill(4*fillFlagAL);\r
1156 \r
1157 //-------------- unique ID check-------------- //\r
1158 Int_t uniqueID = p0->GetUniqueID();\r
1159 if(uniqueID==13) continue;\r
1160 \r
1161 fHistPiPiMonitorCuts[0]->Fill(5*fillFlagK0);\r
1162 fHistPiPMonitorCuts[0]->Fill(5*fillFlagL);\r
1163 fHistPiAPMonitorCuts[0]->Fill(5*fillFlagAL);\r
1164 \r
1165 //-------------- daughters --------------------//\r
1166 Int_t id0 = p0->GetDaughter(0);\r
1167 Int_t id1 = p0->GetDaughter(1);\r
1168 if(id0<0 || id1 <0) continue;\r
1169 \r
1170 fHistPiPiMonitorCuts[0]->Fill(6*fillFlagK0);\r
1171 fHistPiPMonitorCuts[0]->Fill(6*fillFlagL);\r
1172 fHistPiAPMonitorCuts[0]->Fill(6*fillFlagAL);\r
1173 \r
1174 Int_t pdgCodeD0 = stack->Particle(id0)->GetPdgCode();\r
1175 Int_t pdgCodeD1 = stack->Particle(id1)->GetPdgCode();\r
1176 \r
1177 if(pdgCodeD0 == pdgCodeD1) continue;\r
1178 if(pdgCodeD0*pdgCodeD1>0) continue;\r
1179 \r
1180 fHistPiPiMonitorCuts[0]->Fill(7*fillFlagK0);\r
1181 fHistPiPMonitorCuts[0]->Fill(7*fillFlagL);\r
1182 fHistPiAPMonitorCuts[0]->Fill(7*fillFlagAL);\r
1183 \r
1184 if((fabs(pdgCodeD0) != 211 ) && ( fabs(pdgCodeD0) != 2212 )) continue;\r
1185 if((fabs(pdgCodeD1) != 211 ) && ( fabs(pdgCodeD1) != 2212 )) continue;\r
1186 \r
1187 fHistPiPiMonitorCuts[0]->Fill(8*fillFlagK0);\r
1188 fHistPiPMonitorCuts[0]->Fill(8*fillFlagL);\r
1189 fHistPiAPMonitorCuts[0]->Fill(8*fillFlagAL);\r
1190 \r
1191 TParticle *p00 =stack->Particle(id0);\r
1192 TParticle *p01 =stack->Particle(id1);\r
1193 Double_t etaMC00 = p00->Eta();\r
1194 Double_t etaMC01 = p01->Eta();\r
1195 \r
1196 //----------- unique ID check daughters-------- //\r
1197 Int_t uniqueIDdaughter0 = p00->GetUniqueID();\r
1198 Int_t uniqueIDdaughter1 = p01->GetUniqueID();\r
1199 if (uniqueIDdaughter0 !=4 || uniqueIDdaughter1 !=4 ) continue;\r
1200 \r
1201 fHistPiPiMonitorCuts[0]->Fill(9*fillFlagK0);\r
1202 fHistPiPMonitorCuts[0]->Fill(9*fillFlagL);\r
1203 fHistPiAPMonitorCuts[0]->Fill(9*fillFlagAL);\r
1204\r
1205 fHistPiPiMonitorCuts[1]->Fill(9*fillFlagK0);\r
1206 fHistPiPMonitorCuts[1]->Fill(9*fillFlagL);\r
1207 fHistPiAPMonitorCuts[1]->Fill(9*fillFlagAL);\r
1208 \r
1209\r
1210 //-----------get geometric properties --------------//\r
1211 // DCA of mother to prim vertex = production vertex\r
1212 //-- primary and secondary vetex --//\r
1213 Double_t vVertex[3];\r
1214 fMCev->GetPrimaryVertex()->GetXYZ(vVertex);\r
1215 //Double_t x0=p0->Vx(),y0=p0->Vy(),z0=p0->Vz();//mother production vertex\r
1216 Double_t x=p00->Vx(),y=p00->Vy(),z=p00->Vz();//daughter vertex =V0 decay vertex\r
1217\r
1218 //-- decay radii --//\r
1219 Double_t rMC2D = sqrt(x*x+y*y);\r
1220 const Double_t xyzMC[3] = {x,y,z};\r
1221 // Double_t rMC = p00->R();\r
1222 \r
1223 //-- phi --//\r
1224 Double_t pi = TMath::Pi();\r
1225 Double_t phi = p0->Phi();\r
1226 if(phi>pi) phi -=2*pi;\r
1227\r
1228 //-------------------- V0 variables ----------------//\r
1229 Double_t rapidity = p0->Y();\r
1230 Double_t massV0MC = p0->GetMass();\r
1231 Double_t ptV0MC = p0->Pt();\r
1232 Double_t pV0MC = p0->P();\r
1233\r
1234 \r
1235 //----------------- mother variables-----------------//\r
1236 Int_t indexMother1 = p0->GetMother(0);\r
1237 Int_t isSecd=0;\r
1238 Int_t pdgMother =0;\r
1239 // Int_t goodMother=1;\r
1240 Int_t uniqueIDmother=0;\r
1241 Double_t ptXiMother=0.0;\r
1242 \r
1243 //------check mother and fill mother histos---------//\r
1244 \r
1245 Bool_t isPrim= stack->IsPhysicalPrimary(iMc);\r
1246 if(!isPrim){\r
1247 isSecd=1;// is secondary V0s\r
1248 if(indexMother1 >-1){// && !isPrim){//secondary V0s\r
1249 // isSecd=1;// is secondary V0s\r
1250 \r
1251 //-- check for mother --//\r
1252 TParticle *mother = stack->Particle(indexMother1);\r
1253 if(!mother) {\r
1254 Printf("no mother pointer!");continue;\r
1255 }\r
1256 pdgMother = mother->GetPdgCode();\r
1257 fHistPiPiMonitorCuts[1]->Fill(10*fillFlagK0);\r
1258 fHistPiPMonitorCuts[1]->Fill(10*fillFlagL);\r
1259 fHistPiAPMonitorCuts[1]->Fill(10*fillFlagAL);\r
1260\r
1261 Bool_t isPrimMother= stack->IsPhysicalPrimary(indexMother1);\r
1262 if(!isPrimMother) continue;\r
1263 fHistPiPiMonitorCuts[1]->Fill(11*fillFlagK0);\r
1264 fHistPiPMonitorCuts[1]->Fill(11*fillFlagL);\r
1265 fHistPiAPMonitorCuts[1]->Fill(11*fillFlagAL);\r
1266 \r
1267 uniqueIDmother = mother->GetUniqueID();\r
1268\r
1269 if(uniqueIDmother==13){\r
1270 // goodMother =0;\r
1271 continue;\r
1272 }\r
1273 fHistPiPiMonitorCuts[1]->Fill(12*fillFlagK0);\r
1274 fHistPiPMonitorCuts[1]->Fill(12*fillFlagL);\r
1275 fHistPiAPMonitorCuts[1]->Fill(12*fillFlagAL);\r
1276\r
1277 //-- fill secondary V0s histos and pdg histos --// \r
1278 ptXiMother=mother->Pt();\r
1279 \r
1280 //-- K0s --//\r
1281 if(pdgCode==310){\r
1282 if(fabs(pdgMother)==311 || fabs(pdgMother)==313 || fabs(pdgMother)==323 ) isSecd=0; // from K0L, K0 and K* as primary\r
1283 else fHistPiPiPDGCode->Fill(fabs(pdgMother));\r
1284 //goodMother=1;\r
1285 }\r
1286 //-- Lambda --//\r
1287 if(pdgCode==3122){\r
1288 fHistPiPPDGCode->Fill(fabs(pdgMother));\r
1289 if (//sigma family\r
1290 ( TMath::Abs(pdgMother) == 3112) || //sigma minus\r
1291 ( TMath::Abs(pdgMother) == 3222) || //sigma plus\r
1292 ( TMath::Abs(pdgMother) == 3224) || //sigma *plus\r
1293 ( TMath::Abs(pdgMother) == 3114) || //sigma *minus\r
1294 ( TMath::Abs(pdgMother) == 3214) || //sigma *0 counts as primary????\r
1295 ( TMath::Abs(pdgMother) == 3212) //sigma 0 counts as primary\r
1296 )\r
1297 {\r
1298 isSecd=0;\r
1299 //goodMother=1;\r
1300 }\r
1301 \r
1302 if( TMath::Abs(pdgMother) == 3322) //xi0\r
1303 {\r
1304 if(!fRapCutV0 || fabs(rapidity)<fRap){\r
1305 if(!fEtaCutMCDaughters || (fabs(etaMC00)<fEtaCutMCDaughtersVal|| fabs(etaMC01)<fEtaCutMCDaughtersVal)){\r
1306 fHistPiPMassVSPtSecXi[0]->Fill(massV0MC,ptV0MC);\r
1307 fHistPiPMassVSYSecXi[0]->Fill(massV0MC,ptV0MC);\r
1308 fHistPiPXi0PtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);\r
1309 }\r
1310 }\r
1311 //goodMother=1;\r
1312 }\r
1313 if( TMath::Abs(pdgMother) == 3312) //xi minus\r
1314 {\r
1315 if(!fRapCutV0 || fabs(rapidity)<fRap){\r
1316 if(!fEtaCutMCDaughters || (fabs(etaMC00)<fEtaCutMCDaughtersVal|| fabs(etaMC01)<fEtaCutMCDaughtersVal)){\r
1317 fHistPiPMassVSPtSecXi[0]->Fill(massV0MC,ptV0MC);\r
1318 fHistPiPMassVSYSecXi[0]->Fill(massV0MC,ptV0MC);\r
1319 fHistPiPXiMinusPtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);\r
1320 }\r
1321 }\r
1322 //goodMother=1;\r
1323\r
1324 } \r
1325 if(TMath::Abs(pdgMother) == 3334)//omega-\r
1326 {\r
1327 // fHistPiPDCAtoPrimVtxOmega[0]->Fill(p0->GetMass(),dcaV0ToPrimVertex);\r
1328 //goodMother=1;\r
1329 }\r
1330 }\r
1331 //-- AntiLambda --//\r
1332 if(pdgCode==-3122 ){\r
1333 fHistPiAPPDGCode->Fill(fabs(pdgMother));\r
1334 if (//sigma family\r
1335 ( TMath::Abs(pdgMother) == 3112) ||//sigma minus\r
1336 ( TMath::Abs(pdgMother) == 3222) ||//sigma plus\r
1337 ( TMath::Abs(pdgMother) == 3224) ||//sigma *plus\r
1338 ( TMath::Abs(pdgMother) == 3114) ||//sigma *minus\r
1339 ( TMath::Abs(pdgMother) == 3214) || //sigma *0\r
1340 ( TMath::Abs(pdgMother) == 3212) //sigma 0 counts as primary\r
1341 )\r
1342 {\r
1343 isSecd=0;\r
1344 // goodMother=1;\r
1345 }\r
1346 \r
1347 if( TMath::Abs(pdgMother) == 3322) //xi0\r
1348 {\r
1349 if(!fRapCutV0 || fabs(rapidity)<fRap){\r
1350 if(!fEtaCutMCDaughters || (fabs(etaMC00)<fEtaCutMCDaughtersVal|| fabs(etaMC01)<fEtaCutMCDaughtersVal)){\r
1351 fHistPiAPMassVSPtSecXi[0]->Fill(massV0MC,ptV0MC);\r
1352 fHistPiAPMassVSYSecXi[0]->Fill(massV0MC,ptV0MC);\r
1353 fHistPiAPXi0PtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);\r
1354 }\r
1355 }\r
1356 // goodMother=1;\r
1357 }\r
1358 if( TMath::Abs(pdgMother) == 3312) //xi minus\r
1359 {\r
1360 if(!fRapCutV0 || fabs(rapidity)<fRap){\r
1361 if(!fEtaCutMCDaughters || (fabs(etaMC00)<fEtaCutMCDaughtersVal|| fabs(etaMC01)<fEtaCutMCDaughtersVal)){\r
1362 fHistPiAPMassVSPtSecXi[0]->Fill(massV0MC,ptV0MC);\r
1363 fHistPiAPMassVSYSecXi[0]->Fill(massV0MC,ptV0MC);\r
1364 fHistPiAPXiMinusPtVSLambdaPt[0]->Fill(ptV0MC,ptXiMother);\r
1365 }\r
1366 }\r
1367 //goodMother=1;\r
1368 }\r
1369 if(\r
1370 (TMath::Abs(pdgMother) == 3334)//omega-\r
1371 )\r
1372 {\r
1373 // fHistPiAPDCAtoPrimVtxOmega[0]->Fill(p0->GetMass(),dcaV0ToPrimVertex);\r
1374 // goodMother=1;\r
1375 }\r
1376 }\r
1377 } \r
1378 }//end secondaries\r
1379 //else goodMother=1;\r
1380 // if(!goodMother) continue;// for (A)Lambda important\r
1381 \r
1382 //-------------- MC truth or reco mode -----------------//\r
1383 if(fMCTruthMode && !fMCMode){//MC true ana\r
1384 fHistPiPiMonitorCuts[isSecd]->Fill(13*fillFlagK0);\r
1385 fHistPiPMonitorCuts[isSecd]->Fill(13*fillFlagL);\r
1386 fHistPiAPMonitorCuts[isSecd]->Fill(13*fillFlagAL);\r
1387 \r
1388 //-- DCA daughters --//\r
1389 // values of one daugher, should be the same \r
1390 /*\r
1391 //to primary vertex\r
1392 trackPos->GetImpactParameters(tdcaPosToVertex[0],tdcaPosToVertex[1]);\r
1393 trackNeg->GetImpactParameters(tdcaNegToVertex[0],tdcaNegToVertex[1]);\r
1394 \r
1395 Double_t dcaPosToVertex = TMath::Sqrt(tdcaPosToVertex[0]*tdcaPosToVertex[0]+tdcaPosToVertex[1]*tdcaPosToVertex[1]);\r
1396 Double_t dcaNegToVertex = TMath::Sqrt(tdcaNegToVertex[0]*tdcaNegToVertex[0]+tdcaNegToVertex[1]*tdcaNegToVertex[1]);\r
1397 fHistDCADaughtersToPrimVtx[isSecd]->Fill(dcaPosToVertex,dcaNegToVertex);\r
1398 */\r
1399 \r
1400 \r
1401 //-- armenteros values --//\r
1402 TVector3 vecPip;\r
1403 TVector3 vecPin;\r
1404 \r
1405 Double_t ptPlus=0, ptMinus=0;\r
1406 Double_t pt00 = p00->Pt();\r
1407 Double_t pt01 = p01->Pt();\r
1408 \r
1409 if(p00->GetPdgCode()<0)\r
1410 {\r
1411 vecPip.SetXYZ(p01->Px(),p01->Py(),p01->Pz());\r
1412 vecPin.SetXYZ(p00->Px(),p00->Py(),p00->Pz());\r
1413 ptMinus = pt00;\r
1414 ptPlus = pt01;\r
1415 }\r
1416 else{\r
1417 vecPin.SetXYZ(p01->Px(),p01->Py(),p01->Pz());\r
1418 vecPip.SetXYZ(p00->Px(),p00->Py(),p00->Pz());\r
1419 ptMinus = pt01;\r
1420 ptPlus = pt00;\r
1421 }\r
1422 TVector3 momTot(p0->Px(),p0->Py(),p0->Pz());\r
1423 Double_t lQlNeg = fabs(vecPin.Dot(momTot)/momTot.Mag());\r
1424 Double_t lQlPos = fabs(vecPip.Dot(momTot)/momTot.Mag());\r
1425 Double_t alfa =0.0;\r
1426 Double_t den = lQlPos + lQlNeg;\r
1427 if(den>0) alfa = (lQlPos - lQlNeg)/den;\r
1428 TVector3 qtvec= vecPin.Cross(momTot);//vecPip.Mag()*sqrt(1-pow(thetapip,2));\r
1429 Float_t qt = qtvec.Mag()/momTot.Mag();\r
1430 \r
1431 //-- check for injejcted --//\r
1432 Bool_t injected = kTRUE;\r
1433 injected = fMCev->IsFromBGEvent(iMc);\r
1434\r
1435 if(fSelectInjected && injected ) continue;\r
1436 fHistPiPiMonitorCuts[isSecd]->Fill(14*fillFlagK0);\r
1437 fHistPiPMonitorCuts[isSecd]->Fill(14*fillFlagL);\r
1438 fHistPiAPMonitorCuts[isSecd]->Fill(14*fillFlagAL);\r
1439 \r
1440 if(pdgCode == 310) {\r
1441 fHistPiPiEtaDMC[isSecd]->Fill(etaMC00,ptV0MC);\r
1442 fHistPiPiEtaDMC[isSecd]->Fill(etaMC01,ptV0MC);\r
1443 }\r
1444 if(fabs(pdgCode) == 3122) {\r
1445 fHistPiPEtaDMC[isSecd]->Fill(etaMC00,ptV0MC);\r
1446 fHistPiPEtaDMC[isSecd]->Fill(etaMC01,ptV0MC);\r
1447 }\r
1448\r
1449 //-- rapidity and eta cut --// \r
1450 if(fRapCutV0 && fabs(rapidity)>fRap) continue;\r
1451 fHistPiPiMonitorCuts[isSecd]->Fill(15*fillFlagK0);\r
1452 fHistPiPMonitorCuts[isSecd]->Fill(15*fillFlagL);\r
1453 fHistPiAPMonitorCuts[isSecd]->Fill(15*fillFlagAL);\r
1454 \r
1455 if(fEtaCutMCDaughters) { if(fabs(etaMC00)>fEtaCutMCDaughtersVal || fabs(etaMC01)>fEtaCutMCDaughtersVal ) continue; }\r
1456 fHistPiPiMonitorCuts[isSecd]->Fill(16*fillFlagK0);\r
1457 fHistPiPMonitorCuts[isSecd]->Fill(16*fillFlagL);\r
1458 fHistPiAPMonitorCuts[isSecd]->Fill(16*fillFlagAL);\r
1459\r
1460 Double_t declength=p00->Rho(); \r
1461\r
1462 //-- Fill Particle histos --//\r
1463 if (pdgCode==310){//K0s\r
1464 fHistPiPiMonitorCuts[isSecd]->Fill(17);\r
1465\r
1466 fHistPiPiEtaDMC[1]->Fill(etaMC00,ptV0MC);\r
1467 fHistPiPiEtaDMC[1]->Fill(etaMC01,ptV0MC);\r
1468 \r
1469 fHistPiPiMass[isSecd]->Fill(massV0MC);\r
1470 fHistPiPiMassVSPt[isSecd]->Fill(massV0MC,ptV0MC);\r
1471 // fHistPiPiPtDaughters[isSecd]->Fill(ptMinus,ptPlus);\r
1472 fHistPiPiPtVSY[isSecd]->Fill(rapidity,ptV0MC);\r
1473 \r
1474 Double_t ctK0s=0.0;\r
1475 if(pV0MC>0.0) ctK0s=declength*0.497614/pV0MC;\r
1476 fHistPiPiDecayLengthVsPt[isSecd]->Fill(ptV0MC,ctK0s);\r
1477 \r
1478 //all V0s histo\r
1479 fHistArmenteros[isSecd]->Fill(alfa,qt);\r
1480 fHistV0RadiusZ[isSecd]->Fill(rMC2D,xyzMC[2]);\r
1481 fHistV0RadiusXY[isSecd]->Fill(xyzMC[0],xyzMC[1]);\r
1482 fHistV0RadiusZVSPt[isSecd]->Fill(ptV0MC,xyzMC[2]);\r
1483 \r
1484 }\r
1485 else if (pdgCode==3122){ //Lambda\r
1486 fHistPiPMonitorCuts[isSecd]->Fill(17);\r
1487 \r
1488 fHistPiPEtaDMC[1]->Fill(etaMC00,ptV0MC);\r
1489 fHistPiPEtaDMC[1]->Fill(etaMC01,ptV0MC);\r
1490\r
1491 fHistPiPMassVSPt[isSecd]->Fill(massV0MC,ptV0MC);\r
1492 fHistPiPMass[isSecd]->Fill(massV0MC); \r
1493 // fHistPiPPtDaughters[isSecd]->Fill(ptMinus,ptPlus);\r
1494 fHistPiPPtVSY[isSecd]->Fill(rapidity,ptV0MC);\r
1495 \r
1496 Double_t ctL=0.0;\r
1497 if(pV0MC>0.0) ctL=declength*1.115683/pV0MC;\r
1498 fHistPiPDecayLengthVsPt[isSecd]->Fill(ptV0MC,ctL);\r
1499\r
1500 //all V0s hito \r
1501 fHistArmenteros[isSecd]->Fill(alfa,qt);\r
1502 fHistV0RadiusZ[isSecd]->Fill(rMC2D,xyzMC[2]);\r
1503 fHistV0RadiusXY[isSecd]->Fill(xyzMC[0],xyzMC[1]);\r
1504 fHistV0RadiusZVSPt[isSecd]->Fill(ptV0MC,xyzMC[2]);\r
1505 }\r
1506 else if (pdgCode==-3122){ //AntiLambda\r
1507 fHistPiAPMonitorCuts[isSecd]->Fill(17);\r
1508 \r
1509 fHistPiPEtaDMC[1]->Fill(etaMC00,ptV0MC);\r
1510 fHistPiPEtaDMC[1]->Fill(etaMC01,ptV0MC);\r
1511\r
1512 fHistPiAPMassVSPt[isSecd]->Fill(massV0MC,ptV0MC);\r
1513 fHistPiAPMass[isSecd]->Fill(massV0MC);\r
1514 // fHistPiAPPtDaughters[isSecd]->Fill(ptMinus,ptPlus);\r
1515 fHistPiAPPtVSY[isSecd]->Fill(rapidity,ptV0MC);\r
1516 \r
1517 Double_t ctAL=0.0;\r
1518 if(pV0MC>0.0) ctAL=declength*1.115683/pV0MC;\r
1519 fHistPiAPDecayLengthVsPt[isSecd]->Fill(ptV0MC,ctAL);\r
1520\r
1521 //all V0s histo \r
1522 fHistArmenteros[isSecd]->Fill(alfa,qt);\r
1523 fHistV0RadiusZ[isSecd]->Fill(rMC2D,xyzMC[2]);\r
1524 fHistV0RadiusXY[isSecd]->Fill(xyzMC[0],xyzMC[1]);\r
1525 fHistV0RadiusZVSPt[isSecd]->Fill(ptV0MC,xyzMC[2]);\r
1526 fHistV0RadiusXYVSY[isSecd]->Fill(rapidity,rMC2D);\r
1527 }\r
1528 }//MC true ana\r
1529 else{// V0 reco ana\r
1530 V0RecoLoop(id0,id1,isSecd,pdgCode,ptV0MC,pdgMother,ptXiMother);\r
1531 }\r
1532 \r
1533 }//end MC stack loop\r
1534 \r
1535}\r
1536//________________________________________________________________________\r
1537void AliAnalysisTaskV0ForRAA::V0RecoLoop(Int_t id0,Int_t id1,Int_t isSecd,Int_t what,Double_t ptV0MC, Int_t pdgMother,Double_t ptXiMother){\r
1538 //loop over reconstructed particles\r
1539\r
1540 \r
1541 //--------------------- define variables -----------------------//\r
1542 Double_t pp[3];\r
1543 Double_t pm[3];\r
1544 Double_t xr[3];\r
1545 \r
1546 Double_t massPi=0.13957018;\r
1547 Double_t massP=0.93827203;\r
1548 \r
1549 TLorentzVector positivesMIP;\r
1550 TLorentzVector negativesMIAP;\r
1551 TLorentzVector positivesMIPi;\r
1552 TLorentzVector negativesMIPi;\r
1553\r
1554 /*\r
1555 AliKFParticle::SetField(fESD->GetMagneticField());\r
1556 AliKFVertex primVtx(*(fESD->GetPrimaryVertex()));\r
1557 AliKFVertex primVtxImproved = primVtx;\r
1558\r
1559 AliKFParticle* negPiKF=NULL;\r
1560 AliKFParticle* posPiKF=NULL;\r
1561 AliKFParticle* posPKF=NULL;\r
1562 AliKFParticle* negAPKF=NULL;\r
1563 */\r
1564\r
1565 AliESDtrack* trackPos=NULL;\r
1566 AliESDtrack* trackNeg=NULL;\r
1567 AliESDtrack* trackPosTest = NULL;\r
1568 AliESDtrack* trackNegTest =NULL;\r
1569\r
1570 Float_t nSigmaTPCtrackPosToPion;\r
1571 Float_t nSigmaTPCtrackNegToPion;\r
1572 Float_t nSigmaTPCtrackPosToProton;\r
1573 Float_t nSigmaTPCtrackNegToProton;\r
1574\r
1575 Double_t primaryVtxPosition[3];\r
1576 primaryVtxPosition[0] = fESD->GetPrimaryVertex()->GetXv();\r
1577 primaryVtxPosition[1] = fESD->GetPrimaryVertex()->GetYv();\r
1578 primaryVtxPosition[2] = fESD->GetPrimaryVertex()->GetZv();\r
1579 \r
1580 Int_t nV0 = fESD->GetNumberOfV0s();\r
1581 AliESDv0 * v0MIs=NULL;\r
1582 \r
1583 //------------------------ V0 reco loop --------------------//\r
1584 for(Int_t iV0MI = 0; iV0MI < nV0; iV0MI++) {//V0 loop\r
1585 //-- get V0 info --//\r
1586 v0MIs = fESD->GetV0(iV0MI);\r
1587\r
1588 fHistPiPiMonitorCuts[isSecd]->Fill(1);\r
1589 fHistPiPMonitorCuts[isSecd]->Fill(1);\r
1590 fHistPiAPMonitorCuts[isSecd]->Fill(1);\r
1591\r
1592 //------------ get references of daughters --------------//\r
1593 //-- esd tracks --//\r
1594 trackPosTest = fESD->GetTrack(v0MIs->GetPindex());\r
1595 trackNegTest = fESD->GetTrack(v0MIs->GetNindex());\r
1596 \r
1597 if ( trackPosTest->GetSign() == trackNegTest->GetSign()) continue;\r
1598 \r
1599 fHistPiPiMonitorCuts[isSecd]->Fill(2);\r
1600 fHistPiPMonitorCuts[isSecd]->Fill(2);\r
1601 fHistPiAPMonitorCuts[isSecd]->Fill(2);\r
1602 \r
1603 //-- for MC mode --//\r
1604 if(fMCMode){\r
1605 //check MC labels (and find partners for MC truth V0 daughters for fMCTruthMode=kTRUE)\r
1606 if(!GetMCTruthPartner(trackPosTest,trackNegTest,id0,id1)) continue;\r
1607 }\r
1608\r
1609 fHistPiPiMonitorCuts[isSecd]->Fill(3);\r
1610 fHistPiPMonitorCuts[isSecd]->Fill(3);\r
1611 fHistPiAPMonitorCuts[isSecd]->Fill(3);\r
1612\r
1613 //-- onthefly selection --//\r
1614 Bool_t onthefly = v0MIs->GetOnFlyStatus();\r
1615 if(fOntheFly!=onthefly) continue;\r
1616\r
1617 fHistPiPiMonitorCuts[isSecd]->Fill(4);\r
1618 fHistPiPMonitorCuts[isSecd]->Fill(4);\r
1619 fHistPiAPMonitorCuts[isSecd]->Fill(4);\r
1620 \r
1621 //-- get eta from V0 daughters --//\r
1622 Double_t posDaughterEta=0.0;\r
1623 Double_t negDaughterEta=0.0;\r
1624 \r
1625 Double_t eta00 = trackPosTest->Eta();\r
1626 Double_t eta01 = trackNegTest->Eta();\r
1627 \r
1628 //---------- check sign assignment for daughters --------//\r
1629 Bool_t switchSign = kFALSE;\r
1630 \r
1631 if( trackPosTest->GetSign() >0){//pos\r
1632 trackPos =fESD->GetTrack(v0MIs->GetPindex());\r
1633 trackNeg =fESD->GetTrack(v0MIs->GetNindex());\r
1634\r
1635 v0MIs->GetPPxPyPz(pp[0],pp[1],pp[2]);\r
1636 v0MIs->GetNPxPyPz(pm[0],pm[1],pm[2]);\r
1637\r
1638 posDaughterEta =v0MIs->GetParamP()->Eta();\r
1639 negDaughterEta=v0MIs->GetParamN()->Eta();\r
1640 \r
1641 /* \r
1642 if (negPiKF) delete negPiKF; negPiKF=NULL;\r
1643 if (posPiKF) delete posPiKF; posPiKF=NULL;\r
1644 if (posPKF) delete posPKF; posPKF=NULL;\r
1645 if (negAPKF) delete negAPKF; negAPKF=NULL;\r
1646\r
1647 negPiKF = new AliKFParticle( *(v0MIs->GetParamN()) ,-211);\r
1648 posPiKF = new AliKFParticle( *(v0MIs->GetParamP()) ,211);\r
1649 posPKF = new AliKFParticle( *(v0MIs->GetParamP()) ,2212);\r
1650 negAPKF = new AliKFParticle( *(v0MIs->GetParamN()) ,-2212);\r
1651 */\r
1652 }\r
1653 if( trackPosTest->GetSign() <0){//neg\r
1654 trackPos =fESD->GetTrack(v0MIs->GetNindex());\r
1655 trackNeg =fESD->GetTrack(v0MIs->GetPindex());\r
1656 \r
1657 v0MIs->GetNPxPyPz(pp[0],pp[1],pp[2]);\r
1658 v0MIs->GetPPxPyPz(pm[0],pm[1],pm[2]);\r
1659 \r
1660 posDaughterEta = v0MIs->GetParamN()->Eta();\r
1661 negDaughterEta = v0MIs->GetParamP()->Eta();\r
1662 \r
1663 /*\r
1664 if (negPiKF) delete negPiKF; negPiKF=NULL;\r
1665 if (posPiKF) delete posPiKF; posPiKF=NULL;\r
1666 if (posPKF) delete posPKF; posPKF=NULL;\r
1667 if (negAPKF) delete negAPKF; negAPKF=NULL;\r
1668\r
1669\r
1670 negPiKF = new AliKFParticle( *(v0MIs->GetParamP()) ,-211);\r
1671 posPiKF = new AliKFParticle( *(v0MIs->GetParamN()) ,211);\r
1672 posPKF = new AliKFParticle( *(v0MIs->GetParamN()) ,2212);\r
1673 negAPKF = new AliKFParticle( *(v0MIs->GetParamP()) ,-2212);\r
1674 */\r
1675 switchSign = kTRUE;\r
1676 eta01 = trackPosTest->Eta();\r
1677 eta00 = trackNegTest->Eta();\r
1678\r
1679 }\r
1680 \r
1681 // ------------- calc masses and 4 vectors -------------- //\r
1682 //K0\r
1683 positivesMIPi.SetXYZM(pp[0],pp[1],pp[2],massPi);\r
1684 negativesMIPi.SetXYZM(pm[0],pm[1],pm[2],massPi);\r
1685 TLorentzVector v0K0=positivesMIPi+negativesMIPi;\r
1686 \r
1687 //Lambda\r
1688 positivesMIP.SetXYZM(pp[0],pp[1],pp[2],massP);\r
1689 TLorentzVector v0Lambda=positivesMIP+negativesMIPi;\r
1690 \r
1691 //Anitlambda\r
1692 negativesMIAP.SetXYZM(pm[0],pm[1],pm[2],massP);\r
1693 TLorentzVector v0ALambda=positivesMIPi+negativesMIAP;\r
1694 \r
1695 //---------------------AliKFParticle ---------------------//\r
1696 /* \r
1697 Double_t chi2K0C=0.0;\r
1698 Double_t chi2LambdaC=0.0;\r
1699 Double_t chi2ALambdaC=0.0;\r
1700\r
1701 \r
1702 AliKFParticle v0K0KF;\r
1703 v0K0KF +=(*negPiKF);\r
1704 v0K0KF +=(*posPiKF);\r
1705 //v0K0C.SetVtxGuess(xr[0],xr[1],xr[2]);\r
1706 v0K0KF.SetProductionVertex(primVtxImproved);\r
1707 \r
1708 AliKFParticle v0LambdaKF;\r
1709 v0LambdaKF +=(*negPiKF);\r
1710 v0LambdaKF +=(*posPKF);\r
1711 //v0LambdaC.SetVtxGuess(xr[0],xr[1],xr[2]);\r
1712 v0LambdaKF.SetProductionVertex(primVtxImproved);\r
1713 \r
1714 AliKFParticle v0ALambdaKF;\r
1715 v0ALambdaKF +=(*negAPKF);\r
1716 v0ALambdaKF +=(*posPiKF);\r
1717 //v0ALambdaC.SetVtxGuess(xr[0],xr[1],xr[2]);\r
1718 v0ALambdaKF.SetProductionVertex(primVtxImproved);\r
1719 \r
1720 if( v0K0KF.GetNDF() != 0) {\r
1721 chi2K0C = v0K0KF.GetChi2()/v0K0KF.GetNDF();\r
1722 }\r
1723\r
1724 Double_t chi2LambdaC=100000.;\r
1725 if( v0LambdaKF.GetNDF() != 0) {\r
1726 chi2LambdaC = v0LambdaKF.GetChi2()/v0LambdaKF.GetNDF();\r
1727 }\r
1728\r
1729 Double_t chi2ALambdaC=100000.;\r
1730 if( v0ALambdaKF.GetNDF() != 0) {\r
1731 chi2ALambdaC = v0ALambdaKF.GetChi2()/v0ALambdaKF.GetNDF();\r
1732 }\r
1733 */\r
1734 \r
1735 // ----------------- for MC mode ------------------------ //\r
1736 Bool_t fillK0sMC = kTRUE;\r
1737 Bool_t fillLambdaMC = kTRUE;\r
1738 Bool_t fillALambdaMC = kTRUE;\r
1739\r
1740 if(fMCMode && fMCTruthMode) {\r
1741 if(what == 310) {\r
1742 fillLambdaMC = kFALSE;\r
1743 fillALambdaMC = kFALSE;\r
1744 }\r
1745 else if(what == 3122){\r
1746 fillALambdaMC = kFALSE;\r
1747 fillK0sMC = kFALSE;\r
1748 }\r
1749 else if(what == -3122){\r
1750 fillLambdaMC = kFALSE;\r
1751 fillK0sMC = kFALSE;\r
1752 }\r
1753 }\r
1754 \r
1755 //----------------- prepare for V0 ana ------------------//\r
1756 TVector3 ppTrack(pp);\r
1757 TVector3 pmTrack(pm);\r
1758 \r
1759 Double_t posDaughterPt = ppTrack.Pt();\r
1760 Double_t negDaughterPt = pmTrack.Pt();\r
1761 /*\r
1762 Double_t v0sPt=v0MIs->Pt();\r
1763 if(what == 310 || what ==0){\r
1764 fHistPiPiEtaDReco[0]->Fill(posDaughterPt,v0sPt);\r
1765 fHistPiPiEtaDReco[0]->Fill(negDaughterPt,v0sPt);\r
1766 }\r
1767 if(fabs(what) == 3122 || what == 0){\r
1768 fHistPiPEtaDReco[0]->Fill(posDaughterPt,v0sPt);\r
1769 fHistPiPEtaDReco[0]->Fill(negDaughterPt,v0sPt);\r
1770 }\r
1771 */\r
1772 //------------------- DCA daughters ---------------------//\r
1773 //-- between the daughters --//\r
1774 Double_t dcaDaughters = v0MIs->GetDcaV0Daughters(); \r
1775 \r
1776 //-- to primary vertex --\r
1777 Double_t dcaPosToVertex=0.0,dcaNegToVertex=0.0;\r
1778 Double_t dzPos=(primaryVtxPosition[0]-xr[0])*ppTrack.Y() - (primaryVtxPosition[1]-xr[1])*ppTrack.X();\r
1779 dcaPosToVertex=TMath::Sqrt(dzPos*dzPos/(pow(ppTrack.X(),2)+pow(ppTrack.Y(),2)));\r
1780 Double_t dzNeg=(primaryVtxPosition[0]-xr[0])*pmTrack.Y() - (primaryVtxPosition[1]-xr[1])*pmTrack.X();\r
1781 dcaNegToVertex=TMath::Sqrt(dzNeg*dzNeg/(pow(pmTrack.X(),2)+pow(pmTrack.Y(),2)));\r
1782 \r
1783 // Double_t dcaPosToVertex[3];dcaNegToVertex[3];\r
1784 // trackPos->GetImpactParameters(dcaPosToVertex[0],dcaPosToVertex[1]);\r
1785 // trackNeg->GetImpactParameters(dcaNegToVertex[0],dcaNegToVertex[1]);\r
1786 \r
1787 // dcaPosToVertex = TMath::Sqrt(dcaPosToVertex[0]*dcaPosToVertex[0]+dcaPosToVertex[1]*dcaPosToVertex[1]);\r
1788 // dcaNegToVertex = TMath::Sqrt(dcaNegToVertex[0]*dcaNegToVertex[0]+dcaNegToVertex[1]*dcaNegToVertex[1]);\r
1789 \r
1790 //dcaPosToVertex = posPKF->GetDistanceFromVertexXY(primaryVtxPosition);\r
1791 //dcaNegToVertex = negPiKF->GetDistanceFromVertexXY(primaryVtxPosition);\r
1792 \r
1793 //------------------- dca and decay radius V0 -------------//\r
1794 v0MIs->GetXYZ(xr[0],xr[1],xr[2]);\r
1795 \r
1796 Double_t dim2V0Radius = TMath::Sqrt(xr[0]*xr[0]+xr[1]*xr[1]);\r
1797\r
1798 Double_t decayLength =\r
1799 TMath::Sqrt(TMath::Power(xr[0] - primaryVtxPosition[0],2) +\r
1800 TMath::Power(xr[1] - primaryVtxPosition[1],2) +\r
1801 TMath::Power(xr[2] - primaryVtxPosition[2],2 ));\r
1802\r
1803 Double_t dcaV0ToPrimVertex= v0MIs->GetD(primaryVtxPosition[0],primaryVtxPosition[1]);////v0K0KF.GetDistanceFromVertexXY(tPrimaryVtxPosition);\r
1804\r
1805 //-------------------- general cuts -------------------//\r
1806 //-- esd track cuts for daughters --//\r
1807 if(fESDTrackCuts){\r
1808 if(!fESDTrackCuts->AcceptTrack(trackPosTest)) continue;\r
1809 if(!fESDTrackCuts->AcceptTrack(trackNegTest)) continue;\r
1810 }\r
1811 \r
1812 fHistPiPiMonitorCuts[isSecd]->Fill(5);\r
1813 fHistPiPMonitorCuts[isSecd]->Fill(5);\r
1814 fHistPiAPMonitorCuts[isSecd]->Fill(5);\r
1815 \r
1816 //-- eta cut --//\r
1817 if( fabs(posDaughterEta) > fEtaCutMCDaughtersVal || fabs(negDaughterEta) > fEtaCutMCDaughtersVal) continue;\r
1818 fHistPiPiMonitorCuts[isSecd]->Fill(6);\r
1819 fHistPiPMonitorCuts[isSecd]->Fill(6);\r
1820 fHistPiAPMonitorCuts[isSecd]->Fill(6);\r
1821\r
1822 //-- pt cut --//\r
1823 if( fabs(posDaughterPt)<fMinPt || fabs(negDaughterPt) < fMinPt ) continue;\r
1824 fHistPiPiMonitorCuts[isSecd]->Fill(7);\r
1825 fHistPiPMonitorCuts[isSecd]->Fill(7);\r
1826 fHistPiAPMonitorCuts[isSecd]->Fill(7);\r
1827\r
1828 \r
1829 //-- radius xy min cut --//\r
1830 if(dim2V0Radius < fDecayRadXYMin) continue;\r
1831 // if(fabs(xr[1])<fDecayRadY) continue;\r
1832 fHistPiPiMonitorCuts[isSecd]->Fill(8);\r
1833 fHistPiPMonitorCuts[isSecd]->Fill(8);\r
1834 fHistPiAPMonitorCuts[isSecd]->Fill(8);\r
1835\r
1836 //-- radius xy max cut --//\r
1837 if(dim2V0Radius > fDecayRadXYMax) continue;\r
1838 // if(fabs(xr[1])<fDecayRadY) continue;\r
1839 fHistPiPiMonitorCuts[isSecd]->Fill(9);\r
1840 fHistPiPMonitorCuts[isSecd]->Fill(9);\r
1841 fHistPiAPMonitorCuts[isSecd]->Fill(9);\r
1842 \r
1843 //-- decay length min ->ctau --//\r
1844 // if(decayLength<fDecayLengthMin) continue;\r
1845 // fHistPiPiMonitorCuts[isSecd]->Fill(11);\r
1846 // fHistPiPMonitorCuts[isSecd]->Fill(11);\r
1847 // fHistPiAPMonitorCuts[isSecd]->Fill(11);\r
1848\r
1849 //-- decay length max cut --//\r
1850 if(decayLength>fDecayLengthMax) continue;\r
1851 fHistPiPiMonitorCuts[isSecd]->Fill(10);\r
1852 fHistPiPMonitorCuts[isSecd]->Fill(10);\r
1853 fHistPiAPMonitorCuts[isSecd]->Fill(10);\r
1854 \r
1855 //----------------------- V0 variables --------------------//\r
1856 //-- armenteros --//\r
1857 TVector3 momTot = ppTrack + pmTrack;\r
1858 Double_t lQlNeg = fabs(pmTrack.Dot(momTot)/momTot.Mag());\r
1859 Double_t lQlPos = fabs(ppTrack.Dot(momTot)/momTot.Mag());\r
1860 //return 1.-2./(1.+lQlNeg/lQlPos);\r
1861 Double_t alfa =0.0;\r
1862 Double_t den = lQlPos + lQlNeg;\r
1863 if(den>0) alfa = (lQlPos - lQlNeg)/den;\r
1864 TVector3 qtvec= pmTrack.Cross(momTot);//vecPip.Mag()*sqrt(1-pow(thetapip,2));\r
1865 Double_t qt = qtvec.Mag()/momTot.Mag();\r
1866\r
1867 //-- momenta --//\r
1868 Double_t ptK0s = v0K0.Pt();\r
1869 Double_t ptLambda = v0Lambda.Pt();\r
1870 Double_t ptALambda = v0ALambda.Pt();\r
1871 \r
1872 Double_t pK0s = v0K0.P();\r
1873 Double_t pLambda = v0Lambda.P();\r
1874 Double_t pALambda = v0ALambda.P();\r
1875 \r
1876 //-- masses --//\r
1877 Double_t massK0s = v0K0.M();\r
1878 Double_t massLambda = v0Lambda.M();\r
1879 Double_t massALambda = v0ALambda.M();\r
1880\r
1881 //-- rapidity --//\r
1882 Double_t rapK0s = v0MIs->Y(310);\r
1883 Double_t rapL = v0MIs->Y(3122);\r
1884 Double_t rapAL = v0MIs->Y(3122);\r
1885\r
1886 //-- other variables --//\r
1887 Double_t opAng = fabs(ppTrack.Angle(pmTrack));\r
1888 // if( ppTrack.Angle(pmTrack)<0.001) continue; \r
1889 // if( ppTrack.Angle(pmTrack)<0.004) continue; \r
1890 \r
1891 Double_t cosOPAng = v0MIs->GetV0CosineOfPointingAngle();\r
1892 \r
1893 /* \r
1894 //introduce more histo\r
1895 Double_t errOnMassK0s = v0MIs->ChangeMassHypothesis(310);\r
1896 Double_t errOnMassLambda = 0.0;\r
1897 Double_t errOnMassALambda = 0.0;\r
1898 if(!switchSign){\r
1899 errOnMassLambda = v0MIs->ChangeMassHypothesis(3122);\r
1900 errOnMassALambda = v0MIs->ChangeMassHypothesis(-3122);\r
1901 }\r
1902 else{\r
1903 errOnMassLambda = v0MIs->ChangeMassHypothesis(-3122);\r
1904 errOnMassALambda = v0MIs->ChangeMassHypothesis(3122);\r
1905 }\r
1906 */\r
1907\r
1908 \r
1909 //------------------------ detector values -------------------------------//\r
1910 //-- TPC ITS values pos --//\r
1911 Int_t nclsTPCPos = trackPos->GetNcls(1);\r
1912 Int_t nclsTPCFindablePos = trackPos->GetTPCNclsF();\r
1913 Int_t nclsITSPos = trackPos->GetNcls(0);\r
1914 Double_t chi2PerClusterITSPos = -1.0;\r
1915 if(nclsITSPos>0) chi2PerClusterITSPos = trackPos->GetITSchi2()/Double_t(nclsITSPos);\r
1916 Double_t crossedRowsTPCPos = trackPos->GetTPCCrossedRows();\r
1917 \r
1918 //-- TPC ITS values neg --//\r
1919 Int_t nclsTPCNeg = trackNeg->GetNcls(1);\r
1920 Int_t nclsTPCFindableNeg = trackNeg->GetTPCNclsF();\r
1921 Int_t nclsITSNeg = trackNeg->GetNcls(0);\r
1922 Double_t chi2PerClusterITSNeg = -1.0;\r
1923 if(nclsITSNeg>0) chi2PerClusterITSNeg =trackNeg->GetITSchi2()/Double_t(nclsITSNeg);\r
1924 Double_t crossedRowsTPCNeg = trackNeg->GetTPCCrossedRows(); \r
1925\r
1926 if(fMoreNclsThanRows && (crossedRowsTPCPos < nclsTPCPos || crossedRowsTPCNeg < nclsTPCNeg )) continue;\r
1927 fHistPiPiMonitorCuts[isSecd]->Fill(11);\r
1928 fHistPiPMonitorCuts[isSecd]->Fill(11);\r
1929 fHistPiAPMonitorCuts[isSecd]->Fill(11);\r
1930 \r
1931 if(fMoreNclsThanFindable && (nclsTPCFindablePos < nclsTPCPos || nclsTPCFindableNeg < nclsTPCNeg )) continue;\r
1932 fHistPiPiMonitorCuts[isSecd]->Fill(12);\r
1933 fHistPiPMonitorCuts[isSecd]->Fill(12);\r
1934 fHistPiAPMonitorCuts[isSecd]->Fill(12); \r
1935\r
1936 if(chi2PerClusterITSNeg > fChi2PerClusterITS || chi2PerClusterITSPos > fChi2PerClusterITS ) continue;\r
1937 fHistPiPiMonitorCuts[isSecd]->Fill(13);\r
1938 fHistPiPMonitorCuts[isSecd]->Fill(13);\r
1939 fHistPiAPMonitorCuts[isSecd]->Fill(13); \r
1940 \r
1941 //-- cut flags for V0 specific cuts --//\r
1942 Bool_t cutOKK0s = kTRUE;\r
1943 Bool_t cutOKLambda = kTRUE;\r
1944 Bool_t cutOKALambda = kTRUE;\r
1945 \r
1946 //-------------------------- K0 cuts -----------------------------//\r
1947\r
1948 if(dcaV0ToPrimVertex > fDCAToVertexK0) continue;\r
1949 if(fabs(xr[2])>fDCAZ) continue;//like decay radius z component\r
1950 fHistPiPiMonitorCuts[isSecd]->Fill(14);\r
1951 \r
1952 Double_t ctK0 = 0.0;\r
1953 if(fabs(pK0s)>0.0) ctK0 = decayLength*0.497614/pK0s;\r
1954 if( ctK0 > fCtauK0s && fabs(ptK0s) <fCtauPtCutK0) cutOKK0s = kFALSE;\r
1955 else fHistPiPiMonitorCuts[isSecd]->Fill(15);\r
1956 \r
1957 if((cosOPAng < fCosPointAngK && fabs(ptK0s) < fCPAPtCutK0) || cosOPAng<0.99) cutOKK0s = kFALSE;\r
1958 else fHistPiPiMonitorCuts[isSecd]->Fill(16);\r
1959\r
1960 if(dcaDaughters > fDCADaughtersK0 )cutOKK0s = kFALSE;\r
1961 else fHistPiPiMonitorCuts[isSecd]->Fill(17);\r
1962 \r
1963 if(dcaNegToVertex < fDCADaughtersToVtxSmall || dcaPosToVertex < fDCADaughtersToVtxSmall) cutOKK0s = kFALSE;\r
1964 else fHistPiPiMonitorCuts[isSecd]->Fill(18);\r
1965\r
1966 if(fRapCutV0 && fabs(rapK0s) > fRap) cutOKK0s = kFALSE;\r
1967 else fHistPiPiMonitorCuts[isSecd]->Fill(19); \r
1968 \r
1969 // if(chi2K0C > fChiCutKf) cutOKK0s = kFALSE;\r
1970 if(opAng < fOpengAngleDaughters && fabs(ptK0s) < fOpAngPtCut ) cutOKK0s = kFALSE;\r
1971 else fHistPiPiMonitorCuts[isSecd]->Fill(20);\r
1972\r
1973 Bool_t ptbinokK0s=kFALSE;\r
1974 if( ptK0s < fQtCut && ptK0s > fQtCutPtLow ) ptbinokK0s=kTRUE;\r
1975 Double_t qtval = 0.2*fabs(alfa);\r
1976 if(fArmCutK0 && ptbinokK0s && qt < qtval) cutOKK0s = kFALSE;\r
1977 else fHistPiPiMonitorCuts[isSecd]->Fill(21);\r
1978 \r
1979 //-------------------------- Lambda cuts -------------------------//\r
1980 if(dcaV0ToPrimVertex > fDCAToVertexL) continue;\r
1981 if(fabs(xr[2])>fDCAZ) continue;//like decay radius z component\r
1982 fHistPiPMonitorCuts[isSecd]->Fill(14);\r
1983 \r
1984 Double_t ctL = 0.0;\r
1985 if(fabs(pLambda)>0.0) ctL = decayLength*1.115683/fabs(pLambda);\r
1986 if(ctL > fCtauL && fabs(ptLambda) <fCtauPtCutL) cutOKLambda = kFALSE;\r
1987 else fHistPiPMonitorCuts[isSecd]->Fill(15);\r
1988 \r
1989 if((cosOPAng<fCosPointAngL && fabs(ptLambda) < fCPAPtCutL)|| cosOPAng<0.99) cutOKLambda = kFALSE;\r
1990 else fHistPiPMonitorCuts[isSecd]->Fill(16);\r
1991\r
1992 if(dcaDaughters > fDCADaughtersL )cutOKLambda = kFALSE;\r
1993 else fHistPiPMonitorCuts[isSecd]->Fill(17);\r
1994 \r
1995 if( dcaNegToVertex < fDCADaughtersToVtxSmall || dcaPosToVertex < fDCADaughtersToVtxLarge) cutOKLambda = kFALSE;\r
1996 else fHistPiPMonitorCuts[isSecd]->Fill(18);\r
1997\r
1998 if(fRapCutV0 && fabs(rapL) > fRap) cutOKLambda = kFALSE;\r
1999 else fHistPiPMonitorCuts[isSecd]->Fill(19);\r
2000 /* \r
2001 if(chi2LambdaC > fChiCutKf) cutOKLambda = kFALSE;\r
2002 else fHistPiPMonitorCuts[isSecd]->Fill(20);\r
2003 */\r
2004 fHistPiPMonitorCuts[isSecd]->Fill(20);\r
2005 \r
2006 if(alfa<fAlfaCut || (fArmCutL && qt>fQtCut)) cutOKLambda = kFALSE;\r
2007 else fHistPiPMonitorCuts[isSecd]->Fill(21);\r
2008 \r
2009 //--------------------------- ALambda cuts --------------------------//\r
2010\r
2011 if(dcaV0ToPrimVertex > fDCAToVertexL) continue;\r
2012 if(fabs(xr[2])>fDCAZ) continue;//like decay radius z component\r
2013 fHistPiAPMonitorCuts[isSecd]->Fill(14);\r
2014 \r
2015 Double_t ctAL = 0.0;\r
2016 if(fabs(pALambda)>0.0) ctAL = decayLength*1.115683/fabs(pALambda);\r
2017 if(ctAL > fCtauL && fabs(ptALambda) <fCtauPtCutL) cutOKALambda = kFALSE;\r
2018 else fHistPiAPMonitorCuts[isSecd]->Fill(15);\r
2019\r
2020 if((cosOPAng<fCosPointAngL && fabs(ptALambda) < fCPAPtCutL)|| cosOPAng<0.99) cutOKALambda = kFALSE;\r
2021 else fHistPiAPMonitorCuts[isSecd]->Fill(16);\r
2022 \r
2023 if(dcaDaughters > fDCADaughtersAL )cutOKALambda = kFALSE;\r
2024 else fHistPiAPMonitorCuts[isSecd]->Fill(17);\r
2025 \r
2026 if( dcaPosToVertex < fDCADaughtersToVtxSmall || dcaNegToVertex < fDCADaughtersToVtxLarge) cutOKALambda = kFALSE;\r
2027 else fHistPiAPMonitorCuts[isSecd]->Fill(18);\r
2028 \r
2029 if(fRapCutV0 && fabs(rapAL) > fRap) cutOKALambda = kFALSE;\r
2030 else fHistPiAPMonitorCuts[isSecd]->Fill(19);\r
2031 /*\r
2032 if(chi2ALambdaC > fChiCutKf) cutOKALambda = kFALSE;\r
2033 else fHistPiAPMonitorCuts[isSecd]->Fill(20);\r
2034 */\r
2035 fHistPiAPMonitorCuts[isSecd]->Fill(20);\r
2036 \r
2037 if((fArmCutL && qt>fQtCut) || alfa > -1.0*fAlfaCut) cutOKALambda = kFALSE;\r
2038 else fHistPiAPMonitorCuts[isSecd]->Fill(21);\r
2039 \r
2040 //--------------------- PID ----------------------------//\r
2041 //-- dEdx --// \r
2042 nSigmaTPCtrackPosToPion = fabs(fESDpid->NumberOfSigmasTPC(trackPos,AliPID::kPion));\r
2043 nSigmaTPCtrackNegToPion = fabs(fESDpid->NumberOfSigmasTPC(trackNeg,AliPID::kPion));\r
2044 nSigmaTPCtrackPosToProton = fabs(fESDpid->NumberOfSigmasTPC(trackPos,AliPID::kProton));\r
2045 nSigmaTPCtrackNegToProton = fabs(fESDpid->NumberOfSigmasTPC(trackNeg,AliPID::kProton));\r
2046\r
2047 Bool_t pipidEdx=kTRUE;\r
2048 Bool_t pipdEdx =kTRUE;\r
2049 Bool_t piapdEdx=kTRUE;\r
2050\r
2051 Double_t posDaughterP = ppTrack.Mag();\r
2052 Double_t negDaughterP = pmTrack.Mag();\r
2053\r
2054 Double_t tpcsigPos= trackPos->GetTPCsignal();\r
2055 Double_t tpcsigNeg= trackNeg->GetTPCsignal();\r
2056\r
2057 //-- dedx cut --//\r
2058 if(fUsePID){\r
2059 // if(fabs(posDaughterP)<fPPIDcut && nSigmaTPCtrackPosToPion > fNSigma ){\r
2060 // pipidEdx =kFALSE;//k0s\r
2061 // }\r
2062 if(fabs(posDaughterP)<fPPIDcut && tpcsigPos < 5.0){//no zero dedx values!\r
2063 pipidEdx =kFALSE;//k0s\r
2064 piapdEdx =kFALSE;//antilambda\r
2065 }\r
2066 if(fabs(posDaughterP)<fPPIDcut && (nSigmaTPCtrackPosToProton > fNSigma || tpcsigPos < 5.0)) pipdEdx =kFALSE;//lambda\r
2067 \r
2068 // if(fabs(negDaughterP)<fPPIDcut && nSigmaTPCtrackNegToPion > fNSigma ){\r
2069 // pipidEdx =kFALSE;//k0s\r
2070 // }\r
2071 if(fabs(negDaughterP)<fPPIDcut && tpcsigNeg < 5.0){//no zero dedx values!\r
2072 pipidEdx =kFALSE;//k0s\r
2073 pipdEdx =kFALSE;//lambda\r
2074 }\r
2075 if(fabs(negDaughterP)<fPPIDcut && (nSigmaTPCtrackNegToProton > fNSigma || tpcsigNeg< 5.0)) piapdEdx =kFALSE;//antilambda\r
2076 }\r
2077 \r
2078 \r
2079\r
2080 //-------------------- V0 ana -------------------------//\r
2081 //-- cut flags for furhter histos--//\r
2082 Bool_t k0sOK=kFALSE;\r
2083 Bool_t lambdaOK=kFALSE;\r
2084 Bool_t alambdaOK=kFALSE;\r
2085\r
2086 //-- Check for K0 --//\r
2087 if( cutOKK0s && fillK0sMC && pipidEdx){\r
2088 fHistPiPiMonitorCuts[isSecd]->Fill(22);\r
2089 k0sOK=kTRUE; \r
2090 if(massK0s>0.25 && massK0s<0.75 ){\r
2091 fHistPiPiMonitorCuts[isSecd]->Fill(23);\r
2092 fHistPiPiMass[isSecd]->Fill(massK0s);\r
2093 fHistPiPiMassVSPt[isSecd]->Fill(massK0s,ptK0s);\r
2094 fHistPiPiMassVSPtMCTruth[isSecd]->Fill(massK0s,ptV0MC);\r
2095 fHistPiPiRadiusXY[isSecd]->Fill(massK0s,opAng);\r
2096 fHistPiPiCosPointAng[isSecd]->Fill(dcaV0ToPrimVertex,cosOPAng);\r
2097 fHistPiPiDecayLengthVsPt[isSecd]->Fill(ptK0s,ctK0);\r
2098 fHistPiPiDecayLengthVsMass[isSecd]->Fill(massK0s,ctK0);\r
2099 fHistPiPiDCADaughters[isSecd]->Fill(massK0s,dcaDaughters);\r
2100 fHistPiPiDCADaughterPosToPrimVtxVSMass[isSecd]->Fill(massK0s,dcaPosToVertex);\r
2101 fHistPiPiDCAVSMass[isSecd]->Fill(massK0s,dcaV0ToPrimVertex);\r
2102 // fHistPiPiPtDaughters[isSecd]->Fill(posDaughterPt,negDaughterPt);\r
2103 fHistPiPiPtVSY[isSecd]->Fill(rapK0s,ptK0s);\r
2104 }\r
2105 fHistArmenteros[isSecd]->Fill(alfa,qt);\r
2106 fHistDedxSecPiPlus[isSecd]->Fill(posDaughterP,tpcsigPos);\r
2107 fHistDedxSecPiMinus[isSecd]->Fill(negDaughterP,tpcsigNeg);\r
2108\r
2109 fHistV0RadiusZ[isSecd]->Fill(dim2V0Radius,xr[2]);\r
2110 fHistV0RadiusXY[isSecd]->Fill(xr[0],xr[1]);\r
2111 fHistV0RadiusZVSPt[isSecd]->Fill(ptK0s,dim2V0Radius);\r
2112 fHistV0RadiusXYVSY[isSecd]->Fill(rapK0s,dim2V0Radius);\r
2113\r
2114 //-- detector values --/\r
2115 fHistNclsITSPosK0[isSecd]->Fill(nclsITSPos);\r
2116 fHistNclsITSNegK0[isSecd]->Fill(nclsITSNeg);\r
2117 fHistNclsTPCPosK0[isSecd]->Fill(nclsTPCPos);\r
2118 fHistNclsTPCNegK0[isSecd]->Fill(nclsTPCNeg);\r
2119 fHistChi2PerNclsITSPosK0[isSecd]->Fill(chi2PerClusterITSPos);\r
2120 fHistChi2PerNclsITSNegK0[isSecd]->Fill(chi2PerClusterITSNeg);\r
2121 }\r
2122 \r
2123 //-- Check for Lambda --//\r
2124 if(cutOKLambda && fillLambdaMC && pipdEdx){\r
2125 fHistPiPMonitorCuts[isSecd]->Fill(22);\r
2126 lambdaOK=kTRUE;\r
2127 if( massLambda>1.05 && massLambda<1.25 ){\r
2128 fHistPiPMonitorCuts[isSecd]->Fill(23);\r
2129 fHistPiPMass[isSecd]->Fill(massLambda);\r
2130 fHistPiPMassVSPtMCTruth[isSecd]->Fill(massLambda,ptV0MC);\r
2131 fHistPiPMassVSPt[isSecd]->Fill(massLambda,ptLambda);\r
2132 fHistPiPRadiusXY[isSecd]->Fill(massLambda,opAng);\r
2133 fHistPiPCosPointAng[isSecd]->Fill(dcaV0ToPrimVertex,cosOPAng);\r
2134 fHistPiPPtVSY[isSecd]->Fill(rapL,ptLambda);\r
2135 // fHistPiPPtDaughters[isSecd]->Fill(posDaughterPt,negDaughterPt);\r
2136 fHistPiPDCADaughters[isSecd]->Fill(massLambda,dcaDaughters);\r
2137 fHistPiPDCAVSMass[isSecd]->Fill(massLambda,dcaV0ToPrimVertex);\r
2138 fHistPiPDCADaughterPosToPrimVtxVSMass[isSecd]->Fill(massLambda,dcaPosToVertex);\r
2139 fHistPiPDecayLengthVsPt[isSecd]->Fill(ptLambda,ctL);\r
2140 fHistPiPDecayLengthVsMass[isSecd]->Fill(massLambda,ctL);\r
2141\r
2142 //-- secondaries --//\r
2143 if(isSecd==1){\r
2144 if(fabs(pdgMother)==3112 || fabs(pdgMother)==3114 || fabs(pdgMother)==3222 || fabs(pdgMother)==3224 || fabs(pdgMother)==3214 ){\r
2145 fHistPiPMassVSPtSecSigma[1]->Fill(massLambda,ptLambda);\r
2146 \r
2147 }\r
2148 // if(pdgMother==3334){\r
2149 // fHistPiPDCAtoPrimVtxOmega[1]->Fill(massLambda,dcaV0ToPrimVertex);\r
2150 // }\r
2151 if(pdgMother==3322){\r
2152 fHistPiPCosPointAngXiVsPt->Fill(ptLambda,cosOPAng);\r
2153 fHistPiPMassVSPtSecXi[1]->Fill(massLambda,ptLambda);\r
2154 fHistPiPMassVSYSecXi[1]->Fill(massLambda,rapL);\r
2155 fHistPiPXi0PtVSLambdaPt[1]->Fill(ptLambda,ptXiMother);\r
2156 }\r
2157 if(pdgMother==3312){\r
2158 fHistPiPCosPointAngXiVsPt->Fill(ptLambda,cosOPAng);\r
2159 fHistPiPMassVSPtSecXi[1]->Fill(massLambda,ptLambda);\r
2160 fHistPiPMassVSYSecXi[1]->Fill(massLambda,rapL);\r
2161 fHistPiPXiMinusPtVSLambdaPt[1]->Fill(ptLambda,ptXiMother);\r
2162 }\r
2163 } \r
2164 }\r
2165 if(ptLambda>0.4) fHistArmenteros[isSecd]->Fill(alfa,qt);\r
2166 fHistV0RadiusZ[isSecd]->Fill(dim2V0Radius,xr[2]);\r
2167 fHistV0RadiusXY[isSecd]->Fill(xr[0],xr[1]);\r
2168 fHistV0RadiusZVSPt[isSecd]->Fill(ptLambda,dim2V0Radius);\r
2169 fHistV0RadiusXYVSY[isSecd]->Fill(rapL,dim2V0Radius);\r
2170 fHistDedxSecProt[isSecd]->Fill(posDaughterP,tpcsigPos);\r
2171 fHistDedxSecPiMinus[isSecd]->Fill(negDaughterP,tpcsigNeg);\r
2172 \r
2173 //-- detector values --//\r
2174 fHistNclsITSPosL[isSecd]->Fill(nclsITSPos);\r
2175 fHistNclsITSNegL[isSecd]->Fill(nclsITSNeg);\r
2176 fHistNclsTPCPosL[isSecd]->Fill(nclsTPCPos);\r
2177 fHistNclsTPCNegL[isSecd]->Fill(nclsTPCNeg);\r
2178 fHistChi2PerNclsITSPosL[isSecd]->Fill(chi2PerClusterITSPos);\r
2179 fHistChi2PerNclsITSNegL[isSecd]->Fill(chi2PerClusterITSNeg);\r
2180 }\r
2181\r
2182 \r
2183 //-- Check for AntiLambda --//\r
2184 if(cutOKALambda && fillALambdaMC && piapdEdx){\r
2185 fHistPiAPMonitorCuts[isSecd]->Fill(22);\r
2186 alambdaOK=kTRUE;\r
2187 if( massALambda>1.05 && massALambda<1.25 ){\r
2188 fHistPiAPMonitorCuts[isSecd]->Fill(23);\r
2189 fHistPiAPMass[isSecd]->Fill(massALambda);\r
2190 fHistPiAPMassVSPtMCTruth[isSecd]->Fill(massALambda,ptV0MC);\r
2191 fHistPiAPMassVSPt[isSecd]->Fill(massALambda,ptALambda);\r
2192 fHistPiAPRadiusXY[isSecd]->Fill(massALambda,opAng);\r
2193 fHistPiAPCosPointAng[isSecd]->Fill(dcaV0ToPrimVertex,cosOPAng);\r
2194 fHistPiAPPtVSY[isSecd]->Fill(rapAL,ptALambda);\r
2195 // fHistPiAPPtDaughters[isSecd]->Fill(posDaughterPt,negDaughterPt);\r
2196 fHistPiAPDCADaughters[isSecd]->Fill(massALambda,dcaDaughters);\r
2197 fHistPiAPDCAVSMass[isSecd]->Fill(massALambda,dcaV0ToPrimVertex);\r
2198 fHistPiAPDCADaughterPosToPrimVtxVSMass[isSecd]->Fill(massALambda,dcaPosToVertex);\r
2199 fHistPiAPDecayLengthVsPt[isSecd]->Fill(ptALambda,ctAL);\r
2200 fHistPiAPDecayLengthVsMass[isSecd]->Fill(massALambda,ctAL);\r
2201\r
2202 //-- secondaries --//\r
2203 if(isSecd==1){\r
2204 if(fabs(pdgMother)==3112 || fabs(pdgMother)==3114 || fabs(pdgMother)==3222 || fabs(pdgMother)==3224 || fabs(pdgMother)==3214 ){\r
2205 fHistPiAPMassVSPtSecSigma[1]->Fill(massALambda,ptALambda);\r
2206 }\r
2207 // if(fabs(pdgMother)==3334){\r
2208 // fHistPiAPDCAtoPrimVtxOmega[1]->Fill(massALambda,dcaV0ToPrimVertex);\r
2209 // }\r
2210 if(fabs(pdgMother) == 3322){\r
2211 fHistPiAPCosPointAngXiVsPt->Fill(ptALambda,cosOPAng);\r
2212 fHistPiAPMassVSPtSecXi[1]->Fill(massALambda,ptALambda);\r
2213 fHistPiAPMassVSYSecXi[1]->Fill(massALambda,rapAL);\r
2214 fHistPiAPXi0PtVSLambdaPt[1]->Fill(ptALambda,ptXiMother);\r
2215 }\r
2216 if(pdgMother == -3312){\r
2217 fHistPiAPCosPointAngXiVsPt->Fill(ptALambda,cosOPAng);\r
2218 fHistPiAPMassVSPtSecXi[1]->Fill(massALambda,ptALambda);\r
2219 fHistPiAPMassVSYSecXi[1]->Fill(massALambda,rapAL);\r
2220 fHistPiAPXiMinusPtVSLambdaPt[1]->Fill(ptALambda,ptXiMother);\r
2221 }\r
2222 }\r
2223 }\r
2224 if(ptALambda>0.4) fHistArmenteros[isSecd]->Fill(alfa,qt);\r
2225 fHistDedxSecAProt[isSecd]->Fill(negDaughterP,tpcsigNeg);\r
2226 fHistDedxSecPiPlus[isSecd]->Fill(posDaughterP,tpcsigPos);\r
2227 fHistV0RadiusZ[isSecd]->Fill(dim2V0Radius,xr[2]);\r
2228 fHistV0RadiusXY[isSecd]->Fill(xr[0],xr[1]);\r
2229 fHistV0RadiusZVSPt[isSecd]->Fill(ptALambda,dim2V0Radius);\r
2230 fHistV0RadiusXYVSY[isSecd]->Fill(rapAL,dim2V0Radius);\r
2231\r
2232 }\r
2233 \r
2234 //-- fill detector histos general --//\r
2235 if(lambdaOK || alambdaOK || k0sOK){\r
2236 //-- pos --//\r
2237 fHistNclsITSPos[isSecd]->Fill(fabs(posDaughterPt),nclsITSPos);\r
2238 fHistNclsTPCPos[isSecd]->Fill(nclsTPCFindablePos,nclsTPCPos);\r
2239 fHistNCRowsTPCPos[isSecd]->Fill(fabs(posDaughterPt),crossedRowsTPCPos);\r
2240 fHistChi2PerNclsITSPos[isSecd]->Fill(fabs(posDaughterPt),chi2PerClusterITSPos);\r
2241 //--neg --//\r
2242 fHistNclsITSNeg[isSecd]->Fill(fabs(negDaughterPt),nclsITSNeg);\r
2243 fHistNclsTPCNeg[isSecd]->Fill(nclsTPCFindableNeg,nclsTPCNeg);\r
2244 fHistNCRowsTPCNeg[isSecd]->Fill(fabs(negDaughterPt),crossedRowsTPCNeg);\r
2245 fHistChi2PerNclsITSNeg[isSecd]->Fill(fabs(negDaughterPt),chi2PerClusterITSNeg);\r
2246 \r
2247 fHistNclsITS[isSecd]->Fill(nclsITSPos,nclsITSNeg);\r
2248 //if(negDaughterPt >1.0)\r
2249 fHistNclsTPC[isSecd]->Fill(crossedRowsTPCNeg,nclsTPCNeg);\r
2250 \r
2251 fHistPiPiEtaDReco[1]->Fill(posDaughterEta,eta00);\r
2252 fHistPiPEtaDReco[1]->Fill(negDaughterEta,eta01);\r
2253 }\r
2254 \r
2255 /*\r
2256 //-- AliKFParticle --//\r
2257 if (negPiKF) delete negPiKF; negPiKF=NULL;\r
2258 if (posPiKF) delete posPiKF; posPiKF=NULL;\r
2259 if (posPKF) delete posPKF; posPKF=NULL;\r
2260 if (negAPKF) delete negAPKF; negAPKF=NULL;\r
2261 */\r
2262 if(fMCMode && fMCTruthMode) break;// otherwise we would not have ended up here\r
2263 }//end V0 reco loop\r
2264\r
2265}\r
2266 \r
2267//________________________________________________________________________\r
2268\r
2269Int_t AliAnalysisTaskV0ForRAA::CalculateCentralityBin(){\r
2270 //find centrality bin for centrality selection\r
2271\r
2272 if (fUseCentrality == 0) return -1;\r
2273\r
2274 AliCentrality *esdCentrality = fESD->GetCentrality();\r
2275\r
2276 Float_t centralityVZERO = esdCentrality->GetCentralityPercentile("V0M"); \r
2277 Float_t centralitySPD = esdCentrality->GetCentralityPercentile("CL1");\r
2278\r
2279 Int_t centralityVZEROBin = -1;\r
2280 Int_t centralitySPDBin = -1;\r
2281\r
2282 //-- SPD centrality --//\r
2283 if ( fUseCentrality == 2 ){\r
2284 if ( centralitySPD >= 0. && centralitySPD < 5.) centralitySPDBin = 0;\r
2285 else if ( centralitySPD >= 5. && centralitySPD < 10.) centralitySPDBin = 5;\r
2286 else if ( centralitySPD >= 10. && centralitySPD < 20.) centralitySPDBin = 10;\r
2287 else if ( centralitySPD >= 20. && centralitySPD < 30.) centralitySPDBin = 20;\r
2288 else if ( centralitySPD >= 30. && centralitySPD < 40.) centralitySPDBin = 30;\r
2289 else if ( centralitySPD >= 40. && centralitySPD < 50.) centralitySPDBin = 40;\r
2290 else if ( centralitySPD >= 50. && centralitySPD < 60.) centralitySPDBin = 50;\r
2291 else if ( centralitySPD >= 60. && centralitySPD < 70.) centralitySPDBin = 60;\r
2292 else if ( centralitySPD >= 70. && centralitySPD < 80.) centralitySPDBin = 70;\r
2293 else if ( centralitySPD >= 80. && centralitySPD < 90.) centralitySPDBin = 80;\r
2294 else if ( centralitySPD >= 90. && centralitySPD < 99.) centralitySPDBin = 90;\r
2295 else if ( centralitySPD >= 99. ) centralitySPDBin = 100;\r
2296 else if ( fabs(centralitySPD)< 0.0001 ) centralitySPDBin = 100;\r
2297 return centralitySPDBin;\r
2298 }\r
2299 //-- V0 centrality --//\r
2300 if ( fUseCentrality == 1 ){\r
2301 if ( centralityVZERO > 0. && centralityVZERO < 5.) centralityVZEROBin = 0;\r
2302 else if ( centralityVZERO >= 5. && centralityVZERO < 10.) centralityVZEROBin = 5;\r
2303 else if ( centralityVZERO >= 10. && centralityVZERO < 20.) centralityVZEROBin = 10;\r
2304 else if ( centralityVZERO >= 20. && centralityVZERO < 30.) centralityVZEROBin = 20;\r
2305 else if ( centralityVZERO >= 30. && centralityVZERO < 40.) centralityVZEROBin = 30;\r
2306 else if ( centralityVZERO >= 40. && centralityVZERO < 50.) centralityVZEROBin = 40;\r
2307 else if ( centralityVZERO >= 50. && centralityVZERO < 60.) centralityVZEROBin = 50;\r
2308 else if ( centralityVZERO >= 60. && centralityVZERO < 70.) centralityVZEROBin = 60;\r
2309 else if ( centralityVZERO >= 70. && centralityVZERO < 80.) centralityVZEROBin = 70;\r
2310 else if ( centralityVZERO >= 80. && centralityVZERO < 90.) centralityVZEROBin = 80;\r
2311 else if ( centralityVZERO >= 90. && centralityVZERO < 99.) centralityVZEROBin = 90;\r
2312 else if ( centralityVZERO >= 99. ) centralityVZEROBin = 100;\r
2313 else if ( fabs(centralityVZERO)< 0.0001 ) centralityVZEROBin = 100;\r
2314 return centralityVZEROBin;\r
2315 }\r
2316 return -1;\r
2317 \r
2318}\r
2319//________________________________________________________________________\r
2320Bool_t AliAnalysisTaskV0ForRAA::GetMCTruthPartner(AliESDtrack *pos,AliESDtrack *neg,Int_t id0,Int_t id1){\r
2321 //-- get daughter label and check it --//\r
2322 Int_t labelP = fabs(pos->GetLabel());\r
2323 Int_t labelN = fabs(neg->GetLabel());\r
2324\r
2325 if (labelN==labelP) return kFALSE;\r
2326 \r
2327 if(fMCTruthMode){\r
2328 if ((labelP!=id0) && (labelP!=id1)) return kFALSE;\r
2329 if ((labelN!=id0) && (labelN!=id1)) return kFALSE;\r
2330 }\r
2331\r
2332 return kTRUE;\r
2333}\r