AliPhysics  vAN-20151020 (3f0c6c3)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnalysisTaskSELc2eleLambdafromAODtracks.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appeuear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 /* $Id$ */
17 
18 //
19 //
20 // Lc->e Lambda analysis code
21 //
22 // Input: AOD
23 // Output: TTree and/or THnSparse (mass vs pT vs Centrality)
24 //
25 // Cuts:
26 // TTree: SingleCuts on V0 and electron
27 // THnSparse: In addition to that, IsSelected(obj, kCandidate) applied
28 //
29 //-------------------------------------------------------------------------
30 //
31 // Authors: Y.S Watanabe(a)
32 // (a) CNS, the University of Tokyo
33 // Contatcs: wyosuke@cns.s.u-tokyo.ac.jp
34 //-------------------------------------------------------------------------
35 
36 #include <TSystem.h>
37 #include <TParticle.h>
38 #include <TParticlePDG.h>
39 #include <TH1F.h>
40 #include <TH1F.h>
41 #include <TH2F.h>
42 #include <THnSparse.h>
43 #include <TLorentzVector.h>
44 #include <TTree.h>
45 #include <TRandom.h>
46 #include "TROOT.h"
47 #include <TDatabasePDG.h>
48 #include <AliAnalysisDataSlot.h>
49 #include <AliAnalysisDataContainer.h>
50 #include "AliStack.h"
51 #include "AliMCEvent.h"
52 #include "AliAnalysisManager.h"
53 #include "AliAODMCHeader.h"
54 #include "AliAODHandler.h"
55 #include "AliLog.h"
56 #include "AliExternalTrackParam.h"
57 #include "AliAODVertex.h"
58 #include "AliESDVertex.h"
59 #include "AliAODRecoDecay.h"
60 #include "AliAODRecoDecayHF.h"
61 #include "AliAODRecoCascadeHF.h"
62 #include "AliESDtrack.h"
63 #include "AliAODTrack.h"
64 #include "AliAODv0.h"
65 #include "AliAODcascade.h"
66 #include "AliAODMCParticle.h"
67 #include "AliAnalysisTaskSE.h"
69 #include "AliPIDResponse.h"
70 #include "AliPIDCombined.h"
71 #include "AliTOFPIDResponse.h"
72 #include "AliAODPidHF.h"
73 #include "AliInputEventHandler.h"
74 #include "AliESDtrackCuts.h"
75 #include "AliNeutralTrackParam.h"
76 #include "AliKFParticle.h"
77 #include "AliKFVertex.h"
78 #include "AliExternalTrackParam.h"
79 #include "AliESDtrack.h"
80 #include "AliCentrality.h"
81 #include "AliVertexerTracks.h"
82 #include "AliEventPoolManager.h"
84 
85 using std::cout;
86 using std::endl;
87 
91 
92 //__________________________________________________________________________
94  AliAnalysisTaskSE(),
95  fUseMCInfo(kFALSE),
96  fOutput(0),
97  fOutputAll(0),
98  fListCuts(0),
99  fCEvents(0),
100  fHTrigger(0),
101  fHCentrality(0),
102  fAnalCuts(0),
103  fIsEventSelected(kFALSE),
104  fWriteVariableTree(kFALSE),
105  fWriteEachVariableTree(kFALSE),
106  fWriteMCVariableTree(kFALSE),
107  fVariablesTree(0),
108  fEleVariablesTree(0),
109  fV0VariablesTree(0),
110  fMCVariablesTree(0),
111  fMCEleVariablesTree(0),
112  fMCV0VariablesTree(0),
113  fReconstructPrimVert(kFALSE),
114  fIsMB(kFALSE),
115  fIsSemi(kFALSE),
116  fIsCent(kFALSE),
117  fIsINT7(kFALSE),
118  fIsEMC7(kFALSE),
119  fCandidateVariables(),
120  fCandidateEleVariables(),
121  fCandidateV0Variables(),
122  fCandidateMCVariables(),
123  fCandidateMCEleVariables(),
124  fCandidateMCV0Variables(),
125  fVtx1(0),
126  fV1(0),
127  fVtxZ(0),
128  fBzkG(0),
129  fCentrality(0),
130  fRunNumber(0),
131  fTriggerCheck(0),
132  fUseCentralityV0M(kFALSE),
133  fEvNumberCounter(0),
134  fMCEventType(-9999),
135  fHistoEleLambdaMass(0),
136  fHistoEleLambdaMassRS(0),
137  fHistoEleLambdaMassWS(0),
138  fHistoEleLambdaMassRSMix(0),
139  fHistoEleLambdaMassWSMix(0),
140  fHistoEleLambdaMassRSSide(0),
141  fHistoEleLambdaMassWSSide(0),
142  fHistoEleLambdaMassvsElePtRS(0),
143  fHistoEleLambdaMassvsElePtWS(0),
144  fHistoEleLambdaMassvsElePtRSMix(0),
145  fHistoEleLambdaMassvsElePtWSMix(0),
146  fHistoEleLambdaMassvsElePtRSSide(0),
147  fHistoEleLambdaMassvsElePtWSSide(0),
148  fHistoEleLambdaMassvsElePtRS1(0),
149  fHistoEleLambdaMassvsElePtWS1(0),
150  fHistoEleLambdaMassvsElePtRSMix1(0),
151  fHistoEleLambdaMassvsElePtWSMix1(0),
152  fHistoEleLambdaMassvsElePtRSSide1(0),
153  fHistoEleLambdaMassvsElePtWSSide1(0),
154  fHistoEleLambdaMassvsElePtRS2(0),
155  fHistoEleLambdaMassvsElePtWS2(0),
156  fHistoEleLambdaMassvsElePtRSMix2(0),
157  fHistoEleLambdaMassvsElePtWSMix2(0),
158  fHistoEleLambdaMassvsElePtRSSide2(0),
159  fHistoEleLambdaMassvsElePtWSSide2(0),
160  fHistoElePtRS(0),
161  fHistoElePtWS(0),
162  fHistoElePtRSMix(0),
163  fHistoElePtWSMix(0),
164  fHistoEleLambdaMassMCS(0),
165  fHistoEleLambdaMassMCGen(0),
166  fHistoEleLambdaMassvsElePtMCS(0),
167  fHistoEleLambdaMassvsElePtMCGen(0),
168  fHistoEleLambdaMassvsElePtMCS1(0),
169  fHistoEleLambdaMassvsElePtMCGen1(0),
170  fHistoEleLambdaMassvsElePtMCS2(0),
171  fHistoEleLambdaMassvsElePtMCGen2(0),
172  fHistoElePtMCS(0),
173  fHistoElePtMCGen(0),
174  fHistoElePtvsEtaRS(0),
175  fHistoElePtvsEtaWS(0),
176  fHistoElePtvsEtaRSMix(0),
177  fHistoElePtvsEtaWSMix(0),
178  fHistoElePtvsEtaMCS(0),
179  fHistoElePtvsEtaMCGen(0),
180  fHistoElePtvsLambdaPtRS(0),
181  fHistoElePtvsLambdaPtWS(0),
182  fHistoElePtvsLambdaPtRSMix(0),
183  fHistoElePtvsLambdaPtWSMix(0),
184  fHistoElePtvsLambdaPtMCS(0),
185  fHistoElePtvsLambdaPtvsLcPtMCS(0),
186  fHistoElePtvsLambdaPtMCGen(0),
187  fHistoElePtvsLambdaPtvsLcPtMCGen(0),
188  fHistoElePtvsLambdaPtMCLcGen(0),
189  fHistoElePtvsd0RS(0),
190  fHistoElePtvsd0WS(0),
191  fHistoElePtvsd0RSMix(0),
192  fHistoElePtvsd0WSMix(0),
193  fHistoElePtvsd0MCS(0),
194  fHistoElePtvsd0PromptMCS(0),
195  fHistoElePtvsd0BFeeddownMCS(0),
196  fHistoEleLambdaMassFeeddownXic0MCS(0),
197  fHistoEleLambdaMassFeeddownXic0MCGen(0),
198  fHistoEleLambdaMassvsElePtFeeddownXic0MCS(0),
199  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen(0),
200  fHistoEleLambdaMassvsElePtFeeddownXic0MCS1(0),
201  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1(0),
202  fHistoEleLambdaMassvsElePtFeeddownXic0MCS2(0),
203  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2(0),
204  fHistoElePtFeeddownXic0MCS(0),
205  fHistoElePtFeeddownXic0MCGen(0),
206  fHistoElePtvsEtaFeeddownXic0MCS(0),
207  fHistoElePtvsEtaFeeddownXic0MCGen(0),
208  fHistoElePtvsLambdaPtFeeddownXic0MCS(0),
209  fHistoElePtvsLambdaPtFeeddownXic0MCGen(0),
210  fHistoEleLambdaMassFeeddownXicPlusMCS(0),
211  fHistoEleLambdaMassFeeddownXicPlusMCGen(0),
212  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS(0),
213  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen(0),
214  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1(0),
215  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1(0),
216  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS2(0),
217  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2(0),
218  fHistoElePtFeeddownXicPlusMCS(0),
219  fHistoElePtFeeddownXicPlusMCGen(0),
220  fHistoElePtvsEtaFeeddownXicPlusMCS(0),
221  fHistoElePtvsEtaFeeddownXicPlusMCGen(0),
222  fHistoElePtvsLambdaPtFeeddownXicPlusMCS(0),
223  fHistoElePtvsLambdaPtFeeddownXicPlusMCGen(0),
224  fHistoBachPt(0),
225  fHistoBachPtMCS(0),
226  fHistoBachPtMCGen(0),
227  fHistod0Bach(0),
228  fHistoLambdaMassvsPt(0),
229  fHistoLambdaMassvsPtMCS(0),
230  fHistoLambdaMassvsPtMCGen(0),
231  fHistoLambdaPtvsDl(0),
232  fHistoLambdaPtvsDlSide(0),
233  fHistoLambdaPtvsDlMCS(0),
234  fHistoLambdaPtvsDlFeeddownXi0MCS(0),
235  fHistoLambdaPtvsDlFeeddownXiMinusMCS(0),
236  fHistoLambdaPtvsDlFeeddownOmegaMCS(0),
237  fHistoK0sMassvsPt(0),
238  fHistoElectronTPCPID(0),
239  fHistoElectronTOFPID(0),
240  fHistoElectronTPCSelPID(0),
241  fHistoElectronTOFSelPID(0),
242  fHistoElectronTPCPIDSelTOF(0),
243  fHistoElectronTPCPIDSelTOFSmallEta(0),
244  fHistoElectronTPCPIDSelTOFLargeEta(0),
245  fHistoElectronQovPtvsPhi(0),
246  fHistoLambdaQovPtvsPhi(0),
247  fHistoLcMCGen(0),
248  fHistoLcMCGen1(0),
249  fHistoLcMCGen2(0),
250  fHistoLcMCS(0),
251  fHistoLcMCS1(0),
252  fHistoLcMCS2(0),
253  fHistoFeedDownXic0MCGen(0),
254  fHistoFeedDownXic0MCGen1(0),
255  fHistoFeedDownXic0MCGen2(0),
256  fHistoFeedDownXic0MCS(0),
257  fHistoFeedDownXic0MCS1(0),
258  fHistoFeedDownXic0MCS2(0),
259  fHistoFeedDownXicPlusMCGen(0),
260  fHistoFeedDownXicPlusMCGen1(0),
261  fHistoFeedDownXicPlusMCGen2(0),
262  fHistoFeedDownXicPlusMCS(0),
263  fHistoFeedDownXicPlusMCS1(0),
264  fHistoFeedDownXicPlusMCS2(0),
265  fHistoLcElectronMCGen(0),
266  fHistoLcElectronMCGen1(0),
267  fHistoLcElectronMCGen2(0),
268  fHistoLcElectronMCS(0),
269  fHistoLcElectronMCS1(0),
270  fHistoLcElectronMCS2(0),
271  fHistoElectronFeedDownXic0MCGen(0),
272  fHistoElectronFeedDownXic0MCGen1(0),
273  fHistoElectronFeedDownXic0MCGen2(0),
274  fHistoElectronFeedDownXic0MCS(0),
275  fHistoElectronFeedDownXic0MCS1(0),
276  fHistoElectronFeedDownXic0MCS2(0),
277  fHistoElectronFeedDownXicPlusMCGen(0),
278  fHistoElectronFeedDownXicPlusMCGen1(0),
279  fHistoElectronFeedDownXicPlusMCGen2(0),
280  fHistoElectronFeedDownXicPlusMCS(0),
281  fHistoElectronFeedDownXicPlusMCS1(0),
282  fHistoElectronFeedDownXicPlusMCS2(0),
283  fHistoElectronMCGen(0),
284  fHistoLambdaMCGen(0),
285  fHistoElePtvsV0dlRS(0),
286  fHistoElePtvsV0dlRS1(0),
287  fHistoElePtvsV0dlRS2(0),
288  fHistoElePtvsV0dlRSSide(0),
289  fHistoElePtvsV0dlRSSide1(0),
290  fHistoElePtvsV0dlRSSide2(0),
291  fHistoElePtvsV0dlRSMix(0),
292  fHistoElePtvsV0dlRSMix1(0),
293  fHistoElePtvsV0dlRSMix2(0),
294  fHistoElePtvsV0dlWS(0),
295  fHistoElePtvsV0dlWS1(0),
296  fHistoElePtvsV0dlWS2(0),
297  fHistoElePtvsV0dlWSSide(0),
298  fHistoElePtvsV0dlWSSide1(0),
299  fHistoElePtvsV0dlWSSide2(0),
300  fHistoElePtvsV0dlWSMix(0),
301  fHistoElePtvsV0dlWSMix1(0),
302  fHistoElePtvsV0dlWSMix2(0),
303  fHistoElePtvsV0dlMCS(0),
304  fHistoElePtvsV0dlMCS1(0),
305  fHistoElePtvsV0dlMCS2(0),
306  fHistoElePtvsV0dlFeedDownXic0MCS(0),
307  fHistoElePtvsV0dlFeedDownXic0MCS1(0),
308  fHistoElePtvsV0dlFeedDownXic0MCS2(0),
309  fHistoElePtvsV0dlFeedDownXicPlusMCS(0),
310  fHistoElePtvsV0dlFeedDownXicPlusMCS1(0),
311  fHistoElePtvsV0dlFeedDownXicPlusMCS2(0),
312  fHistoElePtvsV0dcaRS(0),
313  fHistoElePtvsV0dcaRS1(0),
314  fHistoElePtvsV0dcaRS2(0),
315  fHistoElePtvsV0dcaRSSide(0),
316  fHistoElePtvsV0dcaRSSide1(0),
317  fHistoElePtvsV0dcaRSSide2(0),
318  fHistoElePtvsV0dcaRSMix(0),
319  fHistoElePtvsV0dcaRSMix1(0),
320  fHistoElePtvsV0dcaRSMix2(0),
321  fHistoElePtvsV0dcaWS(0),
322  fHistoElePtvsV0dcaWS1(0),
323  fHistoElePtvsV0dcaWS2(0),
324  fHistoElePtvsV0dcaWSSide(0),
325  fHistoElePtvsV0dcaWSSide1(0),
326  fHistoElePtvsV0dcaWSSide2(0),
327  fHistoElePtvsV0dcaWSMix(0),
328  fHistoElePtvsV0dcaWSMix1(0),
329  fHistoElePtvsV0dcaWSMix2(0),
330  fHistoElePtvsV0dcaMCS(0),
331  fHistoElePtvsV0dcaMCS1(0),
332  fHistoElePtvsV0dcaMCS2(0),
333  fHistoElePtvsV0dcaFeedDownXic0MCS(0),
334  fHistoElePtvsV0dcaFeedDownXic0MCS1(0),
335  fHistoElePtvsV0dcaFeedDownXic0MCS2(0),
336  fHistoElePtvsV0dcaFeedDownXicPlusMCS(0),
337  fHistoElePtvsV0dcaFeedDownXicPlusMCS1(0),
338  fHistoElePtvsV0dcaFeedDownXicPlusMCS2(0),
339  fHistoEleLambdaPtvsV0dlRS(0),
340  fHistoEleLambdaPtvsV0dlRS1(0),
341  fHistoEleLambdaPtvsV0dlRS2(0),
342  fHistoEleLambdaPtvsV0dlRSSide(0),
343  fHistoEleLambdaPtvsV0dlRSSide1(0),
344  fHistoEleLambdaPtvsV0dlRSSide2(0),
345  fHistoEleLambdaPtvsV0dlRSMix(0),
346  fHistoEleLambdaPtvsV0dlRSMix1(0),
347  fHistoEleLambdaPtvsV0dlRSMix2(0),
348  fHistoEleLambdaPtvsV0dlWS(0),
349  fHistoEleLambdaPtvsV0dlWS1(0),
350  fHistoEleLambdaPtvsV0dlWS2(0),
351  fHistoEleLambdaPtvsV0dlWSSide(0),
352  fHistoEleLambdaPtvsV0dlWSSide1(0),
353  fHistoEleLambdaPtvsV0dlWSSide2(0),
354  fHistoEleLambdaPtvsV0dlWSMix(0),
355  fHistoEleLambdaPtvsV0dlWSMix1(0),
356  fHistoEleLambdaPtvsV0dlWSMix2(0),
357  fHistoEleLambdaPtvsV0dlMCS(0),
358  fHistoEleLambdaPtvsV0dlMCS1(0),
359  fHistoEleLambdaPtvsV0dlMCS2(0),
360  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS(0),
361  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1(0),
362  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2(0),
363  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS(0),
364  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1(0),
365  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2(0),
366  fHistoResponseElePt(0),
367  fHistoResponseElePt1(0),
368  fHistoResponseElePt2(0),
369  fHistoResponseEleLambdaPt(0),
370  fHistoResponseEleLambdaPt1(0),
371  fHistoResponseEleLambdaPt2(0),
372  fHistoResponseEleLambdaPtFeeddownXic0(0),
373  fHistoResponseEleLambdaPtFeeddownXic01(0),
374  fHistoResponseEleLambdaPtFeeddownXic02(0),
375  fHistoResponseEleLambdaPtFeeddownXicPlus(0),
376  fHistoResponseEleLambdaPtFeeddownXicPlus1(0),
377  fHistoResponseEleLambdaPtFeeddownXicPlus2(0),
378  fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt(0),
379  fCounter(0),
380  fHistonEvtvsRunNumber(0),
381  fHistonElevsRunNumber(0),
382  fHistonLambdavsRunNumber(0),
383  fHistoMCEventType(0),
384  fDoEventMixing(0),
385  fNumberOfEventsForMixing (5),
386  fNzVtxBins (0),
387  fNCentBins (0),
388  fNOfPools(1),
389  fEventBuffer(0x0),
390  fEventInfo(0x0),
391  fElectronTracks(0x0),
392  fV0Tracks1(0x0),
393  fV0Tracks2(0x0),
394  fV0dlArray1(0x0),
395  fV0dlArray2(0x0),
396  fV0dcaArray1(0x0),
397  fV0dcaArray2(0x0)
398 {
399  //
401  //
402  for(Int_t i=0;i<17;i++){
403  fHistoElePtvsCutVarsRS[i] = 0;
404  fHistoElePtvsCutVarsWS[i] = 0;
406  }
407  for(Int_t i=0;i<8;i++){
409  }
410 }
411 
412 //___________________________________________________________________________
415  Bool_t writeVariableTree) :
416  AliAnalysisTaskSE(name),
417  fUseMCInfo(kFALSE),
418  fOutput(0),
419  fOutputAll(0),
420  fListCuts(0),
421  fCEvents(0),
422  fHTrigger(0),
423  fHCentrality(0),
424  fAnalCuts(analCuts),
425  fIsEventSelected(kFALSE),
426  fWriteVariableTree(writeVariableTree),
427  fWriteEachVariableTree(kFALSE),
428  fWriteMCVariableTree(kFALSE),
429  fVariablesTree(0),
430  fEleVariablesTree(0),
431  fV0VariablesTree(0),
432  fMCVariablesTree(0),
433  fMCEleVariablesTree(0),
434  fMCV0VariablesTree(0),
435  fReconstructPrimVert(kFALSE),
436  fIsMB(kFALSE),
437  fIsSemi(kFALSE),
438  fIsCent(kFALSE),
439  fIsINT7(kFALSE),
440  fIsEMC7(kFALSE),
441  fCandidateVariables(),
442  fCandidateEleVariables(),
443  fCandidateV0Variables(),
444  fCandidateMCVariables(),
445  fCandidateMCEleVariables(),
446  fCandidateMCV0Variables(),
447  fVtx1(0),
448  fV1(0),
449  fVtxZ(0),
450  fBzkG(0),
451  fCentrality(0),
452  fRunNumber(0),
453  fTriggerCheck(0),
454  fUseCentralityV0M(kFALSE),
455  fEvNumberCounter(0),
456  fMCEventType(-9999),
457  fHistoEleLambdaMass(0),
458  fHistoEleLambdaMassRS(0),
459  fHistoEleLambdaMassWS(0),
460  fHistoEleLambdaMassRSMix(0),
461  fHistoEleLambdaMassWSMix(0),
462  fHistoEleLambdaMassRSSide(0),
463  fHistoEleLambdaMassWSSide(0),
464  fHistoEleLambdaMassvsElePtRS(0),
465  fHistoEleLambdaMassvsElePtWS(0),
466  fHistoEleLambdaMassvsElePtRSMix(0),
467  fHistoEleLambdaMassvsElePtWSMix(0),
468  fHistoEleLambdaMassvsElePtRSSide(0),
469  fHistoEleLambdaMassvsElePtWSSide(0),
470  fHistoEleLambdaMassvsElePtRS1(0),
471  fHistoEleLambdaMassvsElePtWS1(0),
472  fHistoEleLambdaMassvsElePtRSMix1(0),
473  fHistoEleLambdaMassvsElePtWSMix1(0),
474  fHistoEleLambdaMassvsElePtRSSide1(0),
475  fHistoEleLambdaMassvsElePtWSSide1(0),
476  fHistoEleLambdaMassvsElePtRS2(0),
477  fHistoEleLambdaMassvsElePtWS2(0),
478  fHistoEleLambdaMassvsElePtRSMix2(0),
479  fHistoEleLambdaMassvsElePtWSMix2(0),
480  fHistoEleLambdaMassvsElePtRSSide2(0),
481  fHistoEleLambdaMassvsElePtWSSide2(0),
482  fHistoElePtRS(0),
483  fHistoElePtWS(0),
484  fHistoElePtRSMix(0),
485  fHistoElePtWSMix(0),
486  fHistoEleLambdaMassMCS(0),
487  fHistoEleLambdaMassMCGen(0),
488  fHistoEleLambdaMassvsElePtMCS(0),
489  fHistoEleLambdaMassvsElePtMCGen(0),
490  fHistoEleLambdaMassvsElePtMCS1(0),
491  fHistoEleLambdaMassvsElePtMCGen1(0),
492  fHistoEleLambdaMassvsElePtMCS2(0),
493  fHistoEleLambdaMassvsElePtMCGen2(0),
494  fHistoElePtMCS(0),
495  fHistoElePtMCGen(0),
496  fHistoElePtvsEtaRS(0),
497  fHistoElePtvsEtaWS(0),
498  fHistoElePtvsEtaRSMix(0),
499  fHistoElePtvsEtaWSMix(0),
500  fHistoElePtvsEtaMCS(0),
501  fHistoElePtvsEtaMCGen(0),
502  fHistoElePtvsLambdaPtRS(0),
503  fHistoElePtvsLambdaPtWS(0),
504  fHistoElePtvsLambdaPtRSMix(0),
505  fHistoElePtvsLambdaPtWSMix(0),
506  fHistoElePtvsLambdaPtMCS(0),
507  fHistoElePtvsLambdaPtvsLcPtMCS(0),
508  fHistoElePtvsLambdaPtMCGen(0),
509  fHistoElePtvsLambdaPtvsLcPtMCGen(0),
510  fHistoElePtvsLambdaPtMCLcGen(0),
511  fHistoElePtvsd0RS(0),
512  fHistoElePtvsd0WS(0),
513  fHistoElePtvsd0RSMix(0),
514  fHistoElePtvsd0WSMix(0),
515  fHistoElePtvsd0MCS(0),
516  fHistoElePtvsd0PromptMCS(0),
517  fHistoElePtvsd0BFeeddownMCS(0),
518  fHistoEleLambdaMassFeeddownXic0MCS(0),
519  fHistoEleLambdaMassFeeddownXic0MCGen(0),
520  fHistoEleLambdaMassvsElePtFeeddownXic0MCS(0),
521  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen(0),
522  fHistoEleLambdaMassvsElePtFeeddownXic0MCS1(0),
523  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1(0),
524  fHistoEleLambdaMassvsElePtFeeddownXic0MCS2(0),
525  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2(0),
526  fHistoElePtFeeddownXic0MCS(0),
527  fHistoElePtFeeddownXic0MCGen(0),
528  fHistoElePtvsEtaFeeddownXic0MCS(0),
529  fHistoElePtvsEtaFeeddownXic0MCGen(0),
530  fHistoElePtvsLambdaPtFeeddownXic0MCS(0),
531  fHistoElePtvsLambdaPtFeeddownXic0MCGen(0),
532  fHistoEleLambdaMassFeeddownXicPlusMCS(0),
533  fHistoEleLambdaMassFeeddownXicPlusMCGen(0),
534  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS(0),
535  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen(0),
536  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1(0),
537  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1(0),
538  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS2(0),
539  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2(0),
540  fHistoElePtFeeddownXicPlusMCS(0),
541  fHistoElePtFeeddownXicPlusMCGen(0),
542  fHistoElePtvsEtaFeeddownXicPlusMCS(0),
543  fHistoElePtvsEtaFeeddownXicPlusMCGen(0),
544  fHistoElePtvsLambdaPtFeeddownXicPlusMCS(0),
545  fHistoElePtvsLambdaPtFeeddownXicPlusMCGen(0),
546  fHistoBachPt(0),
547  fHistoBachPtMCS(0),
548  fHistoBachPtMCGen(0),
549  fHistod0Bach(0),
550  fHistoLambdaMassvsPt(0),
551  fHistoLambdaMassvsPtMCS(0),
552  fHistoLambdaMassvsPtMCGen(0),
553  fHistoLambdaPtvsDl(0),
554  fHistoLambdaPtvsDlSide(0),
555  fHistoLambdaPtvsDlMCS(0),
556  fHistoLambdaPtvsDlFeeddownXi0MCS(0),
557  fHistoLambdaPtvsDlFeeddownXiMinusMCS(0),
558  fHistoLambdaPtvsDlFeeddownOmegaMCS(0),
559  fHistoK0sMassvsPt(0),
560  fHistoElectronTPCPID(0),
561  fHistoElectronTOFPID(0),
562  fHistoElectronTPCSelPID(0),
563  fHistoElectronTOFSelPID(0),
564  fHistoElectronTPCPIDSelTOF(0),
565  fHistoElectronTPCPIDSelTOFSmallEta(0),
566  fHistoElectronTPCPIDSelTOFLargeEta(0),
567  fHistoElectronQovPtvsPhi(0),
568  fHistoLambdaQovPtvsPhi(0),
569  fHistoLcMCGen(0),
570  fHistoLcMCGen1(0),
571  fHistoLcMCGen2(0),
572  fHistoLcMCS(0),
573  fHistoLcMCS1(0),
574  fHistoLcMCS2(0),
575  fHistoFeedDownXic0MCGen(0),
576  fHistoFeedDownXic0MCGen1(0),
577  fHistoFeedDownXic0MCGen2(0),
578  fHistoFeedDownXic0MCS(0),
579  fHistoFeedDownXic0MCS1(0),
580  fHistoFeedDownXic0MCS2(0),
581  fHistoFeedDownXicPlusMCGen(0),
582  fHistoFeedDownXicPlusMCGen1(0),
583  fHistoFeedDownXicPlusMCGen2(0),
584  fHistoFeedDownXicPlusMCS(0),
585  fHistoFeedDownXicPlusMCS1(0),
586  fHistoFeedDownXicPlusMCS2(0),
587  fHistoLcElectronMCGen(0),
588  fHistoLcElectronMCGen1(0),
589  fHistoLcElectronMCGen2(0),
590  fHistoLcElectronMCS(0),
591  fHistoLcElectronMCS1(0),
592  fHistoLcElectronMCS2(0),
593  fHistoElectronFeedDownXic0MCGen(0),
594  fHistoElectronFeedDownXic0MCGen1(0),
595  fHistoElectronFeedDownXic0MCGen2(0),
596  fHistoElectronFeedDownXic0MCS(0),
597  fHistoElectronFeedDownXic0MCS1(0),
598  fHistoElectronFeedDownXic0MCS2(0),
599  fHistoElectronFeedDownXicPlusMCGen(0),
600  fHistoElectronFeedDownXicPlusMCGen1(0),
601  fHistoElectronFeedDownXicPlusMCGen2(0),
602  fHistoElectronFeedDownXicPlusMCS(0),
603  fHistoElectronFeedDownXicPlusMCS1(0),
604  fHistoElectronFeedDownXicPlusMCS2(0),
605  fHistoElectronMCGen(0),
606  fHistoLambdaMCGen(0),
607  fHistoElePtvsV0dlRS(0),
608  fHistoElePtvsV0dlRS1(0),
609  fHistoElePtvsV0dlRS2(0),
610  fHistoElePtvsV0dlRSSide(0),
611  fHistoElePtvsV0dlRSSide1(0),
612  fHistoElePtvsV0dlRSSide2(0),
613  fHistoElePtvsV0dlRSMix(0),
614  fHistoElePtvsV0dlRSMix1(0),
615  fHistoElePtvsV0dlRSMix2(0),
616  fHistoElePtvsV0dlWS(0),
617  fHistoElePtvsV0dlWS1(0),
618  fHistoElePtvsV0dlWS2(0),
619  fHistoElePtvsV0dlWSSide(0),
620  fHistoElePtvsV0dlWSSide1(0),
621  fHistoElePtvsV0dlWSSide2(0),
622  fHistoElePtvsV0dlWSMix(0),
623  fHistoElePtvsV0dlWSMix1(0),
624  fHistoElePtvsV0dlWSMix2(0),
625  fHistoElePtvsV0dlMCS(0),
626  fHistoElePtvsV0dlMCS1(0),
627  fHistoElePtvsV0dlMCS2(0),
628  fHistoElePtvsV0dlFeedDownXic0MCS(0),
629  fHistoElePtvsV0dlFeedDownXic0MCS1(0),
630  fHistoElePtvsV0dlFeedDownXic0MCS2(0),
631  fHistoElePtvsV0dlFeedDownXicPlusMCS(0),
632  fHistoElePtvsV0dlFeedDownXicPlusMCS1(0),
633  fHistoElePtvsV0dlFeedDownXicPlusMCS2(0),
634  fHistoElePtvsV0dcaRS(0),
635  fHistoElePtvsV0dcaRS1(0),
636  fHistoElePtvsV0dcaRS2(0),
637  fHistoElePtvsV0dcaRSSide(0),
638  fHistoElePtvsV0dcaRSSide1(0),
639  fHistoElePtvsV0dcaRSSide2(0),
640  fHistoElePtvsV0dcaRSMix(0),
641  fHistoElePtvsV0dcaRSMix1(0),
642  fHistoElePtvsV0dcaRSMix2(0),
643  fHistoElePtvsV0dcaWS(0),
644  fHistoElePtvsV0dcaWS1(0),
645  fHistoElePtvsV0dcaWS2(0),
646  fHistoElePtvsV0dcaWSSide(0),
647  fHistoElePtvsV0dcaWSSide1(0),
648  fHistoElePtvsV0dcaWSSide2(0),
649  fHistoElePtvsV0dcaWSMix(0),
650  fHistoElePtvsV0dcaWSMix1(0),
651  fHistoElePtvsV0dcaWSMix2(0),
652  fHistoElePtvsV0dcaMCS(0),
653  fHistoElePtvsV0dcaMCS1(0),
654  fHistoElePtvsV0dcaMCS2(0),
655  fHistoElePtvsV0dcaFeedDownXic0MCS(0),
656  fHistoElePtvsV0dcaFeedDownXic0MCS1(0),
657  fHistoElePtvsV0dcaFeedDownXic0MCS2(0),
658  fHistoElePtvsV0dcaFeedDownXicPlusMCS(0),
659  fHistoElePtvsV0dcaFeedDownXicPlusMCS1(0),
660  fHistoElePtvsV0dcaFeedDownXicPlusMCS2(0),
661  fHistoEleLambdaPtvsV0dlRS(0),
662  fHistoEleLambdaPtvsV0dlRS1(0),
663  fHistoEleLambdaPtvsV0dlRS2(0),
664  fHistoEleLambdaPtvsV0dlRSSide(0),
665  fHistoEleLambdaPtvsV0dlRSSide1(0),
666  fHistoEleLambdaPtvsV0dlRSSide2(0),
667  fHistoEleLambdaPtvsV0dlRSMix(0),
668  fHistoEleLambdaPtvsV0dlRSMix1(0),
669  fHistoEleLambdaPtvsV0dlRSMix2(0),
670  fHistoEleLambdaPtvsV0dlWS(0),
671  fHistoEleLambdaPtvsV0dlWS1(0),
672  fHistoEleLambdaPtvsV0dlWS2(0),
673  fHistoEleLambdaPtvsV0dlWSSide(0),
674  fHistoEleLambdaPtvsV0dlWSSide1(0),
675  fHistoEleLambdaPtvsV0dlWSSide2(0),
676  fHistoEleLambdaPtvsV0dlWSMix(0),
677  fHistoEleLambdaPtvsV0dlWSMix1(0),
678  fHistoEleLambdaPtvsV0dlWSMix2(0),
679  fHistoEleLambdaPtvsV0dlMCS(0),
680  fHistoEleLambdaPtvsV0dlMCS1(0),
681  fHistoEleLambdaPtvsV0dlMCS2(0),
682  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS(0),
683  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1(0),
684  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2(0),
685  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS(0),
686  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1(0),
687  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2(0),
688  fHistoResponseElePt(0),
689  fHistoResponseElePt1(0),
690  fHistoResponseElePt2(0),
691  fHistoResponseEleLambdaPt(0),
692  fHistoResponseEleLambdaPt1(0),
693  fHistoResponseEleLambdaPt2(0),
694  fHistoResponseEleLambdaPtFeeddownXic0(0),
695  fHistoResponseEleLambdaPtFeeddownXic01(0),
696  fHistoResponseEleLambdaPtFeeddownXic02(0),
697  fHistoResponseEleLambdaPtFeeddownXicPlus(0),
698  fHistoResponseEleLambdaPtFeeddownXicPlus1(0),
699  fHistoResponseEleLambdaPtFeeddownXicPlus2(0),
700  fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt(0),
701  fCounter(0),
702  fHistonEvtvsRunNumber(0),
703  fHistonElevsRunNumber(0),
704  fHistonLambdavsRunNumber(0),
705  fHistoMCEventType(0),
706  fDoEventMixing(0),
707  fNumberOfEventsForMixing (5),
708  fNzVtxBins (0),
709  fNCentBins (0),
710  fNOfPools(1),
711  fEventBuffer(0x0),
712  fEventInfo(0x0),
713  fElectronTracks(0x0),
714  fV0Tracks1(0x0),
715  fV0Tracks2(0x0),
716  fV0dlArray1(0x0),
717  fV0dlArray2(0x0),
718  fV0dcaArray1(0x0),
719  fV0dcaArray2(0x0)
720 {
721  //
723  //
724  Info("AliAnalysisTaskSELc2eleLambdafromAODtracks","Calling Constructor");
725 
726  for(Int_t i=0;i<17;i++){
727  fHistoElePtvsCutVarsRS[i] = 0;
728  fHistoElePtvsCutVarsWS[i] = 0;
730  }
731  for(Int_t i=0;i<8;i++){
733  }
734 
735  DefineOutput(1,TList::Class()); //conters
736  DefineOutput(2,TList::Class());
737  DefineOutput(3,TList::Class()); //conters
738  DefineOutput(4,TTree::Class()); //My private output
739  DefineOutput(5,TTree::Class()); //My private output
740  DefineOutput(6,TTree::Class()); //My private output
741  DefineOutput(7,TTree::Class()); //My private output
742  DefineOutput(8,AliNormalizationCounter::Class());
743  DefineOutput(9,TTree::Class()); //My private output
744  DefineOutput(10,TTree::Class()); //My private output
745 }
746 
747 //___________________________________________________________________________
749  //
751  //
752  Info("~AliAnalysisTaskSELc2eleLambdafromAODtracks","Calling Destructor");
753 
754  if (fOutput) {
755  delete fOutput;
756  fOutput = 0;
757  }
758 
759  if (fOutputAll) {
760  delete fOutputAll;
761  fOutputAll = 0;
762  }
763 
764  if (fListCuts) {
765  delete fListCuts;
766  fListCuts = 0;
767  }
768 
769 
770  if (fAnalCuts) {
771  delete fAnalCuts;
772  fAnalCuts = 0;
773  }
774 
775  if (fVariablesTree) {
776  delete fVariablesTree;
777  fVariablesTree = 0;
778  }
779  if (fEleVariablesTree) {
780  delete fEleVariablesTree;
781  fEleVariablesTree = 0;
782  }
783  if (fV0VariablesTree) {
784  delete fV0VariablesTree;
785  fV0VariablesTree = 0;
786  }
787  if (fMCVariablesTree) {
788  delete fMCVariablesTree;
789  fMCVariablesTree = 0;
790  }
791  if (fMCEleVariablesTree) {
792  delete fMCEleVariablesTree;
794  }
795  if (fMCV0VariablesTree) {
796  delete fMCV0VariablesTree;
797  fMCV0VariablesTree = 0;
798  }
799  if(fCounter){
800  delete fCounter;
801  fCounter = 0;
802  }
803 
804  if(fElectronTracks) fElectronTracks->Delete();
805  delete fElectronTracks;
806  if(fV0Tracks1) fV0Tracks1->Delete();
807  delete fV0Tracks1;
808  if(fV0Tracks2) fV0Tracks2->Delete();
809  delete fV0Tracks2;
810  if(fEventBuffer){
811  for(Int_t i=0; i<fNOfPools; i++) delete fEventBuffer[i];
812  delete fEventBuffer;
813  }
814  delete fEventInfo;
815 }
816 
817 //_________________________________________________
819  //
821  //
822  //
823 
824  fIsEventSelected=kFALSE;
825 
826  if (fDebug > 1) AliInfo("Init");
827 
828  fListCuts = new TList();
829  fListCuts->SetOwner();
830  fListCuts->SetName("ListCuts");
832  PostData(2,fListCuts);
833 
834  return;
835 }
836 
837 //_________________________________________________
839 {
840  //
842  //
843 
844  if (!fInputEvent) {
845  AliError("NO EVENT FOUND!");
846  return;
847  }
848  AliAODEvent* aodEvent = dynamic_cast<AliAODEvent*>(fInputEvent);
849  fCEvents->Fill(1);
851 
852  //------------------------------------------------
853  // First check if the event has proper B
854  //------------------------------------------------
855 
856  fBzkG = (Double_t)aodEvent->GetMagneticField();
857  AliKFParticle::SetField(fBzkG);
858  if (TMath::Abs(fBzkG)<0.001) {
859  return;
860  }
861  fCEvents->Fill(2);
862 
865 
866  //------------------------------------------------
867  // MC analysis setting
868  //------------------------------------------------
869  TClonesArray *mcArray = 0;
870  AliAODMCHeader *mcHeader=0;
871  if (fUseMCInfo) {
872  // MC array need for maching
873  mcArray = dynamic_cast<TClonesArray*>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName()));
874  if (!mcArray) {
875  AliError("Could not find Monte-Carlo in AOD");
876  return;
877  }
878  fCEvents->Fill(6); // in case of MC events
879 
880  // load MC header
881  mcHeader = (AliAODMCHeader*)aodEvent->GetList()->FindObject(AliAODMCHeader::StdBranchName());
882  if (!mcHeader) {
883  AliError("AliAnalysisTaskSELc2eleLambdafromAODtracks::UserExec: MC header branch not found!\n");
884  return;
885  }
886  fCEvents->Fill(7); // in case of MC events
887 
888  Double_t zMCVertex = mcHeader->GetVtxZ();
889  if (TMath::Abs(zMCVertex) > fAnalCuts->GetMaxVtxZ()) {
890  AliDebug(2,Form("Event rejected: abs(zVtxMC)=%f > fAnalCuts->GetMaxVtxZ()=%f",zMCVertex,fAnalCuts->GetMaxVtxZ()));
891  return;
892  } else {
893  fCEvents->Fill(17); // in case of MC events
894  }
895  if ((TMath::Abs(zMCVertex) < fAnalCuts->GetMaxVtxZ()) && (!fAnalCuts->IsEventRejectedDuePhysicsSelection()) && (!fAnalCuts->IsEventRejectedDueToTrigger())) {
896  Bool_t selevt = MakeMCAnalysis(mcArray);
897  if(!selevt) return;
898  }
899  }
900 
901  //------------------------------------------------
902  // Event selection
903  //------------------------------------------------
904  fVtx1 = (AliAODVertex*)aodEvent->GetPrimaryVertex();
905  if (!fVtx1) return;
906 
907  Double_t pos[3],cov[6];
908  fVtx1->GetXYZ(pos);
909  fVtx1->GetCovarianceMatrix(cov);
910  fV1 = new AliESDVertex(pos,cov,100.,100,fVtx1->GetName());
911  fVtxZ = pos[2];
912 
913  Bool_t fIsTriggerNotOK = fAnalCuts->IsEventRejectedDueToTrigger();
914  if(!fIsTriggerNotOK) fCEvents->Fill(3);
915  if(!fIsEventSelected) {
916  delete fV1;
917  return;
918  }
919  fCEvents->Fill(4);
920 
921  fIsMB=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kMB)==(AliVEvent::kMB);
922  fIsSemi=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kSemiCentral)==(AliVEvent::kSemiCentral);
923  fIsCent=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kCentral)==(AliVEvent::kCentral);
924  fIsINT7=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kINT7)==(AliVEvent::kINT7);
925  fIsEMC7=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kEMC7)==(AliVEvent::kEMC7);
927  if(fIsMB) fHTrigger->Fill(1);
928  if(fIsSemi) fHTrigger->Fill(2);
929  if(fIsCent) fHTrigger->Fill(3);
930  if(fIsINT7) fHTrigger->Fill(4);
931  if(fIsEMC7) fHTrigger->Fill(5);
932  if(fIsMB|fIsSemi|fIsCent) fHTrigger->Fill(7);
933  if(fIsINT7|fIsEMC7) fHTrigger->Fill(8);
934  if(fIsMB&fIsSemi) fHTrigger->Fill(10);
935  if(fIsMB&fIsCent) fHTrigger->Fill(11);
936  if(fIsINT7&fIsEMC7) fHTrigger->Fill(12);
937 
938  if(fUseCentralityV0M){
939  AliCentrality *cent = aodEvent->GetCentrality();
940  fCentrality = cent->GetCentralityPercentile("V0M");
941  }else{
942  fCentrality = 1.;
943  }
944  if(fCentrality<0.||fCentrality>100.-0.0000001) {
945  delete fV1;
946  return;
947  }
948  fHCentrality->Fill(fCentrality);
949  fRunNumber = aodEvent->GetRunNumber();
950 
951  Int_t runnumber_offset = 0;
952  Int_t runnumber = aodEvent->GetRunNumber();
953  if(runnumber<=131000&&runnumber>=114000){
954  runnumber_offset = 114000;//lhc10bcde
955  }else if(runnumber<=196000&&runnumber>=195000){
956  runnumber_offset = 195000;//lhc13bc
957  }else if(runnumber<=170593&&runnumber>=167902){
958  runnumber_offset = 167902;//lhc11h
959  }
960  fHistonEvtvsRunNumber->Fill(runnumber-runnumber_offset,1.);
961 
962  //------------------------------------------------
963  // Check if the event has v0 candidate
964  //------------------------------------------------
965  //Int_t nv0 = aodEvent->GetNumberOfV0s();
966  fCEvents->Fill(5);
967 
968 
969  //------------------------------------------------
970  // Main analysis done in this function
971  //------------------------------------------------
972  MakeAnalysis(aodEvent,mcArray);
973 
974 
975  PostData(1,fOutput);
976  PostData(3,fOutputAll);
977  PostData(4,fVariablesTree);
978  PostData(5,fEleVariablesTree);
979  PostData(6,fV0VariablesTree);
980  PostData(7,fMCVariablesTree);
981  PostData(8,fCounter);
982  PostData(9,fMCEleVariablesTree);
983  PostData(10,fMCV0VariablesTree);
984 
985  fIsEventSelected=kFALSE;
986 
987  delete fV1;
988  return;
989 }
990 
991 //________________________________________ terminate ___________________________
993 {
997 
998  //AliInfo("Terminate","");
999  AliAnalysisTaskSE::Terminate();
1000 
1001  fOutput = dynamic_cast<TList*> (GetOutputData(1));
1002  if (!fOutput) {
1003  AliError("fOutput not available");
1004  return;
1005  }
1006 
1007  fOutputAll = dynamic_cast<TList*> (GetOutputData(3));
1008  if (!fOutputAll) {
1009  AliError("fOutputAll not available");
1010  return;
1011  }
1012 
1013  return;
1014 }
1015 
1016 //___________________________________________________________________________
1018 {
1022  //AliInfo(Form("CreateOutputObjects of task %s\n", GetName()));
1023 
1024  //------------------------------------------------
1025  // output object setting
1026  //------------------------------------------------
1027  fOutput = new TList();
1028  fOutput->SetOwner();
1029  fOutput->SetName("chist0");
1030  DefineGeneralHistograms(); // define general histograms
1031  PostData(1,fOutput);
1032 
1033  fOutputAll = new TList();
1034  fOutputAll->SetOwner();
1035  fOutputAll->SetName("anahisto");
1036  DefineAnalysisHistograms(); // define general histograms
1037  PostData(3,fOutputAll);
1038 
1040  PostData(4,fVariablesTree);
1041 
1043  PostData(5,fEleVariablesTree);
1044 
1046  PostData(6,fV0VariablesTree);
1047 
1049  PostData(7,fMCVariablesTree);
1050 
1052  PostData(9,fMCEleVariablesTree);
1053 
1055  PostData(10,fMCV0VariablesTree);
1056 
1057  //Counter for Normalization
1058  TString normName="NormalizationCounter";
1059  AliAnalysisDataContainer *cont = GetOutputSlot(8)->GetContainer();
1060  if(cont)normName=(TString)cont->GetName();
1061  fCounter = new AliNormalizationCounter(normName.Data());
1062  fCounter->Init();
1063  PostData(8,fCounter);
1064 
1065  if(fDoEventMixing){
1066  fElectronTracks = new TObjArray();
1067  fElectronTracks->SetOwner();
1068  fV0Tracks1 = new TObjArray();
1069  fV0Tracks1->SetOwner();
1070  fV0Tracks2 = new TObjArray();
1071  fV0Tracks2->SetOwner();
1072 
1074  fEventBuffer = new TTree*[fNOfPools];
1075  for(Int_t i=0; i<fNOfPools; i++){
1076  fEventBuffer[i]=new TTree(Form("EventBuffer_%d",i), "Temporary buffer for event mixing");
1077  fEventBuffer[i]->Branch("zVertex", &fVtxZ);
1078  fEventBuffer[i]->Branch("centrality", &fCentrality);
1079  fEventBuffer[i]->Branch("eventInfo", "TObjString",&fEventInfo);
1080  fEventBuffer[i]->Branch("v1array", "TObjArray", &fV0Tracks1);
1081  fEventBuffer[i]->Branch("v2array", "TObjArray", &fV0Tracks2);
1082  fEventBuffer[i]->Branch("vdl1array", &fV0dlArray1);
1083  fEventBuffer[i]->Branch("vdl2array", &fV0dlArray2);
1084  fEventBuffer[i]->Branch("vdca1array", &fV0dcaArray1);
1085  fEventBuffer[i]->Branch("vdca2array", &fV0dcaArray2);
1086  }
1087  }
1088 
1089 
1090  return;
1091 }
1092 
1093 //-------------------------------------------------------------------------------
1096  AliAODEvent *aodEvent, TClonesArray *mcArray
1097  )
1098 {
1099  //
1101  //
1102  if(fDoEventMixing){
1103  if(fElectronTracks) fElectronTracks->Delete();
1104  if(fV0Tracks1) fV0Tracks1->Delete();
1105  if(fV0Tracks2) fV0Tracks2->Delete();
1106  fV0dlArray1.clear();
1107  fV0dlArray2.clear();
1108  fV0dcaArray1.clear();
1109  fV0dcaArray2.clear();
1110  }
1111 
1112  //------------------------------------------------
1113  // Select good track before hand to save time
1114  //------------------------------------------------
1115 
1116  Int_t nV0s= aodEvent->GetNumberOfV0s();
1117  Int_t nTracks= aodEvent->GetNumberOfTracks();
1118 
1119  Bool_t seleTrkFlags[nTracks];
1120  Int_t nSeleTrks=0;
1121  SelectTrack(aodEvent,nTracks,nSeleTrks,seleTrkFlags,mcArray);
1122 
1123  Bool_t seleV0Flags[nV0s];
1124  Int_t nSeleV0=0;
1125  SelectV0(aodEvent,nV0s,nSeleV0,seleV0Flags,mcArray);
1126 
1127  Int_t runnumber_offset = 0;
1128  Int_t runnumber = aodEvent->GetRunNumber();
1129  if(runnumber<=131000&&runnumber>=114000){
1130  runnumber_offset = 114000;//lhc10bcde
1131  }else if(runnumber<=196000&&runnumber>=195000){
1132  runnumber_offset = 195000;//lhc13bc
1133  }else if(runnumber<=170593&&runnumber>=167902){
1134  runnumber_offset = 167902;//lhc11h
1135  }
1136  fHistonElevsRunNumber->Fill(runnumber-runnumber_offset,nSeleTrks);
1137  fHistonLambdavsRunNumber->Fill(runnumber-runnumber_offset,nSeleV0);
1138 
1139  //------------------------------------------------
1140  // V0 loop
1141  //------------------------------------------------
1142  for (Int_t iv0 = 0; iv0<nV0s; iv0++) {
1143  if(!seleV0Flags[iv0]) continue;
1144  AliAODv0 *v0 = aodEvent->GetV0(iv0);
1145  if(!v0) continue;
1146 
1147  AliAODTrack *cptrack = (AliAODTrack*)(v0->GetDaughter(0));
1148  AliAODTrack *cntrack = (AliAODTrack*)(v0->GetDaughter(1));
1149 
1150  //------------------------------------------------
1151  // track loop
1152  //------------------------------------------------
1153  for (Int_t itrk = 0; itrk<nTracks; itrk++) {
1154  if(!seleTrkFlags[itrk]) continue;
1155  AliAODTrack *trk = (AliAODTrack*)aodEvent->GetTrack(itrk);
1156  if(trk->GetID()<0) continue;
1157 
1158  Int_t cpid = cptrack->GetID();
1159  Int_t cnid = cntrack->GetID();
1160  Int_t lpid = trk->GetID();
1161  if((cpid==lpid)||(cnid==lpid)) continue;
1162 
1163  //if(!fAnalCuts->SelectWithRoughCuts(v0,trk)) continue;
1164 
1165  AliAODVertex *secVert = ReconstructSecondaryVertex(v0,trk,aodEvent);//Fake, prim vertex is just used as secondary vertex. place holder for future
1166  if(!secVert) continue;
1167 
1168  AliAODRecoCascadeHF *elobj = MakeCascadeHF(v0,trk,aodEvent,secVert);
1169  if(!elobj) {
1170  continue;
1171  }
1172 
1173  FillROOTObjects(elobj, v0,trk,mcArray);
1174 
1175  elobj->GetSecondaryVtx()->RemoveDaughters();
1176  elobj->UnsetOwnPrimaryVtx();
1177  delete elobj;elobj=NULL;
1178  delete secVert;
1179  }
1180  }
1181 
1182  if(fDoEventMixing){
1183  fEventInfo->SetString(Form("Ev%d_esd%d_E%d_V%d",AliAnalysisManager::GetAnalysisManager()->GetNcalls(),((AliAODHeader*)aodEvent->GetHeader())->GetEventNumberESDFile(),fElectronTracks->GetEntries(),fV0Tracks1->GetEntries()+fV0Tracks2->GetEntries()));
1184  Int_t ind=GetPoolIndex(fVtxZ,fCentrality);
1185  if(ind>=0 && ind<fNOfPools){
1186  if(fEventBuffer[ind]->GetEntries() >= fNumberOfEventsForMixing){
1187  DoEventMixingWithPools(ind);
1188  if(fEventBuffer[ind]->GetEntries() >= 20*fNumberOfEventsForMixing){
1189  ResetPool(ind);
1190  }
1191  }
1192  fEventBuffer[ind]->Fill();
1193  }
1194  }
1195 }
1198 {
1202 
1203  const char* nameoutput = GetOutputSlot(4)->GetContainer()->GetName();
1204  fVariablesTree = new TTree(nameoutput,"Candidates variables tree");
1205  Int_t nVar = 74;
1206  fCandidateVariables = new Float_t [nVar];
1207  TString * fCandidateVariableNames = new TString[nVar];
1208 
1209  fCandidateVariableNames[ 0]="Centrality";
1210  fCandidateVariableNames[ 1]="InvMassEleLambda";
1211  fCandidateVariableNames[ 2]="EleLambdaPt";
1212  fCandidateVariableNames[ 3]="EleLambdaPx";
1213  fCandidateVariableNames[ 4]="EleLambdaPy";
1214  fCandidateVariableNames[ 5]="EleLambdaPz";
1215  fCandidateVariableNames[ 6]="ElePx";
1216  fCandidateVariableNames[ 7]="ElePy";
1217  fCandidateVariableNames[ 8]="ElePz";
1218  fCandidateVariableNames[ 9]="V0Px";
1219  fCandidateVariableNames[10]="V0Py";
1220  fCandidateVariableNames[11]="V0Pz";
1221  fCandidateVariableNames[12]="AntiLambdaFlag";
1222  fCandidateVariableNames[13]="MassLambda";
1223  fCandidateVariableNames[14]="MassAntiLambda";
1224  fCandidateVariableNames[15]="Eled0";
1225  fCandidateVariableNames[16]="V0d0";
1226  fCandidateVariableNames[17]="nSigmaTPCele";
1227  fCandidateVariableNames[18]="nSigmaTOFele";
1228  fCandidateVariableNames[19]="nSigmaTPCv0pr";
1229  fCandidateVariableNames[20]="nSigmaTOFv0pr";
1230  fCandidateVariableNames[21]="EleCharge";
1231  fCandidateVariableNames[22]="ProtonPx";
1232  fCandidateVariableNames[23]="ProtonPy";
1233  fCandidateVariableNames[24]="ProtonPz";
1234  fCandidateVariableNames[25]="PiPx";
1235  fCandidateVariableNames[26]="PiPy";
1236  fCandidateVariableNames[27]="PiPz";
1237  fCandidateVariableNames[28]="mcpdglc";
1238  fCandidateVariableNames[29]="mclablc";
1239  fCandidateVariableNames[30]="mcpdgmomele";
1240  fCandidateVariableNames[31]="mcpdgmomv0";
1241  fCandidateVariableNames[32]="Mixing";
1242  fCandidateVariableNames[33]="mcpdgele";
1243  fCandidateVariableNames[34]="nSigmaTPCpr_etrk";
1244  fCandidateVariableNames[35]="nSigmaTOFpr_etrk";
1245  fCandidateVariableNames[36]="nSigmaTPCka_etrk";
1246  fCandidateVariableNames[37]="nSigmaTOFka_etrk";
1247  fCandidateVariableNames[38]="MassK0Short";
1248  fCandidateVariableNames[39]="mcpdggrmomele";
1249  fCandidateVariableNames[40]="mcpdggrmomv0";
1250  fCandidateVariableNames[41]="mcngenele";
1251  fCandidateVariableNames[42]="mcngenv0";
1252  fCandidateVariableNames[43]="mclcpx";
1253  fCandidateVariableNames[44]="mclcpy";
1254  fCandidateVariableNames[45]="mclcpz";
1255  fCandidateVariableNames[46]="mcelepx";
1256  fCandidateVariableNames[47]="mcelepy";
1257  fCandidateVariableNames[48]="mcelepz";
1258  fCandidateVariableNames[49]="mcv0px";
1259  fCandidateVariableNames[50]="mcv0py";
1260  fCandidateVariableNames[51]="mcv0pz";
1261  fCandidateVariableNames[52]="nSigmaTPCpi_etrk";
1262  fCandidateVariableNames[53]="nSigmaTOFpi_etrk";
1263  fCandidateVariableNames[54]="PrimVertx";
1264  fCandidateVariableNames[55]="PrimVerty";
1265  fCandidateVariableNames[56]="PrimVertz";
1266  fCandidateVariableNames[57]="V0Vertx";
1267  fCandidateVariableNames[58]="V0Verty";
1268  fCandidateVariableNames[59]="V0Vertz";
1269 
1270  fCandidateVariableNames[60]="DcaV0PrToPrimVertex";
1271  fCandidateVariableNames[61]="DcaV0PiToPrimVertex";
1272  fCandidateVariableNames[62]="DcaV0daughters";
1273  fCandidateVariableNames[63]="V0CosPointingAngle";
1274  fCandidateVariableNames[64]="V0ProperDecayLength";
1275  fCandidateVariableNames[65]="MassK0Short2";
1276 
1277  fCandidateVariableNames[66]="nSigmaTPCv0pi";
1278  fCandidateVariableNames[67]="nSigmaTOFv0pi";
1279 
1280  fCandidateVariableNames[68]= "EleITSMatch";
1281  fCandidateVariableNames[69]= "V0PosITSMatch";
1282  fCandidateVariableNames[70]= "V0NegITSMatch";
1283  fCandidateVariableNames[71]= "IsV0PeakRegion";
1284 
1285  fCandidateVariableNames[72]="EvNumber";
1286  fCandidateVariableNames[73]="RunNumber";
1287 
1288  for (Int_t ivar=0; ivar<nVar; ivar++) {
1289  fVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
1290  }
1291 
1292  return;
1293 }
1294 
1296 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillROOTObjects(AliAODRecoCascadeHF *elobj, AliAODv0 *v0, AliAODTrack *trk, TClonesArray *mcArray)
1297 {
1301  if(!trk) return;
1302  if(!v0) return;
1303 
1304  for(Int_t i=0;i<74;i++){
1305  fCandidateVariables[i] = -9999.;
1306  }
1307 
1308  Bool_t anti_lambda_flag = kFALSE;
1309  if(fabs(v0->MassAntiLambda()-1.115683)<fAnalCuts->GetProdV0MassTolLambdaRough()) anti_lambda_flag = kTRUE;
1310 
1311  AliAODTrack *cptrack = (AliAODTrack*)(v0->GetDaughter(0));
1312  AliAODTrack *cntrack = (AliAODTrack*)(v0->GetDaughter(1));
1313  if(cptrack->Charge()<0 && cntrack->Charge()>0){
1314  cptrack = (AliAODTrack*)(v0->GetDaughter(1));
1315  cntrack = (AliAODTrack*)(v0->GetDaughter(0));
1316  }
1317 
1319  UInt_t pdgdg[2]={11,3122};
1320  fCandidateVariables[ 1] = elobj->InvMass(2,pdgdg);
1321  fCandidateVariables[ 2] = elobj->Pt();
1322  fCandidateVariables[ 3] = elobj->Px();
1323  fCandidateVariables[ 4] = elobj->Py();
1324  fCandidateVariables[ 5] = elobj->Pz();
1325  fCandidateVariables[ 6] = elobj->PxProng(0);
1326  fCandidateVariables[ 7] = elobj->PyProng(0);
1327  fCandidateVariables[ 8] = elobj->PzProng(0);
1328  fCandidateVariables[ 9] = elobj->PxProng(1);
1329  fCandidateVariables[10] = elobj->PyProng(1);
1330  fCandidateVariables[11] = elobj->PzProng(1);
1331  fCandidateVariables[12] = anti_lambda_flag;
1332  fCandidateVariables[13] = v0->MassLambda();
1333  fCandidateVariables[14] = v0->MassAntiLambda();
1334  fCandidateVariables[15] = elobj->Getd0Prong(0);
1335  fCandidateVariables[16] = elobj->Getd0Prong(1);
1336 
1337  Double_t nSigmaTPCele=-9999.;
1338  Double_t nSigmaTOFele=-9999.;
1339  Double_t nSigmaTPCv0pr=-9999.;
1340  Double_t nSigmaTOFv0pr=-9999.;
1341  Double_t nSigmaTPCv0pi=-9999.;
1342  Double_t nSigmaTOFv0pi=-9999.;
1343  if(fAnalCuts->GetIsUsePID())
1344  {
1345  nSigmaTPCele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kElectron);
1346  nSigmaTOFele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trk,AliPID::kElectron);
1347  fCandidateVariables[17] = nSigmaTPCele;
1348  fCandidateVariables[18] = nSigmaTOFele;
1349  }
1350 
1351  if(fAnalCuts->GetUseLambdaPID())
1352  {
1353  if(anti_lambda_flag){
1354  nSigmaTPCv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kProton);
1355  nSigmaTOFv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTOF(cntrack,AliPID::kProton);
1356  nSigmaTPCv0pi = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kPion);
1357  nSigmaTOFv0pi = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTOF(cptrack,AliPID::kPion);
1358  }else{
1359  nSigmaTPCv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kProton);
1360  nSigmaTOFv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTOF(cptrack,AliPID::kProton);
1361  nSigmaTPCv0pi = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kPion);
1362  nSigmaTOFv0pi = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTOF(cntrack,AliPID::kPion);
1363  }
1364  fCandidateVariables[19] = nSigmaTPCv0pr;
1365  fCandidateVariables[20] = nSigmaTOFv0pr;
1366  fCandidateVariables[66] = nSigmaTPCv0pi;
1367  fCandidateVariables[67] = nSigmaTOFv0pi;
1368  }
1369  fCandidateVariables[21] = trk->Charge();
1370 
1371  if(anti_lambda_flag){
1372  fCandidateVariables[22] = cntrack->Px();
1373  fCandidateVariables[23] = cntrack->Py();
1374  fCandidateVariables[24] = cntrack->Pz();
1375  fCandidateVariables[25] = cptrack->Px();
1376  fCandidateVariables[26] = cptrack->Py();
1377  fCandidateVariables[27] = cptrack->Pz();
1378  }else{
1379  fCandidateVariables[22] = cptrack->Px();
1380  fCandidateVariables[23] = cptrack->Py();
1381  fCandidateVariables[24] = cptrack->Pz();
1382  fCandidateVariables[25] = cntrack->Px();
1383  fCandidateVariables[26] = cntrack->Py();
1384  fCandidateVariables[27] = cntrack->Pz();
1385  }
1386 
1387  AliAODMCParticle *mclc = 0;
1388  AliAODMCParticle *mcele = 0;
1389  AliAODMCParticle *mcv0 = 0;
1390  Int_t mclablc = 0;
1391  Int_t mcpdgele_array[100];
1392  Int_t mcpdgv0_array[100];
1393  Int_t mclabelele_array[100];
1394  Int_t mclabelv0_array[100];
1395  Int_t mcngen_ele=-9999;
1396  Int_t mcngen_v0=-9999;
1397 
1398  if(fUseMCInfo && mcArray){
1399 
1400  mclablc = MatchToMC(elobj,mcArray,mcpdgele_array, mcpdgv0_array,mclabelele_array,mclabelv0_array,mcngen_ele,mcngen_v0);
1401 
1402  if(mclablc>-1){
1403  mclc = (AliAODMCParticle*) mcArray->At(mclablc);
1404  if(mclabelele_array[0]>=0)
1405  mcele = (AliAODMCParticle*) mcArray->At(mclabelele_array[0]);
1406  if(mclabelv0_array[0]>=0)
1407  mcv0 = (AliAODMCParticle*) mcArray->At(mclabelv0_array[0]);
1408  if(mclc){
1409  fCandidateVariables[28] = mclc->GetPdgCode();
1410  fCandidateVariables[29] = mclc->Label();
1411  fCandidateVariables[43] = mclc->Px();
1412  fCandidateVariables[44] = mclc->Py();
1413  fCandidateVariables[45] = mclc->Pz();
1414  }
1415  if(mcele){
1416  fCandidateVariables[46] = mcele->Px();
1417  fCandidateVariables[47] = mcele->Py();
1418  fCandidateVariables[48] = mcele->Pz();
1419  }
1420  if(mcv0){
1421  fCandidateVariables[49] = mcv0->Px();
1422  fCandidateVariables[50] = mcv0->Py();
1423  fCandidateVariables[51] = mcv0->Pz();
1424  }
1425  }
1426  fCandidateVariables[30] = mcpdgele_array[1];
1427  fCandidateVariables[31] = mcpdgv0_array[1];
1428  fCandidateVariables[33] = mcpdgele_array[0];
1429  fCandidateVariables[39] = mcpdgele_array[2];
1430  fCandidateVariables[40] = mcpdgv0_array[2];
1431  fCandidateVariables[41] = mcngen_ele;
1432  fCandidateVariables[42] = mcngen_v0;
1433  }
1434  fCandidateVariables[32] = 0;
1435 
1436  if(fAnalCuts->GetIsUsePID())
1437  {
1438  Double_t nSigmaTPCpr_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kProton);
1439  Double_t nSigmaTOFpr_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trk,AliPID::kProton);
1440  Double_t nSigmaTPCka_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kKaon);
1441  Double_t nSigmaTOFka_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trk,AliPID::kKaon);
1442  Double_t nSigmaTPCpi_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kPion);
1443  Double_t nSigmaTOFpi_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trk,AliPID::kPion);
1444  fCandidateVariables[34] = nSigmaTPCpr_etrk;
1445  fCandidateVariables[35] = nSigmaTOFpr_etrk;
1446  fCandidateVariables[36] = nSigmaTPCka_etrk;
1447  fCandidateVariables[37] = nSigmaTOFka_etrk;
1448  fCandidateVariables[52] = nSigmaTPCpi_etrk;
1449  fCandidateVariables[53] = nSigmaTOFpi_etrk;
1450  }
1451  fCandidateVariables[38] = v0->MassK0Short();
1452 
1453  fCandidateVariables[54] = fVtx1->GetX();
1454  fCandidateVariables[55] = fVtx1->GetY();
1455  fCandidateVariables[56] = fVtx1->GetZ();
1456  fCandidateVariables[57] = v0->DecayVertexV0X();
1457  fCandidateVariables[58] = v0->DecayVertexV0Y();
1458  fCandidateVariables[59] = v0->DecayVertexV0Z();
1459 
1460  Double_t lDcaPosToPrimVertex = v0->DcaPosToPrimVertex();
1461  Double_t lDcaNegToPrimVertex = v0->DcaNegToPrimVertex();
1462  if(!anti_lambda_flag){
1463  fCandidateVariables[60] = lDcaPosToPrimVertex;
1464  fCandidateVariables[61] = lDcaNegToPrimVertex;
1465  }else{
1466  fCandidateVariables[60] = lDcaNegToPrimVertex;
1467  fCandidateVariables[61] = lDcaPosToPrimVertex;
1468  }
1469  fCandidateVariables[62] = v0->DcaV0Daughters();
1470  Double_t posVtx[3] = {0.,0.,0.};
1471  fVtx1->GetXYZ(posVtx);
1472  fCandidateVariables[63] = v0->CosPointingAngle(posVtx);
1473  Double_t ptotlam = TMath::Sqrt(pow(v0->Px(),2)+pow(v0->Py(),2)+pow(v0->Pz(),2));
1474  fCandidateVariables[64] = v0->DecayLengthV0(posVtx)*1.1157/ptotlam;
1475  fCandidateVariables[65] = v0->MassK0Short();
1476 
1477  if(trk) fCandidateVariables[68] = trk->GetITSClusterMap();
1478  if(cptrack) fCandidateVariables[69] = cptrack->GetITSClusterMap();
1479  if(cntrack) fCandidateVariables[70] = cntrack->GetITSClusterMap();
1480 
1484 
1485 
1486  if(fWriteVariableTree)
1487  fVariablesTree->Fill();
1488 
1489  Double_t cont[3];
1490  cont[0] = elobj->InvMass(2,pdgdg);
1491  cont[1] = elobj->Pt();
1492  cont[2] = fCentrality;
1493  fHistoEleLambdaMass->Fill(cont);
1494  Double_t cont2[3];
1495  cont2[0] = elobj->InvMass(2,pdgdg);
1496  cont2[1] = trk->Pt();
1497  cont2[2] = fCentrality;
1498  Double_t cont_eleptvseta[3];
1499  cont_eleptvseta[0] = trk->Pt();
1500  cont_eleptvseta[1] = trk->Eta();
1501  cont_eleptvseta[2] = fCentrality;
1502 
1503  Double_t cont_eleptvslambdapt[3];
1504  cont_eleptvslambdapt[0] = trk->Pt();
1505  cont_eleptvslambdapt[1] = v0->Pt();
1506  cont_eleptvslambdapt[2] = fCentrality;
1507 
1508  Double_t cont_eleptvsd0[3];
1509  cont_eleptvsd0[0] = trk->Pt();
1510  cont_eleptvsd0[1] = elobj->Getd0Prong(0)*trk->Charge();
1511  cont_eleptvsd0[2] = fCentrality;
1512 
1513  Double_t cont_eleptvsv0dl[3];
1514  cont_eleptvsv0dl[0] = trk->Pt();
1515  cont_eleptvsv0dl[1] = v0->DecayLengthV0(posVtx)*1.115683/ptotlam;
1516  cont_eleptvsv0dl[2] = fCentrality;
1517 
1518  Double_t cont_elelamptvsv0dl[3];
1519  cont_elelamptvsv0dl[0] = elobj->Pt();
1520  cont_elelamptvsv0dl[1] = v0->DecayLengthV0(posVtx)*1.115683/ptotlam;
1521  cont_elelamptvsv0dl[2] = fCentrality;
1522 
1523 
1524  Double_t cont_eleptvsv0dca[3];
1525  cont_eleptvsv0dca[0] = trk->Pt();
1526  cont_eleptvsv0dca[1] = v0->DcaV0ToPrimVertex();
1527  cont_eleptvsv0dca[2] = fCentrality;
1528 
1529 
1531  {
1532 
1533  if((trk->Charge()>0 && !anti_lambda_flag) || (trk->Charge()<0 && anti_lambda_flag)){
1534  fHistoEleLambdaMassRS->Fill(cont);
1535  fHistoEleLambdaMassvsElePtRS->Fill(cont2);
1536  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtRS1->Fill(cont2);
1537  else fHistoEleLambdaMassvsElePtRS2->Fill(cont2);
1538  if(cont[0]<2.3){
1539  fHistoElePtRS->Fill(trk->Pt(),fCentrality);
1540  fHistoElePtvsEtaRS->Fill(cont_eleptvseta);
1541  fHistoElePtvsLambdaPtRS->Fill(cont_eleptvslambdapt);
1542  fHistoElePtvsd0RS->Fill(cont_eleptvsd0);
1543 
1544  fHistoElePtvsV0dlRS->Fill(cont_eleptvsv0dl);
1545  if(trk->Charge()>0) fHistoElePtvsV0dlRS1->Fill(cont_eleptvsv0dl);
1546  else fHistoElePtvsV0dlRS2->Fill(cont_eleptvsv0dl);
1547 
1548  fHistoEleLambdaPtvsV0dlRS->Fill(cont_elelamptvsv0dl);
1549  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlRS1->Fill(cont_elelamptvsv0dl);
1550  else fHistoEleLambdaPtvsV0dlRS2->Fill(cont_elelamptvsv0dl);
1551 
1552  fHistoElePtvsV0dcaRS->Fill(cont_eleptvsv0dca);
1553  if(trk->Charge()>0) fHistoElePtvsV0dcaRS1->Fill(cont_eleptvsv0dca);
1554  else fHistoElePtvsV0dcaRS2->Fill(cont_eleptvsv0dca);
1555 
1556  for(Int_t ih=0;ih<17;ih++){
1557  Double_t cont_eleptvscutvars[3];
1558  cont_eleptvscutvars[0] = trk->Pt();
1559  cont_eleptvscutvars[2] = fCentrality;
1560 
1561  if(ih==0){
1562  cont_eleptvscutvars[1] = trk->GetTPCNcls();
1563  }else if(ih==1){
1564  cont_eleptvscutvars[1] = trk->GetTPCsignalN();
1565  }else if(ih==2){
1566  cont_eleptvscutvars[1] = nSigmaTPCele;
1567  }else if(ih==3){
1568  cont_eleptvscutvars[1] = nSigmaTOFele;
1569  }else if(ih==4){
1570  cont_eleptvscutvars[1] = trk->Eta();
1571  }else if(ih==5){
1572  cont_eleptvscutvars[1] = trk->GetITSNcls();
1573  }else if(ih==6){
1574  if(!anti_lambda_flag)
1575  cont_eleptvscutvars[1] = v0->MassLambda();
1576  else
1577  cont_eleptvscutvars[1] = v0->MassAntiLambda();
1578  }else if(ih==7){
1579  Double_t lPosV0[3];
1580  lPosV0[0] = v0->DecayVertexV0X();
1581  lPosV0[1] = v0->DecayVertexV0Y();
1582  lPosV0[2] = v0->DecayVertexV0Z();
1583  cont_eleptvscutvars[1] = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
1584  }else if(ih==8){
1585  cont_eleptvscutvars[1] = v0->DcaV0Daughters();
1586  }else if(ih==9){
1587  if(!anti_lambda_flag)
1588  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
1589  else
1590  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
1591  }else if(ih==10){
1592  if(!anti_lambda_flag)
1593  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
1594  else
1595  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
1596  }else if(ih==11){
1597  cont_eleptvscutvars[1] = v0->CosPointingAngle(posVtx);
1598  }else if(ih==12){
1599  cont_eleptvscutvars[1] = v0->MassK0Short();
1600  }else if(ih==13){
1601  cont_eleptvscutvars[1] = nSigmaTPCv0pr;
1602  }else if(ih==14){
1603  cont_eleptvscutvars[1] = nSigmaTPCv0pi;
1604  }else if(ih==15){
1605  cont_eleptvscutvars[1] = v0->Eta();
1606  }else if(ih==16){
1607  Double_t v0px = elobj->PxProng(1);
1608  Double_t v0py = elobj->PyProng(1);
1609  Double_t v0pz = elobj->PzProng(1);
1610  Double_t epx = elobj->PxProng(0);
1611  Double_t epy = elobj->PyProng(0);
1612  Double_t epz = elobj->PzProng(0);
1613  cont_eleptvscutvars[1] = acos((v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz));
1614  }else{
1615  cont_eleptvscutvars[1] = -9999.;
1616  }
1617 
1618  fHistoElePtvsCutVarsRS[ih]->Fill(cont_eleptvscutvars);
1619  }
1620  }
1621  }else if((trk->Charge()<0 && !anti_lambda_flag) || (trk->Charge()>0 && anti_lambda_flag)){
1622  fHistoEleLambdaMassWS->Fill(cont);
1623  fHistoEleLambdaMassvsElePtWS->Fill(cont2);
1624  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtWS1->Fill(cont2);
1625  else fHistoEleLambdaMassvsElePtWS2->Fill(cont2);
1626  if(cont[0]<2.3){
1627  fHistoElePtWS->Fill(trk->Pt(),fCentrality);
1628  fHistoElePtvsEtaWS->Fill(cont_eleptvseta);
1629  fHistoElePtvsLambdaPtWS->Fill(cont_eleptvslambdapt);
1630  fHistoElePtvsd0WS->Fill(cont_eleptvsd0);
1631 
1632  fHistoElePtvsV0dlWS->Fill(cont_eleptvsv0dl);
1633  if(trk->Charge()>0) fHistoElePtvsV0dlWS1->Fill(cont_eleptvsv0dl);
1634  else fHistoElePtvsV0dlWS2->Fill(cont_eleptvsv0dl);
1635 
1636  fHistoEleLambdaPtvsV0dlWS->Fill(cont_elelamptvsv0dl);
1637  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlWS1->Fill(cont_elelamptvsv0dl);
1638  else fHistoEleLambdaPtvsV0dlWS2->Fill(cont_elelamptvsv0dl);
1639 
1640  fHistoElePtvsV0dcaWS->Fill(cont_eleptvsv0dca);
1641  if(trk->Charge()>0) fHistoElePtvsV0dcaWS1->Fill(cont_eleptvsv0dca);
1642  else fHistoElePtvsV0dcaWS2->Fill(cont_eleptvsv0dca);
1643 
1644  for(Int_t ih=0;ih<17;ih++){
1645  Double_t cont_eleptvscutvars[3];
1646  cont_eleptvscutvars[0] = trk->Pt();
1647  cont_eleptvscutvars[2] = fCentrality;
1648 
1649  if(ih==0){
1650  cont_eleptvscutvars[1] = trk->GetTPCNcls();
1651  }else if(ih==1){
1652  cont_eleptvscutvars[1] = trk->GetTPCsignalN();
1653  }else if(ih==2){
1654  cont_eleptvscutvars[1] = nSigmaTPCele;
1655  }else if(ih==3){
1656  cont_eleptvscutvars[1] = nSigmaTOFele;
1657  }else if(ih==4){
1658  cont_eleptvscutvars[1] = trk->Eta();
1659  }else if(ih==5){
1660  cont_eleptvscutvars[1] = trk->GetITSNcls();
1661  }else if(ih==6){
1662  if(!anti_lambda_flag)
1663  cont_eleptvscutvars[1] = v0->MassLambda();
1664  else
1665  cont_eleptvscutvars[1] = v0->MassAntiLambda();
1666  }else if(ih==7){
1667  Double_t lPosV0[3];
1668  lPosV0[0] = v0->DecayVertexV0X();
1669  lPosV0[1] = v0->DecayVertexV0Y();
1670  lPosV0[2] = v0->DecayVertexV0Z();
1671  cont_eleptvscutvars[1] = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
1672  }else if(ih==8){
1673  cont_eleptvscutvars[1] = v0->DcaV0Daughters();
1674  }else if(ih==9){
1675  if(!anti_lambda_flag)
1676  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
1677  else
1678  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
1679  }else if(ih==10){
1680  if(!anti_lambda_flag)
1681  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
1682  else
1683  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
1684  }else if(ih==11){
1685  cont_eleptvscutvars[1] = v0->CosPointingAngle(posVtx);
1686  }else if(ih==12){
1687  cont_eleptvscutvars[1] = v0->MassK0Short();
1688  }else if(ih==13){
1689  cont_eleptvscutvars[1] = nSigmaTPCv0pr;
1690  }else if(ih==14){
1691  cont_eleptvscutvars[1] = nSigmaTPCv0pi;
1692  }else if(ih==15){
1693  cont_eleptvscutvars[1] = v0->Eta();
1694  }else if(ih==16){
1695  Double_t v0px = elobj->PxProng(1);
1696  Double_t v0py = elobj->PyProng(1);
1697  Double_t v0pz = elobj->PzProng(1);
1698  Double_t epx = elobj->PxProng(0);
1699  Double_t epy = elobj->PyProng(0);
1700  Double_t epz = elobj->PzProng(0);
1701  cont_eleptvscutvars[1] = acos((v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz));
1702  }else{
1703  cont_eleptvscutvars[1] = -9999.;
1704  }
1705 
1706  fHistoElePtvsCutVarsWS[ih]->Fill(cont_eleptvscutvars);
1707  }
1708  }
1709  }
1710 
1711  if(fUseMCInfo){
1712  if(mclc){
1713  Int_t pdgcode = mclc->GetPdgCode();
1714  Double_t cont_mclc[3];
1715  cont_mclc[0] = mclc->Pt();
1716  cont_mclc[1] = mclc->Y();
1717  cont_mclc[2] = fCentrality;
1718  Double_t cont_mcele[3];
1719  cont_mcele[0] = mcele->Pt();
1720  cont_mcele[1] = mcele->Eta();
1721  cont_mcele[2] = fCentrality;
1722 
1723  if(abs(pdgcode)==4122 && abs(mcpdgele_array[1])==4122 && abs(mcpdgv0_array[1])==4122){
1724  cont2[1] = mcele->Pt();
1725  fHistoEleLambdaMassMCS->Fill(cont);
1726  fHistoEleLambdaMassvsElePtMCS->Fill(cont2);
1727  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtMCS1->Fill(cont2);
1728  else fHistoEleLambdaMassvsElePtMCS2->Fill(cont2);
1729  if(cont[0]<2.3){
1730  fHistoElePtMCS->Fill(trk->Pt(),fCentrality);
1731  fHistoElePtvsEtaMCS->Fill(cont_eleptvseta);
1732  fHistoElePtvsLambdaPtMCS->Fill(cont_eleptvslambdapt);
1733  fHistoElePtvsd0MCS->Fill(cont_eleptvsd0);
1734 
1735  fHistoElePtvsV0dlMCS->Fill(cont_eleptvsv0dl);
1736  if(trk->Charge()>0) fHistoElePtvsV0dlMCS1->Fill(cont_eleptvsv0dl);
1737  else fHistoElePtvsV0dlMCS2->Fill(cont_eleptvsv0dl);
1738 
1739  fHistoElePtvsV0dcaMCS->Fill(cont_eleptvsv0dca);
1740  if(trk->Charge()>0) fHistoElePtvsV0dcaMCS1->Fill(cont_eleptvsv0dca);
1741  else fHistoElePtvsV0dcaMCS2->Fill(cont_eleptvsv0dca);
1742 
1743  fHistoEleLambdaPtvsV0dlMCS->Fill(cont_elelamptvsv0dl);
1744  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlMCS1->Fill(cont_elelamptvsv0dl);
1745  else fHistoEleLambdaPtvsV0dlMCS2->Fill(cont_elelamptvsv0dl);
1746 
1747  fHistoLcMCS->Fill(cont_mclc);
1748  if(trk->Charge()>0) fHistoLcMCS1->Fill(cont_mclc);
1749  else fHistoLcMCS2->Fill(cont_mclc);
1750 
1751  fHistoLcElectronMCS->Fill(cont_mcele);
1752  if(trk->Charge()>0) fHistoLcElectronMCS1->Fill(cont_mcele);
1753  else fHistoLcElectronMCS2->Fill(cont_mcele);
1754 
1755  fHistoResponseElePt->Fill(mcele->Pt(),trk->Pt());
1756  if(trk->Charge()>0) fHistoResponseElePt1->Fill(mcele->Pt(),trk->Pt());
1757  else fHistoResponseElePt2->Fill(mcele->Pt(),trk->Pt());
1758  fHistoResponseEleLambdaPt->Fill(mclc->Pt(),elobj->Pt());
1759  if(trk->Charge()>0) fHistoResponseEleLambdaPt1->Fill(mclc->Pt(),trk->Pt());
1760  else fHistoResponseEleLambdaPt2->Fill(mclc->Pt(),trk->Pt());
1761 
1762  Double_t cont_eleptvslambdaptvslcpt[4];
1763  cont_eleptvslambdaptvslcpt[0] = cont_eleptvslambdapt[0];
1764  cont_eleptvslambdaptvslcpt[1] = cont_eleptvslambdapt[1];
1765  cont_eleptvslambdaptvslcpt[2] = mclc->Pt();
1766  cont_eleptvslambdaptvslcpt[3] = cont_eleptvslambdapt[2];
1767  fHistoElePtvsLambdaPtvsLcPtMCS->Fill(cont_eleptvslambdaptvslcpt);
1768 
1769  Double_t cont_allpt[4];
1770  cont_allpt[0] = mclc->Pt();
1771  cont_allpt[1] = elobj->Pt();
1772  cont_allpt[2] = trk->Pt();
1773  cont_allpt[3] = v0->Pt();
1774  fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt->Fill(cont_allpt);
1775 
1776  Int_t labmotherlc = mclc->GetMother();
1777  if(labmotherlc>=0){
1778  AliAODMCParticle *motherlc = (AliAODMCParticle*)mcArray->At(labmotherlc);
1779  Int_t pdgmotherlc = motherlc->GetPdgCode();
1780  if(TMath::Abs(pdgmotherlc)==511||TMath::Abs(pdgmotherlc)==521||TMath::Abs(pdgmotherlc)==5122||TMath::Abs(pdgmotherlc)==5132||TMath::Abs(pdgmotherlc)==5232||TMath::Abs(pdgmotherlc)==5332){
1781  fHistoElePtvsd0BFeeddownMCS->Fill(cont_eleptvsd0);
1782  }else{
1783  fHistoElePtvsd0PromptMCS->Fill(cont_eleptvsd0);
1784  }
1785  }else{
1786  fHistoElePtvsd0PromptMCS->Fill(cont_eleptvsd0);
1787  }
1788 
1789  for(Int_t ih=0;ih<17;ih++){
1790  Double_t cont_eleptvscutvars[3];
1791  cont_eleptvscutvars[0] = trk->Pt();
1792  cont_eleptvscutvars[2] = fCentrality;
1793 
1794  if(ih==0){
1795  cont_eleptvscutvars[1] = trk->GetTPCNcls();
1796  }else if(ih==1){
1797  cont_eleptvscutvars[1] = trk->GetTPCsignalN();
1798  }else if(ih==2){
1799  cont_eleptvscutvars[1] = nSigmaTPCele;
1800  }else if(ih==3){
1801  cont_eleptvscutvars[1] = nSigmaTOFele;
1802  }else if(ih==4){
1803  cont_eleptvscutvars[1] = trk->Eta();
1804  }else if(ih==5){
1805  cont_eleptvscutvars[1] = trk->GetITSNcls();
1806  }else if(ih==6){
1807  if(!anti_lambda_flag)
1808  cont_eleptvscutvars[1] = v0->MassLambda();
1809  else
1810  cont_eleptvscutvars[1] = v0->MassAntiLambda();
1811  }else if(ih==7){
1812  Double_t lPosV0[3];
1813  lPosV0[0] = v0->DecayVertexV0X();
1814  lPosV0[1] = v0->DecayVertexV0Y();
1815  lPosV0[2] = v0->DecayVertexV0Z();
1816  cont_eleptvscutvars[1] = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
1817  }else if(ih==8){
1818  cont_eleptvscutvars[1] = v0->DcaV0Daughters();
1819  }else if(ih==9){
1820  if(!anti_lambda_flag)
1821  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
1822  else
1823  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
1824  }else if(ih==10){
1825  if(!anti_lambda_flag)
1826  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
1827  else
1828  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
1829  }else if(ih==11){
1830  cont_eleptvscutvars[1] = v0->CosPointingAngle(posVtx);
1831  }else if(ih==12){
1832  cont_eleptvscutvars[1] = v0->MassK0Short();
1833  }else if(ih==13){
1834  cont_eleptvscutvars[1] = nSigmaTPCv0pr;
1835  }else if(ih==14){
1836  cont_eleptvscutvars[1] = nSigmaTPCv0pi;
1837  }else if(ih==15){
1838  cont_eleptvscutvars[1] = v0->Eta();
1839  }else if(ih==16){
1840  Double_t v0px = elobj->PxProng(1);
1841  Double_t v0py = elobj->PyProng(1);
1842  Double_t v0pz = elobj->PzProng(1);
1843  Double_t epx = elobj->PxProng(0);
1844  Double_t epy = elobj->PyProng(0);
1845  Double_t epz = elobj->PzProng(0);
1846  cont_eleptvscutvars[1] = acos((v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz));
1847  }else{
1848  cont_eleptvscutvars[1] = -9999.;
1849  }
1850 
1851  fHistoElePtvsCutVarsMCS[ih]->Fill(cont_eleptvscutvars);
1852  }
1853  }
1854  }
1855  if(abs(pdgcode)==4132 && abs(mcpdgele_array[1])==4132 && abs(mcpdgv0_array[1])==3312){
1858  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtFeeddownXic0MCS1->Fill(cont2);
1860  if(cont[0]<2.3){
1861  fHistoFeedDownXic0MCS->Fill(cont_mclc);
1862  if(trk->Charge()>0) fHistoFeedDownXic0MCS1->Fill(cont_mclc);
1863  else fHistoFeedDownXic0MCS2->Fill(cont_mclc);
1864 
1865  fHistoElectronFeedDownXic0MCS1->Fill(cont_mcele);
1866  if(trk->Charge()>0) fHistoElectronFeedDownXic0MCS1->Fill(cont_mcele);
1867  else fHistoElectronFeedDownXic0MCS2->Fill(cont_mcele);
1868 
1869  fHistoElePtvsV0dlFeedDownXic0MCS->Fill(cont_eleptvsv0dl);
1870  if(trk->Charge()>0) fHistoElePtvsV0dlFeedDownXic0MCS1->Fill(cont_eleptvsv0dl);
1871  else fHistoElePtvsV0dlFeedDownXic0MCS2->Fill(cont_eleptvsv0dl);
1872 
1873  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS->Fill(cont_elelamptvsv0dl);
1874  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1->Fill(cont_elelamptvsv0dl);
1875  else fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2->Fill(cont_elelamptvsv0dl);
1876 
1877  fHistoElePtvsV0dcaFeedDownXic0MCS->Fill(cont_eleptvsv0dca);
1878  if(trk->Charge()>0) fHistoElePtvsV0dcaFeedDownXic0MCS->Fill(cont_eleptvsv0dca);
1879  else fHistoElePtvsV0dcaFeedDownXic0MCS->Fill(cont_eleptvsv0dca);
1880 
1881  fHistoResponseEleLambdaPtFeeddownXic0->Fill(mclc->Pt(),elobj->Pt());
1882  if(trk->Charge()>0) fHistoResponseEleLambdaPtFeeddownXic01->Fill(mclc->Pt(),trk->Pt());
1883  else fHistoResponseEleLambdaPtFeeddownXic02->Fill(mclc->Pt(),trk->Pt());
1884 
1885  fHistoElePtFeeddownXic0MCS->Fill(trk->Pt(),fCentrality);
1886  fHistoElePtvsEtaFeeddownXic0MCS->Fill(cont_eleptvseta);
1887  fHistoElePtvsLambdaPtFeeddownXic0MCS->Fill(cont_eleptvslambdapt);
1888  }
1889  }
1890  if(abs(pdgcode)==4232 && abs(mcpdgele_array[1])==4232 && abs(mcpdgv0_array[1])==3322){
1893  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1->Fill(cont2);
1895  if(cont[0]<2.3){
1896  fHistoFeedDownXicPlusMCS->Fill(cont_mclc);
1897  if(trk->Charge()>0) fHistoFeedDownXicPlusMCS1->Fill(cont_mclc);
1898  else fHistoFeedDownXicPlusMCS2->Fill(cont_mclc);
1899 
1900  fHistoElectronFeedDownXicPlusMCS1->Fill(cont_mcele);
1901  if(trk->Charge()>0) fHistoElectronFeedDownXicPlusMCS1->Fill(cont_mcele);
1902  else fHistoElectronFeedDownXicPlusMCS2->Fill(cont_mcele);
1903 
1904  fHistoElePtvsV0dlFeedDownXicPlusMCS->Fill(cont_eleptvsv0dl);
1905  if(trk->Charge()>0) fHistoElePtvsV0dlFeedDownXicPlusMCS1->Fill(cont_eleptvsv0dl);
1906  else fHistoElePtvsV0dlFeedDownXicPlusMCS2->Fill(cont_eleptvsv0dl);
1907 
1908  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS->Fill(cont_elelamptvsv0dl);
1909  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1->Fill(cont_elelamptvsv0dl);
1910  else fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2->Fill(cont_elelamptvsv0dl);
1911 
1912  fHistoElePtvsV0dcaFeedDownXicPlusMCS->Fill(cont_eleptvsv0dca);
1913  if(trk->Charge()>0) fHistoElePtvsV0dcaFeedDownXicPlusMCS->Fill(cont_eleptvsv0dca);
1914  else fHistoElePtvsV0dcaFeedDownXicPlusMCS->Fill(cont_eleptvsv0dca);
1915 
1916  fHistoResponseEleLambdaPtFeeddownXicPlus->Fill(mclc->Pt(),elobj->Pt());
1917  if(trk->Charge()>0) fHistoResponseEleLambdaPtFeeddownXicPlus1->Fill(mclc->Pt(),trk->Pt());
1918  else fHistoResponseEleLambdaPtFeeddownXicPlus2->Fill(mclc->Pt(),trk->Pt());
1919 
1920  fHistoElePtFeeddownXicPlusMCS->Fill(trk->Pt(),fCentrality);
1921  fHistoElePtvsEtaFeeddownXicPlusMCS->Fill(cont_eleptvseta);
1922  fHistoElePtvsLambdaPtFeeddownXicPlusMCS->Fill(cont_eleptvslambdapt);
1923  }
1924  }
1925  }
1926  }
1927  }
1928 
1930  {
1931  if((trk->Charge()>0 && !anti_lambda_flag) || (trk->Charge()<0 && anti_lambda_flag)){
1932  fHistoEleLambdaMassRSSide->Fill(cont);
1933  fHistoEleLambdaMassvsElePtRSSide->Fill(cont2);
1934  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtRSSide1->Fill(cont2);
1935  else fHistoEleLambdaMassvsElePtRSSide2->Fill(cont2);
1936 
1937  fHistoElePtvsV0dlRSSide->Fill(cont_eleptvsv0dl);
1938  if(trk->Charge()>0) fHistoElePtvsV0dlRSSide1->Fill(cont_eleptvsv0dl);
1939  else fHistoElePtvsV0dlRSSide2->Fill(cont_eleptvsv0dl);
1940 
1941  fHistoEleLambdaPtvsV0dlRSSide->Fill(cont_elelamptvsv0dl);
1942  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlRSSide1->Fill(cont_elelamptvsv0dl);
1943  else fHistoEleLambdaPtvsV0dlRSSide2->Fill(cont_elelamptvsv0dl);
1944 
1945  fHistoElePtvsV0dcaRSSide->Fill(cont_eleptvsv0dca);
1946  if(trk->Charge()>0) fHistoElePtvsV0dcaRSSide1->Fill(cont_eleptvsv0dca);
1947  else fHistoElePtvsV0dcaRSSide2->Fill(cont_eleptvsv0dca);
1948 
1949  }else if((trk->Charge()<0 && !anti_lambda_flag) || (trk->Charge()>0 && anti_lambda_flag)){
1950  fHistoEleLambdaMassWSSide->Fill(cont);
1951  fHistoEleLambdaMassvsElePtWSSide->Fill(cont2);
1952  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtWSSide1->Fill(cont2);
1953  else fHistoEleLambdaMassvsElePtWSSide2->Fill(cont2);
1954 
1955  fHistoElePtvsV0dlWSSide->Fill(cont_eleptvsv0dl);
1956  if(trk->Charge()>0) fHistoElePtvsV0dlWSSide1->Fill(cont_eleptvsv0dl);
1957  else fHistoElePtvsV0dlWSSide2->Fill(cont_eleptvsv0dl);
1958 
1959  fHistoEleLambdaPtvsV0dlWSSide->Fill(cont_elelamptvsv0dl);
1960  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlWSSide1->Fill(cont_elelamptvsv0dl);
1961  else fHistoEleLambdaPtvsV0dlWSSide2->Fill(cont_elelamptvsv0dl);
1962 
1963  fHistoElePtvsV0dcaWSSide->Fill(cont_eleptvsv0dca);
1964  if(trk->Charge()>0) fHistoElePtvsV0dcaWSSide1->Fill(cont_eleptvsv0dca);
1965  else fHistoElePtvsV0dcaWSSide2->Fill(cont_eleptvsv0dca);
1966  }
1967  }
1968 
1969  return;
1970 }
1971 
1973 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillMixROOTObjects(TLorentzVector *trke, TLorentzVector *v0, Double_t *v0info, Int_t chargepr)
1974 {
1978  if(!trke) return;
1979  if(!v0) return;
1980 
1981  for(Int_t i=0;i<73;i++){
1982  fCandidateVariables[i] = -9999.;
1983  }
1984 
1985 
1986  Double_t pxe = trke->Px();
1987  Double_t pye = trke->Py();
1988  Double_t pze = trke->Pz();
1989  Double_t mome = sqrt(pxe*pxe+pye*pye+pze*pze);
1990  Double_t Ee = sqrt(mome*mome+0.000510998928*0.000510998928);
1991 
1992  Double_t pxv = v0->Px();
1993  Double_t pyv = v0->Py();
1994  Double_t pzv = v0->Pz();
1995  Double_t momv = sqrt(pxv*pxv+pyv*pyv+pzv*pzv);
1996  Double_t Ev = sqrt(momv*momv+1.115683*1.115683);
1997 
1998  Double_t cosoa = (pxe*pxv+pye*pyv+pze*pzv)/mome/momv;
1999 
2000  Double_t pxsum = pxe + pxv;
2001  Double_t pysum = pye + pyv;
2002  Double_t pzsum = pze + pzv;
2003  Double_t Esum = Ee + Ev;
2004 
2005  Double_t mel = sqrt(Esum*Esum-pxsum*pxsum-pysum*pysum-pzsum*pzsum);
2006 
2008  UInt_t pdgdg[2]={11,3122};
2009  fCandidateVariables[ 1] = mel;
2010  fCandidateVariables[ 2] = sqrt(pxsum*pxsum+pysum*pysum);
2011  fCandidateVariables[ 3] = pxsum;
2012  fCandidateVariables[ 4] = pysum;
2013  fCandidateVariables[ 5] = pzsum;
2014  fCandidateVariables[ 6] = pxe;
2015  fCandidateVariables[ 7] = pye;
2016  fCandidateVariables[ 8] = pze;
2017  fCandidateVariables[ 9] = pxv;
2018  fCandidateVariables[10] = pyv;
2019  fCandidateVariables[11] = pzv;
2020  if(chargepr>0){
2021  fCandidateVariables[12] = 0;
2022  fCandidateVariables[13] = v0->M();
2023  fCandidateVariables[14] = 0.;
2024  }else{
2025  fCandidateVariables[12] = 1;
2026  fCandidateVariables[13] = 0;
2027  fCandidateVariables[14] = v0->M();
2028  }
2029 
2030  fCandidateVariables[21] = trke->T();
2031 
2032  fCandidateVariables[32] = 1;
2033 
2034  fCandidateVariables[54] = fVtx1->GetX();
2035  fCandidateVariables[55] = fVtx1->GetY();
2036  fCandidateVariables[56] = fVtx1->GetZ();
2037  fCandidateVariables[64] = v0info[0];
2038 
2041 
2042 
2043  if(fWriteVariableTree)
2044  fVariablesTree->Fill();
2045 
2046  if(cosoa>0. && fAnalCuts->IsPeakRegion(v0))
2047  {
2048  Double_t cont[3];
2049  cont[0] = mel;
2050  cont[1] = sqrt(pxsum*pxsum+pysum*pysum);
2051  cont[2] = fCentrality;
2052  fHistoEleLambdaMass->Fill(cont);
2053  Double_t cont2[3];
2054  cont2[0] = mel;
2055  cont2[1] = sqrt(pxe*pxe+pye*pye);
2056  cont2[2] = fCentrality;
2057  Double_t cont_eleptvseta[3];
2058  cont_eleptvseta[0] = trke->Pt();
2059  cont_eleptvseta[1] = trke->Eta();
2060  cont_eleptvseta[2] = fCentrality;
2061 
2062  Double_t cont_eleptvslambdapt[3];
2063  cont_eleptvslambdapt[0] = trke->Pt();
2064  cont_eleptvslambdapt[1] = v0->Pt();
2065  cont_eleptvslambdapt[2] = fCentrality;
2066 
2067  Double_t cont_eleptvsd0[3];
2068  cont_eleptvsd0[0] = trke->Pt();
2069  cont_eleptvsd0[1] = 0.;
2070  cont_eleptvsd0[2] = fCentrality;
2071 
2072  Double_t cont_eleptvsv0dl[3];
2073  cont_eleptvsv0dl[0] = trke->Pt();
2074  cont_eleptvsv0dl[1] = v0info[0];
2075  cont_eleptvsv0dl[2] = fCentrality;
2076 
2077  Double_t cont_eleptvsv0dca[3];
2078  cont_eleptvsv0dca[0] = trke->Pt();
2079  cont_eleptvsv0dca[1] = v0info[1];
2080  cont_eleptvsv0dca[2] = fCentrality;
2081 
2082  Double_t cont_elelamptvsv0dl[3];
2083  cont_elelamptvsv0dl[0] = sqrt(pxsum*pxsum+pysum*pysum);
2084  cont_elelamptvsv0dl[1] = v0info[0];
2085  cont_elelamptvsv0dl[2] = fCentrality;
2086 
2087 
2088  if(((int)trke->T())*chargepr>0){
2089  fHistoEleLambdaMassRSMix->Fill(cont);
2090  fHistoEleLambdaMassvsElePtRSMix->Fill(cont2);
2091  if(trke->T()>0) fHistoEleLambdaMassvsElePtRSMix1->Fill(cont2);
2092  else fHistoEleLambdaMassvsElePtRSMix2->Fill(cont2);
2093  if(cont[0]<2.3){
2094  fHistoElePtRSMix->Fill(trke->Pt(),fCentrality);
2095  fHistoElePtvsEtaRSMix->Fill(cont_eleptvseta);
2096  fHistoElePtvsLambdaPtRSMix->Fill(cont_eleptvslambdapt);
2097  fHistoElePtvsd0RSMix->Fill(cont_eleptvsd0);
2098 
2099  fHistoElePtvsV0dlRSMix->Fill(cont_eleptvsv0dl);
2100  if(trke->T()>0) fHistoElePtvsV0dlRSMix1->Fill(cont_eleptvsv0dl);
2101  else fHistoElePtvsV0dlRSMix2->Fill(cont_eleptvsv0dl);
2102 
2103  fHistoEleLambdaPtvsV0dlRSMix->Fill(cont_elelamptvsv0dl);
2104  if(trke->T()>0) fHistoEleLambdaPtvsV0dlRSMix1->Fill(cont_elelamptvsv0dl);
2105  else fHistoEleLambdaPtvsV0dlRSMix2->Fill(cont_elelamptvsv0dl);
2106 
2107  fHistoElePtvsV0dcaRSMix->Fill(cont_eleptvsv0dca);
2108  if(trke->T()>0) fHistoElePtvsV0dcaRSMix1->Fill(cont_eleptvsv0dca);
2109  else fHistoElePtvsV0dcaRSMix2->Fill(cont_eleptvsv0dca);
2110  }
2111  }else{
2112  fHistoEleLambdaMassWSMix->Fill(cont);
2113  fHistoEleLambdaMassvsElePtWSMix->Fill(cont2);
2114  if(trke->T()>0) fHistoEleLambdaMassvsElePtWSMix1->Fill(cont2);
2115  else fHistoEleLambdaMassvsElePtWSMix2->Fill(cont2);
2116  if(cont[0]<2.3){
2117  fHistoElePtWSMix->Fill(trke->Pt(),fCentrality);
2118  fHistoElePtvsEtaWSMix->Fill(cont_eleptvseta);
2119  fHistoElePtvsLambdaPtWSMix->Fill(cont_eleptvslambdapt);
2120  fHistoElePtvsd0WSMix->Fill(cont_eleptvsd0);
2121 
2122  fHistoElePtvsV0dlWSMix->Fill(cont_eleptvsv0dl);
2123  if(trke->T()>0) fHistoElePtvsV0dlWSMix1->Fill(cont_eleptvsv0dl);
2124  else fHistoElePtvsV0dlWSMix2->Fill(cont_eleptvsv0dl);
2125 
2126  fHistoEleLambdaPtvsV0dlWSMix->Fill(cont_elelamptvsv0dl);
2127  if(trke->T()>0) fHistoEleLambdaPtvsV0dlWSMix1->Fill(cont_elelamptvsv0dl);
2128  else fHistoEleLambdaPtvsV0dlWSMix2->Fill(cont_elelamptvsv0dl);
2129 
2130  fHistoElePtvsV0dcaWSMix->Fill(cont_eleptvsv0dca);
2131  if(trke->T()>0) fHistoElePtvsV0dcaWSMix1->Fill(cont_eleptvsv0dca);
2132  else fHistoElePtvsV0dcaWSMix2->Fill(cont_eleptvsv0dca);
2133  }
2134  }
2135  }
2136 
2137  return;
2138 }
2141 {
2142  //
2144  //
2145 
2146  const char* nameoutput = GetOutputSlot(5)->GetContainer()->GetName();
2147  fEleVariablesTree = new TTree(nameoutput,"electron variables tree");
2148  Int_t nVar = 26;
2149  fCandidateEleVariables = new Float_t [nVar];
2150  TString * fCandidateVariableNames = new TString[nVar];
2151 
2152  fCandidateVariableNames[ 0]="ElePx";
2153  fCandidateVariableNames[ 1]="ElePy";
2154  fCandidateVariableNames[ 2]="ElePz";
2155  fCandidateVariableNames[ 3]="TPCChi2overNDF";
2156  fCandidateVariableNames[ 4]="ITSNcls";
2157  fCandidateVariableNames[ 5]="TPCNcls";
2158  fCandidateVariableNames[ 6]="TPCNclsPID";
2159  fCandidateVariableNames[ 7]="TPCNclsRatio";
2160  fCandidateVariableNames[ 8]="d0R";
2161  fCandidateVariableNames[ 9]="d0Z";
2162  fCandidateVariableNames[10]="ITSClusterMap";
2163  fCandidateVariableNames[11]="nSigmaTPCele";
2164  fCandidateVariableNames[12]="nSigmaTOFele";
2165  fCandidateVariableNames[13]="nSigmaTPCpi";
2166  fCandidateVariableNames[14]="nSigmaTPCka";
2167  fCandidateVariableNames[15]="nSigmaTPCpr";
2168  fCandidateVariableNames[16]="EvNumber";
2169  fCandidateVariableNames[17]="EleCharge";
2170  fCandidateVariableNames[18]="ElePdgCode";
2171  fCandidateVariableNames[19]="EleMotherPdgCode";
2172  fCandidateVariableNames[20]="mcelepx";
2173  fCandidateVariableNames[21]="mcelepy";
2174  fCandidateVariableNames[22]="mcelepz";
2175  fCandidateVariableNames[23]="Centrality";
2176  fCandidateVariableNames[24]="PrimVertZ";
2177  fCandidateVariableNames[25]="RunNumber";
2178 
2179  for (Int_t ivar=0; ivar<nVar; ivar++) {
2180  fEleVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateEleVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
2181  }
2182 
2183  return;
2184 }
2186 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillElectronROOTObjects(AliAODTrack *trk, TClonesArray *mcArray)
2187 {
2188  //
2190  //
2191 
2192  if(!trk) return;
2193 
2194  fHistoBachPt->Fill(trk->Pt());
2195  fHistoElectronQovPtvsPhi->Fill(trk->Phi(),(Double_t)trk->Charge()/trk->Pt());
2196 
2197  if(fDoEventMixing){
2198  fElectronTracks->AddLast(new TLorentzVector(trk->Px(),trk->Py(),trk->Pz(),trk->Charge()));
2199  }
2200 
2201  if(!fWriteEachVariableTree) return;
2202 
2203  Int_t pdgEle = -9999;
2204  Int_t pdgEleMother = -9999;
2205  Float_t mcelepx = -9999;
2206  Float_t mcelepy = -9999;
2207  Float_t mcelepz = -9999;
2208  if(fUseMCInfo)
2209  {
2210  Int_t labEle = trk->GetLabel();
2211  if(labEle<0) return;
2212  AliAODMCParticle *mcetrk = (AliAODMCParticle*)mcArray->At(labEle);
2213  if(!mcetrk) return;
2214  pdgEle = mcetrk->GetPdgCode();
2215  if(abs(pdgEle)!=11) return;
2216 
2217  fHistoBachPtMCS->Fill(trk->Pt());
2218 
2219  Bool_t hfe_flag = kFALSE;
2220  Int_t labemother = mcetrk->GetMother();
2221  if(labemother>=0){
2222  AliAODMCParticle *motherele = (AliAODMCParticle*)mcArray->At(labemother);
2223  pdgEleMother = motherele->GetPdgCode();
2224  if(abs(pdgEleMother)>4000&&abs(pdgEleMother)<4400){
2225  hfe_flag = kTRUE;
2226  }
2227  }
2228  if(!hfe_flag) return;
2229  mcelepx = mcetrk->Px();
2230  mcelepy = mcetrk->Py();
2231  mcelepz = mcetrk->Pz();
2232  }
2233 
2234  for(Int_t i=0;i<26;i++){
2235  fCandidateEleVariables[i] = -9999.;
2236  }
2237 
2238  fCandidateEleVariables[ 0] = trk->Px();
2239  fCandidateEleVariables[ 1] = trk->Py();
2240  fCandidateEleVariables[ 2] = trk->Pz();
2241  fCandidateEleVariables[ 3] = trk->Chi2perNDF();
2242  fCandidateEleVariables[ 4] = trk->GetITSNcls();
2243  fCandidateEleVariables[ 5] = trk->GetTPCncls();
2244  fCandidateEleVariables[ 6] = trk->GetTPCsignalN();
2245  if(trk->GetTPCNclsF()>0)
2246  fCandidateEleVariables[ 7] = (Float_t)trk->GetTPCncls()/(Float_t)trk->GetTPCNclsF();
2247 
2248  Double_t d0z0[2],covd0z0[3];
2249  trk->PropagateToDCA(fVtx1,fBzkG,kVeryBig,d0z0,covd0z0);
2250 
2251  fCandidateEleVariables[ 8] = d0z0[0];
2252  fCandidateEleVariables[ 9] = d0z0[1];
2253  Int_t itsmap = trk->GetITSClusterMap();
2254  Int_t bit1 = 1;
2255  Int_t bit2 = 2;
2256  Bool_t spdfirst = (itsmap & bit1) == bit1;
2257  Bool_t spdsecond = (itsmap & bit2) == bit2;
2258  fCandidateEleVariables[10] = ((Int_t)spdfirst) + 2 * ((Int_t)spdsecond);
2259 
2260  if(fAnalCuts->GetIsUsePID())
2261  {
2262  Double_t nSigmaTPCele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kElectron);
2263  Double_t nSigmaTOFele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trk,AliPID::kElectron);
2264  Double_t nSigmaTPCpi_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kPion);
2265  Double_t nSigmaTPCka_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kKaon);
2266  Double_t nSigmaTPCpr_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kProton);
2267  fCandidateEleVariables[11] = nSigmaTPCele;
2268  fCandidateEleVariables[12] = nSigmaTOFele;
2269  fCandidateEleVariables[13] = nSigmaTPCpi_etrk;
2270  fCandidateEleVariables[14] = nSigmaTPCka_etrk;
2271  fCandidateEleVariables[15] = nSigmaTPCpr_etrk;
2272  }
2274  fCandidateEleVariables[17] = trk->Charge();
2275  fCandidateEleVariables[18] = pdgEle;
2276  fCandidateEleVariables[19] = pdgEleMother;
2277  fCandidateEleVariables[20] = mcelepx;
2278  fCandidateEleVariables[21] = mcelepy;
2279  fCandidateEleVariables[22] = mcelepz;
2283 
2284  fHistod0Bach->Fill(d0z0[0]);
2285 
2286  fEleVariablesTree->Fill();
2287 }
2290 {
2291  //
2293  //
2294 
2295  const char* nameoutput = GetOutputSlot(6)->GetContainer()->GetName();
2296  fV0VariablesTree = new TTree(nameoutput,"v0 variables tree");
2297  Int_t nVar = 33;
2298  fCandidateV0Variables = new Float_t [nVar];
2299  TString * fCandidateVariableNames = new TString[nVar];
2300 
2301  fCandidateVariableNames[ 0]="V0Px";
2302  fCandidateVariableNames[ 1]="V0Py";
2303  fCandidateVariableNames[ 2]="V0Pz";
2304  fCandidateVariableNames[ 3]="MassLambda";
2305  fCandidateVariableNames[ 4]="MassAntiLambda";
2306  fCandidateVariableNames[ 5]="ProtonPx";
2307  fCandidateVariableNames[ 6]="ProtonPy";
2308  fCandidateVariableNames[ 7]="ProtonPz";
2309  fCandidateVariableNames[ 8]="PionPx";
2310  fCandidateVariableNames[ 9]="PionPy";
2311  fCandidateVariableNames[10]="PionPz";
2312  fCandidateVariableNames[11]="RfidV0";
2313  fCandidateVariableNames[12]="DcaV0PrToPrimVertex";
2314  fCandidateVariableNames[13]="DcaV0PiToPrimVertex";
2315  fCandidateVariableNames[14]="DcaV0daughters";
2316  fCandidateVariableNames[15]="V0CosPointingAngle";
2317  fCandidateVariableNames[16]="V0ProperDecayLength";
2318  fCandidateVariableNames[17]="MassK0Short";
2319  fCandidateVariableNames[18]="nSigmaTPCpr";
2320  fCandidateVariableNames[19]="nSigmaTPCpi";
2321  fCandidateVariableNames[20]="TPCNCrossV0Pr";
2322  fCandidateVariableNames[21]="TPCNCrossV0Pi";
2323  fCandidateVariableNames[22]="TPCNCrossRatioV0Pr";
2324  fCandidateVariableNames[23]="TPCNCrossRatioV0Pi";
2325  fCandidateVariableNames[24]="V0PdgCode";
2326  fCandidateVariableNames[25]="V0MotherPdgCode";
2327  fCandidateVariableNames[26]="mcv0px";
2328  fCandidateVariableNames[27]="mcv0py";
2329  fCandidateVariableNames[28]="mcv0pz";
2330  fCandidateVariableNames[29]="EvNumber";
2331  fCandidateVariableNames[30]="Centrality";
2332  fCandidateVariableNames[31]="PrimVertZ";
2333  fCandidateVariableNames[32]="RunNumber";
2334 
2335  for (Int_t ivar=0; ivar<nVar; ivar++) {
2336  fV0VariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateV0Variables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
2337  }
2338 
2339  return;
2340 }
2341 
2343 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillV0ROOTObjects(AliAODv0 *v0, TClonesArray *mcArray)
2344 {
2345  //
2347  //
2348  if(!v0) return;
2349 
2350  Double_t mlamPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
2351  Double_t posVtx[3] = {0.,0.,0.};
2352  fVtx1->GetXYZ(posVtx);
2353  Double_t ptotlam = TMath::Sqrt(pow(v0->Px(),2)+pow(v0->Py(),2)+pow(v0->Pz(),2));
2354  Double_t v0propdl = v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam;
2355 
2356  if(TMath::Abs(v0->MassLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
2357  fHistoLambdaMassvsPt->Fill(v0->MassLambda(),v0->Pt());
2358  }
2359  if(TMath::Abs(v0->MassAntiLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
2360  fHistoLambdaMassvsPt->Fill(v0->MassAntiLambda(),v0->Pt());
2361  }
2362  fHistoK0sMassvsPt->Fill(v0->MassK0Short(),v0->Pt());
2363 
2364  if(fAnalCuts->IsPeakRegion(v0)){
2365  fHistoLambdaPtvsDl->Fill(v0->Pt(),v0propdl);
2366  }
2367  if(fAnalCuts->IsSideBand(v0)){
2368  fHistoLambdaPtvsDlSide->Fill(v0->Pt(),v0propdl);
2369  }
2370 
2371  Double_t momv0x = v0->MomV0X();
2372  Double_t momv0y = v0->MomV0Y();
2373  Double_t phi_alice = atan2(momv0y,momv0x);
2374  if(phi_alice<0.) phi_alice += 2 * M_PI;
2375  fHistoLambdaQovPtvsPhi->Fill(phi_alice,1./sqrt(momv0x*momv0x+momv0y*momv0y));
2376 
2377  Int_t v0pdgcode = -9999;
2378  Int_t v0motherpdgcode = -9999;
2379  Float_t mcv0px = -9999;
2380  Float_t mcv0py = -9999;
2381  Float_t mcv0pz = -9999;
2382  if(fUseMCInfo)
2383  {
2384  Int_t pdgdgv0[2]={2212,211};
2385  Int_t labV0 = v0->MatchToMC(3122,mcArray,2,pdgdgv0); // the V0
2386  if(labV0>=0){
2387  if(TMath::Abs(v0->MassLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
2388  fHistoLambdaMassvsPtMCS->Fill(v0->MassLambda(),v0->Pt());
2389  }
2390  if(TMath::Abs(v0->MassAntiLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
2391  fHistoLambdaMassvsPtMCS->Fill(v0->MassAntiLambda(),v0->Pt());
2392  }
2393  }
2394  if(labV0<0) return;
2395  AliAODMCParticle *mcv0trk = (AliAODMCParticle*)mcArray->At(labV0);
2396  if(!mcv0trk) return;
2397 
2398  Bool_t hfv0_flag = kFALSE;
2399  v0pdgcode = mcv0trk->GetPdgCode();
2400  Int_t labv0mother = mcv0trk->GetMother();
2401  if(labv0mother>=0){
2402  AliAODMCParticle *motherv0 = (AliAODMCParticle*)mcArray->At(labv0mother);
2403  if(motherv0){
2404  v0motherpdgcode = motherv0->GetPdgCode();
2405  if(abs(v0motherpdgcode)>4000&&abs(v0motherpdgcode)<4400){
2406  hfv0_flag = kTRUE;
2407  }
2408  if(abs(v0motherpdgcode)==3322){
2409  fHistoLambdaPtvsDlFeeddownXi0MCS->Fill(v0->Pt(),v0propdl);
2410  }else if(abs(v0motherpdgcode)==3312){
2411  fHistoLambdaPtvsDlFeeddownXiMinusMCS->Fill(v0->Pt(),v0propdl);
2412  }else if(abs(v0motherpdgcode)==3334){
2413  fHistoLambdaPtvsDlFeeddownOmegaMCS->Fill(v0->Pt(),v0propdl);
2414  }else{
2415  fHistoLambdaPtvsDlMCS->Fill(v0->Pt(),v0propdl);
2416  }
2417  }
2418  }
2419  if(!hfv0_flag) return;
2420  mcv0px = mcv0trk->Px();
2421  mcv0py = mcv0trk->Py();
2422  mcv0pz = mcv0trk->Pz();
2423  }
2424 
2425  if(fDoEventMixing){
2426  Double_t posVtx[3] = {0.,0.,0.};
2427  fVtx1->GetXYZ(posVtx);
2428  TLorentzVector *lv = new TLorentzVector();
2429  Double_t ptotlam = TMath::Sqrt(pow(v0->Px(),2)+pow(v0->Py(),2)+pow(v0->Pz(),2));
2430  if(TMath::Abs(v0->MassLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
2431  lv->SetXYZM(v0->Px(),v0->Py(),v0->Pz(),v0->MassLambda());
2432  fV0Tracks1->AddLast(lv);
2433  fV0dlArray1.push_back(v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam);
2434  fV0dcaArray1.push_back(v0->DcaV0ToPrimVertex());
2435  }else{
2436  lv->SetXYZM(v0->Px(),v0->Py(),v0->Pz(),v0->MassAntiLambda());
2437  fV0Tracks2->AddLast(lv);
2438  fV0dlArray2.push_back(v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam);
2439  fV0dcaArray2.push_back(v0->DcaV0ToPrimVertex());
2440  }
2441  }
2442 
2443 
2444  if(!fWriteEachVariableTree) return;
2445 
2446  for(Int_t i=0;i<32;i++){
2447  fCandidateV0Variables[i] = -9999.;
2448  }
2449 
2450  AliAODTrack *cptrack = (AliAODTrack*)(v0->GetDaughter(0));
2451  AliAODTrack *cntrack = (AliAODTrack*)(v0->GetDaughter(1));
2452  if(!cptrack) return;
2453  if(!cntrack) return;
2454  if(cptrack->Charge()<0 && cntrack->Charge()>0){
2455  cptrack = (AliAODTrack*)(v0->GetDaughter(1));
2456  cntrack = (AliAODTrack*)(v0->GetDaughter(0));
2457  }
2458 
2459  fCandidateV0Variables[ 0] = v0->Px();
2460  fCandidateV0Variables[ 1] = v0->Py();
2461  fCandidateV0Variables[ 2] = v0->Pz();
2462  fCandidateV0Variables[ 3] = v0->MassLambda();
2463  fCandidateV0Variables[ 4] = v0->MassAntiLambda();
2464 
2465  Bool_t isparticle = kTRUE;
2466  if(fabs(v0->MassAntiLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()) isparticle=kFALSE;
2467 
2468  if(isparticle){
2469  fCandidateV0Variables[ 5] = cptrack->Px();
2470  fCandidateV0Variables[ 6] = cptrack->Py();
2471  fCandidateV0Variables[ 7] = cptrack->Pz();
2472  fCandidateV0Variables[ 8] = cntrack->Px();
2473  fCandidateV0Variables[ 9] = cntrack->Py();
2474  fCandidateV0Variables[10] = cntrack->Pz();
2475  }else{
2476  fCandidateV0Variables[ 5] = cntrack->Px();
2477  fCandidateV0Variables[ 6] = cntrack->Py();
2478  fCandidateV0Variables[ 7] = cntrack->Pz();
2479  fCandidateV0Variables[ 8] = cptrack->Px();
2480  fCandidateV0Variables[ 9] = cptrack->Py();
2481  fCandidateV0Variables[10] = cptrack->Pz();
2482  }
2483 
2484  Double_t lPosV0[3];
2485  lPosV0[0] = v0->DecayVertexV0X();
2486  lPosV0[1] = v0->DecayVertexV0Y();
2487  lPosV0[2] = v0->DecayVertexV0Z();
2488  Double_t decayvertV0 = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
2489  fCandidateV0Variables[11] = decayvertV0;
2490 
2491  Double_t lDcaPosToPrimVertex = v0->DcaPosToPrimVertex();
2492  Double_t lDcaNegToPrimVertex = v0->DcaNegToPrimVertex();
2493  if(isparticle){
2494  fCandidateV0Variables[12] = lDcaPosToPrimVertex;
2495  fCandidateV0Variables[13] = lDcaNegToPrimVertex;
2496  }else{
2497  fCandidateV0Variables[12] = lDcaNegToPrimVertex;
2498  fCandidateV0Variables[13] = lDcaPosToPrimVertex;
2499  }
2500  fCandidateV0Variables[14] = v0->DcaV0Daughters();
2501  fCandidateV0Variables[15] = v0->CosPointingAngle(posVtx);
2502  fCandidateV0Variables[16] = v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam;
2503  fCandidateV0Variables[17] = v0->MassK0Short();
2504 
2505  if(fAnalCuts->GetUseLambdaPID())
2506  {
2507  if(isparticle){
2508  Double_t nSigmaTPCv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kProton);
2509  Double_t nSigmaTPCv0pi = fAnalCuts->GetPidPion()->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kPion);
2510  fCandidateV0Variables[18] = nSigmaTPCv0pr;
2511  fCandidateV0Variables[19] = nSigmaTPCv0pi;
2512  }else{
2513  Double_t nSigmaTPCv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kProton);
2514  Double_t nSigmaTPCv0pi = fAnalCuts->GetPidPion()->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kPion);
2515  fCandidateV0Variables[18] = nSigmaTPCv0pr;
2516  fCandidateV0Variables[19] = nSigmaTPCv0pi;
2517  }
2518  }
2519  if(isparticle){
2520  fCandidateV0Variables[20] = cptrack->GetTPCClusterInfo(2,1);
2521  fCandidateV0Variables[21] = cntrack->GetTPCClusterInfo(2,1);
2522  if(cptrack->GetTPCNclsF()>0)
2523  fCandidateV0Variables[22] = (Float_t) cptrack->GetTPCClusterInfo(2,1)/(Float_t)cptrack->GetTPCNclsF();
2524  if(cntrack->GetTPCNclsF()>0)
2525  fCandidateV0Variables[23] =(Float_t) cntrack->GetTPCClusterInfo(2,1)/(Float_t)cntrack->GetTPCNclsF();
2526  }else{
2527  fCandidateV0Variables[20] = cntrack->GetTPCClusterInfo(2,1);
2528  fCandidateV0Variables[21] = cptrack->GetTPCClusterInfo(2,1);
2529  if(cntrack->GetTPCNclsF()>0)
2530  fCandidateV0Variables[22] = (Float_t) cntrack->GetTPCClusterInfo(2,1)/(Float_t)cntrack->GetTPCNclsF();
2531  if(cptrack->GetTPCNclsF()>0)
2532  fCandidateV0Variables[23] = (Float_t) cptrack->GetTPCClusterInfo(2,1)/(Float_t)cptrack->GetTPCNclsF();
2533  }
2534  fCandidateV0Variables[24] = v0pdgcode;
2535  fCandidateV0Variables[25] = v0motherpdgcode;
2536  fCandidateV0Variables[26] = mcv0px;
2537  fCandidateV0Variables[27] = mcv0py;
2538  fCandidateV0Variables[28] = mcv0pz;
2543 
2544 
2545  fV0VariablesTree->Fill();
2546 }
2549 {
2553 
2554  const char* nameoutput = GetOutputSlot(7)->GetContainer()->GetName();
2555  fMCVariablesTree = new TTree(nameoutput,"MC variables tree");
2556  Int_t nVar = 11;
2557  fCandidateMCVariables = new Float_t [nVar];
2558  TString * fCandidateVariableNames = new TString[nVar];
2559 
2560  fCandidateVariableNames[ 0]="Centrality";
2561  fCandidateVariableNames[ 1]="DecayType";
2562  fCandidateVariableNames[ 2]="LcPx";
2563  fCandidateVariableNames[ 3]="LcPy";
2564  fCandidateVariableNames[ 4]="LcPz";
2565  fCandidateVariableNames[ 5]="ElePx";
2566  fCandidateVariableNames[ 6]="ElePy";
2567  fCandidateVariableNames[ 7]="ElePz";
2568  fCandidateVariableNames[ 8]="V0Px";
2569  fCandidateVariableNames[ 9]="V0Py";
2570  fCandidateVariableNames[10]="V0Pz";
2571 
2572  for (Int_t ivar=0; ivar<nVar; ivar++) {
2573  fMCVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateMCVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
2574  }
2575  return;
2576 }
2578 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillMCROOTObjects(AliAODMCParticle *mcpart, AliAODMCParticle *mcepart, AliAODMCParticle *mcv0part, Int_t decaytype)
2579 {
2580  //
2582  //
2583  if(!mcpart) return;
2584  if(!mcepart) return;
2585  if(!mcv0part) return;
2586 
2587  for(Int_t i=0;i<11;i++){
2588  fCandidateMCVariables[i] = -9999.;
2589  }
2590 
2592  fCandidateMCVariables[ 1] = (Float_t) decaytype;
2593  fCandidateMCVariables[ 2] = mcpart->Px();
2594  fCandidateMCVariables[ 3] = mcpart->Py();
2595  fCandidateMCVariables[ 4] = mcpart->Pz();
2596  fCandidateMCVariables[ 5] = mcepart->Px();
2597  fCandidateMCVariables[ 6] = mcepart->Py();
2598  fCandidateMCVariables[ 7] = mcepart->Pz();
2599  fCandidateMCVariables[ 8] = mcv0part->Px();
2600  fCandidateMCVariables[ 9] = mcv0part->Py();
2601  fCandidateMCVariables[10] = mcv0part->Pz();
2602 
2603  Double_t epx = mcepart->Px();
2604  Double_t epy = mcepart->Py();
2605  Double_t epz = mcepart->Pz();
2606  Double_t eE = sqrt(epx*epx+epy*epy+epz*epz+0.000511*0.000511);
2607  Double_t v0px = mcv0part->Px();
2608  Double_t v0py = mcv0part->Py();
2609  Double_t v0pz = mcv0part->Pz();
2610  Double_t v0E = sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz+1.1157*1.1157);
2611 
2612  Double_t InvMassEleLambda = sqrt(pow(eE+v0E,2)-pow(epx+v0px,2)-pow(epy+v0py,2)-pow(epz+v0pz,2));
2613 
2614  Double_t cont[3];
2615  cont[0] = InvMassEleLambda;
2616  cont[1] = mcpart->Pt();
2617  cont[2] = fCentrality;
2618  Double_t cont2[3];
2619  cont2[0] = InvMassEleLambda;
2620  cont2[1] = mcepart->Pt();
2621  cont2[2] = fCentrality;
2622  Double_t cont_eleptvseta[3];
2623  cont_eleptvseta[0] = mcepart->Pt();
2624  cont_eleptvseta[1] = mcepart->Eta();
2625  cont_eleptvseta[2] = fCentrality;
2626  Double_t cont_eleptvslambdapt[3];
2627  cont_eleptvslambdapt[0] = mcepart->Pt();
2628  cont_eleptvslambdapt[1] = mcv0part->Pt();
2629  cont_eleptvslambdapt[2] = fCentrality;
2630  Double_t cont_eleptvslambdaptvslcpt[4];
2631  cont_eleptvslambdaptvslcpt[0] = mcepart->Pt();
2632  cont_eleptvslambdaptvslcpt[1] = mcv0part->Pt();
2633  cont_eleptvslambdaptvslcpt[2] = mcpart->Pt();
2634  cont_eleptvslambdaptvslcpt[3] = fCentrality;
2635  Double_t contmc[3];
2636  contmc[0] = mcpart->Pt();
2637  contmc[1] = mcpart->Y();
2638  contmc[2] = fCentrality;
2639  Double_t contmcele[3];
2640  contmcele[0] = mcepart->Pt();
2641  contmcele[1] = mcepart->Eta();
2642  contmcele[2] = fCentrality;
2643 
2644  AliESDtrackCuts *esdcuts = fAnalCuts->GetTrackCuts();
2645  Float_t etamin, etamax;
2646  esdcuts->GetEtaRange(etamin,etamax);
2647 
2648  if(decaytype==0){
2649  fHistoLcMCGen->Fill(contmc);
2650  if(mcpart->GetPdgCode()>0) fHistoLcMCGen1->Fill(contmc);
2651  if(mcpart->GetPdgCode()<0) fHistoLcMCGen2->Fill(contmc);
2652  fHistoLcElectronMCGen->Fill(contmcele);
2653  if(mcepart->GetPdgCode()<0) fHistoLcElectronMCGen1->Fill(contmcele);
2654  if(mcepart->GetPdgCode()>0) fHistoLcElectronMCGen2->Fill(contmcele);
2655  fHistoEleLambdaMassMCGen->Fill(cont);
2656  if(fabs(mcepart->Eta())<etamax){
2657  fHistoEleLambdaMassvsElePtMCGen->Fill(cont2);
2658  if(mcepart->GetPdgCode()<0) fHistoEleLambdaMassvsElePtMCGen1->Fill(cont2);
2659  else fHistoEleLambdaMassvsElePtMCGen2->Fill(cont2);
2660  if(InvMassEleLambda<2.3){
2661  fHistoElePtMCGen->Fill(mcepart->Pt(),fCentrality);
2662  fHistoElePtvsEtaMCGen->Fill(cont_eleptvseta);
2663  fHistoElePtvsLambdaPtMCGen->Fill(cont_eleptvslambdapt);
2664  }
2665  }
2666  if(fabs(mcpart->Y())<0.7){
2667  if(InvMassEleLambda<2.3){
2668  fHistoElePtvsLambdaPtMCLcGen->Fill(cont_eleptvslambdapt);
2669  fHistoElePtvsLambdaPtvsLcPtMCGen->Fill(cont_eleptvslambdaptvslcpt);
2670  }
2671  }
2672  }else if(decaytype==1){
2673  fHistoFeedDownXic0MCGen->Fill(contmc);
2674  if(mcpart->GetPdgCode()>0) fHistoFeedDownXic0MCGen1->Fill(contmc);
2675  if(mcpart->GetPdgCode()<0) fHistoFeedDownXic0MCGen2->Fill(contmc);
2677  fHistoElectronFeedDownXic0MCGen->Fill(contmcele);
2678  if(mcepart->GetPdgCode()<0) fHistoElectronFeedDownXic0MCGen1->Fill(contmcele);
2679  if(mcepart->GetPdgCode()>0) fHistoElectronFeedDownXic0MCGen2->Fill(contmcele);
2680  if(fabs(mcepart->Eta())<etamax){
2682  if(mcepart->GetPdgCode()<0) fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1->Fill(cont2);
2684  if(InvMassEleLambda<2.3){
2685  fHistoElePtFeeddownXic0MCGen->Fill(mcepart->Pt(),fCentrality);
2686  fHistoElePtvsEtaFeeddownXic0MCGen->Fill(cont_eleptvseta);
2687  fHistoElePtvsLambdaPtFeeddownXic0MCGen->Fill(cont_eleptvslambdapt);
2688  }
2689  }
2690  }else if(decaytype==2){
2691  fHistoFeedDownXicPlusMCGen->Fill(contmc);
2692  if(mcpart->GetPdgCode()>0) fHistoFeedDownXicPlusMCGen1->Fill(contmc);
2693  if(mcpart->GetPdgCode()<0) fHistoFeedDownXicPlusMCGen2->Fill(contmc);
2695  fHistoElectronFeedDownXicPlusMCGen->Fill(contmcele);
2696  if(mcepart->GetPdgCode()<0) fHistoElectronFeedDownXicPlusMCGen1->Fill(contmcele);
2697  if(mcepart->GetPdgCode()>0) fHistoElectronFeedDownXicPlusMCGen2->Fill(contmcele);
2698  if(fabs(mcepart->Eta())<etamax){
2700  if(mcepart->GetPdgCode()<0) fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1->Fill(cont2);
2702  if(InvMassEleLambda<2.3){
2703  fHistoElePtFeeddownXicPlusMCGen->Fill(mcepart->Pt(),fCentrality);
2704  fHistoElePtvsEtaFeeddownXicPlusMCGen->Fill(cont_eleptvseta);
2705  fHistoElePtvsLambdaPtFeeddownXicPlusMCGen->Fill(cont_eleptvslambdapt);
2706  }
2707  }
2708  }
2709 
2711  fMCVariablesTree->Fill();
2712 }
2715 {
2716  //
2717  // Define electron tree variables
2718  //
2719 
2720  const char* nameoutput = GetOutputSlot(9)->GetContainer()->GetName();
2721  fMCEleVariablesTree = new TTree(nameoutput,"MC Ele variables tree");
2722  Int_t nVar = 8;
2723  fCandidateMCEleVariables = new Float_t [nVar];
2724  TString * fCandidateVariableNames = new TString[nVar];
2725 
2726  fCandidateVariableNames[ 0]="Centrality";
2727  fCandidateVariableNames[ 1]="ElePx";
2728  fCandidateVariableNames[ 2]="ElePy";
2729  fCandidateVariableNames[ 3]="ElePz";
2730  fCandidateVariableNames[ 4]="ElePdgCode";
2731  fCandidateVariableNames[ 5]="EleMotherPdgCode";
2732  fCandidateVariableNames[ 6]="RunNumber";
2733  fCandidateVariableNames[ 7]="EvNumber";
2734 
2735  for (Int_t ivar=0; ivar<nVar; ivar++) {
2736  fMCEleVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateMCEleVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
2737  }
2738  return;
2739 }
2741 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillMCEleROOTObjects(AliAODMCParticle *mcepart, TClonesArray *mcArray)
2742 {
2743  //
2744  // Fill tree depending on fWriteMCVariableTree
2745  //
2746  if(!mcepart) return;
2747 
2748  Bool_t hfe_flag = kFALSE;
2749  Int_t labemother = mcepart->GetMother();
2750  Int_t pdgmotherele = -9999;
2751  if(labemother>=0){
2752  AliAODMCParticle *motherele = (AliAODMCParticle*)mcArray->At(labemother);
2753  pdgmotherele = motherele->GetPdgCode();
2754  if(abs(pdgmotherele)>4000&&abs(pdgmotherele)<4400){
2755  hfe_flag = kTRUE;
2756  }
2757  }
2758  if(!hfe_flag) return;
2759 
2760  Double_t contmc[3];
2761  contmc[0] = mcepart->Pt();
2762  contmc[1] = mcepart->Eta();
2763  contmc[2] = fCentrality;
2764  fHistoElectronMCGen->Fill(contmc);
2765 
2766  for(Int_t i=0;i<8;i++){
2767  fCandidateMCEleVariables[i] = -9999.;
2768  }
2769 
2771  fCandidateMCEleVariables[ 1] = mcepart->Px();
2772  fCandidateMCEleVariables[ 2] = mcepart->Py();
2773  fCandidateMCEleVariables[ 3] = mcepart->Pz();
2774  fCandidateMCEleVariables[ 4] = mcepart->GetPdgCode();
2775  fCandidateMCEleVariables[ 5] = pdgmotherele;
2778 
2779 // if(fWriteMCVariableTree && fWriteEachVariableTree && mcepart->Pt()>0.4 && fabs(mcepart->Eta())<1.0 )
2780 // fMCEleVariablesTree->Fill();
2781 
2782 }
2785 {
2786  //
2787  // Define Mc v0 tree variables
2788  //
2789 
2790  const char* nameoutput = GetOutputSlot(10)->GetContainer()->GetName();
2791  fMCV0VariablesTree = new TTree(nameoutput,"MC v0 variables tree");
2792  Int_t nVar = 8;
2793  fCandidateMCV0Variables = new Float_t [nVar];
2794  TString * fCandidateVariableNames = new TString[nVar];
2795 
2796  fCandidateVariableNames[ 0]="Centrality";
2797  fCandidateVariableNames[ 1]="V0Px";
2798  fCandidateVariableNames[ 2]="V0Py";
2799  fCandidateVariableNames[ 3]="V0Pz";
2800  fCandidateVariableNames[ 4]="V0PdgCode";
2801  fCandidateVariableNames[ 5]="V0MotherPdgCode";
2802  fCandidateVariableNames[ 6]="RunNumber";
2803  fCandidateVariableNames[ 7]="EvNumber";
2804 
2805  for (Int_t ivar=0; ivar<nVar; ivar++) {
2806  fMCV0VariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateMCV0Variables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
2807  }
2808  return;
2809 }
2811 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillMCV0ROOTObjects(AliAODMCParticle *mcv0part, TClonesArray *mcArray)
2812 {
2813  //
2814  // Fill histograms or tree depending on fWriteMCVariableTree
2815  //
2816  if(!mcv0part) return;
2817 
2818  for(Int_t i=0;i<8;i++){
2819  fCandidateMCV0Variables[i] = -9999.;
2820  }
2821 
2822  Bool_t hfv0_flag = kFALSE;
2823  Int_t labv0mother = mcv0part->GetMother();
2824  Int_t pdgmotherv0 = -9999;
2825  if(labv0mother>=0){
2826  AliAODMCParticle *motherv0 = (AliAODMCParticle*)mcArray->At(labv0mother);
2827  if(motherv0){
2828  pdgmotherv0 = motherv0->GetPdgCode();
2829  if(abs(pdgmotherv0)>4000&&abs(pdgmotherv0)<4400){
2830  hfv0_flag = kTRUE;
2831  }
2832  }
2833  }
2834  if(!hfv0_flag) return;
2835 
2836  Double_t contmc[3];
2837  contmc[0] = mcv0part->Pt();
2838  contmc[1] = mcv0part->Eta();
2839  contmc[2] = fCentrality;
2840  fHistoLambdaMCGen->Fill(contmc);
2841 
2843  fCandidateMCV0Variables[ 1] = mcv0part->Px();
2844  fCandidateMCV0Variables[ 2] = mcv0part->Py();
2845  fCandidateMCV0Variables[ 3] = mcv0part->Pz();
2846  fCandidateMCV0Variables[ 4] = mcv0part->GetPdgCode();
2847  fCandidateMCV0Variables[ 5] = pdgmotherv0;
2850 
2851  if(fWriteMCVariableTree && fWriteEachVariableTree && mcv0part->Pt()>0.4 && fabs(mcv0part->Eta())<1.0 )
2852  fMCV0VariablesTree->Fill();
2853 }
2854 
2855 
2858  //
2860  //
2861 
2862  fCEvents = new TH1F("fCEvents","conter",18,-0.5,17.5);
2863  fCEvents->SetStats(kTRUE);
2864  fCEvents->GetXaxis()->SetBinLabel(1,"X1");
2865  fCEvents->GetXaxis()->SetBinLabel(2,"Analyzed events");
2866  fCEvents->GetXaxis()->SetBinLabel(3,"AliAODVertex exists");
2867  fCEvents->GetXaxis()->SetBinLabel(4,"TriggerOK");
2868  fCEvents->GetXaxis()->SetBinLabel(5,"IsEventSelected");
2869  fCEvents->GetXaxis()->SetBinLabel(6,"CascadesHF exists");
2870  fCEvents->GetXaxis()->SetBinLabel(7,"MCarray exists");
2871  fCEvents->GetXaxis()->SetBinLabel(8,"MCheader exists");
2872  fCEvents->GetXaxis()->SetBinLabel(9,"triggerClass!=CINT1");
2873  fCEvents->GetXaxis()->SetBinLabel(10,"triggerMask!=kAnyINT");
2874  fCEvents->GetXaxis()->SetBinLabel(11,"triggerMask!=kAny");
2875  fCEvents->GetXaxis()->SetBinLabel(12,"vtxTitle.Contains(Z)");
2876  fCEvents->GetXaxis()->SetBinLabel(13,"vtxTitle.Contains(3D)");
2877  fCEvents->GetXaxis()->SetBinLabel(14,"vtxTitle.Doesn'tContain(Z-3D)");
2878  fCEvents->GetXaxis()->SetBinLabel(15,Form("zVtx<=%2.0fcm",fAnalCuts->GetMaxVtxZ()));
2879  fCEvents->GetXaxis()->SetBinLabel(16,"!IsEventSelected");
2880  fCEvents->GetXaxis()->SetBinLabel(17,"triggerMask!=kAnyINT || triggerClass!=CINT1");
2881  fCEvents->GetXaxis()->SetBinLabel(18,Form("zVtxMC<=%2.0fcm",fAnalCuts->GetMaxVtxZ()));
2882  //fCEvents->GetXaxis()->SetTitle("");
2883  fCEvents->GetYaxis()->SetTitle("counts");
2884 
2885  fHTrigger = new TH1F("fHTrigger","counter",18,-0.5,17.5);
2886  fHTrigger->SetStats(kTRUE);
2887  fHTrigger->GetXaxis()->SetBinLabel(1,"X1");
2888  fHTrigger->GetXaxis()->SetBinLabel(2,"kMB");
2889  fHTrigger->GetXaxis()->SetBinLabel(3,"kSemiCentral");
2890  fHTrigger->GetXaxis()->SetBinLabel(4,"kCentral");
2891  fHTrigger->GetXaxis()->SetBinLabel(5,"kINT7");
2892  fHTrigger->GetXaxis()->SetBinLabel(6,"kEMC7");
2893  //fHTrigger->GetXaxis()->SetBinLabel(7,"Space");
2894  fHTrigger->GetXaxis()->SetBinLabel(8,"kMB|kSemiCentral|kCentral");
2895  fHTrigger->GetXaxis()->SetBinLabel(9,"kINT7|kEMC7");
2896  fHTrigger->GetXaxis()->SetBinLabel(11,"kMB&kSemiCentral");
2897  fHTrigger->GetXaxis()->SetBinLabel(12,"kMB&kCentral");
2898  fHTrigger->GetXaxis()->SetBinLabel(13,"kINT7&kEMC7");
2899 
2900  fHCentrality = new TH1F("fHCentrality","conter",100,0.,100.);
2901 
2902 
2903  fOutput->Add(fCEvents);
2904  fOutput->Add(fHTrigger);
2905  fOutput->Add(fHCentrality);
2906 
2907  return;
2908 }
2909 //__________________________________________________________________________
2911 {
2912  //
2914  //
2915 
2916  //------------------------------------------------
2917  // Basic histogram
2918  //------------------------------------------------
2919  Int_t bins_base[3]= {10,100 ,10};
2920  Double_t xmin_base[3]={1.1,0 ,0.00};
2921  Double_t xmax_base[3]={3.1,20. ,100};
2922  fHistoEleLambdaMass = new THnSparseF("fHistoEleLambdaMass","",3,bins_base,xmin_base,xmax_base);
2924  fHistoEleLambdaMassRS = new THnSparseF("fHistoEleLambdaMassRS","",3,bins_base,xmin_base,xmax_base);
2926  fHistoEleLambdaMassWS = new THnSparseF("fHistoEleLambdaMassWS","",3,bins_base,xmin_base,xmax_base);
2928  fHistoEleLambdaMassRSMix = new THnSparseF("fHistoEleLambdaMassRSMix","",3,bins_base,xmin_base,xmax_base);
2930  fHistoEleLambdaMassWSMix = new THnSparseF("fHistoEleLambdaMassWSMix","",3,bins_base,xmin_base,xmax_base);
2932  fHistoEleLambdaMassRSSide = new THnSparseF("fHistoEleLambdaMassRSSide","",3,bins_base,xmin_base,xmax_base);
2934  fHistoEleLambdaMassWSSide = new THnSparseF("fHistoEleLambdaMassWSSide","",3,bins_base,xmin_base,xmax_base);
2936 
2937  Int_t bins_base_elept[3]= {10,100 ,10};
2938  Double_t xmin_base_elept[3]={1.1,0 ,0.00};
2939  Double_t xmax_base_elept[3]={3.1,10. ,100};
2940  fHistoEleLambdaMassvsElePtRS = new THnSparseF("fHistoEleLambdaMassvsElePtRS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2942  fHistoEleLambdaMassvsElePtWS = new THnSparseF("fHistoEleLambdaMassvsElePtWS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2944  fHistoEleLambdaMassvsElePtRSMix = new THnSparseF("fHistoEleLambdaMassvsElePtRSMix","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2946  fHistoEleLambdaMassvsElePtWSMix = new THnSparseF("fHistoEleLambdaMassvsElePtWSMix","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2948  fHistoEleLambdaMassvsElePtRSSide = new THnSparseF("fHistoEleLambdaMassvsElePtRSSide","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2950  fHistoEleLambdaMassvsElePtWSSide = new THnSparseF("fHistoEleLambdaMassvsElePtWSSide","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2952  fHistoEleLambdaMassvsElePtRS1 = new THnSparseF("fHistoEleLambdaMassvsElePtRS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2954  fHistoEleLambdaMassvsElePtWS1 = new THnSparseF("fHistoEleLambdaMassvsElePtWS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2956  fHistoEleLambdaMassvsElePtRSMix1 = new THnSparseF("fHistoEleLambdaMassvsElePtRSMix1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2958  fHistoEleLambdaMassvsElePtWSMix1 = new THnSparseF("fHistoEleLambdaMassvsElePtWSMix1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2960  fHistoEleLambdaMassvsElePtRSSide1 = new THnSparseF("fHistoEleLambdaMassvsElePtRSSide1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2962  fHistoEleLambdaMassvsElePtWSSide1 = new THnSparseF("fHistoEleLambdaMassvsElePtWSSide1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2964  fHistoEleLambdaMassvsElePtRS2 = new THnSparseF("fHistoEleLambdaMassvsElePtRS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2966  fHistoEleLambdaMassvsElePtWS2 = new THnSparseF("fHistoEleLambdaMassvsElePtWS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2968  fHistoEleLambdaMassvsElePtRSMix2 = new THnSparseF("fHistoEleLambdaMassvsElePtRSMix2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2970  fHistoEleLambdaMassvsElePtWSMix2 = new THnSparseF("fHistoEleLambdaMassvsElePtWSMix2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2972  fHistoEleLambdaMassvsElePtRSSide2 = new THnSparseF("fHistoEleLambdaMassvsElePtRSSide2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2974  fHistoEleLambdaMassvsElePtWSSide2 = new THnSparseF("fHistoEleLambdaMassvsElePtWSSide2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2976 
2977  fHistoEleLambdaMassMCS = new THnSparseF("fHistoEleLambdaMassMCS","",3,bins_base,xmin_base,xmax_base);
2979  fHistoEleLambdaMassMCGen = new THnSparseF("fHistoEleLambdaMassMCGen","",3,bins_base,xmin_base,xmax_base);
2981  fHistoEleLambdaMassvsElePtMCS = new THnSparseF("fHistoEleLambdaMassvsElePtMCS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2983  fHistoEleLambdaMassvsElePtMCGen = new THnSparseF("fHistoEleLambdaMassvsElePtMCGen","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2985  fHistoEleLambdaMassvsElePtMCS1 = new THnSparseF("fHistoEleLambdaMassvsElePtMCS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2987  fHistoEleLambdaMassvsElePtMCGen1 = new THnSparseF("fHistoEleLambdaMassvsElePtMCGen1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2989  fHistoEleLambdaMassvsElePtMCS2 = new THnSparseF("fHistoEleLambdaMassvsElePtMCS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2991  fHistoEleLambdaMassvsElePtMCGen2 = new THnSparseF("fHistoEleLambdaMassvsElePtMCGen2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
2993 
2994  fHistoElePtRS = new TH2F("fHistoElePtRS","",100,0,10,10,0,100);
2995  fOutputAll->Add(fHistoElePtRS);
2996  fHistoElePtWS = new TH2F("fHistoElePtWS","",100,0.,10.,10,0,100);
2997  fOutputAll->Add(fHistoElePtWS);
2998  fHistoElePtRSMix = new TH2F("fHistoElePtRSMix","",100,0.,10.,10,0,100);
3000  fHistoElePtWSMix = new TH2F("fHistoElePtWSMix","",100,0.,10.,10,0,100);
3002  fHistoElePtMCS = new TH2F("fHistoElePtMCS","",100,0,10,10,0,100);
3003  fOutputAll->Add(fHistoElePtMCS);
3004  fHistoElePtMCGen = new TH2F("fHistoElePtMCGen","",100,0,10,10,0,100);
3006 
3007  Int_t bins_eleptvseta[3]= {10,10 ,10};
3008  Double_t xmin_eleptvseta[3]={0.,-1. ,0.0};
3009  Double_t xmax_eleptvseta[3]={5.,1. ,100};
3010 
3011  fHistoElePtvsEtaRS = new THnSparseF("fHistoElePtvsEtaRS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3013  fHistoElePtvsEtaWS = new THnSparseF("fHistoElePtvsEtaWS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3015  fHistoElePtvsEtaRSMix = new THnSparseF("fHistoElePtvsEtaRSMix","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3017  fHistoElePtvsEtaWSMix = new THnSparseF("fHistoElePtvsEtaWSMix","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3019  fHistoElePtvsEtaMCS = new THnSparseF("fHistoElePtvsEtaMCS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3021  fHistoElePtvsEtaMCGen = new THnSparseF("fHistoElePtvsEtaMCGen","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3023 
3024  Int_t bins_eleptvslambdapt[3]= {10,10 ,10};
3025  Double_t xmin_eleptvslambdapt[3]={0.,0. ,0.0};
3026  Double_t xmax_eleptvslambdapt[3]={5.,5. ,100};
3027 
3028  fHistoElePtvsLambdaPtRS = new THnSparseF("fHistoElePtvsLambdaPtRS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3030  fHistoElePtvsLambdaPtWS = new THnSparseF("fHistoElePtvsLambdaPtWS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3032  fHistoElePtvsLambdaPtRSMix = new THnSparseF("fHistoElePtvsLambdaPtRSMix","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3034  fHistoElePtvsLambdaPtWSMix = new THnSparseF("fHistoElePtvsLambdaPtWSMix","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3036  fHistoElePtvsLambdaPtMCS = new THnSparseF("fHistoElePtvsLambdaPtMCS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3038  fHistoElePtvsLambdaPtMCGen = new THnSparseF("fHistoElePtvsLambdaPtMCGen","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3040  fHistoElePtvsLambdaPtMCLcGen = new THnSparseF("fHistoElePtvsLambdaPtMCLcGen","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3042 
3043  Int_t bins_eleptvslambdaptvslcpt[4]= {10,10,10,10};
3044  Double_t xmin_eleptvslambdaptvslcpt[4]={0.,0.,0.,0.0};
3045  Double_t xmax_eleptvslambdaptvslcpt[4]={5.,5.,10.,100};
3046  fHistoElePtvsLambdaPtvsLcPtMCS = new THnSparseF("fHistoElePtvsLambdaPtvsLcPtMCS","",4,bins_eleptvslambdaptvslcpt,xmin_eleptvslambdaptvslcpt,xmax_eleptvslambdaptvslcpt);
3048  fHistoElePtvsLambdaPtvsLcPtMCGen = new THnSparseF("fHistoElePtvsLambdaPtvsLcPtMCGen","",4,bins_eleptvslambdaptvslcpt,xmin_eleptvslambdaptvslcpt,xmax_eleptvslambdaptvslcpt);
3050 
3051  Int_t bins_allpt[4]= {10,10,20,20};
3052  Double_t xmin_allpt[4]={0.,0.,0.,0.0};
3053  Double_t xmax_allpt[4]={20.,20.,10.,10};
3054  fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt = new THnSparseF("fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt","",4,bins_allpt,xmin_allpt,xmax_allpt);
3056 
3057  Int_t bins_eleptvsd0[3]= {10 ,10 ,10};
3058  Double_t xmin_eleptvsd0[3]={0.,-0.2 ,0.0};
3059  Double_t xmax_eleptvsd0[3]={5.,0.2 ,100};
3060 
3061  fHistoElePtvsd0RS = new THnSparseF("fHistoElePtvsd0RS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
3063  fHistoElePtvsd0WS = new THnSparseF("fHistoElePtvsd0WS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
3065  fHistoElePtvsd0RSMix = new THnSparseF("fHistoElePtvsd0RSMix","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
3067  fHistoElePtvsd0WSMix = new THnSparseF("fHistoElePtvsd0WSMix","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
3069  fHistoElePtvsd0MCS = new THnSparseF("fHistoElePtvsd0MCS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
3071  fHistoElePtvsd0PromptMCS = new THnSparseF("fHistoElePtvsd0PromptMCS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
3073  fHistoElePtvsd0BFeeddownMCS = new THnSparseF("fHistoElePtvsd0BFeeddownMCS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
3075 
3076 
3077  //Feeddown from Xic0
3078  fHistoEleLambdaMassFeeddownXic0MCS = new THnSparseF("fHistoEleLambdaMassFeeddownXic0MCS","",3,bins_base,xmin_base,xmax_base);
3080  fHistoEleLambdaMassFeeddownXic0MCGen = new THnSparseF("fHistoEleLambdaMassFeeddownXic0MCGen","",3,bins_base,xmin_base,xmax_base);
3082  fHistoEleLambdaMassvsElePtFeeddownXic0MCS = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3084  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCGen","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3086  fHistoEleLambdaMassvsElePtFeeddownXic0MCS1 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3088  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3090  fHistoEleLambdaMassvsElePtFeeddownXic0MCS2 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3092  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3094  fHistoElePtFeeddownXic0MCS = new TH2F("fHistoElePtFeeddownXic0MCS","",100,0,10,10,0,100);
3096  fHistoElePtFeeddownXic0MCGen = new TH2F("fHistoElePtFeeddownXic0MCGen","",100,0,10,10,0,100);
3098  fHistoElePtvsEtaFeeddownXic0MCS = new THnSparseF("fHistoElePtvsEtaFeeddownXic0MCS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3100  fHistoElePtvsEtaFeeddownXic0MCGen = new THnSparseF("fHistoElePtvsEtaFeeddownXic0MCGen","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3102  fHistoElePtvsLambdaPtFeeddownXic0MCS = new THnSparseF("fHistoElePtvsLambdaPtFeeddownXic0MCS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3104  fHistoElePtvsLambdaPtFeeddownXic0MCGen = new THnSparseF("fHistoElePtvsLambdaPtFeeddownXic0MCGen","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3106 
3107  //Feeddown from XicPlus
3108  fHistoEleLambdaMassFeeddownXicPlusMCS = new THnSparseF("fHistoEleLambdaMassFeeddownXicPlusMCS","",3,bins_base,xmin_base,xmax_base);
3110  fHistoEleLambdaMassFeeddownXicPlusMCGen = new THnSparseF("fHistoEleLambdaMassFeeddownXicPlusMCGen","",3,bins_base,xmin_base,xmax_base);
3112  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3114  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3116  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3118  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3120  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS2 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3122  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
3124  fHistoElePtFeeddownXicPlusMCS = new TH2F("fHistoElePtFeeddownXicPlusMCS","",100,0,10,10,0,100);
3126  fHistoElePtFeeddownXicPlusMCGen = new TH2F("fHistoElePtFeeddownXicPlusMCGen","",100,0,10,10,0,100);
3128  fHistoElePtvsEtaFeeddownXicPlusMCS = new THnSparseF("fHistoElePtvsEtaFeeddownXicPlusMCS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3130  fHistoElePtvsEtaFeeddownXicPlusMCGen = new THnSparseF("fHistoElePtvsEtaFeeddownXicPlusMCGen","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
3132  fHistoElePtvsLambdaPtFeeddownXicPlusMCS = new THnSparseF("fHistoElePtvsLambdaPtFeeddownXicPlusMCS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3134  fHistoElePtvsLambdaPtFeeddownXicPlusMCGen = new THnSparseF("fHistoElePtvsLambdaPtFeeddownXicPlusMCGen","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
3136 
3137  //------------------------------------------------
3138  // checking histograms
3139  //------------------------------------------------
3140  fHistoBachPt = new TH1F("fHistoBachPt","Bachelor p_{T}",100,0.0,5.0);
3141  fOutputAll->Add(fHistoBachPt);
3142  fHistoBachPtMCS = new TH1F("fHistoBachPtMCS","Bachelor p_{T}",100,0.0,5.0);
3144  fHistoBachPtMCGen = new TH1F("fHistoBachPtMCGen","Bachelor p_{T}",100,0.0,5.0);
3146  fHistod0Bach = new TH1F("fHistod0Bach","Bachelor d_{0}",100,-0.5,0.5);
3147  fOutputAll->Add(fHistod0Bach);
3148  fHistoLambdaMassvsPt=new TH2F("fHistoLambdaMassvsPt","Lambda mass",100,1.116-0.05,1.116+0.05,20,0.,10.);
3150  fHistoLambdaMassvsPtMCS=new TH2F("fHistoLambdaMassvsPtMCS","Lambda mass",100,1.116-0.05,1.116+0.05,20,0.,10.);
3152  fHistoLambdaMassvsPtMCGen=new TH2F("fHistoLambdaMassvsPtMCGen","Lambda mass",100,1.116-0.05,1.116+0.05,20,0.,10.);
3154  fHistoK0sMassvsPt=new TH2F("fHistoK0sMassvsPt","K0s mass",100,0.497-0.05,0.497+0.05,20,0.,10.);
3156  fHistoLambdaPtvsDl=new TH2F("fHistoLambdaPtvsDl","Lambda pt vs dl",20,0.,10.,20,0.,40.);
3158  fHistoLambdaPtvsDlSide=new TH2F("fHistoLambdaPtvsDlSide","Lambda pt vs dl",20,0.,10.,20,0.,40.);
3160  fHistoLambdaPtvsDlMCS=new TH2F("fHistoLambdaPtvsDlMCS","Lambda pt vs dl",20,0.,10.,20,0.,40.);
3162  fHistoLambdaPtvsDlFeeddownXi0MCS=new TH2F("fHistoLambdaPtvsDlFeeddownXi0MCS","Lambda pt vs dl",20,0.,10.,20,0.,40.);
3164  fHistoLambdaPtvsDlFeeddownXiMinusMCS=new TH2F("fHistoLambdaPtvsDlFeeddownXiMinusMCS","Lambda pt vs dl",20,0.,10.,20,0.,40.);
3166  fHistoLambdaPtvsDlFeeddownOmegaMCS=new TH2F("fHistoLambdaPtvsDlFeeddownOmegaMCS","Lambda pt vs dl",20,0.,10.,20,0.,40.);
3168 
3169  fHistoElectronTPCPID=new TH2F("fHistoElectronTPCPID","",50,0.,5.,50,-20.,20.);
3171  fHistoElectronTOFPID=new TH2F("fHistoElectronTOFPID","",50,0.,5.,50,-20.,20.);
3173  fHistoElectronTPCSelPID=new TH2F("fHistoElectronTPCSelPID","",50,0.,5.,50,-20.,20.);
3175  fHistoElectronTOFSelPID=new TH2F("fHistoElectronTOFSelPID","",50,0.,5.,50,-20.,20.);
3177  fHistoElectronTPCPIDSelTOF=new TH2F("fHistoElectronTPCPIDSelTOF","",10,0.,5.,500,-10.,10.);
3179  fHistoElectronTPCPIDSelTOFSmallEta=new TH2F("fHistoElectronTPCPIDSelTOFSmallEta","",10,0.,5.,500,-10.,10.);
3181  fHistoElectronTPCPIDSelTOFLargeEta=new TH2F("fHistoElectronTPCPIDSelTOFLargeEta","",10,0.,5.,500,-10.,10.);
3183 
3184  for(Int_t i=0;i<8;i++){
3185  fHistoElectronTPCPIDSelTOFEtaDep[i]=new TH2F(Form("fHistoElectronTPCPIDSelTOFEtaDep[%d]",i),"",10,0.,5.,500,-10.,10.);
3187  }
3188  fHistoElectronQovPtvsPhi=new TH2F("fHistoElectronQovPtvsPhi","",70,0.,7.,50,-2.,2.);
3190  fHistoLambdaQovPtvsPhi=new TH2F("fHistoLambdaQovPtvsPhi","",70,0.,7.,50,-2.,2.);
3192 
3193  Int_t bins_lcmcgen[3]= {100 ,20 ,10};
3194  Double_t xmin_lcmcgen[3]={0.,-1.0 ,0.0};
3195  Double_t xmax_lcmcgen[3]={20.,1.0 ,100};
3196  fHistoLcMCGen = new THnSparseF("fHistoLcMCGen","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3197  fOutputAll->Add(fHistoLcMCGen);
3198  fHistoLcMCGen1 = new THnSparseF("fHistoLcMCGen1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3199  fOutputAll->Add(fHistoLcMCGen1);
3200  fHistoLcMCGen2 = new THnSparseF("fHistoLcMCGen2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3201  fOutputAll->Add(fHistoLcMCGen2);
3202  fHistoFeedDownXic0MCGen = new THnSparseF("fHistoFeedDownXic0MCGen","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3204  fHistoFeedDownXic0MCGen1 = new THnSparseF("fHistoFeedDownXic0MCGen1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3206  fHistoFeedDownXic0MCGen2 = new THnSparseF("fHistoFeedDownXic0MCGen2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3208  fHistoFeedDownXicPlusMCGen = new THnSparseF("fHistoFeedDownXicPlusMCGen","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3210  fHistoFeedDownXicPlusMCGen1 = new THnSparseF("fHistoFeedDownXicPlusMCGen1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3212  fHistoFeedDownXicPlusMCGen2 = new THnSparseF("fHistoFeedDownXicPlusMCGen2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3214  fHistoLcMCS = new THnSparseF("fHistoLcMCS","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3215  fOutputAll->Add(fHistoLcMCS);
3216  fHistoLcMCS1 = new THnSparseF("fHistoLcMCS1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3217  fOutputAll->Add(fHistoLcMCS1);
3218  fHistoLcMCS2 = new THnSparseF("fHistoLcMCS2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3219  fOutputAll->Add(fHistoLcMCS2);
3220  fHistoFeedDownXic0MCS = new THnSparseF("fHistoFeedDownXic0MCS","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3222  fHistoFeedDownXic0MCS1 = new THnSparseF("fHistoFeedDownXic0MCS1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3224  fHistoFeedDownXic0MCS2 = new THnSparseF("fHistoFeedDownXic0MCS2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3226  fHistoFeedDownXicPlusMCS = new THnSparseF("fHistoFeedDownXicPlusMCS","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3228  fHistoFeedDownXicPlusMCS1 = new THnSparseF("fHistoFeedDownXicPlusMCS1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3230  fHistoFeedDownXicPlusMCS2 = new THnSparseF("fHistoFeedDownXicPlusMCS2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
3232 
3233  Int_t bins_elemcgen[3]= {100 ,20 ,10};
3234  Double_t xmin_elemcgen[3]={0.,-1.0 ,0.0};
3235  Double_t xmax_elemcgen[3]={10.,1.0 ,100};
3236  fHistoElectronMCGen = new THnSparseF("fHistoElectronMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3238  fHistoLcElectronMCGen = new THnSparseF("fHistoLcElectronMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3240  fHistoLcElectronMCGen1 = new THnSparseF("fHistoLcElectronMCGen1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3242  fHistoLcElectronMCGen2 = new THnSparseF("fHistoLcElectronMCGen2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3244  fHistoElectronFeedDownXic0MCGen = new THnSparseF("fHistoElectronFeedDownXic0MCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3246  fHistoElectronFeedDownXic0MCGen1 = new THnSparseF("fHistoElectronFeedDownXic0MCGen1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3248  fHistoElectronFeedDownXic0MCGen2 = new THnSparseF("fHistoElectronFeedDownXic0MCGen2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3250  fHistoElectronFeedDownXicPlusMCGen = new THnSparseF("fHistoElectronFeedDownXicPlusMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3252  fHistoElectronFeedDownXicPlusMCGen1 = new THnSparseF("fHistoElectronFeedDownXicPlusMCGen1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3254  fHistoElectronFeedDownXicPlusMCGen2 = new THnSparseF("fHistoElectronFeedDownXicPlusMCGen2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3256  fHistoLcElectronMCS = new THnSparseF("fHistoLcElectronMCS","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3258  fHistoLcElectronMCS1 = new THnSparseF("fHistoLcElectronMCS1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3260  fHistoLcElectronMCS2 = new THnSparseF("fHistoLcElectronMCS2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3262  fHistoElectronFeedDownXic0MCS = new THnSparseF("fHistoElectronFeedDownXic0MCS","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3264  fHistoElectronFeedDownXic0MCS1 = new THnSparseF("fHistoElectronFeedDownXic0MCS1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3266  fHistoElectronFeedDownXic0MCS2 = new THnSparseF("fHistoElectronFeedDownXic0MCS2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3268  fHistoElectronFeedDownXicPlusMCS = new THnSparseF("fHistoElectronFeedDownXicPlusMCS","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3270  fHistoElectronFeedDownXicPlusMCS1 = new THnSparseF("fHistoElectronFeedDownXicPlusMCS1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3272  fHistoElectronFeedDownXicPlusMCS2 = new THnSparseF("fHistoElectronFeedDownXicPlusMCS2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
3274 
3275  Int_t bins_lambdamcgen[3]= {50 ,20 ,10};
3276  Double_t xmin_lambdamcgen[3]={0.,-1.0 ,0.0};
3277  Double_t xmax_lambdamcgen[3]={10.,1.0 ,100};
3278  fHistoLambdaMCGen = new THnSparseF("fHistoLambdaMCGen","",3,bins_lambdamcgen,xmin_lambdamcgen,xmax_lambdamcgen);
3280 
3281  Int_t bins_eleptvsv0dl[3]= {100 ,20 ,10};
3282  Double_t xmin_eleptvsv0dl[3]={0.,0. ,0.0};
3283  Double_t xmax_eleptvsv0dl[3]={10.,40. ,100};
3284  fHistoElePtvsV0dlRS = new THnSparseF("fHistoElePtvsV0dlRS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3286  fHistoElePtvsV0dlRS1 = new THnSparseF("fHistoElePtvsV0dlRS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3288  fHistoElePtvsV0dlRS2 = new THnSparseF("fHistoElePtvsV0dlRS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3290  fHistoElePtvsV0dlRSSide = new THnSparseF("fHistoElePtvsV0dlRSSide","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3292  fHistoElePtvsV0dlRSSide1 = new THnSparseF("fHistoElePtvsV0dlRSSide1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3294  fHistoElePtvsV0dlRSSide2 = new THnSparseF("fHistoElePtvsV0dlRSSide2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3296  fHistoElePtvsV0dlRSMix = new THnSparseF("fHistoElePtvsV0dlRSMix","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3298  fHistoElePtvsV0dlRSMix1 = new THnSparseF("fHistoElePtvsV0dlRSMix1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3300  fHistoElePtvsV0dlRSMix2 = new THnSparseF("fHistoElePtvsV0dlRSMix2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3302  fHistoElePtvsV0dlWS = new THnSparseF("fHistoElePtvsV0dlWS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3304  fHistoElePtvsV0dlWS1 = new THnSparseF("fHistoElePtvsV0dlWS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3306  fHistoElePtvsV0dlWS2 = new THnSparseF("fHistoElePtvsV0dlWS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3308  fHistoElePtvsV0dlWSSide = new THnSparseF("fHistoElePtvsV0dlWSSide","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3310  fHistoElePtvsV0dlWSSide1 = new THnSparseF("fHistoElePtvsV0dlWSSide1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3312  fHistoElePtvsV0dlWSSide2 = new THnSparseF("fHistoElePtvsV0dlWSSide2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3314  fHistoElePtvsV0dlWSMix = new THnSparseF("fHistoElePtvsV0dlWSMix","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3316  fHistoElePtvsV0dlWSMix1 = new THnSparseF("fHistoElePtvsV0dlWSMix1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3318  fHistoElePtvsV0dlWSMix2 = new THnSparseF("fHistoElePtvsV0dlWSMix2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3320  fHistoElePtvsV0dlMCS = new THnSparseF("fHistoElePtvsV0dlMCS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3322  fHistoElePtvsV0dlMCS1 = new THnSparseF("fHistoElePtvsV0dlMCS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3324  fHistoElePtvsV0dlMCS2 = new THnSparseF("fHistoElePtvsV0dlMCS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3326  fHistoElePtvsV0dlFeedDownXic0MCS = new THnSparseF("fHistoElePtvsV0dlFeedDownXic0MCS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3328  fHistoElePtvsV0dlFeedDownXic0MCS1 = new THnSparseF("fHistoElePtvsV0dlFeedDownXic0MCS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3330  fHistoElePtvsV0dlFeedDownXic0MCS2 = new THnSparseF("fHistoElePtvsV0dlFeedDownXic0MCS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3332  fHistoElePtvsV0dlFeedDownXicPlusMCS = new THnSparseF("fHistoElePtvsV0dlFeedDownXicPlusMCS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3334  fHistoElePtvsV0dlFeedDownXicPlusMCS1 = new THnSparseF("fHistoElePtvsV0dlFeedDownXicPlusMCS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3336  fHistoElePtvsV0dlFeedDownXicPlusMCS2 = new THnSparseF("fHistoElePtvsV0dlFeedDownXicPlusMCS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
3338 
3339  Int_t bins_eleptvsv0dca[3]= {100 ,20 ,10};
3340  Double_t xmin_eleptvsv0dca[3]={0.,0. ,0.0};
3341  Double_t xmax_eleptvsv0dca[3]={10.,1. ,100};
3342  fHistoElePtvsV0dcaRS = new THnSparseF("fHistoElePtvsV0dcaRS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3344  fHistoElePtvsV0dcaRS1 = new THnSparseF("fHistoElePtvsV0dcaRS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3346  fHistoElePtvsV0dcaRS2 = new THnSparseF("fHistoElePtvsV0dcaRS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3348  fHistoElePtvsV0dcaRSSide = new THnSparseF("fHistoElePtvsV0dcaRSSide","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3350  fHistoElePtvsV0dcaRSSide1 = new THnSparseF("fHistoElePtvsV0dcaRSSide1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3352  fHistoElePtvsV0dcaRSSide2 = new THnSparseF("fHistoElePtvsV0dcaRSSide2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3354  fHistoElePtvsV0dcaRSMix = new THnSparseF("fHistoElePtvsV0dcaRSMix","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3356  fHistoElePtvsV0dcaRSMix1 = new THnSparseF("fHistoElePtvsV0dcaRSMix1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3358  fHistoElePtvsV0dcaRSMix2 = new THnSparseF("fHistoElePtvsV0dcaRSMix2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3360  fHistoElePtvsV0dcaWS = new THnSparseF("fHistoElePtvsV0dcaWS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3362  fHistoElePtvsV0dcaWS1 = new THnSparseF("fHistoElePtvsV0dcaWS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3364  fHistoElePtvsV0dcaWS2 = new THnSparseF("fHistoElePtvsV0dcaWS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3366  fHistoElePtvsV0dcaWSSide = new THnSparseF("fHistoElePtvsV0dcaWSSide","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3368  fHistoElePtvsV0dcaWSSide1 = new THnSparseF("fHistoElePtvsV0dcaWSSide1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3370  fHistoElePtvsV0dcaWSSide2 = new THnSparseF("fHistoElePtvsV0dcaWSSide2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3372  fHistoElePtvsV0dcaWSMix = new THnSparseF("fHistoElePtvsV0dcaWSMix","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3374  fHistoElePtvsV0dcaWSMix1 = new THnSparseF("fHistoElePtvsV0dcaWSMix1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3376  fHistoElePtvsV0dcaWSMix2 = new THnSparseF("fHistoElePtvsV0dcaWSMix2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3378  fHistoElePtvsV0dcaMCS = new THnSparseF("fHistoElePtvsV0dcaMCS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3380  fHistoElePtvsV0dcaMCS1 = new THnSparseF("fHistoElePtvsV0dcaMCS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3382  fHistoElePtvsV0dcaMCS2 = new THnSparseF("fHistoElePtvsV0dcaMCS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3384  fHistoElePtvsV0dcaFeedDownXic0MCS = new THnSparseF("fHistoElePtvsV0dcaFeedDownXic0MCS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3386  fHistoElePtvsV0dcaFeedDownXic0MCS1 = new THnSparseF("fHistoElePtvsV0dcaFeedDownXic0MCS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3388  fHistoElePtvsV0dcaFeedDownXic0MCS2 = new THnSparseF("fHistoElePtvsV0dcaFeedDownXic0MCS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3390  fHistoElePtvsV0dcaFeedDownXicPlusMCS = new THnSparseF("fHistoElePtvsV0dcaFeedDownXicPlusMCS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3392  fHistoElePtvsV0dcaFeedDownXicPlusMCS1 = new THnSparseF("fHistoElePtvsV0dcaFeedDownXicPlusMCS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3394  fHistoElePtvsV0dcaFeedDownXicPlusMCS2 = new THnSparseF("fHistoElePtvsV0dcaFeedDownXicPlusMCS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
3396 
3397  Int_t bins_elelamptvsv0dl[3]= {100 ,20 ,10};
3398  Double_t xmin_elelamptvsv0dl[3]={0.,0. ,0.0};
3399  Double_t xmax_elelamptvsv0dl[3]={20.,40. ,100};
3400  fHistoEleLambdaPtvsV0dlRS = new THnSparseF("fHistoEleLambdaPtvsV0dlRS","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3402  fHistoEleLambdaPtvsV0dlRS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlRS1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3404  fHistoEleLambdaPtvsV0dlRS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlRS2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3406  fHistoEleLambdaPtvsV0dlRSSide = new THnSparseF("fHistoEleLambdaPtvsV0dlRSSide","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3408  fHistoEleLambdaPtvsV0dlRSSide1 = new THnSparseF("fHistoEleLambdaPtvsV0dlRSSide1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3410  fHistoEleLambdaPtvsV0dlRSSide2 = new THnSparseF("fHistoEleLambdaPtvsV0dlRSSide2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3412  fHistoEleLambdaPtvsV0dlRSMix = new THnSparseF("fHistoEleLambdaPtvsV0dlRSMix","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3414  fHistoEleLambdaPtvsV0dlRSMix1 = new THnSparseF("fHistoEleLambdaPtvsV0dlRSMix1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3416  fHistoEleLambdaPtvsV0dlRSMix2 = new THnSparseF("fHistoEleLambdaPtvsV0dlRSMix2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3418  fHistoEleLambdaPtvsV0dlWS = new THnSparseF("fHistoEleLambdaPtvsV0dlWS","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3420  fHistoEleLambdaPtvsV0dlWS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlWS1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3422  fHistoEleLambdaPtvsV0dlWS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlWS2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3424  fHistoEleLambdaPtvsV0dlWSSide = new THnSparseF("fHistoEleLambdaPtvsV0dlWSSide","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3426  fHistoEleLambdaPtvsV0dlWSSide1 = new THnSparseF("fHistoEleLambdaPtvsV0dlWSSide1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3428  fHistoEleLambdaPtvsV0dlWSSide2 = new THnSparseF("fHistoEleLambdaPtvsV0dlWSSide2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3430  fHistoEleLambdaPtvsV0dlWSMix = new THnSparseF("fHistoEleLambdaPtvsV0dlWSMix","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3432  fHistoEleLambdaPtvsV0dlWSMix1 = new THnSparseF("fHistoEleLambdaPtvsV0dlWSMix1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3434  fHistoEleLambdaPtvsV0dlWSMix2 = new THnSparseF("fHistoEleLambdaPtvsV0dlWSMix2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3436  fHistoEleLambdaPtvsV0dlMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlMCS","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3438  fHistoEleLambdaPtvsV0dlMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlMCS1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3440  fHistoEleLambdaPtvsV0dlMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlMCS2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3442  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0MCS","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3444  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3446  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3448  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3450  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3452  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2","",3,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
3454 
3455  fHistoResponseElePt = new TH2D("fHistoResponseElePt","",100,0.,10.,100,0.,10.);
3457  fHistoResponseElePt1 = new TH2D("fHistoResponseElePt1","",100,0.,10.,100,0.,10.);
3459  fHistoResponseElePt2 = new TH2D("fHistoResponseElePt2","",100,0.,10.,100,0.,10.);
3461  fHistoResponseEleLambdaPt = new TH2D("fHistoResponseEleLambdaPt","",100,0.,20.,100,0.,20.);
3463  fHistoResponseEleLambdaPt1 = new TH2D("fHistoResponseEleLambdaPt1","",100,0.,20.,100,0.,20.);
3465  fHistoResponseEleLambdaPt2 = new TH2D("fHistoResponseEleLambdaPt2","",100,0.,20.,100,0.,20.);
3467  fHistoResponseEleLambdaPtFeeddownXic0 = new TH2D("fHistoResponseEleLambdaPtFeeddownXic0","",100,0.,20.,100,0.,20.);
3469  fHistoResponseEleLambdaPtFeeddownXic01 = new TH2D("fHistoResponseEleLambdaPtFeeddownXic01","",100,0.,20.,100,0.,20.);
3471  fHistoResponseEleLambdaPtFeeddownXic02 = new TH2D("fHistoResponseEleLambdaPtFeeddownXic02","",100,0.,20.,100,0.,20.);
3473  fHistoResponseEleLambdaPtFeeddownXicPlus = new TH2D("fHistoResponseEleLambdaPtFeeddownXicPlus","",100,0.,20.,100,0.,20.);
3475  fHistoResponseEleLambdaPtFeeddownXicPlus1 = new TH2D("fHistoResponseEleLambdaPtFeeddownXicPlus1","",100,0.,20.,100,0.,20.);
3477  fHistoResponseEleLambdaPtFeeddownXicPlus2 = new TH2D("fHistoResponseEleLambdaPtFeeddownXicPlus2","",100,0.,20.,100,0.,20.);
3479 
3480  fHistonEvtvsRunNumber=new TH1F("fHistonEvtvsRunNumber","",20000,-0.5,19999.5);
3482  fHistonElevsRunNumber=new TH1F("fHistonElevsRunNumber","",20000,-0.5,19999.5);
3484  fHistonLambdavsRunNumber=new TH1F("fHistonLambdavsRunNumber","",20000,-0.5,19999.5);
3486  fHistoMCEventType=new TH1F("fHistoMCEventType","",4,-0.5,3.5);
3488 
3489  for(Int_t ih=0;ih<17;ih++){
3490  Int_t bins_eleptvscutvars[3];
3491  Double_t xmin_eleptvscutvars[3];
3492  Double_t xmax_eleptvscutvars[3];
3493 
3494  bins_eleptvscutvars[0] = 50;//electron pT bin
3495  xmin_eleptvscutvars[0] = 0.;
3496  xmax_eleptvscutvars[0] = 5.;
3497  bins_eleptvscutvars[2] = 10;//centrality bin
3498  xmin_eleptvscutvars[2] = 0.;
3499  xmax_eleptvscutvars[2] = 100.;
3500 
3501  if(ih==0 || ih==1){
3502  //0: TPC Ncluster 1: TPC ncluster PID
3503  bins_eleptvscutvars[1] = 40;
3504  xmin_eleptvscutvars[1] = 0.;
3505  xmax_eleptvscutvars[1] = 160.;
3506  }else if(ih==2 || ih==3){
3507  //2: nSigma(TPC,e) 3: nSigma(TOF,e)
3508  bins_eleptvscutvars[1] = 20;
3509  xmin_eleptvscutvars[1] = -5.;
3510  xmax_eleptvscutvars[1] = 5.;
3511  }else if(ih==4){
3512  //4: eta
3513  bins_eleptvscutvars[1] = 30;
3514  xmin_eleptvscutvars[1] = -1.5;
3515  xmax_eleptvscutvars[1] = 1.5;
3516  }else if(ih==5){
3517  //5: nITS cluster
3518  bins_eleptvscutvars[1] = 7;
3519  xmin_eleptvscutvars[1] = -0.5;
3520  xmax_eleptvscutvars[1] = 6.5;
3521  }else if(ih==6){
3522  //6: Lambda mass
3523  bins_eleptvscutvars[1] = 50;
3524  xmin_eleptvscutvars[1] = 1.1156-0.03;
3525  xmax_eleptvscutvars[1] = 1.1156+0.03;
3526  }else if(ih==7){
3527  //7: Rfid Lambda
3528  bins_eleptvscutvars[1] = 20;
3529  xmin_eleptvscutvars[1] = 0.;
3530  xmax_eleptvscutvars[1] = 5.;
3531  }else if(ih==8){
3532  //10: Dca V0
3533  bins_eleptvscutvars[1] = 20;
3534  xmin_eleptvscutvars[1] = 0.;
3535  xmax_eleptvscutvars[1] = 2.;
3536  }else if(ih==9 || ih==10 ){
3537  //9: DCA V0pr to prim 10: DCA V0pi to prim
3538  bins_eleptvscutvars[1] = 20;
3539  xmin_eleptvscutvars[1] = 0.;
3540  xmax_eleptvscutvars[1] = 0.5;
3541  }else if(ih==11){
3542  //11: CosPAv0
3543  bins_eleptvscutvars[1] = 20;
3544  xmin_eleptvscutvars[1] = 0.95;
3545  xmax_eleptvscutvars[1] = 1.0;
3546  }else if(ih==12){
3547  //12:K0s masss
3548  bins_eleptvscutvars[1] = 50;
3549  xmin_eleptvscutvars[1] = 0.497-0.03;
3550  xmax_eleptvscutvars[1] = 0.497+0.03;
3551  }else if(ih==13 || ih==14){
3552  //13: nSigmaTPC(pr), nSigma(pi)
3553  bins_eleptvscutvars[1] = 20;
3554  xmin_eleptvscutvars[1] = -5;
3555  xmax_eleptvscutvars[1] = 5;
3556  }else if(ih==15){
3557  //15: eta
3558  bins_eleptvscutvars[1] = 30;
3559  xmin_eleptvscutvars[1] = -1.5;
3560  xmax_eleptvscutvars[1] = 1.5;
3561  }else if(ih==16){
3562  //16: Opening angle
3563  bins_eleptvscutvars[1] = 20;
3564  xmin_eleptvscutvars[1] = 0.;
3565  xmax_eleptvscutvars[1] = 3.141592/2;
3566  }
3567 
3568  fHistoElePtvsCutVarsRS[ih] = new THnSparseF(Form("fHistoElePtvsCutVarsRS[%d]",ih),"",3,bins_eleptvscutvars,xmin_eleptvscutvars,xmax_eleptvscutvars);
3570  fHistoElePtvsCutVarsWS[ih] = new THnSparseF(Form("fHistoElePtvsCutVarsWS[%d]",ih),"",3,bins_eleptvscutvars,xmin_eleptvscutvars,xmax_eleptvscutvars);
3572  fHistoElePtvsCutVarsMCS[ih] = new THnSparseF(Form("fHistoElePtvsCutVarsMCS[%d]",ih),"",3,bins_eleptvscutvars,xmin_eleptvscutvars,xmax_eleptvscutvars);
3574  }
3575 
3576  return;
3577 }
3578 
3579 //________________________________________________________________________
3580 AliAODRecoCascadeHF* AliAnalysisTaskSELc2eleLambdafromAODtracks::MakeCascadeHF(AliAODv0 *v0, AliAODTrack *part, AliAODEvent * aod, AliAODVertex *secVert)
3581 {
3585 
3586  if(!v0) return 0x0;
3587  if(!part) return 0x0;
3588  if(!aod) return 0x0;
3589 
3590  //------------------------------------------------
3591  // PrimaryVertex
3592  //------------------------------------------------
3593  AliAODVertex *primVertexAOD;
3594  Bool_t unsetvtx = kFALSE;
3596  primVertexAOD = CallPrimaryVertex(v0,part,aod);
3597  if(!primVertexAOD){
3598  primVertexAOD = fVtx1;
3599  }else{
3600  unsetvtx = kTRUE;
3601  }
3602  }else{
3603  primVertexAOD = fVtx1;
3604  }
3605  if(!primVertexAOD) return 0x0;
3606  Double_t posprim[3]; primVertexAOD->GetXYZ(posprim);
3607 
3608  //------------------------------------------------
3609  // DCA between tracks
3610  //------------------------------------------------
3611  AliESDtrack *esdtrack = new AliESDtrack((AliVTrack*)part);
3612 
3613  AliNeutralTrackParam *trackV0=NULL;
3614  const AliVTrack *trackVV0 = dynamic_cast<const AliVTrack*>(v0);
3615  if(trackVV0) trackV0 = new AliNeutralTrackParam(trackVV0);
3616 
3617  Double_t xdummy, ydummy;
3618  Double_t dca = esdtrack->GetDCA(trackV0,fBzkG,xdummy,ydummy);
3619 
3620 
3621  //------------------------------------------------
3622  // Propagate all tracks to the secondary vertex and calculate momentum there
3623  //------------------------------------------------
3624 
3625  Double_t d0z0bach[2],covd0z0bach[3];
3626  if(sqrt(pow(secVert->GetX(),2)+pow(secVert->GetY(),2))<1.){
3627  part->PropagateToDCA(secVert,fBzkG,kVeryBig,d0z0bach,covd0z0bach);
3628  trackV0->PropagateToDCA(secVert,fBzkG,kVeryBig);
3629  }else{
3630  part->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig,d0z0bach,covd0z0bach);
3631  trackV0->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig);
3632  }
3633  Double_t momv0_new[3]={-9999,-9999,-9999.};
3634  trackV0->GetPxPyPz(momv0_new);
3635 
3636  Double_t px[2],py[2],pz[2];
3637  px[0] = part->Px(); py[0] = part->Py(); pz[0] = part->Pz();
3638  px[1] = momv0_new[0]; py[1] = momv0_new[1]; pz[1] = momv0_new[2];
3639 
3640  //------------------------------------------------
3641  // d0
3642  //------------------------------------------------
3643  Double_t d0[3],d0err[3];
3644 
3645  part->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig,d0z0bach,covd0z0bach);
3646  d0[0]= d0z0bach[0];
3647  d0err[0] = TMath::Sqrt(covd0z0bach[0]);
3648 
3649  Double_t d0z0v0[2],covd0z0v0[3];
3650  trackV0->PropagateToDCA(primVertexAOD,fBzkG,kVeryBig,d0z0v0,covd0z0v0);
3651  d0[1]= d0z0v0[0];
3652  d0err[1] = TMath::Sqrt(covd0z0v0[0]);
3653 
3654  //------------------------------------------------
3655  // Create AliAODRecoCascadeHF
3656  //------------------------------------------------
3657  Short_t charge = part->Charge();
3658  AliAODRecoCascadeHF *theCascade = new AliAODRecoCascadeHF(secVert,charge,px,py,pz,d0,d0err,dca);
3659  if(!theCascade)
3660  {
3661  if(unsetvtx) delete primVertexAOD; primVertexAOD=NULL;
3662  if(esdtrack) delete esdtrack;
3663  if(trackV0) delete trackV0;
3664  return 0x0;
3665  }
3666  theCascade->SetOwnPrimaryVtx(primVertexAOD);
3667  UShort_t id[2]={(UShort_t)part->GetID(),(UShort_t)trackV0->GetID()};
3668  theCascade->SetProngIDs(2,id);
3669 
3670  theCascade->GetSecondaryVtx()->AddDaughter(part);
3671  theCascade->GetSecondaryVtx()->AddDaughter(v0);
3672 
3673  if(unsetvtx) delete primVertexAOD; primVertexAOD=NULL;
3674  if(esdtrack) delete esdtrack;
3675  if(trackV0) delete trackV0;
3676 
3677  return theCascade;
3678 }
3679 
3680 //________________________________________________________________________
3681 AliAODVertex* AliAnalysisTaskSELc2eleLambdafromAODtracks::CallPrimaryVertex(AliAODv0 *v0, AliAODTrack *trk, AliAODEvent* aod)
3682 {
3683  //
3686  //
3687 
3688  TObjArray *TrackArray = new TObjArray(3);
3689 
3690  AliESDtrack *cptrk1 = new AliESDtrack((AliVTrack*)trk);
3691  TrackArray->AddAt(cptrk1,0);
3692 
3693  AliESDtrack *cascptrack = new AliESDtrack((AliVTrack*)v0->GetDaughter(0));
3694  TrackArray->AddAt(cascptrack,1);
3695  AliESDtrack *cascntrack = new AliESDtrack((AliVTrack*)v0->GetDaughter(1));
3696  TrackArray->AddAt(cascntrack,2);
3697 
3698  AliAODVertex *newvert = PrimaryVertex(TrackArray,aod);
3699 
3700  for(Int_t i=0;i<3;i++)
3701  {
3702  AliESDtrack *tesd = (AliESDtrack*)TrackArray->UncheckedAt(i);
3703  delete tesd;
3704  }
3705  TrackArray->Clear();
3706  delete TrackArray;
3707 
3708  return newvert;
3709 }
3710 
3711 //________________________________________________________________________
3712 AliAODVertex* AliAnalysisTaskSELc2eleLambdafromAODtracks::PrimaryVertex(const TObjArray *trkArray,
3713  AliVEvent *event)
3714 {
3715  //
3718  //
3719 
3720  Bool_t fRecoPrimVtxSkippingTrks = kTRUE;
3721  Bool_t fRmTrksFromPrimVtx = kFALSE;
3722 
3723  AliESDVertex *vertexESD = 0;
3724  AliAODVertex *vertexAOD = 0;
3725 
3726  //vertexESD = new AliESDVertex(*fV1);
3727 
3728 
3729  if(!fRecoPrimVtxSkippingTrks && !fRmTrksFromPrimVtx) {
3730  // primary vertex from the input event
3731 
3732  vertexESD = new AliESDVertex(*fV1);
3733 
3734  } else {
3735  // primary vertex specific to this candidate
3736 
3737  Int_t nTrks = trkArray->GetEntriesFast();
3738  AliVertexerTracks *vertexer = new AliVertexerTracks(event->GetMagneticField());
3739 
3740  if(fRecoPrimVtxSkippingTrks) {
3741  // recalculating the vertex
3742 
3743  if(strstr(fV1->GetTitle(),"VertexerTracksWithConstraint")) {
3744  Float_t diamondcovxy[3];
3745  event->GetDiamondCovXY(diamondcovxy);
3746  Double_t pos[3]={event->GetDiamondX(),event->GetDiamondY(),0.};
3747  Double_t cov[6]={diamondcovxy[0],diamondcovxy[1],diamondcovxy[2],0.,0.,10.*10.};
3748  AliESDVertex *diamond = new AliESDVertex(pos,cov,1.,1);
3749  vertexer->SetVtxStart(diamond);
3750  delete diamond; diamond=NULL;
3751  if(strstr(fV1->GetTitle(),"VertexerTracksWithConstraintOnlyFitter"))
3752  vertexer->SetOnlyFitter();
3753  }
3754  Int_t skipped[1000];
3755  Int_t nTrksToSkip=0,id;
3756  AliExternalTrackParam *t = 0;
3757  for(Int_t i=0; i<nTrks; i++) {
3758  t = (AliExternalTrackParam*)trkArray->UncheckedAt(i);
3759  id = (Int_t)t->GetID();
3760  if(id<0) continue;
3761  skipped[nTrksToSkip++] = id;
3762  }
3763  // TEMPORARY FIX
3764  // For AOD, skip also tracks without covariance matrix
3765  Double_t covtest[21];
3766  for(Int_t j=0; j<event->GetNumberOfTracks(); j++) {
3767  AliVTrack *vtrack = (AliVTrack*)event->GetTrack(j);
3768  if(!vtrack->GetCovarianceXYZPxPyPz(covtest)) {
3769  id = (Int_t)vtrack->GetID();
3770  if(id<0) continue;
3771  skipped[nTrksToSkip++] = id;
3772  }
3773  }
3774  for(Int_t ijk=nTrksToSkip; ijk<1000; ijk++) skipped[ijk]=-1;
3775  //
3776  vertexer->SetSkipTracks(nTrksToSkip,skipped);
3777  vertexESD = (AliESDVertex*)vertexer->FindPrimaryVertex(event);
3778 
3779  } else if(fRmTrksFromPrimVtx && nTrks>0) {
3780  // removing the prongs tracks
3781 
3782  TObjArray rmArray(nTrks);
3783  UShort_t *rmId = new UShort_t[nTrks];
3784  AliESDtrack *esdTrack = 0;
3785  AliESDtrack *t = 0;
3786  for(Int_t i=0; i<nTrks; i++) {
3787  t = (AliESDtrack*)trkArray->UncheckedAt(i);
3788  esdTrack = new AliESDtrack(*t);
3789  rmArray.AddLast(esdTrack);
3790  if(esdTrack->GetID()>=0) {
3791  rmId[i]=(UShort_t)esdTrack->GetID();
3792  } else {
3793  rmId[i]=9999;
3794  }
3795  }
3796  Float_t diamondxy[2]={static_cast<Float_t>(event->GetDiamondX()),static_cast<Float_t>(event->GetDiamondY())};
3797  vertexESD = vertexer->RemoveTracksFromVertex(fV1,&rmArray,rmId,diamondxy);
3798  delete [] rmId; rmId=NULL;
3799  rmArray.Delete();
3800 
3801  }
3802 
3803  delete vertexer; vertexer=NULL;
3804  if(!vertexESD) return vertexAOD;
3805  if(vertexESD->GetNContributors()<=0) {
3806  //AliDebug(2,"vertexing failed");
3807  delete vertexESD; vertexESD=NULL;
3808  return vertexAOD;
3809  }
3810 
3811 
3812  }
3813 
3814  // convert to AliAODVertex
3815  Double_t pos[3],cov[6],chi2perNDF;
3816  vertexESD->GetXYZ(pos); // position
3817  vertexESD->GetCovMatrix(cov); //covariance matrix
3818  chi2perNDF = vertexESD->GetChi2toNDF();
3819  delete vertexESD; vertexESD=NULL;
3820 
3821  vertexAOD = new AliAODVertex(pos,cov,chi2perNDF);
3822 
3823  return vertexAOD;
3824 }
3825 
3826 //________________________________________________________________________
3827 AliAODVertex* AliAnalysisTaskSELc2eleLambdafromAODtracks::ReconstructSecondaryVertex(AliAODv0 *v0, AliAODTrack *part, AliAODEvent * aod)
3828 {
3829  //
3830  // Reconstruct secondary vertex from trkArray (Copied from AliAnalysisVertexingHF)
3831  // Currently only returns Primary vertex (can we reconstruct secondary vertex from e - v0??)
3832  //
3833 
3834  AliAODVertex *primVertexAOD;
3835  Bool_t unsetvtx = kFALSE;
3837  primVertexAOD = CallPrimaryVertex(v0,part,aod);
3838  if(!primVertexAOD){
3839  primVertexAOD = fVtx1;
3840  }else{
3841  unsetvtx = kTRUE;
3842  }
3843  }else{
3844  primVertexAOD = fVtx1;
3845  }
3846  if(!primVertexAOD) return 0x0;
3847 
3848  AliESDVertex * vertexESD = new AliESDVertex(*fV1);
3849 
3850  Double_t pos[3],cov[6],chi2perNDF;
3851  vertexESD->GetXYZ(pos); // position
3852  vertexESD->GetCovMatrix(cov); //covariance matrix
3853  chi2perNDF = vertexESD->GetChi2toNDF();
3854  delete vertexESD; vertexESD=NULL;
3855 
3856  AliAODVertex *secVert = new AliAODVertex(pos,cov,chi2perNDF);
3857 
3858  return secVert;
3859 }
3860 //________________________________________________________________________
3861 Int_t AliAnalysisTaskSELc2eleLambdafromAODtracks::MatchToMC(AliAODRecoCascadeHF *elobj, TClonesArray *mcArray, Int_t *pdgarray_ele, Int_t *pdgarray_v0, Int_t *labelarray_ele, Int_t *labelarray_v0, Int_t &ngen_ele, Int_t &ngen_v0)
3862 {
3863  //
3864  // Match to MC
3865  //
3866  for(Int_t i=0;i<100;i++){
3867  pdgarray_ele[i] = -9999;
3868  labelarray_ele[i] = -9999;
3869  pdgarray_v0[i] = -9999;
3870  labelarray_v0[i] = -9999;
3871  }
3872  ngen_ele = 0;
3873  ngen_v0 = 0;
3874 
3875  AliVTrack *trk = dynamic_cast<AliVTrack*>(elobj->GetBachelor());
3876  if(!trk) return -1;
3877  Int_t labEle = trk->GetLabel();
3878  if(labEle<0) return -1;
3879  AliAODMCParticle *mcetrk = (AliAODMCParticle*)mcArray->At(labEle);
3880  if(!mcetrk) return -1;
3881  labelarray_ele[0] = labEle;
3882  pdgarray_ele[0] = mcetrk->GetPdgCode();
3883  ngen_ele ++;
3884 
3885  AliAODMCParticle *mcprimele=0;
3886  mcprimele = mcetrk;
3887  while(mcprimele->GetMother()>=0) {
3888  Int_t labprim_ele=mcprimele->GetMother();
3889  AliAODMCParticle *tmcprimele = (AliAODMCParticle*)mcArray->At(labprim_ele);
3890  if(!tmcprimele) {
3891  break;
3892  }
3893 
3894  mcprimele = tmcprimele;
3895  pdgarray_ele[ngen_ele] = mcprimele->GetPdgCode();
3896  labelarray_ele[ngen_ele] = labprim_ele;
3897  ngen_ele ++;
3898  if(ngen_ele==100) break;
3899  }
3900 
3901  AliAODv0 *theV0 = dynamic_cast<AliAODv0*>(elobj->Getv0());
3902  if(!theV0) return -1;
3903  Int_t pdgdgv0[2]={2212,211};
3904  Int_t labV0 = theV0->MatchToMC(3122,mcArray,2,pdgdgv0); // the V0
3905  if(labV0<0) return -1;
3906  AliAODMCParticle *mcv0 = (AliAODMCParticle*)mcArray->At(labV0);
3907  if(!mcv0) return -1;
3908  labelarray_v0[0] = labV0;
3909  pdgarray_v0[0] = mcv0->GetPdgCode();
3910  ngen_v0 ++;
3911 
3912  AliAODMCParticle *mcprimv0=0;
3913  mcprimv0 = mcv0;
3914  while(mcprimv0->GetMother()>=0) {
3915  Int_t labprim_v0=mcprimv0->GetMother();
3916  AliAODMCParticle *tmcprimv0 = (AliAODMCParticle*)mcArray->At(labprim_v0);
3917  if(!tmcprimv0) {
3918  break;
3919  }
3920 
3921  mcprimv0 = tmcprimv0;
3922  pdgarray_v0[ngen_v0] = mcprimv0->GetPdgCode();
3923  labelarray_v0[ngen_v0] = labprim_v0;
3924  ngen_v0 ++;
3925  if(ngen_v0==100) break;
3926  }
3927 
3928  Bool_t same_flag = kFALSE;
3929  Int_t matchedlabel=-9999;
3930  for(Int_t iemc=0;iemc<ngen_ele;iemc++){
3931  for(Int_t ivmc=0;ivmc<ngen_v0;ivmc++){
3932  if(labelarray_ele[iemc]==labelarray_v0[ivmc]){
3933  same_flag = kTRUE;
3934  matchedlabel = labelarray_ele[iemc];
3935  break;
3936  }
3937  }
3938  if(same_flag) break;
3939  }
3940 
3941  return matchedlabel;
3942 
3943 }
3944 //________________________________________________________________________
3945 void AliAnalysisTaskSELc2eleLambdafromAODtracks::SelectTrack( const AliVEvent *event, Int_t trkEntries, Int_t &nSeleTrks,Bool_t *seleFlags, TClonesArray *mcArray)
3946 {
3947  //
3948  // Select good tracks using fAnalCuts (AliRDHFCuts object) and return the array of their ids
3949  //
3950 
3951  if(trkEntries==0) return;
3952 
3953  nSeleTrks=0;
3954  for(Int_t i=0; i<trkEntries; i++) {
3955  seleFlags[i] = kFALSE;
3956 
3957  AliVTrack *track;
3958  track = (AliVTrack*)event->GetTrack(i);
3959 
3960  if(track->GetID()<0) continue;
3961  Double_t covtest[21];
3962  if(!track->GetCovarianceXYZPxPyPz(covtest)) continue;
3963 
3964  AliAODTrack *aodt = (AliAODTrack*)track;
3965  Double_t nsigma_tpcele = -9999;
3966  Double_t nsigma_tofele = -9999;
3967  if(fAnalCuts->GetIsUsePID()){
3968  nsigma_tpcele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(aodt,AliPID::kElectron);
3969  nsigma_tofele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(aodt,AliPID::kElectron);
3970  }
3971 
3972  if(!fAnalCuts) continue;
3973  if(fAnalCuts->SingleTrkCutsNoPID(aodt,fVtx1)){
3974  fHistoElectronTPCPID->Fill(aodt->Pt(),nsigma_tpcele);
3975  fHistoElectronTOFPID->Fill(aodt->Pt(),nsigma_tofele);
3976  if(fabs(nsigma_tofele)<3.){
3977  fHistoElectronTPCPIDSelTOF->Fill(aodt->Pt(),nsigma_tpcele);
3978  Double_t eleeta = aodt->Eta();
3979  if(fabs(eleeta)<0.6)
3980  fHistoElectronTPCPIDSelTOFSmallEta->Fill(aodt->Pt(),nsigma_tpcele);
3981  if(fabs(eleeta)>0.6 && fabs(eleeta)<0.8)
3982  fHistoElectronTPCPIDSelTOFLargeEta->Fill(aodt->Pt(),nsigma_tpcele);
3983  if(eleeta>-0.8 && eleeta<-0.6){
3984  fHistoElectronTPCPIDSelTOFEtaDep[0]->Fill(aodt->Pt(),nsigma_tpcele);
3985  }else if(eleeta>-0.6&&eleeta<-0.4){
3986  fHistoElectronTPCPIDSelTOFEtaDep[1]->Fill(aodt->Pt(),nsigma_tpcele);
3987  }else if(eleeta>-0.4&&eleeta<-0.2){
3988  fHistoElectronTPCPIDSelTOFEtaDep[2]->Fill(aodt->Pt(),nsigma_tpcele);
3989  }else if(eleeta>-0.2&&eleeta<0.0){
3990  fHistoElectronTPCPIDSelTOFEtaDep[3]->Fill(aodt->Pt(),nsigma_tpcele);
3991  }else if(eleeta>0.0&&eleeta<0.2){
3992  fHistoElectronTPCPIDSelTOFEtaDep[4]->Fill(aodt->Pt(),nsigma_tpcele);
3993  }else if(eleeta>0.2&&eleeta<0.4){
3994  fHistoElectronTPCPIDSelTOFEtaDep[5]->Fill(aodt->Pt(),nsigma_tpcele);
3995  }else if(eleeta>0.4&&eleeta<0.6){
3996  fHistoElectronTPCPIDSelTOFEtaDep[6]->Fill(aodt->Pt(),nsigma_tpcele);
3997  }else if(eleeta>0.6&&eleeta<0.8){
3998  fHistoElectronTPCPIDSelTOFEtaDep[7]->Fill(aodt->Pt(),nsigma_tpcele);
3999  }
4000  }
4001  }
4002  if(fAnalCuts->SingleTrkCuts(aodt,fVtx1)){
4003  seleFlags[i]=kTRUE;
4004  nSeleTrks++;
4005  fHistoElectronTPCSelPID->Fill(aodt->Pt(),nsigma_tpcele);
4006  fHistoElectronTOFSelPID->Fill(aodt->Pt(),nsigma_tofele);
4007  FillElectronROOTObjects(aodt,mcArray);
4008  }
4009 
4010  } // end loop on tracks
4011 }
4012 //________________________________________________________________________
4013 void AliAnalysisTaskSELc2eleLambdafromAODtracks::SelectV0( const AliVEvent *event,Int_t nV0s,Int_t &nSeleV0, Bool_t *seleV0Flags, TClonesArray *mcArray)
4014 {
4015  //
4016  // Select good V0 using fAnalCuts (AliRDHFCuts object) and return the array of their ids
4017  //
4018 
4019  nSeleV0 = 0;
4020  for(Int_t iv0=0;iv0<nV0s;iv0++)
4021  {
4022  seleV0Flags[iv0] = kFALSE;
4023  AliAODv0 *v0 = ((AliAODEvent*)event)->GetV0(iv0);
4024 
4025  if(!fAnalCuts) continue;
4026  if(fAnalCuts->SingleV0Cuts(v0,fVtx1)){
4027  seleV0Flags[iv0] = kTRUE;
4028  nSeleV0++;
4029 
4030  FillV0ROOTObjects(v0, mcArray);
4031  }
4032  }
4033 }
4034 //_________________________________________________________________
4036  //
4037  // check in which of the pools the current event falls
4038  //
4039 
4040  Int_t theBinZ=TMath::BinarySearch(fNzVtxBins,fZvtxBins,zvert);
4041  if(theBinZ<0 || theBinZ>=fNzVtxBins) return -1;
4042  Int_t theBinM=TMath::BinarySearch(fNCentBins,fCentBins,mult);
4043  if(theBinM<0 || theBinM>=fNCentBins) return -1;
4044  return fNCentBins*theBinZ+theBinM;
4045 }
4046 //_________________________________________________________________
4048  //
4049  // delete the contets of the pool
4050  //
4051  if(poolIndex<0 || poolIndex>=fNOfPools) return;
4052  delete fEventBuffer[poolIndex];
4053  fEventBuffer[poolIndex]=new TTree(Form("EventBuffer_%d",poolIndex), "Temporary buffer for event mixing");
4054 
4055  fEventBuffer[poolIndex]->Branch("zVertex", &fVtxZ);
4056  fEventBuffer[poolIndex]->Branch("centrality", &fCentrality);
4057  fEventBuffer[poolIndex]->Branch("eventInfo", "TObjString",&fEventInfo);
4058  fEventBuffer[poolIndex]->Branch("v1array", "TObjArray", &fV0Tracks1);
4059  fEventBuffer[poolIndex]->Branch("v2array", "TObjArray", &fV0Tracks2);
4060  fEventBuffer[poolIndex]->Branch("vdl1array", &fV0dlArray1);
4061  fEventBuffer[poolIndex]->Branch("vdl2array", &fV0dlArray2);
4062  fEventBuffer[poolIndex]->Branch("vdca1array", &fV0dcaArray1);
4063  fEventBuffer[poolIndex]->Branch("vdca2array", &fV0dcaArray2);
4064 
4065  return;
4066 }
4067 //_________________________________________________________________
4069 {
4070  //
4071  // perform mixed event analysis
4072  //
4073 
4074  if(poolIndex<0 || poolIndex>fNzVtxBins*fNCentBins) return;
4075  if(fEventBuffer[poolIndex]->GetEntries()<fNumberOfEventsForMixing) return;
4076 
4077  Int_t nEle = fElectronTracks->GetEntries();
4078  Int_t nEvents=fEventBuffer[poolIndex]->GetEntries();
4079 
4080  TObjArray* v1array=0x0;
4081  TObjArray* v2array=0x0;
4082  std::vector<Double_t>* vdl1array=0x0;
4083  std::vector<Double_t>* vdl2array=0x0;
4084  std::vector<Double_t>* vdca1array=0x0;
4085  std::vector<Double_t>* vdca2array=0x0;
4086  Float_t zVertex,cent;
4087  TObjString* eventInfo=0x0;
4088  fEventBuffer[poolIndex]->SetBranchAddress("eventInfo",&eventInfo);
4089  fEventBuffer[poolIndex]->SetBranchAddress("zVertex", &zVertex);
4090  fEventBuffer[poolIndex]->SetBranchAddress("centrality", &cent);
4091  fEventBuffer[poolIndex]->SetBranchAddress("v1array", &v1array);
4092  fEventBuffer[poolIndex]->SetBranchAddress("v2array", &v2array);
4093  fEventBuffer[poolIndex]->SetBranchAddress("vdl1array", &vdl1array);
4094  fEventBuffer[poolIndex]->SetBranchAddress("vdl2array", &vdl2array);
4095  fEventBuffer[poolIndex]->SetBranchAddress("vdca1array", &vdca1array);
4096  fEventBuffer[poolIndex]->SetBranchAddress("vdca2array", &vdca2array);
4097  for (Int_t i=0; i<nEle; i++)
4098  {
4099  TLorentzVector* trke=(TLorentzVector*) fElectronTracks->At(i);
4100  if(!trke)continue;
4101 
4102  for(Int_t iEv=0; iEv<fNumberOfEventsForMixing; iEv++){
4103  fEventBuffer[poolIndex]->GetEvent(iEv + nEvents - fNumberOfEventsForMixing);
4104 
4105  //TObjArray* v1array1=(TObjArray*)v1array->Clone();
4106  Int_t nV01=v1array->GetEntries();
4107  Int_t nV01_test=vdl1array->size();
4108  if(nV01 != nV01_test){
4109  cout<<"Something is wrong"<<endl;
4110  exit(1);
4111  }
4112  for(Int_t iTr1=0; iTr1<nV01; iTr1++){
4113  TLorentzVector* v01=(TLorentzVector*)v1array->At(iTr1);
4114  if(!v01 ) continue;
4115  Double_t v0info1[2];
4116  v0info1[0] = vdl1array->at(iTr1);
4117  v0info1[1] = vdca1array->at(iTr1);
4118  FillMixROOTObjects(trke,v01,v0info1,1);
4119  }//v0 loop
4120 
4121  //TObjArray* v2array1=(TObjArray*)v2array->Clone();
4122  Int_t nV02=v2array->GetEntries();
4123  Int_t nV02_test=vdl2array->size();
4124  if(nV02 != nV02_test){
4125  cout<<"Something is wrong"<<endl;
4126  exit(1);
4127  }
4128  for(Int_t iTr2=0; iTr2<nV02; iTr2++){
4129  TLorentzVector* v02=(TLorentzVector*)v2array->At(iTr2);
4130  if(!v02 ) continue;
4131  Double_t v0info2[2];
4132  v0info2[0] = vdl2array->at(iTr2);
4133  v0info2[1] = vdca2array->at(iTr2);
4134  FillMixROOTObjects(trke,v02,v0info2,-1);
4135  }//v0 loop
4136 
4137  //delete v1array1;
4138  //delete v2array1;
4139  }//event loop
4140 
4141  }//track loop
4142 }
4143 //_________________________________________________________________
4145 {
4146  //
4147  // Analyze AliAODmcparticle
4148  //
4149 
4150  Int_t nmcpart = mcArray->GetEntriesFast();
4151 
4152  Int_t mcevttype = 0;
4153  if(fMCEventType==1 || fMCEventType==2){
4154  for(Int_t i=0;i<nmcpart;i++)
4155  {
4156  AliAODMCParticle *mcpart = (AliAODMCParticle*) mcArray->At(i);
4157  if(TMath::Abs(mcpart->GetPdgCode())==4){
4158  if(fabs(mcpart->Y())<1.5){
4159  if(mcevttype==0){
4160  mcevttype = 1;
4161  }else if(mcevttype==1){
4162  mcevttype = 1;
4163  }else if(mcevttype==2){
4164  mcevttype = 3;
4165  }else if(mcevttype==3){
4166  mcevttype = 3;
4167  }
4168  }
4169  }
4170  if(TMath::Abs(mcpart->GetPdgCode())==5){
4171  if(fabs(mcpart->Y())<1.5){
4172  if(mcevttype==0){
4173  mcevttype = 2;
4174  }else if(mcevttype==1){
4175  mcevttype = 3;
4176  }else if(mcevttype==2){
4177  mcevttype = 2;
4178  }else if(mcevttype==3){
4179  mcevttype = 3;
4180  }
4181  }
4182  }
4183  }
4184  fHistoMCEventType->Fill(mcevttype);
4185  if(fMCEventType==1){
4186  if(mcevttype==2) return kFALSE;
4187  if(( (mcevttype==0) || (mcevttype==3) ) && gRandom->Rndm()<0.5) return kFALSE;
4188  if(mcevttype==3 && gRandom->Rndm()<0.5) return kFALSE;
4189  }else if(fMCEventType==2){
4190  if(mcevttype==1) return kFALSE;
4191  if(( (mcevttype==0) || (mcevttype==3) ) && gRandom->Rndm()<0.5) return kFALSE;
4192  }
4193  }
4194 
4195  for(Int_t i=0;i<nmcpart;i++)
4196  {
4197  AliAODMCParticle *mcpart = (AliAODMCParticle*) mcArray->At(i);
4198  if(TMath::Abs(mcpart->GetPdgCode())==4122){
4199  //cout<<"Lambdac"<<endl;
4200  Bool_t e_flag = kFALSE;
4201  Bool_t lam_flag = kFALSE;
4202  AliAODMCParticle *mcepart = 0;
4203  AliAODMCParticle *mcv0part = 0;
4204  for(Int_t idau=mcpart->GetFirstDaughter();idau<mcpart->GetLastDaughter()+1;idau++)
4205  {
4206  if(idau<0) break;
4207  AliAODMCParticle *mcdau = (AliAODMCParticle*) mcArray->At(idau);
4208  if(!mcdau) continue;
4209  if(TMath::Abs(mcdau->GetPdgCode())==11){
4210  e_flag = kTRUE;
4211  mcepart = mcdau;
4212  }
4213  if(TMath::Abs(mcdau->GetPdgCode())==3122){
4214  lam_flag = kTRUE;
4215  mcv0part = mcdau;
4216  }
4217  }
4218 
4219  Int_t decaytype = -9999;
4220  if(e_flag && lam_flag) decaytype = 0;
4221 
4222  FillMCROOTObjects(mcpart,mcepart,mcv0part,decaytype);
4223  }
4224  if(TMath::Abs(mcpart->GetPdgCode())==4132){
4225  //cout<<"Lambdac"<<endl;
4226  Bool_t e_flag = kFALSE;
4227  Bool_t xi_flag = kFALSE;
4228  Bool_t lam_flag = kFALSE;
4229  AliAODMCParticle *mcepart = 0;
4230  AliAODMCParticle *mccascpart = 0;
4231  AliAODMCParticle *mcv0part = 0;
4232  for(Int_t idau=mcpart->GetFirstDaughter();idau<mcpart->GetLastDaughter()+1;idau++)
4233  {
4234  if(idau<0) break;
4235  AliAODMCParticle *mcdau = (AliAODMCParticle*) mcArray->At(idau);
4236  if(!mcdau) continue;
4237  if(TMath::Abs(mcdau->GetPdgCode())==11){
4238  e_flag = kTRUE;
4239  mcepart = mcdau;
4240  }
4241  if(TMath::Abs(mcdau->GetPdgCode())==3312){
4242  xi_flag = kTRUE;
4243  mccascpart = mcdau;
4244  for(Int_t idauxi=mccascpart->GetFirstDaughter();idauxi<mccascpart->GetLastDaughter()+1;idauxi++)
4245  {
4246  if(idauxi<0) break;
4247  AliAODMCParticle *mcdauxi = (AliAODMCParticle*) mcArray->At(idauxi);
4248  if(!mcdauxi) continue;
4249  if(TMath::Abs(mcdauxi->GetPdgCode())==3122){
4250  lam_flag = kTRUE;
4251  mcv0part = mcdauxi;
4252  }
4253  }
4254  }
4255  }
4256  Int_t decaytype = -9999;
4257  if(e_flag && xi_flag && lam_flag) decaytype = 1;
4258 
4259  FillMCROOTObjects(mcpart,mcepart,mcv0part,decaytype);
4260  }
4261  if(TMath::Abs(mcpart->GetPdgCode())==4232){
4262  //cout<<"Lambdac"<<endl;
4263  Bool_t e_flag = kFALSE;
4264  Bool_t xi_flag = kFALSE;
4265  Bool_t lam_flag = kFALSE;
4266  AliAODMCParticle *mcepart = 0;
4267  AliAODMCParticle *mccascpart = 0;
4268  AliAODMCParticle *mcv0part = 0;
4269  for(Int_t idau=mcpart->GetFirstDaughter();idau<mcpart->GetLastDaughter()+1;idau++)
4270  {
4271  if(idau<0) break;
4272  AliAODMCParticle *mcdau = (AliAODMCParticle*) mcArray->At(idau);
4273  if(!mcdau) continue;
4274  if(TMath::Abs(mcdau->GetPdgCode())==11){
4275  e_flag = kTRUE;
4276  mcepart = mcdau;
4277  }
4278  if(TMath::Abs(mcdau->GetPdgCode())==3322){
4279  xi_flag = kTRUE;
4280  mccascpart = mcdau;
4281  for(Int_t idauxi=mccascpart->GetFirstDaughter();idauxi<mccascpart->GetLastDaughter()+1;idauxi++)
4282  {
4283  if(idauxi<0) break;
4284  AliAODMCParticle *mcdauxi = (AliAODMCParticle*) mcArray->At(idauxi);
4285  if(!mcdauxi) continue;
4286  if(TMath::Abs(mcdauxi->GetPdgCode())==3122){
4287  lam_flag = kTRUE;
4288  mcv0part = mcdauxi;
4289  }
4290  }
4291  }
4292  }
4293  Int_t decaytype = -9999;
4294  if(e_flag && xi_flag && lam_flag) decaytype = 2;
4295 
4296  FillMCROOTObjects(mcpart,mcepart,mcv0part,decaytype);
4297  }
4298 
4299  if(TMath::Abs(mcpart->GetPdgCode())==11 && mcpart->GetStatus()==1){
4300  AliESDtrackCuts *esdcuts = fAnalCuts->GetTrackCuts();
4301  Float_t etamin, etamax;
4302  esdcuts->GetEtaRange(etamin,etamax);
4303  if(fabs(mcpart->Eta())<etamax){
4304  fHistoBachPtMCGen->Fill(mcpart->Pt());
4305  }
4306  FillMCEleROOTObjects(mcpart, mcArray);
4307  }
4308  if(TMath::Abs(mcpart->GetPdgCode())==3122){
4309  Double_t etamin, etamax, rapmin, rapmax;
4310  fAnalCuts->GetProdV0EtaRange(etamin,etamax);
4311  fAnalCuts->GetProdV0RapRange(rapmin,rapmax);
4312 
4313  if((fabs(mcpart->Y())<rapmax) && (fabs(mcpart->Eta())<etamax)){
4314  fHistoLambdaMassvsPtMCGen->Fill(1.115683, mcpart->Pt());
4315  }
4316  FillMCV0ROOTObjects(mcpart, mcArray);
4317  }
4318  }
4319  return kTRUE;
4320 }
Int_t charge
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2
! EFficiency calculation numerator
Bool_t SingleV0Cuts(AliAODv0 *v0, AliAODVertex *vert)
THnSparse * fHistoEleLambdaMassvsElePtRSMix1
! e-Lambda mass vs elept spectra right sign (mixed event)
THnSparse * fHistoEleLambdaMassMCGen
! EFficiency calculation denominator
THnSparse * fHistoEleLambdaPtvsV0dlRS2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtRSMix
! e-Lambda mass vs elept spectra right sign (mixed event)
TH2F * fHistoElectronTOFSelPID
! TOF electron PID after selection
THnSparse * fHistoElePtvsV0dlFeedDownXic0MCS1
! Feeddown subtraction using Lambda vertex distribution
TH2F * fHistoElePtRSMix
! e spectra right sign (mixed event)
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Bool_t fIsMB
Reconstruct primary vertex excluding candidate tracks.
THnSparse * fHistoEleLambdaPtvsV0dlWSMix1
! Feeddown subtraction using Lambda vertex distribution
TObjArray * fElectronTracks
unique event id for mixed event check
THnSparse * fHistoElePtvsV0dlWSSide
! Feeddown subtraction using Lambda vertex distribution
virtual void UserCreateOutputObjects()
Implementation of interface methods.
THnSparse * fHistoElePtvsLambdaPtRSMix
! e-Xi spectra (right-sign, mix)
THnSparse * fHistoElePtvsLambdaPtMCGen
! e-Xi spectra efficiency denominator
THnSparse * fHistoEleLambdaMassvsElePtWS2
! e-Lambda mass vs elept spectra wrong sign
THnSparse * fHistoElePtvsV0dcaMCS
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dlWS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dlWSSide2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS
! EFficiency calculation numerator
TTree * fVariablesTree
flag to decide whether to write the candidate variables on a tree variables
TObjArray * fV0Tracks2
array of lambda-compatible tracks
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen
! EFficiency calculation numerator
TH2F * fHistoElectronTPCPIDSelTOFSmallEta
! TPC electron PID after TOF 3 sigma cut (|eta|<0.6)
THnSparse * fHistoElePtvsV0dlRSSide
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassRSMix
! e-Lambda mass spectra right sign (mixed event)
THnSparse * fHistoEleLambdaPtvsV0dlRSMix
! Feeddown subtraction using Lambda vertex distribution
Int_t fNzVtxBins
maximum number of events to be used in event mixing
TH2D * fHistoResponseElePt
! Response function electron pT <- True ept
TH2D * fHistoResponseEleLambdaPtFeeddownXic01
! Response function e-Lambda pT <- XicPt
THnSparse * fHistoElePtvsV0dlMCS
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtWSMix1
! e-Lambda mass vs elept spectra wrong sign (mixed event)
THnSparse * fHistoElePtvsV0dcaFeedDownXic0MCS2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dcaWSMix2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtRSMix2
! e-Lambda mass vs elept spectra right sign (mixed event)
TTree * fMCVariablesTree
! tree of the candidate variables after track selection on output slot 4
THnSparse * fHistoEleLambdaPtvsV0dlRS1
! Feeddown subtraction using Lambda vertex distribution
Float_t * fCandidateMCEleVariables
! variables to be written to the tree
void FillMCROOTObjects(AliAODMCParticle *part, AliAODMCParticle *mcepart, AliAODMCParticle *mcv0part, Int_t decaytype)
THnSparse * fHistoElePtvsV0dcaFeedDownXic0MCS1
! Feeddown subtraction using Lambda vertex distribution
void FillMixROOTObjects(TLorentzVector *et, TLorentzVector *ev, Double_t *v0info, Int_t charge)
THnSparse * fHistoEleLambdaPtvsV0dlMCS1
! Feeddown subtraction using Lambda vertex distribution
void FillMCV0ROOTObjects(AliAODMCParticle *mcv0part, TClonesArray *mcArray)
TH2D * fHistoResponseElePt1
! Response function electron pT <- True ept
THnSparse * fHistoElePtvsd0RSMix
! e pt-d0 spectra (right-sign, mix)
THnSparse * fHistoElePtvsV0dlFeedDownXicPlusMCS
! Feeddown subtraction using Lambda vertex distribution
AliAODv0 * Getv0() const
THnSparse * fHistoEleLambdaPtvsV0dlMCS
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dlFeedDownXicPlusMCS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtRSSide1
! e-Lambda mass vs elept spectra right sign (mixed event)
TList * fOutputAll
! User Output slot 3 //analysis histograms
THnSparse * fHistoElePtvsV0dcaRS
! Feeddown subtraction using Lambda vertex distribution
TH2D * fHistoResponseEleLambdaPtFeeddownXicPlus
! Response function e-Lambda pT <- XicPt
THnSparse * fHistoElePtvsV0dcaWS2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtRS
! e-Lambda mass vs elept spectra right sign
THnSparse * fHistoElePtvsV0dcaWSMix
! Feeddown subtraction using Lambda vertex distribution
TH2F * fHistoElePtFeeddownXicPlusMCS
! EFficiency calculation numerator
THnSparse * fHistoEleLambdaMassFeeddownXic0MCGen
! EFficiency calculation numerator
THnSparse * fHistoElePtvsV0dcaFeedDownXicPlusMCS2
! Feeddown subtraction using Lambda vertex distribution
TH2D * fHistoResponseEleLambdaPtFeeddownXic02
! Response function e-Lambda pT <- XicPt
THnSparse * fHistoEleLambdaMassvsElePtRS1
! e-Lambda mass vs elept spectra right sign
TH2D * fHistoResponseElePt2
! Response function electron pT <- True ept
AliAODVertex * PrimaryVertex(const TObjArray *trkArray, AliVEvent *event)
THnSparse * fHistoElePtvsLambdaPtFeeddownXic0MCS
! e-Xi spectra efficiency numerator
THnSparse * fHistoEleLambdaMassMCS
! EFficiency calculation numerator
TH2F * fHistoElePtMCGen
! EFficiency calculation denominator
TH2F * fHistoElePtWSMix
! e spectra wrong sign (mixed event)
void FillMCEleROOTObjects(AliAODMCParticle *mcepart, TClonesArray *mcArray)
THnSparse * fHistoEleLambdaPtvsV0dlRSSide2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsd0PromptMCS
! e pt-d0 spectra (right-sign)
THnSparse * fHistoEleLambdaMassFeeddownXicPlusMCS
! EFficiency calculation numerator
THnSparse * fHistoElePtvsV0dcaWS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2
! EFficiency calculation numerator
THnSparse * fHistoElePtvsV0dcaRSMix1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2
! Feeddown subtraction using Lambda vertex distribution
Float_t * fCandidateMCVariables
! variables to be written to the tree
THnSparse * fHistoElePtvsLambdaPtFeeddownXic0MCGen
! e-Xi spectra efficiency numerator
TRandom * gRandom
Double_t GetMaxVtxZ() const
Definition: AliRDHFCuts.h:241
THnSparse * fHistoEleLambdaPtvsV0dlWSMix2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsCutVarsWS[17]
! e pt- cut variables (Wrong-sign)
THnSparse * fHistoElePtvsLambdaPtMCS
! e-Xi spectra efficiency numerator
THnSparse * fHistoEleLambdaMassvsElePtWSSide
! e-Lambda mass vs elept spectra wrong sign (mixed event)
THnSparse * fHistoEleLambdaMassFeeddownXic0MCS
! EFficiency calculation numerator
THnSparse * fHistoEleLambdaMassWS
! e-Lambda mass spectra wrong sign
THnSparse * fHistoElePtvsV0dlWSMix
! Feeddown subtraction using Lambda vertex distribution
AliAODPidHF * GetPidHF() const
Definition: AliRDHFCuts.h:231
Bool_t fWriteMCVariableTree
flag to decide whether to write the candidate variables on a tree variables
THnSparse * fHistoElePtvsV0dlFeedDownXic0MCS2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dcaRSMix2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXic0MCS1
! EFficiency calculation numerator
THnSparse * fHistoElePtvsV0dcaWSSide2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsEtaMCGen
! e spectra efficiency denominator
THnSparse * fHistoEleLambdaPtvsV0dlWSSide
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElectronMCGen
! electron in mcArray (only from charmed baryon)
THnSparse * fHistoElePtvsV0dlRSSide2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsd0BFeeddownMCS
! e pt-d0 spectra (right-sign)
const Double_t etamin
THnSparse * fHistoEleLambdaPtvsV0dlWS
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtWSMix2
! e-Lambda mass vs elept spectra wrong sign (mixed event)
THnSparse * fHistoElePtvsV0dlRS
! Feeddown subtraction using Lambda vertex distribution
void SelectTrack(const AliVEvent *event, Int_t trkEntries, Int_t &nSeleTrks, Bool_t *seleFlags, TClonesArray *mcArray)
THnSparse * fHistoElePtvsV0dcaRSSide
! Feeddown subtraction using Lambda vertex distribution
Bool_t fWriteEachVariableTree
flag to decide whether to write the candidate variables on a tree variables
TH2D * fHistoResponseEleLambdaPt1
! Response function e-Lambda pT <- XicPt
std::vector< Double_t > fV0dcaArray1
array of antilambda-compatible tracks' information
Float_t * fCandidateMCV0Variables
! variables to be written to the tree
TH2D * fHistoResponseEleLambdaPt
! Response function e-Lambda pT <- XicPt
THnSparse * fHistoEleLambdaPtvsV0dlMCS2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaPtvsV0dlWSMix
! Feeddown subtraction using Lambda vertex distribution
void FillElectronROOTObjects(AliAODTrack *trk, TClonesArray *mcArray)
TH2F * fHistoElectronTPCPIDSelTOFLargeEta
! TPC electron PID after TOF 3 sigma cut (0.8>|eta|>0.6)
THnSparse * fHistoElePtvsV0dlWSSide1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassRSSide
! e-Lambda mass spectra right sign (mixed event)
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXic0MCGen
! EFficiency calculation numerator
THnSparse * fHistoElePtvsV0dcaRSSide2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXic0MCS2
! EFficiency calculation numerator
THnSparse * fHistoEleLambdaPtvsV0dlWS2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dlRS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dlRS2
! Feeddown subtraction using Lambda vertex distribution
TH2F * fHistoElePtFeeddownXicPlusMCGen
! EFficiency calculation numerator
AliAODTrack * GetBachelor() const
THnSparse * fHistoEleLambdaMassvsElePtRSSide
! e-Lambda mass vs elept spectra right sign (mixed event)
TH2F * fHistoElePtFeeddownXic0MCGen
! EFficiency calculation numerator
void FillROOTObjects(AliAODRecoCascadeHF *elobj, AliAODv0 *v0, AliAODTrack *trk, TClonesArray *mcArray)
THnSparse * fHistoElePtvsV0dlMCS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsCutVarsRS[17]
! e pt- cut variables (Right-sign)
THnSparse * fHistoElePtvsLambdaPtWSMix
! e-Xi spectra (wrong-sign, mix)
AliESDtrackCuts * GetTrackCuts() const
Definition: AliRDHFCuts.h:245
std::vector< Double_t > fV0dcaArray2
array of lambda-compatible tracks' information
void SetProngIDs(Int_t nIDs, UShort_t *id)
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1
! EFficiency calculation numerator
THnSparse * fHistoElePtvsV0dcaWS
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dcaRS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtMCS
! EFficiency calculation numerator
THnSparse * fHistoEleLambdaPtvsV0dlRS
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dlWS2
! Feeddown subtraction using Lambda vertex distribution
TH2F * fHistoElePtFeeddownXic0MCS
! EFficiency calculation numerator
THnSparse * fHistoElePtvsd0WSMix
! e pt-d0 spectra (wrong-sign, mix)
THnSparse * fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS
! Feeddown subtraction using Lambda vertex distribution
AliPIDResponse * GetPidResponse() const
Definition: AliAODPidHF.h:160
TTree * fMCV0VariablesTree
! tree of the candidate variables after track selection on output slot 4
THnSparse * fHistoEleLambdaPtvsV0dlFeedDownXic0MCS
! Feeddown subtraction using Lambda vertex distribution
TH2F * fHistoElectronTPCPIDSelTOF
! TPC electron PID after TOF 3 sigma cut
THnSparse * fHistoEleLambdaMassFeeddownXicPlusMCGen
! EFficiency calculation numerator
THnSparse * fHistoElePtvsV0dlWSMix2
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoLambdaMCGen
! Lambda in mcArray (only from charmed baryon)
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Int_t MatchToMC(AliAODRecoCascadeHF *elobj, TClonesArray *mcArray, Int_t *pdgele_array, Int_t *pdgv0_array, Int_t *labelele_array, Int_t *labelv0_array, Int_t &ngen_ele, Int_t &ngen_v0)
Bool_t IsEventRejectedDuePhysicsSelection() const
Definition: AliRDHFCuts.h:319
THnSparse * fHistoEleLambdaMassvsElePtWSMix
! e-Lambda mass vs elept spectra wrong sign (mixed event)
THnSparse * fHistoElePtvsEtaFeeddownXicPlusMCGen
! e spectra efficiency numerator
THnSparse * fHistoElePtvsV0dcaRSMix
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsV0dlWS
! Feeddown subtraction using Lambda vertex distribution
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
THnSparse * fHistoElePtvsEtaFeeddownXic0MCGen
! e spectra efficiency numerator
THnSparse * fHistoElePtvsV0dcaWSSide1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaMassvsElePtRS2
! e-Lambda mass vs elept spectra right sign
THnSparse * fHistoElePtvsV0dcaMCS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoEleLambdaPtvsV0dlRSMix1
! Feeddown subtraction using Lambda vertex distribution
TH2D * fHistoResponseEleLambdaPtFeeddownXic0
! Response function e-Lambda pT <- XicPt
THnSparse * fHistoEleLambdaMass
MC eventtype to analyze 1: ccbar 2: bbbar (rest is assigned to 1 or 2 with 50% prob) ...
TTree * fMCEleVariablesTree
! tree of the candidate variables after track selection on output slot 4
THnSparse * fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1
! EFficiency calculation numerator
TTree * fV0VariablesTree
! tree of the candidate variables after track selection on output slot 4
THnSparse * fHistoElePtvsLambdaPtvsLcPtMCGen
! e-Xi spectra efficiency denominator
THnSparse * fHistoEleLambdaMassWSSide
! e-Lambda mass spectra wrong sign (mixed event)
void SelectV0(const AliVEvent *event, Int_t nV0, Int_t &nSeleV0, Bool_t *seleV0Flags, TClonesArray *mcArray)
THnSparse * fHistoEleLambdaMassWSMix
! e-Lambda mass spectra wrong sign (mixed event)
THnSparse * fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1
! Feeddown subtraction using Lambda vertex distribution
THnSparse * fHistoElePtvsEtaFeeddownXic0MCS
! e spectra efficiency numerator
Float_t * fCandidateEleVariables
! variables to be written to the tree
AliNormalizationCounter * fCounter
! Counter for normalization
THnSparse * fHistoElePtvsV0dcaWSSide
! Feeddown subtraction using Lambda vertex distribution
Bool_t IsEventSelected(AliVEvent *event)
THnSparse * fHistoElePtvsLambdaPtMCLcGen
! e-Xi spectra efficiency denominator
THnSparse * fHistoElePtvsEtaFeeddownXicPlusMCS
! e spectra efficiency numerator
THnSparse * fHistoElePtvsLambdaPtFeeddownXicPlusMCS
! e-Xi spectra efficiency numerator
THnSparse * fHistoElePtvsLambdaPtFeeddownXicPlusMCGen
! e-Xi spectra efficiency numerator
THnSparse * fHistoElePtvsV0dlMCS2
! Feeddown subtraction using Lambda vertex distribution
Float_t nEvents[nProd]
THnSparse * fHistoEleLambdaPtvsV0dlRSMix2
! Feeddown subtraction using Lambda vertex distribution
AliAODVertex * CallPrimaryVertex(AliAODv0 *v0, AliAODTrack *trk, AliAODEvent *evt)
THnSparse * fHistoElePtvsEtaMCS
! e spectra efficiency numerator
THnSparse * fHistoEleLambdaMassvsElePtWS1
! e-Lambda mass vs elept spectra wrong sign
TH1F * fHTrigger
! Histogram to check Trigger
Definition: