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