AliPhysics  2c6b7ad (2c6b7ad)
AliAnalysisTaskHadronicCocktailMC.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: Friederike Bock, Lucas Altenk√§mper *
5  * Version 1.0 *
6  * *
7  * *
8  * Permission to use, copy, modify and distribute this software and its *
9  * documentation strictly for non-commercial purposes is hereby granted *
10  * without fee, provided that the above copyright notice appears in all *
11  * copies and that both the copyright notice and this permission notice *
12  * appear in the supporting documentation. The authors make no claims *
13  * about the suitability of this software for any purpose. It is *
14  * provided "as is" without express or implied warranty. *
15  **************************************************************************/
16 
18 //----------------------------------------------------------------
19 // Class used to do analysis on hadronic cocktail output
20 //----------------------------------------------------------------
22 #include "TChain.h"
23 #include "TTree.h"
24 #include "TBranch.h"
25 #include "TFile.h"
26 #include "TF1.h"
27 #include "TH1F.h"
28 #include "TH1D.h"
29 #include "TH2F.h"
30 #include "TObject.h"
31 #include "TObjArray.h"
32 #include "TProfile.h"
33 #include "THnSparse.h"
34 #include "TCanvas.h"
35 #include "TNtuple.h"
36 #include "AliAnalysisTask.h"
37 #include "AliAnalysisManager.h"
38 #include "AliESDEvent.h"
39 #include "AliESDInputHandler.h"
40 #include "AliMCEventHandler.h"
41 #include "AliMCEvent.h"
42 #include "AliMCParticle.h"
44 #include "AliVParticle.h"
45 #include "AliEventplane.h"
46 #include "AliInputEventHandler.h"
47 #include "AliMCGenHandler.h"
48 #include "AliGenEMCocktailV2.h"
49 #include "AliGenerator.h"
50 #include "AliPythia6.h"
51 #include <map>
52 #include <vector>
53 #include <algorithm>
54 
56 
57 //________________________________________________________________________
59  fOutputContainer(NULL),
60  fInputEvent(NULL),
61  fMCEvent(NULL),
62  fMCGenHandler(NULL),
63  fMCGenerator(NULL),
64  fMCCocktailGen(NULL),
65  fAnalyzedMeson(0),
66  fAnalyzeNeutralPi(kFALSE),
67  fAnalyzeChargedPi(kFALSE),
68  fDoLightOutput(kFALSE),
69  fWideBinning(kFALSE),
70  fHasMother{kFALSE},
71  fHistNEvents(NULL),
72  fHistPtPhiDaughterSource(NULL),
73  fHistPtPhiInput(NULL),
74  fHistPtYInput(NULL),
75  fHistPtYDaughterSource(NULL),
76  fHistDecayChannelsInput(NULL),
77  fHistPythiaBR(NULL),
78  fHistPtDaughterPtSourceInput(NULL),
79  fHistPhiDaughterPhiSourceInput(NULL),
80  fHistPdgInputRest(NULL),
81  fHistPdgDaughterSourceRest(NULL),
82  fHistPtYGammaFromXFromInput(NULL),
83  fHistPtPhiGammaFromXFromInput(NULL),
84  fHistPtYGammaFromPi0FromInput(NULL),
85  fHistPtPhiGammaFromPi0FromInput(NULL),
86  fParticleList(NULL),
87  fParticleListNames(NULL),
88  fPtParametrization{NULL},
89  fPtParametrizationProton(NULL),
90  fPtParametrizationPi0(NULL),
91  fCocktailSettings{NULL},
92  fMtScalingFactors(NULL),
93  fPtYDistributions{NULL},
94  fUserInfo(NULL),
95  fOutputTree(NULL),
96  fIsMC(1),
97  fMaxY(2),
98  fMaxEta(0)
99 {
100 
101 }
102 
103 //________________________________________________________________________
105  AliAnalysisTaskSE(name),
106  fOutputContainer(NULL),
107  fInputEvent(NULL),
108  fMCEvent(NULL),
109  fMCGenHandler(NULL),
110  fMCGenerator(NULL),
111  fMCCocktailGen(NULL),
112  fAnalyzedMeson(0),
113  fAnalyzeNeutralPi(kFALSE),
114  fAnalyzeChargedPi(kFALSE),
115  fDoLightOutput(kFALSE),
116  fWideBinning(kFALSE),
117  fHasMother{kFALSE},
118  fHistNEvents(NULL),
120  fHistPtPhiInput(NULL),
121  fHistPtYInput(NULL),
124  fHistPythiaBR(NULL),
127  fHistPdgInputRest(NULL),
133  fParticleList(NULL),
134  fParticleListNames(NULL),
135  fPtParametrization{NULL},
137  fPtParametrizationPi0(NULL),
138  fCocktailSettings{NULL},
139  fMtScalingFactors(NULL),
140  fPtYDistributions{NULL},
141  fUserInfo(NULL),
142  fOutputTree(NULL),
143  fIsMC(1),
144  fMaxY(2),
145  fMaxEta(0)
146 {
147  // Define output slots here
148  DefineOutput(1, TList::Class());
149 }
150 
152 {
153  for (Int_t i=0; i<12; i++) {
154  if (fCocktailSettings[i]) delete fCocktailSettings[i];
155  }
156 }
157 
158 //________________________________________________________________________
160 
161  // Create histograms
162  if(fOutputContainer != NULL){
163  delete fOutputContainer;
164  fOutputContainer = NULL;
165  }
166  if(fOutputContainer == NULL){
167  fOutputContainer = new TList();
168  fOutputContainer->SetOwner(kTRUE);
169  }
170 
171  TString fAnalyzedParticle = "";
172  if (fAnalyzedMeson==0) fAnalyzedParticle = "Pi0";
173  else if (fAnalyzedMeson==1) fAnalyzedParticle = "Eta";
174  else if (fAnalyzedMeson==2) fAnalyzedParticle = "Pi+-";
175  else AliFatalClass("Analyzed particle not recognized!");
176 
177  // tree + user info list to protect contents from merging
178  fOutputTree = new TTree("cocktailSettings", "cocktailSettings");
179  fUserInfo = (TList*)fOutputTree->GetUserInfo();
180 
181  fMCGenHandler = (AliMCGenHandler*)AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler();
182  fMCGenerator = fMCGenHandler->GetGenerator();
183  TString mcGeneratorClassName = "";
184  if (fMCGenerator) mcGeneratorClassName = fMCGenerator->ClassName();
185 
186  if (mcGeneratorClassName.CompareTo("AliGenEMCocktailV2") == 0) {
187 
188  fMCCocktailGen = (AliGenEMCocktailV2*)fMCGenerator;
189 
190  // has mother i
191  SetHasMother((UInt_t)fMCCocktailGen->GetSelectedMothers());
192 
193  // pt parametrizations
195  for (Int_t i=0; i<24; i++) {
196  if (fHasMother[i]) fUserInfo->Add(fPtParametrization[i]);
197  }
200 
201  // cocktail settings
203  fMCCocktailGen->GetPtRange(ptMin, ptMax);
204  fCocktailSettings[0] = new TObjString(Form("collSys_%d", fMCCocktailGen->GetCollisionSystem()));
205  fCocktailSettings[1] = new TObjString(Form("cent_%d", fMCCocktailGen->GetCentrality()));
206  fCocktailSettings[2] = new TObjString(Form("decayMode_%.0f", fMCCocktailGen->GetDecayMode()));
207  fCocktailSettings[3] = new TObjString(Form("selectMothers_%d", fMCCocktailGen->GetSelectedMothers()));
208  fCocktailSettings[4] = new TObjString(Form("paramFile_%s", (fMCCocktailGen->GetParametrizationFile()).Data()));
209  fCocktailSettings[5] = new TObjString(Form("paramDir_%s", (fMCCocktailGen->GetParametrizationFileDirectory()).Data()));
210  fCocktailSettings[6] = new TObjString(Form("nParticles_%d", fMCCocktailGen->GetNumberOfParticles()));
211  fCocktailSettings[7] = new TObjString(Form("ptMin_%.2f", ptMin));
212  fCocktailSettings[8] = new TObjString(Form("ptMax_%.2f", ptMax));
213  fCocktailSettings[9] = new TObjString(Form("weightMode_%.0f", fMCCocktailGen->GetWeightingMode()));
214  fCocktailSettings[10] = new TObjString(Form("dynamicalPtRange_%d",fMCCocktailGen->GetDynamicalPtRangeOption()));
215  fCocktailSettings[11] = new TObjString(Form("yWeights_%d", fMCCocktailGen->GetYWeightOption()));
216  for (Int_t i=0; i<12; i++) fUserInfo->Add(fCocktailSettings[i]);
217 
218  // mt scaling params
219  fMtScalingFactors = (TH1D*)fMCCocktailGen->GetMtScalingFactors();
221 
222  // pt-y distributions
224  for (Int_t i=0; i<24; i++) {
225  if (fHasMother[i]) fUserInfo->Add(fPtYDistributions[i]);
226  }
227  } else {
228  for (Int_t i=0; i<24; i++) fHasMother[i] = kTRUE;
229  }
230 
231  fHistNEvents = (TH1F*)SetHist1D(fHistNEvents,"f","NEvents","","N_{evt}",1,0,1, kTRUE);
233 
234  Int_t nBinsPt = 1000;
235  if(fWideBinning)
236  nBinsPt = 500;
237 
238  const Int_t nInputParticles = 24;
239  Int_t fParticleList_local[] = {221,310,130,3122,113,331,223,213,-213,333,443,2114,2214,1114,2224,321,-321,-3334,3334,-3312,3312,3224,3114,313};
240  TString fParticleListNames_local[] = {"Eta","K0s","K0l","Lambda","rho0","EtaPrim","omega","rho+","rho-","phi","J/psi","Delta0","Delta+","Delta-","Delta++",
241  "K+","K-","Omega+","Omega-","Xi+","Xi-","Sigma(1385)+", "Sigma(1385)-","K*(892)0"};
242 
243  // pi0/eta/pi+- from X
244  fParticleList = fParticleList_local;
245  fParticleListNames = fParticleListNames_local;
246  fHistPtYInput = new TH2F*[nInputParticles];
247  fHistPtYDaughterSource = new TH2F*[nInputParticles];
248  fHistDecayChannelsInput = new TH1F*[nInputParticles];
249  fHistPythiaBR = new TH1F*[nInputParticles];
250  fHistPtPhiDaughterSource = new TH2F*[nInputParticles];
251  fHistPtPhiInput = new TH2F*[nInputParticles];
252  fHistPtDaughterPtSourceInput = new TH2F*[nInputParticles];
253  fHistPhiDaughterPhiSourceInput = new TH2F*[nInputParticles];
254  for(Int_t i=0; i<nInputParticles; i++){
255  if (fHasMother[i]) {
256  fHistPtYInput[i] = (TH2F*)SetHist2D(fHistPtYInput[i],"f", Form("Pt_Y_%s",fParticleListNames[i].Data()),"#it{p}_{T}","Y", nBinsPt, 0, 50, 400, -2.0, 2.0, kTRUE);
258 
259  // pi0/eta/pi+- from certain mother
260  fHistPtYDaughterSource[i] = (TH2F*)SetHist2D(fHistPtYDaughterSource[i],"f", Form("Pt_Y_%s_From_%s",fAnalyzedParticle.Data(),fParticleListNames[i].Data()),"#it{p}_{T}","Y",
261  nBinsPt, 0, 50, 400, -2.0, 2.0, kTRUE);
263 
264  // phi distributions
265  fHistPtPhiInput[i] = (TH2F*)SetHist2D(fHistPtPhiInput[i],"f", Form("Pt_Phi_%s",fParticleListNames[i].Data()),"#it{p}_{T}","#phi", nBinsPt, 0, 50, 100, 0, 2*TMath::Pi(), kTRUE);
267 
268  fHistPtPhiDaughterSource[i] = (TH2F*)SetHist2D(fHistPtPhiDaughterSource[i],"f", Form("Pt_Phi_%s_From_%s",fAnalyzedParticle.Data(),fParticleListNames[i].Data()),"#it{p}_{T}","#phi",
269  nBinsPt, 0, 50, 100, 0, 7, kTRUE);
271 
272  // correlation gamma from certain mother to mother
273  fHistPtDaughterPtSourceInput[i] = (TH2F*)SetHist2D(fHistPtDaughterPtSourceInput[i],"f", Form("Pt%s_PtMother_%s",fAnalyzedParticle.Data(),fParticleListNames[i].Data()),
274  "#it{p}_{T,daughter}","#it{p}_{T,mother}", nBinsPt, 0, 50, nBinsPt, 0, 50, kTRUE);
276 
278  Form("Phi%s_PhiMother_%s",fAnalyzedParticle.Data(),fParticleListNames[i].Data()),"#phi_{daughter}","#phi_{mother}",
279  100, 0, 7, 100, 0, 7, kTRUE);
281 
282  // decay channels mother
283  fHistDecayChannelsInput[i] = (TH1F*)SetHist1D(fHistDecayChannelsInput[i],"f", Form("DecayChannels_%s",fParticleListNames[i].Data()),"","", 20, -0.5, 19.5, kTRUE);
286 
287  // BR from pythia
288  fHistPythiaBR[i] = (TH1F*)SetHist1D(fHistPythiaBR[i],"f", Form("PythiaBR_%s",fParticleListNames[i].Data()),"","", 20, -0.5, 19.5, kTRUE);
291  fUserInfo->Add(fHistPythiaBR[i]);
292  } else {
293  fHistPtYInput[i] = NULL;
294  fHistPtYDaughterSource[i] = NULL;
295  fHistPtPhiInput[i] = NULL;
296  fHistPtPhiDaughterSource[i] = NULL;
299  fHistDecayChannelsInput[i] = NULL;
300  fHistPythiaBR[i] = NULL;
301  }
302  }
303 
304  // gamma from X (or pi0) from X
309  for (Int_t i = 0; i<3; i++) {
310  if (fHasMother[i+1]) {
311 
312  fHistPtYGammaFromXFromInput[i] = (TH2F*)SetHist2D(fHistPtYGammaFromXFromInput[i],"f", Form("Pt_Y_Gamma_From_X_From_%s",fParticleListNames[i+1].Data()),"#it{p}_{T}","Y",
313  nBinsPt, 0, 50, 400, -2.0, 2.0, kTRUE);
315 
316  fHistPtYGammaFromPi0FromInput[i] = (TH2F*)SetHist2D(fHistPtYGammaFromPi0FromInput[i],"f", Form("Pt_Y_Gamma_From_Pi0_From_%s",fParticleListNames[i+1].Data()),"#it{p}_{T}","Y",
317  nBinsPt, 0, 50, 400, -2.0, 2.0, kTRUE);
319 
320  fHistPtPhiGammaFromXFromInput[i] = (TH2F*)SetHist2D(fHistPtPhiGammaFromXFromInput[i],"f", Form("Pt_Phi_Gamma_From_X_From_%s",fParticleListNames[i+1].Data()),"#it{p}_{T}","#phi",
321  nBinsPt, 0, 50, 100, 0, 2*TMath::Pi(), kTRUE);
323 
324  fHistPtPhiGammaFromPi0FromInput[i] = (TH2F*)SetHist2D(fHistPtPhiGammaFromPi0FromInput[i],"f", Form("Pt_Phi_Gamma_From_Pi0_From_%s",fParticleListNames[i+1].Data()),"#it{p}_{T}","#phi",
325  nBinsPt, 0, 50, 100, 0, 2*TMath::Pi(), kTRUE);
327 
328  } else {
329  fHistPtYGammaFromXFromInput[i] = NULL;
333  }
334  }
335 
336  fHistPdgInputRest = (TH1I*)SetHist1D(fHistPdgInputRest,"f","Pdg_primary_rest","PDG code","",5000, 0, 5000, kTRUE);
338 
339  fHistPdgDaughterSourceRest = (TH1I*)SetHist1D(fHistPdgDaughterSourceRest,"f", Form("Pdg_%s_From_rest",fAnalyzedParticle.Data()),"PDG code mother","",5000, 0, 5000, kTRUE);
341 
343 
344  PostData(1, fOutputContainer);
345 }
346 
347 //_____________________________________________________________________________
349 {
350 
351  fInputEvent = InputEvent();
352 
353  fMCEvent = MCEvent();
354  if(fMCEvent == NULL) fIsMC = 0;
355  if (fIsMC==0) return;
356 
357  fHistNEvents->Fill(0.5);
359 
360  PostData(1, fOutputContainer);
361 }
362 
363 //_____________________________________________________________________________
365 {
366  if (!fMCCocktailGen) return;
367 
368  for (Int_t i=0; i<24; i++) fPtParametrization[i] = NULL;
370  fPtParametrizationPi0 = NULL;
371 
372  TF1* fct = NULL;
373  TString fctName = "";
374  for (Int_t i=0; i<27; i++) {
375  fct = (TF1*)fMCCocktailGen->GetPtParametrization(i);
376  if (fct) {
377  fctName = fct->GetName();
378  if (fctName.BeginsWith("221_pt") && fHasMother[0]) fPtParametrization[0] = fct;
379  if (fctName.BeginsWith("310_pt") && fHasMother[1]) fPtParametrization[1] = fct;
380  if (fctName.BeginsWith("130_pt") && fHasMother[2]) fPtParametrization[2] = fct;
381  if (fctName.BeginsWith("3122_pt") && fHasMother[3]) fPtParametrization[3] = fct;
382  if (fctName.BeginsWith("113_pt") && fHasMother[4]) fPtParametrization[4] = fct;
383  if (fctName.BeginsWith("331_pt") && fHasMother[5]) fPtParametrization[5] = fct;
384  if (fctName.BeginsWith("223_pt") && fHasMother[6]) fPtParametrization[6] = fct;
385  if (fctName.BeginsWith("213_pt") && fHasMother[7]) fPtParametrization[7] = fct;
386  if (fctName.BeginsWith("-213_pt") && fHasMother[8]) fPtParametrization[8] = fct;
387  if (fctName.BeginsWith("333_pt") && fHasMother[9]) fPtParametrization[9] = fct;
388  if (fctName.BeginsWith("443_pt") && fHasMother[10]) fPtParametrization[10] = fct;
389  if (fctName.BeginsWith("2114_pt") && fHasMother[11]) fPtParametrization[11] = fct;
390  if (fctName.BeginsWith("2214_pt") && fHasMother[12]) fPtParametrization[12] = fct;
391  if (fctName.BeginsWith("1114_pt") && fHasMother[13]) fPtParametrization[13] = fct;
392  if (fctName.BeginsWith("2224_pt") && fHasMother[14]) fPtParametrization[14] = fct;
393  if (fctName.BeginsWith("321_pt") && fHasMother[15]) fPtParametrization[15] = fct;
394  if (fctName.BeginsWith("-321_pt") && fHasMother[16]) fPtParametrization[16] = fct;
395  if (fctName.BeginsWith("-3334_pt") && fHasMother[17]) fPtParametrization[17] = fct;
396  if (fctName.BeginsWith("3334_pt") && fHasMother[18]) fPtParametrization[18] = fct;
397  if (fctName.BeginsWith("-3312_pt") && fHasMother[19]) fPtParametrization[19] = fct;
398  if (fctName.BeginsWith("3312_pt") && fHasMother[20]) fPtParametrization[20] = fct;
399  if (fctName.BeginsWith("3224_pt") && fHasMother[21]) fPtParametrization[21] = fct;
400  if (fctName.BeginsWith("3114_pt") && fHasMother[22]) fPtParametrization[22] = fct;
401  if (fctName.BeginsWith("313_pt") && fHasMother[23]) fPtParametrization[23] = fct;
402  if (fctName.BeginsWith("2212_pt")) fPtParametrizationProton = fct;
403  if (fctName.BeginsWith("111_pt")) fPtParametrizationPi0 = fct;
404  }
405  }
406 }
407 
408 //_____________________________________________________________________________
410 {
411  if (!fMCCocktailGen) return;
412 
413  for (Int_t i=0; i<24; i++) fPtYDistributions[i] = NULL;
414 
415  TH2F* tempPtY = NULL;
416  TString tempPtYName = "";
417  for (Int_t i=0; i<26; i++) {
418  tempPtY = (TH2F*)fMCCocktailGen->GetPtYDistribution(i);
419  if (tempPtY) {
420  tempPtYName = tempPtY->GetName();
421  if (tempPtYName.BeginsWith("221_pt_y") && fHasMother[0]) fPtYDistributions[0] = tempPtY;
422  if (tempPtYName.BeginsWith("310_pt_y") && fHasMother[1]) fPtYDistributions[1] = tempPtY;
423  if (tempPtYName.BeginsWith("130_pt_y") && fHasMother[2]) fPtYDistributions[2] = tempPtY;
424  if (tempPtYName.BeginsWith("3122_pt_y") && fHasMother[3]) fPtYDistributions[3] = tempPtY;
425  if (tempPtYName.BeginsWith("113_pt_y") && fHasMother[4]) fPtYDistributions[4] = tempPtY;
426  if (tempPtYName.BeginsWith("331_pt_y") && fHasMother[5]) fPtYDistributions[5] = tempPtY;
427  if (tempPtYName.BeginsWith("223_pt_y") && fHasMother[6]) fPtYDistributions[6] = tempPtY;
428  if (tempPtYName.BeginsWith("213_pt_y") && fHasMother[7]) fPtYDistributions[7] = tempPtY;
429  if (tempPtYName.BeginsWith("-213_pt_y") && fHasMother[8]) fPtYDistributions[8] = tempPtY;
430  if (tempPtYName.BeginsWith("333_pt_y") && fHasMother[9]) fPtYDistributions[9] = tempPtY;
431  if (tempPtYName.BeginsWith("443_pt_y") && fHasMother[10]) fPtYDistributions[10] = tempPtY;
432  if (tempPtYName.BeginsWith("2114_pt_y") && fHasMother[11]) fPtYDistributions[11] = tempPtY;
433  if (tempPtYName.BeginsWith("2214_pt_y") && fHasMother[12]) fPtYDistributions[12] = tempPtY;
434  if (tempPtYName.BeginsWith("1114_pt_y") && fHasMother[13]) fPtYDistributions[13] = tempPtY;
435  if (tempPtYName.BeginsWith("2224_pt_y") && fHasMother[14]) fPtYDistributions[14] = tempPtY;
436  if (tempPtYName.BeginsWith("321_pt_y") && fHasMother[15]) fPtYDistributions[15] = tempPtY;
437  if (tempPtYName.BeginsWith("-321_pt_y") && fHasMother[16]) fPtYDistributions[16] = tempPtY;
438  if (tempPtYName.BeginsWith("-3334_pt_y") && fHasMother[17]) fPtYDistributions[17] = tempPtY;
439  if (tempPtYName.BeginsWith("3334_pt_y") && fHasMother[18]) fPtYDistributions[18] = tempPtY;
440  if (tempPtYName.BeginsWith("-3312_pt_y") && fHasMother[19]) fPtYDistributions[19] = tempPtY;
441  if (tempPtYName.BeginsWith("3312_pt_y") && fHasMother[20]) fPtYDistributions[20] = tempPtY;
442  if (tempPtYName.BeginsWith("3224_pt_y") && fHasMother[21]) fPtYDistributions[21] = tempPtY;
443  if (tempPtYName.BeginsWith("3114_pt_y") && fHasMother[22]) fPtYDistributions[22] = tempPtY;
444  if (tempPtYName.BeginsWith("313_pt_y") && fHasMother[23]) fPtYDistributions[23] = tempPtY;
445  }
446  }
447 }
448 
449 //_____________________________________________________________________________
451 
452  for (Int_t i=0; i<24; i++) fHasMother[i] = kFALSE;
453 
454  // selects mother particles according to choice and possible decays (i.e. into pi/pi+-/eta)
455  if ( (selectedMothers&AliGenEMCocktailV2::kGenEta) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[0] = kTRUE;
456  if ( (selectedMothers&AliGenEMCocktailV2::kGenK0s) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[1] = kTRUE;
457  if ( (selectedMothers&AliGenEMCocktailV2::kGenK0l) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[2] = kTRUE;
458  if ( (selectedMothers&AliGenEMCocktailV2::kGenLambda) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[3] = kTRUE;
459  if ( selectedMothers&AliGenEMCocktailV2::kGenRho0) fHasMother[4] = kTRUE;
460  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenEtaprime)) fHasMother[5] = kTRUE;
461  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenOmega)) fHasMother[6] = kTRUE;
462  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenRhoPl)) fHasMother[7] = kTRUE;
463  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenRhoMi)) fHasMother[8] = kTRUE;
464  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenPhi)) fHasMother[9] = kTRUE;
465  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenJpsi)) fHasMother[10] = kTRUE;
466  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenDeltaZero) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[11] = kTRUE;
467  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenDeltaPl) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[12] = kTRUE;
468  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenDeltaMi) && fAnalyzeChargedPi) fHasMother[13] = kTRUE;
469  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenDeltaPlPl) && fAnalyzeChargedPi) fHasMother[14] = kTRUE;
470  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenKPl) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[15] = kTRUE;
471  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenKMi) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[16] = kTRUE;
472  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenOmegaPl) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[17] = kTRUE;
473  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenOmegaMi) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[18] = kTRUE;
474  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenXiPl) && fAnalyzeChargedPi) fHasMother[19] = kTRUE;
475  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenXiMi) && fAnalyzeChargedPi) fHasMother[20] = kTRUE;
476  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenSigmaPl) && fAnalyzeChargedPi) fHasMother[21] = kTRUE;
477  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenSigmaMi) && fAnalyzeChargedPi) fHasMother[22] = kTRUE;
478  if (!fDoLightOutput && (selectedMothers&AliGenEMCocktailV2::kGenK0star) && (fAnalyzeNeutralPi || fAnalyzeChargedPi)) fHasMother[23] = kTRUE;
479 }
480 
481 //________________________________________________________________________
483 
484  // Loop over all primary MC particle
485  for(Long_t i = 0; i < fMCEvent->GetNumberOfTracks(); i++) {
486  // fill primary histograms
487  TParticle* particle = NULL;
488  particle = (TParticle *)fMCEvent->Particle(i);
489  if (!particle) continue;
490  Bool_t hasMother = kFALSE;
491  Bool_t particleIsPrimary = kTRUE;
492 
493  if (particle->GetMother(0)>-1){
494  hasMother = kTRUE;
495  particleIsPrimary = kFALSE;
496  }
497  TParticle* motherParticle = NULL;
498  if (hasMother) motherParticle = (TParticle*)fMCEvent->Particle(particle->GetMother(0));
499  if (motherParticle) hasMother = kTRUE;
500  else hasMother = kFALSE;
501 
502  Bool_t motherIsPrimary = kFALSE;
503  if(hasMother){
504  if(motherParticle->GetMother(0)>-1) motherIsPrimary = kFALSE;
505  else motherIsPrimary = kTRUE;
506  }
507 
508  TParticle* grandMotherParticle = NULL;
509  Bool_t motherHasMother = kFALSE;
510  if (hasMother && !motherIsPrimary) {
511  grandMotherParticle = (TParticle*)fMCEvent->Particle(motherParticle->GetMother(0));
512  motherHasMother = kTRUE;
513  }
514 
515  Bool_t grandMotherIsPrimary = kFALSE;
516  if (motherHasMother) {
517  if(grandMotherParticle->GetMother(0)>-1) grandMotherIsPrimary = kFALSE;
518  else grandMotherIsPrimary = kTRUE;
519  }
520 
521  if (!(TMath::Abs(particle->Energy()-particle->Pz())>0.)) continue;
522  Double_t yPre = (particle->Energy()+particle->Pz())/(particle->Energy()-particle->Pz());
523  if( yPre <= 0 ) continue;
524 
525  Double_t y = 0.5*TMath::Log(yPre);
526 
527  Int_t PdgAnalyzedParticle = 0;
528  if (fAnalyzedMeson==0) PdgAnalyzedParticle = 111;
529  else if (fAnalyzedMeson==1) PdgAnalyzedParticle = 221;
530  else if (fAnalyzedMeson==2) PdgAnalyzedParticle = 211; // set to pi+ pdg code, but both are accepted, no distinction between pi+ and pi-
531 
532  // pi0/eta/pi+- from source
533  if(TMath::Abs(particle->GetPdgCode())==PdgAnalyzedParticle && hasMother==kTRUE){
534  if (TMath::Abs(y) > fMaxY) continue;
535  if(motherIsPrimary && fHasMother[GetParticlePosLocal(motherParticle->GetPdgCode())]){
536 
537  switch(motherParticle->GetPdgCode()){
538  case 221:
539  fHistPtYDaughterSource[0]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
540  fHistPtPhiDaughterSource[0]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
541  fHistPtDaughterPtSourceInput[0]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
542  fHistPhiDaughterPhiSourceInput[0]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
543  break;
544  case 310:
545  fHistPtYDaughterSource[1]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
546  fHistPtPhiDaughterSource[1]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
547  fHistPtDaughterPtSourceInput[1]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
548  fHistPhiDaughterPhiSourceInput[1]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
549  break;
550  case 130:
551  fHistPtYDaughterSource[2]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
552  fHistPtPhiDaughterSource[2]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
553  fHistPtDaughterPtSourceInput[2]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
554  fHistPhiDaughterPhiSourceInput[2]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
555  break;
556  case 3122:
557  fHistPtYDaughterSource[3]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
558  fHistPtPhiDaughterSource[3]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
559  fHistPtDaughterPtSourceInput[3]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
560  fHistPhiDaughterPhiSourceInput[3]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
561  break;
562  case 113:
563  fHistPtYDaughterSource[4]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
564  fHistPtPhiDaughterSource[4]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
565  fHistPtDaughterPtSourceInput[4]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
566  fHistPhiDaughterPhiSourceInput[4]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
567  break;
568  case 331:
569  fHistPtYDaughterSource[5]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
570  fHistPtPhiDaughterSource[5]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
571  fHistPtDaughterPtSourceInput[5]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
572  fHistPhiDaughterPhiSourceInput[5]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
573  break;
574  case 223:
575  fHistPtYDaughterSource[6]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
576  fHistPtPhiDaughterSource[6]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
577  fHistPtDaughterPtSourceInput[6]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
578  fHistPhiDaughterPhiSourceInput[6]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
579  break;
580  case 213:
581  fHistPtYDaughterSource[7]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
582  fHistPtPhiDaughterSource[7]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
583  fHistPtDaughterPtSourceInput[7]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
584  fHistPhiDaughterPhiSourceInput[7]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
585  break;
586  case -213:
587  fHistPtYDaughterSource[8]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
588  fHistPtPhiDaughterSource[8]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
589  fHistPtDaughterPtSourceInput[8]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
590  fHistPhiDaughterPhiSourceInput[8]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
591  break;
592  case 333:
593  fHistPtYDaughterSource[9]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
594  fHistPtPhiDaughterSource[9]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
595  fHistPtDaughterPtSourceInput[9]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
596  fHistPhiDaughterPhiSourceInput[9]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
597  break;
598  case 443:
599  fHistPtYDaughterSource[10]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
600  fHistPtPhiDaughterSource[10]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
601  fHistPtDaughterPtSourceInput[10]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
602  fHistPhiDaughterPhiSourceInput[10]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
603  break;
604  case 2114:
605  fHistPtYDaughterSource[11]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
606  fHistPtPhiDaughterSource[11]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
607  fHistPtDaughterPtSourceInput[11]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
608  fHistPhiDaughterPhiSourceInput[11]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
609  break;
610  case 2214:
611  fHistPtYDaughterSource[12]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
612  fHistPtPhiDaughterSource[12]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
613  fHistPtDaughterPtSourceInput[12]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
614  fHistPhiDaughterPhiSourceInput[12]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
615  break;
616  case 1114:
617  fHistPtYDaughterSource[13]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
618  fHistPtPhiDaughterSource[13]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
619  fHistPtDaughterPtSourceInput[13]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
620  fHistPhiDaughterPhiSourceInput[13]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
621  break;
622  case 2224:
623  fHistPtYDaughterSource[14]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
624  fHistPtPhiDaughterSource[14]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
625  fHistPtDaughterPtSourceInput[14]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
626  fHistPhiDaughterPhiSourceInput[14]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
627  break;
628  case 321:
629  fHistPtYDaughterSource[15]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
630  fHistPtPhiDaughterSource[15]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
631  fHistPtDaughterPtSourceInput[15]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
632  fHistPhiDaughterPhiSourceInput[15]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
633  break;
634  case -321:
635  fHistPtYDaughterSource[16]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
636  fHistPtPhiDaughterSource[16]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
637  fHistPtDaughterPtSourceInput[16]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
638  fHistPhiDaughterPhiSourceInput[16]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
639  break;
640  case -3334:
641  fHistPtYDaughterSource[17]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
642  fHistPtPhiDaughterSource[17]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
643  fHistPtDaughterPtSourceInput[17]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
644  fHistPhiDaughterPhiSourceInput[17]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
645  break;
646  case 3334:
647  fHistPtYDaughterSource[18]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
648  fHistPtPhiDaughterSource[18]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
649  fHistPtDaughterPtSourceInput[18]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
650  fHistPhiDaughterPhiSourceInput[18]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
651  break;
652  case -3312:
653  fHistPtYDaughterSource[19]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
654  fHistPtPhiDaughterSource[19]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
655  fHistPtDaughterPtSourceInput[19]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
656  fHistPhiDaughterPhiSourceInput[19]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
657  break;
658  case 3312:
659  fHistPtYDaughterSource[20]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
660  fHistPtPhiDaughterSource[20]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
661  fHistPtDaughterPtSourceInput[20]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
662  fHistPhiDaughterPhiSourceInput[20]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
663  break;
664  case 3224:
665  fHistPtYDaughterSource[21]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
666  fHistPtPhiDaughterSource[21]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
667  fHistPtDaughterPtSourceInput[21]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
668  fHistPhiDaughterPhiSourceInput[21]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
669  break;
670  case 3114:
671  fHistPtYDaughterSource[22]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
672  fHistPtPhiDaughterSource[22]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
673  fHistPtDaughterPtSourceInput[22]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
674  fHistPhiDaughterPhiSourceInput[22]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
675  break;
676  case 313:
677  fHistPtYDaughterSource[23]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
678  fHistPtPhiDaughterSource[23]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
679  fHistPtDaughterPtSourceInput[23]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
680  fHistPhiDaughterPhiSourceInput[23]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
681  break;
682  default:
683  fHistPdgDaughterSourceRest->Fill(motherParticle->GetPdgCode());
684  break;
685  }
686  }
687  }
688 
689  // source
690  if(particle->GetPdgCode()!=PdgAnalyzedParticle && particleIsPrimary && fHasMother[GetParticlePosLocal(particle->GetPdgCode())]){
691  if (TMath::Abs(y) > fMaxY) continue;
692 
693  switch(particle->GetPdgCode()){
694  case 221:
695  fHistPtYInput[0]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
696  fHistPtPhiInput[0]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
697  fHistDecayChannelsInput[0]->Fill(0., particle->GetWeight());
698  fHistDecayChannelsInput[0]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
699  break;
700  case 310:
701  fHistPtYInput[1]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
702  fHistPtPhiInput[1]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
703  fHistDecayChannelsInput[1]->Fill(0., particle->GetWeight());
704  fHistDecayChannelsInput[1]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
705  break;
706  case 130:
707  fHistPtYInput[2]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
708  fHistPtPhiInput[2]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
709  fHistDecayChannelsInput[2]->Fill(0., particle->GetWeight());
710  fHistDecayChannelsInput[2]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
711  break;
712  case 3122:
713  fHistPtYInput[3]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
714  fHistPtPhiInput[3]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
715  fHistDecayChannelsInput[3]->Fill(0., particle->GetWeight());
716  fHistDecayChannelsInput[3]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
717  break;
718  case 113:
719  fHistPtYInput[4]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
720  fHistPtPhiInput[4]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
721  fHistDecayChannelsInput[4]->Fill(0., particle->GetWeight());
722  fHistDecayChannelsInput[4]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
723  break;
724  case 331:
725  fHistPtYInput[5]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
726  fHistPtPhiInput[5]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
727  fHistDecayChannelsInput[5]->Fill(0., particle->GetWeight());
728  fHistDecayChannelsInput[5]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
729  break;
730  case 223:
731  fHistPtYInput[6]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
732  fHistPtPhiInput[6]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
733  fHistDecayChannelsInput[6]->Fill(0., particle->GetWeight());
734  fHistDecayChannelsInput[6]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
735  break;
736  case 213:
737  fHistPtYInput[7]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
738  fHistPtPhiInput[7]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
739  fHistDecayChannelsInput[7]->Fill(0., particle->GetWeight());
740  fHistDecayChannelsInput[7]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
741  break;
742  case -213:
743  fHistPtYInput[8]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
744  fHistPtPhiInput[8]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
745  fHistDecayChannelsInput[8]->Fill(0., particle->GetWeight());
746  fHistDecayChannelsInput[8]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
747  break;
748  case 333:
749  fHistPtYInput[9]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
750  fHistPtPhiInput[9]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
751  fHistDecayChannelsInput[9]->Fill(0., particle->GetWeight());
752  fHistDecayChannelsInput[9]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
753  break;
754  case 443:
755  fHistPtYInput[10]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
756  fHistPtPhiInput[10]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
757  fHistDecayChannelsInput[10]->Fill(0., particle->GetWeight());
758  fHistDecayChannelsInput[10]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
759  break;
760  case 2114:
761  fHistPtYInput[11]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
762  fHistPtPhiInput[11]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
763  fHistDecayChannelsInput[11]->Fill(0., particle->GetWeight());
764  fHistDecayChannelsInput[11]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
765  break;
766  case 2214:
767  fHistPtYInput[12]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
768  fHistPtPhiInput[12]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
769  fHistDecayChannelsInput[12]->Fill(0., particle->GetWeight());
770  fHistDecayChannelsInput[12]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
771  break;
772  case 1114:
773  fHistPtYInput[13]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
774  fHistPtPhiInput[13]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
775  fHistDecayChannelsInput[13]->Fill(0., particle->GetWeight());
776  fHistDecayChannelsInput[13]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
777  break;
778  case 2224:
779  fHistPtYInput[14]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
780  fHistPtPhiInput[14]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
781  fHistDecayChannelsInput[14]->Fill(0., particle->GetWeight());
782  fHistDecayChannelsInput[14]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
783  break;
784  case 321:
785  fHistPtYInput[15]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
786  fHistPtPhiInput[15]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
787  fHistDecayChannelsInput[15]->Fill(0., particle->GetWeight());
788  fHistDecayChannelsInput[15]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
789  break;
790  case -321:
791  fHistPtYInput[16]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
792  fHistPtPhiInput[16]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
793  fHistDecayChannelsInput[16]->Fill(0., particle->GetWeight());
794  fHistDecayChannelsInput[16]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
795  break;
796  case -3334:
797  fHistPtYInput[17]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
798  fHistPtPhiInput[17]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
799  fHistDecayChannelsInput[17]->Fill(0., particle->GetWeight());
800  fHistDecayChannelsInput[17]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
801  break;
802  case 3334:
803  fHistPtYInput[18]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
804  fHistPtPhiInput[18]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
805  fHistDecayChannelsInput[18]->Fill(0., particle->GetWeight());
806  fHistDecayChannelsInput[18]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
807  break;
808  case -3312:
809  fHistPtYInput[19]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
810  fHistPtPhiInput[19]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
811  fHistDecayChannelsInput[19]->Fill(0., particle->GetWeight());
812  fHistDecayChannelsInput[19]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
813  break;
814  case 3312:
815  fHistPtYInput[20]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
816  fHistPtPhiInput[20]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
817  fHistDecayChannelsInput[20]->Fill(0., particle->GetWeight());
818  fHistDecayChannelsInput[20]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
819  break;
820  case 3224:
821  fHistPtYInput[21]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
822  fHistPtPhiInput[21]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
823  fHistDecayChannelsInput[21]->Fill(0., particle->GetWeight());
824  fHistDecayChannelsInput[21]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
825  break;
826  case 3114:
827  fHistPtYInput[22]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
828  fHistPtPhiInput[22]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
829  fHistDecayChannelsInput[22]->Fill(0., particle->GetWeight());
830  fHistDecayChannelsInput[22]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
831  break;
832  case 313:
833  fHistPtYInput[23]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
834  fHistPtPhiInput[23]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
835  fHistDecayChannelsInput[23]->Fill(0., particle->GetWeight());
836  fHistDecayChannelsInput[23]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
837  break;
838  default:
839  fHistPdgInputRest->Fill(particle->GetPdgCode());
840  break;
841  }
842  }
843 
844  // gamma from X/pi0 from source
845  if (particle->GetPdgCode()==22 && motherHasMother) {
846  // additional condition to remove gammas out of eta range
847  if (fMaxEta>0){
848  if (TMath::Abs(particle->Eta()) > fMaxEta) continue;
849  } else {
850  if (TMath::Abs(y) > fMaxY) continue;
851  }
852  if (grandMotherIsPrimary && fHasMother[GetParticlePosLocal(grandMotherParticle->GetPdgCode())]) {
853 
854  switch(grandMotherParticle->GetPdgCode()){
855  case 310:
856  fHistPtYGammaFromXFromInput[0]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
857  fHistPtPhiGammaFromXFromInput[0]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
858  if(motherParticle->GetPdgCode() == 111) {
859  fHistPtYGammaFromPi0FromInput[0]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
860  fHistPtPhiGammaFromPi0FromInput[0]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
861  }
862  break;
863  case 130:
864  fHistPtYGammaFromXFromInput[1]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
865  fHistPtPhiGammaFromXFromInput[1]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
866  if(motherParticle->GetPdgCode() == 111) {
867  fHistPtYGammaFromPi0FromInput[1]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
868  fHistPtPhiGammaFromPi0FromInput[1]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
869  }
870  break;
871  case 3122:
872  fHistPtYGammaFromXFromInput[2]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
873  fHistPtPhiGammaFromXFromInput[2]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
874  if(motherParticle->GetPdgCode() == 111) {
875  fHistPtYGammaFromPi0FromInput[2]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
876  fHistPtPhiGammaFromPi0FromInput[2]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
877  }
878  break;
879  }
880  }
881  }
882  }
883 }
884 
885 //_________________________________________________________________________________
887 {
888  //fOutputContainer->Print(); // Will crash on GRID
889 }
890 
891 //_________________________________________________________________________________
893  if (flag>=0 && flag<3) {
894  fAnalyzedMeson = flag;
895  // neutral pion flag
896  if (fAnalyzedMeson==0) fAnalyzeNeutralPi = kTRUE;
897  else fAnalyzeNeutralPi = kFALSE;
898  // charged pion flag
899  if (fAnalyzedMeson==2) fAnalyzeChargedPi = kTRUE;
900  else fAnalyzeChargedPi = kFALSE;
901  } else {
902  AliFatalClass(Form("Requested particle type flag (%d) for analysis not recognized!",flag));
903  }
904 }
905 
906 //_________________________________________________________________________________
908  TAxis *axisafter = histoRebin->GetXaxis();
909  Int_t bins = axisafter->GetNbins();
910  Double_t from = axisafter->GetXmin();
911  Double_t to = axisafter->GetXmax();
912  Double_t *newbins = new Double_t[bins+1];
913  newbins[0] = from;
914  Double_t factor = TMath::Power(to/from, 1./bins);
915  for(Int_t i=1; i<=bins; ++i) newbins[i] = factor * newbins[i-1];
916  axisafter->Set(bins, newbins);
917  delete [] newbins;
918 }
919 
920 //_________________________________________________________________________________
922  TAxis *axisafter = histoRebin->GetXaxis();
923  Int_t bins = axisafter->GetNbins();
924  Double_t from = axisafter->GetXmin();
925  Double_t to = axisafter->GetXmax();
926  Double_t *newbins = new Double_t[bins+1];
927  newbins[0] = from;
928  Double_t factor = TMath::Power(to/from, 1./bins);
929  for(Int_t i=1; i<=bins; ++i) newbins[i] = factor * newbins[i-1];
930  axisafter->Set(bins, newbins);
931  delete [] newbins;
932 }
933 
934 //_________________________________________________________________________________
936 
937  switch (np) {
938 
939  case 0: // eta
940  hist->GetXaxis()->SetBinLabel(1,"all");
941  hist->GetXaxis()->SetBinLabel(2,"#gamma #gamma");
942  hist->GetXaxis()->SetBinLabel(3,"#pi^{0} #pi^{0} #pi^{0}");
943  hist->GetXaxis()->SetBinLabel(4,"#pi^{0} #gamma #gamma");
944  hist->GetXaxis()->SetBinLabel(5,"#pi^{+} #pi^{-} #pi^{0}");
945  hist->GetXaxis()->SetBinLabel(6,"#pi^{+} #pi^{-} #gamma");
946  hist->GetXaxis()->SetBinLabel(20,"rest");
947  break;
948 
949  case 1: // K0s
950  hist->GetXaxis()->SetBinLabel(1,"all");
951  hist->GetXaxis()->SetBinLabel(2,"#pi^{0} #pi^{0}");
952  hist->GetXaxis()->SetBinLabel(3,"#pi^{+} #pi^{-}");
953  hist->GetXaxis()->SetBinLabel(4,"#pi^{+} #pi^{-} #pi^{0}");
954  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} #gamma #gamma");
955  hist->GetXaxis()->SetBinLabel(6,"#pi^{0} e^{+} e^{-}");
956  hist->GetXaxis()->SetBinLabel(7,"#pi^{0} #mu^{+} #mu^{-}");
957  hist->GetXaxis()->SetBinLabel(8,"#pi^{+} #pi^{-} #gamma");
958  hist->GetXaxis()->SetBinLabel(9,"#pi^{+} #pi^{-} e^{+} e^{-}");
959  hist->GetXaxis()->SetBinLabel(10,"#pi^{#pm} e^{#mp} #nu");
960  hist->GetXaxis()->SetBinLabel(11,"#pi^{#pm} #mu^{#mp} #nu");
961  hist->GetXaxis()->SetBinLabel(20,"rest");
962  break;
963 
964  case 2: // K0l
965  hist->GetXaxis()->SetBinLabel(1,"all");
966  hist->GetXaxis()->SetBinLabel(2,"#pi^{0} #pi^{0} #pi^{0}");
967  hist->GetXaxis()->SetBinLabel(3,"#pi^{+} #pi^{-} #pi^{0}");
968  hist->GetXaxis()->SetBinLabel(4,"#pi^{0} #pi^{0}");
969  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} #gamma #gamma");
970  hist->GetXaxis()->SetBinLabel(6,"#pi^{0} e^{+} e^{-} #gamma");
971  hist->GetXaxis()->SetBinLabel(7,"#pi^{0} #pi^{#pm} e^{#mp} #nu");
972  hist->GetXaxis()->SetBinLabel(8,"#pi^{+} #pi^{-}");
973  hist->GetXaxis()->SetBinLabel(9,"#pi^{#pm} e^{#mp} #nu");
974  hist->GetXaxis()->SetBinLabel(10,"#pi^{#pm} #mu^{#mp} #nu");
975  hist->GetXaxis()->SetBinLabel(11,"#pi^{#pm} e^{#mp} #nu #e{+} e^{-}");
976  hist->GetXaxis()->SetBinLabel(12,"#pi^{#pm} e^{#mp} #nu #gamma");
977  hist->GetXaxis()->SetBinLabel(13,"#pi^{#pm} #mu^{#mp} #nu #gamma");
978  hist->GetXaxis()->SetBinLabel(14,"#pi^{+} #pi^{-} #gamma");
979  hist->GetXaxis()->SetBinLabel(20,"rest");
980  break;
981 
982  case 3: // Lambda
983  hist->GetXaxis()->SetBinLabel(1,"all");
984  hist->GetXaxis()->SetBinLabel(2,"p #pi^{-}");
985  hist->GetXaxis()->SetBinLabel(3,"n #pi^{0}");
986  hist->GetXaxis()->SetBinLabel(4,"p #pi^{-} #gamma");
987  hist->GetXaxis()->SetBinLabel(20,"rest");
988  break;
989 
990  case 4: // rho0
991  hist->GetXaxis()->SetBinLabel(1,"all");
992  hist->GetXaxis()->SetBinLabel(2,"#pi^{+} #pi^{-}");
993  hist->GetXaxis()->SetBinLabel(3,"#pi^{0} #gamma");
994  hist->GetXaxis()->SetBinLabel(4,"#eta #gamma");
995  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} #pi^{0} #gamma");
996  hist->GetXaxis()->SetBinLabel(6,"#pi^{+} #pi^{-} #pi^{0}");
997  hist->GetXaxis()->SetBinLabel(7,"#pi^{+} #pi^{-} #pi^{0} #pi^{0}");
998  hist->GetXaxis()->SetBinLabel(8,"#pi^{+} #pi^{-} #gamma");
999  hist->GetXaxis()->SetBinLabel(20,"rest");
1000  break;
1001 
1002  case 5: // eta'
1003  hist->GetXaxis()->SetBinLabel(1,"all");
1004  hist->GetXaxis()->SetBinLabel(2,"#pi^{+} #pi^{-} #eta");
1005  hist->GetXaxis()->SetBinLabel(3,"#pi^{0} #pi^{0} #eta");
1006  hist->GetXaxis()->SetBinLabel(4,"#pi^{0} #pi^{0} #pi^{0}");
1007  hist->GetXaxis()->SetBinLabel(5,"#pi^{+} #pi^{-} #pi^{0}");
1008  hist->GetXaxis()->SetBinLabel(6,"#pi^{#pm} #rho^{#mp}");
1009  hist->GetXaxis()->SetBinLabel(7,"#pi^{+} #pi^{-} #pi^{0} #pi^{0}");
1010  hist->GetXaxis()->SetBinLabel(8,"#pi^{+} #pi^{-} e^{+} e^{-}");
1011  hist->GetXaxis()->SetBinLabel(20,"rest");
1012  break;
1013 
1014  case 6: // omega
1015  hist->GetXaxis()->SetBinLabel(1,"all");
1016  hist->GetXaxis()->SetBinLabel(2,"#pi^{+} #pi^{-} #pi^{0}");
1017  hist->GetXaxis()->SetBinLabel(3,"#pi^{0} #gamma");
1018  hist->GetXaxis()->SetBinLabel(4,"#eta #gamma");
1019  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} e^{+} e^{-}");
1020  hist->GetXaxis()->SetBinLabel(6,"#pi^{0} #mu^{+} #mu^{-}");
1021  hist->GetXaxis()->SetBinLabel(7,"#pi^{0} #pi^{0} #gamma");
1022  hist->GetXaxis()->SetBinLabel(8,"#pi^{+} #pi^{-}");
1023  hist->GetXaxis()->SetBinLabel(20,"rest");
1024  break;
1025 
1026  case 7: // rho+
1027  hist->GetXaxis()->SetBinLabel(1,"all");
1028  hist->GetXaxis()->SetBinLabel(2,"#pi^{+} #pi^{0}");
1029  hist->GetXaxis()->SetBinLabel(3,"#pi^{+} #gamma");
1030  hist->GetXaxis()->SetBinLabel(20,"rest");
1031  break;
1032 
1033  case 8: // rho-
1034  hist->GetXaxis()->SetBinLabel(1,"all");
1035  hist->GetXaxis()->SetBinLabel(2,"#pi^{-} #pi^{0}");
1036  hist->GetXaxis()->SetBinLabel(3,"#pi^{-} #gamma");
1037  hist->GetXaxis()->SetBinLabel(20,"rest");
1038  break;
1039 
1040  case 9: // phi
1041  hist->GetXaxis()->SetBinLabel(1,"all");
1042  hist->GetXaxis()->SetBinLabel(2,"K^{+} K^{-}");
1043  hist->GetXaxis()->SetBinLabel(3,"K^{0}_{L} K^{0}_{S}");
1044  hist->GetXaxis()->SetBinLabel(4,"#eta #gamma");
1045  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} #gamma");
1046  hist->GetXaxis()->SetBinLabel(6,"#eta e^{+} e^{-}");
1047  hist->GetXaxis()->SetBinLabel(7,"#omega #pi^{0}");
1048  hist->GetXaxis()->SetBinLabel(8,"#pi^{0} #pi^{0} #gamma");
1049  hist->GetXaxis()->SetBinLabel(9,"#pi^{0} e^{+} e^{-}");
1050  hist->GetXaxis()->SetBinLabel(10,"#pi^{0} #eta #gamma");
1051  hist->GetXaxis()->SetBinLabel(11,"#pi^{+} #pi^{-} #pi^{0}");
1052  hist->GetXaxis()->SetBinLabel(12,"#rho^{0} #pi^{0}");
1053  hist->GetXaxis()->SetBinLabel(13,"#rho^{#pm} #pi^{#mp}");
1054  hist->GetXaxis()->SetBinLabel(20,"rest");
1055  break;
1056 
1057  case 10: // J/psi
1058  hist->GetXaxis()->SetBinLabel(1,"all");
1059  hist->GetXaxis()->SetBinLabel(2,"#pi^{0} X");
1060  hist->GetXaxis()->SetBinLabel(3,"#eta X");
1061  hist->GetXaxis()->SetBinLabel(4,"#pi^{+} X");
1062  hist->GetXaxis()->SetBinLabel(5,"#pi^{-} X");
1063  hist->GetXaxis()->SetBinLabel(20,"rest");
1064  break;
1065 
1066  case 11: //Delta0
1067  hist->GetXaxis()->SetBinLabel(1,"all");
1068  hist->GetXaxis()->SetBinLabel(2,"n #pi^{0}");
1069  hist->GetXaxis()->SetBinLabel(3,"p #pi^{-}");
1070  hist->GetXaxis()->SetBinLabel(20,"rest");
1071  break;
1072 
1073  case 12: // Delta+
1074  hist->GetXaxis()->SetBinLabel(1,"all");
1075  hist->GetXaxis()->SetBinLabel(2,"n #pi^{+}");
1076  hist->GetXaxis()->SetBinLabel(3,"p #pi^{0}");
1077  hist->GetXaxis()->SetBinLabel(20,"rest");
1078  break;
1079 
1080  case 13: // Delta-
1081  hist->GetXaxis()->SetBinLabel(1,"all");
1082  hist->GetXaxis()->SetBinLabel(2,"n #pi^{-}");
1083  hist->GetXaxis()->SetBinLabel(20,"rest");
1084  break;
1085 
1086  case 14: //Delta++
1087  hist->GetXaxis()->SetBinLabel(1,"all");
1088  hist->GetXaxis()->SetBinLabel(2,"p #pi^{+}");
1089  hist->GetXaxis()->SetBinLabel(20,"rest");
1090  break;
1091 
1092  case 15: // K+
1093  hist->GetXaxis()->SetBinLabel(1,"all");
1094  hist->GetXaxis()->SetBinLabel(2,"#mu^{+} #nu");
1095  hist->GetXaxis()->SetBinLabel(3,"#mu^{+} #nu #gamma");
1096  hist->GetXaxis()->SetBinLabel(4,"#pi^{0} e^{+} #nu");
1097  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} #mu^{+} #nu");
1098  hist->GetXaxis()->SetBinLabel(6,"#pi^{0} #pi^{0} e^{+} #nu");
1099  hist->GetXaxis()->SetBinLabel(7,"#pi^{+} #pi^{-} e^{+} #nu");
1100  hist->GetXaxis()->SetBinLabel(8,"#pi^{+} #pi^{0}");
1101  hist->GetXaxis()->SetBinLabel(9,"#pi^{+} #pi^{0} #pi^{0}");
1102  hist->GetXaxis()->SetBinLabel(10,"#pi^{+} #pi^{+} #pi^{-}");
1103  hist->GetXaxis()->SetBinLabel(20,"rest");
1104  break;
1105 
1106  case 16: // K-
1107  hist->GetXaxis()->SetBinLabel(1,"all");
1108  hist->GetXaxis()->SetBinLabel(2,"#mu^{-} #nu");
1109  hist->GetXaxis()->SetBinLabel(3,"#mu^{-} #nu #gamma");
1110  hist->GetXaxis()->SetBinLabel(4,"#pi^{0} e^{-} #nu");
1111  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} #mu^{-} #nu");
1112  hist->GetXaxis()->SetBinLabel(6,"#pi^{0} #pi^{0} e^{-} #nu");
1113  hist->GetXaxis()->SetBinLabel(7,"#pi^{+} #pi^{-} e^{-} #nu");
1114  hist->GetXaxis()->SetBinLabel(8,"#pi^{-} #pi^{0}");
1115  hist->GetXaxis()->SetBinLabel(9,"#pi^{-} #pi^{0} #pi^{0}");
1116  hist->GetXaxis()->SetBinLabel(10,"#pi^{+} #pi^{-} #pi^{-}");
1117  hist->GetXaxis()->SetBinLabel(20,"rest");
1118  break;
1119 
1120  case 17: // Omega+
1121  hist->GetXaxis()->SetBinLabel(1,"all");
1122  hist->GetXaxis()->SetBinLabel(2,"#Lambda K^{+}");
1123  hist->GetXaxis()->SetBinLabel(3,"#Xi^{0} #pi^{+}");
1124  hist->GetXaxis()->SetBinLabel(4,"#Xi^{+} #pi^{0}");
1125  hist->GetXaxis()->SetBinLabel(5,"#Xi^{+} #pi^{+} #pi^{-}");
1126  hist->GetXaxis()->SetBinLabel(20,"rest");
1127  break;
1128 
1129  case 18: // Omega-
1130  hist->GetXaxis()->SetBinLabel(1,"all");
1131  hist->GetXaxis()->SetBinLabel(2,"#Lambda K^{-}");
1132  hist->GetXaxis()->SetBinLabel(3,"#Xi^{0} #pi^{-}");
1133  hist->GetXaxis()->SetBinLabel(4,"#Xi^{-} #pi^{0}");
1134  hist->GetXaxis()->SetBinLabel(5,"#Xi^{-} #pi^{+} #pi^{-}");
1135  hist->GetXaxis()->SetBinLabel(20,"rest");
1136  break;
1137 
1138  case 19: // Xi+
1139  hist->GetXaxis()->SetBinLabel(1,"all");
1140  hist->GetXaxis()->SetBinLabel(2,"#Lambda #pi^{+}");
1141  hist->GetXaxis()->SetBinLabel(20,"rest");
1142  break;
1143 
1144  case 20: // Xi-
1145  hist->GetXaxis()->SetBinLabel(1,"all");
1146  hist->GetXaxis()->SetBinLabel(2,"#Lambda #pi^{-}");
1147  hist->GetXaxis()->SetBinLabel(20,"rest");
1148  break;
1149 
1150  case 21: // Sigma(1385)+
1151  hist->GetXaxis()->SetBinLabel(1,"all");
1152  hist->GetXaxis()->SetBinLabel(2,"#Lambda #pi^{+}");
1153  hist->GetXaxis()->SetBinLabel(3,"#Sigma^{0} #pi^{+}");
1154  hist->GetXaxis()->SetBinLabel(4,"#Sigma^{+} #pi^{0}");
1155  hist->GetXaxis()->SetBinLabel(20,"rest");
1156  break;
1157 
1158  case 22: // Sigma(1385)-
1159  hist->GetXaxis()->SetBinLabel(1,"all");
1160  hist->GetXaxis()->SetBinLabel(2,"#Lambda #pi^{-}");
1161  hist->GetXaxis()->SetBinLabel(3,"#Sigma^{0} #pi^{-}");
1162  hist->GetXaxis()->SetBinLabel(4,"#Sigma^{-} #pi^{0}");
1163  hist->GetXaxis()->SetBinLabel(20,"rest");
1164  break;
1165 
1166  case 23: // K*(892)0
1167  hist->GetXaxis()->SetBinLabel(1,"all");
1168  hist->GetXaxis()->SetBinLabel(2,"K^{+} #pi^{-}");
1169  hist->GetXaxis()->SetBinLabel(3,"K^{-} #pi^{+}");
1170  hist->GetXaxis()->SetBinLabel(4,"K^{0} #pi^{0}");
1171  hist->GetXaxis()->SetBinLabel(20,"rest");
1172  break;
1173 
1174  default:
1175  break;
1176  }
1177 }
1178 
1179 //_________________________________________________________________________________
1180 Float_t AliAnalysisTaskHadronicCocktailMC::GetDecayChannel(AliMCEvent* mcEvent, TParticle* part) {
1181 
1182  Int_t nDaughters = part->GetNDaughters();
1183  if (nDaughters > 10) return 19.;
1184 
1185  std::vector<Long64_t> *PdgDaughter = new std::vector<Long64_t>(nDaughters);
1186  Long64_t tempPdgCode = 0;
1187  for (Int_t i=0; i<nDaughters; i++) {
1188  tempPdgCode = (Long64_t)((TParticle*)mcEvent->Particle(part->GetFirstDaughter()+i))->GetPdgCode();
1189  if (TMath::Abs(tempPdgCode) == 111 || TMath::Abs(tempPdgCode) == 113 || TMath::Abs(tempPdgCode) == 130 || TMath::Abs(tempPdgCode) == 310 || TMath::Abs(tempPdgCode) == 223 || TMath::Abs(tempPdgCode) == 221 || TMath::Abs(tempPdgCode) == 331 || TMath::Abs(tempPdgCode) == 2112 || TMath::Abs(tempPdgCode) == 3122 || TMath::Abs(tempPdgCode) == 9000111 || TMath::Abs(tempPdgCode) == 9010221 || TMath::Abs(tempPdgCode) == 3322)
1190  tempPdgCode = TMath::Abs(tempPdgCode);
1191  PdgDaughter->at(i) = tempPdgCode;
1192  }
1193  std::sort(PdgDaughter->begin(), PdgDaughter->end());
1194 
1195  Double_t returnVal = -1.;
1196 
1197  switch (part->GetPdgCode()) {
1198  case 221:
1199  if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22)
1200  returnVal = 1.;
1201  else if (nDaughters == 3 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1202  returnVal = 2.;
1203  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 111)
1204  returnVal = 3.;
1205  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1206  returnVal = 4.;
1207  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1208  returnVal = 5.;
1209  else
1210  returnVal = 19.;
1211  break;
1212 
1213  case 310:
1214  if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111)
1215  returnVal = 1.;
1216  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211)
1217  returnVal = 2.;
1218  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1219  returnVal = 3.;
1220  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 111)
1221  returnVal = 4.;
1222  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 111)
1223  returnVal = 5.;
1224  else if (nDaughters == 3 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 111)
1225  returnVal = 6.;
1226  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1227  returnVal = 7.;
1228  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 11 && PdgDaughter->at(3) == 211)
1229  returnVal = 8.;
1230  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 12)
1231  returnVal = 9.;
1232  else if (nDaughters == 3 && PdgDaughter->at(0) == -12 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 211)
1233  returnVal = 9.;
1234  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -13 && PdgDaughter->at(2) == 14)
1235  returnVal = 10.;
1236  else if (nDaughters == 3 && PdgDaughter->at(0) == -14 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 211)
1237  returnVal = 10.;
1238  else
1239  returnVal = 19.;
1240  break;
1241 
1242  case 130:
1243  if (nDaughters == 3 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1244  returnVal = 1.;
1245  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1246  returnVal = 2.;
1247  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111)
1248  returnVal = 3.;
1249  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 111)
1250  returnVal = 4.;
1251  else if (nDaughters == 4 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 111)
1252  returnVal = 5.;
1253  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 12 && PdgDaughter->at(3) == 111)
1254  returnVal = 6.;
1255  else if (nDaughters == 4 && PdgDaughter->at(0) == -12 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 111 && PdgDaughter->at(3) == 211)
1256  returnVal = 6.;
1257  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211)
1258  returnVal = 7.;
1259  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 12)
1260  returnVal = 8.;
1261  else if (nDaughters == 3 && PdgDaughter->at(0) == -12 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 211)
1262  returnVal = 8.;
1263  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -13 && PdgDaughter->at(2) == 14)
1264  returnVal = 9.;
1265  else if (nDaughters == 3 && PdgDaughter->at(0) == -14 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 211)
1266  returnVal = 9.;
1267  else if (nDaughters == 5 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == -11 && PdgDaughter->at(3) == 11 && PdgDaughter->at(4) == 12)
1268  returnVal = 10.;
1269  else if (nDaughters == 5 && PdgDaughter->at(0) == -12 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 11 && PdgDaughter->at(3) == 11 && PdgDaughter->at(4) == 211)
1270  returnVal = 10.;
1271  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 12 && PdgDaughter->at(3) == 22)
1272  returnVal = 11.;
1273  else if (nDaughters == 4 && PdgDaughter->at(0) == -12 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 211)
1274  returnVal = 11.;
1275  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -13 && PdgDaughter->at(2) == 14 && PdgDaughter->at(3) == 22)
1276  returnVal = 12.;
1277  else if (nDaughters == 4 && PdgDaughter->at(0) == -14 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 211)
1278  returnVal = 12.;
1279  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1280  returnVal = 13.;
1281  else
1282  returnVal = 19.;
1283  break;
1284 
1285  case 3122:
1286  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 2212)
1287  returnVal = 1.;
1288  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 2112)
1289  returnVal = 2.;
1290  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 2212)
1291  returnVal = 3.;
1292  else
1293  returnVal = 19.;
1294  break;
1295 
1296  case 113:
1297  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211)
1298  returnVal = 1.;
1299  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111)
1300  returnVal = 2.;
1301  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 221)
1302  returnVal = 3.;
1303  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1304  returnVal = 4.;
1305  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1306  returnVal = 5.;
1307  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111 && PdgDaughter->at(3) == 211)
1308  returnVal = 6.;
1309  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1310  returnVal = 7.;
1311  else
1312  returnVal = 19.;
1313  break;
1314 
1315  case 331:
1316  if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211 && PdgDaughter->at(2) == 221)
1317  returnVal = 1.;
1318  else if (nDaughters == 3 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 221)
1319  returnVal = 2.;
1320  else if (nDaughters == 3 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1321  returnVal = 3.;
1322  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1323  returnVal = 4.;
1324  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 213)
1325  returnVal = 5.;
1326  else if (nDaughters == 2 && PdgDaughter->at(0) == -213 && PdgDaughter->at(1) == 211)
1327  returnVal = 5.;
1328  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111 && PdgDaughter->at(3) == 211)
1329  returnVal = 6.;
1330  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 11 && PdgDaughter->at(3) == 211)
1331  returnVal = 7.;
1332  else
1333  returnVal = 19.;
1334  break;
1335 
1336  case 223:
1337  if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1338  returnVal = 1.;
1339  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111)
1340  returnVal = 2.;
1341  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 221)
1342  returnVal = 3.;
1343  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 111)
1344  returnVal = 4.;
1345  else if (nDaughters == 3 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 111)
1346  returnVal = 5.;
1347  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1348  returnVal = 6.;
1349  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211)
1350  returnVal = 7.;
1351  else
1352  returnVal = 19.;
1353  break;
1354 
1355  case 213:
1356  if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 211)
1357  returnVal = 1.;
1358  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 211)
1359  returnVal = 2.;
1360  else
1361  returnVal = 19.;
1362  break;
1363 
1364  case -213:
1365  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111)
1366  returnVal = 1.;
1367  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22)
1368  returnVal = 1.;
1369  else
1370  returnVal = 19.;
1371  break;
1372 
1373  case 333:
1374  if (nDaughters == 2 && PdgDaughter->at(0) == -321 && PdgDaughter->at(1) == 321)
1375  returnVal = 1.;
1376  else if (nDaughters == 2 && PdgDaughter->at(0) == 130 && PdgDaughter->at(1) == 310)
1377  returnVal = 2.;
1378  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 221)
1379  returnVal = 3.;
1380  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111)
1381  returnVal = 4.;
1382  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 221)
1383  returnVal = 5.;
1384  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 223)
1385  returnVal = 6.;
1386  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1387  returnVal = 7.;
1388  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 111)
1389  returnVal = 8.;
1390  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 221)
1391  returnVal = 9.;
1392  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1393  returnVal = 10.;
1394  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 113)
1395  returnVal = 11.;
1396  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 213)
1397  returnVal = 12.;
1398  else if (nDaughters == 2 && PdgDaughter->at(0) == -213 && PdgDaughter->at(1) == 211)
1399  returnVal = 12.;
1400  else
1401  returnVal = 19.;
1402  break;
1403 
1404  case 443:
1405  if (std::find(PdgDaughter->begin(), PdgDaughter->end(), 111) != PdgDaughter->end())
1406  returnVal = 1.;
1407  else if (std::find(PdgDaughter->begin(), PdgDaughter->end(), 221) != PdgDaughter->end())
1408  returnVal = 2.;
1409  else if (std::find(PdgDaughter->begin(), PdgDaughter->end(), 211) != PdgDaughter->end())
1410  returnVal = 3.;
1411  else if (std::find(PdgDaughter->begin(), PdgDaughter->end(), -211) != PdgDaughter->end())
1412  returnVal = 4.;
1413  else
1414  returnVal = 19.;
1415  break;
1416 
1417  case 2114:
1418  if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 2112)
1419  returnVal = 1.;
1420  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 2212)
1421  returnVal = 2.;
1422  else
1423  returnVal = 19.;
1424  break;
1425 
1426  case 2214:
1427  if (nDaughters == 2 && PdgDaughter->at(0) == 211 && PdgDaughter->at(1) == 2112)
1428  returnVal = 1.;
1429  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 2212)
1430  returnVal = 2.;
1431  else
1432  returnVal = 19.;
1433  break;
1434 
1435  case 1114:
1436  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 2112)
1437  returnVal = 1.;
1438  else
1439  returnVal = 19.;
1440  break;
1441 
1442  case 2224:
1443  if (nDaughters == 2 && PdgDaughter->at(0) == 211 && PdgDaughter->at(1) == 2212)
1444  returnVal = 1.;
1445  else
1446  returnVal = 19.;
1447  break;
1448 
1449  case 321:
1450  if (nDaughters == 2 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 14)
1451  returnVal = 1.;
1452  else if (nDaughters == 3 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 14 && PdgDaughter->at(2) == 22)
1453  returnVal = 2.;
1454  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 12 && PdgDaughter->at(2) == 111)
1455  returnVal = 3.;
1456  else if (nDaughters == 3 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 14 && PdgDaughter->at(2) == 111)
1457  returnVal = 4.;
1458  else if (nDaughters == 4 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 12 && PdgDaughter->at(2) == 111 && PdgDaughter->at(3) == 111)
1459  returnVal = 5.;
1460  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 12 && PdgDaughter->at(3) == 211)
1461  returnVal = 6.;
1462  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 211)
1463  returnVal = 7.;
1464  else if (nDaughters == 3 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1465  returnVal = 8.;
1466  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211 && PdgDaughter->at(2) == 211)
1467  returnVal = 9.;
1468  else
1469  returnVal = 19.;
1470  break;
1471 
1472  case -321:
1473  if (nDaughters == 2 && PdgDaughter->at(0) == -14 && PdgDaughter->at(1) == 13)
1474  returnVal = 1.;
1475  else if (nDaughters == 3 && PdgDaughter->at(0) == -14 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 22)
1476  returnVal = 2.;
1477  else if (nDaughters == 3 && PdgDaughter->at(0) == -12 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 111)
1478  returnVal = 3.;
1479  else if (nDaughters == 3 && PdgDaughter->at(0) == -14 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 111)
1480  returnVal = 4.;
1481  else if (nDaughters == 4 && PdgDaughter->at(0) == -12 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 111 && PdgDaughter->at(3) == 111)
1482  returnVal = 5.;
1483  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -12 && PdgDaughter->at(2) == 11 && PdgDaughter->at(3) == 211)
1484  returnVal = 6.;
1485  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111)
1486  returnVal = 7.;
1487  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1488  returnVal = 8.;
1489  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -211 && PdgDaughter->at(2) == 211)
1490  returnVal = 9.;
1491  else
1492  returnVal = 19.;
1493  break;
1494 
1495  case -3334:
1496  if (nDaughters == 2 && PdgDaughter->at(0) == 321 && PdgDaughter->at(1) == 3122)
1497  returnVal = 1.;
1498  else if (nDaughters == 2 && PdgDaughter->at(0) == 211 && PdgDaughter->at(1) == 3322)
1499  returnVal = 2.;
1500  else if (nDaughters == 2 && PdgDaughter->at(0) == -3312 && PdgDaughter->at(1) == 111)
1501  returnVal = 3.;
1502  else if (nDaughters == 3 && PdgDaughter->at(0) == -3312 && PdgDaughter->at(1) == -211 && PdgDaughter->at(2) == 211)
1503  returnVal = 4.;
1504  else
1505  returnVal = 19.;
1506  break;
1507 
1508  case 3334:
1509  if (nDaughters == 2 && PdgDaughter->at(0) == -321 && PdgDaughter->at(1) == 3122)
1510  returnVal = 1.;
1511  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 3322)
1512  returnVal = 2.;
1513  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 3312)
1514  returnVal = 3.;
1515  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211 && PdgDaughter->at(2) == 3312)
1516  returnVal = 4.;
1517  else
1518  returnVal = 19.;
1519  break;
1520 
1521  case -3312:
1522  if (nDaughters == 2 && PdgDaughter->at(0) == 211 && PdgDaughter->at(1) == 3122)
1523  returnVal = 1.;
1524  else
1525  returnVal = 19.;
1526  break;
1527 
1528  case 3312:
1529  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 3122)
1530  returnVal = 1.;
1531  else
1532  returnVal = 19.;
1533  break;
1534 
1535  case 3224:
1536  if (nDaughters == 2 && PdgDaughter->at(0) == 211 && PdgDaughter->at(1) == 3122)
1537  returnVal = 1.;
1538  else if (nDaughters == 2 && PdgDaughter->at(0) == 211 && PdgDaughter->at(1) == 3212)
1539  returnVal = 2.;
1540  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 3222)
1541  returnVal = 3.;
1542  else
1543  returnVal = 19.;
1544  break;
1545 
1546  case 3114:
1547  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 3122)
1548  returnVal = 1.;
1549  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 3212)
1550  returnVal = 2.;
1551  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 3112)
1552  returnVal = 3.;
1553  else
1554  returnVal = 19.;
1555  break;
1556 
1557  case 313:
1558  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 321)
1559  returnVal = 1.;
1560  else if (nDaughters == 2 && PdgDaughter->at(0) == -321 && PdgDaughter->at(1) == 211)
1561  returnVal = 2.;
1562  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 130)
1563  returnVal = 3.;
1564  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 310)
1565  returnVal = 3.;
1566  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 311)
1567  returnVal = 3.;
1568  else
1569  returnVal = 19.;
1570  break;
1571 
1572  default:
1573  return -1.;
1574  break;
1575  }
1576 
1577  delete PdgDaughter;
1578 
1579  return returnVal;
1580 }
1581 
1582 //_________________________________________________________________________________
1584 
1585  Int_t kc, nPart, firstChannel, lastChannel;
1586  Double_t BR, BRtot;
1587  std::vector<Int_t> pdgCodes;
1588 
1589  switch (np) {
1590 
1591  case 0:
1592  kc = (AliPythia6::Instance())->Pycomp(221);
1593  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1594  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1595  BRtot = 0.;
1596  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1597  BR = (AliPythia6::Instance())->GetBRAT(channel);
1598  BRtot = BRtot + BR;
1599  nPart = 0;
1600  for (Int_t i=1; i<=5; i++) {
1601  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1602  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1603  nPart++;
1604  }
1605  }
1606  std::sort(pdgCodes.begin(), pdgCodes.end());
1607  if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 22)
1608  histo->SetBinContent(2, BR);
1609  else if (nPart == 3 && pdgCodes[0] == 111 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1610  histo->SetBinContent(3, BR);
1611  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 22 && pdgCodes[2] == 111)
1612  histo->SetBinContent(4, BR);
1613  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1614  histo->SetBinContent(5, BR);
1615  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1616  histo->SetBinContent(6, BR);
1617  else
1618  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1619  pdgCodes.clear();
1620  }
1621  histo->SetBinContent(1, BRtot);
1622  pdgCodes.clear();
1623  break;
1624 
1625  case 1:
1626  kc = (AliPythia6::Instance())->Pycomp(310);
1627  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1628  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1629  BRtot = 0.;
1630  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1631  BR = (AliPythia6::Instance())->GetBRAT(channel);
1632  BRtot = BRtot + BR;
1633  nPart = 0;
1634  for (Int_t i=1; i<=5; i++) {
1635  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1636  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1637  nPart++;
1638  }
1639  }
1640  std::sort(pdgCodes.begin(), pdgCodes.end());
1641  if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 111)
1642  histo->SetBinContent(2, BR);
1643  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 211)
1644  histo->SetBinContent(3, BR);
1645  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1646  histo->SetBinContent(4, BR);
1647  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 22 && pdgCodes[2] == 111)
1648  histo->SetBinContent(5, BR);
1649  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 111)
1650  histo->SetBinContent(6, BR);
1651  else if (nPart == 3 && pdgCodes[0] == -13 && pdgCodes[1] == 13 && pdgCodes[2] == 111)
1652  histo->SetBinContent(7, BR);
1653  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1654  histo->SetBinContent(8, BR);
1655  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == 11 && pdgCodes[3] == 211)
1656  histo->SetBinContent(9, BR);
1657  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == 12)
1658  histo->SetBinContent(10, BR+histo->GetBinContent(10));
1659  else if (nPart == 3 && pdgCodes[0] == -12 && pdgCodes[1] == 11 && pdgCodes[2] == 211)
1660  histo->SetBinContent(10, BR+histo->GetBinContent(10));
1661  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == -13 && pdgCodes[2] == 14)
1662  histo->SetBinContent(11, BR+histo->GetBinContent(11));
1663  else if (nPart == 3 && pdgCodes[0] == -14 && pdgCodes[1] == 13 && pdgCodes[2] == 211)
1664  histo->SetBinContent(11, BR+histo->GetBinContent(11));
1665  else
1666  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1667  pdgCodes.clear();
1668  }
1669  histo->SetBinContent(1, BRtot);
1670  pdgCodes.clear();
1671  break;
1672 
1673  case 2:
1674  kc = (AliPythia6::Instance())->Pycomp(130);
1675  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1676  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1677  BRtot = 0.;
1678  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1679  BR = (AliPythia6::Instance())->GetBRAT(channel);
1680  BRtot = BRtot + BR;
1681  nPart = 0;
1682  for (Int_t i=1; i<=5; i++) {
1683  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1684  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1685  nPart++;
1686  }
1687  }
1688  std::sort(pdgCodes.begin(), pdgCodes.end());
1689  if (nPart == 3 && pdgCodes[0] == 111 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1690  histo->SetBinContent(2, BR);
1691  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1692  histo->SetBinContent(3, BR);
1693  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 111)
1694  histo->SetBinContent(4, BR);
1695  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 22 && pdgCodes[2] == 111)
1696  histo->SetBinContent(5, BR);
1697  else if (nPart == 4 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 22 && pdgCodes[3] == 111)
1698  histo->SetBinContent(6, BR);
1699  else if (nPart == 4 && pdgCodes[0] == -12 && pdgCodes[1] == 11 && pdgCodes[2] == 111 && pdgCodes[3] == 211)
1700  histo->SetBinContent(7, BR+histo->GetBinContent(7));
1701  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == 12 && pdgCodes[3] == 111)
1702  histo->SetBinContent(7, BR+histo->GetBinContent(7));
1703  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 211)
1704  histo->SetBinContent(8, BR);
1705  else if (nPart == 3 && pdgCodes[0] == -12 && pdgCodes[1] == 11 && pdgCodes[2] == 211)
1706  histo->SetBinContent(9, BR+histo->GetBinContent(9));
1707  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == 12)
1708  histo->SetBinContent(9, BR+histo->GetBinContent(9));
1709  else if (nPart == 3 && pdgCodes[0] == -14 && pdgCodes[1] == 13 && pdgCodes[2] == 211)
1710  histo->SetBinContent(10, BR+histo->GetBinContent(10));
1711  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == -13 && pdgCodes[2] == 14)
1712  histo->SetBinContent(10, BR+histo->GetBinContent(10));
1713  else if (nPart == 5 && pdgCodes[0] == -12 && pdgCodes[1] == -11 && pdgCodes[2] == 11 && pdgCodes[3] == 11 && pdgCodes[4] == 211)
1714  histo->SetBinContent(11, BR+histo->GetBinContent(11));
1715  else if (nPart == 5 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == -11 && pdgCodes[3] == 11 && pdgCodes[4] == 12)
1716  histo->SetBinContent(11, BR+histo->GetBinContent(11));
1717  else if (nPart == 4 && pdgCodes[0] == -12 && pdgCodes[1] == 11 && pdgCodes[2] == 22 && pdgCodes[3] == 211)
1718  histo->SetBinContent(12, BR+histo->GetBinContent(12));
1719  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == 12 && pdgCodes[3] == 22)
1720  histo->SetBinContent(12, BR+histo->GetBinContent(12));
1721  else if (nPart == 4 && pdgCodes[0] == -14 && pdgCodes[1] == 13 && pdgCodes[2] == 22 && pdgCodes[3] == 211)
1722  histo->SetBinContent(13, BR+histo->GetBinContent(13));
1723  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == -13 && pdgCodes[2] == 14 && pdgCodes[3] == 22)
1724  histo->SetBinContent(13, BR+histo->GetBinContent(13));
1725  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1726  histo->SetBinContent(14, BR);
1727  else
1728  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1729  pdgCodes.clear();
1730  }
1731  histo->SetBinContent(1, BRtot);
1732  pdgCodes.clear();
1733  break;
1734 
1735  case 3:
1736  kc = (AliPythia6::Instance())->Pycomp(3122);
1737  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1738  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1739  BRtot = 0.;
1740  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1741  BR = (AliPythia6::Instance())->GetBRAT(channel);
1742  BRtot = BRtot + BR;
1743  nPart = 0;
1744  for (Int_t i=1; i<=5; i++) {
1745  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1746  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1747  nPart++;
1748  }
1749  }
1750  std::sort(pdgCodes.begin(), pdgCodes.end());
1751  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 2212)
1752  histo->SetBinContent(2, BR);
1753  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 2112)
1754  histo->SetBinContent(3, BR);
1755  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 2212)
1756  histo->SetBinContent(4, BR);
1757  else
1758  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1759  pdgCodes.clear();
1760  }
1761  histo->SetBinContent(1, BRtot);
1762  pdgCodes.clear();
1763  break;
1764 
1765  case 4:
1766  kc = (AliPythia6::Instance())->Pycomp(113);
1767  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1768  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1769  BRtot = 0.;
1770  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1771  BR = (AliPythia6::Instance())->GetBRAT(channel);
1772  BRtot = BRtot + BR;
1773  nPart = 0;
1774  for (Int_t i=1; i<=5; i++) {
1775  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1776  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1777  nPart++;
1778  }
1779  }
1780  std::sort(pdgCodes.begin(), pdgCodes.end());
1781  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 211)
1782  histo->SetBinContent(2, BR);
1783  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 111)
1784  histo->SetBinContent(3, BR);
1785  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 221)
1786  histo->SetBinContent(4, BR);
1787  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1788  histo->SetBinContent(5, BR);
1789  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1790  histo->SetBinContent(6, BR);
1791  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 111 && pdgCodes[3] == 211)
1792  histo->SetBinContent(7, BR);
1793  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1794  histo->SetBinContent(8, BR);
1795  else
1796  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1797  pdgCodes.clear();
1798  }
1799  histo->SetBinContent(1, BRtot);
1800  pdgCodes.clear();
1801  break;
1802 
1803  case 5:
1804  kc = (AliPythia6::Instance())->Pycomp(331);
1805  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1806  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1807  BRtot = 0.;
1808  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1809  BR = (AliPythia6::Instance())->GetBRAT(channel);
1810  BRtot = BRtot + BR;
1811  nPart = 0;
1812  for (Int_t i=1; i<=5; i++) {
1813  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1814  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1815  nPart++;
1816  }
1817  }
1818  std::sort(pdgCodes.begin(), pdgCodes.end());
1819  if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 211 && pdgCodes[2] == 221)
1820  histo->SetBinContent(2, BR);
1821  else if (nPart == 3 && pdgCodes[0] == 111 && pdgCodes[1] == 111 && pdgCodes[2] == 221)
1822  histo->SetBinContent(3, BR);
1823  else if (nPart == 3 && pdgCodes[0] == 111 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1824  histo->SetBinContent(4, BR);
1825  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1826  histo->SetBinContent(5, BR);
1827  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 213)
1828  histo->SetBinContent(6, BR+histo->GetBinContent(6));
1829  else if (nPart == 2 && pdgCodes[0] == -213 && pdgCodes[1] == 211)
1830  histo->SetBinContent(6, BR+histo->GetBinContent(6));
1831  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 111 && pdgCodes[3] == 211)
1832  histo->SetBinContent(7, BR+histo->GetBinContent(7));
1833  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == 11 && pdgCodes[3] == 211)
1834  histo->SetBinContent(8, BR+histo->GetBinContent(8));
1835  else
1836  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1837  pdgCodes.clear();
1838  }
1839  histo->SetBinContent(1, BRtot);
1840  pdgCodes.clear();
1841  break;
1842 
1843  case 6:
1844  kc = (AliPythia6::Instance())->Pycomp(223);
1845  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1846  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1847  BRtot = 0.;
1848  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1849  BR = (AliPythia6::Instance())->GetBRAT(channel);
1850  BRtot = BRtot + BR;
1851  nPart = 0;
1852  for (Int_t i=1; i<=5; i++) {
1853  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1854  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1855  nPart++;
1856  }
1857  }
1858  std::sort(pdgCodes.begin(), pdgCodes.end());
1859  if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1860  histo->SetBinContent(2, BR);
1861  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 111)
1862  histo->SetBinContent(3, BR);
1863  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 221)
1864  histo->SetBinContent(4, BR);
1865  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 111)
1866  histo->SetBinContent(5, BR);
1867  else if (nPart == 3 && pdgCodes[0] == -13 && pdgCodes[1] == 13 && pdgCodes[2] == 111)
1868  histo->SetBinContent(6, BR);
1869  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1870  histo->SetBinContent(7, BR);
1871  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 211)
1872  histo->SetBinContent(8, BR);
1873  else
1874  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1875  pdgCodes.clear();
1876  }
1877  histo->SetBinContent(1, BRtot);
1878  pdgCodes.clear();
1879  break;
1880 
1881  case 7: case 8: // PYTHIA doesn't distinguish between rho+/rho-
1882  kc = (AliPythia6::Instance())->Pycomp(213);
1883  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1884  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1885  BRtot = 0.;
1886  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1887  BR = (AliPythia6::Instance())->GetBRAT(channel);
1888  BRtot = BRtot + BR;
1889  nPart = 0;
1890  for (Int_t i=1; i<=5; i++) {
1891  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1892  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1893  nPart++;
1894  }
1895  }
1896  std::sort(pdgCodes.begin(), pdgCodes.end());
1897  if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 211)
1898  histo->SetBinContent(2, BR);
1899  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 211)
1900  histo->SetBinContent(3, BR);
1901  else
1902  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1903  pdgCodes.clear();
1904  }
1905  histo->SetBinContent(1, BRtot);
1906  pdgCodes.clear();
1907  break;
1908 
1909  case 9:
1910  kc = (AliPythia6::Instance())->Pycomp(333);
1911  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1912  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1913  BRtot = 0.;
1914  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1915  BR = (AliPythia6::Instance())->GetBRAT(channel);
1916  BRtot = BRtot + BR;
1917  nPart = 0;
1918  for (Int_t i=1; i<=5; i++) {
1919  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1920  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1921  nPart++;
1922  }
1923  }
1924  std::sort(pdgCodes.begin(), pdgCodes.end());
1925  if (nPart == 2 && pdgCodes[0] == -321 && pdgCodes[1] == 321)
1926  histo->SetBinContent(2, BR);
1927  else if (nPart == 2 && pdgCodes[0] == 130 && pdgCodes[1] == 310)
1928  histo->SetBinContent(3, BR);
1929  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 221)
1930  histo->SetBinContent(4, BR);
1931  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 111)
1932  histo->SetBinContent(5, BR);
1933  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 221)
1934  histo->SetBinContent(6, BR);
1935  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 223)
1936  histo->SetBinContent(7, BR);
1937  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1938  histo->SetBinContent(8, BR);
1939  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 111)
1940  histo->SetBinContent(9, BR);
1941  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 111 && pdgCodes[2] == 221)
1942  histo->SetBinContent(10, BR);
1943  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1944  histo->SetBinContent(11, BR);
1945  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 113)
1946  histo->SetBinContent(12, BR);
1947  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 213)
1948  histo->SetBinContent(13, BR+histo->GetBinContent(13));
1949  else if (nPart == 2 && pdgCodes[0] == -213 && pdgCodes[1] == 211)
1950  histo->SetBinContent(13, BR+histo->GetBinContent(13));
1951  else
1952  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1953  pdgCodes.clear();
1954  }
1955  histo->SetBinContent(1, BRtot);
1956  pdgCodes.clear();
1957  break;
1958 
1959  case 10:
1960  kc = (AliPythia6::Instance())->Pycomp(443);
1961  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1962  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1963  BRtot = 0.;
1964  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1965  BR = (AliPythia6::Instance())->GetBRAT(channel);
1966  BRtot = BRtot + BR;
1967  nPart = 0;
1968  for (Int_t i=1; i<=5; i++) {
1969  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1970  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1971  nPart++;
1972  }
1973  }
1974  if (std::find(pdgCodes.begin(), pdgCodes.end(), 111) != pdgCodes.end())
1975  histo->SetBinContent(2, BR+histo->GetBinContent(2));
1976  else if (std::find(pdgCodes.begin(), pdgCodes.end(), 221) != pdgCodes.end())
1977  histo->SetBinContent(3, BR+histo->GetBinContent(3));
1978  else if (std::find(pdgCodes.begin(), pdgCodes.end(), 211) != pdgCodes.end())
1979  histo->SetBinContent(4, BR+histo->GetBinContent(4));
1980  else if (std::find(pdgCodes.begin(), pdgCodes.end(), -211) != pdgCodes.end())
1981  histo->SetBinContent(5, BR+histo->GetBinContent(5));
1982  else
1983  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1984  pdgCodes.clear();
1985  }
1986  histo->SetBinContent(1, BRtot);
1987  pdgCodes.clear();
1988  break;
1989 
1990  case 11:
1991  kc = (AliPythia6::Instance())->Pycomp(2114);
1992  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1993  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1994  BRtot = 0.;
1995  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1996  BR = (AliPythia6::Instance())->GetBRAT(channel);
1997  BRtot = BRtot + BR;
1998  nPart = 0;
1999  for (Int_t i=1; i<=5; i++) {
2000  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2001  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2002  nPart++;
2003  }
2004  }
2005  std::sort(pdgCodes.begin(), pdgCodes.end());
2006  if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 2112)
2007  histo->SetBinContent(2, BR);
2008  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 2212)
2009  histo->SetBinContent(3, BR);
2010  else
2011  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2012  pdgCodes.clear();
2013  }
2014  histo->SetBinContent(1, BRtot);
2015  pdgCodes.clear();
2016  break;
2017 
2018  case 12:
2019  kc = (AliPythia6::Instance())->Pycomp(2214);
2020  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2021  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2022  BRtot = 0.;
2023  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2024  BR = (AliPythia6::Instance())->GetBRAT(channel);
2025  BRtot = BRtot + BR;
2026  nPart = 0;
2027  for (Int_t i=1; i<=5; i++) {
2028  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2029  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2030  nPart++;
2031  }
2032  }
2033  std::sort(pdgCodes.begin(), pdgCodes.end());
2034  if (nPart == 2 && pdgCodes[0] == 211 && pdgCodes[1] == 2112)
2035  histo->SetBinContent(2, BR);
2036  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 2212)
2037  histo->SetBinContent(3, BR);
2038  else
2039  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2040  pdgCodes.clear();
2041  }
2042  histo->SetBinContent(1, BRtot);
2043  pdgCodes.clear();
2044  break;
2045 
2046  case 13:
2047  kc = (AliPythia6::Instance())->Pycomp(1114);
2048  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2049  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2050  BRtot = 0.;
2051  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2052  BR = (AliPythia6::Instance())->GetBRAT(channel);
2053  BRtot = BRtot + BR;
2054  nPart = 0;
2055  for (Int_t i=1; i<=5; i++) {
2056  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2057  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2058  nPart++;
2059  }
2060  }
2061  std::sort(pdgCodes.begin(), pdgCodes.end());
2062  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 2112)
2063  histo->SetBinContent(2, BR);
2064  else
2065  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2066  pdgCodes.clear();
2067  }
2068  histo->SetBinContent(1, BRtot);
2069  pdgCodes.clear();
2070  break;
2071 
2072  case 14:
2073  kc = (AliPythia6::Instance())->Pycomp(2224);
2074  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2075  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2076  BRtot = 0.;
2077  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2078  BR = (AliPythia6::Instance())->GetBRAT(channel);
2079  BRtot = BRtot + BR;
2080  nPart = 0;
2081  for (Int_t i=1; i<=5; i++) {
2082  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2083  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2084  nPart++;
2085  }
2086  }
2087  std::sort(pdgCodes.begin(), pdgCodes.end());
2088  if (nPart == 2 && pdgCodes[0] == 211 && pdgCodes[1] == 2212)
2089  histo->SetBinContent(2, BR);
2090  else
2091  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2092  pdgCodes.clear();
2093  }
2094  histo->SetBinContent(1, BRtot);
2095  pdgCodes.clear();
2096  break;
2097 
2098  case 15: case 16: // PYTHIA doesn't distinguish between K+/K-
2099  kc = (AliPythia6::Instance())->Pycomp(321);
2100  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2101  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2102  BRtot = 0.;
2103  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2104  BR = (AliPythia6::Instance())->GetBRAT(channel);
2105  BRtot = BRtot + BR;
2106  nPart = 0;
2107  for (Int_t i=1; i<=5; i++) {
2108  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2109  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2110  nPart++;
2111  }
2112  }
2113  std::sort(pdgCodes.begin(), pdgCodes.end());
2114  if (nPart == 2 && pdgCodes[0] == -13 && pdgCodes[1] == 14)
2115  histo->SetBinContent(2, BR);
2116  else if (nPart == 3 && pdgCodes[0] == -13 && pdgCodes[1] == 14 && pdgCodes[2] == 22)
2117  histo->SetBinContent(3, BR);
2118  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 12 && pdgCodes[2] == 111)
2119  histo->SetBinContent(4, BR);
2120  else if (nPart == 3 && pdgCodes[0] == -13 && pdgCodes[1] == 14 && pdgCodes[2] == 111)
2121  histo->SetBinContent(5, BR);
2122  else if (nPart == 4 && pdgCodes[0] == -11 && pdgCodes[1] == 12 && pdgCodes[2] == 111 && pdgCodes[3] == 111)
2123  histo->SetBinContent(6, BR);
2124  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == 12 && pdgCodes[3] == 211)
2125  histo->SetBinContent(7, BR);
2126  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 211)
2127  histo->SetBinContent(8, BR);
2128  else if (nPart == 3 && pdgCodes[0] == 111 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
2129  histo->SetBinContent(9, BR);
2130  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 211 && pdgCodes[2] == 211)
2131  histo->SetBinContent(10, BR);
2132  else
2133  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2134  pdgCodes.clear();
2135  }
2136  histo->SetBinContent(1, BRtot);
2137  pdgCodes.clear();
2138  break;
2139 
2140  case 17: case 18: // PYTHIA doesn't distinguish between Omega-/Omega+
2141  kc = (AliPythia6::Instance())->Pycomp(3334);
2142  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2143  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2144  BRtot = 0.;
2145  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2146  BR = (AliPythia6::Instance())->GetBRAT(channel);
2147  BRtot = BRtot + BR;
2148  nPart = 0;
2149  for (Int_t i=1; i<=5; i++) {
2150  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2151  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2152  nPart++;
2153  }
2154  }
2155  std::sort(pdgCodes.begin(), pdgCodes.end());
2156  if (nPart == 2 && pdgCodes[0] == -321 && pdgCodes[1] == 3122)
2157  histo->SetBinContent(2, BR);
2158  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 3322)
2159  histo->SetBinContent(3, BR);
2160  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 3312)
2161  histo->SetBinContent(4, BR);
2162  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 211 && pdgCodes[2] == 3312)
2163  histo->SetBinContent(5, BR);
2164  else
2165  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2166  pdgCodes.clear();
2167  }
2168  histo->SetBinContent(1, BRtot);
2169  pdgCodes.clear();
2170  break;
2171 
2172  case 19: case 20: // PYTHIA doesn't distinguish between Xi-/Xi+
2173  kc = (AliPythia6::Instance())->Pycomp(3312);
2174  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2175  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2176  BRtot = 0.;
2177  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2178  BR = (AliPythia6::Instance())->GetBRAT(channel);
2179  BRtot = BRtot + BR;
2180  nPart = 0;
2181  for (Int_t i=1; i<=5; i++) {
2182  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2183  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2184  nPart++;
2185  }
2186  }
2187  std::sort(pdgCodes.begin(), pdgCodes.end());
2188  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 3122)
2189  histo->SetBinContent(2, BR);
2190  else
2191  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2192  pdgCodes.clear();
2193  }
2194  histo->SetBinContent(1, BRtot);
2195  pdgCodes.clear();
2196  break;
2197 
2198  case 21:
2199  kc = (AliPythia6::Instance())->Pycomp(3224);
2200  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2201  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2202  BRtot = 0.;
2203  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2204  BR = (AliPythia6::Instance())->GetBRAT(channel);
2205  BRtot = BRtot + BR;
2206  nPart = 0;
2207  for (Int_t i=1; i<=5; i++) {
2208  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2209  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2210  nPart++;
2211  }
2212  }
2213  std::sort(pdgCodes.begin(), pdgCodes.end());
2214  if (nPart == 2 && pdgCodes[0] == 211 && pdgCodes[1] == 3122)
2215  histo->SetBinContent(2, BR);
2216  else if (nPart == 2 && pdgCodes[0] == 211 && pdgCodes[1] == 3212)
2217  histo->SetBinContent(3, BR);
2218  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 3222)
2219  histo->SetBinContent(4, BR);
2220  else
2221  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2222  pdgCodes.clear();
2223  }
2224  histo->SetBinContent(1, BRtot);
2225  pdgCodes.clear();
2226  break;
2227 
2228  case 22:
2229  kc = (AliPythia6::Instance())->Pycomp(3114);
2230  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2231  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2232  BRtot = 0.;
2233  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2234  BR = (AliPythia6::Instance())->GetBRAT(channel);
2235  BRtot = BRtot + BR;
2236  nPart = 0;
2237  for (Int_t i=1; i<=5; i++) {
2238  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2239  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2240  nPart++;
2241  }
2242  }
2243  std::sort(pdgCodes.begin(), pdgCodes.end());
2244  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 3122)
2245  histo->SetBinContent(2, BR);
2246  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 3212)
2247  histo->SetBinContent(3, BR);
2248  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 3112)
2249  histo->SetBinContent(4, BR);
2250  else
2251  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2252  pdgCodes.clear();
2253  }
2254  histo->SetBinContent(1, BRtot);
2255  pdgCodes.clear();
2256  break;
2257 
2258  case 23:
2259  kc = (AliPythia6::Instance())->Pycomp(313);
2260  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
2261  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
2262  BRtot = 0.;
2263  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
2264  BR = (AliPythia6::Instance())->GetBRAT(channel);
2265  BRtot = BRtot + BR;
2266  nPart = 0;
2267  for (Int_t i=1; i<=5; i++) {
2268  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
2269  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
2270  nPart++;
2271  }
2272  }
2273  std::sort(pdgCodes.begin(), pdgCodes.end());
2274  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 321)
2275  histo->SetBinContent(2, BR);
2276  else if (nPart == 2 && pdgCodes[0] == -321 && pdgCodes[1] == 211)
2277  histo->SetBinContent(3, BR);
2278  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 130)
2279  histo->SetBinContent(4, BR+histo->GetBinContent(4));
2280  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 310)
2281  histo->SetBinContent(4, BR+histo->GetBinContent(4));
2282  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 311)
2283  histo->SetBinContent(4, BR+histo->GetBinContent(4));
2284  else
2285  histo->SetBinContent(20, BR+histo->GetBinContent(20));
2286  pdgCodes.clear();
2287  }
2288  histo->SetBinContent(1, BRtot);
2289  pdgCodes.clear();
2290  break;
2291 
2292  default:
2293  break;
2294  }
2295 }
2296 
2297 //_________________________________________________________________________________
2299 
2300  Int_t returnVal = -9999;
2301 
2302  switch (pdg) {
2303  case 221:
2304  returnVal = 0;
2305  break;
2306  case 310:
2307  returnVal = 1;
2308  break;
2309  case 130:
2310  returnVal = 2;
2311  break;
2312  case 3122:
2313  returnVal = 3;
2314  break;
2315  case 113:
2316  returnVal = 4;
2317  break;
2318  case 331:
2319  returnVal = 5;
2320  break;
2321  case 223:
2322  returnVal = 6;
2323  break;
2324  case 213:
2325  returnVal = 7;
2326  break;
2327  case -213:
2328  returnVal = 8;
2329  break;
2330  case 333:
2331  returnVal = 9;
2332  break;
2333  case 443:
2334  returnVal = 10;
2335  break;
2336  case 2114:
2337  returnVal = 11;
2338  break;
2339  case 2214:
2340  returnVal = 12;
2341  break;
2342  case 1114:
2343  returnVal = 13;
2344  break;
2345  case 2224:
2346  returnVal = 14;
2347  break;
2348  case 321:
2349  returnVal = 15;
2350  break;
2351  case -321:
2352  returnVal = 16;
2353  break;
2354  case -3334:
2355  returnVal = 17;
2356  break;
2357  case 3334:
2358  returnVal = 18;
2359  break;
2360  case -3312:
2361  returnVal = 19;
2362  break;
2363  case 3312:
2364  returnVal = 20;
2365  break;
2366  case 3224:
2367  returnVal = 21;
2368  break;
2369  case 3114:
2370  returnVal = 22;
2371  break;
2372  case 313:
2373  returnVal = 23;
2374  break;
2375  default:
2376  break;
2377  }
2378 
2379  return returnVal;
2380 }
2381 
2382 //_________________________________________________________________________________
2383 TH1* AliAnalysisTaskHadronicCocktailMC::SetHist1D(TH1* hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Bool_t optSumw2) {
2384 
2385  if (histType.CompareTo("f") == 0 || histType.CompareTo("F") == 0)
2386  hist = new TH1F(histName, histName, nBinsX, xMin, xMax);
2387  if (histType.CompareTo("i") == 0 || histType.CompareTo("I") == 0)
2388  hist = new TH1I(histName, histName, nBinsX, xMin, xMax);
2389 
2390  hist->GetXaxis()->SetTitle(xTitle);
2391  hist->GetYaxis()->SetTitle(yTitle);
2392 
2393  if (optSumw2)
2394  hist->Sumw2();
2395 
2396  return hist;
2397 }
2398 
2399 //_________________________________________________________________________________
2400 TH2* AliAnalysisTaskHadronicCocktailMC::SetHist2D(TH2* hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Int_t nBinsY, Double_t yMin, Double_t yMax, Bool_t optSumw2) {
2401 
2402  if (histType.CompareTo("f") == 0 || histType.CompareTo("F") == 0)
2403  hist = new TH2F(histName, histName, nBinsX, xMin, xMax, nBinsY, yMin, yMax);
2404  if (histType.CompareTo("i") == 0 || histType.CompareTo("I") == 0)
2405  hist = new TH2I(histName, histName, nBinsX, xMin, xMax, nBinsY, yMin, yMax);
2406 
2407  hist->GetXaxis()->SetTitle(xTitle);
2408  hist->GetYaxis()->SetTitle(yTitle);
2409 
2410  if (optSumw2)
2411  hist->Sumw2();
2412 
2413  return hist;
2414 }
2415 
2416 //_________________________________________________________________________________
2417 TH2* AliAnalysisTaskHadronicCocktailMC::SetHist2D(TH2* hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Int_t nBinsY, Double_t* binsY, Bool_t optSumw2) {
2418 
2419  if (histType.CompareTo("f") == 0 || histType.CompareTo("F") == 0)
2420  hist = new TH2F(histName, histName, nBinsX, xMin, xMax, nBinsY, binsY);
2421  if (histType.CompareTo("i") == 0 || histType.CompareTo("I") == 0)
2422  hist = new TH2I(histName, histName, nBinsX, xMin, xMax, nBinsY, binsY);
2423 
2424  hist->GetXaxis()->SetTitle(xTitle);
2425  hist->GetYaxis()->SetTitle(yTitle);
2426 
2427  if (optSumw2)
2428  hist->Sumw2();
2429 
2430  return hist;
2431 }
2432 
Int_t pdg
TH2F ** fHistPtYInput
histo for phi of input particles
double Double_t
Definition: External.C:58
Definition: External.C:236
long long Long64_t
Definition: External.C:43
void GetAndSetPtYDistributions(AliGenEMCocktailV2 *mcCocktailGen)
TH2F ** fHistPtYDaughterSource
histo for pi0/eta from input particles
Double_t ptMin
TH1 * SetHist1D(TH1 *hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Bool_t optSumw2)
int Int_t
Definition: External.C:63
Float_t GetDecayChannel(AliMCEvent *mcEvent, TParticle *part)
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
TH1I * fHistPdgInputRest
histo for phi correlation of gammas from input particles to source
TH2 * SetHist2D(TH2 *hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Int_t nBinsY, Double_t yMin, Double_t yMax, Bool_t optSumw2)
Definition: External.C:212
TH1F ** fHistDecayChannelsInput
histo for input particles
TH2F ** fHistPtPhiInput
histo for phi of pi0/eta from input particles
TH2F ** fHistPtPhiGammaFromPi0FromInput
gammas from pi0 from k0s, k0l, lambda
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)
Definition: External.C:220
TH2F ** fHistPhiDaughterPhiSourceInput
histo for pt correlation of gammas from input particles to source
TH2F ** fHistPtDaughterPtSourceInput
histo for input particle BR from pythia
TH2F ** fHistPtYGammaFromXFromInput
histo for gamma from rest
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
Double_t ptMax
TH2F ** fHistPtPhiGammaFromXFromInput
gammas from X from k0s, k0l, lambda
Double_t yMin
void GetAndSetPtParametrizations(AliGenEMCocktailV2 *mcCocktailGen)
Definition: External.C:196
TH1F ** fHistPythiaBR
histo for input particle decay channels
Double_t yMax