AliPhysics  9fe175b (9fe175b)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 "TROOT.h"
46 #include <TDatabasePDG.h>
47 #include <AliAnalysisDataSlot.h>
48 #include <AliAnalysisDataContainer.h>
49 #include "AliStack.h"
50 #include "AliMCEvent.h"
51 #include "AliAnalysisManager.h"
52 #include "AliAODMCHeader.h"
53 #include "AliAODHandler.h"
54 #include "AliLog.h"
55 #include "AliExternalTrackParam.h"
56 #include "AliAODVertex.h"
57 #include "AliESDVertex.h"
58 #include "AliAODRecoDecay.h"
59 #include "AliAODRecoDecayHF.h"
60 #include "AliAODRecoCascadeHF.h"
61 #include "AliESDtrack.h"
62 #include "AliAODTrack.h"
63 #include "AliAODv0.h"
64 #include "AliAODcascade.h"
65 #include "AliAODMCParticle.h"
66 #include "AliAnalysisTaskSE.h"
68 #include "AliPIDResponse.h"
69 #include "AliPIDCombined.h"
70 #include "AliTOFPIDResponse.h"
71 #include "AliAODPidHF.h"
72 #include "AliInputEventHandler.h"
73 #include "AliESDtrackCuts.h"
74 #include "AliNeutralTrackParam.h"
75 #include "AliKFParticle.h"
76 #include "AliKFVertex.h"
77 #include "AliExternalTrackParam.h"
78 #include "AliESDtrack.h"
79 #include "AliCentrality.h"
80 #include "AliVertexerTracks.h"
81 #include "AliEventPoolManager.h"
83 #include "AliVertexingHFUtils.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  fHNTrackletvsZ(0),
103  fHNTrackletCorrvsZ(0),
104  fAnalCuts(0),
105  fIsEventSelected(kFALSE),
106  fWriteVariableTree(kFALSE),
107  fWriteEachVariableTree(kFALSE),
108  fWriteMCVariableTree(kFALSE),
109  fVariablesTree(0),
110  fEleVariablesTree(0),
111  fV0VariablesTree(0),
112  fMCVariablesTree(0),
113  fMCEleVariablesTree(0),
114  fMCV0VariablesTree(0),
115  fMCGenPairVariablesTree(0),
116  fCorrelationVariablesTree(0),
117  fReconstructPrimVert(kFALSE),
118  fIsMB(kFALSE),
119  fIsSemi(kFALSE),
120  fIsCent(kFALSE),
121  fIsINT7(kFALSE),
122  fIsEMC7(kFALSE),
123  fCandidateVariables(),
124  fCandidateEleVariables(),
125  fCandidateV0Variables(),
126  fCandidateMCVariables(),
127  fCandidateMCEleVariables(),
128  fCandidateMCV0Variables(),
129  fCandidateMCGenPairVariables(),
130  fCorrelationVariables(),
131  fVtx1(0),
132  fV1(0),
133  fVtxZ(0),
134  fBzkG(0),
135  fCentrality(0),
136  fRunNumber(0),
137  fTriggerCheck(0),
138  fUseCentralityV0M(kFALSE),
139  fUseCentralitySPDTracklet(kFALSE),
140  fEvNumberCounter(0),
141  fMCEventType(-9999),
142  fMCDoPairAnalysis(kFALSE),
143  fHistoEleLambdaMass(0),
144  fHistoEleLambdaMassRS(0),
145  fHistoEleLambdaMassRS1(0),
146  fHistoEleLambdaMassRS2(0),
147  fHistoEleLambdaMassWS(0),
148  fHistoEleLambdaMassWS1(0),
149  fHistoEleLambdaMassWS2(0),
150  fHistoEleLambdaMassRSMix(0),
151  fHistoEleLambdaMassRSMix1(0),
152  fHistoEleLambdaMassRSMix2(0),
153  fHistoEleLambdaMassWSMix(0),
154  fHistoEleLambdaMassWSMix1(0),
155  fHistoEleLambdaMassWSMix2(0),
156  fHistoEleLambdaMassRSSide(0),
157  fHistoEleLambdaMassRSSide1(0),
158  fHistoEleLambdaMassRSSide2(0),
159  fHistoEleLambdaMassWSSide(0),
160  fHistoEleLambdaMassWSSide1(0),
161  fHistoEleLambdaMassWSSide2(0),
162  fHistoEleLambdaMassRSAway(0),
163  fHistoEleLambdaMassRS1Away(0),
164  fHistoEleLambdaMassRS2Away(0),
165  fHistoEleLambdaMassWSAway(0),
166  fHistoEleLambdaMassWS1Away(0),
167  fHistoEleLambdaMassWS2Away(0),
168  fHistoEleLambdaMassRSMixAway(0),
169  fHistoEleLambdaMassRSMix1Away(0),
170  fHistoEleLambdaMassRSMix2Away(0),
171  fHistoEleLambdaMassWSMixAway(0),
172  fHistoEleLambdaMassWSMix1Away(0),
173  fHistoEleLambdaMassWSMix2Away(0),
174  fHistoEleLambdaMassRSSideAway(0),
175  fHistoEleLambdaMassRSSide1Away(0),
176  fHistoEleLambdaMassRSSide2Away(0),
177  fHistoEleLambdaMassWSSideAway(0),
178  fHistoEleLambdaMassWSSide1Away(0),
179  fHistoEleLambdaMassWSSide2Away(0),
180  fHistoEleLambdaMassvsElePtRS(0),
181  fHistoEleLambdaMassvsElePtWS(0),
182  fHistoEleLambdaMassvsElePtRSMix(0),
183  fHistoEleLambdaMassvsElePtWSMix(0),
184  fHistoEleLambdaMassvsElePtRSSide(0),
185  fHistoEleLambdaMassvsElePtWSSide(0),
186  fHistoEleLambdaMassvsElePtRS1(0),
187  fHistoEleLambdaMassvsElePtWS1(0),
188  fHistoEleLambdaMassvsElePtRSMix1(0),
189  fHistoEleLambdaMassvsElePtWSMix1(0),
190  fHistoEleLambdaMassvsElePtRSSide1(0),
191  fHistoEleLambdaMassvsElePtWSSide1(0),
192  fHistoEleLambdaMassvsElePtRS2(0),
193  fHistoEleLambdaMassvsElePtWS2(0),
194  fHistoEleLambdaMassvsElePtRSMix2(0),
195  fHistoEleLambdaMassvsElePtWSMix2(0),
196  fHistoEleLambdaMassvsElePtRSSide2(0),
197  fHistoEleLambdaMassvsElePtWSSide2(0),
198  fHistoElePtRS(0),
199  fHistoElePtWS(0),
200  fHistoElePtRSMix(0),
201  fHistoElePtWSMix(0),
202  fHistoEleLambdaMassMCS(0),
203  fHistoEleLambdaMassLambdabMCS(0),
204  fHistoEleLambdaMassXibMCS(0),
205  fHistoEleLambdaMassMCGen(0),
206  fHistoEleLambdaMassvsElePtMCS(0),
207  fHistoEleLambdaMassvsElePtMCGen(0),
208  fHistoEleLambdaMassvsElePtMCS1(0),
209  fHistoEleLambdaMassvsElePtMCGen1(0),
210  fHistoEleLambdaMassvsElePtMCS2(0),
211  fHistoEleLambdaMassvsElePtMCGen2(0),
212  fHistoElePtMCS(0),
213  fHistoElePtMCGen(0),
214  fHistoElePtvsEtaRS(0),
215  fHistoElePtvsEtaWS(0),
216  fHistoElePtvsEtaRSMix(0),
217  fHistoElePtvsEtaWSMix(0),
218  fHistoElePtvsEtaMCS(0),
219  fHistoElePtvsEtaMCGen(0),
220  fHistoElePtvsLambdaPtRS(0),
221  fHistoElePtvsLambdaPtWS(0),
222  fHistoElePtvsLambdaPtRSMix(0),
223  fHistoElePtvsLambdaPtWSMix(0),
224  fHistoElePtvsLambdaPtMCS(0),
225  fHistoElePtvsLambdaPtvsLcPtMCS(0),
226  fHistoElePtvsLambdaPtMCGen(0),
227  fHistoElePtvsLambdaPtvsLcPtMCGen(0),
228  fHistoElePtvsLambdaPtMCLcGen(0),
229  fHistoElePtvsd0RS(0),
230  fHistoElePtvsd0WS(0),
231  fHistoElePtvsd0RSMix(0),
232  fHistoElePtvsd0WSMix(0),
233  fHistoElePtvsd0MCS(0),
234  fHistoElePtvsd0PromptMCS(0),
235  fHistoElePtvsd0BFeeddownMCS(0),
236  fHistoEleLambdaMassFeeddownXic0MCS(0),
237  fHistoEleLambdaMassFeeddownXic0MCGen(0),
238  fHistoEleLambdaMassvsElePtFeeddownXic0MCS(0),
239  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen(0),
240  fHistoEleLambdaMassvsElePtFeeddownXic0MCS1(0),
241  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1(0),
242  fHistoEleLambdaMassvsElePtFeeddownXic0MCS2(0),
243  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2(0),
244  fHistoElePtFeeddownXic0MCS(0),
245  fHistoElePtFeeddownXic0MCGen(0),
246  fHistoElePtvsEtaFeeddownXic0MCS(0),
247  fHistoElePtvsEtaFeeddownXic0MCGen(0),
248  fHistoElePtvsLambdaPtFeeddownXic0MCS(0),
249  fHistoElePtvsLambdaPtFeeddownXic0MCGen(0),
250  fHistoEleLambdaMassFeeddownXicPlusMCS(0),
251  fHistoEleLambdaMassFeeddownXicPlusMCGen(0),
252  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS(0),
253  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen(0),
254  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1(0),
255  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1(0),
256  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS2(0),
257  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2(0),
258  fHistoElePtFeeddownXicPlusMCS(0),
259  fHistoElePtFeeddownXicPlusMCGen(0),
260  fHistoElePtvsEtaFeeddownXicPlusMCS(0),
261  fHistoElePtvsEtaFeeddownXicPlusMCGen(0),
262  fHistoElePtvsLambdaPtFeeddownXicPlusMCS(0),
263  fHistoElePtvsLambdaPtFeeddownXicPlusMCGen(0),
264  fHistoBachPt(0),
265  fHistoBachPtMCS(0),
266  fHistoBachPtMCGen(0),
267  fHistod0Bach(0),
268  fHistoLambdaMassvsPt(0),
269  fHistoLambdaMassvsPtMCS(0),
270  fHistoLambdaMassvsPtMCGen(0),
271  fHistoLambdaPtvsEta(0),
272  fHistoLambdaPtvsEtaMCS(0),
273  fHistoLambdaPtvsEtaMCGen(0),
274  fHistoLambdaArmenteros(0),
275  fHistoLambdaArmenterosMCS(0),
276  fHistoLambdaPtvsDl(0),
277  fHistoLambdaPtvsDlSide(0),
278  fHistoLambdaPtvsDlMCS(0),
279  fHistoLambdaPtvsDlFeeddownXi0MCS(0),
280  fHistoLambdaPtvsDlFeeddownXiMinusMCS(0),
281  fHistoLambdaPtvsDlFeeddownOmegaMCS(0),
282  fHistoK0sMassvsPt(0),
283  fHistoElectronTPCPID(0),
284  fHistoElectronTOFPID(0),
285  fHistoElectronTPCSelPID(0),
286  fHistoElectronTOFSelPID(0),
287  fHistoElectronTPCPIDSelTOF(0),
288  fHistoElectronTPCPIDSelTOFSmallEta(0),
289  fHistoElectronTPCPIDSelTOFLargeEta(0),
290  fHistoMassConversionsMin(0),
291  fHistoMassConversionsSameSignMin(0),
292  fHistoElectronQovPtvsPhi(0),
293  fHistoLambdaQovPtvsPhi(0),
294  fHistoLcMCGen(0),
295  fHistoLcMCGen1(0),
296  fHistoLcMCGen2(0),
297  fHistoLbMCGen(0),
298  fHistoLbMCGen1(0),
299  fHistoLbMCGen2(0),
300  fHistoLcMCGenWithEleA(0),
301  fHistoLcMCGenWithEleB(0),
302  fHistoLbMCGenWithEleA(0),
303  fHistoLbMCGenWithEleB(0),
304  fHistoLbMCGenWithLambdac(0),
305  fHistoLcMCS(0),
306  fHistoLcMCS1(0),
307  fHistoLcMCS2(0),
308  fHistoLbMCS(0),
309  fHistoLbMCS1(0),
310  fHistoLbMCS2(0),
311  fHistoFeedDownXic0MCGen(0),
312  fHistoFeedDownXic0MCGen1(0),
313  fHistoFeedDownXic0MCGen2(0),
314  fHistoFeedDownXic0MCS(0),
315  fHistoFeedDownXic0MCS1(0),
316  fHistoFeedDownXic0MCS2(0),
317  fHistoFeedDownXicPlusMCGen(0),
318  fHistoFeedDownXicPlusMCGen1(0),
319  fHistoFeedDownXicPlusMCGen2(0),
320  fHistoFeedDownXicPlusMCS(0),
321  fHistoFeedDownXicPlusMCS1(0),
322  fHistoFeedDownXicPlusMCS2(0),
323  fHistoFeedDownSigmaMCGen(0),
324  fHistoFeedDownSigmaMCGen1(0),
325  fHistoFeedDownSigmaMCGen2(0),
326  fHistoFeedDownSigmaMCS(0),
327  fHistoFeedDownSigmaMCS1(0),
328  fHistoFeedDownSigmaMCS2(0),
329  fHistoLcElectronMCGen(0),
330  fHistoLcElectronMCGen1(0),
331  fHistoLcElectronMCGen2(0),
332  fHistoLcElectronMCS(0),
333  fHistoLcElectronMCS1(0),
334  fHistoLcElectronMCS2(0),
335  fHistoLbElectronMCGen(0),
336  fHistoLbElectronMCGen1(0),
337  fHistoLbElectronMCGen2(0),
338  fHistoLbElectronMCS(0),
339  fHistoLbElectronMCS1(0),
340  fHistoLbElectronMCS2(0),
341  fHistoElectronFeedDownXic0MCGen(0),
342  fHistoElectronFeedDownXic0MCGen1(0),
343  fHistoElectronFeedDownXic0MCGen2(0),
344  fHistoElectronFeedDownXic0MCS(0),
345  fHistoElectronFeedDownXic0MCS1(0),
346  fHistoElectronFeedDownXic0MCS2(0),
347  fHistoElectronFeedDownXicPlusMCGen(0),
348  fHistoElectronFeedDownXicPlusMCGen1(0),
349  fHistoElectronFeedDownXicPlusMCGen2(0),
350  fHistoElectronFeedDownXicPlusMCS(0),
351  fHistoElectronFeedDownXicPlusMCS1(0),
352  fHistoElectronFeedDownXicPlusMCS2(0),
353  fHistoElectronFeedDownXibMCGen(0),
354  fHistoElectronFeedDownXibMCGen1(0),
355  fHistoElectronFeedDownXibMCGen2(0),
356  fHistoElectronFeedDownXibMCS(0),
357  fHistoElectronFeedDownXibMCS1(0),
358  fHistoElectronFeedDownXibMCS2(0),
359  fHistoElectronMCGen(0),
360  fHistoBottomElectronMCGen(0),
361  fHistoCharmElectronMCGen(0),
362  fHistoLambdaMCGen(0),
363  fHistoElePtvsV0dlRS(0),
364  fHistoElePtvsV0dlRS1(0),
365  fHistoElePtvsV0dlRS2(0),
366  fHistoElePtvsV0dlRSSide(0),
367  fHistoElePtvsV0dlRSSide1(0),
368  fHistoElePtvsV0dlRSSide2(0),
369  fHistoElePtvsV0dlRSMix(0),
370  fHistoElePtvsV0dlRSMix1(0),
371  fHistoElePtvsV0dlRSMix2(0),
372  fHistoElePtvsV0dlWS(0),
373  fHistoElePtvsV0dlWS1(0),
374  fHistoElePtvsV0dlWS2(0),
375  fHistoElePtvsV0dlWSSide(0),
376  fHistoElePtvsV0dlWSSide1(0),
377  fHistoElePtvsV0dlWSSide2(0),
378  fHistoElePtvsV0dlWSMix(0),
379  fHistoElePtvsV0dlWSMix1(0),
380  fHistoElePtvsV0dlWSMix2(0),
381  fHistoElePtvsV0dlMCS(0),
382  fHistoElePtvsV0dlMCS1(0),
383  fHistoElePtvsV0dlMCS2(0),
384  fHistoElePtvsV0dlFeedDownXic0MCS(0),
385  fHistoElePtvsV0dlFeedDownXic0MCS1(0),
386  fHistoElePtvsV0dlFeedDownXic0MCS2(0),
387  fHistoElePtvsV0dlFeedDownXicPlusMCS(0),
388  fHistoElePtvsV0dlFeedDownXicPlusMCS1(0),
389  fHistoElePtvsV0dlFeedDownXicPlusMCS2(0),
390  fHistoElePtvsV0dcaRS(0),
391  fHistoElePtvsV0dcaRS1(0),
392  fHistoElePtvsV0dcaRS2(0),
393  fHistoElePtvsV0dcaRSSide(0),
394  fHistoElePtvsV0dcaRSSide1(0),
395  fHistoElePtvsV0dcaRSSide2(0),
396  fHistoElePtvsV0dcaRSMix(0),
397  fHistoElePtvsV0dcaRSMix1(0),
398  fHistoElePtvsV0dcaRSMix2(0),
399  fHistoElePtvsV0dcaWS(0),
400  fHistoElePtvsV0dcaWS1(0),
401  fHistoElePtvsV0dcaWS2(0),
402  fHistoElePtvsV0dcaWSSide(0),
403  fHistoElePtvsV0dcaWSSide1(0),
404  fHistoElePtvsV0dcaWSSide2(0),
405  fHistoElePtvsV0dcaWSMix(0),
406  fHistoElePtvsV0dcaWSMix1(0),
407  fHistoElePtvsV0dcaWSMix2(0),
408  fHistoElePtvsV0dcaMCS(0),
409  fHistoElePtvsV0dcaMCS1(0),
410  fHistoElePtvsV0dcaMCS2(0),
411  fHistoElePtvsV0dcaFeedDownXic0MCS(0),
412  fHistoElePtvsV0dcaFeedDownXic0MCS1(0),
413  fHistoElePtvsV0dcaFeedDownXic0MCS2(0),
414  fHistoElePtvsV0dcaFeedDownXicPlusMCS(0),
415  fHistoElePtvsV0dcaFeedDownXicPlusMCS1(0),
416  fHistoElePtvsV0dcaFeedDownXicPlusMCS2(0),
417  fHistoEleLambdaPtvsV0dlRS(0),
418  fHistoEleLambdaPtvsV0dlRS1(0),
419  fHistoEleLambdaPtvsV0dlRS2(0),
420  fHistoEleLambdaPtvsV0dlRSSide(0),
421  fHistoEleLambdaPtvsV0dlRSSide1(0),
422  fHistoEleLambdaPtvsV0dlRSSide2(0),
423  fHistoEleLambdaPtvsV0dlRSMix(0),
424  fHistoEleLambdaPtvsV0dlRSMix1(0),
425  fHistoEleLambdaPtvsV0dlRSMix2(0),
426  fHistoEleLambdaPtvsV0dlWS(0),
427  fHistoEleLambdaPtvsV0dlWS1(0),
428  fHistoEleLambdaPtvsV0dlWS2(0),
429  fHistoEleLambdaPtvsV0dlWSSide(0),
430  fHistoEleLambdaPtvsV0dlWSSide1(0),
431  fHistoEleLambdaPtvsV0dlWSSide2(0),
432  fHistoEleLambdaPtvsV0dlWSMix(0),
433  fHistoEleLambdaPtvsV0dlWSMix1(0),
434  fHistoEleLambdaPtvsV0dlWSMix2(0),
435  fHistoEleLambdaPtvsV0dlMCS(0),
436  fHistoEleLambdaPtvsV0dlMCS1(0),
437  fHistoEleLambdaPtvsV0dlMCS2(0),
438  fHistoEleLambdaPtvsV0dlPromptMCS(0),
439  fHistoEleLambdaPtvsV0dlPromptMCS1(0),
440  fHistoEleLambdaPtvsV0dlPromptMCS2(0),
441  fHistoEleLambdaPtvsV0dlBFeeddownMCS(0),
442  fHistoEleLambdaPtvsV0dlBFeeddownMCS1(0),
443  fHistoEleLambdaPtvsV0dlBFeeddownMCS2(0),
444  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS(0),
445  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1(0),
446  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2(0),
447  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS(0),
448  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS1(0),
449  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS2(0),
450  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS(0),
451  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS1(0),
452  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS2(0),
453  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS(0),
454  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1(0),
455  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2(0),
456  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS(0),
457  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS1(0),
458  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS2(0),
459  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS(0),
460  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS1(0),
461  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS2(0),
462  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS(0),
463  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS1(0),
464  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS2(0),
465  fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS(0),
466  fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS1(0),
467  fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS2(0),
468  fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS(0),
469  fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS1(0),
470  fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS2(0),
471  fHistoEleLambdaPtvsV0dlLambdabMCS(0),
472  fHistoEleLambdaPtvsV0dlLambdabMCS1(0),
473  fHistoEleLambdaPtvsV0dlLambdabMCS2(0),
474  fHistoEleLambdaPtvsV0dlXibMCS(0),
475  fHistoEleLambdaPtvsV0dlXibMCS1(0),
476  fHistoEleLambdaPtvsV0dlXibMCS2(0),
477  fHistoEleLambdaPtvsV0dlRSAway(0),
478  fHistoEleLambdaPtvsV0dlRS1Away(0),
479  fHistoEleLambdaPtvsV0dlRS2Away(0),
480  fHistoEleLambdaPtvsV0dlRSSideAway(0),
481  fHistoEleLambdaPtvsV0dlRSSide1Away(0),
482  fHistoEleLambdaPtvsV0dlRSSide2Away(0),
483  fHistoEleLambdaPtvsV0dlRSMixAway(0),
484  fHistoEleLambdaPtvsV0dlRSMix1Away(0),
485  fHistoEleLambdaPtvsV0dlRSMix2Away(0),
486  fHistoEleLambdaPtvsV0dlWSAway(0),
487  fHistoEleLambdaPtvsV0dlWS1Away(0),
488  fHistoEleLambdaPtvsV0dlWS2Away(0),
489  fHistoEleLambdaPtvsV0dlWSSideAway(0),
490  fHistoEleLambdaPtvsV0dlWSSide1Away(0),
491  fHistoEleLambdaPtvsV0dlWSSide2Away(0),
492  fHistoEleLambdaPtvsV0dlWSMixAway(0),
493  fHistoEleLambdaPtvsV0dlWSMix1Away(0),
494  fHistoEleLambdaPtvsV0dlWSMix2Away(0),
495  fHistoCorrelationVariablesvsEleLambdaPt(0),
496  fHistoCorrelationVariablesvsEleLambdaPtMix(0),
497  fHistoCorrelationVariablesvsEleLambdaPtMC(0),
498  fHistoCorrelationVariablesvsElePt(0),
499  fHistoCorrelationVariablesvsElePtMix(0),
500  fHistoCorrelationVariablesvsElePtMC(0),
501  fHistoCorrelationVariablesvsLambdaPt(0),
502  fHistoCorrelationVariablesvsLambdaPtMix(0),
503  fHistoCorrelationVariablesvsLambdaPtMC(0),
504  fHistoMassVariablesvsEleLambdaPt(0),
505  fHistoMassVariablesvsEleLambdaPtMix(0),
506  fHistoMassVariablesvsEleLambdaPtMC(0),
507  fHistoMassVariablesvsElePt(0),
508  fHistoMassVariablesvsElePtMix(0),
509  fHistoMassVariablesvsElePtMC(0),
510  fHistoMassVariablesvsLambdaPt(0),
511  fHistoMassVariablesvsLambdaPtMix(0),
512  fHistoMassVariablesvsLambdaPtMC(0),
513  fHistoResponseElePt(0),
514  fHistoResponseElePt1(0),
515  fHistoResponseElePt2(0),
516  fHistoResponseEleLambdaPt(0),
517  fHistoResponseEleLambdaPt1(0),
518  fHistoResponseEleLambdaPt2(0),
519  fHistoResponseEleLambdaPtFeeddownXic0(0),
520  fHistoResponseEleLambdaPtFeeddownXic01(0),
521  fHistoResponseEleLambdaPtFeeddownXic02(0),
522  fHistoResponseEleLambdaPtFeeddownXicPlus(0),
523  fHistoResponseEleLambdaPtFeeddownXicPlus1(0),
524  fHistoResponseEleLambdaPtFeeddownXicPlus2(0),
525  fHistoResponseEleLambdaPtFeeddownSigma(0),
526  fHistoResponseEleLambdaPtFeeddownSigma1(0),
527  fHistoResponseEleLambdaPtFeeddownSigma2(0),
528  fHistoResponseEleLambdaPtLambdab(0),
529  fHistoResponseElePtLambdab(0),
530  fHistoResponseLambdaPtLambdab(0),
531  fHistoResponseLambdaPt(0),
532  fHistoResponseLambdaPtFeeddownXic0(0),
533  fHistoResponseLambdaPtFeeddownXicPlus(0),
534  fHistoResponseLambdaPtFeeddownSigma(0),
535  fHistoResponseLambdaPtvsEleLambdaPt(0),
536  fHistoResponseLambdaPtvsEleLambdaPtLambdab(0),
537  fHistoResponseMcGenLambdabPtvsLambdacPt(0),
538  fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt(0),
539  fHistoEleLambdaPtvsRapidityRS(0),
540  fHistoEleLambdaPtvsRapidityWS(0),
541  fHistoEleLambdaPtvsRapidityMCS(0),
542  fHistoPi0MCGen(0),
543  fHistoElectronPi0Total(0),
544  fHistoElectronPi0Tag(0),
545  fHistoEtaMCGen(0),
546  fHistoElectronEtaTotal(0),
547  fHistoElectronEtaTag(0),
548  fCounter(0),
549  fHistonEvtvsRunNumber(0),
550  fHistonElevsRunNumber(0),
551  fHistonLambdavsRunNumber(0),
552  fHistoMCEventType(0),
553  fHistoMCDeltaPhiccbar(0),
554  fRefMult(9.26),
555  fGTI(0),fGTIndex(0), fTrackBuffSize(19000),
556  fHistodPhiSdEtaSElectronProtonR125RS(0),
557  fHistodPhiSdEtaSElectronProtonR125WS(0),
558  fHistodPhiSdEtaSElectronProtonR125RSMix(0),
559  fHistodPhiSdEtaSElectronProtonR125WSMix(0),
560  fHistodPhiSdEtaSElectronPionR125RS(0),
561  fHistodPhiSdEtaSElectronPionR125WS(0),
562  fHistodPhiSdEtaSElectronPionR125RSMix(0),
563  fHistodPhiSdEtaSElectronPionR125WSMix(0),
564  fDoEventMixing(0),
565  fMixWithoutConversionFlag(kFALSE),
566  fNumberOfEventsForMixing (5),
567  fNzVtxBins (0),
568  fNCentBins (0),
569  fNOfPools(1),
570  fEventBuffer(0x0),
571  fEventInfo(new TObjString("")),
572  fElectronTracks(0x0),
573  fV0Tracks1(0x0),
574  fV0Tracks2(0x0),
575  fElectronCutVarsArray(0x0),
576  fV0CutVarsArray1(0x0),
577  fV0CutVarsArray2(0x0),
578  fHistoPoolNumberOfDumps(0),
579  fHistoPoolNumberOfResets(0)
580 {
581  //
583  //
584  for(Int_t i=0;i<17;i++){
585  fHistoElePtvsCutVarsRS[i] = 0;
586  fHistoElePtvsCutVarsWS[i] = 0;
588  }
589  for(Int_t i=0;i<8;i++){
591  }
592  for(Int_t i=0; i<4; i++) fMultEstimatorAvg[i]=0;
593 }
594 
595 //___________________________________________________________________________
598  Bool_t writeVariableTree) :
599  AliAnalysisTaskSE(name),
600  fUseMCInfo(kFALSE),
601  fOutput(0),
602  fOutputAll(0),
603  fListCuts(0),
604  fCEvents(0),
605  fHTrigger(0),
606  fHCentrality(0),
607  fHNTrackletvsZ(0),
608  fHNTrackletCorrvsZ(0),
609  fAnalCuts(analCuts),
610  fIsEventSelected(kFALSE),
611  fWriteVariableTree(writeVariableTree),
612  fWriteEachVariableTree(kFALSE),
613  fWriteMCVariableTree(kFALSE),
614  fVariablesTree(0),
615  fEleVariablesTree(0),
616  fV0VariablesTree(0),
617  fMCVariablesTree(0),
618  fMCEleVariablesTree(0),
619  fMCV0VariablesTree(0),
620  fMCGenPairVariablesTree(0),
621  fCorrelationVariablesTree(0),
622  fReconstructPrimVert(kFALSE),
623  fIsMB(kFALSE),
624  fIsSemi(kFALSE),
625  fIsCent(kFALSE),
626  fIsINT7(kFALSE),
627  fIsEMC7(kFALSE),
628  fCandidateVariables(),
629  fCandidateEleVariables(),
630  fCandidateV0Variables(),
631  fCandidateMCVariables(),
632  fCandidateMCEleVariables(),
633  fCandidateMCV0Variables(),
634  fCandidateMCGenPairVariables(),
635  fCorrelationVariables(),
636  fVtx1(0),
637  fV1(0),
638  fVtxZ(0),
639  fBzkG(0),
640  fCentrality(0),
641  fRunNumber(0),
642  fTriggerCheck(0),
643  fUseCentralityV0M(kFALSE),
644  fUseCentralitySPDTracklet(kFALSE),
645  fEvNumberCounter(0),
646  fMCEventType(-9999),
647  fMCDoPairAnalysis(kFALSE),
648  fHistoEleLambdaMass(0),
649  fHistoEleLambdaMassRS(0),
650  fHistoEleLambdaMassRS1(0),
651  fHistoEleLambdaMassRS2(0),
652  fHistoEleLambdaMassWS(0),
653  fHistoEleLambdaMassWS1(0),
654  fHistoEleLambdaMassWS2(0),
655  fHistoEleLambdaMassRSMix(0),
656  fHistoEleLambdaMassRSMix1(0),
657  fHistoEleLambdaMassRSMix2(0),
658  fHistoEleLambdaMassWSMix(0),
659  fHistoEleLambdaMassWSMix1(0),
660  fHistoEleLambdaMassWSMix2(0),
661  fHistoEleLambdaMassRSSide(0),
662  fHistoEleLambdaMassRSSide1(0),
663  fHistoEleLambdaMassRSSide2(0),
664  fHistoEleLambdaMassWSSide(0),
665  fHistoEleLambdaMassWSSide1(0),
666  fHistoEleLambdaMassWSSide2(0),
667  fHistoEleLambdaMassRSAway(0),
668  fHistoEleLambdaMassRS1Away(0),
669  fHistoEleLambdaMassRS2Away(0),
670  fHistoEleLambdaMassWSAway(0),
671  fHistoEleLambdaMassWS1Away(0),
672  fHistoEleLambdaMassWS2Away(0),
673  fHistoEleLambdaMassRSMixAway(0),
674  fHistoEleLambdaMassRSMix1Away(0),
675  fHistoEleLambdaMassRSMix2Away(0),
676  fHistoEleLambdaMassWSMixAway(0),
677  fHistoEleLambdaMassWSMix1Away(0),
678  fHistoEleLambdaMassWSMix2Away(0),
679  fHistoEleLambdaMassRSSideAway(0),
680  fHistoEleLambdaMassRSSide1Away(0),
681  fHistoEleLambdaMassRSSide2Away(0),
682  fHistoEleLambdaMassWSSideAway(0),
683  fHistoEleLambdaMassWSSide1Away(0),
684  fHistoEleLambdaMassWSSide2Away(0),
685  fHistoEleLambdaMassvsElePtRS(0),
686  fHistoEleLambdaMassvsElePtWS(0),
687  fHistoEleLambdaMassvsElePtRSMix(0),
688  fHistoEleLambdaMassvsElePtWSMix(0),
689  fHistoEleLambdaMassvsElePtRSSide(0),
690  fHistoEleLambdaMassvsElePtWSSide(0),
691  fHistoEleLambdaMassvsElePtRS1(0),
692  fHistoEleLambdaMassvsElePtWS1(0),
693  fHistoEleLambdaMassvsElePtRSMix1(0),
694  fHistoEleLambdaMassvsElePtWSMix1(0),
695  fHistoEleLambdaMassvsElePtRSSide1(0),
696  fHistoEleLambdaMassvsElePtWSSide1(0),
697  fHistoEleLambdaMassvsElePtRS2(0),
698  fHistoEleLambdaMassvsElePtWS2(0),
699  fHistoEleLambdaMassvsElePtRSMix2(0),
700  fHistoEleLambdaMassvsElePtWSMix2(0),
701  fHistoEleLambdaMassvsElePtRSSide2(0),
702  fHistoEleLambdaMassvsElePtWSSide2(0),
703  fHistoElePtRS(0),
704  fHistoElePtWS(0),
705  fHistoElePtRSMix(0),
706  fHistoElePtWSMix(0),
707  fHistoEleLambdaMassMCS(0),
708  fHistoEleLambdaMassLambdabMCS(0),
709  fHistoEleLambdaMassXibMCS(0),
710  fHistoEleLambdaMassMCGen(0),
711  fHistoEleLambdaMassvsElePtMCS(0),
712  fHistoEleLambdaMassvsElePtMCGen(0),
713  fHistoEleLambdaMassvsElePtMCS1(0),
714  fHistoEleLambdaMassvsElePtMCGen1(0),
715  fHistoEleLambdaMassvsElePtMCS2(0),
716  fHistoEleLambdaMassvsElePtMCGen2(0),
717  fHistoElePtMCS(0),
718  fHistoElePtMCGen(0),
719  fHistoElePtvsEtaRS(0),
720  fHistoElePtvsEtaWS(0),
721  fHistoElePtvsEtaRSMix(0),
722  fHistoElePtvsEtaWSMix(0),
723  fHistoElePtvsEtaMCS(0),
724  fHistoElePtvsEtaMCGen(0),
725  fHistoElePtvsLambdaPtRS(0),
726  fHistoElePtvsLambdaPtWS(0),
727  fHistoElePtvsLambdaPtRSMix(0),
728  fHistoElePtvsLambdaPtWSMix(0),
729  fHistoElePtvsLambdaPtMCS(0),
730  fHistoElePtvsLambdaPtvsLcPtMCS(0),
731  fHistoElePtvsLambdaPtMCGen(0),
732  fHistoElePtvsLambdaPtvsLcPtMCGen(0),
733  fHistoElePtvsLambdaPtMCLcGen(0),
734  fHistoElePtvsd0RS(0),
735  fHistoElePtvsd0WS(0),
736  fHistoElePtvsd0RSMix(0),
737  fHistoElePtvsd0WSMix(0),
738  fHistoElePtvsd0MCS(0),
739  fHistoElePtvsd0PromptMCS(0),
740  fHistoElePtvsd0BFeeddownMCS(0),
741  fHistoEleLambdaMassFeeddownXic0MCS(0),
742  fHistoEleLambdaMassFeeddownXic0MCGen(0),
743  fHistoEleLambdaMassvsElePtFeeddownXic0MCS(0),
744  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen(0),
745  fHistoEleLambdaMassvsElePtFeeddownXic0MCS1(0),
746  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1(0),
747  fHistoEleLambdaMassvsElePtFeeddownXic0MCS2(0),
748  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2(0),
749  fHistoElePtFeeddownXic0MCS(0),
750  fHistoElePtFeeddownXic0MCGen(0),
751  fHistoElePtvsEtaFeeddownXic0MCS(0),
752  fHistoElePtvsEtaFeeddownXic0MCGen(0),
753  fHistoElePtvsLambdaPtFeeddownXic0MCS(0),
754  fHistoElePtvsLambdaPtFeeddownXic0MCGen(0),
755  fHistoEleLambdaMassFeeddownXicPlusMCS(0),
756  fHistoEleLambdaMassFeeddownXicPlusMCGen(0),
757  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS(0),
758  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen(0),
759  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1(0),
760  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1(0),
761  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS2(0),
762  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2(0),
763  fHistoElePtFeeddownXicPlusMCS(0),
764  fHistoElePtFeeddownXicPlusMCGen(0),
765  fHistoElePtvsEtaFeeddownXicPlusMCS(0),
766  fHistoElePtvsEtaFeeddownXicPlusMCGen(0),
767  fHistoElePtvsLambdaPtFeeddownXicPlusMCS(0),
768  fHistoElePtvsLambdaPtFeeddownXicPlusMCGen(0),
769  fHistoBachPt(0),
770  fHistoBachPtMCS(0),
771  fHistoBachPtMCGen(0),
772  fHistod0Bach(0),
773  fHistoLambdaMassvsPt(0),
774  fHistoLambdaMassvsPtMCS(0),
775  fHistoLambdaMassvsPtMCGen(0),
776  fHistoLambdaPtvsEta(0),
777  fHistoLambdaPtvsEtaMCS(0),
778  fHistoLambdaPtvsEtaMCGen(0),
779  fHistoLambdaArmenteros(0),
780  fHistoLambdaArmenterosMCS(0),
781  fHistoLambdaPtvsDl(0),
782  fHistoLambdaPtvsDlSide(0),
783  fHistoLambdaPtvsDlMCS(0),
784  fHistoLambdaPtvsDlFeeddownXi0MCS(0),
785  fHistoLambdaPtvsDlFeeddownXiMinusMCS(0),
786  fHistoLambdaPtvsDlFeeddownOmegaMCS(0),
787  fHistoK0sMassvsPt(0),
788  fHistoElectronTPCPID(0),
789  fHistoElectronTOFPID(0),
790  fHistoElectronTPCSelPID(0),
791  fHistoElectronTOFSelPID(0),
792  fHistoElectronTPCPIDSelTOF(0),
793  fHistoElectronTPCPIDSelTOFSmallEta(0),
794  fHistoElectronTPCPIDSelTOFLargeEta(0),
795  fHistoMassConversionsMin(0),
796  fHistoMassConversionsSameSignMin(0),
797  fHistoElectronQovPtvsPhi(0),
798  fHistoLambdaQovPtvsPhi(0),
799  fHistoLcMCGen(0),
800  fHistoLcMCGen1(0),
801  fHistoLcMCGen2(0),
802  fHistoLbMCGen(0),
803  fHistoLbMCGen1(0),
804  fHistoLbMCGen2(0),
805  fHistoLcMCGenWithEleA(0),
806  fHistoLcMCGenWithEleB(0),
807  fHistoLbMCGenWithEleA(0),
808  fHistoLbMCGenWithEleB(0),
809  fHistoLbMCGenWithLambdac(0),
810  fHistoLcMCS(0),
811  fHistoLcMCS1(0),
812  fHistoLcMCS2(0),
813  fHistoLbMCS(0),
814  fHistoLbMCS1(0),
815  fHistoLbMCS2(0),
816  fHistoFeedDownXic0MCGen(0),
817  fHistoFeedDownXic0MCGen1(0),
818  fHistoFeedDownXic0MCGen2(0),
819  fHistoFeedDownXic0MCS(0),
820  fHistoFeedDownXic0MCS1(0),
821  fHistoFeedDownXic0MCS2(0),
822  fHistoFeedDownXicPlusMCGen(0),
823  fHistoFeedDownXicPlusMCGen1(0),
824  fHistoFeedDownXicPlusMCGen2(0),
825  fHistoFeedDownXicPlusMCS(0),
826  fHistoFeedDownXicPlusMCS1(0),
827  fHistoFeedDownXicPlusMCS2(0),
828  fHistoFeedDownSigmaMCGen(0),
829  fHistoFeedDownSigmaMCGen1(0),
830  fHistoFeedDownSigmaMCGen2(0),
831  fHistoFeedDownSigmaMCS(0),
832  fHistoFeedDownSigmaMCS1(0),
833  fHistoFeedDownSigmaMCS2(0),
834  fHistoLcElectronMCGen(0),
835  fHistoLcElectronMCGen1(0),
836  fHistoLcElectronMCGen2(0),
837  fHistoLcElectronMCS(0),
838  fHistoLcElectronMCS1(0),
839  fHistoLcElectronMCS2(0),
840  fHistoLbElectronMCGen(0),
841  fHistoLbElectronMCGen1(0),
842  fHistoLbElectronMCGen2(0),
843  fHistoLbElectronMCS(0),
844  fHistoLbElectronMCS1(0),
845  fHistoLbElectronMCS2(0),
846  fHistoElectronFeedDownXic0MCGen(0),
847  fHistoElectronFeedDownXic0MCGen1(0),
848  fHistoElectronFeedDownXic0MCGen2(0),
849  fHistoElectronFeedDownXic0MCS(0),
850  fHistoElectronFeedDownXic0MCS1(0),
851  fHistoElectronFeedDownXic0MCS2(0),
852  fHistoElectronFeedDownXicPlusMCGen(0),
853  fHistoElectronFeedDownXicPlusMCGen1(0),
854  fHistoElectronFeedDownXicPlusMCGen2(0),
855  fHistoElectronFeedDownXicPlusMCS(0),
856  fHistoElectronFeedDownXicPlusMCS1(0),
857  fHistoElectronFeedDownXicPlusMCS2(0),
858  fHistoElectronFeedDownXibMCGen(0),
859  fHistoElectronFeedDownXibMCGen1(0),
860  fHistoElectronFeedDownXibMCGen2(0),
861  fHistoElectronFeedDownXibMCS(0),
862  fHistoElectronFeedDownXibMCS1(0),
863  fHistoElectronFeedDownXibMCS2(0),
864  fHistoElectronMCGen(0),
865  fHistoBottomElectronMCGen(0),
866  fHistoCharmElectronMCGen(0),
867  fHistoLambdaMCGen(0),
868  fHistoElePtvsV0dlRS(0),
869  fHistoElePtvsV0dlRS1(0),
870  fHistoElePtvsV0dlRS2(0),
871  fHistoElePtvsV0dlRSSide(0),
872  fHistoElePtvsV0dlRSSide1(0),
873  fHistoElePtvsV0dlRSSide2(0),
874  fHistoElePtvsV0dlRSMix(0),
875  fHistoElePtvsV0dlRSMix1(0),
876  fHistoElePtvsV0dlRSMix2(0),
877  fHistoElePtvsV0dlWS(0),
878  fHistoElePtvsV0dlWS1(0),
879  fHistoElePtvsV0dlWS2(0),
880  fHistoElePtvsV0dlWSSide(0),
881  fHistoElePtvsV0dlWSSide1(0),
882  fHistoElePtvsV0dlWSSide2(0),
883  fHistoElePtvsV0dlWSMix(0),
884  fHistoElePtvsV0dlWSMix1(0),
885  fHistoElePtvsV0dlWSMix2(0),
886  fHistoElePtvsV0dlMCS(0),
887  fHistoElePtvsV0dlMCS1(0),
888  fHistoElePtvsV0dlMCS2(0),
889  fHistoElePtvsV0dlFeedDownXic0MCS(0),
890  fHistoElePtvsV0dlFeedDownXic0MCS1(0),
891  fHistoElePtvsV0dlFeedDownXic0MCS2(0),
892  fHistoElePtvsV0dlFeedDownXicPlusMCS(0),
893  fHistoElePtvsV0dlFeedDownXicPlusMCS1(0),
894  fHistoElePtvsV0dlFeedDownXicPlusMCS2(0),
895  fHistoElePtvsV0dcaRS(0),
896  fHistoElePtvsV0dcaRS1(0),
897  fHistoElePtvsV0dcaRS2(0),
898  fHistoElePtvsV0dcaRSSide(0),
899  fHistoElePtvsV0dcaRSSide1(0),
900  fHistoElePtvsV0dcaRSSide2(0),
901  fHistoElePtvsV0dcaRSMix(0),
902  fHistoElePtvsV0dcaRSMix1(0),
903  fHistoElePtvsV0dcaRSMix2(0),
904  fHistoElePtvsV0dcaWS(0),
905  fHistoElePtvsV0dcaWS1(0),
906  fHistoElePtvsV0dcaWS2(0),
907  fHistoElePtvsV0dcaWSSide(0),
908  fHistoElePtvsV0dcaWSSide1(0),
909  fHistoElePtvsV0dcaWSSide2(0),
910  fHistoElePtvsV0dcaWSMix(0),
911  fHistoElePtvsV0dcaWSMix1(0),
912  fHistoElePtvsV0dcaWSMix2(0),
913  fHistoElePtvsV0dcaMCS(0),
914  fHistoElePtvsV0dcaMCS1(0),
915  fHistoElePtvsV0dcaMCS2(0),
916  fHistoElePtvsV0dcaFeedDownXic0MCS(0),
917  fHistoElePtvsV0dcaFeedDownXic0MCS1(0),
918  fHistoElePtvsV0dcaFeedDownXic0MCS2(0),
919  fHistoElePtvsV0dcaFeedDownXicPlusMCS(0),
920  fHistoElePtvsV0dcaFeedDownXicPlusMCS1(0),
921  fHistoElePtvsV0dcaFeedDownXicPlusMCS2(0),
922  fHistoEleLambdaPtvsV0dlRS(0),
923  fHistoEleLambdaPtvsV0dlRS1(0),
924  fHistoEleLambdaPtvsV0dlRS2(0),
925  fHistoEleLambdaPtvsV0dlRSSide(0),
926  fHistoEleLambdaPtvsV0dlRSSide1(0),
927  fHistoEleLambdaPtvsV0dlRSSide2(0),
928  fHistoEleLambdaPtvsV0dlRSMix(0),
929  fHistoEleLambdaPtvsV0dlRSMix1(0),
930  fHistoEleLambdaPtvsV0dlRSMix2(0),
931  fHistoEleLambdaPtvsV0dlWS(0),
932  fHistoEleLambdaPtvsV0dlWS1(0),
933  fHistoEleLambdaPtvsV0dlWS2(0),
934  fHistoEleLambdaPtvsV0dlWSSide(0),
935  fHistoEleLambdaPtvsV0dlWSSide1(0),
936  fHistoEleLambdaPtvsV0dlWSSide2(0),
937  fHistoEleLambdaPtvsV0dlWSMix(0),
938  fHistoEleLambdaPtvsV0dlWSMix1(0),
939  fHistoEleLambdaPtvsV0dlWSMix2(0),
940  fHistoEleLambdaPtvsV0dlMCS(0),
941  fHistoEleLambdaPtvsV0dlMCS1(0),
942  fHistoEleLambdaPtvsV0dlMCS2(0),
943  fHistoEleLambdaPtvsV0dlPromptMCS(0),
944  fHistoEleLambdaPtvsV0dlPromptMCS1(0),
945  fHistoEleLambdaPtvsV0dlPromptMCS2(0),
946  fHistoEleLambdaPtvsV0dlBFeeddownMCS(0),
947  fHistoEleLambdaPtvsV0dlBFeeddownMCS1(0),
948  fHistoEleLambdaPtvsV0dlBFeeddownMCS2(0),
949  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS(0),
950  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1(0),
951  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2(0),
952  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS(0),
953  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS1(0),
954  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS2(0),
955  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS(0),
956  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS1(0),
957  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS2(0),
958  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS(0),
959  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1(0),
960  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2(0),
961  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS(0),
962  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS1(0),
963  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS2(0),
964  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS(0),
965  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS1(0),
966  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS2(0),
967  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS(0),
968  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS1(0),
969  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS2(0),
970  fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS(0),
971  fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS1(0),
972  fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS2(0),
973  fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS(0),
974  fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS1(0),
975  fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS2(0),
976  fHistoEleLambdaPtvsV0dlLambdabMCS(0),
977  fHistoEleLambdaPtvsV0dlLambdabMCS1(0),
978  fHistoEleLambdaPtvsV0dlLambdabMCS2(0),
979  fHistoEleLambdaPtvsV0dlXibMCS(0),
980  fHistoEleLambdaPtvsV0dlXibMCS1(0),
981  fHistoEleLambdaPtvsV0dlXibMCS2(0),
982  fHistoEleLambdaPtvsV0dlRSAway(0),
983  fHistoEleLambdaPtvsV0dlRS1Away(0),
984  fHistoEleLambdaPtvsV0dlRS2Away(0),
985  fHistoEleLambdaPtvsV0dlRSSideAway(0),
986  fHistoEleLambdaPtvsV0dlRSSide1Away(0),
987  fHistoEleLambdaPtvsV0dlRSSide2Away(0),
988  fHistoEleLambdaPtvsV0dlRSMixAway(0),
989  fHistoEleLambdaPtvsV0dlRSMix1Away(0),
990  fHistoEleLambdaPtvsV0dlRSMix2Away(0),
991  fHistoEleLambdaPtvsV0dlWSAway(0),
992  fHistoEleLambdaPtvsV0dlWS1Away(0),
993  fHistoEleLambdaPtvsV0dlWS2Away(0),
994  fHistoEleLambdaPtvsV0dlWSSideAway(0),
995  fHistoEleLambdaPtvsV0dlWSSide1Away(0),
996  fHistoEleLambdaPtvsV0dlWSSide2Away(0),
997  fHistoEleLambdaPtvsV0dlWSMixAway(0),
998  fHistoEleLambdaPtvsV0dlWSMix1Away(0),
999  fHistoEleLambdaPtvsV0dlWSMix2Away(0),
1000  fHistoCorrelationVariablesvsEleLambdaPt(0),
1001  fHistoCorrelationVariablesvsEleLambdaPtMix(0),
1002  fHistoCorrelationVariablesvsEleLambdaPtMC(0),
1003  fHistoCorrelationVariablesvsElePt(0),
1004  fHistoCorrelationVariablesvsElePtMix(0),
1005  fHistoCorrelationVariablesvsElePtMC(0),
1006  fHistoCorrelationVariablesvsLambdaPt(0),
1007  fHistoCorrelationVariablesvsLambdaPtMix(0),
1008  fHistoCorrelationVariablesvsLambdaPtMC(0),
1009  fHistoMassVariablesvsEleLambdaPt(0),
1010  fHistoMassVariablesvsEleLambdaPtMix(0),
1011  fHistoMassVariablesvsEleLambdaPtMC(0),
1012  fHistoMassVariablesvsElePt(0),
1013  fHistoMassVariablesvsElePtMix(0),
1014  fHistoMassVariablesvsElePtMC(0),
1015  fHistoMassVariablesvsLambdaPt(0),
1016  fHistoMassVariablesvsLambdaPtMix(0),
1017  fHistoMassVariablesvsLambdaPtMC(0),
1018  fHistoResponseElePt(0),
1019  fHistoResponseElePt1(0),
1020  fHistoResponseElePt2(0),
1021  fHistoResponseEleLambdaPt(0),
1022  fHistoResponseEleLambdaPt1(0),
1023  fHistoResponseEleLambdaPt2(0),
1024  fHistoResponseEleLambdaPtFeeddownXic0(0),
1025  fHistoResponseEleLambdaPtFeeddownXic01(0),
1026  fHistoResponseEleLambdaPtFeeddownXic02(0),
1027  fHistoResponseEleLambdaPtFeeddownXicPlus(0),
1028  fHistoResponseEleLambdaPtFeeddownXicPlus1(0),
1029  fHistoResponseEleLambdaPtFeeddownXicPlus2(0),
1030  fHistoResponseEleLambdaPtFeeddownSigma(0),
1031  fHistoResponseEleLambdaPtFeeddownSigma1(0),
1032  fHistoResponseEleLambdaPtFeeddownSigma2(0),
1033  fHistoResponseEleLambdaPtLambdab(0),
1034  fHistoResponseElePtLambdab(0),
1035  fHistoResponseLambdaPtLambdab(0),
1036  fHistoResponseLambdaPt(0),
1037  fHistoResponseLambdaPtFeeddownXic0(0),
1038  fHistoResponseLambdaPtFeeddownXicPlus(0),
1039  fHistoResponseLambdaPtFeeddownSigma(0),
1040  fHistoResponseLambdaPtvsEleLambdaPt(0),
1041  fHistoResponseLambdaPtvsEleLambdaPtLambdab(0),
1042  fHistoResponseMcGenLambdabPtvsLambdacPt(0),
1043  fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt(0),
1044  fHistoEleLambdaPtvsRapidityRS(0),
1045  fHistoEleLambdaPtvsRapidityWS(0),
1046  fHistoEleLambdaPtvsRapidityMCS(0),
1047  fHistoPi0MCGen(0),
1048  fHistoElectronPi0Total(0),
1049  fHistoElectronPi0Tag(0),
1050  fHistoEtaMCGen(0),
1051  fHistoElectronEtaTotal(0),
1052  fHistoElectronEtaTag(0),
1053  fCounter(0),
1054  fHistonEvtvsRunNumber(0),
1055  fHistonElevsRunNumber(0),
1056  fHistonLambdavsRunNumber(0),
1057  fHistoMCEventType(0),
1058  fHistoMCDeltaPhiccbar(0),
1059  fRefMult(9.26),
1060  fGTI(0),fGTIndex(0), fTrackBuffSize(19000),
1061  fHistodPhiSdEtaSElectronProtonR125RS(0),
1062  fHistodPhiSdEtaSElectronProtonR125WS(0),
1063  fHistodPhiSdEtaSElectronProtonR125RSMix(0),
1064  fHistodPhiSdEtaSElectronProtonR125WSMix(0),
1065  fHistodPhiSdEtaSElectronPionR125RS(0),
1066  fHistodPhiSdEtaSElectronPionR125WS(0),
1067  fHistodPhiSdEtaSElectronPionR125RSMix(0),
1068  fHistodPhiSdEtaSElectronPionR125WSMix(0),
1069  fDoEventMixing(0),
1070  fMixWithoutConversionFlag(kFALSE),
1071  fNumberOfEventsForMixing (5),
1072  fNzVtxBins (0),
1073  fNCentBins (0),
1074  fNOfPools(1),
1075  fEventBuffer(0x0),
1076  fEventInfo(new TObjString("")),
1077  fElectronTracks(0x0),
1078  fV0Tracks1(0x0),
1079  fV0Tracks2(0x0),
1080  fElectronCutVarsArray(0x0),
1081  fV0CutVarsArray1(0x0),
1082  fV0CutVarsArray2(0x0),
1083  fHistoPoolNumberOfDumps(0),
1084  fHistoPoolNumberOfResets(0)
1085 {
1086  //
1088  //
1089  Info("AliAnalysisTaskSELc2eleLambdafromAODtracks","Calling Constructor");
1090 
1091  for(Int_t i=0;i<17;i++){
1092  fHistoElePtvsCutVarsRS[i] = 0;
1093  fHistoElePtvsCutVarsWS[i] = 0;
1094  fHistoElePtvsCutVarsMCS[i] = 0;
1095  }
1096  for(Int_t i=0;i<8;i++){
1098  }
1099  for(Int_t i=0; i<4; i++) fMultEstimatorAvg[i]=0;
1100 
1101  DefineOutput(1,TList::Class()); //conters
1102  DefineOutput(2,TList::Class());
1103  DefineOutput(3,TList::Class()); //conters
1104  DefineOutput(4,TTree::Class()); //My private output
1105  DefineOutput(5,TTree::Class()); //My private output
1106  DefineOutput(6,TTree::Class()); //My private output
1107  DefineOutput(7,TTree::Class()); //My private output
1108  DefineOutput(8,AliNormalizationCounter::Class());
1109  DefineOutput(9,TTree::Class()); //My private output
1110  DefineOutput(10,TTree::Class()); //My private output
1111  DefineOutput(11,TTree::Class()); //My private output
1112  DefineOutput(12,TTree::Class()); //My private output
1113 }
1114 
1115 //___________________________________________________________________________
1117  //
1119  //
1120  Info("~AliAnalysisTaskSELc2eleLambdafromAODtracks","Calling Destructor");
1121 
1122  if (fOutput) {
1123  delete fOutput;
1124  fOutput = 0;
1125  }
1126 
1127  if (fOutputAll) {
1128  delete fOutputAll;
1129  fOutputAll = 0;
1130  }
1131 
1132  if (fListCuts) {
1133  delete fListCuts;
1134  fListCuts = 0;
1135  }
1136 
1137 
1138  if (fAnalCuts) {
1139  delete fAnalCuts;
1140  fAnalCuts = 0;
1141  }
1142 
1143  if (fVariablesTree) {
1144  delete fVariablesTree;
1145  fVariablesTree = 0;
1146  }
1147  if (fEleVariablesTree) {
1148  delete fEleVariablesTree;
1149  fEleVariablesTree = 0;
1150  }
1151  if (fV0VariablesTree) {
1152  delete fV0VariablesTree;
1153  fV0VariablesTree = 0;
1154  }
1155  if (fMCVariablesTree) {
1156  delete fMCVariablesTree;
1157  fMCVariablesTree = 0;
1158  }
1159  if (fMCEleVariablesTree) {
1160  delete fMCEleVariablesTree;
1161  fMCEleVariablesTree = 0;
1162  }
1163  if (fMCV0VariablesTree) {
1164  delete fMCV0VariablesTree;
1165  fMCV0VariablesTree = 0;
1166  }
1168  delete fMCGenPairVariablesTree;
1170  }
1174  }
1175  if(fCounter){
1176  delete fCounter;
1177  fCounter = 0;
1178  }
1179 
1180  if(fElectronTracks) fElectronTracks->Delete();
1181  delete fElectronTracks;
1182  if(fV0Tracks1) fV0Tracks1->Delete();
1183  delete fV0Tracks1;
1184  if(fV0Tracks2) fV0Tracks2->Delete();
1185  delete fV0Tracks2;
1186  if(fEventBuffer){
1187  for(Int_t i=0; i<fNOfPools; i++) delete fEventBuffer[i];
1188  delete fEventBuffer;
1189  }
1190  delete fEventInfo;
1192  delete fElectronCutVarsArray;
1193  if(fV0CutVarsArray1) fV0CutVarsArray1->Delete();
1194  delete fV0CutVarsArray1;
1195  if(fV0CutVarsArray2) fV0CutVarsArray2->Delete();
1196  delete fV0CutVarsArray2;
1197 
1198  if (fGTI)
1199  delete[] fGTI;
1200  fGTI=0;
1201  if (fGTIndex)
1202  delete[] fGTIndex;
1203  fGTIndex=0;
1204 }
1205 
1206 //_________________________________________________
1208  //
1210  //
1211  //
1212 
1213  fIsEventSelected=kFALSE;
1214 
1215  if (fDebug > 1) AliInfo("Init");
1216 
1217  fListCuts = new TList();
1218  fListCuts->SetOwner();
1219  fListCuts->SetName("ListCuts");
1221  PostData(2,fListCuts);
1222 
1223  return;
1224 }
1225 
1226 //_________________________________________________
1228 {
1229  //
1231  //
1232 
1233  if (!fInputEvent) {
1234  AliError("NO EVENT FOUND!");
1235  return;
1236  }
1237  AliAODEvent* aodEvent = dynamic_cast<AliAODEvent*>(fInputEvent);
1238  fCEvents->Fill(1);
1239  fEvNumberCounter++;
1240 
1241  //------------------------------------------------
1242  // First check if the event has proper B
1243  //------------------------------------------------
1244 
1245  fBzkG = (Double_t)aodEvent->GetMagneticField();
1246  AliKFParticle::SetField(fBzkG);
1247  if (TMath::Abs(fBzkG)<0.001) {
1248  return;
1249  }
1250  fCEvents->Fill(2);
1251 
1252  Int_t countTr=0;
1253  Double_t countCorr=0;
1255  {
1256  AliAODTracklets* tracklets=aodEvent->GetTracklets();
1257  Int_t nTr=tracklets->GetNumberOfTracklets();
1258  for(Int_t iTr=0; iTr<nTr; iTr++){
1259  Double_t theta=tracklets->GetTheta(iTr);
1260  Double_t eta=-TMath::Log(TMath::Tan(theta/2.));
1261  if(eta>-1.0 && eta<1.0) countTr++;
1262  }
1263  AliAODVertex *vtx1 = (AliAODVertex*)aodEvent->GetPrimaryVertex();
1264  Bool_t isVtxOk=kFALSE;
1265  if(vtx1){
1266  if(vtx1->GetNContributors()>0){
1267  fCEvents->Fill(8);
1268  isVtxOk=kTRUE;
1269  }
1270  }
1271 
1272  countCorr=countTr;
1273  if(isVtxOk){
1274  TProfile* estimatorAvg = GetEstimatorHistogram(aodEvent);
1275  countCorr=static_cast<Int_t>(AliVertexingHFUtils::GetCorrectedNtracklets(estimatorAvg,countTr,vtx1->GetZ(),fRefMult));
1276  }
1277  }
1278 
1279 
1281  fCounter->StoreEvent(aodEvent,fAnalCuts,fUseMCInfo,countCorr);
1282  }else{
1284  }
1286 
1287  //------------------------------------------------
1288  // MC analysis setting
1289  //------------------------------------------------
1290  TClonesArray *mcArray = 0;
1291  AliAODMCHeader *mcHeader=0;
1292  if (fUseMCInfo) {
1293  // MC array need for maching
1294  mcArray = dynamic_cast<TClonesArray*>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName()));
1295  if (!mcArray) {
1296  AliError("Could not find Monte-Carlo in AOD");
1297  return;
1298  }
1299  fCEvents->Fill(6); // in case of MC events
1300 
1301  // load MC header
1302  mcHeader = (AliAODMCHeader*)aodEvent->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1303  if (!mcHeader) {
1304  AliError("AliAnalysisTaskSELc2eleLambdafromAODtracks::UserExec: MC header branch not found!\n");
1305  return;
1306  }
1307  fCEvents->Fill(7); // in case of MC events
1308 
1309  Double_t zMCVertex = mcHeader->GetVtxZ();
1310  if (TMath::Abs(zMCVertex) > fAnalCuts->GetMaxVtxZ()) {
1311  AliDebug(2,Form("Event rejected: abs(zVtxMC)=%f > fAnalCuts->GetMaxVtxZ()=%f",zMCVertex,fAnalCuts->GetMaxVtxZ()));
1312  return;
1313  } else {
1314  fCEvents->Fill(17); // in case of MC events
1315  }
1316  if ((TMath::Abs(zMCVertex) < fAnalCuts->GetMaxVtxZ()) && (!fAnalCuts->IsEventRejectedDuePhysicsSelection()) && (!fAnalCuts->IsEventRejectedDueToTrigger())) {
1317  Bool_t selevt = MakeMCAnalysis(mcArray);
1318  if(!selevt) return;
1319  }
1320  }
1321 
1322  //------------------------------------------------
1323  // Event selection
1324  //------------------------------------------------
1325  fVtx1 = (AliAODVertex*)aodEvent->GetPrimaryVertex();
1326  if (!fVtx1) return;
1327 
1328  Double_t pos[3],cov[6];
1329  fVtx1->GetXYZ(pos);
1330  fVtx1->GetCovarianceMatrix(cov);
1331  fV1 = new AliESDVertex(pos,cov,100.,100,fVtx1->GetName());
1332  fVtxZ = pos[2];
1333 
1334  Bool_t fIsTriggerNotOK = fAnalCuts->IsEventRejectedDueToTrigger();
1335  if(!fIsTriggerNotOK) fCEvents->Fill(3);
1336  if(!fIsEventSelected) {
1337  delete fV1;
1338  return;
1339  }
1340  fCEvents->Fill(4);
1341 
1342  fHNTrackletvsZ->Fill(fVtxZ,countTr);
1343  fHNTrackletCorrvsZ->Fill(fVtxZ,countCorr);
1344 
1345  fIsMB=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kMB)==(AliVEvent::kMB);
1346  fIsSemi=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kSemiCentral)==(AliVEvent::kSemiCentral);
1347  fIsCent=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kCentral)==(AliVEvent::kCentral);
1348  fIsINT7=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kINT7)==(AliVEvent::kINT7);
1349  fIsEMC7=(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected()&AliVEvent::kEMC7)==(AliVEvent::kEMC7);
1351  if(fIsMB) fHTrigger->Fill(1);
1352  if(fIsSemi) fHTrigger->Fill(2);
1353  if(fIsCent) fHTrigger->Fill(3);
1354  if(fIsINT7) fHTrigger->Fill(4);
1355  if(fIsEMC7) fHTrigger->Fill(5);
1356  if(fIsMB|fIsSemi|fIsCent) fHTrigger->Fill(7);
1357  if(fIsINT7|fIsEMC7) fHTrigger->Fill(8);
1358  if(fIsMB&fIsSemi) fHTrigger->Fill(10);
1359  if(fIsMB&fIsCent) fHTrigger->Fill(11);
1360  if(fIsINT7&fIsEMC7) fHTrigger->Fill(12);
1361 
1362  if(fUseCentralityV0M){
1363  AliCentrality *cent = aodEvent->GetCentrality();
1364  fCentrality = cent->GetCentralityPercentile("V0M");
1365  }else if(fUseCentralitySPDTracklet){
1366  if(countCorr>=0 && countCorr<=0) fCentrality = 5.;
1367  else if(countCorr>=1 && countCorr<=8) fCentrality = 15.;
1368  else if(countCorr>= 9 && countCorr<=13) fCentrality = 25.;
1369  else if(countCorr>=14 && countCorr<=19) fCentrality = 35.;
1370  else if(countCorr>=20 && countCorr<=30) fCentrality = 45.;
1371  else if(countCorr>=31 && countCorr<=49) fCentrality = 55.;
1372  else fCentrality = 65.;
1373  }else{
1374  fCentrality = 1.;
1375  }
1376  if(fCentrality<0.||fCentrality>100.-0.0000001) {
1377  delete fV1;
1378  return;
1379  }
1380  fHCentrality->Fill(fCentrality);
1381  fRunNumber = aodEvent->GetRunNumber();
1382 
1383  Int_t runnumber_offset = 0;
1384  Int_t runnumber = aodEvent->GetRunNumber();
1385  if(runnumber<=131000&&runnumber>=114000){
1386  runnumber_offset = 114000;//lhc10bcde
1387  }else if(runnumber<=196000&&runnumber>=195000){
1388  runnumber_offset = 195000;//lhc13bc
1389  }else if(runnumber<=170593&&runnumber>=167902){
1390  runnumber_offset = 167902;//lhc11h
1391  }
1392  fHistonEvtvsRunNumber->Fill(runnumber-runnumber_offset,1.);
1393 
1394  //------------------------------------------------
1395  // Check if the event has v0 candidate
1396  //------------------------------------------------
1397  //Int_t nv0 = aodEvent->GetNumberOfV0s();
1398  fCEvents->Fill(5);
1399 
1400 
1401  //------------------------------------------------
1402  // Main analysis done in this function
1403  //------------------------------------------------
1406  MakeAnalysis(aodEvent,mcArray);
1407 
1408 
1409  PostData(1,fOutput);
1410  PostData(3,fOutputAll);
1411  PostData(4,fVariablesTree);
1412  PostData(5,fEleVariablesTree);
1413  PostData(6,fV0VariablesTree);
1414  PostData(7,fMCVariablesTree);
1415  PostData(8,fCounter);
1416  PostData(9,fMCEleVariablesTree);
1417  PostData(10,fMCV0VariablesTree);
1418  PostData(11,fMCGenPairVariablesTree);
1419  PostData(12,fCorrelationVariablesTree);
1420 
1421  fIsEventSelected=kFALSE;
1422 
1423  delete fV1;
1424  return;
1425 }
1426 
1427 //________________________________________ terminate ___________________________
1429 {
1433 
1434  //AliInfo("Terminate","");
1435  AliAnalysisTaskSE::Terminate();
1436 
1437 
1438  fOutput = dynamic_cast<TList*> (GetOutputData(1));
1439  if (!fOutput) {
1440  AliError("fOutput not available");
1441  return;
1442  }
1443 
1444  fOutputAll = dynamic_cast<TList*> (GetOutputData(3));
1445  if (!fOutputAll) {
1446  AliError("fOutputAll not available");
1447  return;
1448  }
1449 
1450  return;
1451 }
1452 
1453 //___________________________________________________________________________
1455 {
1459  //AliInfo(Form("CreateOutputObjects of task %s\n", GetName()));
1460 
1461  //------------------------------------------------
1462  // output object setting
1463  //------------------------------------------------
1464  fOutput = new TList();
1465  fOutput->SetOwner();
1466  fOutput->SetName("chist0");
1467  DefineGeneralHistograms(); // define general histograms
1468  PostData(1,fOutput);
1469 
1470  fOutputAll = new TList();
1471  fOutputAll->SetOwner();
1472  fOutputAll->SetName("anahisto");
1473  DefineAnalysisHistograms(); // define general histograms
1474  PostData(3,fOutputAll);
1475 
1477  PostData(4,fVariablesTree);
1478 
1480  PostData(5,fEleVariablesTree);
1481 
1483  PostData(6,fV0VariablesTree);
1484 
1486  PostData(7,fMCVariablesTree);
1487 
1489  PostData(9,fMCEleVariablesTree);
1490 
1492  PostData(10,fMCV0VariablesTree);
1493 
1495  PostData(11,fMCGenPairVariablesTree);
1496 
1498  PostData(12,fCorrelationVariablesTree);
1499 
1500  //Counter for Normalization
1501  TString normName="NormalizationCounter";
1502  AliAnalysisDataContainer *cont = GetOutputSlot(8)->GetContainer();
1503  if(cont)normName=(TString)cont->GetName();
1504  fCounter = new AliNormalizationCounter(normName.Data());
1506  fCounter->SetStudyMultiplicity(kTRUE,1.);
1507  }
1508  fCounter->Init();
1509  PostData(8,fCounter);
1510 
1511  if(fDoEventMixing){
1512  fElectronTracks = new TObjArray();
1513  fElectronTracks->SetOwner();
1514  fV0Tracks1 = new TObjArray();
1515  fV0Tracks1->SetOwner();
1516  fV0Tracks2 = new TObjArray();
1517  fV0Tracks2->SetOwner();
1518  fElectronCutVarsArray = new TObjArray();
1519  fElectronCutVarsArray->SetOwner();
1520  fV0CutVarsArray1 = new TObjArray();
1521  fV0CutVarsArray1->SetOwner();
1522  fV0CutVarsArray2 = new TObjArray();
1523  fV0CutVarsArray2->SetOwner();
1524 
1526  fEventBuffer = new TTree*[fNOfPools];
1527  for(Int_t i=0; i<fNOfPools; i++){
1528  fEventBuffer[i]=new TTree(Form("EventBuffer_%d",i), "Temporary buffer for event mixing");
1529  fEventBuffer[i]->Branch("zVertex", &fVtxZ);
1530  fEventBuffer[i]->Branch("centrality", &fCentrality);
1531  fEventBuffer[i]->Branch("eventInfo", "TObjString",&fEventInfo);
1532  fEventBuffer[i]->Branch("v1array", "TObjArray", &fV0Tracks1);
1533  fEventBuffer[i]->Branch("v2array", "TObjArray", &fV0Tracks2);
1534  fEventBuffer[i]->Branch("v1varsarray", "TObjArray", &fV0CutVarsArray1);
1535  fEventBuffer[i]->Branch("v2varsarray", "TObjArray", &fV0CutVarsArray2);
1536  }
1537  }
1538 
1539  fGTI = new AliAODTrack *[fTrackBuffSize]; // Array of pointers
1540  fGTIndex = new Int_t [fTrackBuffSize]; // Array of index
1541 
1542  return;
1543 }
1544 
1545 //-------------------------------------------------------------------------------
1548  AliAODEvent *aodEvent, TClonesArray *mcArray
1549  )
1550 {
1551  //
1553  //
1554  if(fDoEventMixing){
1555  if(fElectronTracks) fElectronTracks->Delete();
1556  if(fV0Tracks1) fV0Tracks1->Delete();
1557  if(fV0Tracks2) fV0Tracks2->Delete();
1558  if(fElectronCutVarsArray) fElectronCutVarsArray->Delete();
1559  if(fV0CutVarsArray1) fV0CutVarsArray1->Delete();
1560  if(fV0CutVarsArray2) fV0CutVarsArray2->Delete();
1561  }
1562 
1563  ResetGlobalTrackReference();
1564  // ..and set it
1565  for (Int_t iTrack=0;iTrack<aodEvent->GetNumberOfTracks();iTrack++){
1566  // cast needed since the event now returns AliVTrack instead of AliAODTrack
1567  AliAODTrack *track = dynamic_cast<AliAODTrack *>(aodEvent->GetTrack(iTrack));
1568  if (!track) continue;
1569 
1570  // Store the reference of the global tracks
1571  StoreGlobalTrackReference(track,iTrack);
1572  }
1573 
1574  //------------------------------------------------
1575  // Select good track before hand to save time
1576  //------------------------------------------------
1577 
1578  Int_t nV0s= aodEvent->GetNumberOfV0s();
1579  Int_t nTracks= aodEvent->GetNumberOfTracks();
1580 
1581  Bool_t seleTrkFlags[nTracks];
1582  Int_t nSeleTrks=0;
1583  SelectTrack(aodEvent,nTracks,nSeleTrks,seleTrkFlags,mcArray);
1584 
1585  Bool_t seleV0Flags[nV0s];
1586  Int_t nSeleV0=0;
1587  SelectV0(aodEvent,nV0s,nSeleV0,seleV0Flags,mcArray);
1588 
1589  Int_t runnumber_offset = 0;
1590  Int_t runnumber = aodEvent->GetRunNumber();
1591  if(runnumber<=131000&&runnumber>=114000){
1592  runnumber_offset = 114000;//lhc10bcde
1593  }else if(runnumber<=196000&&runnumber>=195000){
1594  runnumber_offset = 195000;//lhc13bc
1595  }else if(runnumber<=170593&&runnumber>=167902){
1596  runnumber_offset = 167902;//lhc11h
1597  }
1598  fHistonElevsRunNumber->Fill(runnumber-runnumber_offset,nSeleTrks);
1599  fHistonLambdavsRunNumber->Fill(runnumber-runnumber_offset,nSeleV0);
1600 
1601  //------------------------------------------------
1602  // V0 loop
1603  //------------------------------------------------
1604  for (Int_t iv0 = 0; iv0<nV0s; iv0++) {
1605  if(!seleV0Flags[iv0]) continue;
1606  AliAODv0 *v0 = aodEvent->GetV0(iv0);
1607  if(!v0) continue;
1608 
1609  AliAODTrack *cptrack = (AliAODTrack*)(v0->GetDaughter(0));
1610  AliAODTrack *cntrack = (AliAODTrack*)(v0->GetDaughter(1));
1611 
1612  //------------------------------------------------
1613  // track loop
1614  //------------------------------------------------
1615  for (Int_t itrk = 0; itrk<nTracks; itrk++) {
1616  if(!seleTrkFlags[itrk]) continue;
1617  AliAODTrack *trk = (AliAODTrack*)aodEvent->GetTrack(itrk);
1618  //if(trk->GetID()<0) continue;
1619 
1620  //if(!fAnalCuts->SelectWithRoughCuts(v0,trk)) continue;
1621 
1622  //TPC only track (BIT 7) does not have PID information
1623  //In addition to that, TPC only tracks does not have good DCA resolution
1624  //(according to femtoscopy code)
1625  AliAODTrack *trkpid = 0;
1626  if(fAnalCuts->GetProdAODFilterBit()==7){
1627  trkpid = fGTI[-trk->GetID()-1];
1628  }else{
1629  trkpid = trk;
1630  }
1631 
1632  Int_t cpid = cptrack->GetID();
1633  Int_t cnid = cntrack->GetID();
1634  Int_t lpid = trkpid->GetID();
1635  if((cpid==lpid)||(cnid==lpid)) continue;
1636 
1637  AliAODVertex *secVert = ReconstructSecondaryVertex(v0,trk,aodEvent);//Fake, prim vertex is just used as secondary vertex. place holder for future
1638  if(!secVert) continue;
1639 
1640  AliAODRecoCascadeHF *elobj = MakeCascadeHF(v0,trk,trkpid,aodEvent,secVert);
1641  if(!elobj) {
1642  continue;
1643  }
1644 
1645  FillROOTObjects(elobj,v0,trk,trkpid,aodEvent,mcArray);
1646 
1647  elobj->GetSecondaryVtx()->RemoveDaughters();
1648  elobj->UnsetOwnPrimaryVtx();
1649  delete elobj;elobj=NULL;
1650  delete secVert;
1651  }
1652  }
1653 
1654  if(fDoEventMixing){
1655  fEventInfo->SetString(Form("Ev%d_esd%d_E%d_V%d",AliAnalysisManager::GetAnalysisManager()->GetNcalls(),((AliAODHeader*)aodEvent->GetHeader())->GetEventNumberESDFile(),fElectronTracks->GetEntries(),fV0Tracks1->GetEntries()+fV0Tracks2->GetEntries()));
1656  Int_t ind=GetPoolIndex(fVtxZ,fCentrality);
1657  if(ind>=0 && ind<fNOfPools){
1658  if(fEventBuffer[ind]->GetEntries() >= fNumberOfEventsForMixing){
1659  DoEventMixingWithPools(ind);
1660  if(fEventBuffer[ind]->GetEntries() >= 100*fNumberOfEventsForMixing){
1661  ResetPool(ind);
1662  fHistoPoolNumberOfResets->Fill(ind);
1663  }
1664  fHistoPoolNumberOfDumps->Fill(ind);
1665  }
1666  fEventBuffer[ind]->Fill();
1667  }
1668  }
1669 }
1672 {
1676 
1677  const char* nameoutput = GetOutputSlot(4)->GetContainer()->GetName();
1678  fVariablesTree = new TTree(nameoutput,"Candidates variables tree");
1679  Int_t nVar = 94;
1680  fCandidateVariables = new Float_t [nVar];
1681  TString * fCandidateVariableNames = new TString[nVar];
1682 
1683  fCandidateVariableNames[ 0]="Centrality";
1684  fCandidateVariableNames[ 1]="InvMassEleLambda";
1685  fCandidateVariableNames[ 2]="EleLambdaPt";
1686  fCandidateVariableNames[ 3]="EleLambdaPx";
1687  fCandidateVariableNames[ 4]="EleLambdaPy";
1688  fCandidateVariableNames[ 5]="EleLambdaPz";
1689  fCandidateVariableNames[ 6]="ElePx";
1690  fCandidateVariableNames[ 7]="ElePy";
1691  fCandidateVariableNames[ 8]="ElePz";
1692  fCandidateVariableNames[ 9]="V0Px";
1693  fCandidateVariableNames[10]="V0Py";
1694  fCandidateVariableNames[11]="V0Pz";
1695  fCandidateVariableNames[12]="AntiLambdaFlag";
1696  fCandidateVariableNames[13]="MassLambda";
1697  fCandidateVariableNames[14]="MassAntiLambda";
1698  fCandidateVariableNames[15]="Eled0";
1699  fCandidateVariableNames[16]="V0d0";
1700  fCandidateVariableNames[17]="nSigmaTPCele";
1701  fCandidateVariableNames[18]="nSigmaTOFele";
1702  fCandidateVariableNames[19]="nSigmaTPCv0pr";
1703  fCandidateVariableNames[20]="nSigmaTOFv0pr";
1704  fCandidateVariableNames[21]="EleCharge";
1705  fCandidateVariableNames[22]="ProtonPx";
1706  fCandidateVariableNames[23]="ProtonPy";
1707  fCandidateVariableNames[24]="ProtonPz";
1708  fCandidateVariableNames[25]="PiPx";
1709  fCandidateVariableNames[26]="PiPy";
1710  fCandidateVariableNames[27]="PiPz";
1711  fCandidateVariableNames[28]="mcpdglc";
1712  fCandidateVariableNames[29]="mclablc";
1713  fCandidateVariableNames[30]="mcpdgmomele";
1714  fCandidateVariableNames[31]="mcpdgmomv0";
1715  fCandidateVariableNames[32]="Mixing";
1716  fCandidateVariableNames[33]="mcpdgele";
1717  fCandidateVariableNames[34]="nSigmaTPCpr_etrk";
1718  fCandidateVariableNames[35]="nSigmaTOFpr_etrk";
1719  fCandidateVariableNames[36]="nSigmaTPCka_etrk";
1720  fCandidateVariableNames[37]="nSigmaTOFka_etrk";
1721  fCandidateVariableNames[38]="MassK0Short";
1722  fCandidateVariableNames[39]="mcpdggrmomele";
1723  fCandidateVariableNames[40]="mcpdggrmomv0";
1724  fCandidateVariableNames[41]="mcngenele";
1725  fCandidateVariableNames[42]="mcngenv0";
1726  fCandidateVariableNames[43]="mclcpx";
1727  fCandidateVariableNames[44]="mclcpy";
1728  fCandidateVariableNames[45]="mclcpz";
1729  fCandidateVariableNames[46]="mcelepx";
1730  fCandidateVariableNames[47]="mcelepy";
1731  fCandidateVariableNames[48]="mcelepz";
1732  fCandidateVariableNames[49]="mcv0px";
1733  fCandidateVariableNames[50]="mcv0py";
1734  fCandidateVariableNames[51]="mcv0pz";
1735  fCandidateVariableNames[52]="nSigmaTPCpi_etrk";
1736  fCandidateVariableNames[53]="nSigmaTOFpi_etrk";
1737  fCandidateVariableNames[54]="PrimVertx";
1738  fCandidateVariableNames[55]="PrimVerty";
1739  fCandidateVariableNames[56]="PrimVertz";
1740  fCandidateVariableNames[57]="V0Vertx";
1741  fCandidateVariableNames[58]="V0Verty";
1742  fCandidateVariableNames[59]="V0Vertz";
1743 
1744  fCandidateVariableNames[60]="DcaV0PrToPrimVertex";
1745  fCandidateVariableNames[61]="DcaV0PiToPrimVertex";
1746  fCandidateVariableNames[62]="DcaV0daughters";
1747  fCandidateVariableNames[63]="V0CosPointingAngle";
1748  fCandidateVariableNames[64]="V0ProperDecayLength";
1749  fCandidateVariableNames[65]="MassK0Short2";
1750 
1751  fCandidateVariableNames[66]="nSigmaTPCv0pi";
1752  fCandidateVariableNames[67]="nSigmaTOFv0pi";
1753 
1754  fCandidateVariableNames[68]= "EleITSMatch";
1755  fCandidateVariableNames[69]= "V0PosITSMatch";
1756  fCandidateVariableNames[70]= "V0NegITSMatch";
1757  fCandidateVariableNames[71]= "IsV0PeakRegion";
1758  fCandidateVariableNames[72]= "mcpdgv0";
1759 
1760  fCandidateVariableNames[73]= "mcv0pospx";
1761  fCandidateVariableNames[74]= "mcv0pospy";
1762  fCandidateVariableNames[75]= "mcv0pospz";
1763  fCandidateVariableNames[76]= "mcpdgv0pos";
1764  fCandidateVariableNames[77]= "mcv0negpx";
1765  fCandidateVariableNames[78]= "mcv0negpy";
1766  fCandidateVariableNames[79]= "mcv0negpz";
1767  fCandidateVariableNames[80]= "mcpdgv0neg";
1768 
1769  fCandidateVariableNames[81]= "ProtonPxPV";
1770  fCandidateVariableNames[82]= "ProtonPyPV";
1771  fCandidateVariableNames[83]= "ProtonPzPV";
1772  fCandidateVariableNames[84]= "PiPxPV";
1773  fCandidateVariableNames[85]= "PiPyPV";
1774  fCandidateVariableNames[86]= "PiPzPV";
1775 
1776  fCandidateVariableNames[87]= "mcv0vertx";
1777  fCandidateVariableNames[88]= "mcv0verty";
1778  fCandidateVariableNames[89]= "mcv0vertz";
1779 
1780  fCandidateVariableNames[90]="OnFlyStatus";
1781  fCandidateVariableNames[91]="MagneticField";
1782  fCandidateVariableNames[92]="EvNumber";
1783  fCandidateVariableNames[93]="RunNumber";
1784 
1785 
1786  for (Int_t ivar=0; ivar<nVar; ivar++) {
1787  fVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
1788  }
1789 
1790  return;
1791 }
1792 
1794 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillROOTObjects(AliAODRecoCascadeHF *elobj, AliAODv0 *v0, AliAODTrack *trk, AliAODTrack *trkpid, AliAODEvent *event, TClonesArray *mcArray)
1795 {
1799  if(!trk) return;
1800  if(!trkpid) return;
1801  if(!v0) return;
1802 
1803  for(Int_t i=0;i<94;i++)
1804  {
1805  fCandidateVariables[i] = -9999.;
1806  }
1807 
1808  Bool_t anti_lambda_flag = kFALSE;
1809  if(fabs(v0->MassAntiLambda()-1.115683)<fAnalCuts->GetProdV0MassTolLambdaRough()) anti_lambda_flag = kTRUE;
1810 
1811  AliAODTrack *cptrack = (AliAODTrack*)(v0->GetDaughter(0));
1812  AliAODTrack *cntrack = (AliAODTrack*)(v0->GetDaughter(1));
1813 // if(cptrack->Charge()<0 && cntrack->Charge()>0){
1814 // cptrack = (AliAODTrack*)(v0->GetDaughter(1));
1815 // cntrack = (AliAODTrack*)(v0->GetDaughter(0));
1816 // }
1817 
1818  Double_t v0px = elobj->PxProng(1);
1819  Double_t v0py = elobj->PyProng(1);
1820  Double_t v0pz = elobj->PzProng(1);
1821  Double_t momv0 = sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz);
1822  Double_t Ev0 = sqrt(momv0*momv0+1.115683*1.115683);
1823  Double_t epx = elobj->PxProng(0);
1824  Double_t epy = elobj->PyProng(0);
1825  Double_t epz = elobj->PzProng(0);
1826  Double_t mome = sqrt(epx*epx+epy*epy+epz*epz);
1827  Double_t Ee = sqrt(mome*mome+0.000510998928*0.000510998928);
1828  Double_t cosoa = (v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz);
1829  Double_t Esum = Ee + Ev0;
1830 
1831  Double_t uxe = epx/mome;
1832  Double_t uye = epy/mome;
1833  Double_t uze = epz/mome;
1834  Double_t lf = -2.*(v0px*uxe+v0py*uye+v0pz*uze);
1835  Double_t pxv_flip = v0px + lf * uxe;
1836  Double_t pyv_flip = v0py + lf * uye;
1837  Double_t pzv_flip = v0pz + lf * uze;
1838  Double_t pxsum_flip = epx + pxv_flip;
1839  Double_t pysum_flip = epy + pyv_flip;
1840  Double_t pzsum_flip = epz + pzv_flip;
1841  Double_t melam_flip = sqrt(Esum*Esum-pxsum_flip*pxsum_flip-pysum_flip*pysum_flip-pzsum_flip*pzsum_flip);
1842  Double_t ptelam_flip = sqrt(pxsum_flip*pxsum_flip+pysum_flip*pysum_flip);
1843 
1844  Double_t minmass_ee = 9999.;
1845  Bool_t isconv = fAnalCuts->TagConversions(trk,fGTIndex,(AliAODEvent*)event,event->GetNumberOfTracks(),minmass_ee);
1846  Double_t minmasslike_ee = 9999.;
1847  Bool_t isconv_like = fAnalCuts->TagConversionsSameSign(trk,fGTIndex,(AliAODEvent*)event,event->GetNumberOfTracks(),minmasslike_ee);
1848 
1850  UInt_t pdgdg[2]={11,3122};
1851  fCandidateVariables[ 1] = elobj->InvMass(2,pdgdg);
1852  fCandidateVariables[ 2] = elobj->Pt();
1853  fCandidateVariables[ 3] = elobj->Px();
1854  fCandidateVariables[ 4] = elobj->Py();
1855  fCandidateVariables[ 5] = elobj->Pz();
1856  fCandidateVariables[ 6] = elobj->PxProng(0);
1857  fCandidateVariables[ 7] = elobj->PyProng(0);
1858  fCandidateVariables[ 8] = elobj->PzProng(0);
1859  fCandidateVariables[ 9] = elobj->PxProng(1);
1860  fCandidateVariables[10] = elobj->PyProng(1);
1861  fCandidateVariables[11] = elobj->PzProng(1);
1862  fCandidateVariables[12] = anti_lambda_flag;
1863  fCandidateVariables[13] = v0->MassLambda();
1864  fCandidateVariables[14] = v0->MassAntiLambda();
1865  fCandidateVariables[15] = elobj->Getd0Prong(0);
1866  fCandidateVariables[16] = elobj->Getd0Prong(1);
1867 
1868  Double_t nSigmaTPCele=-9999.;
1869  Double_t nSigmaTOFele=-9999.;
1870  Double_t nSigmaTPCv0pr=-9999.;
1871  Double_t nSigmaTOFv0pr=-9999.;
1872  Double_t nSigmaTPCv0pi=-9999.;
1873  Double_t nSigmaTOFv0pi=-9999.;
1874  if(fAnalCuts->GetIsUsePID())
1875  {
1876  nSigmaTPCele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kElectron);
1877  nSigmaTOFele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trkpid,AliPID::kElectron);
1878  fCandidateVariables[17] = nSigmaTPCele;
1879  fCandidateVariables[18] = nSigmaTOFele;
1880  }
1881 
1882  if(fAnalCuts->GetUseLambdaPID())
1883  {
1884  if(anti_lambda_flag){
1885  nSigmaTPCv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kProton);
1886  nSigmaTOFv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTOF(cntrack,AliPID::kProton);
1887  nSigmaTPCv0pi = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kPion);
1888  nSigmaTOFv0pi = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTOF(cptrack,AliPID::kPion);
1889  }else{
1890  nSigmaTPCv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kProton);
1891  nSigmaTOFv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTOF(cptrack,AliPID::kProton);
1892  nSigmaTPCv0pi = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kPion);
1893  nSigmaTOFv0pi = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTOF(cntrack,AliPID::kPion);
1894  }
1895  fCandidateVariables[19] = nSigmaTPCv0pr;
1896  fCandidateVariables[20] = nSigmaTOFv0pr;
1897  fCandidateVariables[66] = nSigmaTPCv0pi;
1898  fCandidateVariables[67] = nSigmaTOFv0pi;
1899  }
1900  fCandidateVariables[21] = trk->Charge();
1901 
1902  if(anti_lambda_flag){
1903  fCandidateVariables[22] = v0->MomNegX(); //cntrack->Px();
1904  fCandidateVariables[23] = v0->MomNegY(); //cntrack->Py();
1905  fCandidateVariables[24] = v0->MomNegZ(); //cntrack->Pz();
1906  fCandidateVariables[25] = v0->MomPosX(); //cptrack->Px();
1907  fCandidateVariables[26] = v0->MomPosY(); //cptrack->Py();
1908  fCandidateVariables[27] = v0->MomPosZ(); //cptrack->Pz();
1909  }else{
1910  fCandidateVariables[22] = v0->MomPosX(); //cptrack->Px();
1911  fCandidateVariables[23] = v0->MomPosY(); //cptrack->Py();
1912  fCandidateVariables[24] = v0->MomPosZ(); //cptrack->Pz();
1913  fCandidateVariables[25] = v0->MomNegX(); //cntrack->Px();
1914  fCandidateVariables[26] = v0->MomNegY(); //cntrack->Py();
1915  fCandidateVariables[27] = v0->MomNegZ(); //cntrack->Pz();
1916  }
1917 
1918  AliAODMCParticle *mclc = 0;
1919  AliAODMCParticle *mcele = 0;
1920  AliAODMCParticle *mcv0 = 0;
1921  Int_t mclablc = 0;
1922  Int_t mcpdgele_array[100];
1923  Int_t mcpdgv0_array[100];
1924  Int_t mclabelele_array[100];
1925  Int_t mclabelv0_array[100];
1926  Int_t mcngen_ele=-9999;
1927  Int_t mcngen_v0=-9999;
1928 
1929  if(fUseMCInfo && mcArray){
1930  mclablc = MatchToMC(elobj,mcArray,mcpdgele_array, mcpdgv0_array,mclabelele_array,mclabelv0_array,mcngen_ele,mcngen_v0);
1931  if(mclabelele_array[0]>=0){
1932  mcele = (AliAODMCParticle*) mcArray->At(mclabelele_array[0]);
1933  if(mcele){
1934  fCandidateVariables[46] = mcele->Px();
1935  fCandidateVariables[47] = mcele->Py();
1936  fCandidateVariables[48] = mcele->Pz();
1937  }
1938  }
1939  if(mclabelv0_array[0]>=0){
1940  mcv0 = (AliAODMCParticle*) mcArray->At(mclabelv0_array[0]);
1941  if(mcv0){
1942  fCandidateVariables[49] = mcv0->Px();
1943  fCandidateVariables[50] = mcv0->Py();
1944  fCandidateVariables[51] = mcv0->Pz();
1945  fCandidateVariables[72] = mcv0->GetPdgCode();
1946  }
1947  }else{
1948  Int_t pdgdgv0[2]={211,211};
1949  Int_t labV0 = v0->MatchToMC(310,mcArray,2,pdgdgv0); // the V0
1950  if(labV0>=0){
1951  mcv0 = (AliAODMCParticle*) mcArray->At(labV0);
1952  if(mcv0){
1953  fCandidateVariables[49] = mcv0->Px();
1954  fCandidateVariables[50] = mcv0->Py();
1955  fCandidateVariables[51] = mcv0->Pz();
1956  fCandidateVariables[72] = mcv0->GetPdgCode();
1957  }
1958  }
1959  }
1960 
1961  Int_t labPos = cptrack->GetLabel();
1962  if(labPos>=0){
1963  AliAODMCParticle *mcv0pos = (AliAODMCParticle*)mcArray->At(labPos);
1964  fCandidateVariables[73] = mcv0pos->Px();
1965  fCandidateVariables[74] = mcv0pos->Py();
1966  fCandidateVariables[75] = mcv0pos->Pz();
1967  fCandidateVariables[76] = mcv0pos->GetPdgCode();
1968  fCandidateVariables[87] = mcv0pos->Xv();
1969  fCandidateVariables[88] = mcv0pos->Yv();
1970  fCandidateVariables[89] = mcv0pos->Zv();
1971  }
1972  Int_t labNeg = cntrack->GetLabel();
1973  if(labNeg>=0){
1974  AliAODMCParticle *mcv0neg = (AliAODMCParticle*)mcArray->At(labNeg);
1975  fCandidateVariables[77] = mcv0neg->Px();
1976  fCandidateVariables[78] = mcv0neg->Py();
1977  fCandidateVariables[79] = mcv0neg->Pz();
1978  fCandidateVariables[80] = mcv0neg->GetPdgCode();
1979  }
1980 
1981  if(mclablc>-1){
1982  mclc = (AliAODMCParticle*) mcArray->At(mclablc);
1983  if(mclc){
1984  fCandidateVariables[28] = mclc->GetPdgCode();
1985  fCandidateVariables[29] = mclc->Label();
1986  fCandidateVariables[43] = mclc->Px();
1987  fCandidateVariables[44] = mclc->Py();
1988  fCandidateVariables[45] = mclc->Pz();
1989  }
1990  }
1991  fCandidateVariables[30] = mcpdgele_array[1];
1992  fCandidateVariables[31] = mcpdgv0_array[1];
1993  fCandidateVariables[33] = mcpdgele_array[0];
1994  fCandidateVariables[39] = mcpdgele_array[2];
1995  fCandidateVariables[40] = mcpdgv0_array[2];
1996  fCandidateVariables[41] = mcngen_ele;
1997  fCandidateVariables[42] = mcngen_v0;
1998  }
1999  fCandidateVariables[32] = 0;
2000 
2001  if(fAnalCuts->GetIsUsePID())
2002  {
2003  Double_t nSigmaTPCpr_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kProton);
2004  Double_t nSigmaTOFpr_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trkpid,AliPID::kProton);
2005  Double_t nSigmaTPCka_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kKaon);
2006  Double_t nSigmaTOFka_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trkpid,AliPID::kKaon);
2007  Double_t nSigmaTPCpi_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kPion);
2008  Double_t nSigmaTOFpi_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trkpid,AliPID::kPion);
2009  fCandidateVariables[34] = nSigmaTPCpr_etrk;
2010  fCandidateVariables[35] = nSigmaTOFpr_etrk;
2011  fCandidateVariables[36] = nSigmaTPCka_etrk;
2012  fCandidateVariables[37] = nSigmaTOFka_etrk;
2013  fCandidateVariables[52] = nSigmaTPCpi_etrk;
2014  fCandidateVariables[53] = nSigmaTOFpi_etrk;
2015  }
2016  fCandidateVariables[38] = v0->MassK0Short();
2017 
2018  fCandidateVariables[54] = fVtx1->GetX();
2019  fCandidateVariables[55] = fVtx1->GetY();
2020  fCandidateVariables[56] = fVtx1->GetZ();
2021  fCandidateVariables[57] = v0->DecayVertexV0X();
2022  fCandidateVariables[58] = v0->DecayVertexV0Y();
2023  fCandidateVariables[59] = v0->DecayVertexV0Z();
2024 
2025  Double_t lDcaPosToPrimVertex = v0->DcaPosToPrimVertex();
2026  Double_t lDcaNegToPrimVertex = v0->DcaNegToPrimVertex();
2027  if(!anti_lambda_flag){
2028  fCandidateVariables[60] = lDcaPosToPrimVertex;
2029  fCandidateVariables[61] = lDcaNegToPrimVertex;
2030  }else{
2031  fCandidateVariables[60] = lDcaNegToPrimVertex;
2032  fCandidateVariables[61] = lDcaPosToPrimVertex;
2033  }
2034  fCandidateVariables[62] = v0->DcaV0Daughters();
2035  Double_t posVtx[3] = {0.,0.,0.};
2036  fVtx1->GetXYZ(posVtx);
2037  fCandidateVariables[63] = v0->CosPointingAngle(posVtx);
2038  Double_t ptotlam = TMath::Sqrt(pow(v0->Px(),2)+pow(v0->Py(),2)+pow(v0->Pz(),2));
2039  fCandidateVariables[64] = v0->DecayLengthV0(posVtx)*1.1157/ptotlam;
2040  fCandidateVariables[65] = v0->MassK0Short();
2041 
2042  if(trk) fCandidateVariables[68] = trk->GetITSClusterMap();
2043  if(cptrack) fCandidateVariables[69] = cptrack->GetITSClusterMap();
2044  if(cntrack) fCandidateVariables[70] = cntrack->GetITSClusterMap();
2045 
2047 
2048  if(!anti_lambda_flag){
2049  fCandidateVariables[81] = cptrack->Px();
2050  fCandidateVariables[82] = cptrack->Py();
2051  fCandidateVariables[83] = cptrack->Pz();
2052  fCandidateVariables[84] = cntrack->Px();
2053  fCandidateVariables[85] = cntrack->Py();
2054  fCandidateVariables[86] = cntrack->Pz();
2055  }else{
2056  fCandidateVariables[81] = cntrack->Px();
2057  fCandidateVariables[82] = cntrack->Py();
2058  fCandidateVariables[83] = cntrack->Pz();
2059  fCandidateVariables[84] = cptrack->Px();
2060  fCandidateVariables[85] = cptrack->Py();
2061  fCandidateVariables[86] = cptrack->Pz();
2062  }
2063  fCandidateVariables[90] = v0->GetOnFlyStatus();
2064 
2065  fCandidateVariables[91] = fBzkG;
2068 
2069 
2070 // if(fWriteVariableTree)
2071 // fVariablesTree->Fill();
2072 
2073  Double_t dphis_ele_pr, detas_ele_pr,dphis_ele_pi, detas_ele_pi;
2074  dphis_ele_pr = 9999.;detas_ele_pr = 9999.;dphis_ele_pi = 9999.;detas_ele_pi = 9999.;
2075  //fAnalCuts->GetdPhiSdEtaSR125(trk,cptrack,cntrack,fBzkG,posVtx, dphis_ele_pr,detas_ele_pr,dphis_ele_pi,detas_ele_pi);
2076 
2077  Double_t cont[3];
2078  cont[0] = elobj->InvMass(2,pdgdg);
2079  cont[1] = elobj->Pt();
2080  cont[2] = fCentrality;
2081  fHistoEleLambdaMass->Fill(cont);
2082 
2083  Double_t cont_flip[3];
2084  cont_flip[0] = melam_flip;
2085  cont_flip[1] = ptelam_flip;
2086  cont_flip[2] = fCentrality;
2087 
2088  Double_t cont2[3];
2089  cont2[0] = elobj->InvMass(2,pdgdg);
2090  cont2[1] = trk->Pt();
2091  cont2[2] = fCentrality;
2092  Double_t cont_eleptvseta[3];
2093  cont_eleptvseta[0] = trk->Pt();
2094  cont_eleptvseta[1] = trk->Eta();
2095  cont_eleptvseta[2] = fCentrality;
2096 
2097  Double_t cont_eleptvslambdapt[3];
2098  cont_eleptvslambdapt[0] = trk->Pt();
2099  cont_eleptvslambdapt[1] = v0->Pt();
2100  cont_eleptvslambdapt[2] = fCentrality;
2101 
2102  Double_t cont_eleptvsd0[3];
2103  cont_eleptvsd0[0] = trk->Pt();
2104  cont_eleptvsd0[1] = elobj->Getd0Prong(0)*trk->Charge();
2105  cont_eleptvsd0[2] = fCentrality;
2106 
2107  Double_t cont_eleptvsv0dl[3];
2108  cont_eleptvsv0dl[0] = trk->Pt();
2109  cont_eleptvsv0dl[1] = v0->DecayLengthV0(posVtx)*1.115683/ptotlam;
2110  cont_eleptvsv0dl[2] = fCentrality;
2111 
2112  Double_t cont_elelamptvsv0dl[4];
2113  cont_elelamptvsv0dl[0] = elobj->Pt();
2114  cont_elelamptvsv0dl[1] = v0->DecayLengthV0(posVtx)*1.115683/ptotlam;
2115  cont_elelamptvsv0dl[2] = elobj->Getd0Prong(0)*trk->Charge();
2116  cont_elelamptvsv0dl[3] = fCentrality;
2117 
2118  Double_t cont_elelamptvsv0dl_flip[4];
2119  cont_elelamptvsv0dl_flip[0] = ptelam_flip;
2120  cont_elelamptvsv0dl_flip[1] = v0->DecayLengthV0(posVtx)*1.115683/ptotlam;
2121  cont_elelamptvsv0dl_flip[2] = 0.0;
2122  cont_elelamptvsv0dl_flip[3] = fCentrality;
2123 
2124 
2125  Double_t cont_eleptvsv0dca[3];
2126  cont_eleptvsv0dca[0] = trk->Pt();
2127  cont_eleptvsv0dca[1] = v0->DcaV0ToPrimVertex();
2128  cont_eleptvsv0dca[2] = fCentrality;
2129 
2130  Double_t elobj_mass = elobj->InvMass(2,pdgdg);
2131  Double_t elobj_px = elobj->Px();
2132  Double_t elobj_py = elobj->Py();
2133  Double_t elobj_pz = elobj->Pz();
2134  Double_t elobj_E = sqrt(elobj_mass*elobj_mass+elobj_px*elobj_px+elobj_py*elobj_py+elobj_pz*elobj_pz);
2135  Double_t elobj_rap = 0.5*log((elobj_E+elobj_pz)/(elobj_E-elobj_pz));
2136 
2137  //
2138  // Old strategy only look at mass and pairpt
2139  //
2141  {
2142  if((trk->Charge()>0 && !anti_lambda_flag) || (trk->Charge()<0 && anti_lambda_flag)){
2143  fHistoEleLambdaMassRS->Fill(cont);
2144  if(trk->Charge()>0) fHistoEleLambdaMassRS1->Fill(cont);
2145  else fHistoEleLambdaMassRS2->Fill(cont);
2146 
2147  fHistoEleLambdaMassvsElePtRS->Fill(cont2);
2148  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtRS1->Fill(cont2);
2149  else fHistoEleLambdaMassvsElePtRS2->Fill(cont2);
2150  if(cont[0]<2.3){
2151  fHistoEleLambdaPtvsRapidityRS->Fill(elobj->Pt(),elobj_rap);
2152  fHistoElePtRS->Fill(trk->Pt(),fCentrality);
2153  fHistoElePtvsEtaRS->Fill(cont_eleptvseta);
2154  fHistoElePtvsLambdaPtRS->Fill(cont_eleptvslambdapt);
2155  fHistoElePtvsd0RS->Fill(cont_eleptvsd0);
2156 
2157  fHistoElePtvsV0dlRS->Fill(cont_eleptvsv0dl);
2158  if(trk->Charge()>0) fHistoElePtvsV0dlRS1->Fill(cont_eleptvsv0dl);
2159  else fHistoElePtvsV0dlRS2->Fill(cont_eleptvsv0dl);
2160 
2161  fHistoEleLambdaPtvsV0dlRS->Fill(cont_elelamptvsv0dl);
2162  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlRS1->Fill(cont_elelamptvsv0dl);
2163  else fHistoEleLambdaPtvsV0dlRS2->Fill(cont_elelamptvsv0dl);
2164 
2165  fHistoElePtvsV0dcaRS->Fill(cont_eleptvsv0dca);
2166  if(trk->Charge()>0) fHistoElePtvsV0dcaRS1->Fill(cont_eleptvsv0dca);
2167  else fHistoElePtvsV0dcaRS2->Fill(cont_eleptvsv0dca);
2168 
2169  for(Int_t ih=0;ih<17;ih++){
2170  Double_t cont_eleptvscutvars[3];
2171  cont_eleptvscutvars[0] = elobj->Pt();
2172  cont_eleptvscutvars[2] = fCentrality;
2173 
2174  if(ih==0){
2175  cont_eleptvscutvars[1] = trk->GetTPCNcls();
2176  }else if(ih==1){
2177  cont_eleptvscutvars[1] = trk->GetTPCsignalN();
2178  }else if(ih==2){
2179  cont_eleptvscutvars[1] = nSigmaTPCele;
2180  }else if(ih==3){
2181  cont_eleptvscutvars[1] = nSigmaTOFele;
2182  }else if(ih==4){
2183  cont_eleptvscutvars[1] = trk->Eta();
2184  }else if(ih==5){
2185  cont_eleptvscutvars[1] = trk->GetITSNcls();
2186  }else if(ih==6){
2187  if(!anti_lambda_flag)
2188  cont_eleptvscutvars[1] = v0->MassLambda();
2189  else
2190  cont_eleptvscutvars[1] = v0->MassAntiLambda();
2191  }else if(ih==7){
2192  Double_t lPosV0[3];
2193  lPosV0[0] = v0->DecayVertexV0X();
2194  lPosV0[1] = v0->DecayVertexV0Y();
2195  lPosV0[2] = v0->DecayVertexV0Z();
2196  cont_eleptvscutvars[1] = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
2197  }else if(ih==8){
2198  cont_eleptvscutvars[1] = v0->DcaV0Daughters();
2199  }else if(ih==9){
2200  if(!anti_lambda_flag)
2201  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
2202  else
2203  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
2204  }else if(ih==10){
2205  if(!anti_lambda_flag)
2206  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
2207  else
2208  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
2209  }else if(ih==11){
2210  cont_eleptvscutvars[1] = v0->CosPointingAngle(posVtx);
2211  }else if(ih==12){
2212  cont_eleptvscutvars[1] = v0->MassK0Short();
2213  }else if(ih==13){
2214  cont_eleptvscutvars[1] = nSigmaTPCv0pr;
2215  }else if(ih==14){
2216  cont_eleptvscutvars[1] = nSigmaTPCv0pi;
2217  }else if(ih==15){
2218  cont_eleptvscutvars[1] = v0->Eta();
2219  }else if(ih==16){
2220  Double_t v0px = elobj->PxProng(1);
2221  Double_t v0py = elobj->PyProng(1);
2222  Double_t v0pz = elobj->PzProng(1);
2223  Double_t epx = elobj->PxProng(0);
2224  Double_t epy = elobj->PyProng(0);
2225  Double_t epz = elobj->PzProng(0);
2226  cont_eleptvscutvars[1] = acos((v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz));
2227  }else{
2228  cont_eleptvscutvars[1] = -9999.;
2229  }
2230 
2231  fHistoElePtvsCutVarsRS[ih]->Fill(cont_eleptvscutvars);
2232  }
2233  }
2234  if(fUseMCInfo){
2235  if(mclc){
2236  Int_t pdgcode = mclc->GetPdgCode();
2237  Double_t cont_mclc[3];
2238  cont_mclc[0] = mclc->Pt();
2239  cont_mclc[1] = mclc->Y();
2240  cont_mclc[2] = fCentrality;
2241  Double_t cont_mcele[3];
2242  cont_mcele[0] = mcele->Pt();
2243  cont_mcele[1] = mcele->Eta();
2244  cont_mcele[2] = fCentrality;
2245 
2246  Int_t labmotherlc = mclc->GetMother();
2247  Bool_t isbottomfd = kFALSE;
2248  if(labmotherlc>=0){
2249  AliAODMCParticle *motherlc = (AliAODMCParticle*)mcArray->At(labmotherlc);
2250  Int_t pdgmotherlc = motherlc->GetPdgCode();
2251  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){
2252  isbottomfd = kTRUE;
2253  }
2254  }
2255  cont2[1] = mcele->Pt();
2256 
2257  if(abs(pdgcode)==4122 && abs(mcpdgele_array[1])==4122 && abs(mcpdgv0_array[1])==4122){
2258  fHistoEleLambdaMassMCS->Fill(cont);
2259  fHistoEleLambdaMassvsElePtMCS->Fill(cont2);
2260  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtMCS1->Fill(cont2);
2261  else fHistoEleLambdaMassvsElePtMCS2->Fill(cont2);
2262  if(cont[0]<2.3){
2263  fHistoEleLambdaPtvsRapidityMCS->Fill(elobj->Pt(),elobj_rap);
2264  fHistoElePtMCS->Fill(trk->Pt(),fCentrality);
2265  fHistoElePtvsEtaMCS->Fill(cont_eleptvseta);
2266  fHistoElePtvsLambdaPtMCS->Fill(cont_eleptvslambdapt);
2267  fHistoElePtvsd0MCS->Fill(cont_eleptvsd0);
2268 
2269  fHistoElePtvsV0dlMCS->Fill(cont_eleptvsv0dl);
2270  if(trk->Charge()>0) fHistoElePtvsV0dlMCS1->Fill(cont_eleptvsv0dl);
2271  else fHistoElePtvsV0dlMCS2->Fill(cont_eleptvsv0dl);
2272 
2273  fHistoElePtvsV0dcaMCS->Fill(cont_eleptvsv0dca);
2274  if(trk->Charge()>0) fHistoElePtvsV0dcaMCS1->Fill(cont_eleptvsv0dca);
2275  else fHistoElePtvsV0dcaMCS2->Fill(cont_eleptvsv0dca);
2276 
2277  fHistoEleLambdaPtvsV0dlMCS->Fill(cont_elelamptvsv0dl);
2278  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlMCS1->Fill(cont_elelamptvsv0dl);
2279  else fHistoEleLambdaPtvsV0dlMCS2->Fill(cont_elelamptvsv0dl);
2280 
2281  if(isbottomfd){
2282  fHistoEleLambdaPtvsV0dlBFeeddownMCS->Fill(cont_elelamptvsv0dl);
2283  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlBFeeddownMCS1->Fill(cont_elelamptvsv0dl);
2284  else fHistoEleLambdaPtvsV0dlBFeeddownMCS2->Fill(cont_elelamptvsv0dl);
2285  }else{
2286  fHistoEleLambdaPtvsV0dlPromptMCS->Fill(cont_elelamptvsv0dl);
2287  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlPromptMCS1->Fill(cont_elelamptvsv0dl);
2288  else fHistoEleLambdaPtvsV0dlPromptMCS2->Fill(cont_elelamptvsv0dl);
2289  }
2290 
2291  fHistoLcMCS->Fill(cont_mclc);
2292  if(trk->Charge()>0) fHistoLcMCS1->Fill(cont_mclc);
2293  else fHistoLcMCS2->Fill(cont_mclc);
2294 
2295  fHistoLcElectronMCS->Fill(cont_mcele);
2296  if(trk->Charge()>0) fHistoLcElectronMCS1->Fill(cont_mcele);
2297  else fHistoLcElectronMCS2->Fill(cont_mcele);
2298 
2299  fHistoResponseElePt->Fill(mclc->Pt(),trk->Pt());
2300  if(trk->Charge()>0) fHistoResponseElePt1->Fill(mclc->Pt(),trk->Pt());
2301  else fHistoResponseElePt2->Fill(mclc->Pt(),trk->Pt());
2302  fHistoResponseEleLambdaPt->Fill(mclc->Pt(),elobj->Pt());
2303  if(trk->Charge()>0) fHistoResponseEleLambdaPt1->Fill(mclc->Pt(),trk->Pt());
2304  else fHistoResponseEleLambdaPt2->Fill(mclc->Pt(),trk->Pt());
2305 
2306  fHistoResponseLambdaPt->Fill(mclc->Pt(),v0->Pt());
2307  fHistoResponseLambdaPtvsEleLambdaPt->Fill(elobj->Pt(),v0->Pt());
2308 
2309  Double_t cont_eleptvslambdaptvslcpt[4];
2310  cont_eleptvslambdaptvslcpt[0] = cont_eleptvslambdapt[0];
2311  cont_eleptvslambdaptvslcpt[1] = cont_eleptvslambdapt[1];
2312  cont_eleptvslambdaptvslcpt[2] = mclc->Pt();
2313  cont_eleptvslambdaptvslcpt[3] = cont_eleptvslambdapt[2];
2314  fHistoElePtvsLambdaPtvsLcPtMCS->Fill(cont_eleptvslambdaptvslcpt);
2315 
2316  Double_t cont_allpt[4];
2317  cont_allpt[0] = mclc->Pt();
2318  cont_allpt[1] = elobj->Pt();
2319  cont_allpt[2] = trk->Pt();
2320  cont_allpt[3] = v0->Pt();
2321  fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt->Fill(cont_allpt);
2322 
2323  if(isbottomfd){
2324  fHistoElePtvsd0BFeeddownMCS->Fill(cont_eleptvsd0);
2325  }else{
2326  fHistoElePtvsd0PromptMCS->Fill(cont_eleptvsd0);
2327  }
2328 
2329  for(Int_t ih=0;ih<17;ih++){
2330  Double_t cont_eleptvscutvars[3];
2331  cont_eleptvscutvars[0] = elobj->Pt();
2332  cont_eleptvscutvars[2] = fCentrality;
2333 
2334  if(ih==0){
2335  cont_eleptvscutvars[1] = trk->GetTPCNcls();
2336  }else if(ih==1){
2337  cont_eleptvscutvars[1] = trk->GetTPCsignalN();
2338  }else if(ih==2){
2339  cont_eleptvscutvars[1] = nSigmaTPCele;
2340  }else if(ih==3){
2341  cont_eleptvscutvars[1] = nSigmaTOFele;
2342  }else if(ih==4){
2343  cont_eleptvscutvars[1] = trk->Eta();
2344  }else if(ih==5){
2345  cont_eleptvscutvars[1] = trk->GetITSNcls();
2346  }else if(ih==6){
2347  if(!anti_lambda_flag)
2348  cont_eleptvscutvars[1] = v0->MassLambda();
2349  else
2350  cont_eleptvscutvars[1] = v0->MassAntiLambda();
2351  }else if(ih==7){
2352  Double_t lPosV0[3];
2353  lPosV0[0] = v0->DecayVertexV0X();
2354  lPosV0[1] = v0->DecayVertexV0Y();
2355  lPosV0[2] = v0->DecayVertexV0Z();
2356  cont_eleptvscutvars[1] = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
2357  }else if(ih==8){
2358  cont_eleptvscutvars[1] = v0->DcaV0Daughters();
2359  }else if(ih==9){
2360  if(!anti_lambda_flag)
2361  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
2362  else
2363  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
2364  }else if(ih==10){
2365  if(!anti_lambda_flag)
2366  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
2367  else
2368  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
2369  }else if(ih==11){
2370  cont_eleptvscutvars[1] = v0->CosPointingAngle(posVtx);
2371  }else if(ih==12){
2372  cont_eleptvscutvars[1] = v0->MassK0Short();
2373  }else if(ih==13){
2374  cont_eleptvscutvars[1] = nSigmaTPCv0pr;
2375  }else if(ih==14){
2376  cont_eleptvscutvars[1] = nSigmaTPCv0pi;
2377  }else if(ih==15){
2378  cont_eleptvscutvars[1] = v0->Eta();
2379  }else if(ih==16){
2380  Double_t v0px = elobj->PxProng(1);
2381  Double_t v0py = elobj->PyProng(1);
2382  Double_t v0pz = elobj->PzProng(1);
2383  Double_t epx = elobj->PxProng(0);
2384  Double_t epy = elobj->PyProng(0);
2385  Double_t epz = elobj->PzProng(0);
2386  cont_eleptvscutvars[1] = acos((v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz));
2387  }else{
2388  cont_eleptvscutvars[1] = -9999.;
2389  }
2390 
2391  fHistoElePtvsCutVarsMCS[ih]->Fill(cont_eleptvscutvars);
2392  }
2393  }
2394  }
2395  if(abs(pdgcode)==4132 && abs(mcpdgele_array[1])==4132 && abs(mcpdgv0_array[1])==3312){
2398  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtFeeddownXic0MCS1->Fill(cont2);
2400  if(cont[0]<2.3){
2401  fHistoFeedDownXic0MCS->Fill(cont_mclc);
2402  if(trk->Charge()>0) fHistoFeedDownXic0MCS1->Fill(cont_mclc);
2403  else fHistoFeedDownXic0MCS2->Fill(cont_mclc);
2404 
2405  fHistoElectronFeedDownXic0MCS->Fill(cont_mcele);
2406  if(trk->Charge()>0) fHistoElectronFeedDownXic0MCS1->Fill(cont_mcele);
2407  else fHistoElectronFeedDownXic0MCS2->Fill(cont_mcele);
2408 
2409  fHistoElePtvsV0dlFeedDownXic0MCS->Fill(cont_eleptvsv0dl);
2410  if(trk->Charge()>0) fHistoElePtvsV0dlFeedDownXic0MCS1->Fill(cont_eleptvsv0dl);
2411  else fHistoElePtvsV0dlFeedDownXic0MCS2->Fill(cont_eleptvsv0dl);
2412 
2413  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS->Fill(cont_elelamptvsv0dl);
2414  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1->Fill(cont_elelamptvsv0dl);
2415  else fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2->Fill(cont_elelamptvsv0dl);
2416 
2417  if(isbottomfd){
2418  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS->Fill(cont_elelamptvsv0dl);
2419  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS1->Fill(cont_elelamptvsv0dl);
2420  else fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS2->Fill(cont_elelamptvsv0dl);
2421  }else{
2422  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS->Fill(cont_elelamptvsv0dl);
2423  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS1->Fill(cont_elelamptvsv0dl);
2424  else fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS2->Fill(cont_elelamptvsv0dl);
2425  }
2426 
2427  fHistoElePtvsV0dcaFeedDownXic0MCS->Fill(cont_eleptvsv0dca);
2428  if(trk->Charge()>0) fHistoElePtvsV0dcaFeedDownXic0MCS->Fill(cont_eleptvsv0dca);
2429  else fHistoElePtvsV0dcaFeedDownXic0MCS->Fill(cont_eleptvsv0dca);
2430 
2431  fHistoResponseEleLambdaPtFeeddownXic0->Fill(mclc->Pt(),elobj->Pt());
2432  if(trk->Charge()>0) fHistoResponseEleLambdaPtFeeddownXic01->Fill(mclc->Pt(),trk->Pt());
2433  else fHistoResponseEleLambdaPtFeeddownXic02->Fill(mclc->Pt(),trk->Pt());
2434 
2435  fHistoResponseLambdaPtFeeddownXic0->Fill(mclc->Pt(),v0->Pt());
2436 
2437  fHistoElePtFeeddownXic0MCS->Fill(trk->Pt(),fCentrality);
2438  fHistoElePtvsEtaFeeddownXic0MCS->Fill(cont_eleptvseta);
2439  fHistoElePtvsLambdaPtFeeddownXic0MCS->Fill(cont_eleptvslambdapt);
2440  }
2441  }
2442  if(abs(pdgcode)==4232 && abs(mcpdgele_array[1])==4232 && abs(mcpdgv0_array[1])==3322){
2445  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1->Fill(cont2);
2447  if(cont[0]<2.3){
2448  fHistoFeedDownXicPlusMCS->Fill(cont_mclc);
2449  if(trk->Charge()>0) fHistoFeedDownXicPlusMCS1->Fill(cont_mclc);
2450  else fHistoFeedDownXicPlusMCS2->Fill(cont_mclc);
2451 
2452  fHistoElectronFeedDownXicPlusMCS->Fill(cont_mcele);
2453  if(trk->Charge()>0) fHistoElectronFeedDownXicPlusMCS1->Fill(cont_mcele);
2454  else fHistoElectronFeedDownXicPlusMCS2->Fill(cont_mcele);
2455 
2456  fHistoElePtvsV0dlFeedDownXicPlusMCS->Fill(cont_eleptvsv0dl);
2457  if(trk->Charge()>0) fHistoElePtvsV0dlFeedDownXicPlusMCS1->Fill(cont_eleptvsv0dl);
2458  else fHistoElePtvsV0dlFeedDownXicPlusMCS2->Fill(cont_eleptvsv0dl);
2459 
2460  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS->Fill(cont_elelamptvsv0dl);
2461  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1->Fill(cont_elelamptvsv0dl);
2462  else fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2->Fill(cont_elelamptvsv0dl);
2463 
2464  if(isbottomfd){
2465  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS->Fill(cont_elelamptvsv0dl);
2466  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS1->Fill(cont_elelamptvsv0dl);
2467  else fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS2->Fill(cont_elelamptvsv0dl);
2468  }else{
2469  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS->Fill(cont_elelamptvsv0dl);
2470  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS1->Fill(cont_elelamptvsv0dl);
2471  else fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS2->Fill(cont_elelamptvsv0dl);
2472  }
2473 
2474  fHistoElePtvsV0dcaFeedDownXicPlusMCS->Fill(cont_eleptvsv0dca);
2475  if(trk->Charge()>0) fHistoElePtvsV0dcaFeedDownXicPlusMCS->Fill(cont_eleptvsv0dca);
2476  else fHistoElePtvsV0dcaFeedDownXicPlusMCS->Fill(cont_eleptvsv0dca);
2477 
2478  fHistoResponseEleLambdaPtFeeddownXicPlus->Fill(mclc->Pt(),elobj->Pt());
2479  if(trk->Charge()>0) fHistoResponseEleLambdaPtFeeddownXicPlus1->Fill(mclc->Pt(),trk->Pt());
2480  else fHistoResponseEleLambdaPtFeeddownXicPlus2->Fill(mclc->Pt(),trk->Pt());
2481 
2482  fHistoResponseLambdaPtFeeddownXicPlus->Fill(mclc->Pt(),v0->Pt());
2483 
2484  fHistoElePtFeeddownXicPlusMCS->Fill(trk->Pt(),fCentrality);
2485  fHistoElePtvsEtaFeeddownXicPlusMCS->Fill(cont_eleptvseta);
2486  fHistoElePtvsLambdaPtFeeddownXicPlusMCS->Fill(cont_eleptvslambdapt);
2487  }
2488  }
2489  if(abs(pdgcode)==4122 && abs(mcpdgele_array[1])==4122 && ( abs(mcpdgv0_array[1])==3212 || abs(mcpdgv0_array[1])==3214 || abs(mcpdgv0_array[1])==3224) ){
2490  if(cont[0]<2.3){
2491  fHistoFeedDownSigmaMCS->Fill(cont_mclc);
2492  if(trk->Charge()>0) fHistoFeedDownSigmaMCS1->Fill(cont_mclc);
2493  else fHistoFeedDownSigmaMCS2->Fill(cont_mclc);
2494 
2495  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS->Fill(cont_elelamptvsv0dl);
2496  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS1->Fill(cont_elelamptvsv0dl);
2497  else fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS2->Fill(cont_elelamptvsv0dl);
2498 
2499  if(isbottomfd){
2500  fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS->Fill(cont_elelamptvsv0dl);
2501  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS1->Fill(cont_elelamptvsv0dl);
2502  else fHistoEleLambdaPtvsV0dlFeedDownSigmaBFeeddownMCS2->Fill(cont_elelamptvsv0dl);
2503  }else{
2504  fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS->Fill(cont_elelamptvsv0dl);
2505  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS1->Fill(cont_elelamptvsv0dl);
2506  else fHistoEleLambdaPtvsV0dlFeedDownSigmaPromptMCS2->Fill(cont_elelamptvsv0dl);
2507  }
2508  fHistoResponseEleLambdaPtFeeddownSigma->Fill(mclc->Pt(),elobj->Pt());
2509  if(trk->Charge()>0) fHistoResponseEleLambdaPtFeeddownSigma1->Fill(mclc->Pt(),trk->Pt());
2510  else fHistoResponseEleLambdaPtFeeddownSigma2->Fill(mclc->Pt(),trk->Pt());
2511 
2512  fHistoResponseLambdaPtFeeddownSigma->Fill(mclc->Pt(),v0->Pt());
2513  }
2514  }
2515  }
2516  }
2517  fHistodPhiSdEtaSElectronProtonR125RS->Fill(dphis_ele_pr,detas_ele_pr);
2518  fHistodPhiSdEtaSElectronPionR125RS->Fill(dphis_ele_pi,detas_ele_pi);
2519  }else if((trk->Charge()<0 && !anti_lambda_flag) || (trk->Charge()>0 && anti_lambda_flag)){
2520  fHistoEleLambdaMassWS->Fill(cont);
2521  if(trk->Charge()>0) fHistoEleLambdaMassWS1->Fill(cont);
2522  else fHistoEleLambdaMassWS2->Fill(cont);
2523 
2524  fHistoEleLambdaMassvsElePtWS->Fill(cont2);
2525  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtWS1->Fill(cont2);
2526  else fHistoEleLambdaMassvsElePtWS2->Fill(cont2);
2527  if(cont[0]<2.3){
2528  fHistoEleLambdaPtvsRapidityWS->Fill(elobj->Pt(),elobj_rap);
2529  fHistoElePtWS->Fill(trk->Pt(),fCentrality);
2530  fHistoElePtvsEtaWS->Fill(cont_eleptvseta);
2531  fHistoElePtvsLambdaPtWS->Fill(cont_eleptvslambdapt);
2532  fHistoElePtvsd0WS->Fill(cont_eleptvsd0);
2533 
2534  fHistoElePtvsV0dlWS->Fill(cont_eleptvsv0dl);
2535  if(trk->Charge()>0) fHistoElePtvsV0dlWS1->Fill(cont_eleptvsv0dl);
2536  else fHistoElePtvsV0dlWS2->Fill(cont_eleptvsv0dl);
2537 
2538  fHistoEleLambdaPtvsV0dlWS->Fill(cont_elelamptvsv0dl);
2539  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlWS1->Fill(cont_elelamptvsv0dl);
2540  else fHistoEleLambdaPtvsV0dlWS2->Fill(cont_elelamptvsv0dl);
2541 
2542  fHistoElePtvsV0dcaWS->Fill(cont_eleptvsv0dca);
2543  if(trk->Charge()>0) fHistoElePtvsV0dcaWS1->Fill(cont_eleptvsv0dca);
2544  else fHistoElePtvsV0dcaWS2->Fill(cont_eleptvsv0dca);
2545 
2546  for(Int_t ih=0;ih<17;ih++){
2547  Double_t cont_eleptvscutvars[3];
2548  cont_eleptvscutvars[0] = elobj->Pt();
2549  cont_eleptvscutvars[2] = fCentrality;
2550 
2551  if(ih==0){
2552  cont_eleptvscutvars[1] = trk->GetTPCNcls();
2553  }else if(ih==1){
2554  cont_eleptvscutvars[1] = trk->GetTPCsignalN();
2555  }else if(ih==2){
2556  cont_eleptvscutvars[1] = nSigmaTPCele;
2557  }else if(ih==3){
2558  cont_eleptvscutvars[1] = nSigmaTOFele;
2559  }else if(ih==4){
2560  cont_eleptvscutvars[1] = trk->Eta();
2561  }else if(ih==5){
2562  cont_eleptvscutvars[1] = trk->GetITSNcls();
2563  }else if(ih==6){
2564  if(!anti_lambda_flag)
2565  cont_eleptvscutvars[1] = v0->MassLambda();
2566  else
2567  cont_eleptvscutvars[1] = v0->MassAntiLambda();
2568  }else if(ih==7){
2569  Double_t lPosV0[3];
2570  lPosV0[0] = v0->DecayVertexV0X();
2571  lPosV0[1] = v0->DecayVertexV0Y();
2572  lPosV0[2] = v0->DecayVertexV0Z();
2573  cont_eleptvscutvars[1] = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
2574  }else if(ih==8){
2575  cont_eleptvscutvars[1] = v0->DcaV0Daughters();
2576  }else if(ih==9){
2577  if(!anti_lambda_flag)
2578  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
2579  else
2580  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
2581  }else if(ih==10){
2582  if(!anti_lambda_flag)
2583  cont_eleptvscutvars[1] = v0->DcaNegToPrimVertex();
2584  else
2585  cont_eleptvscutvars[1] = v0->DcaPosToPrimVertex();
2586  }else if(ih==11){
2587  cont_eleptvscutvars[1] = v0->CosPointingAngle(posVtx);
2588  }else if(ih==12){
2589  cont_eleptvscutvars[1] = v0->MassK0Short();
2590  }else if(ih==13){
2591  cont_eleptvscutvars[1] = nSigmaTPCv0pr;
2592  }else if(ih==14){
2593  cont_eleptvscutvars[1] = nSigmaTPCv0pi;
2594  }else if(ih==15){
2595  cont_eleptvscutvars[1] = v0->Eta();
2596  }else if(ih==16){
2597  Double_t v0px = elobj->PxProng(1);
2598  Double_t v0py = elobj->PyProng(1);
2599  Double_t v0pz = elobj->PzProng(1);
2600  Double_t epx = elobj->PxProng(0);
2601  Double_t epy = elobj->PyProng(0);
2602  Double_t epz = elobj->PzProng(0);
2603  cont_eleptvscutvars[1] = acos((v0px*epx+v0py*epy+v0pz*epz)/sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz)/sqrt(epx*epx+epy*epy+epz*epz));
2604  }else{
2605  cont_eleptvscutvars[1] = -9999.;
2606  }
2607 
2608  fHistoElePtvsCutVarsWS[ih]->Fill(cont_eleptvscutvars);
2609  }
2610  }
2611  if(fUseMCInfo){
2612  if(mclc){
2613  Int_t pdgcode = mclc->GetPdgCode();
2614  Double_t cont_mclb[3];
2615  cont_mclb[0] = mclc->Pt();
2616  cont_mclb[1] = mclc->Y();
2617  cont_mclb[2] = fCentrality;
2618  Double_t cont_mcele[3];
2619  cont_mcele[0] = mcele->Pt();
2620  cont_mcele[1] = mcele->Eta();
2621  cont_mcele[2] = fCentrality;
2622 
2623  if(abs(pdgcode)==5122 && abs(mcpdgele_array[1])==5122 && abs(mcpdgv0_array[1])==4122 && abs(mcpdgv0_array[2])==5122){
2624  fHistoEleLambdaMassLambdabMCS->Fill(cont);
2625  if(cont[0]<2.3){
2626  fHistoResponseEleLambdaPtLambdab->Fill(mclc->Pt(),elobj->Pt());
2627  fHistoResponseElePtLambdab->Fill(mclc->Pt(),trk->Pt());
2628  fHistoResponseLambdaPtLambdab->Fill(mclc->Pt(),v0->Pt());
2629  fHistoResponseLambdaPtvsEleLambdaPtLambdab->Fill(elobj->Pt(),v0->Pt());
2630 
2631  fHistoLbMCS->Fill(cont_mclb);
2632  if(trk->Charge()>0) fHistoLbMCS1->Fill(cont_mclb);
2633  else fHistoLbMCS2->Fill(cont_mclb);
2634 
2635  fHistoEleLambdaPtvsV0dlLambdabMCS->Fill(cont_elelamptvsv0dl);
2636  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlLambdabMCS1->Fill(cont_elelamptvsv0dl);
2637  else fHistoEleLambdaPtvsV0dlLambdabMCS2->Fill(cont_elelamptvsv0dl);
2638 
2639  fHistoLbElectronMCS->Fill(cont_mcele);
2640  if(trk->Charge()>0) fHistoLbElectronMCS1->Fill(cont_mcele);
2641  else fHistoLbElectronMCS2->Fill(cont_mcele);
2642  }
2643  }
2644  if(abs(pdgcode)==5132 && abs(mcpdgele_array[1])==5132 && abs(mcpdgv0_array[1])==4132 && abs(mcpdgv0_array[2])==5132){
2645  fHistoEleLambdaMassXibMCS->Fill(cont);
2646  if(cont[0]<2.3){
2647  fHistoEleLambdaPtvsV0dlXibMCS->Fill(cont_elelamptvsv0dl);
2648  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlXibMCS1->Fill(cont_elelamptvsv0dl);
2649  else fHistoEleLambdaPtvsV0dlXibMCS2->Fill(cont_elelamptvsv0dl);
2650 
2651  fHistoElectronFeedDownXibMCS->Fill(cont_mcele);
2652  if(trk->Charge()>0) fHistoElectronFeedDownXibMCS1->Fill(cont_mcele);
2653  else fHistoElectronFeedDownXibMCS2->Fill(cont_mcele);
2654  }
2655  }
2656  if(abs(pdgcode)==5132 && abs(mcpdgele_array[1])==5132 && abs(mcpdgv0_array[1])==4232 && abs(mcpdgv0_array[2])==5132){
2657  fHistoEleLambdaMassXibMCS->Fill(cont);
2658  if(cont[0]<2.3){
2659  fHistoEleLambdaPtvsV0dlXibMCS->Fill(cont_elelamptvsv0dl);
2660  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlXibMCS1->Fill(cont_elelamptvsv0dl);
2661  else fHistoEleLambdaPtvsV0dlXibMCS2->Fill(cont_elelamptvsv0dl);
2662 
2663  fHistoElectronFeedDownXibMCS->Fill(cont_mcele);
2664  if(trk->Charge()>0) fHistoElectronFeedDownXibMCS1->Fill(cont_mcele);
2665  else fHistoElectronFeedDownXibMCS2->Fill(cont_mcele);
2666  }
2667  }
2668  if(abs(pdgcode)==5232 && abs(mcpdgele_array[1])==5232 && abs(mcpdgv0_array[1])==4132 && abs(mcpdgv0_array[2])==5232){
2669  fHistoEleLambdaMassXibMCS->Fill(cont);
2670  if(cont[0]<2.3){
2671  fHistoEleLambdaPtvsV0dlXibMCS->Fill(cont_elelamptvsv0dl);
2672  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlXibMCS1->Fill(cont_elelamptvsv0dl);
2673  else fHistoEleLambdaPtvsV0dlXibMCS2->Fill(cont_elelamptvsv0dl);
2674 
2675  fHistoElectronFeedDownXibMCS->Fill(cont_mcele);
2676  if(trk->Charge()>0) fHistoElectronFeedDownXibMCS1->Fill(cont_mcele);
2677  else fHistoElectronFeedDownXibMCS2->Fill(cont_mcele);
2678  }
2679  }
2680  if(abs(pdgcode)==5232 && abs(mcpdgele_array[1])==5232 && abs(mcpdgv0_array[1])==4232 && abs(mcpdgv0_array[2])==5232){
2681  fHistoEleLambdaMassXibMCS->Fill(cont);
2682  if(cont[0]<2.3){
2683  fHistoEleLambdaPtvsV0dlXibMCS->Fill(cont_elelamptvsv0dl);
2684  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlXibMCS1->Fill(cont_elelamptvsv0dl);
2685  else fHistoEleLambdaPtvsV0dlXibMCS2->Fill(cont_elelamptvsv0dl);
2686 
2687  fHistoElectronFeedDownXibMCS->Fill(cont_mcele);
2688  if(trk->Charge()>0) fHistoElectronFeedDownXibMCS1->Fill(cont_mcele);
2689  else fHistoElectronFeedDownXibMCS2->Fill(cont_mcele);
2690  }
2691  }
2692  }
2693  }
2694  fHistodPhiSdEtaSElectronProtonR125WS->Fill(dphis_ele_pr,detas_ele_pr);
2695  fHistodPhiSdEtaSElectronPionR125WS->Fill(dphis_ele_pi,detas_ele_pi);
2696  }
2697  }
2698 
2699  //if( elobj->InvMass(2,pdgdg) < 10. && cosoa < 0. && fAnalCuts->IsPeakRegion(v0))
2700  if( melam_flip < 10. && cosoa < 0. && fAnalCuts->IsPeakRegion(v0))
2701  {
2702  if((trk->Charge()>0 && !anti_lambda_flag) || (trk->Charge()<0 && anti_lambda_flag)){
2703  fHistoEleLambdaMassRSAway->Fill(cont_flip);
2704  if(trk->Charge()>0) fHistoEleLambdaMassRS1Away->Fill(cont_flip);
2705  else fHistoEleLambdaMassRS2Away->Fill(cont_flip);
2706  if(cont_flip[0]<2.3){
2707  fHistoEleLambdaPtvsV0dlRSAway->Fill(cont_elelamptvsv0dl_flip);
2708  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlRS1Away->Fill(cont_elelamptvsv0dl_flip);
2709  else fHistoEleLambdaPtvsV0dlRS2Away->Fill(cont_elelamptvsv0dl_flip);
2710  }
2711  }else{
2712  fHistoEleLambdaMassWSAway->Fill(cont_flip);
2713  if(trk->Charge()>0) fHistoEleLambdaMassWS1Away->Fill(cont_flip);
2714  else fHistoEleLambdaMassWS2Away->Fill(cont_flip);
2715  if(cont_flip[0]<2.3){
2716  fHistoEleLambdaPtvsV0dlWSAway->Fill(cont_elelamptvsv0dl_flip);
2717  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlWS1Away->Fill(cont_elelamptvsv0dl_flip);
2718  else fHistoEleLambdaPtvsV0dlWS2Away->Fill(cont_elelamptvsv0dl_flip);
2719  }
2720  }
2721  }
2722 
2724  {
2725  if((trk->Charge()>0 && !anti_lambda_flag) || (trk->Charge()<0 && anti_lambda_flag)){
2726  fHistoEleLambdaMassRSSide->Fill(cont);
2727  if(trk->Charge()>0) fHistoEleLambdaMassRSSide1->Fill(cont);
2728  else fHistoEleLambdaMassRSSide2->Fill(cont);
2729 
2730  fHistoEleLambdaMassvsElePtRSSide->Fill(cont2);
2731  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtRSSide1->Fill(cont2);
2732  else fHistoEleLambdaMassvsElePtRSSide2->Fill(cont2);
2733 
2734  fHistoElePtvsV0dlRSSide->Fill(cont_eleptvsv0dl);
2735  if(trk->Charge()>0) fHistoElePtvsV0dlRSSide1->Fill(cont_eleptvsv0dl);
2736  else fHistoElePtvsV0dlRSSide2->Fill(cont_eleptvsv0dl);
2737 
2738  fHistoEleLambdaPtvsV0dlRSSide->Fill(cont_elelamptvsv0dl);
2739  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlRSSide1->Fill(cont_elelamptvsv0dl);
2740  else fHistoEleLambdaPtvsV0dlRSSide2->Fill(cont_elelamptvsv0dl);
2741 
2742  fHistoElePtvsV0dcaRSSide->Fill(cont_eleptvsv0dca);
2743  if(trk->Charge()>0) fHistoElePtvsV0dcaRSSide1->Fill(cont_eleptvsv0dca);
2744  else fHistoElePtvsV0dcaRSSide2->Fill(cont_eleptvsv0dca);
2745 
2746  }else if((trk->Charge()<0 && !anti_lambda_flag) || (trk->Charge()>0 && anti_lambda_flag)){
2747  fHistoEleLambdaMassWSSide->Fill(cont);
2748  if(trk->Charge()>0) fHistoEleLambdaMassWSSide1->Fill(cont);
2749  else fHistoEleLambdaMassWSSide2->Fill(cont);
2750 
2751  fHistoEleLambdaMassvsElePtWSSide->Fill(cont2);
2752  if(trk->Charge()>0) fHistoEleLambdaMassvsElePtWSSide1->Fill(cont2);
2753  else fHistoEleLambdaMassvsElePtWSSide2->Fill(cont2);
2754 
2755  fHistoElePtvsV0dlWSSide->Fill(cont_eleptvsv0dl);
2756  if(trk->Charge()>0) fHistoElePtvsV0dlWSSide1->Fill(cont_eleptvsv0dl);
2757  else fHistoElePtvsV0dlWSSide2->Fill(cont_eleptvsv0dl);
2758 
2759  fHistoEleLambdaPtvsV0dlWSSide->Fill(cont_elelamptvsv0dl);
2760  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlWSSide1->Fill(cont_elelamptvsv0dl);
2761  else fHistoEleLambdaPtvsV0dlWSSide2->Fill(cont_elelamptvsv0dl);
2762 
2763  fHistoElePtvsV0dcaWSSide->Fill(cont_eleptvsv0dca);
2764  if(trk->Charge()>0) fHistoElePtvsV0dcaWSSide1->Fill(cont_eleptvsv0dca);
2765  else fHistoElePtvsV0dcaWSSide2->Fill(cont_eleptvsv0dca);
2766  }
2767  }
2768 
2769  //if( elobj->InvMass(2,pdgdg) < 10. && cosoa < 0. && fAnalCuts->IsSideBand(v0))
2770  if( melam_flip < 10. && cosoa < 0. && fAnalCuts->IsSideBand(v0))
2771  {
2772  if((trk->Charge()>0 && !anti_lambda_flag) || (trk->Charge()<0 && anti_lambda_flag)){
2773  fHistoEleLambdaMassRSSideAway->Fill(cont_flip);
2774  if(trk->Charge()>0) fHistoEleLambdaMassRSSide1Away->Fill(cont_flip);
2775  else fHistoEleLambdaMassRSSide2Away->Fill(cont_flip);
2776  if(cont_flip[0]<2.3){
2777  fHistoEleLambdaPtvsV0dlRSSideAway->Fill(cont_elelamptvsv0dl_flip);
2778  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlRSSide1Away->Fill(cont_elelamptvsv0dl_flip);
2779  else fHistoEleLambdaPtvsV0dlRSSide2Away->Fill(cont_elelamptvsv0dl_flip);
2780  }
2781  }else{
2782  fHistoEleLambdaMassWSSideAway->Fill(cont_flip);
2783  if(trk->Charge()>0) fHistoEleLambdaMassWSSide1Away->Fill(cont_flip);
2784  else fHistoEleLambdaMassWSSide2Away->Fill(cont_flip);
2785  if(cont_flip[0]<2.3){
2786  fHistoEleLambdaPtvsV0dlWSSideAway->Fill(cont_elelamptvsv0dl_flip);
2787  if(trk->Charge()>0) fHistoEleLambdaPtvsV0dlWSSide1Away->Fill(cont_elelamptvsv0dl_flip);
2788  else fHistoEleLambdaPtvsV0dlWSSide2Away->Fill(cont_elelamptvsv0dl_flip);
2789  }
2790  }
2791  }
2792 
2793  //
2794  // New strategy: Fully analyze correlation
2795  //
2796  for(Int_t iv=0;iv<13;iv++){
2797  fCorrelationVariables[iv] = -9999.;
2798  }
2799 
2800  Double_t cont_cor_nd[7];
2801  for(Int_t iv=0;iv<7;iv++){
2802  cont_cor_nd[iv] = -9999.;
2803  }
2804  Double_t cont_mass_nd[8];
2805  for(Int_t iv=0;iv<8;iv++){
2806  cont_mass_nd[iv] = -9999.;
2807  }
2808 
2809  fCorrelationVariables[0] = v0->Pt();
2810  fCorrelationVariables[1] = trk->Pt();
2813  fCorrelationVariables[4] = v0->DecayLengthV0(posVtx)*1.115683/ptotlam;;
2814  fCorrelationVariables[5] = elobj->Getd0Prong(0);
2815  if(!fUseMCInfo) fCorrelationVariables[6] = 0;
2816  else fCorrelationVariables[6] = 1;
2817  if(trk->Charge()>0){
2818  if(!anti_lambda_flag) fCorrelationVariables[7] = 0;
2819  else fCorrelationVariables[7] = 2;
2820  }else if(trk->Charge()<0){
2821  if(!anti_lambda_flag) fCorrelationVariables[7] = 1;
2822  else fCorrelationVariables[7] = 3;
2823  }
2824  fCorrelationVariables[8] = (Int_t)isconv + 2 * (Int_t)isconv_like;
2826  fCorrelationVariables[11] = elobj->Pt();
2827  fCorrelationVariables[12] = elobj->InvMass(2,pdgdg);
2828 
2829  cont_cor_nd[0] = elobj->Pt();
2830  cont_cor_nd[1] = fAnalCuts->DeltaPhi(v0,trk);
2831  cont_cor_nd[2] = v0->DecayLengthV0(posVtx)*1.115683/ptotlam;;
2832  if(trk->Charge()>0){
2833  if(!anti_lambda_flag) cont_cor_nd[3] = 0;
2834  else cont_cor_nd[3] = 2;
2835  }else if(trk->Charge()<0){
2836  if(!anti_lambda_flag) cont_cor_nd[3] = 3;
2837  else cont_cor_nd[3] = 1;
2838  }
2839  cont_cor_nd[4] = fCorrelationVariables[8];
2840  cont_cor_nd[5] = 0;
2841  cont_cor_nd[6] = fCentrality;
2842 
2843  if(fUseMCInfo && FromSemileptonicDecays(mcpdgele_array)>0){
2844  if(mclc){
2845  Int_t pdgcode = mclc->GetPdgCode();
2846  if(abs(pdgcode)==4122 && abs(mcpdgele_array[1])==4122 && abs(mcpdgv0_array[1])==4122){
2847  fCorrelationVariables[9] = 1;
2848  cont_cor_nd[5] = 1;
2849  }
2850  if(abs(pdgcode)==4122 && abs(mcpdgele_array[1])==4122 && ( abs(mcpdgv0_array[1])==3212 || abs(mcpdgv0_array[1])==3214 || abs(mcpdgv0_array[1])==3224) ){
2851  fCorrelationVariables[9] = 2;
2852  cont_cor_nd[5] = 2;
2853  }
2854  if(abs(pdgcode)==4132 && abs(mcpdgele_array[1])==4132 && abs(mcpdgv0_array[1])==3312){
2855  fCorrelationVariables[9] = 3;
2856  cont_cor_nd[5] = 3;
2857  }
2858  if(abs(pdgcode)==4232 && abs(mcpdgele_array[1])==4232 && abs(mcpdgv0_array[1])==3322){
2859  fCorrelationVariables[9] = 4;
2860  cont_cor_nd[5] = 4;
2861  }
2862  if(abs(pdgcode)==5122 && abs(mcpdgele_array[1])==5122 && abs(mcpdgv0_array[1])==4122 && abs(mcpdgv0_array[2])==5122){
2863  fCorrelationVariables[9] = 11;
2864  cont_cor_nd[5] = 5;
2865  }
2866  if(abs(pdgcode)==5132 && abs(mcpdgele_array[1])==5132 && abs(mcpdgv0_array[1])==4132 && abs(mcpdgv0_array[2])==5132){
2867  fCorrelationVariables[9] = 12;
2868  cont_cor_nd[5] = 6;
2869  }
2870  if(abs(pdgcode)==5132 && abs(mcpdgele_array[1])==5132 && abs(mcpdgv0_array[1])==4232 && abs(mcpdgv0_array[2])==5132){
2871  fCorrelationVariables[9] = 13;
2872  cont_cor_nd[5] = 6;
2873  }
2874  if(abs(pdgcode)==5232 && abs(mcpdgele_array[1])==5232 && abs(mcpdgv0_array[1])==4132 && abs(mcpdgv0_array[2])==5232){
2875  fCorrelationVariables[9] = 14;
2876  cont_cor_nd[5] = 6;
2877  }
2878  if(abs(pdgcode)==5232 && abs(mcpdgele_array[1])==5232 && abs(mcpdgv0_array[1])==4232 && abs(mcpdgv0_array[2])==5232){
2879  fCorrelationVariables[9] = 15;
2880  cont_cor_nd[5] = 6;
2881  }
2882  }
2883  if(fCorrelationVariables[9]<0){
2884  Bool_t lam_from_bottom = HaveBottomInHistory(mcpdgv0_array);
2885  Bool_t lam_from_charm = HaveCharmInHistory(mcpdgv0_array);
2886  if(FromSemileptonicDecays(mcpdgele_array)==1){
2887  if(lam_from_bottom) fCorrelationVariables[9] = 1011;
2888  else if(lam_from_charm) fCorrelationVariables[9] = 1012;
2889  else fCorrelationVariables[9] = 1013;
2890 
2891  cont_cor_nd[5] = 7;
2892  }
2893  if(FromSemileptonicDecays(mcpdgele_array)==2){
2894  if(lam_from_bottom) fCorrelationVariables[9] = 1014;
2895  else if(lam_from_charm) fCorrelationVariables[9] = 1015;
2896  else fCorrelationVariables[9] = 1016;
2897 
2898  cont_cor_nd[5] = 8;
2899  }
2900  if(FromSemileptonicDecays(mcpdgele_array)==1 && HaveBottomInHistory(mcpdgele_array)){
2901  if(lam_from_bottom) fCorrelationVariables[9] = 1017;
2902  else if(lam_from_charm) fCorrelationVariables[9] = 1018;
2903  else fCorrelationVariables[9] = 1019;
2904 
2905  cont_cor_nd[5] = 9;
2906  }
2907  }
2908  }
2909 
2911  {
2912  if(fWriteVariableTree)
2913  fCorrelationVariablesTree->Fill();
2914 
2915  if(fUseMCInfo){
2916  if(elobj->InvMass(2,pdgdg)<2.3)
2917  fHistoCorrelationVariablesvsEleLambdaPtMC->Fill(cont_cor_nd);
2918  cont_cor_nd[0] = trk->Pt();
2919  fHistoCorrelationVariablesvsElePtMC->Fill(cont_cor_nd);
2920  cont_cor_nd[0] = v0->Pt();
2921  fHistoCorrelationVariablesvsLambdaPtMC->Fill(cont_cor_nd);
2922  }else{
2923  if(elobj->InvMass(2,pdgdg)<2.3)
2924  fHistoCorrelationVariablesvsEleLambdaPt->Fill(cont_cor_nd);
2925  cont_cor_nd[0] = trk->Pt();
2926  fHistoCorrelationVariablesvsElePt->Fill(cont_cor_nd);
2927  cont_cor_nd[0] = v0->Pt();
2928  fHistoCorrelationVariablesvsLambdaPt->Fill(cont_cor_nd);
2929  }
2930  }
2931 
2932  cont_mass_nd[0] = elobj->InvMass(2,pdgdg);
2933  cont_mass_nd[1] = cont_cor_nd[0];
2934  cont_mass_nd[4] = cont_cor_nd[3];
2935  cont_mass_nd[5] = cont_cor_nd[4];
2936  cont_mass_nd[6] = cont_cor_nd[5];
2937  cont_mass_nd[7] = cont_cor_nd[6];
2938 
2939  if(fAnalCuts->IsPeakRegion(v0)) cont_mass_nd[3] = 1;
2940  if(fAnalCuts->IsSideBand(v0)) cont_mass_nd[3] = 0;
2941  if(fAnalCuts->IsSelected(elobj,AliRDHFCuts::kCandidate)) cont_mass_nd[2]=1;
2942  if(melam_flip < 10.&& cosoa < 0.) cont_mass_nd[2]=0;
2943  if(fUseMCInfo){
2944  fHistoMassVariablesvsEleLambdaPtMC->Fill(cont_mass_nd);
2945  cont_mass_nd[1] = trk->Pt();
2946  fHistoMassVariablesvsElePtMC->Fill(cont_mass_nd);
2947  cont_mass_nd[1] = v0->Pt();
2948  fHistoMassVariablesvsLambdaPtMC->Fill(cont_mass_nd);
2949  }else{
2950  fHistoMassVariablesvsEleLambdaPt->Fill(cont_mass_nd);
2951  cont_mass_nd[1] = trk->Pt();
2952  fHistoMassVariablesvsElePt->Fill(cont_mass_nd);
2953  cont_mass_nd[1] = v0->Pt();
2954  fHistoMassVariablesvsLambdaPt->Fill(cont_mass_nd);
2955  }
2956 
2957  return;
2958 }
2959 
2961 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillMixROOTObjects(TLorentzVector *trke, TLorentzVector *v0, TVector *elevars, TVector *v0vars, Int_t chargepr)
2962 {
2966  if(!trke) return;
2967  if(!v0) return;
2968 
2969  for(Int_t i=0;i<94;i++)
2970  {
2971  fCandidateVariables[i] = -9999.;
2972  }
2973 
2974 
2975  Double_t pxe = trke->Px();
2976  Double_t pye = trke->Py();
2977  Double_t pze = trke->Pz();
2978  Double_t mome = sqrt(pxe*pxe+pye*pye+pze*pze);
2979  Double_t Ee = sqrt(mome*mome+0.000510998928*0.000510998928);
2980 
2981  Double_t pxv = v0->Px();
2982  Double_t pyv = v0->Py();
2983  Double_t pzv = v0->Pz();
2984  Double_t momv = sqrt(pxv*pxv+pyv*pyv+pzv*pzv);
2985  Double_t Ev = sqrt(momv*momv+1.115683*1.115683);
2986 
2987  Double_t cosoa = (pxe*pxv+pye*pyv+pze*pzv)/mome/momv;
2988 
2989  Double_t pxsum = pxe + pxv;
2990  Double_t pysum = pye + pyv;
2991  Double_t pzsum = pze + pzv;
2992  Double_t Esum = Ee + Ev;
2993  Double_t mel = sqrt(Esum*Esum-pxsum*pxsum-pysum*pysum-pzsum*pzsum);
2994 
2995  Double_t uxe = pxe/mome;
2996  Double_t uye = pye/mome;
2997  Double_t uze = pze/mome;
2998  Double_t lf = -2.*(pxv*uxe+pyv*uye+pzv*uze);
2999  Double_t pxv_flip = pxv + lf * uxe;
3000  Double_t pyv_flip = pyv + lf * uye;
3001  Double_t pzv_flip = pzv + lf * uze;
3002  Double_t pxsum_flip = pxe + pxv_flip;
3003  Double_t pysum_flip = pye + pyv_flip;
3004  Double_t pzsum_flip = pze + pzv_flip;
3005  Double_t mel_flip = sqrt(Esum*Esum-pxsum_flip*pxsum_flip-pysum_flip*pysum_flip-pzsum_flip*pzsum_flip);
3006  Double_t ptel_flip = sqrt(pxsum_flip*pxsum_flip+pysum_flip*pysum_flip);
3007 
3009  UInt_t pdgdg[2]={11,3122};
3010  fCandidateVariables[ 1] = mel;
3011  fCandidateVariables[ 2] = sqrt(pxsum*pxsum+pysum*pysum);
3012  fCandidateVariables[ 3] = pxsum;
3013  fCandidateVariables[ 4] = pysum;
3014  fCandidateVariables[ 5] = pzsum;
3015  fCandidateVariables[ 6] = pxe;
3016  fCandidateVariables[ 7] = pye;
3017  fCandidateVariables[ 8] = pze;
3018  fCandidateVariables[ 9] = pxv;
3019  fCandidateVariables[10] = pyv;
3020  fCandidateVariables[11] = pzv;
3021  if(chargepr>0){
3022  fCandidateVariables[12] = 0;
3023  fCandidateVariables[13] = v0->M();
3024  fCandidateVariables[14] = 0.;
3025  }else{
3026  fCandidateVariables[12] = 1;
3027  fCandidateVariables[13] = 0;
3028  fCandidateVariables[14] = v0->M();
3029  }
3030 
3031  fCandidateVariables[17] = (*elevars)[3];
3032  fCandidateVariables[18] = (*elevars)[4];
3033 
3034  fCandidateVariables[21] = trke->T();
3035  fCandidateVariables[22] = (*v0vars)[9];
3036  fCandidateVariables[23] = (*v0vars)[10];
3037  fCandidateVariables[24] = (*v0vars)[11];
3038  fCandidateVariables[25] = (*v0vars)[12];
3039  fCandidateVariables[26] = (*v0vars)[13];
3040  fCandidateVariables[27] = (*v0vars)[14];
3041 
3042  fCandidateVariables[32] = 1;
3043 
3044  fCandidateVariables[54] = fVtx1->GetX();
3045  fCandidateVariables[55] = fVtx1->GetY();
3046  fCandidateVariables[56] = fVtx1->GetZ();
3047  fCandidateVariables[57] = (*v0vars)[6];
3048  fCandidateVariables[58] = (*v0vars)[7];
3049  fCandidateVariables[59] = (*v0vars)[8];
3050  fCandidateVariables[64] = (*v0vars)[15];
3051 
3052  fCandidateVariables[91] = fBzkG;
3055 
3056 
3057 // if(fWriteVariableTree)
3058 // fVariablesTree->Fill();
3059 
3060  Double_t cont[3];
3061  cont[0] = mel;
3062  cont[1] = sqrt(pxsum*pxsum+pysum*pysum);
3063  cont[2] = fCentrality;
3064  fHistoEleLambdaMass->Fill(cont);
3065 
3066  Double_t cont_flip[3];
3067  cont_flip[0] = mel_flip;
3068  cont_flip[1] = ptel_flip;
3069  cont_flip[2] = fCentrality;
3070 
3071  Double_t cont2[3];
3072  cont2[0] = mel;
3073  cont2[1] = sqrt(pxe*pxe+pye*pye);
3074  cont2[2] = fCentrality;
3075  Double_t cont_eleptvseta[3];
3076  cont_eleptvseta[0] = trke->Pt();
3077  cont_eleptvseta[1] = trke->Eta();
3078  cont_eleptvseta[2] = fCentrality;
3079 
3080  Double_t cont_eleptvslambdapt[3];
3081  cont_eleptvslambdapt[0] = trke->Pt();
3082  cont_eleptvslambdapt[1] = v0->Pt();
3083  cont_eleptvslambdapt[2] = fCentrality;
3084 
3085  Double_t cont_eleptvsd0[3];
3086  cont_eleptvsd0[0] = trke->Pt();
3087  cont_eleptvsd0[1] = 0.;
3088  cont_eleptvsd0[2] = fCentrality;
3089 
3090  Double_t cont_eleptvsv0dl[3];
3091  cont_eleptvsv0dl[0] = trke->Pt();
3092  cont_eleptvsv0dl[1] = (*v0vars)[15];
3093  cont_eleptvsv0dl[2] = fCentrality;
3094 
3095  Double_t cont_eleptvsv0dca[3];
3096  cont_eleptvsv0dca[0] = trke->Pt();
3097  cont_eleptvsv0dca[1] = (*v0vars)[16];
3098  cont_eleptvsv0dca[2] = fCentrality;
3099 
3100  Double_t cont_elelamptvsv0dl[4];
3101  cont_elelamptvsv0dl[0] = sqrt(pxsum*pxsum+pysum*pysum);
3102  cont_elelamptvsv0dl[1] = (*v0vars)[15];
3103  cont_elelamptvsv0dl[2] = 0.0;
3104  cont_elelamptvsv0dl[3] = fCentrality;
3105 
3106  Double_t cont_elelamptvsv0dl_flip[4];
3107  cont_elelamptvsv0dl_flip[0] = ptel_flip;
3108  cont_elelamptvsv0dl_flip[1] = (*v0vars)[15];
3109  cont_elelamptvsv0dl_flip[2] = 0.0;
3110  cont_elelamptvsv0dl_flip[3] = fCentrality;
3111 
3112  Double_t xyzR125_ele[3], xyzR125_pr[3], xyzR125_pi[3];
3113  xyzR125_ele[0] = (*elevars)[0];
3114  xyzR125_ele[1] = (*elevars)[1];
3115  xyzR125_ele[2] = (*elevars)[2];
3116  xyzR125_pr[0] = (*v0vars)[0];
3117  xyzR125_pr[1] = (*v0vars)[1];
3118  xyzR125_pr[2] = (*v0vars)[2];
3119  xyzR125_pi[0] = (*v0vars)[3];
3120  xyzR125_pi[1] = (*v0vars)[4];
3121  xyzR125_pi[2] = (*v0vars)[5];
3122 
3123  Double_t rdhfcutvars[9];
3124  rdhfcutvars[0] = xyzR125_ele[0];
3125  rdhfcutvars[1] = xyzR125_ele[1];
3126  rdhfcutvars[2] = xyzR125_ele[2];
3127  rdhfcutvars[3] = xyzR125_pr[0];
3128  rdhfcutvars[4] = xyzR125_pr[1];
3129  rdhfcutvars[5] = xyzR125_pr[2];
3130  rdhfcutvars[6] = xyzR125_pi[0];
3131  rdhfcutvars[7] = xyzR125_pi[1];
3132  rdhfcutvars[8] = xyzR125_pi[2];
3133 
3134  Double_t dphis_ele_pr = fAnalCuts->dPhiSR125(xyzR125_ele,xyzR125_pr);
3135  Double_t detas_ele_pr = fAnalCuts->dEtaSR125(xyzR125_ele,xyzR125_pr);
3136  Double_t dphis_ele_pi = fAnalCuts->dPhiSR125(xyzR125_ele,xyzR125_pi);
3137  Double_t detas_ele_pi = fAnalCuts->dEtaSR125(xyzR125_ele,xyzR125_pi);
3138 
3139  //if(mel < 10. && cosoa>0. && fAnalCuts->IsPeakRegion(v0))
3140  if(fAnalCuts->IsSelected(trke,v0,rdhfcutvars,AliRDHFCuts::kCandidate) && fAnalCuts->IsPeakRegion(v0))
3141  {
3142 
3143  if(((int)trke->T())*chargepr>0){
3144  fHistoEleLambdaMassRSMix->Fill(cont);
3145  if(trke->T()>0) fHistoEleLambdaMassRSMix1->Fill(cont);
3146  else fHistoEleLambdaMassRSMix2->Fill(cont);
3147 
3148  fHistoEleLambdaMassvsElePtRSMix->Fill(cont2);
3149  if(trke->T()>0) fHistoEleLambdaMassvsElePtRSMix1->Fill(cont2);
3150  else fHistoEleLambdaMassvsElePtRSMix2->Fill(cont2);
3151  if(cont[0]<2.3){
3152  fHistoElePtRSMix->Fill(trke->Pt(),fCentrality);
3153  fHistoElePtvsEtaRSMix->Fill(cont_eleptvseta);
3154  fHistoElePtvsLambdaPtRSMix->Fill(cont_eleptvslambdapt);
3155  fHistoElePtvsd0RSMix->Fill(cont_eleptvsd0);
3156 
3157  fHistoElePtvsV0dlRSMix->Fill(cont_eleptvsv0dl);
3158  if(trke->T()>0) fHistoElePtvsV0dlRSMix1->Fill(cont_eleptvsv0dl);
3159  else fHistoElePtvsV0dlRSMix2->Fill(cont_eleptvsv0dl);
3160 
3161  fHistoEleLambdaPtvsV0dlRSMix->Fill(cont_elelamptvsv0dl);
3162  if(trke->T()>0) fHistoEleLambdaPtvsV0dlRSMix1->Fill(cont_elelamptvsv0dl);
3163  else fHistoEleLambdaPtvsV0dlRSMix2->Fill(cont_elelamptvsv0dl);
3164 
3165  fHistoElePtvsV0dcaRSMix->Fill(cont_eleptvsv0dca);
3166  if(trke->T()>0) fHistoElePtvsV0dcaRSMix1->Fill(cont_eleptvsv0dca);
3167  else fHistoElePtvsV0dcaRSMix2->Fill(cont_eleptvsv0dca);
3168  }
3169  fHistodPhiSdEtaSElectronProtonR125RSMix->Fill(dphis_ele_pr,detas_ele_pr);
3170  fHistodPhiSdEtaSElectronPionR125RSMix->Fill(dphis_ele_pi,detas_ele_pi);
3171  }else{
3172  fHistoEleLambdaMassWSMix->Fill(cont);
3173  if(trke->T()>0) fHistoEleLambdaMassWSMix1->Fill(cont);
3174  else fHistoEleLambdaMassWSMix2->Fill(cont);
3175 
3176  fHistoEleLambdaMassvsElePtWSMix->Fill(cont2);
3177  if(trke->T()>0) fHistoEleLambdaMassvsElePtWSMix1->Fill(cont2);
3178  else fHistoEleLambdaMassvsElePtWSMix2->Fill(cont2);
3179  if(cont[0]<2.3){
3180  fHistoElePtWSMix->Fill(trke->Pt(),fCentrality);
3181  fHistoElePtvsEtaWSMix->Fill(cont_eleptvseta);
3182  fHistoElePtvsLambdaPtWSMix->Fill(cont_eleptvslambdapt);
3183  fHistoElePtvsd0WSMix->Fill(cont_eleptvsd0);
3184 
3185  fHistoElePtvsV0dlWSMix->Fill(cont_eleptvsv0dl);
3186  if(trke->T()>0) fHistoElePtvsV0dlWSMix1->Fill(cont_eleptvsv0dl);
3187  else fHistoElePtvsV0dlWSMix2->Fill(cont_eleptvsv0dl);
3188 
3189  fHistoEleLambdaPtvsV0dlWSMix->Fill(cont_elelamptvsv0dl);
3190  if(trke->T()>0) fHistoEleLambdaPtvsV0dlWSMix1->Fill(cont_elelamptvsv0dl);
3191  else fHistoEleLambdaPtvsV0dlWSMix2->Fill(cont_elelamptvsv0dl);
3192 
3193  fHistoElePtvsV0dcaWSMix->Fill(cont_eleptvsv0dca);
3194  if(trke->T()>0) fHistoElePtvsV0dcaWSMix1->Fill(cont_eleptvsv0dca);
3195  else fHistoElePtvsV0dcaWSMix2->Fill(cont_eleptvsv0dca);
3196  }
3197  fHistodPhiSdEtaSElectronProtonR125WSMix->Fill(dphis_ele_pr,detas_ele_pr);
3198  fHistodPhiSdEtaSElectronPionR125WSMix->Fill(dphis_ele_pi,detas_ele_pi);
3199  }
3200  }
3201 
3202  //if(mel < 10. && cosoa<0. && fAnalCuts->IsPeakRegion(v0))
3203  if(mel_flip < 10. && cosoa<0. && fAnalCuts->IsPeakRegion(v0))
3204  {
3205  if(((int)trke->T())*chargepr>0){
3206  fHistoEleLambdaMassRSMixAway->Fill(cont_flip);
3207  if(trke->T()>0) fHistoEleLambdaMassRSMix1Away->Fill(cont_flip);
3208  else fHistoEleLambdaMassRSMix2Away->Fill(cont_flip);
3209  if(cont_flip[0]<2.3){
3210  fHistoEleLambdaPtvsV0dlRSMixAway->Fill(cont_elelamptvsv0dl_flip);
3211  if(trke->T()>0) fHistoEleLambdaPtvsV0dlRSMix1Away->Fill(cont_elelamptvsv0dl_flip);
3212  else fHistoEleLambdaPtvsV0dlRSMix2Away->Fill(cont_elelamptvsv0dl_flip);
3213  }
3214  }else{
3215  fHistoEleLambdaMassWSMixAway->Fill(cont_flip);
3216  if(trke->T()>0) fHistoEleLambdaMassWSMix1Away->Fill(cont_flip);
3217  else fHistoEleLambdaMassWSMix2Away->Fill(cont_flip);
3218  if(cont_flip[0]<2.3){
3219  fHistoEleLambdaPtvsV0dlWSMixAway->Fill(cont_elelamptvsv0dl_flip);
3220  if(trke->T()>0) fHistoEleLambdaPtvsV0dlWSMix1Away->Fill(cont_elelamptvsv0dl_flip);
3221  else fHistoEleLambdaPtvsV0dlWSMix2Away->Fill(cont_elelamptvsv0dl_flip);
3222  }
3223  }
3224  }
3225 
3226  //
3227  // New strategy: Fully analyze correlation
3228  //
3229  for(Int_t iv=0;iv<13;iv++){
3230  fCorrelationVariables[iv] = -9999.;
3231  }
3232 
3233  Double_t cont_cor_nd[7];
3234  for(Int_t iv=0;iv<7;iv++){
3235  cont_cor_nd[iv] = -9999.;
3236  }
3237  Double_t cont_mass_nd[8];
3238  for(Int_t iv=0;iv<8;iv++){
3239  cont_mass_nd[iv] = -9999.;
3240  }
3241 
3242  fCorrelationVariables[0] = v0->Pt();
3243  fCorrelationVariables[1] = trke->Pt();
3244  fCorrelationVariables[2] = TVector2::Phi_mpi_pi(v0->Phi()-trke->Phi());
3245  fCorrelationVariables[3] = v0->Eta()-trke->Eta();
3246  fCorrelationVariables[4] = (*v0vars)[15];
3247  fCorrelationVariables[5] = (*elevars)[5];
3248  fCorrelationVariables[6] = 2;
3249  if(trke->T()>0){
3250  if(chargepr>0) fCorrelationVariables[7] = 0;
3251  else fCorrelationVariables[7] = 2;
3252  }else if(trke->T()<0){
3253  if(chargepr>0) fCorrelationVariables[7] = 1;
3254  else fCorrelationVariables[7] = 3;
3255  }
3256  fCorrelationVariables[8] = (*elevars)[6];
3257  fCorrelationVariables[9] = (*elevars)[7];
3258  fCorrelationVariables[10] = fCentrality;
3259  fCorrelationVariables[11] = sqrt(pxsum*pxsum+pysum*pysum);
3260  fCorrelationVariables[12] = mel;
3261 
3262  cont_cor_nd[0] = sqrt(pxsum*pxsum+pysum*pysum);
3263  cont_cor_nd[1] = TVector2::Phi_mpi_pi(v0->Phi()-trke->Phi());
3264  cont_cor_nd[2] = (*v0vars)[15];
3265  if(trke->T()>0){
3266  if(chargepr>0) cont_cor_nd[3] = 0;
3267  else cont_cor_nd[3] = 2;
3268  }else if(trke->T()<0){
3269  if(chargepr>0) cont_cor_nd[3] = 3;
3270  else cont_cor_nd[3] = 1;
3271  }
3272  cont_cor_nd[4] = fCorrelationVariables[8];
3273  cont_cor_nd[5] = 0;
3274  if(fabs(fCorrelationVariables[9]-1013)<0.001) cont_cor_nd[5] = 7;
3275  if(fabs(fCorrelationVariables[9]-1016)<0.001) cont_cor_nd[5] = 8;
3276  if(fabs(fCorrelationVariables[9]-1019)<0.001) cont_cor_nd[5] = 9;
3277  cont_cor_nd[6] = fCentrality;
3278 
3279  if(fAnalCuts->IsSelected(trke,v0,rdhfcutvars,AliRDHFCuts::kCandidate) && fAnalCuts->IsPeakRegion(v0))
3280  {
3281  if(fWriteVariableTree)
3282  fCorrelationVariablesTree->Fill();
3283 
3284  if(mel<2.3)
3285  fHistoCorrelationVariablesvsEleLambdaPtMix->Fill(cont_cor_nd);
3286  cont_cor_nd[0] = trke->Pt();
3287  fHistoCorrelationVariablesvsElePtMix->Fill(cont_cor_nd);
3288  cont_cor_nd[0] = v0->Pt();
3289  fHistoCorrelationVariablesvsLambdaPtMix->Fill(cont_cor_nd);
3290  }
3291 
3292  cont_mass_nd[0] = mel;
3293  cont_mass_nd[1] = cont_cor_nd[0];
3294  cont_mass_nd[4] = cont_cor_nd[3];
3295  cont_mass_nd[5] = cont_cor_nd[4];
3296  cont_mass_nd[6] = cont_cor_nd[5];
3297  cont_mass_nd[7] = cont_cor_nd[6];
3298 
3299  if(fAnalCuts->IsPeakRegion(v0)) cont_mass_nd[3] = 1;
3300  if(fAnalCuts->IsSideBand(v0)) cont_mass_nd[3] = 0;
3301  if(fAnalCuts->IsSelected(trke,v0,rdhfcutvars,AliRDHFCuts::kCandidate)) cont_mass_nd[2]=1;
3302  if(mel_flip < 10.&& cosoa < 0.) cont_mass_nd[2]=0;
3303  fHistoMassVariablesvsEleLambdaPtMix->Fill(cont_mass_nd);
3304  cont_mass_nd[0] = trke->Pt();
3305  fHistoMassVariablesvsElePtMix->Fill(cont_mass_nd);
3306  cont_mass_nd[0] = v0->Pt();
3307  fHistoMassVariablesvsLambdaPtMix->Fill(cont_mass_nd);
3308 
3309  return;
3310 }
3313 {
3314  //
3316  //
3317 
3318  const char* nameoutput = GetOutputSlot(5)->GetContainer()->GetName();
3319  fEleVariablesTree = new TTree(nameoutput,"electron variables tree");
3320  Int_t nVar = 26;
3321  fCandidateEleVariables = new Float_t [nVar];
3322  TString * fCandidateVariableNames = new TString[nVar];
3323 
3324  fCandidateVariableNames[ 0]="ElePx";
3325  fCandidateVariableNames[ 1]="ElePy";
3326  fCandidateVariableNames[ 2]="ElePz";
3327  fCandidateVariableNames[ 3]="TPCChi2overNDF";
3328  fCandidateVariableNames[ 4]="ITSNcls";
3329  fCandidateVariableNames[ 5]="TPCNcls";
3330  fCandidateVariableNames[ 6]="TPCNclsPID";
3331  fCandidateVariableNames[ 7]="TPCNclsRatio";
3332  fCandidateVariableNames[ 8]="d0R";
3333  fCandidateVariableNames[ 9]="d0Z";
3334  fCandidateVariableNames[10]="ITSClusterMap";
3335  fCandidateVariableNames[11]="nSigmaTPCele";
3336  fCandidateVariableNames[12]="nSigmaTOFele";
3337  fCandidateVariableNames[13]="nSigmaTPCpi";
3338  fCandidateVariableNames[14]="nSigmaTPCka";
3339  fCandidateVariableNames[15]="nSigmaTPCpr";
3340  fCandidateVariableNames[16]="EvNumber";
3341  fCandidateVariableNames[17]="EleCharge";
3342  fCandidateVariableNames[18]="ElePdgCode";
3343  fCandidateVariableNames[19]="EleMotherPdgCode";
3344  fCandidateVariableNames[20]="mcelepx";
3345  fCandidateVariableNames[21]="mcelepy";
3346  fCandidateVariableNames[22]="mcelepz";
3347  fCandidateVariableNames[23]="Centrality";
3348  fCandidateVariableNames[24]="PrimVertZ";
3349  fCandidateVariableNames[25]="RunNumber";
3350 
3351  for (Int_t ivar=0; ivar<nVar; ivar++) {
3352  fEleVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateEleVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
3353  }
3354 
3355  return;
3356 }
3358 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillElectronROOTObjects(AliAODTrack *trk, AliAODTrack *trkpid, Int_t convtype, Int_t mcetype, AliAODEvent *event, TClonesArray *mcArray)
3359 {
3360  //
3362  //
3363 
3364  if(!trk) return;
3365 
3366  fHistoBachPt->Fill(trk->Pt());
3367  fHistoElectronQovPtvsPhi->Fill(trk->Phi(),(Double_t)trk->Charge()/trk->Pt());
3368 
3369  Double_t d0z0[2],covd0z0[3];
3370  trk->PropagateToDCA(fVtx1,fBzkG,kVeryBig,d0z0,covd0z0);
3371 
3372  if(fDoEventMixing){
3373  Double_t pv[3];
3374  pv[0] = fVtx1->GetX();
3375  pv[1] = fVtx1->GetY();
3376  pv[2] = fVtx1->GetZ();
3377  Double_t xyzR125[3]={9999.,9999.,9999.};
3378  if(fAnalCuts->GetCuts()[2]>0. || fAnalCuts->GetCuts()[3]>0.) fAnalCuts->SetSftPosR125(trk,fBzkG,pv,xyzR125);
3379  TVector *varvec = new TVector(8);
3380  (*varvec)[0] = xyzR125[0];
3381  (*varvec)[1] = xyzR125[1];
3382  (*varvec)[2] = xyzR125[2];
3383  (*varvec)[3] = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trkpid,AliPID::kElectron);
3384  (*varvec)[4] = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trkpid,AliPID::kElectron);
3385  (*varvec)[5] = d0z0[0];
3386  (*varvec)[6] = convtype;
3387  (*varvec)[7] = mcetype;
3388 
3389  fElectronTracks->AddLast(new TLorentzVector(trk->Px(),trk->Py(),trk->Pz(),trk->Charge()));
3390  fElectronCutVarsArray->AddLast(varvec);
3391  }
3392 
3393  Int_t pdgEle = -9999;
3394  Int_t pdgEleMother = -9999;
3395  Float_t mcelepx = -9999;
3396  Float_t mcelepy = -9999;
3397  Float_t mcelepz = -9999;
3398  if(fUseMCInfo)
3399  {
3400  Int_t labEle = trk->GetLabel();
3401  if(labEle<0) return;
3402  AliAODMCParticle *mcetrk = (AliAODMCParticle*)mcArray->At(labEle);
3403  if(!mcetrk) return;
3404  pdgEle = mcetrk->GetPdgCode();
3405  mcelepx = mcetrk->Px();
3406  mcelepy = mcetrk->Py();
3407  mcelepz = mcetrk->Pz();
3408  }
3409 
3410  //test propagation
3411 // cout<<"B: "<<fBzkG<<endl;
3412 // cout<<"trk: "<<trk->Charge()<<" "<<trk->Px()<<" "<<trk->Py()<<" "<<trk->Pz()<<endl;
3413 // AliExternalTrackParam etp;
3414 // etp.CopyFromVTrack(trk);
3415 // Double_t xyz_test[3]={-9999.,-9999.,-9999.};
3416 // etp.GetXYZ(xyz_test);
3417 // cout<<"Before: "<<xyz_test[0]<<" "<<xyz_test[1]<<" "<<xyz_test[2]<<endl;
3418 // etp.PropagateTo(80.,(Float_t)fBzkG);
3419 // etp.GetXYZ(xyz_test); // GetXYZ returns global coordinates
3420 // cout<<"After: "<<xyz_test[0]<<" "<<xyz_test[1]<<" "<<xyz_test[2]<<endl;
3421 
3422  if(!fWriteEachVariableTree) return;
3423 
3424  for(Int_t i=0;i<26;i++){
3425  fCandidateEleVariables[i] = -9999.;
3426  }
3427 
3428  fCandidateEleVariables[ 0] = trk->Px();
3429  fCandidateEleVariables[ 1] = trk->Py();
3430  fCandidateEleVariables[ 2] = trk->Pz();
3431  fCandidateEleVariables[ 3] = trk->Chi2perNDF();
3432  fCandidateEleVariables[ 4] = trk->GetITSNcls();
3433  fCandidateEleVariables[ 5] = trk->GetTPCncls();
3434  fCandidateEleVariables[ 6] = trk->GetTPCsignalN();
3435  if(trk->GetTPCNclsF()>0)
3436  fCandidateEleVariables[ 7] = (Float_t)trk->GetTPCncls()/(Float_t)trk->GetTPCNclsF();
3437 
3438  fCandidateEleVariables[ 8] = d0z0[0];
3439  fCandidateEleVariables[ 9] = d0z0[1];
3440  Int_t itsmap = trk->GetITSClusterMap();
3441  Int_t bit1 = 1;
3442  Int_t bit2 = 2;
3443  Bool_t spdfirst = (itsmap & bit1) == bit1;
3444  Bool_t spdsecond = (itsmap & bit2) == bit2;
3445  fCandidateEleVariables[10] = ((Int_t)spdfirst) + 2 * ((Int_t)spdsecond);
3446 
3447  if(fAnalCuts->GetIsUsePID())
3448  {
3449  Double_t nSigmaTPCele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kElectron);
3450  Double_t nSigmaTOFele = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTOF(trk,AliPID::kElectron);
3451  Double_t nSigmaTPCpi_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kPion);
3452  Double_t nSigmaTPCka_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kKaon);
3453  Double_t nSigmaTPCpr_etrk = fAnalCuts->GetPidHF()->GetPidResponse()->NumberOfSigmasTPC(trk,AliPID::kProton);
3454  fCandidateEleVariables[11] = nSigmaTPCele;
3455  fCandidateEleVariables[12] = nSigmaTOFele;
3456  fCandidateEleVariables[13] = nSigmaTPCpi_etrk;
3457  fCandidateEleVariables[14] = nSigmaTPCka_etrk;
3458  fCandidateEleVariables[15] = nSigmaTPCpr_etrk;
3459  }
3461  fCandidateEleVariables[17] = trk->Charge();
3462  fCandidateEleVariables[18] = pdgEle;
3463  fCandidateEleVariables[19] = pdgEleMother;
3464  fCandidateEleVariables[20] = mcelepx;
3465  fCandidateEleVariables[21] = mcelepy;
3466  fCandidateEleVariables[22] = mcelepz;
3470 
3471  fHistod0Bach->Fill(d0z0[0]);
3472 
3473  fEleVariablesTree->Fill();
3474 }
3477 {
3478  //
3480  //
3481 
3482  const char* nameoutput = GetOutputSlot(6)->GetContainer()->GetName();
3483  fV0VariablesTree = new TTree(nameoutput,"v0 variables tree");
3484  Int_t nVar = 36;
3485  fCandidateV0Variables = new Float_t [nVar];
3486  TString * fCandidateVariableNames = new TString[nVar];
3487 
3488  fCandidateVariableNames[ 0]="V0Px";
3489  fCandidateVariableNames[ 1]="V0Py";
3490  fCandidateVariableNames[ 2]="V0Pz";
3491  fCandidateVariableNames[ 3]="MassLambda";
3492  fCandidateVariableNames[ 4]="MassAntiLambda";
3493  fCandidateVariableNames[ 5]="ProtonPx";
3494  fCandidateVariableNames[ 6]="ProtonPy";
3495  fCandidateVariableNames[ 7]="ProtonPz";
3496  fCandidateVariableNames[ 8]="PionPx";
3497  fCandidateVariableNames[ 9]="PionPy";
3498  fCandidateVariableNames[10]="PionPz";
3499  fCandidateVariableNames[11]="RfidV0";
3500  fCandidateVariableNames[12]="DcaV0PrToPrimVertex";
3501  fCandidateVariableNames[13]="DcaV0PiToPrimVertex";
3502  fCandidateVariableNames[14]="DcaV0daughters";
3503  fCandidateVariableNames[15]="V0CosPointingAngle";
3504  fCandidateVariableNames[16]="V0ProperDecayLength";
3505  fCandidateVariableNames[17]="MassK0Short";
3506  fCandidateVariableNames[18]="nSigmaTPCpr";
3507  fCandidateVariableNames[19]="nSigmaTPCpi";
3508  fCandidateVariableNames[20]="TPCNCrossV0Pr";
3509  fCandidateVariableNames[21]="TPCNCrossV0Pi";
3510  fCandidateVariableNames[22]="TPCNCrossRatioV0Pr";
3511  fCandidateVariableNames[23]="TPCNCrossRatioV0Pi";
3512  fCandidateVariableNames[24]="V0PdgCode";
3513  fCandidateVariableNames[25]="V0MotherPdgCode";
3514  fCandidateVariableNames[26]="mcv0px";
3515  fCandidateVariableNames[27]="mcv0py";
3516  fCandidateVariableNames[28]="mcv0pz";
3517  fCandidateVariableNames[29]="mcv0vertx";
3518  fCandidateVariableNames[30]="mcv0verty";
3519  fCandidateVariableNames[31]="mcv0vertz";
3520  fCandidateVariableNames[32]="EvNumber";
3521  fCandidateVariableNames[33]="Centrality";
3522  fCandidateVariableNames[34]="PrimVertZ";
3523  fCandidateVariableNames[35]="RunNumber";
3524 
3525  for (Int_t ivar=0; ivar<nVar; ivar++) {
3526  fV0VariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateV0Variables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
3527  }
3528 
3529  return;
3530 }
3531 
3533 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillV0ROOTObjects(AliAODv0 *v0, TClonesArray *mcArray)
3534 {
3535  //
3537  //
3538  if(!v0) return;
3539  AliAODTrack *cptrack = (AliAODTrack*)(v0->GetDaughter(0));
3540  AliAODTrack *cntrack = (AliAODTrack*)(v0->GetDaughter(1));
3541  if(!cptrack) return;
3542  if(!cntrack) return;
3543 // if(cptrack->Charge()<0 && cntrack->Charge()>0){
3544 // cptrack = (AliAODTrack*)(v0->GetDaughter(1));
3545 // cntrack = (AliAODTrack*)(v0->GetDaughter(0));
3546 // }
3547  //test propagation
3548 // cout<<"B: "<<fBzkG<<endl;
3549 // cout<<"trk: "<<cptrack->Charge()<<" "<<v0->MomPosX()<<" "<<v0->MomPosY()<<" "<<v0->MomPosZ()<<endl;
3550 // cout<<"vert: "<<v0->DecayVertexV0X()<<" "<<v0->DecayVertexV0Y()<<" "<<v0->DecayVertexV0Z()<<endl;
3551 // AliExternalTrackParam etp;
3552 // etp.CopyFromVTrack(cptrack);
3553 // Double_t xyz_test[3]={-9999.,-9999.,-9999.};
3554 // etp.PropagateTo(10.,(Float_t)fBzkG);
3555 // etp.GetXYZ(xyz_test); // GetXYZ returns global coordinates
3556 // cout<<"10: "<<xyz_test[0]<<" "<<xyz_test[1]<<" "<<xyz_test[2]<<endl;
3557 // etp.PropagateTo(120.,(Float_t)fBzkG);
3558 // etp.GetXYZ(xyz_test); // GetXYZ returns global coordinates
3559 // cout<<"120: "<<xyz_test[0]<<" "<<xyz_test[1]<<" "<<xyz_test[2]<<endl;
3560 
3561  Double_t mlamPDG = TDatabasePDG::Instance()->GetParticle(3122)->Mass();
3562  Double_t posVtx[3] = {0.,0.,0.};
3563  fVtx1->GetXYZ(posVtx);
3564  Double_t ptotlam = TMath::Sqrt(pow(v0->Px(),2)+pow(v0->Py(),2)+pow(v0->Pz(),2));
3565  Double_t v0propdl = v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam;
3566  Double_t cont_arm[3];
3567  cont_arm[0] = v0->Pt();
3568  cont_arm[1] = v0->PtArmV0();
3569  cont_arm[2] = v0->AlphaV0();
3570 
3571  if(TMath::Abs(v0->MassLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
3572  fHistoLambdaMassvsPt->Fill(v0->MassLambda(),v0->Pt());
3573  }
3574  if(TMath::Abs(v0->MassAntiLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
3575  fHistoLambdaMassvsPt->Fill(v0->MassAntiLambda(),v0->Pt());
3576  }
3577  fHistoK0sMassvsPt->Fill(v0->MassK0Short(),v0->Pt());
3578 
3579  if(fAnalCuts->IsPeakRegion(v0)){
3580  fHistoLambdaPtvsDl->Fill(v0->Pt(),v0propdl);
3581  fHistoLambdaPtvsEta->Fill(v0->Pt(),v0->Eta());
3582  fHistoLambdaArmenteros->Fill(cont_arm);
3583  }
3584  if(fAnalCuts->IsSideBand(v0)){
3585  fHistoLambdaPtvsDlSide->Fill(v0->Pt(),v0propdl);
3586  }
3587 
3588  Double_t momv0x = v0->MomV0X();
3589  Double_t momv0y = v0->MomV0Y();
3590  Double_t phi_alice = atan2(momv0y,momv0x);
3591  if(phi_alice<0.) phi_alice += 2 * M_PI;
3592  fHistoLambdaQovPtvsPhi->Fill(phi_alice,1./sqrt(momv0x*momv0x+momv0y*momv0y));
3593 
3594  Int_t v0pdgcode = -9999;
3595  Int_t v0motherpdgcode = -9999;
3596  Float_t mcv0px = -9999;
3597  Float_t mcv0py = -9999;
3598  Float_t mcv0pz = -9999;
3599  Float_t mcv0vertx = -9999;
3600  Float_t mcv0verty = -9999;
3601  Float_t mcv0vertz = -9999;
3602  if(fUseMCInfo)
3603  {
3604  Int_t pdgdgv0[2]={2212,211};
3605  Int_t labV0 = v0->MatchToMC(3122,mcArray,2,pdgdgv0); // the V0
3606  if(labV0>=0){
3607  if(TMath::Abs(v0->MassLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
3608  fHistoLambdaMassvsPtMCS->Fill(v0->MassLambda(),v0->Pt());
3609  }
3610  if(TMath::Abs(v0->MassAntiLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
3611  fHistoLambdaMassvsPtMCS->Fill(v0->MassAntiLambda(),v0->Pt());
3612  }
3613  if(fAnalCuts->IsPeakRegion(v0)){
3614  fHistoLambdaPtvsEtaMCS->Fill(v0->Pt(),v0->Eta());
3615  fHistoLambdaArmenterosMCS->Fill(cont_arm);
3616  }
3617  }
3618  if(labV0<0) return;
3619  AliAODMCParticle *mcv0trk = (AliAODMCParticle*)mcArray->At(labV0);
3620  if(!mcv0trk) return;
3621 
3622  Bool_t hfv0_flag = kFALSE;
3623  Bool_t promptv0_flag = kFALSE;
3624  v0pdgcode = mcv0trk->GetPdgCode();
3625  Int_t labv0mother = mcv0trk->GetMother();
3626  if(labv0mother>=0){
3627  AliAODMCParticle *motherv0 = (AliAODMCParticle*)mcArray->At(labv0mother);
3628  if(motherv0){
3629  v0motherpdgcode = motherv0->GetPdgCode();
3630  if(abs(v0motherpdgcode)>4000&&abs(v0motherpdgcode)<4400){
3631  hfv0_flag = kTRUE;
3632  }
3633  if(abs(v0motherpdgcode)==3322){
3634  fHistoLambdaPtvsDlFeeddownXi0MCS->Fill(v0->Pt(),v0propdl);
3635  }else if(abs(v0motherpdgcode)==3312){
3636  fHistoLambdaPtvsDlFeeddownXiMinusMCS->Fill(v0->Pt(),v0propdl);
3637  }else if(abs(v0motherpdgcode)==3334){
3638  fHistoLambdaPtvsDlFeeddownOmegaMCS->Fill(v0->Pt(),v0propdl);
3639  }else{
3640  fHistoLambdaPtvsDlMCS->Fill(v0->Pt(),v0propdl);
3641  promptv0_flag = kTRUE;
3642  }
3643  }
3644  }
3645  if(!hfv0_flag) return;
3646  //if(!promptv0_flag) return;
3647 
3648  mcv0px = mcv0trk->Px();
3649  mcv0py = mcv0trk->Py();
3650  mcv0pz = mcv0trk->Pz();
3651 
3652  Int_t labptrk = cptrack->GetLabel();
3653  if(labptrk>=0){
3654  AliAODMCParticle *mcv0ptrk = (AliAODMCParticle*)mcArray->At(labptrk);
3655  if(mcv0ptrk){
3656  mcv0vertx = mcv0ptrk->Xv();
3657  mcv0verty = mcv0ptrk->Yv();
3658  mcv0vertz = mcv0ptrk->Zv();
3659  }
3660  }
3661  }
3662 
3663 
3664  if(fDoEventMixing){
3665  Double_t posVtx[3] = {0.,0.,0.};
3666  fVtx1->GetXYZ(posVtx);
3667  TLorentzVector *lv = new TLorentzVector();
3668  Double_t ptotlam = TMath::Sqrt(pow(v0->Px(),2)+pow(v0->Py(),2)+pow(v0->Pz(),2));
3669  Double_t xyzR125pr[3] = {9999.,9999.,9999.};
3670  Double_t xyzR125pi[3] = {9999.,9999.,9999.};
3671  if(TMath::Abs(v0->MassLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()){
3672  lv->SetXYZM(v0->Px(),v0->Py(),v0->Pz(),v0->MassLambda());
3673  fV0Tracks1->AddLast(lv);
3674  if(fAnalCuts->GetCuts()[2]>0. || fAnalCuts->GetCuts()[3]>0.) fAnalCuts->SetSftPosR125(cptrack,fBzkG,posVtx,xyzR125pr);
3675  if(fAnalCuts->GetCuts()[2]>0. || fAnalCuts->GetCuts()[3]>0.) fAnalCuts->SetSftPosR125(cntrack,fBzkG,posVtx,xyzR125pi);
3676  TVector *varvec = new TVector(17);
3677  (*varvec)[0] = xyzR125pr[0];
3678  (*varvec)[1] = xyzR125pr[1];
3679  (*varvec)[2] = xyzR125pr[2];
3680  (*varvec)[3] = xyzR125pi[0];
3681  (*varvec)[4] = xyzR125pi[1];
3682  (*varvec)[5] = xyzR125pi[2];
3683  (*varvec)[6] = v0->DecayVertexV0X();
3684  (*varvec)[7] = v0->DecayVertexV0Y();
3685  (*varvec)[8] = v0->DecayVertexV0Z();
3686  (*varvec)[9] = v0->MomPosX();
3687  (*varvec)[10] = v0->MomPosY();
3688  (*varvec)[11] = v0->MomPosZ();
3689  (*varvec)[12] = v0->MomNegX();
3690  (*varvec)[13] = v0->MomNegY();
3691  (*varvec)[14] = v0->MomNegZ();
3692  (*varvec)[15] = v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam;
3693  (*varvec)[16] = v0->DcaV0ToPrimVertex();
3694  fV0CutVarsArray1->AddLast(varvec);
3695  }else{
3696  lv->SetXYZM(v0->Px(),v0->Py(),v0->Pz(),v0->MassAntiLambda());
3697  fV0Tracks2->AddLast(lv);
3698  if(fAnalCuts->GetCuts()[2]>0. || fAnalCuts->GetCuts()[3]>0.) fAnalCuts->SetSftPosR125(cntrack,fBzkG,posVtx,xyzR125pr);
3699  if(fAnalCuts->GetCuts()[2]>0. || fAnalCuts->GetCuts()[3]>0.) fAnalCuts->SetSftPosR125(cptrack,fBzkG,posVtx,xyzR125pi);
3700  TVector *varvec = new TVector(17);
3701  (*varvec)[0] = xyzR125pr[0];
3702  (*varvec)[1] = xyzR125pr[1];
3703  (*varvec)[2] = xyzR125pr[2];
3704  (*varvec)[3] = xyzR125pi[0];
3705  (*varvec)[4] = xyzR125pi[1];
3706  (*varvec)[5] = xyzR125pi[2];
3707  (*varvec)[6] = v0->DecayVertexV0X();
3708  (*varvec)[7] = v0->DecayVertexV0Y();
3709  (*varvec)[8] = v0->DecayVertexV0Z();
3710  (*varvec)[9] = v0->MomNegX();
3711  (*varvec)[10] = v0->MomNegY();
3712  (*varvec)[11] = v0->MomNegZ();
3713  (*varvec)[12] = v0->MomPosX();
3714  (*varvec)[13] = v0->MomPosY();
3715  (*varvec)[14] = v0->MomPosZ();
3716  (*varvec)[15] = v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam;
3717  (*varvec)[16] = v0->DcaV0ToPrimVertex();
3718  fV0CutVarsArray2->AddLast(varvec);
3719  }
3720  }
3721 
3722  if(!fWriteEachVariableTree) return;
3723 
3724  for(Int_t i=0;i<36;i++){
3725  fCandidateV0Variables[i] = -9999.;
3726  }
3727 
3728  fCandidateV0Variables[ 0] = v0->Px();
3729  fCandidateV0Variables[ 1] = v0->Py();
3730  fCandidateV0Variables[ 2] = v0->Pz();
3731  fCandidateV0Variables[ 3] = v0->MassLambda();
3732  fCandidateV0Variables[ 4] = v0->MassAntiLambda();
3733 
3734  Bool_t isparticle = kTRUE;
3735  if(fabs(v0->MassAntiLambda()-mlamPDG)<fAnalCuts->GetProdV0MassTolLambdaRough()) isparticle=kFALSE;
3736 
3737  if(isparticle){
3738  fCandidateV0Variables[ 5] = v0->MomPosX(); //cptrack->Px();
3739  fCandidateV0Variables[ 6] = v0->MomPosY(); //cptrack->Py();
3740  fCandidateV0Variables[ 7] = v0->MomPosZ(); //cptrack->Pz();
3741  fCandidateV0Variables[ 8] = v0->MomNegX(); //cntrack->Px();
3742  fCandidateV0Variables[ 9] = v0->MomNegY(); //cntrack->Py();
3743  fCandidateV0Variables[10] = v0->MomNegZ(); //cntrack->Pz();
3744  }else{
3745  fCandidateV0Variables[ 5] = v0->MomNegX(); //cntrack->Px();
3746  fCandidateV0Variables[ 6] = v0->MomNegY(); //cntrack->Py();
3747  fCandidateV0Variables[ 7] = v0->MomNegZ(); //cntrack->Pz();
3748  fCandidateV0Variables[ 8] = v0->MomPosX(); //cptrack->Px();
3749  fCandidateV0Variables[ 9] = v0->MomPosY(); //cptrack->Py();
3750  fCandidateV0Variables[10] = v0->MomPosZ(); //cptrack->Pz();
3751  }
3752 
3753  Double_t lPosV0[3];
3754  lPosV0[0] = v0->DecayVertexV0X();
3755  lPosV0[1] = v0->DecayVertexV0Y();
3756  lPosV0[2] = v0->DecayVertexV0Z();
3757  Double_t decayvertV0 = TMath::Sqrt(lPosV0[0]*lPosV0[0]+lPosV0[1]*lPosV0[1]);
3758  fCandidateV0Variables[11] = decayvertV0;
3759 
3760  Double_t lDcaPosToPrimVertex = v0->DcaPosToPrimVertex();
3761  Double_t lDcaNegToPrimVertex = v0->DcaNegToPrimVertex();
3762  if(isparticle){
3763  fCandidateV0Variables[12] = lDcaPosToPrimVertex;
3764  fCandidateV0Variables[13] = lDcaNegToPrimVertex;
3765  }else{
3766  fCandidateV0Variables[12] = lDcaNegToPrimVertex;
3767  fCandidateV0Variables[13] = lDcaPosToPrimVertex;
3768  }
3769  fCandidateV0Variables[14] = v0->DcaV0Daughters();
3770  fCandidateV0Variables[15] = v0->CosPointingAngle(posVtx);
3771  fCandidateV0Variables[16] = v0->DecayLengthV0(posVtx)*mlamPDG/ptotlam;
3772  fCandidateV0Variables[17] = v0->MassK0Short();
3773 
3774  if(fAnalCuts->GetUseLambdaPID())
3775  {
3776  if(isparticle){
3777  Double_t nSigmaTPCv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kProton);
3778  Double_t nSigmaTPCv0pi = fAnalCuts->GetPidPion()->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kPion);
3779  fCandidateV0Variables[18] = nSigmaTPCv0pr;
3780  fCandidateV0Variables[19] = nSigmaTPCv0pi;
3781  }else{
3782  Double_t nSigmaTPCv0pr = fAnalCuts->GetPidProton()->GetPidResponse()->NumberOfSigmasTPC(cntrack,AliPID::kProton);
3783  Double_t nSigmaTPCv0pi = fAnalCuts->GetPidPion()->GetPidResponse()->NumberOfSigmasTPC(cptrack,AliPID::kPion);
3784  fCandidateV0Variables[18] = nSigmaTPCv0pr;
3785  fCandidateV0Variables[19] = nSigmaTPCv0pi;
3786  }
3787  }
3788  if(isparticle){
3789  fCandidateV0Variables[20] = cptrack->GetTPCClusterInfo(2,1);
3790  fCandidateV0Variables[21] = cntrack->GetTPCClusterInfo(2,1);
3791  if(cptrack->GetTPCNclsF()>0)
3792  fCandidateV0Variables[22] = (Float_t) cptrack->GetTPCClusterInfo(2,1)/(Float_t)cptrack->GetTPCNclsF();
3793  if(cntrack->GetTPCNclsF()>0)
3794  fCandidateV0Variables[23] =(Float_t) cntrack->GetTPCClusterInfo(2,1)/(Float_t)cntrack->GetTPCNclsF();
3795  }else{
3796  fCandidateV0Variables[20] = cntrack->GetTPCClusterInfo(2,1);
3797  fCandidateV0Variables[21] = cptrack->GetTPCClusterInfo(2,1);
3798  if(cntrack->GetTPCNclsF()>0)
3799  fCandidateV0Variables[22] = (Float_t) cntrack->GetTPCClusterInfo(2,1)/(Float_t)cntrack->GetTPCNclsF();
3800  if(cptrack->GetTPCNclsF()>0)
3801  fCandidateV0Variables[23] = (Float_t) cptrack->GetTPCClusterInfo(2,1)/(Float_t)cptrack->GetTPCNclsF();
3802  }
3803  fCandidateV0Variables[24] = v0pdgcode;
3804  fCandidateV0Variables[25] = v0motherpdgcode;
3805  fCandidateV0Variables[26] = mcv0px;
3806  fCandidateV0Variables[27] = mcv0py;
3807  fCandidateV0Variables[28] = mcv0pz;
3808  fCandidateV0Variables[29] = mcv0vertx;
3809  fCandidateV0Variables[30] = mcv0verty;
3810  fCandidateV0Variables[31] = mcv0vertz;
3815 
3816 
3817  fV0VariablesTree->Fill();
3818 }
3821 {
3825 
3826  const char* nameoutput = GetOutputSlot(7)->GetContainer()->GetName();
3827  fMCVariablesTree = new TTree(nameoutput,"MC variables tree");
3828  Int_t nVar = 11;
3829  fCandidateMCVariables = new Float_t [nVar];
3830  TString * fCandidateVariableNames = new TString[nVar];
3831 
3832  fCandidateVariableNames[ 0]="Centrality";
3833  fCandidateVariableNames[ 1]="DecayType";
3834  fCandidateVariableNames[ 2]="LcPx";
3835  fCandidateVariableNames[ 3]="LcPy";
3836  fCandidateVariableNames[ 4]="LcPz";
3837  fCandidateVariableNames[ 5]="ElePx";
3838  fCandidateVariableNames[ 6]="ElePy";
3839  fCandidateVariableNames[ 7]="ElePz";
3840  fCandidateVariableNames[ 8]="V0Px";
3841  fCandidateVariableNames[ 9]="V0Py";
3842  fCandidateVariableNames[10]="V0Pz";
3843 
3844  for (Int_t ivar=0; ivar<nVar; ivar++) {
3845  fMCVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateMCVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
3846  }
3847  return;
3848 }
3850 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillMCROOTObjects(AliAODMCParticle *mcpart, AliAODMCParticle *mcepart, AliAODMCParticle *mcv0part, Int_t decaytype)
3851 {
3852  //
3854  //
3855  if(!mcpart) return;
3856  if(!mcepart) return;
3857  if(!mcv0part) return;
3858 
3859  for(Int_t i=0;i<11;i++){
3860  fCandidateMCVariables[i] = -9999.;
3861  }
3862 
3864  fCandidateMCVariables[ 1] = (Float_t) decaytype;
3865  fCandidateMCVariables[ 2] = mcpart->Px();
3866  fCandidateMCVariables[ 3] = mcpart->Py();
3867  fCandidateMCVariables[ 4] = mcpart->Pz();
3868  fCandidateMCVariables[ 5] = mcepart->Px();
3869  fCandidateMCVariables[ 6] = mcepart->Py();
3870  fCandidateMCVariables[ 7] = mcepart->Pz();
3871  fCandidateMCVariables[ 8] = mcv0part->Px();
3872  fCandidateMCVariables[ 9] = mcv0part->Py();
3873  fCandidateMCVariables[10] = mcv0part->Pz();
3874 
3875  Double_t epx = mcepart->Px();
3876  Double_t epy = mcepart->Py();
3877  Double_t epz = mcepart->Pz();
3878  Double_t eE = sqrt(epx*epx+epy*epy+epz*epz+0.000511*0.000511);
3879  Double_t v0px = mcv0part->Px();
3880  Double_t v0py = mcv0part->Py();
3881  Double_t v0pz = mcv0part->Pz();
3882  Double_t v0E = sqrt(v0px*v0px+v0py*v0py+v0pz*v0pz+1.1157*1.1157);
3883 
3884  Double_t InvMassEleLambda = sqrt(pow(eE+v0E,2)-pow(epx+v0px,2)-pow(epy+v0py,2)-pow(epz+v0pz,2));
3885 
3886  Double_t cont[3];
3887  cont[0] = InvMassEleLambda;
3888  cont[1] = mcpart->Pt();
3889  cont[2] = fCentrality;
3890  Double_t cont2[3];
3891  cont2[0] = InvMassEleLambda;
3892  cont2[1] = mcepart->Pt();
3893  cont2[2] = fCentrality;
3894  Double_t cont_eleptvseta[3];
3895  cont_eleptvseta[0] = mcepart->Pt();
3896  cont_eleptvseta[1] = mcepart->Eta();
3897  cont_eleptvseta[2] = fCentrality;
3898  Double_t cont_eleptvslambdapt[3];
3899  cont_eleptvslambdapt[0] = mcepart->Pt();
3900  cont_eleptvslambdapt[1] = mcv0part->Pt();
3901  cont_eleptvslambdapt[2] = fCentrality;
3902  Double_t cont_eleptvslambdaptvslcpt[4];
3903  cont_eleptvslambdaptvslcpt[0] = mcepart->Pt();
3904  cont_eleptvslambdaptvslcpt[1] = mcv0part->Pt();
3905  cont_eleptvslambdaptvslcpt[2] = mcpart->Pt();
3906  cont_eleptvslambdaptvslcpt[3] = fCentrality;
3907  Double_t contmc[3];
3908  contmc[0] = mcpart->Pt();
3909  contmc[1] = mcpart->Y();
3910  contmc[2] = fCentrality;
3911  Double_t contmcele[3];
3912  contmcele[0] = mcepart->Pt();
3913  contmcele[1] = mcepart->Eta();
3914  contmcele[2] = fCentrality;
3915  Double_t contmc_withele[3];
3916  contmc_withele[0] = mcpart->Pt();
3917  contmc_withele[1] = mcpart->Y();
3918  contmc_withele[2] = mcepart->Y();
3919 
3920  AliESDtrackCuts *esdcuts = fAnalCuts->GetTrackCuts();
3921  Float_t etamin, etamax;
3922  esdcuts->GetEtaRange(etamin,etamax);
3923 
3924  if(decaytype==0){
3925  fHistoLcMCGen->Fill(contmc);
3926  if(mcpart->GetPdgCode()>0) fHistoLcMCGen1->Fill(contmc);
3927  if(mcpart->GetPdgCode()<0) fHistoLcMCGen2->Fill(contmc);
3928  fHistoLcMCGenWithEleA->Fill(contmc_withele);
3929  if(fabs(mcepart->Eta())<0.8){
3930  fHistoLcMCGenWithEleB->Fill(mcpart->Pt(),mcepart->Pt());
3931  }
3932  fHistoLcElectronMCGen->Fill(contmcele);
3933  if(mcepart->GetPdgCode()<0) fHistoLcElectronMCGen1->Fill(contmcele);
3934  if(mcepart->GetPdgCode()>0) fHistoLcElectronMCGen2->Fill(contmcele);
3935  fHistoEleLambdaMassMCGen->Fill(cont);
3936  if(fabs(mcepart->Eta())<etamax){
3937  fHistoEleLambdaMassvsElePtMCGen->Fill(cont2);
3938  if(mcepart->GetPdgCode()<0) fHistoEleLambdaMassvsElePtMCGen1->Fill(cont2);
3939  else fHistoEleLambdaMassvsElePtMCGen2->Fill(cont2);
3940  if(InvMassEleLambda<2.3){
3941  fHistoElePtMCGen->Fill(mcepart->Pt(),fCentrality);
3942  fHistoElePtvsEtaMCGen->Fill(cont_eleptvseta);
3943  fHistoElePtvsLambdaPtMCGen->Fill(cont_eleptvslambdapt);
3944  }
3945  }
3946  if(fabs(mcpart->Y())<0.7){
3947  if(InvMassEleLambda<2.3){
3948  fHistoElePtvsLambdaPtMCLcGen->Fill(cont_eleptvslambdapt);
3949  fHistoElePtvsLambdaPtvsLcPtMCGen->Fill(cont_eleptvslambdaptvslcpt);
3950  }
3951  }
3952  }else if(decaytype==1){
3953  fHistoFeedDownXic0MCGen->Fill(contmc);
3954  if(mcpart->GetPdgCode()>0) fHistoFeedDownXic0MCGen1->Fill(contmc);
3955  if(mcpart->GetPdgCode()<0) fHistoFeedDownXic0MCGen2->Fill(contmc);
3957  fHistoElectronFeedDownXic0MCGen->Fill(contmcele);
3958  if(mcepart->GetPdgCode()<0) fHistoElectronFeedDownXic0MCGen1->Fill(contmcele);
3959  if(mcepart->GetPdgCode()>0) fHistoElectronFeedDownXic0MCGen2->Fill(contmcele);
3960  if(fabs(mcepart->Eta())<etamax){
3962  if(mcepart->GetPdgCode()<0) fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1->Fill(cont2);
3964  if(InvMassEleLambda<2.3){
3965  fHistoElePtFeeddownXic0MCGen->Fill(mcepart->Pt(),fCentrality);
3966  fHistoElePtvsEtaFeeddownXic0MCGen->Fill(cont_eleptvseta);
3967  fHistoElePtvsLambdaPtFeeddownXic0MCGen->Fill(cont_eleptvslambdapt);
3968  }
3969  }
3970  }else if(decaytype==2){
3971  fHistoFeedDownXicPlusMCGen->Fill(contmc);
3972  if(mcpart->GetPdgCode()>0) fHistoFeedDownXicPlusMCGen1->Fill(contmc);
3973  if(mcpart->GetPdgCode()<0) fHistoFeedDownXicPlusMCGen2->Fill(contmc);
3975  fHistoElectronFeedDownXicPlusMCGen->Fill(contmcele);
3976  if(mcepart->GetPdgCode()<0) fHistoElectronFeedDownXicPlusMCGen1->Fill(contmcele);
3977  if(mcepart->GetPdgCode()>0) fHistoElectronFeedDownXicPlusMCGen2->Fill(contmcele);
3978  if(fabs(mcepart->Eta())<etamax){
3980  if(mcepart->GetPdgCode()<0) fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1->Fill(cont2);
3982  if(InvMassEleLambda<2.3){
3983  fHistoElePtFeeddownXicPlusMCGen->Fill(mcepart->Pt(),fCentrality);
3984  fHistoElePtvsEtaFeeddownXicPlusMCGen->Fill(cont_eleptvseta);
3985  fHistoElePtvsLambdaPtFeeddownXicPlusMCGen->Fill(cont_eleptvslambdapt);
3986  }
3987  }
3988  }else if(decaytype==3){
3989  fHistoFeedDownSigmaMCGen->Fill(contmc);
3990  if(mcpart->GetPdgCode()>0) fHistoFeedDownSigmaMCGen1->Fill(contmc);
3991  if(mcpart->GetPdgCode()<0) fHistoFeedDownSigmaMCGen2->Fill(contmc);
3992  }else if(decaytype==10){
3993  fHistoLbElectronMCGen->Fill(contmcele);
3994  if(mcepart->GetPdgCode()<0) fHistoLbElectronMCGen1->Fill(contmcele);
3995  if(mcepart->GetPdgCode()>0) fHistoLbElectronMCGen2->Fill(contmcele);
3996  fHistoLbMCGen->Fill(contmc);
3997  if(mcpart->GetPdgCode()>0) fHistoLbMCGen1->Fill(contmc);
3998  if(mcpart->GetPdgCode()<0) fHistoLbMCGen2->Fill(contmc);
3999 
4000  fHistoLcMCGenWithEleA->Fill(contmc_withele);
4001  if(fabs(mcepart->Eta())<0.8){
4002  fHistoLcMCGenWithEleB->Fill(mcpart->Pt(),mcepart->Pt());
4003  }
4004  }else if(decaytype==11){
4005  fHistoElectronFeedDownXibMCGen->Fill(contmcele);
4006  if(mcepart->GetPdgCode()<0) fHistoElectronFeedDownXibMCGen1->Fill(contmcele);
4007  if(mcepart->GetPdgCode()>0) fHistoElectronFeedDownXibMCGen2->Fill(contmcele);
4008  }
4009 
4011  fMCVariablesTree->Fill();
4012 }
4015 {
4016  //
4017  // Define electron tree variables
4018  //
4019 
4020  const char* nameoutput = GetOutputSlot(9)->GetContainer()->GetName();
4021  fMCEleVariablesTree = new TTree(nameoutput,"MC Ele variables tree");
4022  Int_t nVar = 8;
4023  fCandidateMCEleVariables = new Float_t [nVar];
4024  TString * fCandidateVariableNames = new TString[nVar];
4025 
4026  fCandidateVariableNames[ 0]="Centrality";
4027  fCandidateVariableNames[ 1]="ElePx";
4028  fCandidateVariableNames[ 2]="ElePy";
4029  fCandidateVariableNames[ 3]="ElePz";
4030  fCandidateVariableNames[ 4]="ElePdgCode";
4031  fCandidateVariableNames[ 5]="EleMotherPdgCode";
4032  fCandidateVariableNames[ 6]="RunNumber";
4033  fCandidateVariableNames[ 7]="EvNumber";
4034 
4035  for (Int_t ivar=0; ivar<nVar; ivar++) {
4036  fMCEleVariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateMCEleVariables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
4037  }
4038  return;
4039 }
4041 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillMCEleROOTObjects(AliAODMCParticle *mcepart, TClonesArray *mcArray)
4042 {
4043  //
4044  // Fill tree depending on fWriteMCVariableTree
4045  //
4046  if(!mcepart) return;
4047 
4048  Int_t pdgarray_ele[100], labelarray_ele[100], ngen_ele;
4049  GetMCDecayHistory(mcepart,mcArray,pdgarray_ele,labelarray_ele,ngen_ele);
4050  Bool_t ele_from_bottom = HaveBottomInHistory(pdgarray_ele);
4051  Bool_t ele_from_charm = HaveCharmInHistory(pdgarray_ele);
4052  //Int_t semi_flag = FromSemileptonicDecays(pdgarray_ele);
4053  Int_t semi_flag = 0;
4054  if(pdgarray_ele[0]>400&&pdgarray_ele[0]<450) semi_flag = 1;
4055  if(pdgarray_ele[0]>4000&&pdgarray_ele[0]<4500) semi_flag = 1;
4056  if(pdgarray_ele[0]>500&&pdgarray_ele[0]<550) semi_flag = 2;
4057  if(pdgarray_ele[0]>5000&&pdgarray_ele[0]<5500) semi_flag = 2;
4058 
4059  Double_t contmc[3];
4060  contmc[0] = mcepart->Pt();
4061  contmc[1] = mcepart->Eta();
4062  contmc[2] = fCentrality;
4063 
4064  if(semi_flag==1 && !ele_from_bottom){
4065  fHistoCharmElectronMCGen->Fill(contmc);
4066  }
4067  if(semi_flag==1 && ele_from_bottom){
4068  fHistoBottomElectronMCGen->Fill(contmc);
4069  }
4070  if(semi_flag==2 ){
4071  fHistoBottomElectronMCGen->Fill(contmc);
4072  }
4073 
4074  Bool_t hfe_flag = kFALSE;
4075  Int_t labemother = mcepart->GetMother();
4076  Int_t pdgmotherele = -9999;
4077  if(labemother>=0){
4078  AliAODMCParticle *motherele = (AliAODMCParticle*)mcArray->At(labemother);
4079  pdgmotherele = motherele->GetPdgCode();
4080  if(abs(pdgmotherele)>4000&&abs(pdgmotherele)<4400){
4081  hfe_flag = kTRUE;
4082  }
4083  }
4084 
4085  if(!hfe_flag) return;
4086 
4087  fHistoElectronMCGen->Fill(contmc);
4088 
4089  for(Int_t i=0;i<8;i++){
4090  fCandidateMCEleVariables[i] = -9999.;
4091  }
4092 
4094  fCandidateMCEleVariables[ 1] = mcepart->Px();
4095  fCandidateMCEleVariables[ 2] = mcepart->Py();
4096  fCandidateMCEleVariables[ 3] = mcepart->Pz();
4097  fCandidateMCEleVariables[ 4] = mcepart->GetPdgCode();
4098  fCandidateMCEleVariables[ 5] = pdgmotherele;
4101 
4102 // if(fWriteMCVariableTree && fWriteEachVariableTree && mcepart->Pt()>0.4 && fabs(mcepart->Eta())<1.0 )
4103 // fMCEleVariablesTree->Fill();
4104 
4105 }
4108 {
4109  //
4110  // Define Mc v0 tree variables
4111  //
4112 
4113  const char* nameoutput = GetOutputSlot(10)->GetContainer()->GetName();
4114  fMCV0VariablesTree = new TTree(nameoutput,"MC v0 variables tree");
4115  Int_t nVar = 8;
4116  fCandidateMCV0Variables = new Float_t [nVar];
4117  TString * fCandidateVariableNames = new TString[nVar];
4118 
4119  fCandidateVariableNames[ 0]="Centrality";
4120  fCandidateVariableNames[ 1]="V0Px";
4121  fCandidateVariableNames[ 2]="V0Py";
4122  fCandidateVariableNames[ 3]="V0Pz";
4123  fCandidateVariableNames[ 4]="V0PdgCode";
4124  fCandidateVariableNames[ 5]="V0MotherPdgCode";
4125  fCandidateVariableNames[ 6]="RunNumber";
4126  fCandidateVariableNames[ 7]="EvNumber";
4127 
4128  for (Int_t ivar=0; ivar<nVar; ivar++) {
4129  fMCV0VariablesTree->Branch(fCandidateVariableNames[ivar].Data(),&fCandidateMCV0Variables[ivar],Form("%s/f",fCandidateVariableNames[ivar].Data()));
4130  }
4131  return;
4132 }
4134 void AliAnalysisTaskSELc2eleLambdafromAODtracks::FillMCV0ROOTObjects(AliAODMCParticle *mcv0part, TClonesArray *mcArray)
4135 {
4136  //
4137  // Fill histograms or tree depending on fWriteMCVariableTree
4138  //
4139  if(!mcv0part) return;
4140 
4141  for(Int_t i=0;i<8;i++){
4142  fCandidateMCV0Variables[i] = -9999.;
4143  }
4144 
4145  Bool_t hfv0_flag = kFALSE;
4146  Int_t labv0mother = mcv0part->GetMother();
4147  Int_t pdgmotherv0 = -9999;
4148  if(labv0mother>=0){
4149  AliAODMCParticle *motherv0 = (AliAODMCParticle*)mcArray->At(labv0mother);
4150  if(motherv0){
4151  pdgmotherv0 = motherv0->GetPdgCode();
4152  if(abs(pdgmotherv0)>4000&&abs(pdgmotherv0)<4400){
4153  hfv0_flag = kTRUE;
4154  }
4155  }
4156  }
4157  if(!hfv0_flag) return;
4158 
4159  Double_t contmc[3];
4160  contmc[0] = mcv0part->Pt();
4161  contmc[1] = mcv0part->Eta();
4162  contmc[2] = fCentrality;
4163  fHistoLambdaMCGen->Fill(contmc);
4164 
4166  fCandidateMCV0Variables[ 1] = mcv0part->Px();
4167  fCandidateMCV0Variables[ 2] = mcv0part->Py();
4168  fCandidateMCV0Variables[ 3] = mcv0part->Pz();
4169  fCandidateMCV0Variables[ 4] = mcv0part->GetPdgCode();
4170  fCandidateMCV0Variables[ 5] = pdgmotherv0;
4173 
4174  if(fWriteMCVariableTree && fWriteEachVariableTree && mcv0part->Pt()>0.4 && fabs(mcv0part->Eta())<1.0 )
4175  fMCV0VariablesTree->Fill();
4176 }
4177 
4178 
4181  //
4183  //
4184 
4185  fCEvents = new TH1F("fCEvents","conter",18,-0.5,17.5);
4186  fCEvents->SetStats(kTRUE);
4187  fCEvents->GetXaxis()->SetBinLabel(1,"X1");
4188  fCEvents->GetXaxis()->SetBinLabel(2,"Analyzed events");
4189  fCEvents->GetXaxis()->SetBinLabel(3,"AliAODVertex exists");
4190  fCEvents->GetXaxis()->SetBinLabel(4,"TriggerOK");
4191  fCEvents->GetXaxis()->SetBinLabel(5,"IsEventSelected");
4192  fCEvents->GetXaxis()->SetBinLabel(6,"CascadesHF exists");
4193  fCEvents->GetXaxis()->SetBinLabel(7,"MCarray exists");
4194  fCEvents->GetXaxis()->SetBinLabel(8,"MCheader exists");
4195  fCEvents->GetXaxis()->SetBinLabel(9,"triggerClass!=CINT1");
4196  fCEvents->GetXaxis()->SetBinLabel(10,"triggerMask!=kAnyINT");
4197  fCEvents->GetXaxis()->SetBinLabel(11,"triggerMask!=kAny");
4198  fCEvents->GetXaxis()->SetBinLabel(12,"vtxTitle.Contains(Z)");
4199  fCEvents->GetXaxis()->SetBinLabel(13,"vtxTitle.Contains(3D)");
4200  fCEvents->GetXaxis()->SetBinLabel(14,"vtxTitle.Doesn'tContain(Z-3D)");
4201  fCEvents->GetXaxis()->SetBinLabel(15,Form("zVtx<=%2.0fcm",fAnalCuts->GetMaxVtxZ()));
4202  fCEvents->GetXaxis()->SetBinLabel(16,"!IsEventSelected");
4203  fCEvents->GetXaxis()->SetBinLabel(17,"triggerMask!=kAnyINT || triggerClass!=CINT1");
4204  fCEvents->GetXaxis()->SetBinLabel(18,Form("zVtxMC<=%2.0fcm",fAnalCuts->GetMaxVtxZ()));
4205  //fCEvents->GetXaxis()->SetTitle("");
4206  fCEvents->GetYaxis()->SetTitle("counts");
4207 
4208  fHTrigger = new TH1F("fHTrigger","counter",18,-0.5,17.5);
4209  fHTrigger->SetStats(kTRUE);
4210  fHTrigger->GetXaxis()->SetBinLabel(1,"X1");
4211  fHTrigger->GetXaxis()->SetBinLabel(2,"kMB");
4212  fHTrigger->GetXaxis()->SetBinLabel(3,"kSemiCentral");
4213  fHTrigger->GetXaxis()->SetBinLabel(4,"kCentral");
4214  fHTrigger->GetXaxis()->SetBinLabel(5,"kINT7");
4215  fHTrigger->GetXaxis()->SetBinLabel(6,"kEMC7");
4216  //fHTrigger->GetXaxis()->SetBinLabel(7,"Space");
4217  fHTrigger->GetXaxis()->SetBinLabel(8,"kMB|kSemiCentral|kCentral");
4218  fHTrigger->GetXaxis()->SetBinLabel(9,"kINT7|kEMC7");
4219  fHTrigger->GetXaxis()->SetBinLabel(11,"kMB&kSemiCentral");
4220  fHTrigger->GetXaxis()->SetBinLabel(12,"kMB&kCentral");
4221  fHTrigger->GetXaxis()->SetBinLabel(13,"kINT7&kEMC7");
4222 
4223  fHCentrality = new TH1F("fHCentrality","conter",100,0.,100.);
4224  fHNTrackletvsZ = new TH2F("fHNTrackletvsZ","N_{tracklet} vs z",30,-15.,15.,120,-0.5,119.5);
4225  fHNTrackletCorrvsZ = new TH2F("fHNTrackletCorrvsZ","N_{tracklet} vs z",30,-15.,15.,120,-0.5,119.5);
4226 
4227  fHistoPoolNumberOfDumps = new TH1F("fHistoPoolNumberOfDumps","Number of dumps",1000,-0.5,999.5);
4229  fHistoPoolNumberOfResets = new TH1F("fHistoPoolNumberOfResets","Number of dumps",1000,-0.5,999.5);
4230 
4231  fOutput->Add(fCEvents);
4232  fOutput->Add(fHTrigger);
4233  fOutput->Add(fHCentrality);
4234  fOutput->Add(fHNTrackletvsZ);
4238 
4239  return;
4240 }
4241 //__________________________________________________________________________
4243 {
4244  //
4246  //
4247 
4248  //------------------------------------------------
4249  // Basic histogram
4250  //------------------------------------------------
4251  Int_t bins_base[3]= {23,100 ,10};
4252  Double_t xmin_base[3]={1.1,0 ,0.00};
4253  Double_t xmax_base[3]={5.7,20. ,100};
4254  fHistoEleLambdaMass = new THnSparseF("fHistoEleLambdaMass","",3,bins_base,xmin_base,xmax_base);
4256  fHistoEleLambdaMassRS = new THnSparseF("fHistoEleLambdaMassRS","",3,bins_base,xmin_base,xmax_base);
4258  fHistoEleLambdaMassRS1 = new THnSparseF("fHistoEleLambdaMassRS1","",3,bins_base,xmin_base,xmax_base);
4260  fHistoEleLambdaMassRS2 = new THnSparseF("fHistoEleLambdaMassRS2","",3,bins_base,xmin_base,xmax_base);
4262  fHistoEleLambdaMassWS = new THnSparseF("fHistoEleLambdaMassWS","",3,bins_base,xmin_base,xmax_base);
4264  fHistoEleLambdaMassWS1 = new THnSparseF("fHistoEleLambdaMassWS1","",3,bins_base,xmin_base,xmax_base);
4266  fHistoEleLambdaMassWS2 = new THnSparseF("fHistoEleLambdaMassWS2","",3,bins_base,xmin_base,xmax_base);
4268  fHistoEleLambdaMassRSMix = new THnSparseF("fHistoEleLambdaMassRSMix","",3,bins_base,xmin_base,xmax_base);
4270  fHistoEleLambdaMassRSMix1 = new THnSparseF("fHistoEleLambdaMassRSMix1","",3,bins_base,xmin_base,xmax_base);
4272  fHistoEleLambdaMassRSMix2 = new THnSparseF("fHistoEleLambdaMassRSMix2","",3,bins_base,xmin_base,xmax_base);
4274  fHistoEleLambdaMassWSMix = new THnSparseF("fHistoEleLambdaMassWSMix","",3,bins_base,xmin_base,xmax_base);
4276  fHistoEleLambdaMassWSMix1 = new THnSparseF("fHistoEleLambdaMassWSMix1","",3,bins_base,xmin_base,xmax_base);
4278  fHistoEleLambdaMassWSMix2 = new THnSparseF("fHistoEleLambdaMassWSMix2","",3,bins_base,xmin_base,xmax_base);
4280  fHistoEleLambdaMassRSSide = new THnSparseF("fHistoEleLambdaMassRSSide","",3,bins_base,xmin_base,xmax_base);
4282  fHistoEleLambdaMassRSSide1 = new THnSparseF("fHistoEleLambdaMassRSSide1","",3,bins_base,xmin_base,xmax_base);
4284  fHistoEleLambdaMassRSSide2 = new THnSparseF("fHistoEleLambdaMassRSSide2","",3,bins_base,xmin_base,xmax_base);
4286  fHistoEleLambdaMassWSSide = new THnSparseF("fHistoEleLambdaMassWSSide","",3,bins_base,xmin_base,xmax_base);
4288  fHistoEleLambdaMassWSSide1 = new THnSparseF("fHistoEleLambdaMassWSSide1","",3,bins_base,xmin_base,xmax_base);
4290  fHistoEleLambdaMassWSSide2 = new THnSparseF("fHistoEleLambdaMassWSSide2","",3,bins_base,xmin_base,xmax_base);
4292 
4293  fHistoEleLambdaMassRSAway = new THnSparseF("fHistoEleLambdaMassRSAway","",3,bins_base,xmin_base,xmax_base);
4295  fHistoEleLambdaMassRS1Away = new THnSparseF("fHistoEleLambdaMassRS1Away","",3,bins_base,xmin_base,xmax_base);
4297  fHistoEleLambdaMassRS2Away = new THnSparseF("fHistoEleLambdaMassRS2Away","",3,bins_base,xmin_base,xmax_base);
4299  fHistoEleLambdaMassWSAway = new THnSparseF("fHistoEleLambdaMassWSAway","",3,bins_base,xmin_base,xmax_base);
4301  fHistoEleLambdaMassWS1Away = new THnSparseF("fHistoEleLambdaMassWS1Away","",3,bins_base,xmin_base,xmax_base);
4303  fHistoEleLambdaMassWS2Away = new THnSparseF("fHistoEleLambdaMassWS2Away","",3,bins_base,xmin_base,xmax_base);
4305  fHistoEleLambdaMassRSMixAway = new THnSparseF("fHistoEleLambdaMassRSMixAway","",3,bins_base,xmin_base,xmax_base);
4307  fHistoEleLambdaMassRSMix1Away = new THnSparseF("fHistoEleLambdaMassRSMix1Away","",3,bins_base,xmin_base,xmax_base);
4309  fHistoEleLambdaMassRSMix2Away = new THnSparseF("fHistoEleLambdaMassRSMix2Away","",3,bins_base,xmin_base,xmax_base);
4311  fHistoEleLambdaMassWSMixAway = new THnSparseF("fHistoEleLambdaMassWSMixAway","",3,bins_base,xmin_base,xmax_base);
4313  fHistoEleLambdaMassWSMix1Away = new THnSparseF("fHistoEleLambdaMassWSMix1Away","",3,bins_base,xmin_base,xmax_base);
4315  fHistoEleLambdaMassWSMix2Away = new THnSparseF("fHistoEleLambdaMassWSMix2Away","",3,bins_base,xmin_base,xmax_base);
4317  fHistoEleLambdaMassRSSideAway = new THnSparseF("fHistoEleLambdaMassRSSideAway","",3,bins_base,xmin_base,xmax_base);
4319  fHistoEleLambdaMassRSSide1Away = new THnSparseF("fHistoEleLambdaMassRSSide1Away","",3,bins_base,xmin_base,xmax_base);
4321  fHistoEleLambdaMassRSSide2Away = new THnSparseF("fHistoEleLambdaMassRSSide2Away","",3,bins_base,xmin_base,xmax_base);
4323  fHistoEleLambdaMassWSSideAway = new THnSparseF("fHistoEleLambdaMassWSSideAway","",3,bins_base,xmin_base,xmax_base);
4325  fHistoEleLambdaMassWSSide1Away = new THnSparseF("fHistoEleLambdaMassWSSide1Away","",3,bins_base,xmin_base,xmax_base);
4327  fHistoEleLambdaMassWSSide2Away = new THnSparseF("fHistoEleLambdaMassWSSide2Away","",3,bins_base,xmin_base,xmax_base);
4329 
4330  Int_t bins_base_elept[3]= {10,100 ,10};
4331  Double_t xmin_base_elept[3]={1.1,0 ,0.00};
4332  Double_t xmax_base_elept[3]={3.1,10. ,100};
4333  fHistoEleLambdaMassvsElePtRS = new THnSparseF("fHistoEleLambdaMassvsElePtRS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4335  fHistoEleLambdaMassvsElePtWS = new THnSparseF("fHistoEleLambdaMassvsElePtWS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4337  fHistoEleLambdaMassvsElePtRSMix = new THnSparseF("fHistoEleLambdaMassvsElePtRSMix","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4339  fHistoEleLambdaMassvsElePtWSMix = new THnSparseF("fHistoEleLambdaMassvsElePtWSMix","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4341  fHistoEleLambdaMassvsElePtRSSide = new THnSparseF("fHistoEleLambdaMassvsElePtRSSide","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4343  fHistoEleLambdaMassvsElePtWSSide = new THnSparseF("fHistoEleLambdaMassvsElePtWSSide","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4345  fHistoEleLambdaMassvsElePtRS1 = new THnSparseF("fHistoEleLambdaMassvsElePtRS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4347  fHistoEleLambdaMassvsElePtWS1 = new THnSparseF("fHistoEleLambdaMassvsElePtWS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4349  fHistoEleLambdaMassvsElePtRSMix1 = new THnSparseF("fHistoEleLambdaMassvsElePtRSMix1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4351  fHistoEleLambdaMassvsElePtWSMix1 = new THnSparseF("fHistoEleLambdaMassvsElePtWSMix1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4353  fHistoEleLambdaMassvsElePtRSSide1 = new THnSparseF("fHistoEleLambdaMassvsElePtRSSide1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4355  fHistoEleLambdaMassvsElePtWSSide1 = new THnSparseF("fHistoEleLambdaMassvsElePtWSSide1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4357  fHistoEleLambdaMassvsElePtRS2 = new THnSparseF("fHistoEleLambdaMassvsElePtRS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4359  fHistoEleLambdaMassvsElePtWS2 = new THnSparseF("fHistoEleLambdaMassvsElePtWS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4361  fHistoEleLambdaMassvsElePtRSMix2 = new THnSparseF("fHistoEleLambdaMassvsElePtRSMix2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4363  fHistoEleLambdaMassvsElePtWSMix2 = new THnSparseF("fHistoEleLambdaMassvsElePtWSMix2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4365  fHistoEleLambdaMassvsElePtRSSide2 = new THnSparseF("fHistoEleLambdaMassvsElePtRSSide2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4367  fHistoEleLambdaMassvsElePtWSSide2 = new THnSparseF("fHistoEleLambdaMassvsElePtWSSide2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4369 
4370  fHistoEleLambdaMassMCS = new THnSparseF("fHistoEleLambdaMassMCS","",3,bins_base,xmin_base,xmax_base);
4372  fHistoEleLambdaMassLambdabMCS = new THnSparseF("fHistoEleLambdaMassLambdabMCS","",3,bins_base,xmin_base,xmax_base);
4374  fHistoEleLambdaMassXibMCS = new THnSparseF("fHistoEleLambdaMassXibMCS","",3,bins_base,xmin_base,xmax_base);
4376  fHistoEleLambdaMassMCGen = new THnSparseF("fHistoEleLambdaMassMCGen","",3,bins_base,xmin_base,xmax_base);
4378  fHistoEleLambdaMassvsElePtMCS = new THnSparseF("fHistoEleLambdaMassvsElePtMCS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4380  fHistoEleLambdaMassvsElePtMCGen = new THnSparseF("fHistoEleLambdaMassvsElePtMCGen","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4382  fHistoEleLambdaMassvsElePtMCS1 = new THnSparseF("fHistoEleLambdaMassvsElePtMCS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4384  fHistoEleLambdaMassvsElePtMCGen1 = new THnSparseF("fHistoEleLambdaMassvsElePtMCGen1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4386  fHistoEleLambdaMassvsElePtMCS2 = new THnSparseF("fHistoEleLambdaMassvsElePtMCS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4388  fHistoEleLambdaMassvsElePtMCGen2 = new THnSparseF("fHistoEleLambdaMassvsElePtMCGen2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4390 
4391  fHistoElePtRS = new TH2F("fHistoElePtRS","",100,0,10,10,0,100);
4392  fOutputAll->Add(fHistoElePtRS);
4393  fHistoElePtWS = new TH2F("fHistoElePtWS","",100,0.,10.,10,0,100);
4394  fOutputAll->Add(fHistoElePtWS);
4395  fHistoElePtRSMix = new TH2F("fHistoElePtRSMix","",100,0.,10.,10,0,100);
4397  fHistoElePtWSMix = new TH2F("fHistoElePtWSMix","",100,0.,10.,10,0,100);
4399  fHistoElePtMCS = new TH2F("fHistoElePtMCS","",100,0,10,10,0,100);
4400  fOutputAll->Add(fHistoElePtMCS);
4401  fHistoElePtMCGen = new TH2F("fHistoElePtMCGen","",100,0,10,10,0,100);
4403 
4404  Int_t bins_eleptvseta[3]= {10,10 ,10};
4405  Double_t xmin_eleptvseta[3]={0.,-1. ,0.0};
4406  Double_t xmax_eleptvseta[3]={5.,1. ,100};
4407 
4408  fHistoElePtvsEtaRS = new THnSparseF("fHistoElePtvsEtaRS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4410  fHistoElePtvsEtaWS = new THnSparseF("fHistoElePtvsEtaWS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4412  fHistoElePtvsEtaRSMix = new THnSparseF("fHistoElePtvsEtaRSMix","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4414  fHistoElePtvsEtaWSMix = new THnSparseF("fHistoElePtvsEtaWSMix","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4416  fHistoElePtvsEtaMCS = new THnSparseF("fHistoElePtvsEtaMCS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4418  fHistoElePtvsEtaMCGen = new THnSparseF("fHistoElePtvsEtaMCGen","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4420 
4421  Int_t bins_eleptvslambdapt[3]= {10,10 ,10};
4422  Double_t xmin_eleptvslambdapt[3]={0.,0. ,0.0};
4423  Double_t xmax_eleptvslambdapt[3]={5.,5. ,100};
4424 
4425  fHistoElePtvsLambdaPtRS = new THnSparseF("fHistoElePtvsLambdaPtRS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4427  fHistoElePtvsLambdaPtWS = new THnSparseF("fHistoElePtvsLambdaPtWS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4429  fHistoElePtvsLambdaPtRSMix = new THnSparseF("fHistoElePtvsLambdaPtRSMix","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4431  fHistoElePtvsLambdaPtWSMix = new THnSparseF("fHistoElePtvsLambdaPtWSMix","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4433  fHistoElePtvsLambdaPtMCS = new THnSparseF("fHistoElePtvsLambdaPtMCS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4435  fHistoElePtvsLambdaPtMCGen = new THnSparseF("fHistoElePtvsLambdaPtMCGen","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4437  fHistoElePtvsLambdaPtMCLcGen = new THnSparseF("fHistoElePtvsLambdaPtMCLcGen","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4439 
4440  Int_t bins_eleptvslambdaptvslcpt[4]= {10,10,10,10};
4441  Double_t xmin_eleptvslambdaptvslcpt[4]={0.,0.,0.,0.0};
4442  Double_t xmax_eleptvslambdaptvslcpt[4]={5.,5.,10.,100};
4443  fHistoElePtvsLambdaPtvsLcPtMCS = new THnSparseF("fHistoElePtvsLambdaPtvsLcPtMCS","",4,bins_eleptvslambdaptvslcpt,xmin_eleptvslambdaptvslcpt,xmax_eleptvslambdaptvslcpt);
4445  fHistoElePtvsLambdaPtvsLcPtMCGen = new THnSparseF("fHistoElePtvsLambdaPtvsLcPtMCGen","",4,bins_eleptvslambdaptvslcpt,xmin_eleptvslambdaptvslcpt,xmax_eleptvslambdaptvslcpt);
4447 
4448  Int_t bins_allpt[4]= {10,10,20,20};
4449  Double_t xmin_allpt[4]={0.,0.,0.,0.0};
4450  Double_t xmax_allpt[4]={20.,20.,10.,10};
4451  fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt = new THnSparseF("fHistoLcPtvseleLambdaPtvsElePtvsLambdaPt","",4,bins_allpt,xmin_allpt,xmax_allpt);
4453 
4454  fHistoEleLambdaPtvsRapidityRS=new TH2F("fHistoEleLambdaPtvsRapidityRS","EleLambda pt vs rap",20,0.,20.,40,-2.,2.);
4456  fHistoEleLambdaPtvsRapidityWS=new TH2F("fHistoEleLambdaPtvsRapidityWS","EleLambda pt vs rap",20,0.,20.,40,-2.,2.);
4458  fHistoEleLambdaPtvsRapidityMCS=new TH2F("fHistoEleLambdaPtvsRapidityMCS","EleLambda pt vs rap",20,0.,20.,40,-2.,2.);
4460 
4461  Int_t bins_eleptvsd0[3]= {10 ,10 ,10};
4462  Double_t xmin_eleptvsd0[3]={0.,-0.2 ,0.0};
4463  Double_t xmax_eleptvsd0[3]={5.,0.2 ,100};
4464 
4465  fHistoElePtvsd0RS = new THnSparseF("fHistoElePtvsd0RS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
4467  fHistoElePtvsd0WS = new THnSparseF("fHistoElePtvsd0WS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
4469  fHistoElePtvsd0RSMix = new THnSparseF("fHistoElePtvsd0RSMix","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
4471  fHistoElePtvsd0WSMix = new THnSparseF("fHistoElePtvsd0WSMix","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
4473  fHistoElePtvsd0MCS = new THnSparseF("fHistoElePtvsd0MCS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
4475  fHistoElePtvsd0PromptMCS = new THnSparseF("fHistoElePtvsd0PromptMCS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
4477  fHistoElePtvsd0BFeeddownMCS = new THnSparseF("fHistoElePtvsd0BFeeddownMCS","",3,bins_eleptvsd0,xmin_eleptvsd0,xmax_eleptvsd0);
4479 
4480 
4481  //Feeddown from Xic0
4482  fHistoEleLambdaMassFeeddownXic0MCS = new THnSparseF("fHistoEleLambdaMassFeeddownXic0MCS","",3,bins_base,xmin_base,xmax_base);
4484  fHistoEleLambdaMassFeeddownXic0MCGen = new THnSparseF("fHistoEleLambdaMassFeeddownXic0MCGen","",3,bins_base,xmin_base,xmax_base);
4486  fHistoEleLambdaMassvsElePtFeeddownXic0MCS = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4488  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCGen","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4490  fHistoEleLambdaMassvsElePtFeeddownXic0MCS1 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4492  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCGen1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4494  fHistoEleLambdaMassvsElePtFeeddownXic0MCS2 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4496  fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXic0MCGen2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4498  fHistoElePtFeeddownXic0MCS = new TH2F("fHistoElePtFeeddownXic0MCS","",100,0,10,10,0,100);
4500  fHistoElePtFeeddownXic0MCGen = new TH2F("fHistoElePtFeeddownXic0MCGen","",100,0,10,10,0,100);
4502  fHistoElePtvsEtaFeeddownXic0MCS = new THnSparseF("fHistoElePtvsEtaFeeddownXic0MCS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4504  fHistoElePtvsEtaFeeddownXic0MCGen = new THnSparseF("fHistoElePtvsEtaFeeddownXic0MCGen","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4506  fHistoElePtvsLambdaPtFeeddownXic0MCS = new THnSparseF("fHistoElePtvsLambdaPtFeeddownXic0MCS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4508  fHistoElePtvsLambdaPtFeeddownXic0MCGen = new THnSparseF("fHistoElePtvsLambdaPtFeeddownXic0MCGen","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4510 
4511  //Feeddown from XicPlus
4512  fHistoEleLambdaMassFeeddownXicPlusMCS = new THnSparseF("fHistoEleLambdaMassFeeddownXicPlusMCS","",3,bins_base,xmin_base,xmax_base);
4514  fHistoEleLambdaMassFeeddownXicPlusMCGen = new THnSparseF("fHistoEleLambdaMassFeeddownXicPlusMCGen","",3,bins_base,xmin_base,xmax_base);
4516  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4518  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4520  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4522  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen1","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4524  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS2 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCS2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4526  fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2 = new THnSparseF("fHistoEleLambdaMassvsElePtFeeddownXicPlusMCGen2","",3,bins_base_elept,xmin_base_elept,xmax_base_elept);
4528  fHistoElePtFeeddownXicPlusMCS = new TH2F("fHistoElePtFeeddownXicPlusMCS","",100,0,10,10,0,100);
4530  fHistoElePtFeeddownXicPlusMCGen = new TH2F("fHistoElePtFeeddownXicPlusMCGen","",100,0,10,10,0,100);
4532  fHistoElePtvsEtaFeeddownXicPlusMCS = new THnSparseF("fHistoElePtvsEtaFeeddownXicPlusMCS","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4534  fHistoElePtvsEtaFeeddownXicPlusMCGen = new THnSparseF("fHistoElePtvsEtaFeeddownXicPlusMCGen","",3,bins_eleptvseta,xmin_eleptvseta,xmax_eleptvseta);
4536  fHistoElePtvsLambdaPtFeeddownXicPlusMCS = new THnSparseF("fHistoElePtvsLambdaPtFeeddownXicPlusMCS","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4538  fHistoElePtvsLambdaPtFeeddownXicPlusMCGen = new THnSparseF("fHistoElePtvsLambdaPtFeeddownXicPlusMCGen","",3,bins_eleptvslambdapt,xmin_eleptvslambdapt,xmax_eleptvslambdapt);
4540 
4541  fHistoBachPt = new TH1F("fHistoBachPt","Bachelor p_{T}",100,0.0,5.0);
4542  fOutputAll->Add(fHistoBachPt);
4543 
4544  //------------------------------------------------
4545  // checking histograms
4546  //------------------------------------------------
4547  fHistoBachPt = new TH1F("fHistoBachPt","Bachelor p_{T}",100,0.0,5.0);
4548  fOutputAll->Add(fHistoBachPt);
4549  fHistoBachPtMCS = new TH1F("fHistoBachPtMCS","Bachelor p_{T}",100,0.0,5.0);
4551  fHistoBachPtMCGen = new TH1F("fHistoBachPtMCGen","Bachelor p_{T}",100,0.0,5.0);
4553  fHistod0Bach = new TH1F("fHistod0Bach","Bachelor d_{0}",100,-0.5,0.5);
4554  fOutputAll->Add(fHistod0Bach);
4555  fHistoLambdaMassvsPt=new TH2F("fHistoLambdaMassvsPt","Lambda mass",100,1.116-0.05,1.116+0.05,20,0.,10.);
4557  fHistoLambdaMassvsPtMCS=new TH2F("fHistoLambdaMassvsPtMCS","Lambda mass",100,1.116-0.05,1.116+0.05,20,0.,10.);
4559  fHistoLambdaMassvsPtMCGen=new TH2F("fHistoLambdaMassvsPtMCGen","Lambda mass",100,1.116-0.05,1.116+0.05,20,0.,10.);
4561  fHistoLambdaPtvsEta=new TH2F("fHistoLambdaPtvsEta","Lambda mass",20,0.,10.,20,-1.,1.);
4563  fHistoLambdaPtvsEtaMCS=new TH2F("fHistoLambdaPtvsEtaMCS","Lambda mass",20,0.,10.,20,-1.,1.);
4565  fHistoLambdaPtvsEtaMCGen=new TH2F("fHistoLambdaPtvsEtaMCGen","Lambda mass",20,0.,10.,20,-1.,1.);
4567  fHistoK0sMassvsPt=new TH2F("fHistoK0sMassvsPt","K0s mass",100,0.497-0.05,0.497+0.05,20,0.,10.);
4569  fHistoLambdaPtvsDl=new TH2F("fHistoLambdaPtvsDl","Lambda pt vs dl",20,0.,10.,20,0.,40.);
4571  fHistoLambdaPtvsDlSide=new TH2F("fHistoLambdaPtvsDlSide","Lambda pt vs dl",20,0.,10.,20,0.,40.);
4573  fHistoLambdaPtvsDlMCS=new TH2F("fHistoLambdaPtvsDlMCS","Lambda pt vs dl",20,0.,10.,20,0.,40.);
4575  fHistoLambdaPtvsDlFeeddownXi0MCS=new TH2F("fHistoLambdaPtvsDlFeeddownXi0MCS","Lambda pt vs dl",20,0.,10.,20,0.,40.);
4577  fHistoLambdaPtvsDlFeeddownXiMinusMCS=new TH2F("fHistoLambdaPtvsDlFeeddownXiMinusMCS","Lambda pt vs dl",20,0.,10.,20,0.,40.);
4579  fHistoLambdaPtvsDlFeeddownOmegaMCS=new TH2F("fHistoLambdaPtvsDlFeeddownOmegaMCS","Lambda pt vs dl",20,0.,10.,20,0.,40.);
4581 
4582  Int_t bins_armenteros[3]= {20 ,100 ,200};
4583  Double_t xmin_armenteros[3]={0.,0. ,-1.};
4584  Double_t xmax_armenteros[3]={20.,1. ,1.};
4585  fHistoLambdaArmenteros = new THnSparseF("fHistoLambdaArmenteros","",3,bins_armenteros,xmin_armenteros,xmax_armenteros);
4587  fHistoLambdaArmenterosMCS = new THnSparseF("fHistoLambdaArmenterosMCS","",3,bins_armenteros,xmin_armenteros,xmax_armenteros);
4589 
4590  fHistoElectronTPCPID=new TH2F("fHistoElectronTPCPID","",50,0.,5.,50,-20.,20.);
4592  fHistoElectronTOFPID=new TH2F("fHistoElectronTOFPID","",50,0.,5.,50,-20.,20.);
4594  fHistoElectronTPCSelPID=new TH2F("fHistoElectronTPCSelPID","",50,0.,5.,50,-20.,20.);
4596  fHistoElectronTOFSelPID=new TH2F("fHistoElectronTOFSelPID","",50,0.,5.,50,-20.,20.);
4598  fHistoElectronTPCPIDSelTOF=new TH2F("fHistoElectronTPCPIDSelTOF","",10,0.,5.,500,-10.,10.);
4600  fHistoElectronTPCPIDSelTOFSmallEta=new TH2F("fHistoElectronTPCPIDSelTOFSmallEta","",10,0.,5.,500,-10.,10.);
4602  fHistoElectronTPCPIDSelTOFLargeEta=new TH2F("fHistoElectronTPCPIDSelTOFLargeEta","",10,0.,5.,500,-10.,10.);
4604  fHistoMassConversionsMin=new TH1F("fHistoMassConversionsMin","",500,0,0.5);
4606  fHistoMassConversionsSameSignMin=new TH1F("fHistoMassConversionsSameSignMin","",500,0,0.5);
4608 
4609  for(Int_t i=0;i<8;i++){
4610  fHistoElectronTPCPIDSelTOFEtaDep[i]=new TH2F(Form("fHistoElectronTPCPIDSelTOFEtaDep[%d]",i),"",10,0.,5.,500,-10.,10.);
4612  }
4613  fHistoElectronQovPtvsPhi=new TH2F("fHistoElectronQovPtvsPhi","",70,0.,7.,50,-2.,2.);
4615  fHistoLambdaQovPtvsPhi=new TH2F("fHistoLambdaQovPtvsPhi","",70,0.,7.,50,-2.,2.);
4617 
4618  Int_t bins_lcmcgen_withelea[3]= {20 ,100 ,100};
4619  Double_t xmin_lcmcgen_withelea[3]={0.,-5.,-5.};
4620  Double_t xmax_lcmcgen_withelea[3]={20.,5.,5.};
4621  fHistoLcMCGenWithEleA = new THnSparseF("fHistoLcMCGenWithEleA","",3,bins_lcmcgen_withelea,xmin_lcmcgen_withelea,xmax_lcmcgen_withelea);
4623  fHistoLcMCGenWithEleB = new TH2D("fHistoLcMCGenWithEleB","",100,0.,20.,100,0.,10.);
4625 
4626  fHistoLbMCGenWithEleA = new THnSparseF("fHistoLbMCGenWithEleA","",3,bins_lcmcgen_withelea,xmin_lcmcgen_withelea,xmax_lcmcgen_withelea);
4628  fHistoLbMCGenWithEleB = new TH2D("fHistoLbMCGenWithEleB","",100,0.,20.,100,0.,10.);
4630 
4631  Int_t bins_lbmcgen_withlc[3]= {50 ,100 ,100};
4632  Double_t xmin_lbmcgen_withlc[3]={0.,-5.,-5.};
4633  Double_t xmax_lbmcgen_withlc[3]={50.,5.,5.};
4634  fHistoLbMCGenWithLambdac = new THnSparseF("fHistoLbMCGenWithLambdac","",3,bins_lbmcgen_withlc,xmin_lbmcgen_withlc,xmax_lbmcgen_withlc);
4636 
4637  Int_t bins_lcmcgen[3]= {100 ,20 ,10};
4638  Double_t xmin_lcmcgen[3]={0.,-1.0 ,0.0};
4639  Double_t xmax_lcmcgen[3]={20.,1.0 ,100};
4640  Int_t bins_lbmcgen[3]= {100 ,20 ,10};
4641  Double_t xmin_lbmcgen[3]={0.,-1.0 ,0.0};
4642  Double_t xmax_lbmcgen[3]={50.,1.0 ,100};
4643  fHistoLcMCGen = new THnSparseF("fHistoLcMCGen","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4644  fOutputAll->Add(fHistoLcMCGen);
4645  fHistoLcMCGen1 = new THnSparseF("fHistoLcMCGen1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4646  fOutputAll->Add(fHistoLcMCGen1);
4647  fHistoLcMCGen2 = new THnSparseF("fHistoLcMCGen2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4648  fOutputAll->Add(fHistoLcMCGen2);
4649  fHistoLbMCGen = new THnSparseF("fHistoLbMCGen","",3,bins_lbmcgen,xmin_lbmcgen,xmax_lbmcgen);
4650  fOutputAll->Add(fHistoLbMCGen);
4651  fHistoLbMCGen1 = new THnSparseF("fHistoLbMCGen1","",3,bins_lbmcgen,xmin_lbmcgen,xmax_lbmcgen);
4652  fOutputAll->Add(fHistoLbMCGen1);
4653  fHistoLbMCGen2 = new THnSparseF("fHistoLbMCGen2","",3,bins_lbmcgen,xmin_lbmcgen,xmax_lbmcgen);
4654  fOutputAll->Add(fHistoLbMCGen2);
4655  fHistoFeedDownXic0MCGen = new THnSparseF("fHistoFeedDownXic0MCGen","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4657  fHistoFeedDownXic0MCGen1 = new THnSparseF("fHistoFeedDownXic0MCGen1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4659  fHistoFeedDownXic0MCGen2 = new THnSparseF("fHistoFeedDownXic0MCGen2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4661  fHistoFeedDownXicPlusMCGen = new THnSparseF("fHistoFeedDownXicPlusMCGen","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4663  fHistoFeedDownXicPlusMCGen1 = new THnSparseF("fHistoFeedDownXicPlusMCGen1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4665  fHistoFeedDownXicPlusMCGen2 = new THnSparseF("fHistoFeedDownXicPlusMCGen2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4667  fHistoFeedDownSigmaMCGen = new THnSparseF("fHistoFeedDownSigmaMCGen","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4669  fHistoFeedDownSigmaMCGen1 = new THnSparseF("fHistoFeedDownSigmaMCGen1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4671  fHistoFeedDownSigmaMCGen2 = new THnSparseF("fHistoFeedDownSigmaMCGen2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4673 
4674  fHistoLcMCS = new THnSparseF("fHistoLcMCS","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4675  fOutputAll->Add(fHistoLcMCS);
4676  fHistoLcMCS1 = new THnSparseF("fHistoLcMCS1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4677  fOutputAll->Add(fHistoLcMCS1);
4678  fHistoLcMCS2 = new THnSparseF("fHistoLcMCS2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4679  fOutputAll->Add(fHistoLcMCS2);
4680  fHistoLbMCS = new THnSparseF("fHistoLbMCS","",3,bins_lbmcgen,xmin_lbmcgen,xmax_lbmcgen);
4681  fOutputAll->Add(fHistoLbMCS);
4682  fHistoLbMCS1 = new THnSparseF("fHistoLbMCS1","",3,bins_lbmcgen,xmin_lbmcgen,xmax_lbmcgen);
4683  fOutputAll->Add(fHistoLbMCS1);
4684  fHistoLbMCS2 = new THnSparseF("fHistoLbMCS2","",3,bins_lbmcgen,xmin_lbmcgen,xmax_lbmcgen);
4685  fOutputAll->Add(fHistoLbMCS2);
4686  fHistoFeedDownXic0MCS = new THnSparseF("fHistoFeedDownXic0MCS","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4688  fHistoFeedDownXic0MCS1 = new THnSparseF("fHistoFeedDownXic0MCS1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4690  fHistoFeedDownXic0MCS2 = new THnSparseF("fHistoFeedDownXic0MCS2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4692  fHistoFeedDownXicPlusMCS = new THnSparseF("fHistoFeedDownXicPlusMCS","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4694  fHistoFeedDownXicPlusMCS1 = new THnSparseF("fHistoFeedDownXicPlusMCS1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4696  fHistoFeedDownXicPlusMCS2 = new THnSparseF("fHistoFeedDownXicPlusMCS2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4698  fHistoFeedDownSigmaMCS = new THnSparseF("fHistoFeedDownSigmaMCS","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4700  fHistoFeedDownSigmaMCS1 = new THnSparseF("fHistoFeedDownSigmaMCS1","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4702  fHistoFeedDownSigmaMCS2 = new THnSparseF("fHistoFeedDownSigmaMCS2","",3,bins_lcmcgen,xmin_lcmcgen,xmax_lcmcgen);
4704 
4705  Int_t bins_elemcgen[3]= {100 ,20 ,10};
4706  Double_t xmin_elemcgen[3]={0.,-1.0 ,0.0};
4707  Double_t xmax_elemcgen[3]={10.,1.0 ,100};
4708  fHistoElectronMCGen = new THnSparseF("fHistoElectronMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4710  fHistoBottomElectronMCGen = new THnSparseF("fHistoBottomElectronMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4712  fHistoCharmElectronMCGen = new THnSparseF("fHistoCharmElectronMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4714  fHistoLcElectronMCGen = new THnSparseF("fHistoLcElectronMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4716  fHistoLcElectronMCGen1 = new THnSparseF("fHistoLcElectronMCGen1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4718  fHistoLcElectronMCGen2 = new THnSparseF("fHistoLcElectronMCGen2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4720  fHistoLbElectronMCGen = new THnSparseF("fHistoLbElectronMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4722  fHistoLbElectronMCGen1 = new THnSparseF("fHistoLbElectronMCGen1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4724  fHistoLbElectronMCGen2 = new THnSparseF("fHistoLbElectronMCGen2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4726  fHistoElectronFeedDownXic0MCGen = new THnSparseF("fHistoElectronFeedDownXic0MCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4728  fHistoElectronFeedDownXic0MCGen1 = new THnSparseF("fHistoElectronFeedDownXic0MCGen1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4730  fHistoElectronFeedDownXic0MCGen2 = new THnSparseF("fHistoElectronFeedDownXic0MCGen2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4732  fHistoElectronFeedDownXicPlusMCGen = new THnSparseF("fHistoElectronFeedDownXicPlusMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4734  fHistoElectronFeedDownXicPlusMCGen1 = new THnSparseF("fHistoElectronFeedDownXicPlusMCGen1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4736  fHistoElectronFeedDownXicPlusMCGen2 = new THnSparseF("fHistoElectronFeedDownXicPlusMCGen2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4738  fHistoElectronFeedDownXibMCGen = new THnSparseF("fHistoElectronFeedDownXibMCGen","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4740  fHistoElectronFeedDownXibMCGen1 = new THnSparseF("fHistoElectronFeedDownXibMCGen1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4742  fHistoElectronFeedDownXibMCGen2 = new THnSparseF("fHistoElectronFeedDownXibMCGen2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4744  fHistoLcElectronMCS = new THnSparseF("fHistoLcElectronMCS","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4746  fHistoLcElectronMCS1 = new THnSparseF("fHistoLcElectronMCS1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4748  fHistoLcElectronMCS2 = new THnSparseF("fHistoLcElectronMCS2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4750  fHistoLbElectronMCS = new THnSparseF("fHistoLbElectronMCS","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4752  fHistoLbElectronMCS1 = new THnSparseF("fHistoLbElectronMCS1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4754  fHistoLbElectronMCS2 = new THnSparseF("fHistoLbElectronMCS2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4756  fHistoElectronFeedDownXic0MCS = new THnSparseF("fHistoElectronFeedDownXic0MCS","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4758  fHistoElectronFeedDownXic0MCS1 = new THnSparseF("fHistoElectronFeedDownXic0MCS1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4760  fHistoElectronFeedDownXic0MCS2 = new THnSparseF("fHistoElectronFeedDownXic0MCS2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4762  fHistoElectronFeedDownXicPlusMCS = new THnSparseF("fHistoElectronFeedDownXicPlusMCS","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4764  fHistoElectronFeedDownXicPlusMCS1 = new THnSparseF("fHistoElectronFeedDownXicPlusMCS1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4766  fHistoElectronFeedDownXicPlusMCS2 = new THnSparseF("fHistoElectronFeedDownXicPlusMCS2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4768  fHistoElectronFeedDownXibMCS = new THnSparseF("fHistoElectronFeedDownXibMCS","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4770  fHistoElectronFeedDownXibMCS1 = new THnSparseF("fHistoElectronFeedDownXibMCS1","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4772  fHistoElectronFeedDownXibMCS2 = new THnSparseF("fHistoElectronFeedDownXibMCS2","",3,bins_elemcgen,xmin_elemcgen,xmax_elemcgen);
4774 
4775  Int_t bins_lambdamcgen[3]= {50 ,20 ,10};
4776  Double_t xmin_lambdamcgen[3]={0.,-1.0 ,0.0};
4777  Double_t xmax_lambdamcgen[3]={10.,1.0 ,100};
4778  fHistoLambdaMCGen = new THnSparseF("fHistoLambdaMCGen","",3,bins_lambdamcgen,xmin_lambdamcgen,xmax_lambdamcgen);
4780 
4781  Int_t bins_eleptvsv0dl[3]= {100 ,20 ,10};
4782  Double_t xmin_eleptvsv0dl[3]={0.,0. ,0.0};
4783  Double_t xmax_eleptvsv0dl[3]={10.,40. ,100};
4784  fHistoElePtvsV0dlRS = new THnSparseF("fHistoElePtvsV0dlRS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4786  fHistoElePtvsV0dlRS1 = new THnSparseF("fHistoElePtvsV0dlRS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4788  fHistoElePtvsV0dlRS2 = new THnSparseF("fHistoElePtvsV0dlRS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4790  fHistoElePtvsV0dlRSSide = new THnSparseF("fHistoElePtvsV0dlRSSide","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4792  fHistoElePtvsV0dlRSSide1 = new THnSparseF("fHistoElePtvsV0dlRSSide1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4794  fHistoElePtvsV0dlRSSide2 = new THnSparseF("fHistoElePtvsV0dlRSSide2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4796  fHistoElePtvsV0dlRSMix = new THnSparseF("fHistoElePtvsV0dlRSMix","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4798  fHistoElePtvsV0dlRSMix1 = new THnSparseF("fHistoElePtvsV0dlRSMix1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4800  fHistoElePtvsV0dlRSMix2 = new THnSparseF("fHistoElePtvsV0dlRSMix2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4802  fHistoElePtvsV0dlWS = new THnSparseF("fHistoElePtvsV0dlWS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4804  fHistoElePtvsV0dlWS1 = new THnSparseF("fHistoElePtvsV0dlWS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4806  fHistoElePtvsV0dlWS2 = new THnSparseF("fHistoElePtvsV0dlWS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4808  fHistoElePtvsV0dlWSSide = new THnSparseF("fHistoElePtvsV0dlWSSide","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4810  fHistoElePtvsV0dlWSSide1 = new THnSparseF("fHistoElePtvsV0dlWSSide1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4812  fHistoElePtvsV0dlWSSide2 = new THnSparseF("fHistoElePtvsV0dlWSSide2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4814  fHistoElePtvsV0dlWSMix = new THnSparseF("fHistoElePtvsV0dlWSMix","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4816  fHistoElePtvsV0dlWSMix1 = new THnSparseF("fHistoElePtvsV0dlWSMix1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4818  fHistoElePtvsV0dlWSMix2 = new THnSparseF("fHistoElePtvsV0dlWSMix2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4820  fHistoElePtvsV0dlMCS = new THnSparseF("fHistoElePtvsV0dlMCS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4822  fHistoElePtvsV0dlMCS1 = new THnSparseF("fHistoElePtvsV0dlMCS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4824  fHistoElePtvsV0dlMCS2 = new THnSparseF("fHistoElePtvsV0dlMCS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4826  fHistoElePtvsV0dlFeedDownXic0MCS = new THnSparseF("fHistoElePtvsV0dlFeedDownXic0MCS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4828  fHistoElePtvsV0dlFeedDownXic0MCS1 = new THnSparseF("fHistoElePtvsV0dlFeedDownXic0MCS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4830  fHistoElePtvsV0dlFeedDownXic0MCS2 = new THnSparseF("fHistoElePtvsV0dlFeedDownXic0MCS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4832  fHistoElePtvsV0dlFeedDownXicPlusMCS = new THnSparseF("fHistoElePtvsV0dlFeedDownXicPlusMCS","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4834  fHistoElePtvsV0dlFeedDownXicPlusMCS1 = new THnSparseF("fHistoElePtvsV0dlFeedDownXicPlusMCS1","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4836  fHistoElePtvsV0dlFeedDownXicPlusMCS2 = new THnSparseF("fHistoElePtvsV0dlFeedDownXicPlusMCS2","",3,bins_eleptvsv0dl,xmin_eleptvsv0dl,xmax_eleptvsv0dl);
4838 
4839  Int_t bins_eleptvsv0dca[3]= {100 ,20 ,10};
4840  Double_t xmin_eleptvsv0dca[3]={0.,0. ,0.0};
4841  Double_t xmax_eleptvsv0dca[3]={10.,1. ,100};
4842  fHistoElePtvsV0dcaRS = new THnSparseF("fHistoElePtvsV0dcaRS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4844  fHistoElePtvsV0dcaRS1 = new THnSparseF("fHistoElePtvsV0dcaRS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4846  fHistoElePtvsV0dcaRS2 = new THnSparseF("fHistoElePtvsV0dcaRS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4848  fHistoElePtvsV0dcaRSSide = new THnSparseF("fHistoElePtvsV0dcaRSSide","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4850  fHistoElePtvsV0dcaRSSide1 = new THnSparseF("fHistoElePtvsV0dcaRSSide1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4852  fHistoElePtvsV0dcaRSSide2 = new THnSparseF("fHistoElePtvsV0dcaRSSide2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4854  fHistoElePtvsV0dcaRSMix = new THnSparseF("fHistoElePtvsV0dcaRSMix","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4856  fHistoElePtvsV0dcaRSMix1 = new THnSparseF("fHistoElePtvsV0dcaRSMix1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4858  fHistoElePtvsV0dcaRSMix2 = new THnSparseF("fHistoElePtvsV0dcaRSMix2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4860  fHistoElePtvsV0dcaWS = new THnSparseF("fHistoElePtvsV0dcaWS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4862  fHistoElePtvsV0dcaWS1 = new THnSparseF("fHistoElePtvsV0dcaWS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4864  fHistoElePtvsV0dcaWS2 = new THnSparseF("fHistoElePtvsV0dcaWS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4866  fHistoElePtvsV0dcaWSSide = new THnSparseF("fHistoElePtvsV0dcaWSSide","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4868  fHistoElePtvsV0dcaWSSide1 = new THnSparseF("fHistoElePtvsV0dcaWSSide1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4870  fHistoElePtvsV0dcaWSSide2 = new THnSparseF("fHistoElePtvsV0dcaWSSide2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4872  fHistoElePtvsV0dcaWSMix = new THnSparseF("fHistoElePtvsV0dcaWSMix","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4874  fHistoElePtvsV0dcaWSMix1 = new THnSparseF("fHistoElePtvsV0dcaWSMix1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4876  fHistoElePtvsV0dcaWSMix2 = new THnSparseF("fHistoElePtvsV0dcaWSMix2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4878  fHistoElePtvsV0dcaMCS = new THnSparseF("fHistoElePtvsV0dcaMCS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4880  fHistoElePtvsV0dcaMCS1 = new THnSparseF("fHistoElePtvsV0dcaMCS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4882  fHistoElePtvsV0dcaMCS2 = new THnSparseF("fHistoElePtvsV0dcaMCS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4884  fHistoElePtvsV0dcaFeedDownXic0MCS = new THnSparseF("fHistoElePtvsV0dcaFeedDownXic0MCS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4886  fHistoElePtvsV0dcaFeedDownXic0MCS1 = new THnSparseF("fHistoElePtvsV0dcaFeedDownXic0MCS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4888  fHistoElePtvsV0dcaFeedDownXic0MCS2 = new THnSparseF("fHistoElePtvsV0dcaFeedDownXic0MCS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4890  fHistoElePtvsV0dcaFeedDownXicPlusMCS = new THnSparseF("fHistoElePtvsV0dcaFeedDownXicPlusMCS","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4892  fHistoElePtvsV0dcaFeedDownXicPlusMCS1 = new THnSparseF("fHistoElePtvsV0dcaFeedDownXicPlusMCS1","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4894  fHistoElePtvsV0dcaFeedDownXicPlusMCS2 = new THnSparseF("fHistoElePtvsV0dcaFeedDownXicPlusMCS2","",3,bins_eleptvsv0dca,xmin_eleptvsv0dca,xmax_eleptvsv0dca);
4896 
4897  Int_t bins_elelamptvsv0dl[4]= {100 ,20 ,100, 10};
4898  Double_t xmin_elelamptvsv0dl[4]={0.,0. ,-0.5, 0.0};
4899  Double_t xmax_elelamptvsv0dl[4]={20.,40.,0.5 ,100};
4900  fHistoEleLambdaPtvsV0dlRS = new THnSparseF("fHistoEleLambdaPtvsV0dlRS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4902  fHistoEleLambdaPtvsV0dlRS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlRS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4904  fHistoEleLambdaPtvsV0dlRS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlRS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4906  fHistoEleLambdaPtvsV0dlRSSide = new THnSparseF("fHistoEleLambdaPtvsV0dlRSSide","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4908  fHistoEleLambdaPtvsV0dlRSSide1 = new THnSparseF("fHistoEleLambdaPtvsV0dlRSSide1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4910  fHistoEleLambdaPtvsV0dlRSSide2 = new THnSparseF("fHistoEleLambdaPtvsV0dlRSSide2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4912  fHistoEleLambdaPtvsV0dlRSMix = new THnSparseF("fHistoEleLambdaPtvsV0dlRSMix","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4914  fHistoEleLambdaPtvsV0dlRSMix1 = new THnSparseF("fHistoEleLambdaPtvsV0dlRSMix1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4916  fHistoEleLambdaPtvsV0dlRSMix2 = new THnSparseF("fHistoEleLambdaPtvsV0dlRSMix2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4918  fHistoEleLambdaPtvsV0dlWS = new THnSparseF("fHistoEleLambdaPtvsV0dlWS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4920  fHistoEleLambdaPtvsV0dlWS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlWS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4922  fHistoEleLambdaPtvsV0dlWS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlWS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4924  fHistoEleLambdaPtvsV0dlWSSide = new THnSparseF("fHistoEleLambdaPtvsV0dlWSSide","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4926  fHistoEleLambdaPtvsV0dlWSSide1 = new THnSparseF("fHistoEleLambdaPtvsV0dlWSSide1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4928  fHistoEleLambdaPtvsV0dlWSSide2 = new THnSparseF("fHistoEleLambdaPtvsV0dlWSSide2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4930  fHistoEleLambdaPtvsV0dlWSMix = new THnSparseF("fHistoEleLambdaPtvsV0dlWSMix","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4932  fHistoEleLambdaPtvsV0dlWSMix1 = new THnSparseF("fHistoEleLambdaPtvsV0dlWSMix1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4934  fHistoEleLambdaPtvsV0dlWSMix2 = new THnSparseF("fHistoEleLambdaPtvsV0dlWSMix2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4936  fHistoEleLambdaPtvsV0dlMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4938  fHistoEleLambdaPtvsV0dlMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4940  fHistoEleLambdaPtvsV0dlMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlMCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4942  fHistoEleLambdaPtvsV0dlPromptMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlPromptMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4944  fHistoEleLambdaPtvsV0dlPromptMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlPromptMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4946  fHistoEleLambdaPtvsV0dlPromptMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlPromptMCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4948  fHistoEleLambdaPtvsV0dlBFeeddownMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlBFeeddownMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4950  fHistoEleLambdaPtvsV0dlBFeeddownMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlBFeeddownMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4952  fHistoEleLambdaPtvsV0dlBFeeddownMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlBFeeddownMCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4954  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0MCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4956  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0MCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4958  fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0MCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4960  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4962  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4964  fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0PromptMCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4966  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4968  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4970  fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXic0BFeeddownMCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4972 
4973  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4975  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4977  fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusMCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4979  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4981  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4983  fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusPromptMCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4985  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4987  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4989  fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS2 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownXicPlusBFeeddownMCS2","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4991 
4992  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4994  fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS1 = new THnSparseF("fHistoEleLambdaPtvsV0dlFeedDownSigmaMCS1","",4,bins_elelamptvsv0dl,xmin_elelamptvsv0dl,xmax_elelamptvsv0dl);
4995  fOutputAll->Add(