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