AliPhysics  2c6b7ad (2c6b7ad)
AliAnalysisTaskHFSubstructure.cxx
Go to the documentation of this file.
1 /*************************************************************************
2 * Copyright(c) 1998-2016, 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 
16 //C++
17 #include <sstream>
18 #include <array>
19 
20 // Root
21 #include <TClonesArray.h>
22 #include <TDatabasePDG.h>
23 #include <TParticlePDG.h>
24 #include <TVector3.h>
25 #include <THnSparse.h>
26 #include <TParticle.h>
27 #include <TMath.h>
28 #include <THashList.h>
29 #include <TFile.h>
30 #include <TRandom3.h>
31 #include <TGrid.h>
32 
33 
34 // Aliroot general
35 #include "AliLog.h"
36 #include "AliEMCALGeometry.h"
37 #include "AliAnalysisManager.h"
38 #include "AliVEventHandler.h"
39 #include "AliAnalysisDataSlot.h"
40 #include "AliAnalysisDataContainer.h"
41 
42 // Aliroot HF
43 #include "AliAODRecoCascadeHF.h"
45 #include "AliRDHFCutsD0toKpi.h"
48 #include "AliHFTrackContainer.h"
49 #include "AliAnalysisVertexingHF.h"
50 
51 // Aliroot EMCal jet framework
52 #include "AliEmcalJetTask.h"
53 #include "AliEmcalJet.h"
54 #include "AliJetContainer.h"
55 #include "AliParticleContainer.h"
56 #include "AliEmcalParticle.h"
57 #include "AliFJWrapper.h"
58 #include "AliRhoParameter.h"
59 
61 
62 
63 #include "FJ_includes.h"
64 
65 
66 
67 
68 
69 using std::cout;
70 using std::endl;
71 
72 
74 
75 //________________________________________________________________________
78  fJetShapeType(kData),
79  fECandidateType(kD0toKpi),
80  fIncludeInclusive(kFALSE),
81  fIsBDecay(kFALSE),
82  fRejectISR(kFALSE),
83  fPromptReject(kFALSE),
84  fBranchName(0),
85  fCutsFileName(0),
86  fCutsType(0),
87  fCandidatePDG(421),
88  fRejectedOrigin(0),
89  fAcceptedDecay(0),
90  fJetRadius(0.4),
91  fJetMinPt(0.0),
92  fCandidateArray(0),
93  fAodEvent(0),
94  fRDHFCuts(0),
95  fFastJetWrapper(0),
96  fFastJetWrapper_Truth(0),
97  fShapesVar_Splittings_DeltaR(0),
98  fShapesVar_Splittings_DeltaR_Truth(0),
99  fShapesVar_Splittings_Zg(0),
100  fShapesVar_Splittings_Zg_Truth(0),
101 
102  fTreeResponseMatrixAxis(0),
103  fTreeSplittings(0),
104  fhEvent(0x0)
105 
106 {
107  for(Int_t i=0;i<nVar;i++){
108  fShapesVar[i]=0;
109  }
110  SetMakeGeneralHistograms(kTRUE);
111  DefineOutput(1, TList::Class());
112  DefineOutput(2, TTree::Class());
113  DefineOutput(3, TTree::Class());
114 }
115 
116 //________________________________________________________________________
118  AliAnalysisTaskEmcal(name, kTRUE),
119  fJetShapeType(kData),
120  fECandidateType(kD0toKpi),
121  fIncludeInclusive(kFALSE),
122  fIsBDecay(kFALSE),
123  fRejectISR(kFALSE),
124  fPromptReject(kFALSE),
125  fBranchName(0),
126  fCutsFileName(0),
127  fCutsType(0),
128  fCandidatePDG(421),
129  fRejectedOrigin(0),
130  fAcceptedDecay(0),
131  fJetRadius(0.4),
132  fJetMinPt(0.0),
133  fCandidateArray(0),
134  fAodEvent(0),
135  fRDHFCuts(0),
136  fFastJetWrapper(0),
137  fFastJetWrapper_Truth(0),
138  fShapesVar_Splittings_DeltaR(0),
139  fShapesVar_Splittings_DeltaR_Truth(0),
140  fShapesVar_Splittings_Zg(0),
141  fShapesVar_Splittings_Zg_Truth(0),
142 
143  fTreeResponseMatrixAxis(0),
144  fTreeSplittings(0),
145  fhEvent(0x0)
146 {
147  // Standard constructor.
148  for(Int_t i=0;i<nVar;i++){
149  fShapesVar[i]=0;
150  }
152  DefineOutput(1, TList::Class());
153  DefineOutput(2, TTree::Class());
154  DefineOutput(3, TTree::Class());
155 }
156 
157 //________________________________________________________________________
159 {
160  // Destructor.
161 }
162 
163 //________________________________________________________________________
165 {
166  // Create user output.
167 
169 
170  Bool_t oldStatus = TH1::AddDirectoryStatus();
171  TH1::AddDirectory(kFALSE);
172  TH1::AddDirectory(oldStatus);
173  //create a tree used for the MC data and making a 4D response matrix
174 
175 
176 
177  const char* nameoutput = GetOutputSlot(2)->GetContainer()->GetName();
178  fTreeResponseMatrixAxis = new TTree(nameoutput, nameoutput);
179  TString *fShapesVarNames = new TString [nVar];
180  fShapesVarNames[0] = "pT_Jet";
181  fShapesVarNames[1] = "pT_Jet_Truth";
182  fShapesVarNames[2] = "pT_D";
183  fShapesVarNames[3] = "pT_D_Truth";
184  fShapesVarNames[4] = "Inv_M_D";
185  fShapesVarNames[5] = "Inv_M_D_Truth";
186  fShapesVarNames[6] = "Flag_D";
187  fShapesVarNames[7] = "Flag_D_Truth";
188  fShapesVarNames[8] = "Prompt_PDG";
189  fShapesVarNames[9] = "Prompt_PDG_Truth";
190 
191  for(Int_t ivar=0; ivar < nVar; ivar++){
192  cout<<"looping over variables"<<endl;
193  fTreeResponseMatrixAxis->Branch(fShapesVarNames[ivar].Data(), &fShapesVar[ivar], Form("%s/D", fShapesVarNames[ivar].Data()));
194  }
195 
196  const char* nameoutput_Splittings = GetOutputSlot(3)->GetContainer()->GetName();
197  fTreeSplittings = new TTree(nameoutput_Splittings, nameoutput_Splittings);
198  TString *fShapesVarNames_Splittings=new TString[nVar_Splittings];
199  fShapesVarNames_Splittings[0] = "DeltaR";
200  fShapesVarNames_Splittings[1] = "DeltaR_Truth";
201  fShapesVarNames_Splittings[2] = "Zg";
202  fShapesVarNames_Splittings[3] = "Zg_Truth";
203  fShapesVarNames_Splittings[4] = "LeadingSubJetpT";
204  fShapesVarNames_Splittings[5] = "LeadingSubJetpT_Truth";
205  fShapesVarNames_Splittings[6] = "HardestSubJetD0";
206  fShapesVarNames_Splittings[7] = "HardestSubJetD0_Truth";
207  fTreeSplittings->Branch(fShapesVarNames_Splittings[0].Data(), &fShapesVar_Splittings_DeltaR, 0,1);
208  fTreeSplittings->Branch(fShapesVarNames_Splittings[1].Data(), &fShapesVar_Splittings_DeltaR_Truth, 0,1);
209  fTreeSplittings->Branch(fShapesVarNames_Splittings[2].Data(), &fShapesVar_Splittings_Zg, 0,1);
210  fTreeSplittings->Branch(fShapesVarNames_Splittings[3].Data(), &fShapesVar_Splittings_Zg_Truth, 0,1);
211  fTreeSplittings->Branch(fShapesVarNames_Splittings[4].Data(), &fShapesVar_Splittings_LeadingSubJetpT, 0,1);
212  fTreeSplittings->Branch(fShapesVarNames_Splittings[5].Data(), &fShapesVar_Splittings_LeadingSubJetpT_Truth, 0,1);
213  fTreeSplittings->Branch(fShapesVarNames_Splittings[6].Data(), &fShapesVar_Splittings_HardestSubJetD0, 0,1);
214  fTreeSplittings->Branch(fShapesVarNames_Splittings[7].Data(), &fShapesVar_Splittings_HardestSubJetD0_Truth, 0,1);
215 
216 
217  fhEvent=new TH1D("fhEvent","fhEvent",40,-0.5,39.5);
218 
219  PostData(1,fOutput);
220  PostData(2,fTreeResponseMatrixAxis);
221  PostData(3,fTreeSplittings);
222  // delete [] fShapesVarNames;
223 }
224 
225 //________________________________________________________________________
227 {
228  // Run analysis code here, if needed. It will be executed before FillHistograms().
229 
230 
231  return kTRUE;
232 }
233 //________________________________________________________________________
235 {
236 
237 
238  fhEvent->Fill(0);
239  if(fCutsFileName.Contains("alien://")) TGrid::Connect("alien://");
240  TFile* Cuts_File = TFile::Open(fCutsFileName);
241  TString cutsname="D0toKpiCuts";
242  if (fCutsType!="") cutsname += TString::Format("_%s", fCutsType.Data());
243  fRDHFCuts = dynamic_cast<AliRDHFCuts*>(Cuts_File->Get(cutsname));
244 
245 
246  fAodEvent = dynamic_cast<AliAODEvent*>(fInputEvent);
247 
248 
249  fRDHFCuts->IsEventSelected(fAodEvent);
250  fhEvent->Fill(1);
251 
252 
253  fFastJetWrapper->SetAreaType(fastjet::active_area);
254  fFastJetWrapper->SetGhostArea(0.005);
256  fFastJetWrapper->SetAlgorithm(fastjet::antikt_algorithm);
257  fFastJetWrapper->SetRecombScheme(static_cast<fastjet::RecombinationScheme>(0));
258 
259 
260 
261 
263 
264  fCandidateArray = dynamic_cast<TClonesArray*>(fAodEvent->GetList()->FindObject("D0toKpi"));
265 
266  AliHFAODMCParticleContainer *Particle_Container = NULL;
267  if (fJetShapeType != kData) Particle_Container = (AliHFAODMCParticleContainer *) GetParticleContainer(1);
268  // if (!Particle_Container) continue;
269 
270 
271  std::vector<AliAODRecoDecayHF2Prong*> D_Candidates_Vector;
272  D_Candidates_Vector.clear();
273 
274 
275  Int_t N_DMesons=0;
276 
277  for (Int_t i_D = 0; i_D < fCandidateArray->GetEntriesFast(); i_D++) {
278  AliAODRecoDecayHF2Prong* D_Candidate = static_cast<AliAODRecoDecayHF2Prong*>(fCandidateArray->At(i_D));
279  if (!D_Candidate) continue;
280  if (!fRDHFCuts->IsInFiducialAcceptance(D_Candidate->Pt(), D_Candidate->Y(fCandidatePDG))) continue;
281 
282  Int_t Mass_Hypo_Type=fRDHFCuts->IsSelected(D_Candidate, AliRDHFCuts::kAll, fAodEvent);
283  Int_t N_Mass_Hypotheses=1;
284  if (Mass_Hypo_Type <= 0 || Mass_Hypo_Type>3) continue;
285  else if (Mass_Hypo_Type ==3) N_Mass_Hypotheses=2;
286 
287  fhEvent->Fill(2);
288  Int_t Matched_Truth_Particle_PDG=0;
289  Int_t Is_Prompt_Correct_Quark_PDG=-1;
290  if (fJetShapeType != kData){
291 
292 
293  const Int_t D_Candidtae_N_Daughters=2;
294  Int_t D_Candidtae_Daughters_PDG[D_Candidtae_N_Daughters] = {211,321};
295  Int_t D_Candidate_MatchedTruth_Label = D_Candidate->MatchToMC(fCandidatePDG, Particle_Container->GetArray(), D_Candidtae_N_Daughters, D_Candidtae_Daughters_PDG);
296  Bool_t Is_Prompt_Correct_Quark=kFALSE;
297  if (D_Candidate_MatchedTruth_Label >= 0) {
298  AliAODMCParticle* Matched_Truth_Particle = static_cast<AliAODMCParticle*>(Particle_Container->GetArray()->At(D_Candidate_MatchedTruth_Label));
299  if (Matched_Truth_Particle) {
300  fhEvent->Fill(3);
301 
302  Int_t Matched_Truth_Particle_Mother_Label=Matched_Truth_Particle->GetMother();
303  while (Matched_Truth_Particle_Mother_Label >= 0) {
304  AliAODMCParticle* Matched_Truth_Particle_Mother = static_cast<AliAODMCParticle*>(Particle_Container->GetArray()->At(Matched_Truth_Particle_Mother_Label));
305  if (Matched_Truth_Particle_Mother){
306  Int_t Original_Quark_PDG=4;
307  if (fIsBDecay) Original_Quark_PDG=5;
308  if (TMath::Abs(Matched_Truth_Particle_Mother->GetPdgCode())==Original_Quark_PDG) Is_Prompt_Correct_Quark=kTRUE;
309  if (TMath::Abs(Matched_Truth_Particle_Mother->GetPdgCode()) == 4){
310  Is_Prompt_Correct_Quark_PDG=4;
311  fhEvent->Fill(4);
312  }
313  if (TMath::Abs(Matched_Truth_Particle_Mother->GetPdgCode()) == 5){
314  Is_Prompt_Correct_Quark_PDG=5;
315  fhEvent->Fill(5);
316  }
317  if (Matched_Truth_Particle_Mother_Label==Matched_Truth_Particle_Mother->GetMother()) break;
318  Matched_Truth_Particle_Mother_Label=Matched_Truth_Particle_Mother->GetMother();
319  }
320  else break;
321  }
322  Matched_Truth_Particle_PDG = Matched_Truth_Particle->PdgCode();
323  }
324  }
325  else continue;
326  if (fPromptReject && !Is_Prompt_Correct_Quark) continue;
327 
328  //if (TMath::Abs(Matched_Truth_Particle_PDG)!=fCandidatePDG) continue;
329 
330  }
331 
332 
333  Double_t Inv_Mass_D=0.0;
334 
335  if (Mass_Hypo_Type==1){
336  if (fJetShapeType==kData || (fJetShapeType==kDetSignal && Matched_Truth_Particle_PDG==fCandidatePDG) || (fJetShapeType==kDetBackground && Matched_Truth_Particle_PDG!=fCandidatePDG) || (fJetShapeType==kDetReflection && Matched_Truth_Particle_PDG==-fCandidatePDG)){
337  Inv_Mass_D=D_Candidate->InvMassD0();
338  fhEvent->Fill(6);
339  }
340  else{
341  fhEvent->Fill(7);
342  continue;
343  }
344  }
345 
346  if (Mass_Hypo_Type==2){
347  if (fJetShapeType==kData || (fJetShapeType==kDetSignal && Matched_Truth_Particle_PDG==-fCandidatePDG) || (fJetShapeType==kDetBackground && Matched_Truth_Particle_PDG!=-fCandidatePDG) || (fJetShapeType==kDetReflection && Matched_Truth_Particle_PDG==fCandidatePDG)){
348  Inv_Mass_D=D_Candidate->InvMassD0bar();
349  fhEvent->Fill(8);
350  }
351  else{
352  fhEvent->Fill(9);
353  continue;
354  }
355  }
356 
357 
358 
359 
361  fFastJetWrapper->AddInputVector(D_Candidate->Px(), D_Candidate->Py(), D_Candidate->Pz(), D_Candidate->E(), 0);
362 
363  AliHFTrackContainer* Track_Container = (AliHFTrackContainer *) GetTrackContainer(0);
364  if (!Track_Container) continue;
365  Track_Container->SetDMesonCandidate(D_Candidate);
366  AliAODTrack *Track = NULL;
367  for (Int_t i_Track=0; i_Track<Track_Container->GetNTracks(); i_Track++){
368  Track = static_cast<AliAODTrack*>(Track_Container->GetAcceptParticle(i_Track));
369  fFastJetWrapper->AddInputVector(Track->Px(), Track->Py(), Track->Pz(), Track->E(),i_Track+100);
370  }
371  fFastJetWrapper->Run();
372 
373 
374  std::vector<fastjet::PseudoJet> Inclusive_Jets = fFastJetWrapper->GetInclusiveJets();
375  for (UInt_t i_Jet=0; i_Jet < Inclusive_Jets.size(); i_Jet++){
376  Bool_t Is_D_Jet=kFALSE;
377  if (Inclusive_Jets[i_Jet].perp()<fJetMinPt) continue;
378  if (TMath::Abs(Inclusive_Jets[i_Jet].pseudorapidity()) > 0.9-fJetRadius) continue;
379  std::vector<fastjet::PseudoJet> Constituents(fFastJetWrapper->GetJetConstituents(i_Jet));
380  for (UInt_t i_Constituents = 0; i_Constituents < Constituents.size(); i_Constituents++) {
381  if (Constituents[i_Constituents].user_index() == 0) {
382  Is_D_Jet = kTRUE;
383  }
384  }
385 
386 
387  if (!Is_D_Jet) continue;
388  fhEvent->Fill(10);
389 
390  std::vector<Double_t> Splittings_Zg;
391  std::vector<Double_t> Splittings_DeltaR;
392  std::vector<Double_t> Splittings_LeadingSubJetpT;
393  std::vector<Double_t> Splittings_HardestSubJetD0;
394 
395  Bool_t Is_D_SubJet=kFALSE;
396  fastjet::JetDefinition Jet_Definition(fastjet::cambridge_algorithm, fJetRadius*2.5,static_cast<fastjet::RecombinationScheme>(0), fastjet::Best);
397 
398  try{
399  std::vector<fastjet::PseudoJet> Reclustered_Particles(fFastJetWrapper->GetJetConstituents(i_Jet));
400  fastjet::ClusterSequence Cluster_Sequence_CA(Reclustered_Particles, Jet_Definition);
401  std::vector<fastjet::PseudoJet> Reclustered_Jet = Cluster_Sequence_CA.inclusive_jets(0.0);
402  Reclustered_Jet = sorted_by_pt(Reclustered_Jet);
403 
404 
405  fastjet::PseudoJet Daughter_Jet = Reclustered_Jet[0];
406  fastjet::PseudoJet Parent_SubJet_1;
407  fastjet::PseudoJet Parent_SubJet_2;
408 
409  while(Daughter_Jet.has_parents(Parent_SubJet_1,Parent_SubJet_2)){
410  if(Parent_SubJet_1.perp() < Parent_SubJet_2.perp()) std::swap(Parent_SubJet_1,Parent_SubJet_2);
411  Splittings_LeadingSubJetpT.push_back(Parent_SubJet_1.perp());
412  vector < fastjet::PseudoJet > Hard_SubJet_Constituents = sorted_by_pt(Parent_SubJet_1.constituents());
413  Is_D_SubJet=kFALSE;
414  for(UInt_t j=0;j<Hard_SubJet_Constituents.size();j++){
415  if(Hard_SubJet_Constituents[j].user_index()==0) Is_D_SubJet=kTRUE;
416  }
417 
418 
419  if (!Is_D_SubJet) Splittings_HardestSubJetD0.push_back(1.0);
420  else Splittings_HardestSubJetD0.push_back(2.0);
421 
422  // if(!Is_D_SubJet) std::swap(Parent_SubJet_1,Parent_SubJet_2);
423  Splittings_DeltaR.push_back(Parent_SubJet_1.delta_R(Parent_SubJet_2));
424  Splittings_Zg.push_back(Parent_SubJet_2.perp()/(Parent_SubJet_1.perp()+Parent_SubJet_2.perp()));
425  Daughter_Jet=Parent_SubJet_1;
426  }
427 
428 
429  } catch (fastjet::Error) { /*return -1;*/ }
430 
431 
432 
433  for (Int_t i_Mass_Hypotheses=0; i_Mass_Hypotheses<N_Mass_Hypotheses; i_Mass_Hypotheses++){
434 
435 
436  if (Mass_Hypo_Type==3){
437  if(i_Mass_Hypotheses==0){
438  if (fJetShapeType==kData || (fJetShapeType==kDetSignal && Matched_Truth_Particle_PDG==fCandidatePDG) || (fJetShapeType==kDetBackground && Matched_Truth_Particle_PDG!=fCandidatePDG) || (fJetShapeType==kDetReflection && Matched_Truth_Particle_PDG==-fCandidatePDG)){
439  Inv_Mass_D=D_Candidate->InvMassD0();
440  fhEvent->Fill(11);
441  }
442  else{
443  fhEvent->Fill(12);
444  continue;
445  }
446  }
447  if(i_Mass_Hypotheses==1){
448  if (fJetShapeType==kData || (fJetShapeType==kDetSignal && Matched_Truth_Particle_PDG==-fCandidatePDG) || (fJetShapeType==kDetBackground && Matched_Truth_Particle_PDG!=-fCandidatePDG) || (fJetShapeType==kDetReflection && Matched_Truth_Particle_PDG==fCandidatePDG)){
449  Inv_Mass_D=D_Candidate->InvMassD0bar();
450  fhEvent->Fill(13);
451  }
452  else{
453  fhEvent->Fill(14);
454  continue;
455  }
456  }
457  }
458 
459  D_Candidates_Vector.push_back(D_Candidate);
460  if (i_Mass_Hypotheses==0) fhEvent->Fill(15);
461  N_DMesons++;
462 
463  Double_t Flag_D=-1.0;
464  if (Mass_Hypo_Type ==1) Flag_D=1.0;
465  else if (Mass_Hypo_Type ==2) Flag_D=2.0;
466  else if (Mass_Hypo_Type ==3 && i_Mass_Hypotheses==0) Flag_D=3.0;
467  else if (Mass_Hypo_Type ==3 && i_Mass_Hypotheses==1) Flag_D=4.0;
468 
469 
470  fShapesVar[0] = Inclusive_Jets[i_Jet].perp();
471  fShapesVar[1] = 0.0;
472  fShapesVar[2] = D_Candidate->Pt();
473  fShapesVar[3] = 0.0;
474  fShapesVar[4] = Inv_Mass_D;
475  fShapesVar[5] = 0.0;
476  fShapesVar[6] = Flag_D;
477  fShapesVar[7] = 0.0;
478  fShapesVar[8] = Is_Prompt_Correct_Quark_PDG;
479  fShapesVar[9] = 0.0;
480 
481 
482  fShapesVar_Splittings_DeltaR.push_back(Splittings_DeltaR);
483  fShapesVar_Splittings_DeltaR_Truth.push_back(Splittings_DeltaR);
484  fShapesVar_Splittings_Zg.push_back(Splittings_Zg);
485  fShapesVar_Splittings_Zg_Truth.push_back(Splittings_Zg);
486  fShapesVar_Splittings_LeadingSubJetpT.push_back(Splittings_LeadingSubJetpT);
487  fShapesVar_Splittings_LeadingSubJetpT_Truth.push_back(Splittings_LeadingSubJetpT);
488  fShapesVar_Splittings_HardestSubJetD0.push_back(Splittings_HardestSubJetD0);
489  fShapesVar_Splittings_HardestSubJetD0_Truth.push_back(Splittings_HardestSubJetD0);
490 
491 
492  fTreeResponseMatrixAxis->Fill();
493  fTreeSplittings->Fill();
494  }
495  }
496  }
497  if(N_DMesons==0) fhEvent->Fill(16);
498  if(N_DMesons==1) fhEvent->Fill(17);
499  if(N_DMesons==2) fhEvent->Fill(18);
500  if(N_DMesons==3) fhEvent->Fill(19);
501  if(N_DMesons==4) fhEvent->Fill(20);
502  if(N_DMesons==5) fhEvent->Fill(21);
503  if(N_DMesons==6) fhEvent->Fill(22);
504 
505 
506  if (fIncludeInclusive){
508 
509  AliHFTrackContainer* Track_Container = (AliHFTrackContainer *) GetTrackContainer(0);
510  // if (!Track_Container) continue;
511 
512  for (UInt_t i_D_Found=0; i_D_Found<D_Candidates_Vector.size(); i_D_Found++){
513  fFastJetWrapper->AddInputVector(D_Candidates_Vector[i_D_Found]->Px(), D_Candidates_Vector[i_D_Found]->Py(), D_Candidates_Vector[i_D_Found]->Pz(), D_Candidates_Vector[i_D_Found]->E(), i_D_Found);
514  Track_Container->SetDMesonCandidate(D_Candidates_Vector[i_D_Found]);
515  }
516 
517  AliAODTrack *Track = NULL;
518  for (Int_t i_Track=0; i_Track<Track_Container->GetNTracks(); i_Track++){
519  Track = static_cast<AliAODTrack*>(Track_Container->GetAcceptParticle(i_Track));
520  fFastJetWrapper->AddInputVector(Track->Px(), Track->Py(), Track->Pz(), Track->E(),i_Track+100);
521  }
522  fFastJetWrapper->Run();
523  std::vector<fastjet::PseudoJet> Inclusive_Jets = fFastJetWrapper->GetInclusiveJets();
524  for (UInt_t i_Jet=0; i_Jet < Inclusive_Jets.size(); i_Jet++){
525  if (Inclusive_Jets[i_Jet].perp()<fJetMinPt) continue;
526  if (TMath::Abs(Inclusive_Jets[i_Jet].pseudorapidity()) > 0.9-fJetRadius) continue;
527  Bool_t Is_D_Jet = kFALSE;
528  std::vector<fastjet::PseudoJet> Constituents(fFastJetWrapper->GetJetConstituents(i_Jet));
529  for (UInt_t i_Constituents = 0; i_Constituents < Constituents.size(); i_Constituents++) {
530  for (UInt_t i_D_Found=0; i_D_Found<D_Candidates_Vector.size(); i_D_Found++){
531  if (Constituents[i_Constituents].user_index() == i_D_Found) {
532  Is_D_Jet = kTRUE;
533  }
534  }
535  }
536  if (Is_D_Jet) continue;
537  fhEvent->Fill(23);
538  std::vector<Double_t> Splittings_Zg;
539  std::vector<Double_t> Splittings_DeltaR;
540  std::vector<Double_t> Splittings_LeadingSubJetpT;
541  std::vector<Double_t> Splittings_HardestSubJetD0;
542 
543 
544  fastjet::JetDefinition Jet_Definition(fastjet::cambridge_algorithm, fJetRadius*2.5,static_cast<fastjet::RecombinationScheme>(0), fastjet::Best);
545 
546  try{
547  std::vector<fastjet::PseudoJet> Reclustered_Particles(fFastJetWrapper->GetJetConstituents(i_Jet));
548  fastjet::ClusterSequence Cluster_Sequence_CA(Reclustered_Particles, Jet_Definition);
549  std::vector<fastjet::PseudoJet> Reclustered_Jet = Cluster_Sequence_CA.inclusive_jets(0.0);
550  Reclustered_Jet = sorted_by_pt(Reclustered_Jet);
551 
552 
553  fastjet::PseudoJet Daughter_Jet = Reclustered_Jet[0];
554  fastjet::PseudoJet Parent_SubJet_1;
555  fastjet::PseudoJet Parent_SubJet_2;
556 
557  while(Daughter_Jet.has_parents(Parent_SubJet_1,Parent_SubJet_2)){
558  if(Parent_SubJet_1.perp() < Parent_SubJet_2.perp()) std::swap(Parent_SubJet_1,Parent_SubJet_2);
559  Splittings_LeadingSubJetpT.push_back(Parent_SubJet_1.perp());
560  Splittings_HardestSubJetD0.push_back(0.0);
561  Splittings_DeltaR.push_back(Parent_SubJet_1.delta_R(Parent_SubJet_2));
562  Splittings_Zg.push_back(Parent_SubJet_2.perp()/(Parent_SubJet_1.perp()+Parent_SubJet_2.perp()));
563  Daughter_Jet=Parent_SubJet_1;
564  }
565 
566 
567  } catch (fastjet::Error) { /*return -1;*/ }
568 
569 
570 
571  fShapesVar[0] = Inclusive_Jets[i_Jet].perp();
572  fShapesVar[1] = 0.0;
573  fShapesVar[2] = 0.0;
574  fShapesVar[3] = 0.0;
575  fShapesVar[4] = 0.0;
576  fShapesVar[5] = 0.0;
577  fShapesVar[6] = 0.0;
578  fShapesVar[7] = 0.0;
579  fShapesVar[8] = 0.0;
580  fShapesVar[9] = 0.0;
581 
582 
583  fShapesVar_Splittings_DeltaR.push_back(Splittings_DeltaR);
584  fShapesVar_Splittings_DeltaR_Truth.push_back(Splittings_DeltaR);
585  fShapesVar_Splittings_Zg.push_back(Splittings_Zg);
586  fShapesVar_Splittings_Zg_Truth.push_back(Splittings_Zg);
587  fShapesVar_Splittings_LeadingSubJetpT.push_back(Splittings_LeadingSubJetpT);
588  fShapesVar_Splittings_LeadingSubJetpT_Truth.push_back(Splittings_LeadingSubJetpT);
589  fShapesVar_Splittings_HardestSubJetD0.push_back(Splittings_HardestSubJetD0);
590  fShapesVar_Splittings_HardestSubJetD0_Truth.push_back(Splittings_HardestSubJetD0);
591 
592 
593  fTreeResponseMatrixAxis->Fill();
594  fTreeSplittings->Fill();
595 
596  }
597  }
598 
599  }
600 
601 
602 
603  if (fJetShapeType == kTrueDet){
604 
605 
607  Particle_Container->SetSpecialPDG(fCandidatePDG);
608  Particle_Container->SetRejectedOriginMap(fRejectedOrigin);
609  Particle_Container->SetAcceptedDecayMap(fAcceptedDecay);
610  Particle_Container->SetRejectISR(fRejectISR);
611 
612  std::vector<fastjet::PseudoJet> Inclusive_Jets_Truth;
613  std::vector<std::pair<Int_t, Int_t>> Inclusive_Jets_Truth_Labels;
614  std::vector<Int_t> Unmatched_Truth_Level_D;
615  Int_t NMatched_DMeson_Jets=0;
616 
617  if (Particle_Container->IsSpecialPDGFound()){
618 
619  fhEvent->Fill(2);
620 
621  fFastJetWrapper_Truth->SetAreaType(fastjet::active_area);
624  fFastJetWrapper_Truth->SetAlgorithm(fastjet::antikt_algorithm);
625  fFastJetWrapper_Truth->SetRecombScheme(static_cast<fastjet::RecombinationScheme>(0));
627 
628  AliAODMCParticle* Truth_Particle=NULL;
629  Int_t NTruthD=0;
630  for (Int_t i_Particle=0; i_Particle<Particle_Container->GetNParticles(); i_Particle++){
631  Truth_Particle = static_cast<AliAODMCParticle*>(Particle_Container->GetAcceptParticle(i_Particle));
632  if (TMath::Abs(Truth_Particle->PdgCode())==fCandidatePDG){
633  std::pair<Int_t, Int_t> Inclusive_Jet_Truth_Labels;
634  Inclusive_Jet_Truth_Labels.first=Truth_Particle->GetLabel();
635  Inclusive_Jet_Truth_Labels.second=NTruthD;
636  Inclusive_Jets_Truth_Labels.push_back(Inclusive_Jet_Truth_Labels);
637  Unmatched_Truth_Level_D.push_back(NTruthD);
638  fFastJetWrapper_Truth->AddInputVector(Truth_Particle->Px(), Truth_Particle->Py(), Truth_Particle->Pz(), Truth_Particle->E(),NTruthD);
639  NTruthD++;
640  }
641  else fFastJetWrapper_Truth->AddInputVector(Truth_Particle->Px(), Truth_Particle->Py(), Truth_Particle->Pz(), Truth_Particle->E(),i_Particle+100);
642  }
644  Inclusive_Jets_Truth = fFastJetWrapper_Truth->GetInclusiveJets();
645  if (NTruthD==0) fhEvent->Fill(3);
646  if (NTruthD==1) fhEvent->Fill(4);
647  if (NTruthD==2) fhEvent->Fill(5);
648  if (NTruthD==3) fhEvent->Fill(6);
649  if (NTruthD==4) fhEvent->Fill(7);
650  if (NTruthD==5) fhEvent->Fill(8);
651  if (NTruthD==6) fhEvent->Fill(9);
652  }
653 
654 
655 
656 
657 
658  fCandidateArray = dynamic_cast<TClonesArray*>(fAodEvent->GetList()->FindObject("D0toKpi"));
659 
660  for (Int_t i_D = 0; i_D < fCandidateArray->GetEntriesFast(); i_D++) {
661  AliAODRecoDecayHF2Prong* D_Candidate = static_cast<AliAODRecoDecayHF2Prong*>(fCandidateArray->At(i_D));
662  if (!D_Candidate) continue;
663  if (!fRDHFCuts->IsInFiducialAcceptance(D_Candidate->Pt(), D_Candidate->Y(fCandidatePDG))) continue;
664 
665  Int_t Mass_Hypo_Type=fRDHFCuts->IsSelected(D_Candidate, AliRDHFCuts::kAll, fAodEvent);
666  if (Mass_Hypo_Type <= 0 || Mass_Hypo_Type>3) continue;
667  fhEvent->Fill(10);
668 
669  Int_t Matched_Truth_Particle_PDG=0;
670 
671 
672  const Int_t D_Candidtae_N_Daughters=2;
673  Int_t D_Candidtae_Daughters_PDG[D_Candidtae_N_Daughters] = {211,321};
674  Int_t D_Candidate_MatchedTruth_Label = D_Candidate->MatchToMC(fCandidatePDG, Particle_Container->GetArray(), D_Candidtae_N_Daughters, D_Candidtae_Daughters_PDG);
675  Bool_t Is_Prompt_Correct_Quark=kFALSE;
676  Int_t Is_Prompt_Correct_Quark_PDG=-1;
677  AliAODMCParticle* Matched_Truth_Particle;
678  if (D_Candidate_MatchedTruth_Label >= 0) {
679  Matched_Truth_Particle = static_cast<AliAODMCParticle*>(Particle_Container->GetArray()->At(D_Candidate_MatchedTruth_Label));
680  if (Matched_Truth_Particle) {
681  fhEvent->Fill(11);
682 
683  Int_t Matched_Truth_Particle_Mother_Label=Matched_Truth_Particle->GetMother();
684  while (Matched_Truth_Particle_Mother_Label >= 0) {
685  AliAODMCParticle* Matched_Truth_Particle_Mother = static_cast<AliAODMCParticle*>(Particle_Container->GetArray()->At(Matched_Truth_Particle_Mother_Label));
686  if (Matched_Truth_Particle_Mother){
687  Int_t Original_Quark_PDG=4;
688  if (fIsBDecay) Original_Quark_PDG=5;
689  if (TMath::Abs(Matched_Truth_Particle_Mother->GetPdgCode()) == 4){
690  fhEvent->Fill(12);
691  Is_Prompt_Correct_Quark_PDG=4;
692  }
693  if (TMath::Abs(Matched_Truth_Particle_Mother->GetPdgCode()) == 5){
694  fhEvent->Fill(13);
695  Is_Prompt_Correct_Quark_PDG=5;
696  }
697  if (TMath::Abs(Matched_Truth_Particle_Mother->GetPdgCode())==Original_Quark_PDG) Is_Prompt_Correct_Quark=kTRUE;
698  if (Matched_Truth_Particle_Mother_Label==Matched_Truth_Particle_Mother->GetMother()) break;
699  Matched_Truth_Particle_Mother_Label=Matched_Truth_Particle_Mother->GetMother();
700  }
701  else break;
702  }
703  Matched_Truth_Particle_PDG = Matched_Truth_Particle->PdgCode();
704  }
705  }
706  else continue;
707  if (fPromptReject && !Is_Prompt_Correct_Quark) continue;
708 
709 
710  if (Mass_Hypo_Type==1 && Matched_Truth_Particle_PDG!=fCandidatePDG){
711  fhEvent->Fill(14);
712  continue;
713  }
714  else fhEvent->Fill(15);
715  if (Mass_Hypo_Type==2 && Matched_Truth_Particle_PDG!=-fCandidatePDG){
716  fhEvent->Fill(16);
717  continue;
718  }
719  else fhEvent->Fill(17);
720  if (Mass_Hypo_Type==3 && TMath::Abs(Matched_Truth_Particle_PDG)!=fCandidatePDG){
721  fhEvent->Fill(18);
722  continue;
723  }
724  else{
725  fhEvent->Fill(19);
726  if (Matched_Truth_Particle_PDG==fCandidatePDG) fhEvent->Fill(20);
727  if (Matched_Truth_Particle_PDG==-fCandidatePDG) fhEvent->Fill(21);
728  }
729 
730 
731  Double_t Inv_Mass_D=0.0;
732  Double_t Inv_Mass_D_Truth=0.0;
733 
734  if (Mass_Hypo_Type==1 || (Mass_Hypo_Type==3 && Matched_Truth_Particle_PDG==fCandidatePDG)){
735  Inv_Mass_D=D_Candidate->InvMassD0();
736  //Inv_Mass_D_Truth=Matched_Truth_Particle->InvMassD0();
737  Inv_Mass_D_Truth=0.0;
738  }
739  if (Mass_Hypo_Type==2 || (Mass_Hypo_Type==3 && Matched_Truth_Particle_PDG==-fCandidatePDG)){
740  Inv_Mass_D=D_Candidate->InvMassD0bar();
741  //Inv_Mass_D_Truth=Matched_Truth_Particle->InvMassD0bar();
742  Inv_Mass_D_Truth=0.0;
743  }
744 
745 
746 
747 
749  fFastJetWrapper->AddInputVector(D_Candidate->Px(), D_Candidate->Py(), D_Candidate->Pz(), D_Candidate->E(), 0);
750 
751  AliHFTrackContainer* Track_Container = (AliHFTrackContainer *) GetTrackContainer(0);
752  if (!Track_Container) continue;
753  Track_Container->SetDMesonCandidate(D_Candidate);
754  AliAODTrack *Track = NULL;
755  for (Int_t i_Track=0; i_Track<Track_Container->GetNTracks(); i_Track++){
756  Track = static_cast<AliAODTrack*>(Track_Container->GetAcceptParticle(i_Track));
757  fFastJetWrapper->AddInputVector(Track->Px(), Track->Py(), Track->Pz(), Track->E(),i_Track+100);
758  }
759  fFastJetWrapper->Run();
760 
761 
762  std::vector<fastjet::PseudoJet> Inclusive_Jets = fFastJetWrapper->GetInclusiveJets();
763  for (UInt_t i_Jet=0; i_Jet < Inclusive_Jets.size(); i_Jet++){
764  Bool_t Is_D_Jet=kFALSE;
765  if (Inclusive_Jets[i_Jet].perp()<fJetMinPt) continue;
766  if (TMath::Abs(Inclusive_Jets[i_Jet].pseudorapidity()) > 0.9-fJetRadius) continue;
767  std::vector<fastjet::PseudoJet> Constituents(fFastJetWrapper->GetJetConstituents(i_Jet));
768  for (UInt_t i_Constituents = 0; i_Constituents < Constituents.size(); i_Constituents++) {
769  if (Constituents[i_Constituents].user_index() == 0) {
770  Is_D_Jet = kTRUE;
771  }
772  }
773 
774 
775  if (!Is_D_Jet) continue;
776  fhEvent->Fill(22);
777 
778 
779  Int_t i_Matched_D_Jet_Truth=-1;
780  for (UInt_t k=0; k< Inclusive_Jets_Truth_Labels.size(); k++){
781  if(Inclusive_Jets_Truth_Labels[k].first==D_Candidate_MatchedTruth_Label) i_Matched_D_Jet_Truth=Inclusive_Jets_Truth_Labels[k].second;
782  }
783 
784  for (UInt_t i_Jet_Truth=0; i_Jet_Truth < Inclusive_Jets_Truth.size(); i_Jet_Truth++){
785  Bool_t Is_Jet_Truth_Matched=kFALSE;
786  if (TMath::Abs(Inclusive_Jets_Truth[i_Jet_Truth].pseudorapidity()) > 0.9-fJetRadius) continue;
787  std::vector<fastjet::PseudoJet> Constituents_Truth(fFastJetWrapper_Truth->GetJetConstituents(i_Jet_Truth));
788  for (UInt_t i_Constituents_Truth = 0; i_Constituents_Truth < Constituents_Truth.size(); i_Constituents_Truth++) {
789  if (Constituents_Truth[i_Constituents_Truth].user_index() == i_Matched_D_Jet_Truth) {
790  Is_Jet_Truth_Matched=kTRUE;
791  for (UInt_t i_Unmacthed_D=0; i_Unmacthed_D<Unmatched_Truth_Level_D.size(); i_Unmacthed_D++){
792  if (Unmatched_Truth_Level_D[i_Unmacthed_D]==i_Matched_D_Jet_Truth) Unmatched_Truth_Level_D.erase(Unmatched_Truth_Level_D.begin()+i_Unmacthed_D);
793  }
794  }
795  }
796  if (!Is_Jet_Truth_Matched) continue;
797  fhEvent->Fill(23);
798  NMatched_DMeson_Jets++;
799 
800 
801 
802 
803  std::vector<Double_t> Splittings_Zg;
804  std::vector<Double_t> Splittings_DeltaR;
805  std::vector<Double_t> Splittings_LeadingSubJetpT;
806  std::vector<Double_t> Splittings_HardestSubJetD0;
807 
808  Bool_t Is_D_SubJet=kFALSE;
809  fastjet::JetDefinition Jet_Definition(fastjet::cambridge_algorithm, fJetRadius*2.5,static_cast<fastjet::RecombinationScheme>(0), fastjet::Best);
810 
811  try{
812  std::vector<fastjet::PseudoJet> Reclustered_Particles(fFastJetWrapper->GetJetConstituents(i_Jet));
813  fastjet::ClusterSequence Cluster_Sequence_CA(Reclustered_Particles, Jet_Definition);
814  std::vector<fastjet::PseudoJet> Reclustered_Jet = Cluster_Sequence_CA.inclusive_jets(0.0);
815  Reclustered_Jet = sorted_by_pt(Reclustered_Jet);
816 
817 
818  fastjet::PseudoJet Daughter_Jet = Reclustered_Jet[0];
819  fastjet::PseudoJet Parent_SubJet_1;
820  fastjet::PseudoJet Parent_SubJet_2;
821 
822  while(Daughter_Jet.has_parents(Parent_SubJet_1,Parent_SubJet_2)){
823  if(Parent_SubJet_1.perp() < Parent_SubJet_2.perp()) std::swap(Parent_SubJet_1,Parent_SubJet_2);
824  Splittings_LeadingSubJetpT.push_back(Parent_SubJet_1.perp());
825  vector < fastjet::PseudoJet > Hard_SubJet_Constituents = sorted_by_pt(Parent_SubJet_1.constituents());
826  Is_D_SubJet=kFALSE;
827  for(UInt_t j=0;j<Hard_SubJet_Constituents.size();j++){
828  if(Hard_SubJet_Constituents[j].user_index()==0) Is_D_SubJet=kTRUE;
829  }
830 
831 
832  if (!Is_D_SubJet) Splittings_HardestSubJetD0.push_back(1.0);
833  else Splittings_HardestSubJetD0.push_back(2.0);
834 
835  // if(!Is_D_SubJet) std::swap(Parent_SubJet_1,Parent_SubJet_2);
836  Splittings_DeltaR.push_back(Parent_SubJet_1.delta_R(Parent_SubJet_2));
837  Splittings_Zg.push_back(Parent_SubJet_2.perp()/(Parent_SubJet_1.perp()+Parent_SubJet_2.perp()));
838  Daughter_Jet=Parent_SubJet_1;
839  }
840 
841 
842  } catch (fastjet::Error) { /*return -1;*/ }
843 
844 
845  std::vector<Double_t> Splittings_Zg_Truth;
846  std::vector<Double_t> Splittings_DeltaR_Truth;
847  std::vector<Double_t> Splittings_LeadingSubJetpT_Truth;
848  std::vector<Double_t> Splittings_HardestSubJetD0_Truth;
849 
850 
851  Bool_t Is_D_SubJet_Truth=kFALSE;
852  fastjet::JetDefinition Jet_Definition_Truth(fastjet::cambridge_algorithm, fJetRadius*2.5,static_cast<fastjet::RecombinationScheme>(0), fastjet::Best);
853 
854  try{
855  std::vector<fastjet::PseudoJet> Reclustered_Particles_Truth(fFastJetWrapper_Truth->GetJetConstituents(i_Jet_Truth));
856  fastjet::ClusterSequence Cluster_Sequence_CA_Truth(Reclustered_Particles_Truth, Jet_Definition_Truth);
857  std::vector<fastjet::PseudoJet> Reclustered_Jet_Truth = Cluster_Sequence_CA_Truth.inclusive_jets(0.0);
858  Reclustered_Jet_Truth = sorted_by_pt(Reclustered_Jet_Truth);
859 
860 
861  fastjet::PseudoJet Daughter_Jet_Truth = Reclustered_Jet_Truth[0];
862  fastjet::PseudoJet Parent_SubJet_1_Truth;
863  fastjet::PseudoJet Parent_SubJet_2_Truth;
864 
865  while(Daughter_Jet_Truth.has_parents(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth)){
866  if(Parent_SubJet_1_Truth.perp() < Parent_SubJet_2_Truth.perp()) std::swap(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth);
867  Splittings_LeadingSubJetpT_Truth.push_back(Parent_SubJet_1_Truth.perp());
868  vector < fastjet::PseudoJet > Hard_SubJet_Constituents_Truth = sorted_by_pt(Parent_SubJet_1_Truth.constituents());
869  Is_D_SubJet_Truth=kFALSE;
870  for(UInt_t j=0;j<Hard_SubJet_Constituents_Truth.size();j++){
871  if(Hard_SubJet_Constituents_Truth[j].user_index()==i_Matched_D_Jet_Truth) Is_D_SubJet_Truth=kTRUE;
872  }
873 
874 
875  if (!Is_D_SubJet_Truth) Splittings_HardestSubJetD0_Truth.push_back(1.0);
876  else Splittings_HardestSubJetD0_Truth.push_back(2.0);
877 
878  // if(!Is_D_SubJet_Truth) std::swap(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth);
879  Splittings_DeltaR_Truth.push_back(Parent_SubJet_1_Truth.delta_R(Parent_SubJet_2_Truth));
880  Splittings_Zg_Truth.push_back(Parent_SubJet_2_Truth.perp()/(Parent_SubJet_1_Truth.perp()+Parent_SubJet_2_Truth.perp()));
881  Daughter_Jet_Truth=Parent_SubJet_1_Truth;
882  }
883 
884 
885  } catch (fastjet::Error) { /*return -1;*/ }
886 
887 
888 
889 
890  //set detector level flags
891  Double_t Flag_D=-1.0;
892  if (Mass_Hypo_Type ==1) Flag_D=1.0;
893  else if (Mass_Hypo_Type ==2) Flag_D=2.0;
894  else if (Mass_Hypo_Type ==3 && Matched_Truth_Particle->GetPdgCode()==fCandidatePDG) Flag_D=3.0;
895  else if (Mass_Hypo_Type ==3 && Matched_Truth_Particle->GetPdgCode()==-fCandidatePDG) Flag_D=4.0;
896 
897  Double_t Flag_D_Truth=-1.0;
898  if (Matched_Truth_Particle->GetPdgCode()==fCandidatePDG) Flag_D_Truth=1.0;
899  if (Matched_Truth_Particle->GetPdgCode()==-fCandidatePDG) Flag_D_Truth=2.0;
900 
901 
902  fShapesVar[0] = Inclusive_Jets[i_Jet].perp();
903  fShapesVar[1] = Inclusive_Jets_Truth[i_Jet_Truth].perp();
904  fShapesVar[2] = D_Candidate->Pt();
905  fShapesVar[3] = Matched_Truth_Particle->Pt();
906  fShapesVar[4] = Inv_Mass_D;
907  fShapesVar[5] = Inv_Mass_D_Truth;
908  fShapesVar[6] = Flag_D;
909  fShapesVar[7] = Flag_D_Truth;
910  fShapesVar[8] = Is_Prompt_Correct_Quark_PDG;
911  fShapesVar[9] = 0.0;
912 
913 
914 
915  fShapesVar_Splittings_DeltaR.push_back(Splittings_DeltaR);
916  fShapesVar_Splittings_DeltaR_Truth.push_back(Splittings_DeltaR_Truth);
917  fShapesVar_Splittings_Zg.push_back(Splittings_Zg);
918  fShapesVar_Splittings_Zg_Truth.push_back(Splittings_Zg_Truth);
919  fShapesVar_Splittings_LeadingSubJetpT.push_back(Splittings_LeadingSubJetpT);
920  fShapesVar_Splittings_LeadingSubJetpT_Truth.push_back(Splittings_LeadingSubJetpT_Truth);
921  fShapesVar_Splittings_HardestSubJetD0.push_back(Splittings_HardestSubJetD0);
922  fShapesVar_Splittings_HardestSubJetD0_Truth.push_back(Splittings_HardestSubJetD0_Truth);
923 
924 
925  fTreeResponseMatrixAxis->Fill();
926  fTreeSplittings->Fill();
927 
928  }
929  }
930  }
931  if(NMatched_DMeson_Jets==0) fhEvent->Fill(24);
932  if(NMatched_DMeson_Jets==1) fhEvent->Fill(25);
933  if(NMatched_DMeson_Jets==2) fhEvent->Fill(26);
934  if(NMatched_DMeson_Jets==3) fhEvent->Fill(27);
935  if(NMatched_DMeson_Jets==4) fhEvent->Fill(28);
936  if(NMatched_DMeson_Jets==5) fhEvent->Fill(29);
937  if(NMatched_DMeson_Jets==6) fhEvent->Fill(30);
938 
939  if (fIncludeInclusive){
940 
941  if(Unmatched_Truth_Level_D.size()==0) fhEvent->Fill(31);
942  if(Unmatched_Truth_Level_D.size()==1) fhEvent->Fill(32);
943  if(Unmatched_Truth_Level_D.size()==2) fhEvent->Fill(33);
944  if(Unmatched_Truth_Level_D.size()==3) fhEvent->Fill(34);
945  if(Unmatched_Truth_Level_D.size()==4) fhEvent->Fill(35);
946  if(Unmatched_Truth_Level_D.size()==5) fhEvent->Fill(36);
947  if(Unmatched_Truth_Level_D.size()==6) fhEvent->Fill(37);
948 
949  for (UInt_t i_Jet_Truth=0; i_Jet_Truth < Inclusive_Jets_Truth.size(); i_Jet_Truth++){
950  AliAODMCParticle* Truth_D_Particle = NULL;
951  Bool_t Is_Unmatched_D=kFALSE;
952  Int_t D_Meson_Matched_Index=-1;
953  if (TMath::Abs(Inclusive_Jets_Truth[i_Jet_Truth].pseudorapidity()) > 0.9-fJetRadius) continue;
954  std::vector<fastjet::PseudoJet> Constituents_Truth(fFastJetWrapper_Truth->GetJetConstituents(i_Jet_Truth));
955  for (UInt_t i_Constituents_Truth = 0; i_Constituents_Truth < Constituents_Truth.size(); i_Constituents_Truth++) {
956  for (UInt_t i_Unmacthed_D=0; i_Unmacthed_D<Unmatched_Truth_Level_D.size(); i_Unmacthed_D++){
957  if(Constituents_Truth[i_Constituents_Truth].user_index() == Unmatched_Truth_Level_D[i_Unmacthed_D]){
958  Is_Unmatched_D=kTRUE;
959  D_Meson_Matched_Index=Constituents_Truth[i_Constituents_Truth].user_index();
960  for(UInt_t i_MC_Label=0; i_MC_Label<Inclusive_Jets_Truth_Labels.size(); i_MC_Label++){
961  if (Inclusive_Jets_Truth_Labels[i_MC_Label].second==Constituents_Truth[i_Constituents_Truth].user_index()){
962  Truth_D_Particle=static_cast<AliAODMCParticle*>(Particle_Container->GetArray()->At(Inclusive_Jets_Truth_Labels[i_MC_Label].first));
963  }
964  }
965  }
966  }
967  }
968  if (!Is_Unmatched_D) continue;
969  fhEvent->Fill(38);
970 
971 
972  Bool_t Is_Prompt_Correct_Quark=kFALSE;
973  Int_t Is_Prompt_Correct_Quark_PDG=-1;
974  Int_t Truth_D_Particle_Mother_Label=Truth_D_Particle->GetMother();
975  while (Truth_D_Particle_Mother_Label >= 0) {
976  AliAODMCParticle* Truth_D_Particle_Mother = static_cast<AliAODMCParticle*>(Particle_Container->GetArray()->At(Truth_D_Particle_Mother_Label));
977  if (Truth_D_Particle_Mother){
978  Int_t Original_Quark_PDG=4;
979  if (fIsBDecay) Original_Quark_PDG=5;
980  if (TMath::Abs(Truth_D_Particle_Mother->GetPdgCode()) == 4){
981  fhEvent->Fill(39);
982  Is_Prompt_Correct_Quark_PDG=4;
983  }
984  if (TMath::Abs(Truth_D_Particle_Mother->GetPdgCode()) == 5){
985  fhEvent->Fill(40);
986  Is_Prompt_Correct_Quark_PDG=5;
987  }
988  if (TMath::Abs(Truth_D_Particle_Mother->GetPdgCode())==Original_Quark_PDG) Is_Prompt_Correct_Quark=kTRUE;
989  if (Truth_D_Particle_Mother_Label==Truth_D_Particle_Mother->GetMother()) break;
990  Truth_D_Particle_Mother_Label=Truth_D_Particle_Mother->GetMother();
991  }
992  else break;
993  }
994 
995  if (fPromptReject && !Is_Prompt_Correct_Quark) continue;
996 
997 
998  Bool_t Is_D_SubJet_Truth=kFALSE;
999  fastjet::JetDefinition Jet_Definition_Truth(fastjet::cambridge_algorithm, fJetRadius*2.5,static_cast<fastjet::RecombinationScheme>(0), fastjet::Best);
1000 
1001  std::vector<Double_t> Splittings_Zg_Truth;
1002  std::vector<Double_t> Splittings_DeltaR_Truth;
1003  std::vector<Double_t> Splittings_LeadingSubJetpT_Truth;
1004  std::vector<Double_t> Splittings_HardestSubJetD0_Truth;
1005 
1006 
1007  try{
1008  std::vector<fastjet::PseudoJet> Reclustered_Particles_Truth(fFastJetWrapper_Truth->GetJetConstituents(i_Jet_Truth));
1009  fastjet::ClusterSequence Cluster_Sequence_CA_Truth(Reclustered_Particles_Truth, Jet_Definition_Truth);
1010  std::vector<fastjet::PseudoJet> Reclustered_Jet_Truth = Cluster_Sequence_CA_Truth.inclusive_jets(0.0);
1011  Reclustered_Jet_Truth = sorted_by_pt(Reclustered_Jet_Truth);
1012 
1013 
1014  fastjet::PseudoJet Daughter_Jet_Truth = Reclustered_Jet_Truth[0];
1015  fastjet::PseudoJet Parent_SubJet_1_Truth;
1016  fastjet::PseudoJet Parent_SubJet_2_Truth;
1017 
1018  while(Daughter_Jet_Truth.has_parents(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth)){
1019  if(Parent_SubJet_1_Truth.perp() < Parent_SubJet_2_Truth.perp()) std::swap(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth);
1020  Splittings_LeadingSubJetpT_Truth.push_back(Parent_SubJet_1_Truth.perp());
1021  vector < fastjet::PseudoJet > Hard_SubJet_Constituents_Truth = sorted_by_pt(Parent_SubJet_1_Truth.constituents());
1022  Is_D_SubJet_Truth=kFALSE;
1023  for(UInt_t j=0;j<Hard_SubJet_Constituents_Truth.size();j++){
1024  if(Hard_SubJet_Constituents_Truth[j].user_index()==D_Meson_Matched_Index) Is_D_SubJet_Truth=kTRUE;
1025  }
1026 
1027 
1028  if (!Is_D_SubJet_Truth) Splittings_HardestSubJetD0_Truth.push_back(1.0);
1029  else Splittings_HardestSubJetD0_Truth.push_back(2.0);
1030 
1031  // if(!Is_D_SubJet_Truth) std::swap(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth);
1032  Splittings_DeltaR_Truth.push_back(Parent_SubJet_1_Truth.delta_R(Parent_SubJet_2_Truth));
1033  Splittings_Zg_Truth.push_back(Parent_SubJet_2_Truth.perp()/(Parent_SubJet_1_Truth.perp()+Parent_SubJet_2_Truth.perp()));
1034  Daughter_Jet_Truth=Parent_SubJet_1_Truth;
1035  }
1036 
1037 
1038  } catch (fastjet::Error) { /*return -1;*/ }
1039 
1040  Double_t Inv_Mass_D_Truth=0.0;
1041  Double_t Flag_D_Truth=-1.0;
1042  if (Truth_D_Particle->GetPdgCode()==fCandidatePDG){
1043  //Inv_Mass_D_Truth=Truth_D_Particle->InvMassD0();
1044  Inv_Mass_D_Truth=0.0;
1045  Flag_D_Truth=3.0;
1046  }
1047  if (Truth_D_Particle->GetPdgCode()==-fCandidatePDG){
1048  // Inv_Mass_D_Truth=Truth_D_Particle->InvMassD0bar();
1049  Inv_Mass_D_Truth=0.0;
1050  Flag_D_Truth=4.0;
1051  }
1052 
1053 
1054  fShapesVar[0] = 0.0;
1055  fShapesVar[1] = Inclusive_Jets_Truth[i_Jet_Truth].perp();
1056  fShapesVar[2] = 0.0;
1057  fShapesVar[3] = Truth_D_Particle->Pt();
1058  fShapesVar[4] = 0.0;
1059  fShapesVar[5] = Inv_Mass_D_Truth;
1060  fShapesVar[6] = 0.0;
1061  fShapesVar[7] = Flag_D_Truth;
1062  fShapesVar[8] = Is_Prompt_Correct_Quark_PDG;
1063  fShapesVar[9] = 0.0;
1064 
1065 
1066  fShapesVar_Splittings_DeltaR.push_back(Splittings_DeltaR_Truth);
1067  fShapesVar_Splittings_DeltaR_Truth.push_back(Splittings_DeltaR_Truth);
1068  fShapesVar_Splittings_Zg.push_back(Splittings_Zg_Truth);
1069  fShapesVar_Splittings_Zg_Truth.push_back(Splittings_Zg_Truth);
1070  fShapesVar_Splittings_LeadingSubJetpT.push_back(Splittings_LeadingSubJetpT_Truth);
1071  fShapesVar_Splittings_LeadingSubJetpT_Truth.push_back(Splittings_LeadingSubJetpT_Truth);
1072  fShapesVar_Splittings_HardestSubJetD0.push_back(Splittings_HardestSubJetD0_Truth);
1073  fShapesVar_Splittings_HardestSubJetD0_Truth.push_back(Splittings_HardestSubJetD0_Truth);
1074 
1075 
1076  fTreeResponseMatrixAxis->Fill();
1077  fTreeSplittings->Fill();
1078 
1079  }
1080 
1081  }
1082 
1083  }
1084 
1085 
1086  if (fJetShapeType == kTrue){
1087 
1088 
1089  //truth level only jet finding
1090 
1091 
1093  Particle_Container->SetSpecialPDG(fCandidatePDG);
1094  Particle_Container->SetRejectedOriginMap(fRejectedOrigin);
1095  Particle_Container->SetAcceptedDecayMap(fAcceptedDecay);
1096  Particle_Container->SetRejectISR(fRejectISR);
1097 
1098  std::vector<fastjet::PseudoJet> Inclusive_Jets_Truth;
1099  std::vector<std::pair<Int_t, Int_t>> Inclusive_Jets_Truth_Labels;
1100 
1101  if (Particle_Container->IsSpecialPDGFound()){
1102  fhEvent->Fill(2);
1103 
1104  fFastJetWrapper_Truth->SetAreaType(fastjet::active_area);
1107  fFastJetWrapper_Truth->SetAlgorithm(fastjet::antikt_algorithm);
1108  fFastJetWrapper_Truth->SetRecombScheme(static_cast<fastjet::RecombinationScheme>(0));
1110 
1111  AliAODMCParticle* Truth_Particle=NULL;
1112  Int_t NTruthD=0;
1113  for (Int_t i_Particle=0; i_Particle<Particle_Container->GetNParticles(); i_Particle++){
1114  Truth_Particle = static_cast<AliAODMCParticle*>(Particle_Container->GetAcceptParticle(i_Particle));
1115  if (TMath::Abs(Truth_Particle->GetPdgCode())==fCandidatePDG){
1116  fhEvent->Fill(3);
1117  std::pair<Int_t, Int_t> Inclusive_Jet_Truth_Labels;
1118  Inclusive_Jet_Truth_Labels.first=Truth_Particle->GetLabel();
1119  Inclusive_Jet_Truth_Labels.second=NTruthD;
1120  Inclusive_Jets_Truth_Labels.push_back(Inclusive_Jet_Truth_Labels);
1121  fFastJetWrapper_Truth->AddInputVector(Truth_Particle->Px(), Truth_Particle->Py(), Truth_Particle->Pz(), Truth_Particle->E(),NTruthD);
1122  NTruthD++;
1123  }
1124  else fFastJetWrapper_Truth->AddInputVector(Truth_Particle->Px(), Truth_Particle->Py(), Truth_Particle->Pz(), Truth_Particle->E(),i_Particle+100);
1125  }
1127  Inclusive_Jets_Truth = fFastJetWrapper_Truth->GetInclusiveJets();
1128 
1129  for (UInt_t i_Jet_Truth=0; i_Jet_Truth < Inclusive_Jets_Truth.size(); i_Jet_Truth++){
1130  AliAODMCParticle* Truth_D_Particle = NULL;
1131  Bool_t Is_DJet_Truth=kFALSE;
1132  Int_t D_Meson_Matched_Index=-1;
1133  if (TMath::Abs(Inclusive_Jets_Truth[i_Jet_Truth].pseudorapidity()) > 0.9-fJetRadius) continue;
1134  std::vector<fastjet::PseudoJet> Constituents_Truth(fFastJetWrapper_Truth->GetJetConstituents(i_Jet_Truth));
1135  for (UInt_t i_Constituents_Truth = 0; i_Constituents_Truth < Constituents_Truth.size(); i_Constituents_Truth++) {
1136 
1137  if(Constituents_Truth[i_Constituents_Truth].user_index() >=0 && Constituents_Truth[i_Constituents_Truth].user_index() < NTruthD){
1138  D_Meson_Matched_Index=Constituents_Truth[i_Constituents_Truth].user_index();
1139  Is_DJet_Truth=kTRUE;
1140  for(UInt_t i_MC_Label=0; i_MC_Label<Inclusive_Jets_Truth_Labels.size(); i_MC_Label++){
1141  if (Inclusive_Jets_Truth_Labels[i_MC_Label].second==Constituents_Truth[i_Constituents_Truth].user_index()){
1142  Truth_D_Particle=static_cast<AliAODMCParticle*>(Particle_Container->GetArray()->At(Inclusive_Jets_Truth_Labels[i_MC_Label].first));
1143  }
1144  }
1145 
1146  }
1147  }
1148 
1149  if (!Is_DJet_Truth) fhEvent->Fill(4);
1150  if (Is_DJet_Truth) fhEvent->Fill(5);
1151 
1152  if (!fIncludeInclusive && !Is_DJet_Truth) continue;
1153 
1154  Bool_t Is_Prompt_Correct_Quark=kFALSE;
1155  Int_t Is_Prompt_Correct_Quark_PDG=-1;
1156  Int_t Truth_D_Particle_Mother_Label=Truth_D_Particle->GetMother();
1157  while (Truth_D_Particle_Mother_Label >= 0) {
1158  AliAODMCParticle* Truth_D_Particle_Mother = static_cast<AliAODMCParticle*>(Particle_Container->GetArray()->At(Truth_D_Particle_Mother_Label));
1159  if (Truth_D_Particle_Mother){
1160  Int_t Original_Quark_PDG=4;
1161  if (fIsBDecay) Original_Quark_PDG=5;
1162  if (TMath::Abs(Truth_D_Particle_Mother->GetPdgCode()) ==Original_Quark_PDG) Is_Prompt_Correct_Quark=kTRUE;
1163  if (TMath::Abs(Truth_D_Particle_Mother->GetPdgCode()) ==4){
1164  fhEvent->Fill(6);
1165  Is_Prompt_Correct_Quark_PDG=4;
1166  }
1167  if (TMath::Abs(Truth_D_Particle_Mother->GetPdgCode()) ==5){
1168  fhEvent->Fill(7);
1169  Is_Prompt_Correct_Quark_PDG=5;
1170  }
1171  if (Truth_D_Particle_Mother_Label==Truth_D_Particle_Mother->GetMother()) break;
1172  Truth_D_Particle_Mother_Label=Truth_D_Particle_Mother->GetMother();
1173  }
1174  else break;
1175  }
1176 
1177  if(fPromptReject && !Is_Prompt_Correct_Quark) continue;
1178  fhEvent->Fill(8);
1179 
1180  Bool_t Is_D_SubJet_Truth=kFALSE;
1181  fastjet::JetDefinition Jet_Definition_Truth(fastjet::cambridge_algorithm, fJetRadius*2.5,static_cast<fastjet::RecombinationScheme>(0), fastjet::Best);
1182 
1183  std::vector<Double_t> Splittings_Zg_Truth;
1184  std::vector<Double_t> Splittings_DeltaR_Truth;
1185  std::vector<Double_t> Splittings_LeadingSubJetpT_Truth;
1186  std::vector<Double_t> Splittings_HardestSubJetD0_Truth;
1187 
1188  try{
1189  std::vector<fastjet::PseudoJet> Reclustered_Particles_Truth(fFastJetWrapper_Truth->GetJetConstituents(i_Jet_Truth));
1190  fastjet::ClusterSequence Cluster_Sequence_CA_Truth(Reclustered_Particles_Truth, Jet_Definition_Truth);
1191  std::vector<fastjet::PseudoJet> Reclustered_Jet_Truth = Cluster_Sequence_CA_Truth.inclusive_jets(0.0);
1192  Reclustered_Jet_Truth = sorted_by_pt(Reclustered_Jet_Truth);
1193 
1194 
1195  fastjet::PseudoJet Daughter_Jet_Truth = Reclustered_Jet_Truth[0];
1196  fastjet::PseudoJet Parent_SubJet_1_Truth;
1197  fastjet::PseudoJet Parent_SubJet_2_Truth;
1198 
1199  while(Daughter_Jet_Truth.has_parents(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth)){
1200  if(Parent_SubJet_1_Truth.perp() < Parent_SubJet_2_Truth.perp()) std::swap(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth);
1201  Splittings_LeadingSubJetpT_Truth.push_back(Parent_SubJet_1_Truth.perp());
1202  vector < fastjet::PseudoJet > Hard_SubJet_Constituents_Truth = sorted_by_pt(Parent_SubJet_1_Truth.constituents());
1203  Is_D_SubJet_Truth=kFALSE;
1204  for(UInt_t j=0;j<Hard_SubJet_Constituents_Truth.size();j++){
1205  if(Hard_SubJet_Constituents_Truth[j].user_index()==D_Meson_Matched_Index) Is_D_SubJet_Truth=kTRUE;
1206  }
1207 
1208  if (fIncludeInclusive && !Is_DJet_Truth) Splittings_HardestSubJetD0_Truth.push_back(0.0);
1209  else if (Is_DJet_Truth && !Is_D_SubJet_Truth) Splittings_HardestSubJetD0_Truth.push_back(1.0);
1210  else if (Is_DJet_Truth && Is_D_SubJet_Truth)Splittings_HardestSubJetD0_Truth.push_back(2.0);
1211 
1212  // if(!Is_D_SubJet_Truth) std::swap(Parent_SubJet_1_Truth,Parent_SubJet_2_Truth);
1213  Splittings_DeltaR_Truth.push_back(Parent_SubJet_1_Truth.delta_R(Parent_SubJet_2_Truth));
1214  Splittings_Zg_Truth.push_back(Parent_SubJet_2_Truth.perp()/(Parent_SubJet_1_Truth.perp()+Parent_SubJet_2_Truth.perp()));
1215  Daughter_Jet_Truth=Parent_SubJet_1_Truth;
1216  }
1217 
1218 
1219  } catch (fastjet::Error) { /*return -1;*/ }
1220 
1221  Double_t Inv_Mass_D_Truth=0.0;
1222  Double_t Flag_D_Truth=-1.0;
1223  Double_t D_Pt=-1.0;
1224  if (fIncludeInclusive && !Is_DJet_Truth){
1225  Flag_D_Truth=0.0;
1226  }
1227  else if (Is_DJet_Truth){
1228  if (Truth_D_Particle->GetPdgCode()==fCandidatePDG){
1229  //Inv_Mass_D_Truth=Truth_D_Particle->InvMassD0();
1230  Inv_Mass_D_Truth=0.0;
1231  Flag_D_Truth=1.0;
1232  D_Pt=Truth_D_Particle->Pt();
1233  fhEvent->Fill(9);
1234  }
1235  if (Truth_D_Particle->GetPdgCode()==-fCandidatePDG){
1236  // Inv_Mass_D_Truth=Truth_D_Particle->InvMassD0bar();
1237  Inv_Mass_D_Truth=0.0;
1238  Flag_D_Truth=2.0;
1239  D_Pt=Truth_D_Particle->Pt();
1240  fhEvent->Fill(10);
1241  }
1242  }
1243 
1244 
1245  fShapesVar[0] = 0.0;
1246  fShapesVar[1] = Inclusive_Jets_Truth[i_Jet_Truth].perp();
1247  fShapesVar[2] = 0.0;
1248  fShapesVar[3] = D_Pt;
1249  fShapesVar[4] = 0.0;
1250  fShapesVar[5] = Inv_Mass_D_Truth;
1251  fShapesVar[6] = 0.0;
1252  fShapesVar[7] = Flag_D_Truth;
1253  fShapesVar[8] = 0.0;
1254  fShapesVar[9] = Is_Prompt_Correct_Quark_PDG;
1255 
1256 
1257 
1258  fShapesVar_Splittings_DeltaR.push_back(Splittings_DeltaR_Truth);
1259  fShapesVar_Splittings_DeltaR_Truth.push_back(Splittings_DeltaR_Truth);
1260  fShapesVar_Splittings_Zg.push_back(Splittings_Zg_Truth);
1261  fShapesVar_Splittings_Zg_Truth.push_back(Splittings_Zg_Truth);
1262  fShapesVar_Splittings_LeadingSubJetpT.push_back(Splittings_LeadingSubJetpT_Truth);
1263  fShapesVar_Splittings_LeadingSubJetpT_Truth.push_back(Splittings_LeadingSubJetpT_Truth);
1264  fShapesVar_Splittings_HardestSubJetD0.push_back(Splittings_HardestSubJetD0_Truth);
1265  fShapesVar_Splittings_HardestSubJetD0_Truth.push_back(Splittings_HardestSubJetD0_Truth);
1266 
1267 
1268  fTreeResponseMatrixAxis->Fill();
1269  fTreeSplittings->Fill();
1270 
1271 
1272 
1273  }
1274  if (NTruthD==0) fhEvent->Fill(11);
1275  if (NTruthD==1) fhEvent->Fill(12);
1276  if (NTruthD==2) fhEvent->Fill(13);
1277  if (NTruthD==3) fhEvent->Fill(14);
1278  if (NTruthD==4) fhEvent->Fill(15);
1279  if (NTruthD==5) fhEvent->Fill(16);
1280  if (NTruthD==6) fhEvent->Fill(17);
1281  }
1282 
1283  }
1284 
1285  return kTRUE;
1286 }
1287 
1288 
1289 
1290 
1291 
1292 
1293 //________________________________________________________________________
1295  //
1296  // retrieve event objects
1297  //
1299  return kFALSE;
1300 
1301  return kTRUE;
1302 }
1303 
1304 
1305 //_______________________________________________________________________
1307 {
1308  // Called once at the end of the analysis.
1309 
1310 }
std::vector< std::vector< Double_t > > fShapesVar_Splittings_HardestSubJetD0_Truth
void SetDMesonCandidate(AliAODRecoDecay *c)
virtual Int_t Run()
double Double_t
Definition: External.C:58
Int_t GetNTracks() const
Base task in the EMCAL framework.
std::vector< std::vector< Double_t > > fShapesVar_Splittings_HardestSubJetD0
Int_t GetNParticles() const
std::vector< std::vector< Double_t > > fShapesVar_Splittings_LeadingSubJetpT
std::vector< std::vector< Double_t > > fShapesVar_Splittings_Zg
Bool_t FillHistograms()
Function filling histograms.
void SetRecombScheme(const fastjet::RecombinationScheme &scheme)
Definition: AliFJWrapper.h:122
void SetR(Double_t r)
Definition: AliFJWrapper.h:127
std::vector< std::vector< Double_t > > fShapesVar_Splittings_DeltaR_Truth
TString kData
Declare data MC or deltaAOD.
Select tracks based on specific prescriptions of HF analysis.
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
const std::vector< fastjet::PseudoJet > & GetInclusiveJets() const
Definition: AliFJWrapper.h:34
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
Bool_t Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
void SetAlgorithm(const fastjet::JetAlgorithm &algor)
Definition: AliFJWrapper.h:121
Bool_t RetrieveEventObjects()
Retrieve common objects from event.
Definition: External.C:212
virtual void Clear(const Option_t *="")
virtual Bool_t RetrieveEventObjects()
Retrieve common objects from event.
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Select MC particles based on specific prescriptions of HF analysis.
std::vector< std::vector< Double_t > > fShapesVar_Splittings_Zg_Truth
void SetGhostArea(Double_t gharea)
Definition: AliFJWrapper.h:125
std::vector< fastjet::PseudoJet > GetJetConstituents(UInt_t idx) const
void Track()
AliEmcalList * fOutput
!output list
AliTrackContainer * GetTrackContainer(Int_t i=0) const
void SetMakeGeneralHistograms(Bool_t g)
std::vector< std::vector< Double_t > > fShapesVar_Splittings_DeltaR
const char Option_t
Definition: External.C:48
virtual void AddInputVector(Double_t px, Double_t py, Double_t pz, Double_t E, Int_t index=-99999)
void UserCreateOutputObjects()
Main initialization function on the worker.
bool Bool_t
Definition: External.C:53
void SetAreaType(const fastjet::AreaType &atype)
Definition: AliFJWrapper.h:123
std::vector< std::vector< Double_t > > fShapesVar_Splittings_LeadingSubJetpT_Truth
void swap(PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &first, PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &second)