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