AliPhysics  a6017e1 (a6017e1)
AliAnalysisTaskSESelectHF4Prong.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2008, 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  * appear 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 
17 //
18 // AliAnalysisTaskSE for the selection of heavy flavor
19 // decay candidates and creation a stand-alone AOD for
20 // 4prong D0 decay.
21 //
22 // Author: A.Dainese, andrea.dainese@lnl.infn.it
23 // F.Colamaria, fabio.colamaria@ba.infn.it
25 
26 
27 #include "Riostream.h"
28 #include "TFile.h"
29 #include "TList.h"
30 #include "TH1F.h"
31 #include "TH2F.h"
32 #include "TClonesArray.h"
33 #include "TDatabasePDG.h"
34 #include "TROOT.h"
35 #include "TCanvas.h"
36 #include "TBits.h"
37 #include "TNtuple.h"
38 
39 #include "AliAnalysisDataSlot.h"
40 #include "AliAnalysisDataContainer.h"
41 #include "AliAnalysisManager.h"
42 #include "AliAODHandler.h"
43 #include "AliAODEvent.h"
44 #include "AliAODVertex.h"
45 #include "AliAODTrack.h"
47 #include "AliAnalysisVertexingHF.h"
48 #include "AliAnalysisTaskSE.h"
50 #include "AliAODPidHF.h"
51 #include "AliRDHFCuts.h"
52 
56 
57 //________________________________________________________________________
60 fVerticesHFTClArr(0),
61 fCharm4ProngTClArr(0),
62 fSelected(0),
63 fMCTruth(0),
64 fOutput(0),
65 fOutput2(0),
66 fOutput3(0),
67 fOutput4(0),
68 fOutput5(0),
69 fOutputC(0),
70 fhInvMassD0Sum10MevBin1(0),
71 fhInvMassD0barSum10MevBin1(0),
72 fhInvMassSumAll10MevBin1(0),
73 fhInvMassD0Sum5MevBin1(0),
74 fhInvMassD0barSum5MevBin1(0),
75 fhInvMassSumAll5MevBin1(0),
76 fhInvMassD0Sum10MevBin2(0),
77 fhInvMassD0barSum10MevBin2(0),
78 fhInvMassSumAll10MevBin2(0),
79 fhInvMassD0Sum5MevBin2(0),
80 fhInvMassD0barSum5MevBin2(0),
81 fhInvMassSumAll5MevBin2(0),
82 fhInvMassD0Sum10MevBin3(0),
83 fhInvMassD0barSum10MevBin3(0),
84 fhInvMassSumAll10MevBin3(0),
85 fhInvMassD0Sum5MevBin3(0),
86 fhInvMassD0barSum5MevBin3(0),
87 fhInvMassSumAll5MevBin3(0),
88 fhInvMassD0Sum10MevBin4(0),
89 fhInvMassD0barSum10MevBin4(0),
90 fhInvMassSumAll10MevBin4(0),
91 fhInvMassD0Sum5MevBin4(0),
92 fhInvMassD0barSum5MevBin4(0),
93 fhInvMassSumAll5MevBin4(0),
94 fhInvMassD0Sum10MevBin5(0),
95 fhInvMassD0barSum10MevBin5(0),
96 fhInvMassSumAll10MevBin5(0),
97 fhInvMassD0Sum5MevBin5(0),
98 fhInvMassD0barSum5MevBin5(0),
99 fhInvMassSumAll5MevBin5(0),
100 fhReflBin1(0),
101 fhReflBin2(0),
102 fhReflBin3(0),
103 fhReflBin4(0),
104 fhReflBin5(0),
105 fhReflD0Bin1(0),
106 fhReflD0Bin2(0),
107 fhReflD0Bin3(0),
108 fhReflD0Bin4(0),
109 fhReflD0Bin5(0),
110 fhReflD0barBin1(0),
111 fhReflD0barBin2(0),
112 fhReflD0barBin3(0),
113 fhReflD0barBin4(0),
114 fhReflD0barBin5(0),
115 fScatterP4PID(0),
116 fPtVsY(0),
117 fPtVsYAll(0),
118 fEventCounter(0),
119 fCutDCA(0),
120 fCutDCA3(0),
121 fCutDCA2(0),
122 fCutDCA5(0),
123 fCutVertexDist2(0),
124 fCutVertexDist3(0),
125 fCutVertexDist4(0),
126 fCutCosinePoint(0),
127 fCutPt(0),
128 fCutY(0),
129 fPIDSel(0),
130 fPIDSelBin1(0),
131 fPIDSelBin2(0),
132 fPIDSelBin3(0),
133 fPIDSelBin4(0),
134 fPIDSelBin5(0),
135 fMultipleHyps(0),
136 fMultipleHypsType(0),
137 fPtSel(0),
138 fCuts(0)
139 {
140  // Default constructor
141 }
142 
143 //_______________________________________________________________________
145 AliAnalysisTaskSE(name),
148 fSelected(0),
149 fMCTruth(0),
150 fOutput(0),
151 fOutput2(0),
152 fOutput3(0),
153 fOutput4(0),
154 fOutput5(0),
155 fOutputC(0),
186 fhReflBin1(0),
187 fhReflBin2(0),
188 fhReflBin3(0),
189 fhReflBin4(0),
190 fhReflBin5(0),
191 fhReflD0Bin1(0),
192 fhReflD0Bin2(0),
193 fhReflD0Bin3(0),
194 fhReflD0Bin4(0),
195 fhReflD0Bin5(0),
196 fhReflD0barBin1(0),
197 fhReflD0barBin2(0),
198 fhReflD0barBin3(0),
199 fhReflD0barBin4(0),
200 fhReflD0barBin5(0),
201 fScatterP4PID(0),
202 fPtVsY(0),
203 fPtVsYAll(0),
204 fEventCounter(0),
205 fCutDCA(0),
206 fCutDCA3(0),
207 fCutDCA2(0),
208 fCutDCA5(0),
209 fCutVertexDist2(0),
210 fCutVertexDist3(0),
211 fCutVertexDist4(0),
212 fCutCosinePoint(0),
213 fCutPt(0),
214 fCutY(0),
215 fPIDSel(0),
216 fPIDSelBin1(0),
217 fPIDSelBin2(0),
218 fPIDSelBin3(0),
219 fPIDSelBin4(0),
220 fPIDSelBin5(0),
221 fMultipleHyps(0),
223 fPtSel(0),
224 fCuts(0)
225 {
226  // Standard constructor
227 
228  fCuts=cuts;
229 
230  // Input slot #0 works with an Ntuple
231 // DefineInput(0, TTree::Class());
232 
233  // Output slot #0 writes into a TTree container
234  // Output slots #1-6 writes into a TList container
235  DefineOutput(0, TTree::Class()); //default
236  DefineOutput(1, TList::Class()); //histos inv. mass bin1
237  DefineOutput(2, TList::Class()); //histos inv. mass bin2
238  DefineOutput(3, TList::Class()); //histos inv. mass bin3
239  DefineOutput(4, TList::Class()); //histos inv. mass bin4
240  DefineOutput(5, TList::Class()); //histos inv. mass bin5
241  DefineOutput(6, TList::Class()); //histos of cuts
242  DefineOutput(7, AliRDHFCutsD0toKpipipi::Class()); //cuts
243 }
244 
245 //________________________________________________________________________
247 {
248  // Destructor
249 
250  if (fOutput) {
251  delete fOutput;
252  fOutput = 0;
253  }
254  if (fOutput2) {
255  delete fOutput2;
256  fOutput2 = 0;
257  }
258  if (fOutput3) {
259  delete fOutput3;
260  fOutput3 = 0;
261  }
262  if (fOutput4) {
263  delete fOutput4;
264  fOutput4 = 0;
265  }
266  if (fOutput5) {
267  delete fOutput5;
268  fOutput5 = 0;
269  }
270  if (fOutputC) {
271  delete fOutputC;
272  fOutputC = 0;
273  }
274  if (fCuts) {
275  delete fCuts;
276  fCuts = 0;
277  }
278 
279 }
280 
281 //________________________________________________________________________
283 {
284  // Initialization
285 
286  if(fDebug > 1) printf("AnalysisTaskSESelectHF4Prong::Init() \n");
288 
289  return;
290 }
291 
292 //________________________________________________________________________
294 {
295  // Create the output container
296  //
297  if(fDebug > 1) printf("AnalysisTaskSESelectHF4Prong::UserCreateOutputObjects() \n");
298 
299  if(fDebug > 1) PrintPtBinHandMCFlag();
300 
301  fVerticesHFTClArr = new TClonesArray("AliAODVertex", 0);
302  fVerticesHFTClArr->SetName("VerticesHF");
303  AddAODBranch("TClonesArray", &fVerticesHFTClArr);
304 
305  fCharm4ProngTClArr = new TClonesArray("AliAODRecoDecayHF4Prong", 0);
306  fCharm4ProngTClArr->SetName("Charm4Prong");
307  AddAODBranch("TClonesArray", &fCharm4ProngTClArr);
308 
309  fOutput = new TList();
310  fOutput->SetOwner();
311 
312  fOutput2 = new TList();
313  fOutput2->SetOwner();
314 
315  fOutput3 = new TList();
316  fOutput3->SetOwner();
317 
318  fOutput4 = new TList();
319  fOutput4->SetOwner();
320 
321  fOutput5 = new TList();
322  fOutput5->SetOwner();
323 
324  fOutputC = new TList();
325  fOutputC->SetOwner();
326 
327  fhInvMassD0Sum10MevBin1 = new TH1F("fhInvMassD0Sum10MevBin1", "D0 invariant mass Bin1 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
328  fhInvMassD0Sum10MevBin1->Sumw2(); //Create structure to store sum of squares of weights
329  fhInvMassD0Sum10MevBin1->SetMinimum(0);
331 
332  fhInvMassD0barSum10MevBin1 = new TH1F("fhInvMassD0barSum10MevBin1", "D0bar invariant mass Bin1 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
333  fhInvMassD0barSum10MevBin1->Sumw2(); //Create structure to store sum of squares of weights
334  fhInvMassD0barSum10MevBin1->SetMinimum(0);
336 
337  fhInvMassSumAll10MevBin1 = new TH1F("fhInvMassSumAll10MevBin1", "D0/D0bar invariant mass Bin1 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
338  fhInvMassSumAll10MevBin1->Sumw2(); //Create structure to store sum of squares of weights
339  fhInvMassSumAll10MevBin1->SetMinimum(0);
341 
342  fhInvMassD0Sum5MevBin1 = new TH1F("fhInvMassD0Sum5MevBin1", "D0 invariant mass Bin1 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
343  fhInvMassD0Sum5MevBin1->Sumw2(); //Create structure to store sum of squares of weights
344  fhInvMassD0Sum5MevBin1->SetMinimum(0);
346 
347  fhInvMassD0barSum5MevBin1 = new TH1F("fhInvMassD0barSum5MevBin1", "D0bar invariant mass Bin1 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
348  fhInvMassD0barSum5MevBin1->Sumw2(); //Create structure to store sum of squares of weights
349  fhInvMassD0barSum5MevBin1->SetMinimum(0);
351 
352  fhInvMassSumAll5MevBin1 = new TH1F("fhInvMassSumAll5MevBin1", "D0/D0bar invariant mass Bin1 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
353  fhInvMassSumAll5MevBin1->Sumw2(); //Create structure to store sum of squares of weights
354  fhInvMassSumAll5MevBin1->SetMinimum(0);
356 
357  fhInvMassD0Sum10MevBin2 = new TH1F("fhInvMassD0Sum10MevBin2", "D0 invariant mass Bin2 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
358  fhInvMassD0Sum10MevBin2->Sumw2(); //Create structure to store sum of squares of weights
359  fhInvMassD0Sum10MevBin2->SetMinimum(0);
361 
362  fhInvMassD0barSum10MevBin2 = new TH1F("fhInvMassD0barSum10MevBin2", "D0bar invariant mass Bin2 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
363  fhInvMassD0barSum10MevBin2->Sumw2(); //Create structure to store sum of squares of weights
364  fhInvMassD0barSum10MevBin2->SetMinimum(0);
366 
367  fhInvMassSumAll10MevBin2 = new TH1F("fhInvMassSumAll10MevBin2", "D0/D0bar invariant mass Bin2 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
368  fhInvMassSumAll10MevBin2->Sumw2(); //Create structure to store sum of squares of weights
369  fhInvMassSumAll10MevBin2->SetMinimum(0);
371 
372  fhInvMassD0Sum5MevBin2 = new TH1F("fhInvMassD0Sum5MevBin2", "D0 invariant mass Bin2 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
373  fhInvMassD0Sum5MevBin2->Sumw2(); //Create structure to store sum of squares of weights
374  fhInvMassD0Sum5MevBin2->SetMinimum(0);
376 
377  fhInvMassD0barSum5MevBin2 = new TH1F("fhInvMassD0barSum5MevBin2", "D0bar invariant mass Bin2 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
378  fhInvMassD0barSum5MevBin2->Sumw2(); //Create structure to store sum of squares of weights
379  fhInvMassD0barSum5MevBin2->SetMinimum(0);
381 
382  fhInvMassSumAll5MevBin2 = new TH1F("fhInvMassSumAll5MevBin2", "D0/D0bar invariant mass Bin2 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
383  fhInvMassSumAll5MevBin2->Sumw2(); //Create structure to store sum of squares of weights
384  fhInvMassSumAll5MevBin2->SetMinimum(0);
386 
387  fhInvMassD0Sum10MevBin3 = new TH1F("fhInvMassD0Sum10MevBin3", "D0 invariant mass Bin3 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
388  fhInvMassD0Sum10MevBin3->Sumw2(); //Create structure to store sum of squares of weights
389  fhInvMassD0Sum10MevBin3->SetMinimum(0);
391 
392  fhInvMassD0barSum10MevBin3 = new TH1F("fhInvMassD0barSum10MevBin3", "D0bar invariant mass Bin3 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
393  fhInvMassD0barSum10MevBin3->Sumw2(); //Create structure to store sum of squares of weights
394  fhInvMassD0barSum10MevBin3->SetMinimum(0);
396 
397  fhInvMassSumAll10MevBin3 = new TH1F("fhInvMassSumAll10MevBin3", "D0/D0bar invariant mass Bin3 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
398  fhInvMassSumAll10MevBin3->Sumw2(); //Create structure to store sum of squares of weights
399  fhInvMassSumAll10MevBin3->SetMinimum(0);
401 
402  fhInvMassD0Sum5MevBin3 = new TH1F("fhInvMassD0Sum5MevBin3", "D0 invariant mass Bin3 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
403  fhInvMassD0Sum5MevBin3->Sumw2(); //Create structure to store sum of squares of weights
404  fhInvMassD0Sum5MevBin3->SetMinimum(0);
406 
407  fhInvMassD0barSum5MevBin3 = new TH1F("fhInvMassD0barSum5MevBin3", "D0bar invariant mass Bin3 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
408  fhInvMassD0barSum5MevBin3->Sumw2(); //Create structure to store sum of squares of weights
409  fhInvMassD0barSum5MevBin3->SetMinimum(0);
411 
412  fhInvMassSumAll5MevBin3 = new TH1F("fhInvMassSumAll5MevBin3", "D0/D0bar invariant mass Bin3 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
413  fhInvMassSumAll5MevBin3->Sumw2(); //Create structure to store sum of squares of weights
414  fhInvMassSumAll5MevBin3->SetMinimum(0);
416 
417  fhInvMassD0Sum10MevBin4 = new TH1F("fhInvMassD0Sum10MevBin4", "D0 invariant mass Bin4 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
418  fhInvMassD0Sum10MevBin4->Sumw2(); //Create structure to store sum of squares of weights
419  fhInvMassD0Sum10MevBin4->SetMinimum(0);
421 
422  fhInvMassD0barSum10MevBin4 = new TH1F("fhInvMassD0barSum10MevBin4", "D0bar invariant mass Bin4 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
423  fhInvMassD0barSum10MevBin4->Sumw2(); //Create structure to store sum of squares of weights
424  fhInvMassD0barSum10MevBin4->SetMinimum(0);
426 
427  fhInvMassSumAll10MevBin4 = new TH1F("fhInvMassSumAll10MevBin4", "D0/D0bar invariant mass Bin4 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
428  fhInvMassSumAll10MevBin4->Sumw2(); //Create structure to store sum of squares of weights
429  fhInvMassSumAll10MevBin4->SetMinimum(0);
431 
432  fhInvMassD0Sum5MevBin4 = new TH1F("fhInvMassD0Sum5MevBin4", "D0 invariant mass Bin4 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
433  fhInvMassD0Sum5MevBin4->Sumw2(); //Create structure to store sum of squares of weights
434  fhInvMassD0Sum5MevBin4->SetMinimum(0);
436 
437  fhInvMassD0barSum5MevBin4 = new TH1F("fhInvMassD0barSum5MevBin4", "D0bar invariant mass Bin4 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
438  fhInvMassD0barSum5MevBin4->Sumw2(); //Create structure to store sum of squares of weights
439  fhInvMassD0barSum5MevBin4->SetMinimum(0);
441 
442  fhInvMassSumAll5MevBin4 = new TH1F("fhInvMassSumAll5MevBin4", "D0/D0bar invariant mass Bin4 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
443  fhInvMassSumAll5MevBin4->Sumw2(); //Create structure to store sum of squares of weights
444  fhInvMassSumAll5MevBin4->SetMinimum(0);
446 
447  fhInvMassD0Sum10MevBin5 = new TH1F("fhInvMassD0Sum10MevBin5", "D0 invariant mass Bin5 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
448  fhInvMassD0Sum10MevBin5->Sumw2(); //Create structure to store sum of squares of weights
449  fhInvMassD0Sum10MevBin5->SetMinimum(0);
451 
452  fhInvMassD0barSum10MevBin5 = new TH1F("fhInvMassD0barSum10MevBin5", "D0bar invariant mass Bin5 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
453  fhInvMassD0barSum10MevBin5->Sumw2(); //Create structure to store sum of squares of weights
454  fhInvMassD0barSum10MevBin5->SetMinimum(0);
456 
457  fhInvMassSumAll10MevBin5 = new TH1F("fhInvMassSumAll10MevBin5", "D0/D0bar invariant mass Bin5 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
458  fhInvMassSumAll10MevBin5->Sumw2(); //Create structure to store sum of squares of weights
459  fhInvMassSumAll10MevBin5->SetMinimum(0);
461 
462  fhInvMassD0Sum5MevBin5 = new TH1F("fhInvMassD0Sum5MevBin5", "D0 invariant mass Bin5 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
463  fhInvMassD0Sum5MevBin5->Sumw2(); //Create structure to store sum of squares of weights
464  fhInvMassD0Sum5MevBin5->SetMinimum(0);
466 
467  fhInvMassD0barSum5MevBin5 = new TH1F("fhInvMassD0barSum5MevBin5", "D0bar invariant mass Bin5 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
468  fhInvMassD0barSum5MevBin5->Sumw2(); //Create structure to store sum of squares of weights
469  fhInvMassD0barSum5MevBin5->SetMinimum(0);
471 
472  fhInvMassSumAll5MevBin5 = new TH1F("fhInvMassSumAll5MevBin5", "D0/D0bar invariant mass Bin5 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
473  fhInvMassSumAll5MevBin5->Sumw2(); //Create structure to store sum of squares of weights
474  fhInvMassSumAll5MevBin5->SetMinimum(0);
476 
477  fhReflBin1 = new TH2F("fhReflBin1", "Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
478  fhReflBin1->Sumw2(); //Create structure to store sum of squares of weights
479  fhReflBin1->SetMinimum(0);
480  fOutput->Add(fhReflBin1);
481 
482  fhReflBin2 = new TH2F("fhReflBin2", "Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
483  fhReflBin2->Sumw2(); //Create structure to store sum of squares of weights
484  fhReflBin2->SetMinimum(0);
485  fOutput2->Add(fhReflBin2);
486 
487  fhReflBin3 = new TH2F("fhReflBin3", "Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
488  fhReflBin3->Sumw2(); //Create structure to store sum of squares of weights
489  fhReflBin3->SetMinimum(0);
490  fOutput3->Add(fhReflBin3);
491 
492  fhReflBin4 = new TH2F("fhReflBin4", "Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
493  fhReflBin4->Sumw2(); //Create structure to store sum of squares of weights
494  fhReflBin4->SetMinimum(0);
495  fOutput4->Add(fhReflBin4);
496 
497  fhReflBin5 = new TH2F("fhReflBin5", "Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
498  fhReflBin5->Sumw2(); //Create structure to store sum of squares of weights
499  fhReflBin5->SetMinimum(0);
500  fOutput5->Add(fhReflBin5);
501 
502  fhReflD0Bin1 = new TH2F("fhReflD0Bin1", "Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
503  fhReflD0Bin1->Sumw2(); //Create structure to store sum of squares of weights
504  fhReflD0Bin1->SetMinimum(0);
505  fOutput->Add(fhReflD0Bin1);
506 
507  fhReflD0Bin2 = new TH2F("fhReflD0Bin2", "Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
508  fhReflD0Bin2->Sumw2(); //Create structure to store sum of squares of weights
509  fhReflD0Bin2->SetMinimum(0);
510  fOutput2->Add(fhReflD0Bin2);
511 
512  fhReflD0Bin3 = new TH2F("fhReflD0Bin3", "Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
513  fhReflD0Bin3->Sumw2(); //Create structure to store sum of squares of weights
514  fhReflD0Bin3->SetMinimum(0);
515  fOutput3->Add(fhReflD0Bin3);
516 
517  fhReflD0Bin4 = new TH2F("fhReflD0Bin4", "Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
518  fhReflD0Bin4->Sumw2(); //Create structure to store sum of squares of weights
519  fhReflD0Bin4->SetMinimum(0);
520  fOutput4->Add(fhReflD0Bin4);
521 
522  fhReflD0Bin5 = new TH2F("fhReflD0Bin5", "Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
523  fhReflD0Bin5->Sumw2(); //Create structure to store sum of squares of weights
524  fhReflD0Bin5->SetMinimum(0);
525  fOutput5->Add(fhReflD0Bin5);
526 
527  fhReflD0barBin1 = new TH2F("fhReflD0barBin1", "Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
528  fhReflD0barBin1->Sumw2(); //Create structure to store sum of squares of weights
529  fhReflD0barBin1->SetMinimum(0);
530  fOutput->Add(fhReflD0barBin1);
531 
532  fhReflD0barBin2 = new TH2F("fhReflD0barBin2", "Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
533  fhReflD0barBin2->Sumw2(); //Create structure to store sum of squares of weights
534  fhReflD0barBin2->SetMinimum(0);
536 
537  fhReflD0barBin3 = new TH2F("fhReflD0barBin3", "Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
538  fhReflD0barBin3->Sumw2(); //Create structure to store sum of squares of weights
539  fhReflD0barBin3->SetMinimum(0);
541 
542  fhReflD0barBin4 = new TH2F("fhReflD0barBin4", "Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
543  fhReflD0barBin4->Sumw2(); //Create structure to store sum of squares of weights
544  fhReflD0barBin4->SetMinimum(0);
546 
547  fhReflD0barBin5 = new TH2F("fhReflD0barBin5", "Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
548  fhReflD0barBin5->Sumw2(); //Create structure to store sum of squares of weights
549  fhReflD0barBin5->SetMinimum(0);
551 
552  fScatterP4PID = new TH2F("fScatterP4PID", "Transverse momentum of K vs l-s Pi (D0 + D0bar); Pt of K [GeV/c]; Pt of Pi [GeV/c]",500,0.,5.,500,0.,5.);
553  fScatterP4PID->SetMinimum(0);
554  fOutput->Add(fScatterP4PID);
555 
556  fPtVsY = new TH2F("fPtVsY", "Pt vs Y PPR Sel. Candidates; Pt [GeV/c]; Y",250,0.,25.,300,-3.,3.);
557  fPtVsY->SetMinimum(0);
558  fOutputC->Add(fPtVsY);
559 
560  fPtVsYAll = new TH2F("fPtVsYAll", "Pt vs Y All Candidates; Pt [GeV/c]; Y",250,0.,25.,300,-3.,3.);
561  fPtVsYAll->SetMinimum(0);
562  fOutputC->Add(fPtVsYAll);
563 
564  fEventCounter = new TH1F("fEventCounter", "N° of total events; NA; Events",1,0.,1.);
565  fEventCounter->SetMinimum(0);
566  fOutputC->Add(fEventCounter);
567 
568  fCutDCA = new TH1F("fCutDCA", "DCA of candidate (couple); DCA [cm]; Entries/micron",500,0.,0.05);
569  fCutDCA->SetMinimum(0);
570  fOutputC->Add(fCutDCA);
571 
572  fCutDCA3 = new TH1F("fCutDCA3", "DCA of candidate (trips); DCA [cm]; Entries/micron",500,0.,0.05);
573  fCutDCA3->SetMinimum(0);
574  fOutputC->Add(fCutDCA3);
575 
576  fCutDCA2 = new TH1F("fCutDCA2", "DCA of candidate (quads1); DCA [cm]; Entries/micron",500,0.,0.05);
577  fCutDCA2->SetMinimum(0);
578  fOutputC->Add(fCutDCA2);
579 
580  fCutDCA5 = new TH1F("fCutDCA5", "DCA of candidate (quads2); DCA [cm]; Entries/micron",500,0.,0.05);
581  fCutDCA5->SetMinimum(0);
582  fOutputC->Add(fCutDCA5);
583 
584  fCutVertexDist2 = new TH1F("fCutVertexDist2", "Distance Vtx doubl.-Primary Vtx; Distance [cm]; Entries/15 micron",500,0.,0.75);
585  fCutVertexDist2->SetMinimum(0);
587 
588  fCutVertexDist3 = new TH1F("fCutVertexDist3", "Distance Vtx trips-Primary Vtx; Distance [cm]; Entries/10 micron",500,0.,0.5);
589  fCutVertexDist3->SetMinimum(0);
591 
592  fCutVertexDist4 = new TH1F("fCutVertexDist4", "Distance Vtx quads-Primary Vtx; Distance [cm]; Entries/5 micron",500,0.,0.25);
593  fCutVertexDist4->SetMinimum(0);
595 
596  fCutCosinePoint = new TH1F("fCutCosinePoint", "Cosine of angle of pointing; Cos(Thetapt.); Entries/10^(-3)",250,0.75,1.);
597  fCutCosinePoint->SetMinimum(0);
599 
600  fCutPt = new TH1F("fCutPt", "Pt of candidate D0; Pt [GeV/c]; Entries/5 MeV",3000,0.,15.);
601  fCutPt->SetMinimum(0);
602  fOutputC->Add(fCutPt);
603 
604  fCutY = new TH1F("fCutY", "Y of candidate D0; Pt [GeV/c]; Entries/5 MeV",900,-9.,9.);
605  fCutY->SetMinimum(0);
606  fOutputC->Add(fCutY);
607 
608  fPIDSel = new TH1F("fPIDSel", "Ratio of D0 selected by PID for Correction",3,0.,3.);
609  fPIDSel->SetMinimum(0);
610  fPIDSel->GetXaxis()->SetBinLabel(1,"D0allhyp All");
611  fPIDSel->GetXaxis()->SetBinLabel(2,"D0allhyp PID");
612  fPIDSel->GetXaxis()->SetBinLabel(3,"D0allhyp PID (hypok)");
613 
614  fPIDSelBin1 = new TH1F("fPIDSelBin1", "Ratio of D0 selected by PID for Correction",3,0.,3.);
615  fPIDSelBin1->SetMinimum(0);
616  fPIDSelBin1->GetXaxis()->SetBinLabel(1,"D0allhyp All");
617  fPIDSelBin1->GetXaxis()->SetBinLabel(2,"D0allhyp PID");
618  fPIDSelBin1->GetXaxis()->SetBinLabel(3,"D0allhyp PID (hypok)");
619 
620  fPIDSelBin2 = new TH1F("fPIDSelBin1", "Ratio of D0 selected by PID for Correction",3,0.,3.);
621  fPIDSelBin2->SetMinimum(0);
622  fPIDSelBin2->GetXaxis()->SetBinLabel(1,"D0allhyp All");
623  fPIDSelBin2->GetXaxis()->SetBinLabel(2,"D0allhyp PID");
624  fPIDSelBin2->GetXaxis()->SetBinLabel(3,"D0allhyp PID (hypok)");
625 
626  fPIDSelBin3 = new TH1F("fPIDSelBin1", "Ratio of D0 selected by PID for Correction",3,0.,3.);
627  fPIDSelBin3->SetMinimum(0);
628  fPIDSelBin3->GetXaxis()->SetBinLabel(1,"D0allhyp All");
629  fPIDSelBin3->GetXaxis()->SetBinLabel(2,"D0allhyp PID");
630  fPIDSelBin3->GetXaxis()->SetBinLabel(3,"D0allhyp PID (hypok)");
631 
632  fPIDSelBin4 = new TH1F("fPIDSelBin1", "Ratio of D0 selected by PID for Correction",3,0.,3.);
633  fPIDSelBin4->SetMinimum(0);
634  fPIDSelBin4->GetXaxis()->SetBinLabel(1,"D0allhyp All");
635  fPIDSelBin4->GetXaxis()->SetBinLabel(2,"D0allhyp PID");
636  fPIDSelBin4->GetXaxis()->SetBinLabel(3,"D0allhyp PID (hypok)");
637 
638  fPIDSelBin5 = new TH1F("fPIDSelBin1", "Ratio of D0 selected by PID for Correction",3,0.,3.);
639  fPIDSelBin5->SetMinimum(0);
640  fPIDSelBin5->GetXaxis()->SetBinLabel(1,"D0allhyp All");
641  fPIDSelBin5->GetXaxis()->SetBinLabel(2,"D0allhyp PID");
642  fPIDSelBin5->GetXaxis()->SetBinLabel(3,"D0allhyp PID (hypok)");
643 
644  fMultipleHyps = new TH2F("fMultipleHyps", "N. of hyp. accepted for each candidate (accounted N. times)",8,0.,8.,5,0.,5.);
645  fMultipleHyps->SetMinimum(0);
646  fMultipleHyps->GetXaxis()->SetBinLabel(1,"1 (PPR)");
647  fMultipleHyps->GetXaxis()->SetBinLabel(2,"2 (PPR)");
648  fMultipleHyps->GetXaxis()->SetBinLabel(3,"3 (PPR)");
649  fMultipleHyps->GetXaxis()->SetBinLabel(4,"4 (PPR)");
650  fMultipleHyps->GetXaxis()->SetBinLabel(5,"1 (PPR+PID)");
651  fMultipleHyps->GetXaxis()->SetBinLabel(6,"2 (PPR+PID)");
652  fMultipleHyps->GetXaxis()->SetBinLabel(7,"3 (PPR+PID)");
653  fMultipleHyps->GetXaxis()->SetBinLabel(8,"4 (PPR+PID)");
654  fMultipleHyps->GetYaxis()->SetBinLabel(1,"PtBin 1");
655  fMultipleHyps->GetYaxis()->SetBinLabel(2,"PtBin 2");
656  fMultipleHyps->GetYaxis()->SetBinLabel(3,"PtBin 3");
657  fMultipleHyps->GetYaxis()->SetBinLabel(4,"PtBin 4");
658  fMultipleHyps->GetYaxis()->SetBinLabel(5,"PtBin 5");
659 
660  fMultipleHypsType = new TH2F("fMultipleHypsType", "Type of hyp. accepted for each candidate",8,0.,8.,5,0.,5.);
661  fMultipleHypsType->SetMinimum(0);
662  fMultipleHypsType->GetXaxis()->SetBinLabel(1,"D0");
663  fMultipleHypsType->GetXaxis()->SetBinLabel(2,"D0bar");
664  fMultipleHypsType->GetXaxis()->SetBinLabel(3,"2D0");
665  fMultipleHypsType->GetXaxis()->SetBinLabel(4,"2D0bar");
666  fMultipleHypsType->GetXaxis()->SetBinLabel(5,"D0+D0bar");
667  fMultipleHypsType->GetXaxis()->SetBinLabel(6,"2D0+D0bar");
668  fMultipleHypsType->GetXaxis()->SetBinLabel(7,"D0+2D0bar");
669  fMultipleHypsType->GetXaxis()->SetBinLabel(8,"2D0+2D0bar");
670  fMultipleHypsType->GetYaxis()->SetBinLabel(1,"PtBin 1");
671  fMultipleHypsType->GetYaxis()->SetBinLabel(2,"PtBin 2");
672  fMultipleHypsType->GetYaxis()->SetBinLabel(3,"PtBin 3");
673  fMultipleHypsType->GetYaxis()->SetBinLabel(4,"PtBin 4");
674  fMultipleHypsType->GetYaxis()->SetBinLabel(5,"PtBin 5");
675 
676  fOutputC->Add(fMultipleHyps);
678 
679  fOutputC->Add(fPIDSel);
680  fOutput->Add(fPIDSelBin1);
681  fOutput2->Add(fPIDSelBin2);
682  fOutput3->Add(fPIDSelBin3);
683  fOutput4->Add(fPIDSelBin4);
684  fOutput5->Add(fPIDSelBin5);
685 
686  fPtSel = new TH1F("fPtSel", "Pt of candidates accepted; Pt [GeV/c]; Entries/10 MeV",2000,0.,20.);
687  fPtSel->SetMinimum(0);
688  fOutputC->Add(fPtSel);
689 
690  return;
691 }
692 
693 //________________________________________________________________________
695 {
696  // Execute analysis for current event:
697  // heavy flavor candidates selection and histograms
698 
699  AliAODEvent *aodIn = dynamic_cast<AliAODEvent*> (InputEvent());
700 
701  TClonesArray *inputArrayCharm4Prong = 0;
702 
703  if(!aodIn && AODEvent() && IsStandardAOD()) {
704  // In case there is an AOD handler writing a standard AOD, use the AOD
705  // event in memory rather than the input (ESD) event.
706  aodIn = dynamic_cast<AliAODEvent*> (AODEvent());
707  // in this case the braches in the deltaAOD (AliAOD.VertexingHF.root)
708  // have to taken from the AOD event hold by the AliAODExtension
709  AliAODHandler* aodHandler = (AliAODHandler*)
710  ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
711  if(aodHandler->GetExtensions()) {
712  AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject("AliAOD.VertexingHF.root");
713  AliAODEvent *aodFromExt = ext->GetAOD();
714  // load D0 candidates
715  inputArrayCharm4Prong=(TClonesArray*)aodFromExt->GetList()->FindObject("Charm4Prong");
716  }
717  } else {
718  // load D0 candidates
719  inputArrayCharm4Prong=(TClonesArray*)aodIn->GetList()->FindObject("Charm4Prong");
720  }
721 
722  if(!inputArrayCharm4Prong) {
723  printf("AliAnalysisTaskSESelectHF4Prong::UserExec: D0to3Kpi branch not found!\n");
724  return;
725  }
726 
727  //print event info
728 // aodIn->GetHeader()->Print();
729 
730  //Event counter ++
731  fEventCounter->Fill(0);
732 
733  // fix for temporary bug in ESDfilter
734  // the AODs with null vertex pointer didn't pass the PhysSel
735  if(!aodIn->GetPrimaryVertex()) return;
736 
737  // primary vertex
738  AliAODVertex *vtx1 = (AliAODVertex*)aodIn->GetPrimaryVertex();
739 // vtx1->Print();
740 
741  // make trkIDtoEntry register (temporary)
742  Int_t trkIDtoEntry[100000];
743  for(Int_t it=0;it<aodIn->GetNumberOfTracks();it++) {
744  AliAODTrack *track = aodIn->GetTrack(it);
745  trkIDtoEntry[track->GetID()]=it;
746  }
747 
748  Int_t iOutVerticesHF=0,iOutCharm4Prong=0;
749  fVerticesHFTClArr->Delete();
750  iOutVerticesHF = fVerticesHFTClArr->GetEntriesFast();
751  TClonesArray &verticesHFRef = *fVerticesHFTClArr;
752  fCharm4ProngTClArr->Delete();
753  iOutCharm4Prong = fCharm4ProngTClArr->GetEntriesFast();
754  TClonesArray &aodCharm4ProngRef = *fCharm4ProngTClArr;
755 
756  // loop over D0->K3pi candidates
757  Int_t nInCharm4Prong = inputArrayCharm4Prong->GetEntriesFast();
758  printf("Number of D0->K3pi: %d\n",nInCharm4Prong);
759 
760  for (Int_t iCharm4Prong = 0; iCharm4Prong < nInCharm4Prong; iCharm4Prong++) {
761  AliAODRecoDecayHF4Prong *dIn = (AliAODRecoDecayHF4Prong*)inputArrayCharm4Prong->UncheckedAt(iCharm4Prong);
762  Bool_t unsetvtx=kFALSE;
763 
764  if(!dIn->GetOwnPrimaryVtx()) {
765  dIn->SetOwnPrimaryVtx(vtx1); // needed to compute all variables
766  unsetvtx=kTRUE;
767  }
768 
769  //fill histos of cuts
770  Double_t dca = dIn->GetDCA();
771  Double_t dist2 = dIn->GetDist12toPrim();
772  Double_t dist3 = dIn->GetDist3toPrim();
773  Double_t dist4 = dIn->GetDist4toPrim();
774  Double_t cosine = dIn->CosPointingAngle();
775  Double_t ptPart = dIn->Pt();
776  Double_t yPart = dIn->YD0();
777  Double_t dcatrip = dIn->GetDCA(3);
778  Double_t dcaquad1 = dIn->GetDCA(2);
779  Double_t dcaquad2 = dIn->GetDCA(5);
780 
781  fCutDCA->Fill(dca);
782  fCutDCA3->Fill(dcatrip);
783  fCutDCA2->Fill(dcaquad1);
784  fCutDCA5->Fill(dcaquad2);
785  fCutVertexDist2->Fill(dist2);
786  fCutVertexDist3->Fill(dist3);
787  fCutVertexDist4->Fill(dist4);
788  fCutCosinePoint->Fill(cosine);
789  fCutPt->Fill(ptPart);
790  fCutY->Fill(yPart);
791  fPtVsYAll->Fill(ptPart,yPart);
792 
793  //flags initialization
799  Int_t flagAccLim = 1;
800 
801  //Limited Acceptance
802  if(ptPart > 5.) {
803  if (TMath::Abs(yPart) > 0.8) flagAccLim = 0;
804  }
805  else {
806  Double_t maxFiducialY = -0.2/15*ptPart*ptPart+1.9/15*ptPart+0.5;
807  Double_t minFiducialY = 0.2/15*ptPart*ptPart-1.9/15*ptPart-0.5;
808  if (yPart < minFiducialY || yPart > maxFiducialY) flagAccLim = 0;;
809  }
810 
811  //number of CANDIDATES (regardless of hypotheses) passing PPR
812  if(fSelected==1||fSelected==2||fSelected==3) {
813  fPtVsY->Fill(ptPart,yPart);
814  fPIDSel->Fill(0);
815  if (ptPart >= fPtBinH[0] && ptPart < fPtBinH[1]) fPIDSelBin1->Fill(0);
816  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fPIDSelBin2->Fill(0);
817  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fPIDSelBin3->Fill(0);
818  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fPIDSelBin4->Fill(0);
819  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fPIDSelBin5->Fill(0);
820  }
821 
822  PostData(6,fOutputC);
823 
824  //selection
825  if((fSelected==1||fSelected==2||fSelected==3) && flagAccLim == 1) {
826  // get daughter AOD tracks
827  AliAODTrack *trk0 = (AliAODTrack*)dIn->GetDaughter(0);
828  AliAODTrack *trk1 = (AliAODTrack*)dIn->GetDaughter(1);
829  AliAODTrack *trk2 = (AliAODTrack*)dIn->GetDaughter(2);
830  AliAODTrack *trk3 = (AliAODTrack*)dIn->GetDaughter(3);
831  if(!trk0 || !trk1 || !trk2 || !trk3) {
832  trk0=aodIn->GetTrack(trkIDtoEntry[dIn->GetProngID(0)]);
833  trk1=aodIn->GetTrack(trkIDtoEntry[dIn->GetProngID(1)]);
834  trk2=aodIn->GetTrack(trkIDtoEntry[dIn->GetProngID(2)]);
835  trk3=aodIn->GetTrack(trkIDtoEntry[dIn->GetProngID(3)]);
836  }
837  printf("pt of positive track #1: %f\n",trk0->Pt());
838  printf("pt of negative track #1: %f\n",trk1->Pt());
839  printf("pt of positive track #2: %f\n",trk2->Pt());
840  printf("pt of negative track #2: %f\n",trk3->Pt());
841 
842  dIn->InvMassD0(fmassD0);
843  dIn->InvMassD0bar(fmassD0bar);
844 
845  //fill histos (combining selection form cuts & PID (with rho information))
846  Double_t binPt = -1;
847  Int_t hypD01 = 0, hypD02 = 0, hypD0bar1 = 0, hypD0bar2 = 0;
848  Int_t pid1 = 0, pid2 = 0, pidbar1 = 0, pidbar2 = 0;
849  Int_t pidSelection = fCuts->IsSelectedFromPID(dIn, &pid1, &pid2, &pidbar1, &pidbar2);
850 
851  //number of CANDIDATES (regardless of hypotheses) passing PPR + PID - PAY ATTENTION: hypoth. for PID and PPR may not be the same!
852  if (pidSelection > 0) {
853  fPIDSel->Fill(1);
854  if (ptPart >= fPtBinH[0] && ptPart < fPtBinH[1]) {fPIDSelBin1->Fill(1); binPt = 0;}
855  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) {fPIDSelBin2->Fill(1); binPt = 1;}
856  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) {fPIDSelBin3->Fill(1); binPt = 2;}
857  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) {fPIDSelBin4->Fill(1); binPt = 3;}
858  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) {fPIDSelBin5->Fill(1); binPt = 4;}
859  }
860 
861  //number of hypoteses accepted per candidate after PPR
862  if(selD01+selD02+selD0bar1+selD0bar2 == 1) fMultipleHyps->Fill((Double_t)0,binPt);
863  if(selD01+selD02+selD0bar1+selD0bar2 == 2) fMultipleHyps->Fill((Double_t)1,binPt);
864  if(selD01+selD02+selD0bar1+selD0bar2 == 3) fMultipleHyps->Fill((Double_t)2,binPt);
865  if(selD01+selD02+selD0bar1+selD0bar2 == 4) fMultipleHyps->Fill((Double_t)3,binPt);
866 
867  //combine PPD + PID cuts
868  if (selD01 == 1 && pid1==1) hypD01 = 1;
869  if (selD02 == 1 && pid2==1) hypD02 = 1;
870  if (selD0bar1 == 1 && pidbar1==1) hypD0bar1 = 1;
871  if (selD0bar2 == 1 && pidbar2==1) hypD0bar2 = 1;
872 
873  //number of CANDIDATES (regardless of hypotheses) passing PPR + PID - PAY ATTENTION: hypoth. for PID and PPR must match (at least one)!
874  if (hypD01 == 1 || hypD02 == 1 || hypD0bar1 == 1 || hypD0bar2 == 1) {
875  fPIDSel->Fill(2);
876  if (ptPart >= fPtBinH[0] && ptPart < fPtBinH[1]) {fPIDSelBin1->Fill(2); binPt = 0;}
877  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) {fPIDSelBin2->Fill(2); binPt = 1;}
878  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) {fPIDSelBin3->Fill(2); binPt = 2;}
879  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) {fPIDSelBin4->Fill(2); binPt = 3;}
880  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) {fPIDSelBin5->Fill(2); binPt = 4;}
881  }
882 
883  //number of hypoteses accepted per candidate after PPR and PID
884  if(hypD01+hypD02+hypD0bar1+hypD0bar2 == 1) fMultipleHyps->Fill((Double_t)4,binPt);
885  if(hypD01+hypD02+hypD0bar1+hypD0bar2 == 2) fMultipleHyps->Fill((Double_t)5,binPt);
886  if(hypD01+hypD02+hypD0bar1+hypD0bar2 == 3) fMultipleHyps->Fill((Double_t)6,binPt);
887  if(hypD01+hypD02+hypD0bar1+hypD0bar2 == 4) fMultipleHyps->Fill((Double_t)7,binPt);
888 
889  //type of hypoteses accepted per candidate after PPR and PID
890  if(hypD01+hypD02 == 1 && hypD0bar1+hypD0bar2 == 0) fMultipleHypsType->Fill((Double_t)0,binPt);
891  if(hypD01+hypD02 == 0 && hypD0bar1+hypD0bar2 == 1) fMultipleHypsType->Fill((Double_t)1,binPt);
892  if(hypD01+hypD02 == 2 && hypD0bar1+hypD0bar2 == 0) fMultipleHypsType->Fill((Double_t)2,binPt);
893  if(hypD01+hypD02 == 0 && hypD0bar1+hypD0bar2 == 2) fMultipleHypsType->Fill((Double_t)3,binPt);
894  if(hypD01+hypD02 == 1 && hypD0bar1+hypD0bar2 == 1) fMultipleHypsType->Fill((Double_t)4,binPt);
895  if(hypD01+hypD02 == 2 && hypD0bar1+hypD0bar2 == 1) fMultipleHypsType->Fill((Double_t)5,binPt);
896  if(hypD01+hypD02 == 1 && hypD0bar1+hypD0bar2 == 2) fMultipleHypsType->Fill((Double_t)6,binPt);
897  if(hypD01+hypD02 == 2 && hypD0bar1+hypD0bar2 == 2) fMultipleHypsType->Fill((Double_t)7,binPt);
898 
899  //Call function for reflection analysis
900  if (hypD01+hypD02+hypD0bar1+hypD0bar2 > 0) AnalysisReflection(aodIn, dIn, hypD01, hypD02, hypD0bar1, hypD0bar2);
901 
902  //All histos are filled if Pt of candidate is greater than minimum of first bin (in this way: bin1+bin2+...binN = whole)
903  if (ptPart > fPtBinH[0]) {
904 
905  // D01 hyp.
906  if(hypD01==1) {
907  fPtSel->Fill(ptPart);
908  fScatterP4PID->Fill(trk1->Pt(),trk3->Pt());
909  if (ptPart < fPtBinH[1]) {fhInvMassD0Sum10MevBin1->Fill(fmassD0[0]);
912  fhInvMassSumAll5MevBin1->Fill(fmassD0[0]);}
913  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) {fhInvMassD0Sum10MevBin2->Fill(fmassD0[0]);
916  fhInvMassSumAll5MevBin2->Fill(fmassD0[0]);}
917  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) {fhInvMassD0Sum10MevBin3->Fill(fmassD0[0]);
920  fhInvMassSumAll5MevBin3->Fill(fmassD0[0]);}
921  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) {fhInvMassD0Sum10MevBin4->Fill(fmassD0[0]);
924  fhInvMassSumAll5MevBin4->Fill(fmassD0[0]);}
925  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) {fhInvMassD0Sum10MevBin5->Fill(fmassD0[0]);
928  fhInvMassSumAll5MevBin5->Fill(fmassD0[0]);}
929  }
930  // D02 hyp.
931  if(hypD02==1) {
932  fPtSel->Fill(ptPart);
933  fScatterP4PID->Fill(trk3->Pt(),trk1->Pt());
934  if (ptPart < fPtBinH[1]) {fhInvMassD0Sum10MevBin1->Fill(fmassD0[1]);
937  fhInvMassSumAll5MevBin1->Fill(fmassD0[1]);}
938  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) {fhInvMassD0Sum10MevBin2->Fill(fmassD0[1]);
941  fhInvMassSumAll5MevBin2->Fill(fmassD0[1]);}
942  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) {fhInvMassD0Sum10MevBin3->Fill(fmassD0[1]);
945  fhInvMassSumAll5MevBin3->Fill(fmassD0[1]);}
946  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) {fhInvMassD0Sum10MevBin4->Fill(fmassD0[1]);
949  fhInvMassSumAll5MevBin4->Fill(fmassD0[1]);}
950  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) {fhInvMassD0Sum10MevBin5->Fill(fmassD0[1]);
953  fhInvMassSumAll5MevBin5->Fill(fmassD0[1]);}
954  }
955  // D0bar1 hyp.
956  if(hypD0bar1==1) {
957  fPtSel->Fill(ptPart);
958  fScatterP4PID->Fill(trk0->Pt(),trk2->Pt());
959  if (ptPart < fPtBinH[1]) {fhInvMassD0barSum10MevBin1->Fill(fmassD0bar[0]);
963  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) {fhInvMassD0barSum10MevBin2->Fill(fmassD0bar[0]);
967  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) {fhInvMassD0barSum10MevBin3->Fill(fmassD0bar[0]);
971  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) {fhInvMassD0barSum10MevBin4->Fill(fmassD0bar[0]);
975  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) {fhInvMassD0barSum10MevBin5->Fill(fmassD0bar[0]);
979  }
980  // D0bar2 hyp.
981  if(hypD0bar2==1) {
982  fPtSel->Fill(ptPart);
983  fScatterP4PID->Fill(trk2->Pt(),trk0->Pt());
984  if (ptPart < fPtBinH[1]) {fhInvMassD0barSum10MevBin1->Fill(fmassD0bar[1]);
988  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) {fhInvMassD0barSum10MevBin2->Fill(fmassD0bar[1]);
992  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) {fhInvMassD0barSum10MevBin3->Fill(fmassD0bar[1]);
996  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) {fhInvMassD0barSum10MevBin4->Fill(fmassD0bar[1]);
1000  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) {fhInvMassD0barSum10MevBin5->Fill(fmassD0bar[1]);
1003  fhInvMassSumAll5MevBin5->Fill(fmassD0bar[1]);}
1004  }
1005  }
1006  PostData(1,fOutput);
1007  PostData(2,fOutput2);
1008  PostData(3,fOutput3);
1009  PostData(4,fOutput4);
1010  PostData(5,fOutput5);
1011 
1012  // HERE ONE COULD RECALCULATE THE VERTEX USING THE KF PACKAGE
1013 
1014  // clone candidate for output AOD
1015  if(hypD01||hypD02||hypD0bar1||hypD0bar2) {
1016  AliAODVertex *v = new(verticesHFRef[iOutVerticesHF++])
1017  AliAODVertex(*(dIn->GetSecondaryVtx()));
1018  AliAODRecoDecayHF4Prong *dOut=new(aodCharm4ProngRef[iOutCharm4Prong++])
1020  dOut->SetSecondaryVtx(v);
1021  dOut->SetOwnPrimaryVtx((AliAODVertex*)((dIn->GetOwnPrimaryVtx())->Clone()));
1022  v->SetParent(dOut);
1023  }
1024  }
1025  if(unsetvtx) dIn->UnsetOwnPrimaryVtx();
1026  } // end loop on D0->K3pi
1027 
1028  printf("Number of selected D0->K3pi: %d\n",iOutCharm4Prong);
1029 
1030  return;
1031 }
1032 
1033 //________________________________________________________________________
1035 {
1036  /*
1037  ---STUDY OF REFLECTIONS ON CANDIDATE IN ANALYSIS---
1038  Layers of TH2F fhRefl:
1039  0 = all candidates, single hyps selected only;
1040  1 = all candidates, multi hyps selected only;
1041  2 = true D0/D0bar only, all hypotheses selected;
1042  3 = true D0/D0bar only, single hyps selected only; -> I assume that the unique selected hypotesis is the right one!
1043  4 = true D0/D0bar only, multi hyps selected only;
1044  5 = true D0/D0bar only, multi TRUE hyps selected only;
1045  6 = true D0/D0bar only, multi FAKE hyps selected only;
1046  7 = false D0/D0bar only (background)
1047  Layers of TH2F fhReflD0 (idem for D0bar, inverting particles):
1048  0 = true D0 only, true hypothesis for both single and multi hyps cases;
1049  1 = true D0 only, true hypothesis for single hyps case only; -> I assume that the unique selected hypotesis is the right one!
1050  2 = true D0 only, true hypothesis for multi hyps case only;
1051  3 = true D0 only, other D0 wrong hypothesis (multi case, obviously);
1052  4 = true D0 only, D0bar1 wrong hypothesis (multi case, obviously);
1053  5 = true D0 only, D0bar2 wrong hypothesis (multi case, obviously);
1054  6 = true D0 only, D0bar1 + D0bar2 wrong hypotheses
1055  */
1056 
1057  Int_t flagMult = hypD01+hypD02+hypD0bar1+hypD0bar2; //single or multi hyps selected
1058  Int_t flagLayer1 = -1, flagLayer2 = -1, flagLayer3 = -1, flagLayer4 = -1; //to select layers in fhRefl
1059 
1060  if (flagMult == 1) {flagLayer1 = 0; flagLayer2 = 0; flagLayer3 = 0; flagLayer4 = 0;}
1061  else if (flagMult == 2 || flagMult == 3 || flagMult == 4) {flagLayer1 = 1; flagLayer2 = 1; flagLayer3 = 1; flagLayer4 = 1;}
1062 
1063  FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, flagLayer1, flagLayer2, flagLayer3, flagLayer4); //Fill layers 0 and 1
1064 
1065  if (fMCTruth==0) return;
1066 
1067  //start of MC Truth phase
1068  TClonesArray* mcArray = dynamic_cast<TClonesArray*>(aodIn->FindListObject(AliAODMCParticle::StdBranchName()));
1069  if (!mcArray) {
1070  AliError("Could not find Monte-Carlo in AOD");
1071  return;}
1072 
1073  Int_t pdgCand = 421;
1074  Int_t pdgDgCharm4Prong[4]={321,211,211,211}; //pdg of daughters
1075 
1076  Int_t mcLabel = d->MatchToMC(pdgCand,mcArray,4,pdgDgCharm4Prong); //selection of true or false candidate (regardless of hypothesis) through MCtruth
1077  printf("MatchToMC = %d\n",mcLabel);
1078 
1079  if (mcLabel==-1) { //fill layer 7 (background)
1080  FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 7, 7, 7, 7);
1081  return;}
1082 
1083  FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 2, 2, 2, 2); //fill layer 2 (true D0/D0bar)
1084 
1085  Int_t truthHyp = StudyMCTruth(mcArray, d); //calls function which studies which hypothesis is true for candidate
1086 
1087  if (flagMult == 1) { //fill layer 3 (true D0/D0bar - single hyps only)
1088  FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 3, 3, 3, 3);
1089  switch(truthHyp) { //fills fhReflD0 and fhReflD0bar with layers containing all true D0 or D0bars, for single and all hypotheses (layers 1, 0)
1090  case(1): FillReflD0Histos(d, hypD01, 0, 0, 0, 0, 0, 0, 0);
1091  FillReflD0Histos(d, hypD01, 0, 0, 0, 1, 1, 1, 1); //here I discard the cases in which only a wrong hyp is selected (very very few)
1092  break;
1093  case(2): FillReflD0Histos(d, 0, hypD02, 0, 0, 0, 0, 0, 0);
1094  FillReflD0Histos(d, 0, hypD02, 0, 0, 1, 1, 1, 1);
1095  break;
1096  case(3): FillReflD0barHistos(d, 0, 0, hypD0bar1, 0, 0, 0, 0, 0);
1097  FillReflD0barHistos(d, 0, 0, hypD0bar1, 0, 1, 1, 1, 1);
1098  break;
1099  case(4): FillReflD0barHistos(d, 0, 0, 0, hypD0bar2, 0, 0, 0, 0);
1100  FillReflD0barHistos(d, 0, 0, 0, hypD0bar2, 1, 1, 1, 1);
1101  break;
1102  }
1103  }
1104  else {
1105  flagLayer1 = 6; flagLayer2 = 6; flagLayer3 = 6; flagLayer4 = 6;
1106  switch(truthHyp) { //fills fhReflD0 and fhReflD0bar with layers containing all true D0 or D0bars, for multi and all hypotheses (layers 2, 0)
1107  case(1): FillReflD0Histos(d, hypD01, 0, 0, 0, 0, 0, 0, 0);
1108  FillReflD0Histos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 2, 3, 4, 5);
1109  FillReflD0Histos(d, 0, 0, hypD0bar1, hypD0bar2, 2, 3, 6, 6); //merge of opposite particle hyps (D0bar) in layer 6
1110  flagLayer1 = 5;
1111  break;
1112  case(2): FillReflD0Histos(d, 0, hypD02, 0, 0, 0, 0, 0, 0);
1113  FillReflD0Histos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 3, 2, 4, 5);
1114  FillReflD0Histos(d, 0, 0, hypD0bar1, hypD0bar2, 0, 0, 6, 6); //merge of opposite particle hyps (D0bar) in layer 6
1115  flagLayer2 = 5;
1116  break;
1117  case(3): FillReflD0barHistos(d, 0, 0, hypD0bar1, 0, 0, 0, 0, 0);
1118  FillReflD0barHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 4, 5, 2, 3);
1119  FillReflD0barHistos(d, hypD01, hypD02, 0, 0, 6, 6, 0, 0); //merge of opposite particle hyps (D0) in layer 6
1120  flagLayer3 = 5;
1121  break;
1122  case(4): FillReflD0barHistos(d, 0, 0, 0, hypD0bar2, 0, 0, 0, 0);
1123  FillReflD0barHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 4, 5, 3, 2);
1124  FillReflD0barHistos(d, hypD01, hypD02, 0, 0, 6, 6, 0, 0); //merge of opposite particle hyps (D0) in layer 6
1125  flagLayer4 = 5;
1126  break;
1127  }
1128  FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, flagLayer1, flagLayer2, flagLayer3, flagLayer4); //fill layers 5 and 6 (true and false hyps for multi)
1129  FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 4, 4, 4, 4); //fill layer 4 (true D0/D0bar - multi hyps only)
1130  }
1131 }
1132 
1133 //________________________________________________________________________
1135 {
1136  /*
1137  ---STUDY OF MCTRUTH ON CANDIDATE IN ANALYSIS---
1138  Flag Truth (output):
1139  0 = problems in daughter tracks found
1140  1 = candidate is D01 (piKpipi)
1141  2 = candidate is D02 (pipipiK)
1142  3 = candidate is D0bar1 (Kpipipi)
1143  4 = candidate is D0bar2 (pipiKpi)
1144  */
1145 
1146  Int_t truthHyp = 0;
1147 
1148  AliAODTrack *trk0 = (AliAODTrack*)d->GetDaughter(0);
1149  AliAODTrack *trk1 = (AliAODTrack*)d->GetDaughter(1);
1150  AliAODTrack *trk2 = (AliAODTrack*)d->GetDaughter(2);
1151  AliAODTrack *trk3 = (AliAODTrack*)d->GetDaughter(3);
1152  Int_t labels[4];
1153  Int_t pdg[4];
1154  labels[0] = trk0->GetLabel();
1155  labels[1] = trk1->GetLabel();
1156  labels[2] = trk2->GetLabel();
1157  labels[3] = trk3->GetLabel();
1158  if (labels[0]<=0 || labels[1]<=0 || labels[2]<=0 || labels[3]<=0) {AliWarning("Negative Label for daughter, skipping"); return truthHyp;}
1159  AliAODMCParticle* mc0 = dynamic_cast<AliAODMCParticle*>(mcArray->At(labels[0]));
1160  AliAODMCParticle* mc1 = dynamic_cast<AliAODMCParticle*>(mcArray->At(labels[1]));
1161  AliAODMCParticle* mc2 = dynamic_cast<AliAODMCParticle*>(mcArray->At(labels[2]));
1162  AliAODMCParticle* mc3 = dynamic_cast<AliAODMCParticle*>(mcArray->At(labels[3]));
1163  if (!mc0 || !mc1 || !mc2 || !mc3) {AliWarning("At least one Daughter Particle not found in tree, skipping"); return truthHyp;}
1164  pdg[0] = TMath::Abs(mc0->GetPdgCode());
1165  pdg[1] = TMath::Abs(mc1->GetPdgCode());
1166  pdg[2] = TMath::Abs(mc2->GetPdgCode());
1167  pdg[3] = TMath::Abs(mc3->GetPdgCode());
1168  if (pdg[0]==211 && pdg[1]==321 && pdg[2]==211 && pdg[3]==211) truthHyp = 1;
1169  if (pdg[0]==211 && pdg[1]==211 && pdg[2]==211 && pdg[3]==321) truthHyp = 2;
1170  if (pdg[0]==321 && pdg[1]==211 && pdg[2]==211 && pdg[3]==211) truthHyp = 3;
1171  if (pdg[0]==211 && pdg[1]==211 && pdg[2]==321 && pdg[3]==211) truthHyp = 4;
1172 
1173  return truthHyp;
1174 }
1175 
1176 //________________________________________________________________________
1177 void AliAnalysisTaskSESelectHF4Prong::FillReflHistos(AliAODRecoDecayHF4Prong* d, Int_t hypD01, Int_t hypD02, Int_t hypD0bar1, Int_t hypD0bar2, Int_t flagLayer1, Int_t flagLayer2, Int_t flagLayer3, Int_t flagLayer4)
1178 {
1179 
1180  Double_t ptPart = d->Pt();
1181 
1182  if (ptPart > fPtBinH[0]) {
1183  // D01 hyp.
1184  if(hypD01==1) {
1185  if (ptPart < fPtBinH[1]) fhReflBin1->Fill(fmassD0[0],(double)flagLayer1);
1186  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflBin2->Fill(fmassD0[0],(double)flagLayer1);
1187  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflBin3->Fill(fmassD0[0],(double)flagLayer1);
1188  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflBin4->Fill(fmassD0[0],(double)flagLayer1);
1189  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflBin5->Fill(fmassD0[0],(double)flagLayer1);
1190  }
1191  // D02 hyp.
1192  if(hypD02==1) {
1193  if (ptPart < fPtBinH[1]) fhReflBin1->Fill(fmassD0[1],(double)flagLayer2);
1194  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflBin2->Fill(fmassD0[1],(double)flagLayer2);
1195  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflBin3->Fill(fmassD0[1],(double)flagLayer2);
1196  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflBin4->Fill(fmassD0[1],(double)flagLayer2);
1197  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflBin5->Fill(fmassD0[1],(double)flagLayer2);
1198  }
1199  // D0bar1 hyp.
1200  if(hypD0bar1==1) {
1201  if (ptPart < fPtBinH[1]) fhReflBin1->Fill(fmassD0bar[0],(double)flagLayer3);
1202  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflBin2->Fill(fmassD0bar[0],(double)flagLayer3);
1203  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflBin3->Fill(fmassD0bar[0],(double)flagLayer3);
1204  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflBin4->Fill(fmassD0bar[0],(double)flagLayer3);
1205  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflBin5->Fill(fmassD0bar[0],(double)flagLayer3);
1206  }
1207  // D0bar2 hyp.
1208  if(hypD0bar2==1) {
1209  if (ptPart < fPtBinH[1]) fhReflBin1->Fill(fmassD0bar[1],(double)flagLayer4);
1210  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflBin2->Fill(fmassD0bar[1],(double)flagLayer4);
1211  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflBin3->Fill(fmassD0bar[1],(double)flagLayer4);
1212  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflBin4->Fill(fmassD0bar[1],(double)flagLayer4);
1213  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflBin5->Fill(fmassD0bar[1],(double)flagLayer4);
1214  }
1215  }
1216 
1217 }
1218 
1219 //________________________________________________________________________
1220 void AliAnalysisTaskSESelectHF4Prong::FillReflD0Histos(AliAODRecoDecayHF4Prong* d, Int_t hypD01, Int_t hypD02, Int_t hypD0bar1, Int_t hypD0bar2, Int_t flagLayforD01, Int_t flagLayforD02, Int_t flagLayforD03, Int_t flagLayforD04)
1221 {
1222 
1223  Double_t ptPart = d->Pt();
1224 
1225  if (ptPart > fPtBinH[0]) {
1226  // D01 hyp.
1227  if(hypD01==1) {
1228  if (ptPart < fPtBinH[1]) fhReflD0Bin1->Fill(fmassD0[0],(double)flagLayforD01);
1229  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflD0Bin2->Fill(fmassD0[0],(double)flagLayforD01);
1230  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflD0Bin3->Fill(fmassD0[0],(double)flagLayforD01);
1231  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflD0Bin4->Fill(fmassD0[0],(double)flagLayforD01);
1232  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflD0Bin5->Fill(fmassD0[0],(double)flagLayforD01);
1233  }
1234  // D02 hyp.
1235  if(hypD02==1) {
1236  if (ptPart < fPtBinH[1]) fhReflD0Bin1->Fill(fmassD0[1],(double)flagLayforD02);
1237  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflD0Bin2->Fill(fmassD0[1],(double)flagLayforD02);
1238  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflD0Bin3->Fill(fmassD0[1],(double)flagLayforD02);
1239  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflD0Bin4->Fill(fmassD0[1],(double)flagLayforD02);
1240  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflD0Bin5->Fill(fmassD0[1],(double)flagLayforD02);
1241  }
1242  // D0bar1 hyp.
1243  if(hypD0bar1==1) {
1244  if (ptPart < fPtBinH[1]) fhReflD0Bin1->Fill(fmassD0bar[0],(double)flagLayforD03);
1245  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflD0Bin2->Fill(fmassD0bar[0],(double)flagLayforD03);
1246  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflD0Bin3->Fill(fmassD0bar[0],(double)flagLayforD03);
1247  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflD0Bin4->Fill(fmassD0bar[0],(double)flagLayforD03);
1248  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflD0Bin5->Fill(fmassD0bar[0],(double)flagLayforD03);
1249  }
1250  // D0bar2 hyp.
1251  if(hypD0bar2==1) {
1252  if (ptPart < fPtBinH[1]) fhReflD0Bin1->Fill(fmassD0bar[1],(double)flagLayforD04);
1253  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflD0Bin2->Fill(fmassD0bar[1],(double)flagLayforD04);
1254  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflD0Bin3->Fill(fmassD0bar[1],(double)flagLayforD04);
1255  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflD0Bin4->Fill(fmassD0bar[1],(double)flagLayforD04);
1256  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflD0Bin5->Fill(fmassD0bar[1],(double)flagLayforD04);
1257  }
1258  }
1259 
1260 }
1261 
1262 //________________________________________________________________________
1263 void AliAnalysisTaskSESelectHF4Prong::FillReflD0barHistos(AliAODRecoDecayHF4Prong* d, Int_t hypD01, Int_t hypD02, Int_t hypD0bar1, Int_t hypD0bar2, Int_t flagLayforD0bar1, Int_t flagLayforD0bar2, Int_t flagLayforD0bar3, Int_t flagLayforD0bar4)
1264 {
1265 
1266  Double_t ptPart = d->Pt();
1267 
1268  if (ptPart > fPtBinH[0]) {
1269  // D01 hyp.
1270  if(hypD01==1) {
1271  if (ptPart < fPtBinH[1]) fhReflD0barBin1->Fill(fmassD0[0],(double)flagLayforD0bar1);
1272  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflD0barBin2->Fill(fmassD0[0],(double)flagLayforD0bar1);
1273  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflD0barBin3->Fill(fmassD0[0],(double)flagLayforD0bar1);
1274  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflD0barBin4->Fill(fmassD0[0],(double)flagLayforD0bar1);
1275  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflD0barBin5->Fill(fmassD0[0],(double)flagLayforD0bar1);
1276  }
1277  // D02 hyp.
1278  if(hypD02==1) {
1279  if (ptPart < fPtBinH[1]) fhReflD0barBin1->Fill(fmassD0[1],(double)flagLayforD0bar2);
1280  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflD0barBin2->Fill(fmassD0[1],(double)flagLayforD0bar2);
1281  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflD0barBin3->Fill(fmassD0[1],(double)flagLayforD0bar2);
1282  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflD0barBin4->Fill(fmassD0[1],(double)flagLayforD0bar2);
1283  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflD0barBin5->Fill(fmassD0[1],(double)flagLayforD0bar2);
1284  }
1285  // D0bar1 hyp.
1286  if(hypD0bar1==1) {
1287  if (ptPart < fPtBinH[1]) fhReflD0barBin1->Fill(fmassD0bar[0],(double)flagLayforD0bar3);
1288  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflD0barBin2->Fill(fmassD0bar[0],(double)flagLayforD0bar3);
1289  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflD0barBin3->Fill(fmassD0bar[0],(double)flagLayforD0bar3);
1290  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflD0barBin4->Fill(fmassD0bar[0],(double)flagLayforD0bar3);
1291  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflD0barBin5->Fill(fmassD0bar[0],(double)flagLayforD0bar3);
1292  }
1293  // D0bar2 hyp.
1294  if(hypD0bar2==1) {
1295  if (ptPart < fPtBinH[1]) fhReflD0barBin1->Fill(fmassD0bar[1],(double)flagLayforD0bar4);
1296  else if (ptPart >= fPtBinH[1] && ptPart < fPtBinH[2]) fhReflD0barBin2->Fill(fmassD0bar[1],(double)flagLayforD0bar4);
1297  else if (ptPart >= fPtBinH[2] && ptPart < fPtBinH[3]) fhReflD0barBin3->Fill(fmassD0bar[1],(double)flagLayforD0bar4);
1298  else if (ptPart >= fPtBinH[3] && ptPart < fPtBinH[4]) fhReflD0barBin4->Fill(fmassD0bar[1],(double)flagLayforD0bar4);
1299  else if (ptPart >= fPtBinH[4] && ptPart < fPtBinH[5]) fhReflD0barBin5->Fill(fmassD0bar[1],(double)flagLayforD0bar4);
1300  }
1301  }
1302 
1303 }
1304 
1305 //________________________________________________________________________
1307 {
1308  for(int i=0; i<6; i++) {fPtBinH[i]=ptlimits[i];}
1309 }
1310 
1311 //________________________________________________________________________
1313 {
1314  printf("PtBin limits---------\n");
1315  for (int i=0; i<5; i++) {
1316  printf("Bin %d = %.1f to %.1f\n",i+1,fPtBinH[i],fPtBinH[i+1]);
1317  }
1318  printf("MC Truth = %d\n",fMCTruth);
1319  printf("---------------------\n");
1320 }
1321 
1322 //________________________________________________________________________
1324 {
1325  // Terminate analysis
1326  //
1327 
1328 /*
1329  Double_t entries[10] = {0,0,0,0,0,0,0,0,0,0};
1330  for(int i=1;i<=fhReflD0Bin1->GetNbinsX();i++) {
1331  for(int j=1;j<=fhReflD0Bin1->GetNbinsY();j++) {
1332  entries[0] += fhReflD0Bin1->GetBinContent(i,j);
1333  entries[1] += fhReflD0Bin2->GetBinContent(i,j);
1334  entries[2] += fhReflD0Bin3->GetBinContent(i,j);
1335  entries[3] += fhReflD0Bin4->GetBinContent(i,j);
1336  entries[4] += fhReflD0Bin5->GetBinContent(i,j);
1337  entries[5] += fhReflD0barBin1->GetBinContent(i,j);
1338  entries[6] += fhReflD0barBin2->GetBinContent(i,j);
1339  entries[7] += fhReflD0barBin3->GetBinContent(i,j);
1340  entries[8] += fhReflD0barBin4->GetBinContent(i,j);
1341  entries[9] += fhReflD0barBin5->GetBinContent(i,j);
1342  }
1343  }
1344  fhReflD0Bin1->SetEntries(entries[0]);
1345  fhReflD0Bin2->SetEntries(entries[1]);
1346  fhReflD0Bin3->SetEntries(entries[2]);
1347  fhReflD0Bin4->SetEntries(entries[3]);
1348  fhReflD0Bin5->SetEntries(entries[4]);
1349  fhReflD0barBin1->SetEntries(entries[5]);
1350  fhReflD0barBin2->SetEntries(entries[6]);
1351  fhReflD0barBin3->SetEntries(entries[7]);
1352  fhReflD0barBin4->SetEntries(entries[8]);
1353  fhReflD0barBin5->SetEntries(entries[9]);*/
1354 
1355  if(fDebug > 1) printf("AnalysisTaskSESelectHF4Prong: Terminate() \n");
1356 
1357  fOutput = dynamic_cast<TList*> (GetOutputData(1));
1358  if (!fOutput) {
1359  printf("ERROR: fOutput not available\n");
1360  return;
1361  }
1362  fOutput2 = dynamic_cast<TList*> (GetOutputData(2));
1363  if (!fOutput2) {
1364  printf("ERROR: fOutput not available\n");
1365  return;
1366  }
1367  fOutput3 = dynamic_cast<TList*> (GetOutputData(3));
1368  if (!fOutput3) {
1369  printf("ERROR: fOutput not available\n");
1370  return;
1371  }
1372  fOutput4 = dynamic_cast<TList*> (GetOutputData(4));
1373  if (!fOutput4) {
1374  printf("ERROR: fOutput not available\n");
1375  return;
1376  }
1377  fOutput5 = dynamic_cast<TList*> (GetOutputData(5));
1378  if (!fOutput5) {
1379  printf("ERROR: fOutput not available\n");
1380  return;
1381  }
1382  fOutputC = dynamic_cast<TList*> (GetOutputData(6));
1383  if (!fOutputC) {
1384  printf("ERROR: fOutputC not available\n");
1385  return;
1386  }
1387 
1388  fhInvMassD0Sum10MevBin1 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum10MevBin1"));
1389  fhInvMassD0barSum10MevBin1 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum10MevBin1"));
1390  fhInvMassSumAll10MevBin1 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll10MevBin1"));
1391  fhInvMassD0Sum5MevBin1 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum5MevBin1"));
1392  fhInvMassD0barSum5MevBin1 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum5MevBin1"));
1393  fhInvMassSumAll5MevBin1 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll5MevBin1"));
1394  fhInvMassD0Sum10MevBin2 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum10MevBin2"));
1395  fhInvMassD0barSum10MevBin2 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum10MevBin2"));
1396  fhInvMassSumAll10MevBin2 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll10MevBin2"));
1397  fhInvMassD0Sum5MevBin2 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum5MevBin2"));
1398  fhInvMassD0barSum5MevBin2 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum5MevBin2"));
1399  fhInvMassSumAll5MevBin2 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll5MevBin2"));
1400  fhInvMassD0Sum10MevBin3 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum10MevBin3"));
1401  fhInvMassD0barSum10MevBin3 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum10MevBin3"));
1402  fhInvMassSumAll10MevBin3 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll10MevBin3"));
1403  fhInvMassD0Sum5MevBin3 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum5MevBin3"));
1404  fhInvMassD0barSum5MevBin3 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum5MevBin3"));
1405  fhInvMassSumAll5MevBin3 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll5MevBin3"));
1406  fhInvMassD0Sum10MevBin4 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum10MevBin4"));
1407  fhInvMassD0barSum10MevBin4 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum10MevBin4"));
1408  fhInvMassSumAll10MevBin4 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll10MevBin4"));
1409  fhInvMassD0Sum5MevBin4 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum5MevBin4"));
1410  fhInvMassD0barSum5MevBin4 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum5MevBin4"));
1411  fhInvMassSumAll5MevBin4 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll5MevBin4"));
1412  fhInvMassD0Sum10MevBin5 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum10MevBin5"));
1413  fhInvMassD0barSum10MevBin5 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum10MevBin5"));
1414  fhInvMassSumAll10MevBin5 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll10MevBin5"));
1415  fhInvMassD0Sum5MevBin5 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0Sum5MevBin5"));
1416  fhInvMassD0barSum5MevBin5 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassD0barSum5MevBin5"));
1417  fhInvMassSumAll5MevBin5 = dynamic_cast<TH1F*>(fOutput->FindObject("fhInvMassSumAll5MevBin5"));
1418 
1419  fScatterP4PID = dynamic_cast<TH2F*>(fOutput->FindObject("fScatterP4PID"));
1420  fPtVsY = dynamic_cast<TH2F*>(fOutputC->FindObject("fPtVsY"));
1421  fPtVsYAll = dynamic_cast<TH2F*>(fOutputC->FindObject("fPtVsYAll"));
1422 
1423  fEventCounter = dynamic_cast<TH1F*>(fOutputC->FindObject("fEventCounter"));
1424 
1425  fCutDCA = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutDCA"));
1426  fCutDCA3 = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutDCA3"));
1427  fCutDCA2 = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutDCA2"));
1428  fCutDCA5 = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutDCA5"));
1429  fCutVertexDist2 = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutVertexDist2"));
1430  fCutVertexDist3 = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutVertexDist3"));
1431  fCutVertexDist4 = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutVertexDist4"));
1432  fCutCosinePoint = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutCosinePoint"));
1433 
1434  fCutPt = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutPt"));
1435  fCutY = dynamic_cast<TH1F*>(fOutputC->FindObject("fCutY"));
1436  fPIDSel = dynamic_cast<TH1F*>(fOutputC->FindObject("fPIDSel"));
1437  fPIDSelBin1 = dynamic_cast<TH1F*>(fOutputC->FindObject("fPIDSelBin1"));
1438  fPIDSelBin2 = dynamic_cast<TH1F*>(fOutputC->FindObject("fPIDSelBin2"));
1439  fPIDSelBin3 = dynamic_cast<TH1F*>(fOutputC->FindObject("fPIDSelBin3"));
1440  fPIDSelBin4 = dynamic_cast<TH1F*>(fOutputC->FindObject("fPIDSelBin4"));
1441  fPIDSelBin5 = dynamic_cast<TH1F*>(fOutputC->FindObject("fPIDSelBin5"));
1442 }
1443 
void FillReflHistos(AliAODRecoDecayHF4Prong *d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayer1, Int_t flagLayer2, Int_t flagLayer3, Int_t flagLayer4)
virtual void UserCreateOutputObjects()
Implementation of interface methods.
TH1F * fCutCosinePoint
! Cosine of pointing angle
Int_t pdg
TH1F * fhInvMassD0barSum10MevBin5
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
TH1F * fhInvMassSumAll5MevBin5
! Invariant mass superimpose (good hyp only) 5Mev
double Double_t
Definition: External.C:58
TH1F * fhInvMassSumAll10MevBin3
! Invariant mass superimpose (good hyp only) 10Mev
Definition: External.C:236
virtual Int_t D01Selected(TObject *obj, Int_t selectionLevel)
TH1F * fCutVertexDist2
! Vertex doubl. to primary distance
TH1F * fhInvMassD0barSum10MevBin1
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
TH1F * fhInvMassD0Sum5MevBin3
! Invariant mass D01+D02 (good hyp) 5Mev
virtual Int_t IsSelectedFromPID(AliAODRecoDecayHF4Prong *d, Int_t *hyp1, Int_t *hyp2, Int_t *hyp3, Int_t *hyp4)
TH1F * fhInvMassD0Sum10MevBin5
! Invariant mass D01+D02 (good hyp) 10Mev BIN5
TH1F * fhInvMassSumAll10MevBin2
! Invariant mass superimpose (good hyp only) 10Mev
TH1F * fhInvMassD0Sum10MevBin3
! Invariant mass D01+D02 (good hyp) 10Mev BIN3
TH2F * fhReflD0Bin4
! Analysis for reflection - D0 study - Bin4
Double_t fmassD0bar[2]
!To store invariant mass for D0bar hypotheses
virtual Int_t D0bar1Selected(TObject *obj, Int_t selectionLevel)
TH1F * fhInvMassD0barSum10MevBin2
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
TList * fOutput4
! list send on output slot 4
void AnalysisReflection(AliAODEvent *aodIn, AliAODRecoDecayHF4Prong *d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04)
TH1F * fhInvMassD0Sum10MevBin4
! Invariant mass D01+D02 (good hyp) 10Mev BIN4
TH1F * fPtSel
! Pt of selected candidates
TList * fOutputC
! list send on output slot 6
TList * fOutput3
! list send on output slot 3
TH1F * fhInvMassD0Sum5MevBin4
! Invariant mass D01+D02 (good hyp) 5Mev
void InvMassD0(Double_t mD0[2]) const
virtual Int_t D02Selected(TObject *obj, Int_t selectionLevel)
TH1F * fhInvMassD0Sum10MevBin2
! Invariant mass D01+D02 (good hyp) 10Mev BIN2
TH1F * fhInvMassD0barSum5MevBin4
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TH2F * fMultipleHypsType
! Multiple hypotesis accepted counter
TH1F * fhInvMassD0Sum10MevBin1
! Invariant mass D01+D02 (good hyp) 10Mev BIN1
int Int_t
Definition: External.C:63
Double_t fmassD0[2]
bin i has pt between values i and i+1
TList * fOutput2
! list send on output slot 2
TH1F * fCutVertexDist3
! Vertex trips to primary distance
TH1F * fhInvMassD0barSum5MevBin2
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TH2F * fhReflD0barBin3
! Analysis for reflection - D0bar study - Bin3
TH2F * fPtVsY
! Pt vs Y of selected candidates (by PPR cuts)
TH2F * fhReflD0Bin2
! Analysis for reflection - D0 study - Bin2
Int_t fSelected
!Flag for selection of candidate
TH1F * fhInvMassD0Sum5MevBin5
! Invariant mass D01+D02 (good hyp) 5Mev
TH2F * fhReflD0Bin3
! Analysis for reflection - D0 study - Bin3
TH1F * fhInvMassSumAll5MevBin1
! Invariant mass superimpose (good hyp only) 5Mev
TH1F * fhInvMassSumAll5MevBin2
! Invariant mass superimpose (good hyp only) 5Mev
TH1F * fhInvMassD0barSum10MevBin4
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
AliAODVertex * GetOwnPrimaryVtx() const
Int_t StudyMCTruth(TClonesArray *mcArray, AliAODRecoDecayHF4Prong *d)
void InvMassD0bar(Double_t mD0bar[2]) const
TH2F * fMultipleHyps
! Multiple hypotesis accepted counter
TH1F * fhInvMassD0Sum5MevBin2
! Invariant mass D01+D02 (good hyp) 5Mev
UShort_t GetProngID(Int_t ip) const
TH2F * fhReflD0barBin1
! Analysis for reflection - D0bar study - Bin1
TH2F * fhReflD0Bin5
! Analysis for reflection - D0 study - Bin5
void FillReflD0barHistos(AliAODRecoDecayHF4Prong *d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayforD0bar_1, Int_t flagLayforD0bar_2, Int_t flagLayforD0bar_3, Int_t flagLayforD0bar_4)
virtual Int_t D0bar2Selected(TObject *obj, Int_t selectionLevel)
TH1F * fhInvMassSumAll5MevBin4
! Invariant mass superimpose (good hyp only) 5Mev
TH2F * fhReflBin5
! Analysis for reflection - Bin5
TH1F * fhInvMassSumAll10MevBin1
! Invariant mass superimpose (good hyp only) 10Mev
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
TH2F * fhReflD0barBin5
! Analysis for reflection - D0bar study - Bin5
TList * fOutput5
! list send on output slot 5
TClonesArray * fVerticesHFTClArr
! Array of heavy-flavour vertices
TH2F * fhReflBin2
! Analysis for reflection - Bin2
TH1F * fhInvMassD0barSum10MevBin3
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
TH2F * fhReflBin3
! Analysis for reflection - Bin3
TH1F * fhInvMassSumAll10MevBin4
! Invariant mass superimpose (good hyp only) 10Mev
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
TH1F * fhInvMassSumAll5MevBin3
! Invariant mass superimpose (good hyp only) 5Mev
TH2F * fhReflD0Bin1
! Analysis for reflection - D0 study - Bin1
TH2F * fPtVsYAll
! Pt vs Y of all candidates
void FillReflD0Histos(AliAODRecoDecayHF4Prong *d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayforD0_1, Int_t flagLayforD0_2, Int_t flagLayforD0_3, Int_t flagLayforD0_4)
TH1F * fhInvMassD0barSum5MevBin3
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TH1F * fhInvMassD0Sum5MevBin1
! Invariant mass D01+D02 (good hyp) 5Mev
TH1F * fhInvMassSumAll10MevBin5
! Invariant mass superimpose (good hyp only) 10Mev
TH2F * fhReflBin4
! Analysis for reflection - Bin4
TH1F * fhInvMassD0barSum5MevBin5
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
const char Option_t
Definition: External.C:48
TList * fOutput
flag for MC truth analysis
bool Bool_t
Definition: External.C:53
Double_t CosPointingAngle() const
TH2F * fhReflD0barBin2
! Analysis for reflection - D0bar study - Bin2
TH2F * fhReflBin1
! Analysis for reflection - Bin1
TH1F * fCutVertexDist4
! Vertex quads to primary distance
TH1F * fhInvMassD0barSum5MevBin1
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TClonesArray * fCharm4ProngTClArr
! Array of D0->K3pi
TH2F * fScatterP4PID
! K momentum vs like sign Pi momentum after PID
TH2F * fhReflD0barBin4
! Analysis for reflection - D0bar study - Bin4