AliPhysics  5403132 (5403132)
AliAnalysisTaskGammaCocktailMC.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, Mike Sas, 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 electromagnetic 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  fDoLightOutput(kFALSE),
66  fHasMother{kFALSE},
67  fHistNEvents(NULL),
68  fHistPtYGamma(NULL),
69  fHistPtPhiGamma(NULL),
70  fHistPtPhiGammaSource(NULL),
71  fHistPtPhiInput(NULL),
72  fHistPtYInput(NULL),
73  fHistPtYGammaSource(NULL),
74  fHistPtAlphaInput(NULL),
75  fHistPtDeltaPhiInput(NULL),
76  fHistDecayChannelsInput(NULL),
77  fHistPythiaBR(NULL),
78  fHistPtGammaSourcePtInput(NULL),
79  fHistPhiGammaSourcePhiInput(NULL),
80  fHistPdgInputRest(NULL),
81  fHistPdgGammaSourceRest(NULL),
82  fParticleList(NULL),
83  fParticleListNames(NULL),
84  fPtParametrization{NULL},
85  fPtParametrizationProton(NULL),
86  fCocktailSettings{NULL},
87  fMtScalingFactors(NULL),
88  fPtYDistributions{NULL},
89  fHistPtYGammaSourceFromDalitzPi0(NULL),
90  fHistPtPhiGammaSourceFromDalitzPi0(NULL),
91  fHistPtYGammaSourceFromNonDalitzPi0(NULL),
92  fHistPtPhiGammaSourceFromNonDalitzPi0(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  fDoLightOutput(kFALSE),
111  fHasMother{kFALSE},
112  fHistNEvents(NULL),
113  fHistPtYGamma(NULL),
114  fHistPtPhiGamma(NULL),
115  fHistPtPhiGammaSource(NULL),
116  fHistPtPhiInput(NULL),
117  fHistPtYInput(NULL),
118  fHistPtYGammaSource(NULL),
119  fHistPtAlphaInput(NULL),
120  fHistPtDeltaPhiInput(NULL),
122  fHistPythiaBR(NULL),
125  fHistPdgInputRest(NULL),
127  fParticleList(NULL),
128  fParticleListNames(NULL),
129  fPtParametrization{NULL},
131  fCocktailSettings{NULL},
132  fMtScalingFactors(NULL),
133  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<10; 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  fHistNEvents = (TH1F*)SetHist1D(fHistNEvents,"f","NEvents","","N_{evt}", 1, 0, 1, kTRUE);
169 
170  fHistPtYGamma = (TH2F*)SetHist2D(fHistPtYGamma,"f","Pt_Y_Gamma","#it{p}_{T}","Y", 1000, 0, 50, 400, -2.0, 2.0, kTRUE);
172 
173  fHistPtPhiGamma = (TH2F*)SetHist2D(fHistPtPhiGamma,"f","Pt_Phi_Gamma","#it{p}_{T}","#phi", 1000, 0, 50, 100, 0, 2*TMath::Pi(), kTRUE);
175 
176  // tree + user info list to protect contents from merging
177  fOutputTree = new TTree("cocktailSettings", "cocktailSettings");
178  fUserInfo = (TList*)fOutputTree->GetUserInfo();
179 
180  fMCGenHandler = (AliMCGenHandler*)AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler();
181  fMCGenerator = fMCGenHandler->GetGenerator();
182  TString mcGeneratorClassName = "";
183  if (fMCGenerator) mcGeneratorClassName = fMCGenerator->ClassName();
184 
185  if (mcGeneratorClassName.CompareTo("AliGenEMCocktailV2") == 0) {
186 
187  fMCCocktailGen = (AliGenEMCocktailV2*)fMCGenerator;
188 
189  // has mother i
190  SetHasMother((UInt_t)fMCCocktailGen->GetSelectedMothers());
191 
192  // pt parametrizations
194  for (Int_t i=0; i<17; i++) {
195  if (fHasMother[i]) fUserInfo->Add(fPtParametrization[i]);
196  }
198 
199  // cocktail settings
201  fMCCocktailGen->GetPtRange(ptMin, ptMax);
202  fCocktailSettings[0] = new TObjString(Form("collSys_%d",fMCCocktailGen->GetCollisionSystem()));
203  fCocktailSettings[1] = new TObjString(Form("cent_%d",fMCCocktailGen->GetCentrality()));
204  fCocktailSettings[2] = new TObjString(Form("decayMode_%.0f",fMCCocktailGen->GetDecayMode()));
205  fCocktailSettings[3] = new TObjString(Form("selectMothers_%d",fMCCocktailGen->GetSelectedMothers()));
206  fCocktailSettings[4] = new TObjString(Form("paramFile_%s",(fMCCocktailGen->GetParametrizationFile()).Data()));
207  fCocktailSettings[5] = new TObjString(Form("paramDir_%s",(fMCCocktailGen->GetParametrizationFileDirectory()).Data()));
208  fCocktailSettings[6] = new TObjString(Form("nParticles_%d",fMCCocktailGen->GetNumberOfParticles()));
209  fCocktailSettings[7] = new TObjString(Form("ptMin_%.2f",ptMin));
210  fCocktailSettings[8] = new TObjString(Form("ptMax_%.2f",ptMax));
211  fCocktailSettings[9] = new TObjString(Form("weightMode_%.0f",fMCCocktailGen->GetWeightingMode()));
212  fCocktailSettings[10] = new TObjString(Form("dynamicalPtRang_%d",fMCCocktailGen->GetDynamicalPtRangeOption()));
213  fCocktailSettings[11] = new TObjString(Form("yWeights_%d",fMCCocktailGen->GetYWeightOption()));
214  for (Int_t i=0; i<12; i++) fUserInfo->Add(fCocktailSettings[i]);
215 
216  // mt scaling params
217  fMtScalingFactors = (TH1D*)fMCCocktailGen->GetMtScalingFactors();
219 
220  // pt-y distributions
222  for (Int_t i=0; i<17; i++) {
223  if (fHasMother[i]) fUserInfo->Add(fPtYDistributions[i]);
224  }
225  } else {
226  for (Int_t i=0; i<17; i++) fHasMother[i] = kTRUE;
227  }
228 
229 // "22" Gamma
230 // "111" Pi0
231 // "221" Eta
232 // "331" EtaPrim
233 // "223" Omega
234 // "211" Pi+
235 // "-211" Pi-
236 // "113" rho0
237 // "213" rho+
238 // "-213" rho-
239 // "333" phi
240 // "443" J/psi
241 // "1114" Delta-
242 // "2114" Delta0
243 // "2214" Delta+
244 // "2224" Delta++
245 // "3212" Sigma0
246  const Int_t nInputParticles = 17;
247  Int_t fParticleList_local[] = {111,221,331,223,113,213,-213,333,443,1114,2114,2214,2224,3212,310,130,3122};
248  TString fParticleListNames_local[] = {"Pi0","Eta","EtaPrim","omega","rho0","rho+","rho-","phi","J/psi","Delta-","Delta0","Delta+","Delta++","Sigma0","K0s","K0l","Lambda"};
249  fParticleList = fParticleList_local;
250  fParticleListNames = fParticleListNames_local;
251  fHistPtYInput = new TH2F*[nInputParticles];
252  fHistPtPhiInput = new TH2F*[nInputParticles];
253  fHistDecayChannelsInput = new TH1F*[nInputParticles];
254  fHistPythiaBR = new TH1F*[nInputParticles];
255  fHistPtYGammaSource = new TH2F*[nInputParticles];
256  fHistPtPhiGammaSource = new TH2F*[nInputParticles];
257  fHistPtAlphaInput = new TH2F*[nInputParticles];
258  fHistPtDeltaPhiInput = new TH2F*[nInputParticles];
259  fHistPtGammaSourcePtInput = new TH2F*[nInputParticles];
260  fHistPhiGammaSourcePhiInput = new TH2F*[nInputParticles];
261 
262  // delta phi binning
263  Double_t *binsDeltaPhi = new Double_t[83];
264  binsDeltaPhi[0] = 0;
265  Double_t binWidth = 0.02;
266  for (Int_t i=1; i<83; i++) {
267  if (i<21)
268  binWidth = 0.02;
269  else if (i>=21 && i<43)
270  binWidth = 0.05;
271  else if (i>=43 && i<68)
272  binWidth = 0.1;
273  else
274  binWidth = 0.2;
275  binsDeltaPhi[i] = binsDeltaPhi[i-1]+binWidth;
276  }
277 
278  for(Int_t i=0; i<nInputParticles; i++){
279 
280  if (fHasMother[i]) {
281  fHistPtYInput[i] = (TH2F*)SetHist2D(fHistPtYInput[i],"f",Form("Pt_Y_%s",fParticleListNames[i].Data()),"#it{p}_{T}","Y", 1000, 0, 50, 400, -2.0, 2.0, kTRUE);
283 
284  //Gammas from certain mother
285  fHistPtYGammaSource[i] = (TH2F*)SetHist2D(fHistPtYGammaSource[i],"f",Form("Pt_Y_Gamma_From_%s",fParticleListNames[i].Data()),"#it{p}_{T}","Y", 1000, 0, 50, 400, -2.0, 2.0, kTRUE);
287 
288  //phi distributions
289  fHistPtPhiInput[i] = (TH2F*)SetHist2D(fHistPtPhiInput[i],"f",Form("Pt_Phi_%s",fParticleListNames[i].Data()),"#it{p}_{T}","#phi", 1000, 0, 50, 100, 0, 2*TMath::Pi(), kTRUE);
291 
292  fHistPtPhiGammaSource[i] = (TH2F*)SetHist2D(fHistPtPhiGammaSource[i],"f",Form("Pt_Phi_Gamma_From_%s",fParticleListNames[i].Data()),"#it{p}_{T}","#phi",
293  1000, 0, 50, 100, 0, 2*TMath::Pi(), kTRUE);
295 
296  if(i==0){
297  fHistPtYGammaSourceFromDalitzPi0 = (TH2F*)SetHist2D(fHistPtYGammaSourceFromDalitzPi0,"f",Form("Pt_Y_Gamma_From_Dalitz_%s",fParticleListNames[i].Data()),"#it{p}_{T}","Y",
298  1000, 0, 50, 400, -2.0, 2.0, kTRUE);
300  fHistPtPhiGammaSourceFromDalitzPi0 = (TH2F*)SetHist2D(fHistPtPhiGammaSourceFromDalitzPi0,"f",Form("Pt_Phi_Gamma_From_Dalitz_%s",fParticleListNames[i].Data()),"#it{p}_{T}","#phi",
301  1000, 0, 50, 100, 0, 2*TMath::Pi(), kTRUE);
303  fHistPtYGammaSourceFromNonDalitzPi0 = (TH2F*)SetHist2D(fHistPtYGammaSourceFromNonDalitzPi0,"f",Form("Pt_Y_Gamma_FromNon_Dalitz_%s",fParticleListNames[i].Data()),"#it{p}_{T}","Y",
304  1000, 0, 50, 400, -2.0, 2.0, kTRUE);
306  fHistPtPhiGammaSourceFromNonDalitzPi0 = (TH2F*)SetHist2D(fHistPtPhiGammaSourceFromNonDalitzPi0,"f",Form("Pt_Phi_Gamma_From_NonDalitz_%s",fParticleListNames[i].Data()),"#it{p}_{T}","#phi",
307  1000, 0, 50, 100, 0, 2*TMath::Pi(), kTRUE);
309  }
310 
311  // correlation gamma from certain mother to mother
312  fHistPtGammaSourcePtInput[i] = (TH2F*)SetHist2D(fHistPtGammaSourcePtInput[i],"f",Form("PtGamma_PtMother_%s",fParticleListNames[i].Data()),"#it{p}_{T,daughter}","#it{p}_{T,mother}",
313  1000, 0, 50, 1000, 0, 50,kTRUE);
315 
316  fHistPhiGammaSourcePhiInput[i] = (TH2F*)SetHist2D(fHistPhiGammaSourcePhiInput[i],"f",Form("PhiGamma_PhiMother_%s",fParticleListNames[i].Data()),"#phi_{daughter}","#phi_{mother}",
317  100, 0, 7 , 100, 0, 2*TMath::Pi(), kTRUE);
319 
320  // decay channels mother
321  fHistDecayChannelsInput[i] = (TH1F*)SetHist1D(fHistDecayChannelsInput[i],"f",Form("DecayChannels_%s",fParticleListNames[i].Data()),"","", 20, -0.5, 19.5, kTRUE);
324 
325  // BR from pythia
326  fHistPythiaBR[i] = (TH1F*)SetHist1D(fHistPythiaBR[i],"f",Form("PythiaBR_%s",fParticleListNames[i].Data()),"","", 20, -0.5, 19.5, kTRUE);
329  fUserInfo->Add(fHistPythiaBR[i]);
330  } else {
331  fHistPtYInput[i] = NULL;
332  fHistPtYGammaSource[i] = NULL;
333  fHistPtPhiInput[i] = NULL;
334  fHistPtPhiGammaSource[i] = NULL;
335  fHistPtGammaSourcePtInput[i] = NULL;
336  fHistPhiGammaSourcePhiInput[i] = NULL;
337  if(i==0){
342  }
343  fHistDecayChannelsInput[i] = NULL;
344  fHistPythiaBR[i] = NULL;
345  }
346 
347  // lightweight output
348  if (!fDoLightOutput || (fDoLightOutput && (i < 4 || i == 7))) {
349 
350  if (fHasMother[i]) {
351  // gamma delta phi
352  fHistPtDeltaPhiInput[i] = (TH2F*)SetHist2D(fHistPtDeltaPhiInput[i],"f",Form("Pt_DeltaPhi_%s",fParticleListNames[i].Data()),"#it{p}_{T}","#Delta#phi_{#gamma_{1}#gamma_{2}}",
353  1000, 0, 50, 82, binsDeltaPhi,kTRUE);
355 
356  // alpha mother
357  fHistPtAlphaInput[i] = (TH2F*)SetHist2D(fHistPtAlphaInput[i],"f",Form("Pt_Alpha_%s",fParticleListNames[i].Data()),"#it{p}_{T}","#alpha",
358  1000, 0, 50, 100, -1, 1, kTRUE);
360  } else {
361  fHistPtDeltaPhiInput[i] = NULL;
362  fHistPtAlphaInput[i] = NULL;
363  }
364  } else {
365  fHistPtDeltaPhiInput[i] = NULL;
366  fHistPtAlphaInput[i] = NULL;
367  }
368  }
369  delete[] binsDeltaPhi;
370 
371  fHistPdgInputRest = (TH1I*)SetHist1D(fHistPdgInputRest,"f","Pdg_primary_rest","PDG code","", 5000, 0, 5000, kTRUE);
373 
374  //Gammas from certain mother
375  fHistPdgGammaSourceRest = (TH1I*)SetHist1D(fHistPdgGammaSourceRest,"f","Pdg_Gamma_From_rest","PDG code mother","", 5000, 0, 5000, kTRUE);
377 
379 
380  PostData(1, fOutputContainer);
381 }
382 
383 //_____________________________________________________________________________
385 {
386 
387  fInputEvent = InputEvent();
388 
389  fMCEvent = MCEvent();
390  if(fMCEvent == NULL) fIsMC = 0;
391 
392  if (fIsMC==0) return;
393 
394  fHistNEvents->Fill(0.5);
396 
397  PostData(1, fOutputContainer);
398 }
399 
400 //_____________________________________________________________________________
402 {
403  if (!fMCCocktailGen) return;
404 
405  for (Int_t i=0; i<17; i++) fPtParametrization[i] = NULL;
407 
408  TF1* fct = NULL;
409  TString fctName = "";
410  for (Int_t i=0; i<19; i++) {
411  fct = (TF1*)fMCCocktailGen->GetPtParametrization(i);
412  if (fct) {
413  fctName = fct->GetName();
414  if (fctName.BeginsWith("111_pt") && fHasMother[0]) fPtParametrization[0] = fct;
415  if (fctName.BeginsWith("221_pt") && fHasMother[1]) fPtParametrization[1] = fct;
416  if (fctName.BeginsWith("331_pt") && fHasMother[2]) fPtParametrization[2] = fct;
417  if (fctName.BeginsWith("223_pt") && fHasMother[3]) fPtParametrization[3] = fct;
418  if (fctName.BeginsWith("113_pt") && fHasMother[4]) fPtParametrization[4] = fct;
419  if (fctName.BeginsWith("213_pt") && fHasMother[5]) fPtParametrization[5] = fct;
420  if (fctName.BeginsWith("-213_pt") && fHasMother[6]) fPtParametrization[6] = fct;
421  if (fctName.BeginsWith("333_pt") && fHasMother[7]) fPtParametrization[7] = fct;
422  if (fctName.BeginsWith("443_pt") && fHasMother[8]) fPtParametrization[8] = fct;
423  if (fctName.BeginsWith("1114_pt") && fHasMother[9]) fPtParametrization[9] = fct;
424  if (fctName.BeginsWith("2114_pt") && fHasMother[10]) fPtParametrization[10] = fct;
425  if (fctName.BeginsWith("2214_pt") && fHasMother[11]) fPtParametrization[11] = fct;
426  if (fctName.BeginsWith("2224_pt") && fHasMother[12]) fPtParametrization[12] = fct;
427  if (fctName.BeginsWith("3212_pt") && fHasMother[13]) fPtParametrization[13] = fct;
428  if (fctName.BeginsWith("310_pt") && fHasMother[14]) fPtParametrization[14] = fct;
429  if (fctName.BeginsWith("130_pt") && fHasMother[15]) fPtParametrization[15] = fct;
430  if (fctName.BeginsWith("3122_pt") && fHasMother[16]) fPtParametrization[16] = fct;
431  if (fctName.BeginsWith("2212_pt")) fPtParametrizationProton = fct;
432  }
433  }
434 }
435 
436 //_____________________________________________________________________________
438 {
439  if (!fMCCocktailGen) return;
440 
441  for (Int_t i=0; i<17; i++) fPtYDistributions[i] = NULL;
442 
443  TH2F* tempPtY = NULL;
444  TString tempPtYName = "";
445  for (Int_t i=0; i<18; i++) {
446  tempPtY = (TH2F*)fMCCocktailGen->GetPtYDistribution(i);
447  if (tempPtY) {
448  tempPtYName = tempPtY->GetName();
449  if (tempPtYName.BeginsWith("111_pt_y") && fHasMother[0]) fPtYDistributions[0] = tempPtY;
450  if (tempPtYName.BeginsWith("221_pt_y") && fHasMother[1]) fPtYDistributions[1] = tempPtY;
451  if (tempPtYName.BeginsWith("331_pt_y") && fHasMother[2]) fPtYDistributions[2] = tempPtY;
452  if (tempPtYName.BeginsWith("223_pt_y") && fHasMother[3]) fPtYDistributions[3] = tempPtY;
453  if (tempPtYName.BeginsWith("113_pt_y") && fHasMother[4]) fPtYDistributions[4] = tempPtY;
454  if (tempPtYName.BeginsWith("213_pt_y") && fHasMother[5]) fPtYDistributions[5] = tempPtY;
455  if (tempPtYName.BeginsWith("-213_pt_y") && fHasMother[6]) fPtYDistributions[6] = tempPtY;
456  if (tempPtYName.BeginsWith("333_pt_y") && fHasMother[7]) fPtYDistributions[7] = tempPtY;
457  if (tempPtYName.BeginsWith("443_pt_y") && fHasMother[8]) fPtYDistributions[8] = tempPtY;
458  if (tempPtYName.BeginsWith("1114_pt_y") && fHasMother[9]) fPtYDistributions[9] = tempPtY;
459  if (tempPtYName.BeginsWith("2114_pt_y") && fHasMother[10]) fPtYDistributions[10] = tempPtY;
460  if (tempPtYName.BeginsWith("2214_pt_y") && fHasMother[11]) fPtYDistributions[11] = tempPtY;
461  if (tempPtYName.BeginsWith("2224_pt_y") && fHasMother[12]) fPtYDistributions[12] = tempPtY;
462  if (tempPtYName.BeginsWith("3212_pt_y") && fHasMother[13]) fPtYDistributions[13] = tempPtY;
463  if (tempPtYName.BeginsWith("310_pt_y") && fHasMother[14]) fPtYDistributions[14] = tempPtY;
464  if (tempPtYName.BeginsWith("130_pt_y") && fHasMother[15]) fPtYDistributions[15] = tempPtY;
465  if (tempPtYName.BeginsWith("3122_pt_y") && fHasMother[16]) fPtYDistributions[16] = tempPtY;
466  }
467  }
468 }
469 
470 //_____________________________________________________________________________
472 
473  for (Int_t i=0; i<17; i++) fHasMother[i] = kFALSE;
474 
475  if (selectedMothers&AliGenEMCocktailV2::kGenPizero) fHasMother[0] = kTRUE;
476  if (selectedMothers&AliGenEMCocktailV2::kGenEta) fHasMother[1] = kTRUE;
477  if (selectedMothers&AliGenEMCocktailV2::kGenEtaprime) fHasMother[2] = kTRUE;
478  if (selectedMothers&AliGenEMCocktailV2::kGenOmega) fHasMother[3] = kTRUE;
479  if (selectedMothers&AliGenEMCocktailV2::kGenRho0) fHasMother[4] = kTRUE;
480  if (selectedMothers&AliGenEMCocktailV2::kGenRhoPl) fHasMother[5] = kTRUE;
481  if (selectedMothers&AliGenEMCocktailV2::kGenRhoMi) fHasMother[6] = kTRUE;
482  if (selectedMothers&AliGenEMCocktailV2::kGenPhi) fHasMother[7] = kTRUE;
483  if (selectedMothers&AliGenEMCocktailV2::kGenJpsi) fHasMother[8] = kTRUE;
484  if (selectedMothers&AliGenEMCocktailV2::kGenDeltaMi) fHasMother[9] = kTRUE;
485  if (selectedMothers&AliGenEMCocktailV2::kGenDeltaZero) fHasMother[10] = kTRUE;
486  if (selectedMothers&AliGenEMCocktailV2::kGenDeltaPl) fHasMother[11] = kTRUE;
487  if (selectedMothers&AliGenEMCocktailV2::kGenDeltaPlPl) fHasMother[12] = kTRUE;
488  if (selectedMothers&AliGenEMCocktailV2::kGenSigma0) fHasMother[13] = kTRUE;
489  if (selectedMothers&AliGenEMCocktailV2::kGenK0s) fHasMother[14] = kTRUE;
490  if (selectedMothers&AliGenEMCocktailV2::kGenK0l) fHasMother[15] = kTRUE;
491  if (selectedMothers&AliGenEMCocktailV2::kGenLambda) fHasMother[16] = kTRUE;
492 }
493 
494 //________________________________________________________________________
496 
497  // Loop over all primary MC particle
498  for(Long_t i = 0; i < fMCEvent->GetNumberOfTracks(); i++) {
499  // fill primary histograms
500  TParticle* particle = NULL;
501  particle = (TParticle *)fMCEvent->Particle(i);
502  if (!particle) continue;
503  Bool_t hasMother = kFALSE;
504  Bool_t particleIsPrimary = kTRUE;
505 
506  if (particle->GetMother(0)>-1){
507  hasMother = kTRUE;
508  particleIsPrimary = kFALSE;
509  }
510  TParticle* motherParticle = NULL;
511  if( hasMother ) motherParticle = (TParticle *)fMCEvent->Particle(particle->GetMother(0));
512  if (motherParticle){
513  hasMother = kTRUE;
514  }else{
515  hasMother = kFALSE;
516  }
517 
518  Bool_t motherIsPrimary = kFALSE;
519  if(hasMother){
520  if(motherParticle->GetMother(0)>-1)motherIsPrimary = kFALSE;
521  else motherIsPrimary = kTRUE;
522  }
523 
524  TParticle* daughter0 = NULL;
525  TParticle* daughter1 = NULL;
526 
527  if (!(TMath::Abs(particle->Energy()-particle->Pz())>0.)) continue;
528  Double_t yPre = (particle->Energy()+particle->Pz())/(particle->Energy()-particle->Pz());
529 // cout << i << "\t"<< particle->GetPdgCode() << "\t"<< particle->Pz() << "\t" << particle->Energy()<< "\t" << particle->Energy()-particle->Pz() << "\t"<< yPre << endl;
530  if( yPre <= 0 ) continue;
531 
532  Double_t y = 0.5*TMath::Log(yPre);
533  if (TMath::Abs(y) > fMaxY) continue;
534 
535  if(particle->GetPdgCode()==22 && hasMother==kTRUE){
536  if(motherIsPrimary && fHasMother[GetParticlePosLocal(motherParticle->GetPdgCode())]){
537  fHistPtYGamma->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
538  fHistPtPhiGamma->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
539  switch(motherParticle->GetPdgCode()){
540  case 111:
541  fHistPtYGammaSource[0]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
542  fHistPtPhiGammaSource[0]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
543  if(motherParticle->GetNDaughters() == 3){
544  fHistPtYGammaSourceFromDalitzPi0->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
545  fHistPtPhiGammaSourceFromDalitzPi0->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
546  }else{
547  fHistPtYGammaSourceFromNonDalitzPi0->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
548  fHistPtPhiGammaSourceFromNonDalitzPi0->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
549  }
550  fHistPtGammaSourcePtInput[0]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
551  fHistPhiGammaSourcePhiInput[0]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
552  break;
553  case 221:
554  fHistPtYGammaSource[1]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
555  fHistPtPhiGammaSource[1]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
556  fHistPtGammaSourcePtInput[1]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
557  fHistPhiGammaSourcePhiInput[1]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
558  break;
559  case 331:
560  fHistPtYGammaSource[2]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
561  fHistPtPhiGammaSource[2]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
562  fHistPtGammaSourcePtInput[2]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
563  fHistPhiGammaSourcePhiInput[2]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
564  break;
565  case 223:
566  fHistPtYGammaSource[3]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
567  fHistPtPhiGammaSource[3]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
568  fHistPtGammaSourcePtInput[3]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
569  fHistPhiGammaSourcePhiInput[3]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
570  break;
571  case 113:
572  fHistPtYGammaSource[4]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
573  fHistPtPhiGammaSource[4]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
574  fHistPtGammaSourcePtInput[4]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
575  fHistPhiGammaSourcePhiInput[4]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
576  break;
577  case 213:
578  fHistPtYGammaSource[5]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
579  fHistPtPhiGammaSource[5]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
580  fHistPtGammaSourcePtInput[5]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
581  fHistPhiGammaSourcePhiInput[5]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
582  break;
583  case -213:
584  fHistPtYGammaSource[6]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
585  fHistPtPhiGammaSource[6]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
586  fHistPtGammaSourcePtInput[6]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
587  fHistPhiGammaSourcePhiInput[6]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
588  break;
589  case 333:
590  fHistPtYGammaSource[7]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
591  fHistPtPhiGammaSource[7]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
592  fHistPtGammaSourcePtInput[7]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
593  fHistPhiGammaSourcePhiInput[7]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
594  break;
595  case 443:
596  fHistPtYGammaSource[8]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
597  fHistPtPhiGammaSource[8]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
598  fHistPtGammaSourcePtInput[8]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
599  fHistPhiGammaSourcePhiInput[8]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
600  break;
601  case 1114:
602  fHistPtYGammaSource[9]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
603  fHistPtPhiGammaSource[9]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
604  fHistPtGammaSourcePtInput[9]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
605  fHistPhiGammaSourcePhiInput[9]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
606  break;
607  case 2114:
608  fHistPtYGammaSource[10]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
609  fHistPtPhiGammaSource[10]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
610  fHistPtGammaSourcePtInput[10]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
611  fHistPhiGammaSourcePhiInput[10]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
612  break;
613  case 2214:
614  fHistPtYGammaSource[11]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
615  fHistPtPhiGammaSource[11]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
616  fHistPtGammaSourcePtInput[11]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
617  fHistPhiGammaSourcePhiInput[11]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
618  break;
619  case 2224:
620  fHistPtYGammaSource[12]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
621  fHistPtPhiGammaSource[12]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
622  fHistPtGammaSourcePtInput[12]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
623  fHistPhiGammaSourcePhiInput[12]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
624  break;
625  case 3212:
626  fHistPtYGammaSource[13]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
627  fHistPtPhiGammaSource[13]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
628  fHistPtGammaSourcePtInput[13]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
629  fHistPhiGammaSourcePhiInput[13]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
630  break;
631  case 310:
632  fHistPtYGammaSource[14]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
633  fHistPtPhiGammaSource[14]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
634  fHistPtGammaSourcePtInput[14]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
635  fHistPhiGammaSourcePhiInput[14]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
636  break;
637  case 130:
638  fHistPtYGammaSource[15]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
639  fHistPtPhiGammaSource[15]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
640  fHistPtGammaSourcePtInput[15]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
641  fHistPhiGammaSourcePhiInput[15]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
642  break;
643  case 3122:
644  fHistPtYGammaSource[16]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
645  fHistPtPhiGammaSource[16]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
646  fHistPtGammaSourcePtInput[16]->Fill(particle->Pt(), motherParticle->Pt(), particle->GetWeight());
647  fHistPhiGammaSourcePhiInput[16]->Fill(particle->Phi(), motherParticle->Phi(), particle->GetWeight());
648  break;
649  default:
650  fHistPdgGammaSourceRest->Fill(motherParticle->GetPdgCode());
651  break;
652  }
653  }
654  }
655 
656  if(particle->GetPdgCode()!=22 && particleIsPrimary && fHasMother[GetParticlePosLocal(particle->GetPdgCode())]){
657 
658  Double_t alpha = -999;
659  Double_t deltaPhi = -999;
660  if (particle->GetNDaughters() == 2) {
661  daughter0 = (TParticle*)fMCEvent->Particle(particle->GetFirstDaughter());
662  daughter1 = (TParticle*)fMCEvent->Particle(particle->GetLastDaughter());
663 
664  if (daughter0->GetPdgCode()==22 || daughter1->GetPdgCode()==22) {
665  Double_t firstEnergy, secondEnergy;
666  if (daughter0->GetPdgCode()==22) {
667  firstEnergy = daughter0->Energy();
668  secondEnergy = daughter1->Energy();
669  } else {
670  firstEnergy = daughter1->Energy();
671  secondEnergy = daughter0->Energy();
672  }
673  alpha = (firstEnergy - secondEnergy)/(firstEnergy + secondEnergy);
674  }
675 
676  if (daughter0->GetPdgCode()==22 && daughter1->GetPdgCode()==22) {
677  deltaPhi = TMath::Abs(daughter0->Phi() - daughter1->Phi());
678  }
679  }
680 
681  switch(particle->GetPdgCode()){
682  case 111:
683  fHistPtYInput[0]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
684  fHistPtPhiInput[0]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
685  fHistDecayChannelsInput[0]->Fill(0., particle->GetWeight());
686  fHistDecayChannelsInput[0]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
687  if (alpha>=-1) fHistPtAlphaInput[0]->Fill(particle->Pt(), alpha, particle->GetWeight());
688  if (deltaPhi>=0) fHistPtDeltaPhiInput[0]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
689  break;
690  case 221:
691  fHistPtYInput[1]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
692  fHistPtPhiInput[1]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
693  fHistDecayChannelsInput[1]->Fill(0., particle->GetWeight());
694  fHistDecayChannelsInput[1]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
695  if (alpha>=-1) fHistPtAlphaInput[1]->Fill(particle->Pt(), alpha, particle->GetWeight());
696  if (deltaPhi>=0) fHistPtDeltaPhiInput[1]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
697  break;
698  case 331:
699  fHistPtYInput[2]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
700  fHistPtPhiInput[2]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
701  fHistDecayChannelsInput[2]->Fill(0., particle->GetWeight());
702  fHistDecayChannelsInput[2]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
703  if (alpha>=-1) fHistPtAlphaInput[2]->Fill(particle->Pt(), alpha, particle->GetWeight());
704  if (deltaPhi>=0) fHistPtDeltaPhiInput[2]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
705  break;
706  case 223:
707  fHistPtYInput[3]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
708  fHistPtPhiInput[3]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
709  fHistDecayChannelsInput[3]->Fill(0., particle->GetWeight());
710  fHistDecayChannelsInput[3]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
711  if (alpha>=-1) fHistPtAlphaInput[3]->Fill(particle->Pt(), alpha, particle->GetWeight());
712  if (deltaPhi>=0) fHistPtDeltaPhiInput[3]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
713  break;
714  case 113:
715  fHistPtYInput[4]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
716  fHistPtPhiInput[4]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
717  fHistDecayChannelsInput[4]->Fill(0., particle->GetWeight());
718  fHistDecayChannelsInput[4]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
719  if (alpha>=-1 && fHistPtAlphaInput[4]) fHistPtAlphaInput[4]->Fill(particle->Pt(), alpha, particle->GetWeight());
720  if (deltaPhi>=0 && fHistPtDeltaPhiInput[4]) fHistPtDeltaPhiInput[4]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
721  break;
722  case 213:
723  fHistPtYInput[5]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
724  fHistPtPhiInput[5]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
725  fHistDecayChannelsInput[5]->Fill(0., particle->GetWeight());
726  fHistDecayChannelsInput[5]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
727  if (alpha>=-1 && fHistPtAlphaInput[5]) fHistPtAlphaInput[5]->Fill(particle->Pt(), alpha, particle->GetWeight());
728  if (deltaPhi>=0 && fHistPtDeltaPhiInput[5]) fHistPtDeltaPhiInput[5]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
729  break;
730  case -213:
731  fHistPtYInput[6]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
732  fHistPtPhiInput[6]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
733  fHistDecayChannelsInput[6]->Fill(0., particle->GetWeight());
734  fHistDecayChannelsInput[6]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
735  if (alpha>=-1 && fHistPtAlphaInput[6]) fHistPtAlphaInput[6]->Fill(particle->Pt(), alpha, particle->GetWeight());
736  if (deltaPhi>=0 && fHistPtDeltaPhiInput[6]) fHistPtDeltaPhiInput[6]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
737  break;
738  case 333:
739  fHistPtYInput[7]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
740  fHistPtPhiInput[7]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
741  fHistDecayChannelsInput[7]->Fill(0., particle->GetWeight());
742  fHistDecayChannelsInput[7]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
743  if (alpha >= -1) fHistPtAlphaInput[7]->Fill(particle->Pt(), alpha, particle->GetWeight());
744  if (deltaPhi>=0) fHistPtDeltaPhiInput[7]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
745  break;
746  case 443:
747  fHistPtYInput[8]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
748  fHistPtPhiInput[8]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
749  fHistDecayChannelsInput[8]->Fill(0., particle->GetWeight());
750  fHistDecayChannelsInput[8]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
751  if (alpha>=-1 && fHistPtAlphaInput[8]) fHistPtAlphaInput[8]->Fill(particle->Pt(), alpha, particle->GetWeight());
752  if (deltaPhi>=0 && fHistPtDeltaPhiInput[8]) fHistPtDeltaPhiInput[8]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
753  break;
754  case 1114:
755  fHistPtYInput[9]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
756  fHistPtPhiInput[9]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
757  fHistDecayChannelsInput[9]->Fill(0., particle->GetWeight());
758  fHistDecayChannelsInput[9]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
759  if (alpha>=-1 && fHistPtAlphaInput[9]) fHistPtAlphaInput[9]->Fill(particle->Pt(), alpha, particle->GetWeight());
760  if (deltaPhi>=0 && fHistPtDeltaPhiInput[9]) fHistPtDeltaPhiInput[9]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
761  break;
762  case 2114:
763  fHistPtYInput[10]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
764  fHistPtPhiInput[10]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
765  fHistDecayChannelsInput[10]->Fill(0., particle->GetWeight());
766  fHistDecayChannelsInput[10]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
767  if (alpha>=-1 && fHistPtAlphaInput[10]) fHistPtAlphaInput[10]->Fill(particle->Pt(), alpha, particle->GetWeight());
768  if (deltaPhi>=0 && fHistPtDeltaPhiInput[10]) fHistPtDeltaPhiInput[10]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
769  break;
770  case 2214:
771  fHistPtYInput[11]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
772  fHistPtPhiInput[11]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
773  fHistDecayChannelsInput[11]->Fill(0., particle->GetWeight());
774  fHistDecayChannelsInput[11]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
775  if (alpha>=-1 && fHistPtAlphaInput[11]) fHistPtAlphaInput[11]->Fill(particle->Pt(), alpha, particle->GetWeight());
776  if (deltaPhi>=0 && fHistPtDeltaPhiInput[11]) fHistPtDeltaPhiInput[11]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
777  break;
778  case 2224:
779  fHistPtYInput[12]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
780  fHistPtPhiInput[12]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
781  fHistDecayChannelsInput[12]->Fill(0., particle->GetWeight());
782  fHistDecayChannelsInput[12]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
783  if (alpha>=-1 && fHistPtAlphaInput[12]) fHistPtAlphaInput[12]->Fill(particle->Pt(), alpha, particle->GetWeight());
784  if (deltaPhi>=0 && fHistPtDeltaPhiInput[12]) fHistPtDeltaPhiInput[12]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
785  break;
786  case 3212:
787  fHistPtYInput[13]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
788  fHistPtPhiInput[13]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
789  fHistDecayChannelsInput[13]->Fill(0., particle->GetWeight());
790  fHistDecayChannelsInput[13]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
791  if (alpha>=-1 && fHistPtAlphaInput[13]) fHistPtAlphaInput[13]->Fill(particle->Pt(), alpha, particle->GetWeight());
792  if (deltaPhi>=0 && fHistPtDeltaPhiInput[13]) fHistPtDeltaPhiInput[13]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
793  break;
794  case 310:
795  fHistPtYInput[14]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
796  fHistPtPhiInput[14]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
797  fHistDecayChannelsInput[14]->Fill(0., particle->GetWeight());
798  fHistDecayChannelsInput[14]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
799  if (alpha>=-1 && fHistPtAlphaInput[14]) fHistPtAlphaInput[14]->Fill(particle->Pt(), alpha, particle->GetWeight());
800  if (deltaPhi>=0 && fHistPtDeltaPhiInput[14]) fHistPtDeltaPhiInput[14]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
801  break;
802  case 130:
803  fHistPtYInput[15]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
804  fHistPtPhiInput[15]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
805  fHistDecayChannelsInput[15]->Fill(0., particle->GetWeight());
806  fHistDecayChannelsInput[15]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
807  if (alpha>=-1 && fHistPtAlphaInput[15]) fHistPtAlphaInput[15]->Fill(particle->Pt(), alpha, particle->GetWeight());
808  if (deltaPhi>=0 && fHistPtDeltaPhiInput[15]) fHistPtDeltaPhiInput[15]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
809  break;
810  case 3122:
811  fHistPtYInput[16]->Fill(particle->Pt(), particle->Y(), particle->GetWeight());
812  fHistPtPhiInput[16]->Fill(particle->Pt(), particle->Phi(), particle->GetWeight());
813  fHistDecayChannelsInput[16]->Fill(0., particle->GetWeight());
814  fHistDecayChannelsInput[16]->Fill(GetDecayChannel(fMCEvent, particle), particle->GetWeight());
815  if (alpha>=-1 && fHistPtAlphaInput[16]) fHistPtAlphaInput[16]->Fill(particle->Pt(), alpha, particle->GetWeight());
816  if (deltaPhi>=0 && fHistPtDeltaPhiInput[16]) fHistPtDeltaPhiInput[16]->Fill(particle->Pt(), deltaPhi, particle->GetWeight());
817  break;
818  default:
819  fHistPdgInputRest->Fill(particle->GetPdgCode());
820  break;
821  }
822  }
823  }
824 }
825 
826 //________________________________________________________________________
828 {
829 
830  //fOutputContainer->Print(); // Will crash on GRID
831 }
832 
833 
834 //_________________________________________________________________________________
836  TAxis *axisafter = histoRebin->GetXaxis();
837  Int_t bins = axisafter->GetNbins();
838  Double_t from = axisafter->GetXmin();
839  Double_t to = axisafter->GetXmax();
840  Double_t *newbins = new Double_t[bins+1];
841  newbins[0] = from;
842  Double_t factor = TMath::Power(to/from, 1./bins);
843  for(Int_t i=1; i<=bins; ++i) newbins[i] = factor * newbins[i-1];
844  axisafter->Set(bins, newbins);
845  delete [] newbins;
846 }
847 
848 //_________________________________________________________________________________
850  TAxis *axisafter = histoRebin->GetXaxis();
851  Int_t bins = axisafter->GetNbins();
852  Double_t from = axisafter->GetXmin();
853  Double_t to = axisafter->GetXmax();
854  Double_t *newbins = new Double_t[bins+1];
855  newbins[0] = from;
856  Double_t factor = TMath::Power(to/from, 1./bins);
857  for(Int_t i=1; i<=bins; ++i) newbins[i] = factor * newbins[i-1];
858  axisafter->Set(bins, newbins);
859  delete [] newbins;
860 }
861 
862 //_________________________________________________________________________________
864 
865  switch (np) {
866  case 0:
867  hist->GetXaxis()->SetBinLabel(1,"all");
868  hist->GetXaxis()->SetBinLabel(2,"#gamma #gamma");
869  hist->GetXaxis()->SetBinLabel(3,"e^{+} e^{-} #gamma");
870  hist->GetXaxis()->SetBinLabel(4,"e^{+} e^{-} e^{+} e^{-}");
871  hist->GetXaxis()->SetBinLabel(5,"e^{+} e^{-}");
872  hist->GetXaxis()->SetBinLabel(20,"rest");
873  break;
874 
875  case 1:
876  hist->GetXaxis()->SetBinLabel(1,"all");
877  hist->GetXaxis()->SetBinLabel(2,"#gamma #gamma");
878  hist->GetXaxis()->SetBinLabel(3,"#pi^{0} #pi^{0} #pi^{0}");
879  hist->GetXaxis()->SetBinLabel(4,"#pi^{0} #gamma #gamma");
880  hist->GetXaxis()->SetBinLabel(5,"#pi^{+} #pi^{-} #gamma");
881  hist->GetXaxis()->SetBinLabel(6,"e^{+} e^{-} #gamma");
882  hist->GetXaxis()->SetBinLabel(7,"#mu^{+} #mu^{-} #gamma");
883  hist->GetXaxis()->SetBinLabel(8,"e^{+} e^{-} e^{+} e^{-}");
884  hist->GetXaxis()->SetBinLabel(9,"#pi^{+} #pi^{-} #gamma #gamma");
885  hist->GetXaxis()->SetBinLabel(20,"rest");
886  break;
887 
888  case 2:
889  hist->GetXaxis()->SetBinLabel(1,"all");
890  hist->GetXaxis()->SetBinLabel(2,"#pi^{+} #pi^{-} #eta");
891  hist->GetXaxis()->SetBinLabel(3,"#rho^{0} #gamma");
892  hist->GetXaxis()->SetBinLabel(4,"#pi^{+} #pi^{-} #gamma");
893  hist->GetXaxis()->SetBinLabel(5,"#omega #gamma");
894  hist->GetXaxis()->SetBinLabel(6,"#gamma #gamma");
895  hist->GetXaxis()->SetBinLabel(7,"#mu^{+} #mu^{-} #gamma");
896  hist->GetXaxis()->SetBinLabel(20,"rest");
897  break;
898 
899  case 3:
900  hist->GetXaxis()->SetBinLabel(1,"all");
901  hist->GetXaxis()->SetBinLabel(2,"#pi^{+} #pi^{-} #pi^{0}");
902  hist->GetXaxis()->SetBinLabel(3,"#pi^{0} #gamma");
903  hist->GetXaxis()->SetBinLabel(4,"#eta #gamma");
904  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} e^{+} e^{-}");
905  hist->GetXaxis()->SetBinLabel(6,"e^{+} e^{-}");
906  hist->GetXaxis()->SetBinLabel(7,"#pi^{0} #pi^{0} #gamma");
907  hist->GetXaxis()->SetBinLabel(20,"rest");
908  break;
909 
910  case 4:
911  hist->GetXaxis()->SetBinLabel(1,"all");
912  hist->GetXaxis()->SetBinLabel(2,"#pi^{+} #pi^{-}");
913  hist->GetXaxis()->SetBinLabel(3,"#pi^{+} #pi^{-} #gamma");
914  hist->GetXaxis()->SetBinLabel(4,"#pi^{0} #gamma");
915  hist->GetXaxis()->SetBinLabel(5,"#eta #gamma");
916  hist->GetXaxis()->SetBinLabel(6,"#pi^{0} #pi^{0} #gamma");
917  hist->GetXaxis()->SetBinLabel(7,"e^{+} e^{-}");
918  hist->GetXaxis()->SetBinLabel(20,"rest");
919  break;
920 
921  case 5:
922  hist->GetXaxis()->SetBinLabel(1,"all");
923  hist->GetXaxis()->SetBinLabel(2,"#pi^{+} #pi^{0}");
924  hist->GetXaxis()->SetBinLabel(3,"#pi^{+} #gamma");
925  hist->GetXaxis()->SetBinLabel(20,"rest");
926  break;
927 
928  case 6:
929  hist->GetXaxis()->SetBinLabel(1,"all");
930  hist->GetXaxis()->SetBinLabel(2,"#pi^{-} #pi^{0}");
931  hist->GetXaxis()->SetBinLabel(3,"#pi^{-} #gamma");
932  hist->GetXaxis()->SetBinLabel(20,"rest");
933  break;
934 
935  case 7:
936  hist->GetXaxis()->SetBinLabel(1,"all");
937  hist->GetXaxis()->SetBinLabel(2,"K^{+} K^{-}");
938  hist->GetXaxis()->SetBinLabel(3,"K^{0}_{L} K^{0}_{S}");
939  hist->GetXaxis()->SetBinLabel(4,"#eta #gamma");
940  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} #gamma");
941  hist->GetXaxis()->SetBinLabel(6,"e^{+} e^{-}");
942  hist->GetXaxis()->SetBinLabel(7,"#eta e^{+} e^{-}");
943  hist->GetXaxis()->SetBinLabel(8,"#pi^{+} #pi^{-} #gamma");
944  hist->GetXaxis()->SetBinLabel(9,"f_{0}(980) #gamma");
945  hist->GetXaxis()->SetBinLabel(10,"#pi^{0} #pi^{0} #gamma");
946  hist->GetXaxis()->SetBinLabel(11,"#pi^{0} e^{+} e^{-}");
947  hist->GetXaxis()->SetBinLabel(12,"#pi^{0} #eta #gamma");
948  hist->GetXaxis()->SetBinLabel(13,"a_{0}(980) #gamma");
949  hist->GetXaxis()->SetBinLabel(14,"#eta' #gamma");
950  hist->GetXaxis()->SetBinLabel(15,"#mu^{+} #mu^{-} #gamma");
951  hist->GetXaxis()->SetBinLabel(20,"rest");
952  break;
953 
954  case 8:
955  hist->GetXaxis()->SetBinLabel(1,"all");
956  hist->GetXaxis()->SetBinLabel(2,"ggg");
957  hist->GetXaxis()->SetBinLabel(3,"gg #gamma");
958  hist->GetXaxis()->SetBinLabel(4,"e^{+} e^{-}");
959  hist->GetXaxis()->SetBinLabel(5,"e^{+} e^{-} #gamma");
960  hist->GetXaxis()->SetBinLabel(20,"rest");
961  break;
962 
963  case 9:
964  hist->GetXaxis()->SetBinLabel(1,"all");
965  hist->GetXaxis()->SetBinLabel(2,"n #pi^{-}");
966  hist->GetXaxis()->SetBinLabel(3,"X #gamma");
967  hist->GetXaxis()->SetBinLabel(20,"rest");
968  break;
969 
970  case 10:
971  hist->GetXaxis()->SetBinLabel(1,"all");
972  hist->GetXaxis()->SetBinLabel(2,"n #pi^{0}");
973  hist->GetXaxis()->SetBinLabel(3,"p #pi^{-}");
974  hist->GetXaxis()->SetBinLabel(4,"n #gamma");
975  hist->GetXaxis()->SetBinLabel(20,"rest");
976  break;
977 
978  case 11:
979  hist->GetXaxis()->SetBinLabel(1,"all");
980  hist->GetXaxis()->SetBinLabel(2,"n #pi^{+}");
981  hist->GetXaxis()->SetBinLabel(3,"p #pi^{0}");
982  hist->GetXaxis()->SetBinLabel(4,"p #gamma");
983  hist->GetXaxis()->SetBinLabel(20,"rest");
984  break;
985 
986  case 12:
987  hist->GetXaxis()->SetBinLabel(1,"all");
988  hist->GetXaxis()->SetBinLabel(2,"p #pi^{+}");
989  hist->GetXaxis()->SetBinLabel(3,"X #gamma");
990  hist->GetXaxis()->SetBinLabel(20,"rest");
991  break;
992 
993  case 13:
994  hist->GetXaxis()->SetBinLabel(1,"all");
995  hist->GetXaxis()->SetBinLabel(2,"#Lambda #gamma");
996  hist->GetXaxis()->SetBinLabel(3,"#Lambda e^{+} e^{-}");
997  hist->GetXaxis()->SetBinLabel(20,"rest");
998  break;
999 
1000  case 14:
1001  hist->GetXaxis()->SetBinLabel(1,"all");
1002  hist->GetXaxis()->SetBinLabel(2,"#pi^{0} #pi^{0}");
1003  hist->GetXaxis()->SetBinLabel(3,"#pi^{+} #pi^{-}");
1004  hist->GetXaxis()->SetBinLabel(4,"#pi^{+} #pi^{-} #gamma");
1005  hist->GetXaxis()->SetBinLabel(5,"#pi^{0} #gamma #gamma");
1006  hist->GetXaxis()->SetBinLabel(6,"#gamma #gamma");
1007  hist->GetXaxis()->SetBinLabel(20,"rest");
1008  break;
1009 
1010  case 15:
1011  hist->GetXaxis()->SetBinLabel(1,"all");
1012  hist->GetXaxis()->SetBinLabel(2,"#pi^{0} #pi^{0} #pi^{0}");
1013  hist->GetXaxis()->SetBinLabel(3,"#pi^{+} #pi^{-} #pi^{0}");
1014  hist->GetXaxis()->SetBinLabel(4,"#pi^{#pm} e^{#mp} #nu #gamma");
1015  hist->GetXaxis()->SetBinLabel(5,"#pi^{#pm} #mu^{#mp} #nu #gamma");
1016  hist->GetXaxis()->SetBinLabel(6,"#pi^{+} #pi^{-} #gamma");
1017  hist->GetXaxis()->SetBinLabel(7,"#pi^{0} #gamma #gamma");
1018  hist->GetXaxis()->SetBinLabel(8,"#pi^{0} e^{+} e^{-} #gamma");
1019  hist->GetXaxis()->SetBinLabel(9,"#gamma #gamma");
1020  hist->GetXaxis()->SetBinLabel(10,"e^{+} e^{-} #gamma");
1021  hist->GetXaxis()->SetBinLabel(11,"e^{+} e^{-} #gamma #gamma");
1022  hist->GetXaxis()->SetBinLabel(12,"#mu^{+} #mu^{-} #gamma");
1023  hist->GetXaxis()->SetBinLabel(13,"#mu^{+} #mu^{-} #gamma #gamma");
1024  hist->GetXaxis()->SetBinLabel(20,"rest");
1025  break;
1026 
1027  case 16:
1028  hist->GetXaxis()->SetBinLabel(1,"all");
1029  hist->GetXaxis()->SetBinLabel(2,"p #pi^{-}");
1030  hist->GetXaxis()->SetBinLabel(3,"n #pi^{0}");
1031  hist->GetXaxis()->SetBinLabel(4,"n #gamma");
1032  hist->GetXaxis()->SetBinLabel(5,"p #pi^{-} #gamma");
1033  hist->GetXaxis()->SetBinLabel(20,"rest");
1034  break;
1035 
1036  default:
1037  break;
1038  }
1039 }
1040 
1041 //_________________________________________________________________________________
1043 
1044  Int_t nDaughters = part->GetNDaughters();
1045  if (nDaughters > 10) return 19.;
1046 
1047  std::vector<Long64_t> *PdgDaughter = new std::vector<Long64_t>(nDaughters);
1048  Long64_t tempPdgCode = 0;
1049  for (Int_t i=0; i<nDaughters; i++) {
1050  tempPdgCode = (Long64_t)((TParticle*)mcEvent->Particle(part->GetFirstDaughter()+i))->GetPdgCode();
1051  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)
1052  tempPdgCode = TMath::Abs(tempPdgCode);
1053  PdgDaughter->at(i) = tempPdgCode;
1054  }
1055  std::sort(PdgDaughter->begin(), PdgDaughter->end());
1056 
1057  Double_t returnVal = -1.;
1058 
1059  switch (part->GetPdgCode()) {
1060  case 111:
1061  if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22)
1062  returnVal = 1.;
1063  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22)
1064  returnVal = 2.;
1065  else if (nDaughters == 4 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 11 && PdgDaughter->at(3) == 11)
1066  returnVal = 3.;
1067  else if (nDaughters == 2 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11)
1068  returnVal = 4.;
1069  else
1070  returnVal = 19.;
1071  break;
1072 
1073  case 221:
1074  if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22)
1075  returnVal = 1.;
1076  else if (nDaughters == 3 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1077  returnVal = 2.;
1078  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 111)
1079  returnVal = 3.;
1080  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1081  returnVal = 4.;
1082  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22)
1083  returnVal = 5.;
1084  else if (nDaughters == 3 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 22)
1085  returnVal = 6.;
1086  else if (nDaughters == 4 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 11 && PdgDaughter->at(3) == 11)
1087  returnVal = 7.;
1088  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 211)
1089  returnVal = 8.;
1090  else
1091  returnVal = 19.;
1092  break;
1093 
1094  case 331:
1095  if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211 && PdgDaughter->at(2) == 221)
1096  returnVal = 1.;
1097  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 113)
1098  returnVal = 2.;
1099  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1100  returnVal = 3.;
1101  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 223)
1102  returnVal = 4.;
1103  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22)
1104  returnVal = 5.;
1105  else if (nDaughters == 3 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 22)
1106  returnVal = 6.;
1107  else
1108  returnVal = 19.;
1109  break;
1110 
1111  case 223:
1112  if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1113  returnVal = 1.;
1114  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111)
1115  returnVal = 2.;
1116  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 221)
1117  returnVal = 3.;
1118  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 111)
1119  returnVal = 4.;
1120  else if (nDaughters == 2 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11)
1121  returnVal = 5.;
1122  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1123  returnVal = 6.;
1124  else
1125  returnVal = 19.;
1126  break;
1127 
1128  case 113:
1129  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211)
1130  returnVal = 1.;
1131  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1132  returnVal = 2.;
1133  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111)
1134  returnVal = 3.;
1135  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 221)
1136  returnVal = 4.;
1137  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1138  returnVal = 5.;
1139  else if (nDaughters == 2 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11)
1140  returnVal = 6.;
1141  else
1142  returnVal = 19.;
1143  break;
1144 
1145  case 213:
1146  if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 211)
1147  returnVal = 1.;
1148  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 211)
1149  returnVal = 2.;
1150  else
1151  returnVal = 19.;
1152  break;
1153 
1154  case -213:
1155  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111)
1156  returnVal = 1.;
1157  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22)
1158  returnVal = 2.;
1159  else
1160  returnVal = 19.;
1161  break;
1162 
1163  case 333:
1164  if (nDaughters == 2 && PdgDaughter->at(0) == -321 && PdgDaughter->at(1) == 321)
1165  returnVal = 1.;
1166  else if (nDaughters == 2 && PdgDaughter->at(0) == 130 && PdgDaughter->at(1) == 310)
1167  returnVal = 2.;
1168  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 221)
1169  returnVal = 3.;
1170  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111)
1171  returnVal = 4.;
1172  else if (nDaughters == 2 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11)
1173  returnVal = 5.;
1174  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 221)
1175  returnVal = 6.;
1176  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1177  returnVal = 7.;
1178  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 9010221)
1179  returnVal = 8.;
1180  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1181  returnVal = 9.;
1182  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 111)
1183  returnVal = 10.;
1184  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 221)
1185  returnVal = 11.;
1186  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 9000111)
1187  returnVal = 12.;
1188  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 331)
1189  returnVal = 13.;
1190  else if (nDaughters == 3 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 22)
1191  returnVal = 14.;
1192  else
1193  returnVal = 19.;
1194  break;
1195 
1196  case 443:
1197  if (nDaughters == 3 && (PdgDaughter->at(0) == 21 || PdgDaughter->at(0) == 9) && (PdgDaughter->at(1) == 21 || PdgDaughter->at(1) == 9) && (PdgDaughter->at(2) == 21 || PdgDaughter->at(2) == 9))
1198  returnVal = 1.;
1199  else if (nDaughters == 3 && (PdgDaughter->at(0) == 21 || PdgDaughter->at(0) == 9) && (PdgDaughter->at(1) == 21 || PdgDaughter->at(1) == 9) && PdgDaughter->at(2) == 22)
1200  returnVal = 2.;
1201  else if (nDaughters == 2 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11)
1202  returnVal = 3.;
1203  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22)
1204  returnVal = 4.;
1205  else
1206  returnVal = 19.;
1207  break;
1208 
1209  case 1114:
1210  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 2112)
1211  returnVal = 1.;
1212  else if (std::find(PdgDaughter->begin(), PdgDaughter->end(), 22) != PdgDaughter->end())
1213  returnVal = 2.;
1214  else
1215  returnVal = 19.;
1216  break;
1217 
1218  case 2114:
1219  if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 2112)
1220  returnVal = 1.;
1221  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 2212)
1222  returnVal = 2.;
1223  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 2112)
1224  returnVal = 3.;
1225  else
1226  returnVal = 19.;
1227  break;
1228 
1229  case 2214:
1230  if (nDaughters == 2 && PdgDaughter->at(0) == 211 && PdgDaughter->at(1) == 2112)
1231  returnVal = 1.;
1232  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 2212)
1233  returnVal = 2.;
1234  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 2212)
1235  returnVal = 3.;
1236  else
1237  returnVal = 19.;
1238  break;
1239 
1240  case 2224:
1241  if (nDaughters == 2 && PdgDaughter->at(0) == 211 && PdgDaughter->at(1) == 2212)
1242  returnVal = 1.;
1243  else if (std::find(PdgDaughter->begin(), PdgDaughter->end(), 22) != PdgDaughter->end())
1244  returnVal = 2.;
1245  else
1246  returnVal = 19.;
1247  break;
1248 
1249  case 3212:
1250  if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 3122)
1251  returnVal = 1.;
1252  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 3122)
1253  returnVal = 2.;
1254  else
1255  returnVal = 19.;
1256  break;
1257 
1258  case 310:
1259  if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111)
1260  returnVal = 1.;
1261  else if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 211)
1262  returnVal = 2.;
1263  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1264  returnVal = 3.;
1265  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1266  returnVal = 4.;
1267  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22)
1268  returnVal = 5.;
1269  else
1270  returnVal = 19.;
1271  break;
1272 
1273  case 130:
1274  if (nDaughters == 3 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 111)
1275  returnVal = 1.;
1276  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 111 && PdgDaughter->at(2) == 211)
1277  returnVal = 2.;
1278  else if (nDaughters == 4 && PdgDaughter->at(0) == -12 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 211)
1279  returnVal = 3.;
1280  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -11 && PdgDaughter->at(2) == 12 && PdgDaughter->at(3) == 22)
1281  returnVal = 3.;
1282  else if (nDaughters == 4 && PdgDaughter->at(0) == -14 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 211)
1283  returnVal = 4.;
1284  else if (nDaughters == 4 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == -13 && PdgDaughter->at(2) == 14 && PdgDaughter->at(3) == 22)
1285  returnVal = 4.;
1286  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 211)
1287  returnVal = 5.;
1288  else if (nDaughters == 3 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 111)
1289  returnVal = 6.;
1290  else if (nDaughters == 4 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 111)
1291  returnVal = 7.;
1292  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 22)
1293  returnVal = 8.;
1294  else if (nDaughters == 3 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22)
1295  returnVal = 9.;
1296  else if (nDaughters == 4 && PdgDaughter->at(0) == -11 && PdgDaughter->at(1) == 11 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 22)
1297  returnVal = 10.;
1298  else if (nDaughters == 3 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 22)
1299  returnVal = 11.;
1300  else if (nDaughters == 4 && PdgDaughter->at(0) == -13 && PdgDaughter->at(1) == 13 && PdgDaughter->at(2) == 22 && PdgDaughter->at(3) == 22)
1301  returnVal = 12.;
1302  else
1303  returnVal = 19.;
1304  break;
1305 
1306  case 3122:
1307  if (nDaughters == 2 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 2212)
1308  returnVal = 1.;
1309  else if (nDaughters == 2 && PdgDaughter->at(0) == 111 && PdgDaughter->at(1) == 2112)
1310  returnVal = 2.;
1311  else if (nDaughters == 2 && PdgDaughter->at(0) == 22 && PdgDaughter->at(1) == 2112)
1312  returnVal = 3.;
1313  else if (nDaughters == 3 && PdgDaughter->at(0) == -211 && PdgDaughter->at(1) == 22 && PdgDaughter->at(2) == 2212)
1314  returnVal = 4.;
1315  else
1316  returnVal = 19.;
1317  break;
1318 
1319  default:
1320  returnVal = -1.;
1321  break;
1322  }
1323 
1324  delete PdgDaughter;
1325  return returnVal;
1326 }
1327 
1328 //_________________________________________________________________________________
1330 
1331  Int_t kc, nPart, firstChannel, lastChannel;
1332  Double_t BR, BRtot;
1333  std::vector<Int_t> pdgCodes;
1334 
1335  switch (np) {
1336  case 0:
1337  kc = (AliPythia6::Instance())->Pycomp(111);
1338  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1339  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1340  BRtot = 0.;
1341  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1342  BR = (AliPythia6::Instance())->GetBRAT(channel);
1343  BRtot = BRtot + BR;
1344  nPart = 0;
1345  for (Int_t i=1; i<=5; i++) {
1346  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1347  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1348  nPart++;
1349  }
1350  }
1351  std::sort(pdgCodes.begin(), pdgCodes.end());
1352  if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 22)
1353  histo->SetBinContent(2, BR);
1354  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 22)
1355  histo->SetBinContent(3, BR);
1356  else if (nPart == 4 && pdgCodes[0] == -11 && pdgCodes[1] == -11 && pdgCodes[2] == 11 && pdgCodes[3] == 11)
1357  histo->SetBinContent(4, BR);
1358  else if (nPart == 2 && pdgCodes[0] == -11 && pdgCodes[1] == 11)
1359  histo->SetBinContent(5, BR);
1360  else
1361  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1362  pdgCodes.clear();
1363  }
1364  histo->SetBinContent(1, BRtot);
1365  pdgCodes.clear();
1366  break;
1367 
1368  case 1:
1369  kc = (AliPythia6::Instance())->Pycomp(221);
1370  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1371  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1372  BRtot = 0.;
1373  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1374  BR = (AliPythia6::Instance())->GetBRAT(channel);
1375  BRtot = BRtot + BR;
1376  nPart = 0;
1377  for (Int_t i=1; i<=5; i++) {
1378  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1379  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1380  nPart++;
1381  }
1382  }
1383  std::sort(pdgCodes.begin(), pdgCodes.end());
1384  if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 22)
1385  histo->SetBinContent(2, BR);
1386  else if (nPart == 3 && pdgCodes[0] == 111 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1387  histo->SetBinContent(3, BR);
1388  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 22 && pdgCodes[2] == 111)
1389  histo->SetBinContent(4, BR);
1390  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1391  histo->SetBinContent(5, BR);
1392  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 22)
1393  histo->SetBinContent(6, BR);
1394  else if (nPart == 3 && pdgCodes[0] == -13 && pdgCodes[1] == 13 && pdgCodes[2] == 22)
1395  histo->SetBinContent(7, BR);
1396  else if (nPart == 4 && pdgCodes[0] == -11 && pdgCodes[1] == -11 && pdgCodes[2] == 11 && pdgCodes[3] == 11)
1397  histo->SetBinContent(8, BR);
1398  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 22 && pdgCodes[3] == 211)
1399  histo->SetBinContent(9, BR);
1400  else
1401  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1402  pdgCodes.clear();
1403  }
1404  histo->SetBinContent(1, BRtot);
1405  pdgCodes.clear();
1406  break;
1407 
1408  case 2:
1409  kc = (AliPythia6::Instance())->Pycomp(331);
1410  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1411  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1412  BRtot = 0.;
1413  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1414  BR = (AliPythia6::Instance())->GetBRAT(channel);
1415  BRtot = BRtot + BR;
1416  nPart = 0;
1417  for (Int_t i=1; i<=5; i++) {
1418  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1419  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1420  nPart++;
1421  }
1422  }
1423  std::sort(pdgCodes.begin(), pdgCodes.end());
1424  if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 211 && pdgCodes[2] == 221)
1425  histo->SetBinContent(2, BR);
1426  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 113)
1427  histo->SetBinContent(3, BR);
1428  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1429  histo->SetBinContent(4, BR);
1430  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 223)
1431  histo->SetBinContent(5, BR);
1432  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 22)
1433  histo->SetBinContent(6, BR);
1434  else if (nPart == 3 && pdgCodes[0] == -13 && pdgCodes[1] == 13 && pdgCodes[2] == 22)
1435  histo->SetBinContent(7, BR);
1436  else
1437  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1438  pdgCodes.clear();
1439  }
1440  histo->SetBinContent(1, BRtot);
1441  pdgCodes.clear();
1442  break;
1443 
1444  case 3:
1445  kc = (AliPythia6::Instance())->Pycomp(223);
1446  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1447  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1448  BRtot = 0.;
1449  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1450  BR = (AliPythia6::Instance())->GetBRAT(channel);
1451  BRtot = BRtot + BR;
1452  nPart = 0;
1453  for (Int_t i=1; i<=5; i++) {
1454  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1455  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1456  nPart++;
1457  }
1458  }
1459  std::sort(pdgCodes.begin(), pdgCodes.end());
1460  if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1461  histo->SetBinContent(2, BR);
1462  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 111)
1463  histo->SetBinContent(3, BR);
1464  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 221)
1465  histo->SetBinContent(4, BR);
1466  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 111)
1467  histo->SetBinContent(5, BR);
1468  else if (nPart == 2 && pdgCodes[0] == -11 && pdgCodes[1] == 11)
1469  histo->SetBinContent(6, BR);
1470  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1471  histo->SetBinContent(7, BR);
1472  else
1473  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1474  pdgCodes.clear();
1475  }
1476  histo->SetBinContent(1, BRtot);
1477  pdgCodes.clear();
1478  break;
1479 
1480  case 4:
1481  kc = (AliPythia6::Instance())->Pycomp(113);
1482  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1483  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1484  BRtot = 0.;
1485  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1486  BR = (AliPythia6::Instance())->GetBRAT(channel);
1487  BRtot = BRtot + BR;
1488  nPart = 0;
1489  for (Int_t i=1; i<=5; i++) {
1490  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1491  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1492  nPart++;
1493  }
1494  }
1495  std::sort(pdgCodes.begin(), pdgCodes.end());
1496  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 211)
1497  histo->SetBinContent(2, BR);
1498  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1499  histo->SetBinContent(3, BR);
1500  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 111)
1501  histo->SetBinContent(4, BR);
1502  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 221)
1503  histo->SetBinContent(5, BR);
1504  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1505  histo->SetBinContent(6, BR);
1506  else if (nPart == 2 && pdgCodes[0] == -11 && pdgCodes[1] == 11)
1507  histo->SetBinContent(7, BR);
1508  else
1509  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1510  pdgCodes.clear();
1511  }
1512  histo->SetBinContent(1, BRtot);
1513  pdgCodes.clear();
1514  break;
1515 
1516  case 5:
1517  kc = (AliPythia6::Instance())->Pycomp(213);
1518  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1519  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1520  BRtot = 0.;
1521  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1522  BR = (AliPythia6::Instance())->GetBRAT(channel);
1523  BRtot = BRtot + BR;
1524  nPart = 0;
1525  for (Int_t i=1; i<=5; i++) {
1526  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1527  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1528  nPart++;
1529  }
1530  }
1531  std::sort(pdgCodes.begin(), pdgCodes.end());
1532  if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 211)
1533  histo->SetBinContent(2, BR);
1534  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 211)
1535  histo->SetBinContent(3, BR);
1536  else
1537  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1538  pdgCodes.clear();
1539  }
1540  histo->SetBinContent(1, BRtot);
1541  pdgCodes.clear();
1542  break;
1543 
1544  case 6:
1545  kc = (AliPythia6::Instance())->Pycomp(213); // is rho- (-213), but Pycomp handels like rho+ (213)
1546  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1547  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1548  BRtot = 0.;
1549  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1550  BR = (AliPythia6::Instance())->GetBRAT(channel);
1551  BRtot = BRtot + BR;
1552  nPart = 0;
1553  for (Int_t i=1; i<=5; i++) {
1554  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1555  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1556  nPart++;
1557  }
1558  }
1559  std::sort(pdgCodes.begin(), pdgCodes.end());
1560  if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 211)
1561  histo->SetBinContent(2, BR);
1562  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 211)
1563  histo->SetBinContent(3, BR);
1564  else
1565  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1566  pdgCodes.clear();
1567  }
1568  histo->SetBinContent(1, BRtot);
1569  pdgCodes.clear();
1570  break;
1571 
1572  case 7:
1573  kc = (AliPythia6::Instance())->Pycomp(333);
1574  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1575  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1576  BRtot = 0.;
1577  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1578  BR = (AliPythia6::Instance())->GetBRAT(channel);
1579  BRtot = BRtot + BR;
1580  nPart = 0;
1581  for (Int_t i=1; i<=5; i++) {
1582  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1583  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1584  nPart++;
1585  }
1586  }
1587  std::sort(pdgCodes.begin(), pdgCodes.end());
1588  if (nPart == 2 && pdgCodes[0] == -321 && pdgCodes[1] == 321)
1589  histo->SetBinContent(2, BR);
1590  else if (nPart == 2 && pdgCodes[0] == 130 && pdgCodes[1] == 310)
1591  histo->SetBinContent(3, BR);
1592  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 221)
1593  histo->SetBinContent(4, BR);
1594  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 111)
1595  histo->SetBinContent(5, BR);
1596  else if (nPart == 2 && pdgCodes[0] == -11 && pdgCodes[1] == 11)
1597  histo->SetBinContent(6, BR);
1598  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 221)
1599  histo->SetBinContent(7, BR);
1600  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1601  histo->SetBinContent(8, BR);
1602  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 9010221)
1603  histo->SetBinContent(9, BR);
1604  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1605  histo->SetBinContent(10, BR);
1606  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 111)
1607  histo->SetBinContent(11, BR);
1608  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 111 && pdgCodes[2] == 221)
1609  histo->SetBinContent(12, BR);
1610  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 9000111)
1611  histo->SetBinContent(13, BR);
1612  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 331)
1613  histo->SetBinContent(14, BR);
1614  else if (nPart == 3 && pdgCodes[0] == -13 && pdgCodes[1] == 13 && pdgCodes[2] == 22)
1615  histo->SetBinContent(15, BR);
1616  else
1617  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1618  pdgCodes.clear();
1619  }
1620  histo->SetBinContent(1, BRtot);
1621  pdgCodes.clear();
1622  break;
1623 
1624  case 8:
1625  kc = (AliPythia6::Instance())->Pycomp(443);
1626  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1627  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1628  BRtot = 0.;
1629  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1630  BR = (AliPythia6::Instance())->GetBRAT(channel);
1631  BRtot = BRtot + BR;
1632  nPart = 0;
1633  for (Int_t i=1; i<=5; i++) {
1634  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1635  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1636  nPart++;
1637  }
1638  }
1639  std::sort(pdgCodes.begin(), pdgCodes.end());
1640  if (nPart == 3 && (pdgCodes[0] == 21 || pdgCodes[0] == 9) && (pdgCodes[1] == 21 || pdgCodes[1] == 9) && (pdgCodes[2] == 21 || pdgCodes[2] == 9))
1641  histo->SetBinContent(2, BR);
1642  else if (nPart == 3 && (pdgCodes[0] == 21 || pdgCodes[0] == 9) && (pdgCodes[1] == 21 || pdgCodes[1] == 9) && pdgCodes[2] == 22)
1643  histo->SetBinContent(3, BR);
1644  else if (nPart == 2 && pdgCodes[0] == -11 && pdgCodes[1] == 11)
1645  histo->SetBinContent(4, BR);
1646  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 22)
1647  histo->SetBinContent(5, BR);
1648  else
1649  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1650  pdgCodes.clear();
1651  }
1652  histo->SetBinContent(1, BRtot);
1653  pdgCodes.clear();
1654  break;
1655 
1656  case 9:
1657  kc = (AliPythia6::Instance())->Pycomp(1114);
1658  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1659  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1660  BRtot = 0.;
1661  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1662  BR = (AliPythia6::Instance())->GetBRAT(channel);
1663  BRtot = BRtot + BR;
1664  nPart = 0;
1665  for (Int_t i=1; i<=5; i++) {
1666  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1667  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1668  nPart++;
1669  }
1670  }
1671  std::sort(pdgCodes.begin(), pdgCodes.end());
1672  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[0] == 2112)
1673  histo->SetBinContent(2, BR);
1674  else if (std::find(pdgCodes.begin(), pdgCodes.end(), 22) != pdgCodes.end())
1675  histo->SetBinContent(3, BR+histo->GetBinContent(3));
1676  else
1677  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1678  pdgCodes.clear();
1679  }
1680  histo->SetBinContent(1, BRtot);
1681  pdgCodes.clear();
1682  break;
1683 
1684  case 10:
1685  kc = (AliPythia6::Instance())->Pycomp(2114);
1686  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1687  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1688  BRtot = 0.;
1689  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1690  BR = (AliPythia6::Instance())->GetBRAT(channel);
1691  BRtot = BRtot + BR;
1692  nPart = 0;
1693  for (Int_t i=1; i<=5; i++) {
1694  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1695  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1696  nPart++;
1697  }
1698  }
1699  std::sort(pdgCodes.begin(), pdgCodes.end());
1700  if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 2112)
1701  histo->SetBinContent(2, BR);
1702  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 2212)
1703  histo->SetBinContent(3, BR);
1704  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 2112)
1705  histo->SetBinContent(4, BR);
1706  else
1707  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1708  pdgCodes.clear();
1709  }
1710  histo->SetBinContent(1, BRtot);
1711  pdgCodes.clear();
1712  break;
1713 
1714  case 11:
1715  kc = (AliPythia6::Instance())->Pycomp(2214);
1716  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1717  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1718  BRtot = 0.;
1719  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1720  BR = (AliPythia6::Instance())->GetBRAT(channel);
1721  BRtot = BRtot + BR;
1722  nPart = 0;
1723  for (Int_t i=1; i<=5; i++) {
1724  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1725  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1726  nPart++;
1727  }
1728  }
1729  std::sort(pdgCodes.begin(), pdgCodes.end());
1730  if (nPart == 2 && pdgCodes[0] == 211 && pdgCodes[1] == 2112)
1731  histo->SetBinContent(2, BR);
1732  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 2212)
1733  histo->SetBinContent(3, BR);
1734  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 2212)
1735  histo->SetBinContent(4, BR);
1736  else
1737  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1738  pdgCodes.clear();
1739  }
1740  histo->SetBinContent(1, BRtot);
1741  pdgCodes.clear();
1742  break;
1743 
1744  case 12:
1745  kc = (AliPythia6::Instance())->Pycomp(2224);
1746  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1747  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1748  BRtot = 0.;
1749  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1750  BR = (AliPythia6::Instance())->GetBRAT(channel);
1751  BRtot = BRtot + BR;
1752  nPart = 0;
1753  for (Int_t i=1; i<=5; i++) {
1754  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1755  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1756  nPart++;
1757  }
1758  }
1759  std::sort(pdgCodes.begin(), pdgCodes.end());
1760  if (nPart == 2 && pdgCodes[0] == 211 && pdgCodes[0] == 2212)
1761  histo->SetBinContent(2, BR);
1762  else if (std::find(pdgCodes.begin(), pdgCodes.end(), 22) != pdgCodes.end())
1763  histo->SetBinContent(3, BR+histo->GetBinContent(3));
1764  else
1765  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1766  pdgCodes.clear();
1767  }
1768  histo->SetBinContent(1, BRtot);
1769  pdgCodes.clear();
1770  break;
1771 
1772  case 13:
1773  kc = (AliPythia6::Instance())->Pycomp(3212);
1774  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1775  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1776  BRtot = 0.;
1777  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1778  BR = (AliPythia6::Instance())->GetBRAT(channel);
1779  BRtot = BRtot + BR;
1780  nPart = 0;
1781  for (Int_t i=1; i<=5; i++) {
1782  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1783  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1784  nPart++;
1785  }
1786  }
1787  std::sort(pdgCodes.begin(), pdgCodes.end());
1788  if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 3122)
1789  histo->SetBinContent(2, BR);
1790  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 3122)
1791  histo->SetBinContent(3, BR);
1792  else
1793  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1794  pdgCodes.clear();
1795  }
1796  histo->SetBinContent(1, BRtot);
1797  pdgCodes.clear();
1798  break;
1799 
1800  case 14:
1801  kc = (AliPythia6::Instance())->Pycomp(310);
1802  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1803  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1804  BRtot = 0.;
1805  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1806  BR = (AliPythia6::Instance())->GetBRAT(channel);
1807  BRtot = BRtot + BR;
1808  nPart = 0;
1809  for (Int_t i=1; i<=5; i++) {
1810  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1811  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1812  nPart++;
1813  }
1814  }
1815  std::sort(pdgCodes.begin(), pdgCodes.end());
1816  if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 111)
1817  histo->SetBinContent(2, BR);
1818  else if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 211)
1819  histo->SetBinContent(3, BR);
1820  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1821  histo->SetBinContent(4, BR);
1822  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 22 && pdgCodes[2] == 111)
1823  histo->SetBinContent(5, BR);
1824  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 22)
1825  histo->SetBinContent(6, BR);
1826  else
1827  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1828  pdgCodes.clear();
1829  }
1830  histo->SetBinContent(1, BRtot);
1831  pdgCodes.clear();
1832  break;
1833 
1834  case 15:
1835  kc = (AliPythia6::Instance())->Pycomp(130);
1836  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1837  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1838  BRtot = 0.;
1839  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1840  BR = (AliPythia6::Instance())->GetBRAT(channel);
1841  BRtot = BRtot + BR;
1842  nPart = 0;
1843  for (Int_t i=1; i<=5; i++) {
1844  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1845  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1846  nPart++;
1847  }
1848  }
1849  std::sort(pdgCodes.begin(), pdgCodes.end());
1850  if (nPart == 3 && pdgCodes[0] == 111 && pdgCodes[1] == 111 && pdgCodes[2] == 111)
1851  histo->SetBinContent(2, BR);
1852  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 111 && pdgCodes[2] == 211)
1853  histo->SetBinContent(3, BR);
1854  else if (nPart == 4 && pdgCodes[0] == -12 && pdgCodes[1] == 11 && pdgCodes[2] == 22 && pdgCodes[3] == 211)
1855  histo->SetBinContent(4, BR+histo->GetBinContent(4));
1856  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == -11 && pdgCodes[2] == 12 && pdgCodes[3] == 22)
1857  histo->SetBinContent(4, BR+histo->GetBinContent(4));
1858  else if (nPart == 4 && pdgCodes[0] == -14 && pdgCodes[1] == 13 && pdgCodes[2] == 22 && pdgCodes[3] == 211)
1859  histo->SetBinContent(5, BR+histo->GetBinContent(5));
1860  else if (nPart == 4 && pdgCodes[0] == -211 && pdgCodes[1] == -13 && pdgCodes[2] == 14 && pdgCodes[3] == 22)
1861  histo->SetBinContent(5, BR+histo->GetBinContent(5));
1862  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 211)
1863  histo->SetBinContent(6, BR);
1864  else if (nPart == 3 && pdgCodes[0] == 22 && pdgCodes[1] == 22 && pdgCodes[2] == 111)
1865  histo->SetBinContent(7, BR);
1866  else if (nPart == 4 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 22 && pdgCodes[3] == 111)
1867  histo->SetBinContent(8, BR);
1868  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 22)
1869  histo->SetBinContent(9, BR);
1870  else if (nPart == 3 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 22)
1871  histo->SetBinContent(10, BR);
1872  else if (nPart == 4 && pdgCodes[0] == -11 && pdgCodes[1] == 11 && pdgCodes[2] == 22 && pdgCodes[3] == 22)
1873  histo->SetBinContent(11, BR);
1874  else if (nPart == 3 && pdgCodes[0] == -13 && pdgCodes[1] == 13 && pdgCodes[2] == 22)
1875  histo->SetBinContent(12, BR);
1876  else if (nPart == 4 && pdgCodes[0] == -13 && pdgCodes[1] == 13 && pdgCodes[2] == 22 && pdgCodes[3] == 22)
1877  histo->SetBinContent(13, BR);
1878  else
1879  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1880  pdgCodes.clear();
1881  }
1882  histo->SetBinContent(1, BRtot);
1883  pdgCodes.clear();
1884  break;
1885 
1886  case 16:
1887  kc = (AliPythia6::Instance())->Pycomp(3122);
1888  firstChannel = (AliPythia6::Instance())->GetMDCY(kc,2);
1889  lastChannel = firstChannel + (AliPythia6::Instance())->GetMDCY(kc,3) - 1;
1890  BRtot = 0.;
1891  for (Int_t channel=firstChannel; channel<=lastChannel; channel++) {
1892  BR = (AliPythia6::Instance())->GetBRAT(channel);
1893  BRtot = BRtot + BR;
1894  nPart = 0;
1895  for (Int_t i=1; i<=5; i++) {
1896  if ((AliPythia6::Instance())->GetKFDP(channel,i)) {
1897  pdgCodes.push_back((AliPythia6::Instance())->GetKFDP(channel,i));
1898  nPart++;
1899  }
1900  }
1901  std::sort(pdgCodes.begin(), pdgCodes.end());
1902  if (nPart == 2 && pdgCodes[0] == -211 && pdgCodes[1] == 2212)
1903  histo->SetBinContent(2, BR);
1904  else if (nPart == 2 && pdgCodes[0] == 111 && pdgCodes[1] == 2112)
1905  histo->SetBinContent(3, BR);
1906  else if (nPart == 2 && pdgCodes[0] == 22 && pdgCodes[1] == 2112)
1907  histo->SetBinContent(4, BR);
1908  else if (nPart == 3 && pdgCodes[0] == -211 && pdgCodes[1] == 22 && pdgCodes[2] == 2212)
1909  histo->SetBinContent(4, BR);
1910  else
1911  histo->SetBinContent(20, BR+histo->GetBinContent(20));
1912  pdgCodes.clear();
1913  }
1914  histo->SetBinContent(1, BRtot);
1915  pdgCodes.clear();
1916  break;
1917 
1918  default:
1919  break;
1920  }
1921 }
1922 
1923 //_________________________________________________________________________________
1925 
1926  Int_t returnVal = -9999;
1927 
1928  switch (pdg) {
1929  case 111:
1930  returnVal = 0;
1931  break;
1932  case 221:
1933  returnVal = 1;
1934  break;
1935  case 331:
1936  returnVal = 2;
1937  break;
1938  case 223:
1939  returnVal = 3;
1940  break;
1941  case 113:
1942  returnVal = 4;
1943  break;
1944  case 213:
1945  returnVal = 5;
1946  break;
1947  case -213:
1948  returnVal = 6;
1949  break;
1950  case 333:
1951  returnVal = 7;
1952  break;
1953  case 443:
1954  returnVal = 8;
1955  break;
1956  case 1114:
1957  returnVal = 9;
1958  break;
1959  case 2114:
1960  returnVal = 10;
1961  break;
1962  case 2214:
1963  returnVal = 11;
1964  break;
1965  case 2224:
1966  returnVal = 12;
1967  break;
1968  case 3212:
1969  returnVal = 13;
1970  break;
1971  case 310:
1972  returnVal = 14;
1973  break;
1974  case 130:
1975  returnVal = 15;
1976  break;
1977  case 3122:
1978  returnVal = 16;
1979  break;
1980  default:
1981  break;
1982  }
1983 
1984  return returnVal;
1985 }
1986 
1987 //_________________________________________________________________________________
1988 TH1* AliAnalysisTaskGammaCocktailMC::SetHist1D(TH1* hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Bool_t optSumw2) {
1989 
1990  if (histType.CompareTo("f") == 0 || histType.CompareTo("F") == 0)
1991  hist = new TH1F(histName, histName, nBinsX, xMin, xMax);
1992  if (histType.CompareTo("i") == 0 || histType.CompareTo("I") == 0)
1993  hist = new TH1I(histName, histName, nBinsX, xMin, xMax);
1994 
1995  hist->GetXaxis()->SetTitle(xTitle);
1996  hist->GetYaxis()->SetTitle(yTitle);
1997 
1998  if (optSumw2)
1999  hist->Sumw2();
2000 
2001  return hist;
2002 }
2003 
2004 //_________________________________________________________________________________
2005 TH2* AliAnalysisTaskGammaCocktailMC::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) {
2006 
2007  if (histType.CompareTo("f") == 0 || histType.CompareTo("F") == 0)
2008  hist = new TH2F(histName, histName, nBinsX, xMin, xMax, nBinsY, yMin, yMax);
2009  if (histType.CompareTo("i") == 0 || histType.CompareTo("I") == 0)
2010  hist = new TH2I(histName, histName, nBinsX, xMin, xMax, nBinsY, yMin, yMax);
2011 
2012  hist->GetXaxis()->SetTitle(xTitle);
2013  hist->GetYaxis()->SetTitle(yTitle);
2014 
2015  if (optSumw2)
2016  hist->Sumw2();
2017 
2018  return hist;
2019 }
2020 
2021 //_________________________________________________________________________________
2022 TH2* AliAnalysisTaskGammaCocktailMC::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) {
2023 
2024  if (histType.CompareTo("f") == 0 || histType.CompareTo("F") == 0)
2025  hist = new TH2F(histName, histName, nBinsX, xMin, xMax, nBinsY, binsY);
2026  if (histType.CompareTo("i") == 0 || histType.CompareTo("I") == 0)
2027  hist = new TH2I(histName, histName, nBinsX, xMin, xMax, nBinsY, binsY);
2028 
2029  hist->GetXaxis()->SetTitle(xTitle);
2030  hist->GetYaxis()->SetTitle(yTitle);
2031 
2032  if (optSumw2)
2033  hist->Sumw2();
2034 
2035  return hist;
2036 }
Int_t pdg
double Double_t
Definition: External.C:58
TH2F ** fHistPtPhiGammaSource
histo for phi of gammas
Definition: External.C:236
TH2F ** fHistPtGammaSourcePtInput
histo for input particle BR from pythia
long long Long64_t
Definition: External.C:43
TH1F ** fHistPythiaBR
histo for input particle decay channels
TH2F ** fHistPtDeltaPhiInput
histo for asymmetry
TH2F ** fHistPtAlphaInput
histo for input particles
TH1F ** fHistDecayChannelsInput
histo for asymmetry
Double_t ptMin
TString part
use mixed event to constrain combinatorial background
Definition: InvMassFit.C:52
Int_t * fParticleList
histo for gamma from rest
int Int_t
Definition: External.C:63
Definition: External.C:204
unsigned int UInt_t
Definition: External.C:33
void GetAndSetPtYDistributions(AliGenEMCocktailV2 *mcCocktailGen)
float Float_t
Definition: External.C:68
Float_t GetDecayChannel(AliMCEvent *mcEvent, TParticle *part)
Definition: External.C:212
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)
void FillPythiaBranchingRatio(TH1F *histo, Int_t np)
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)
TH2F ** fHistPtYInput
histo for phi of input particles
TH1I * fHistPdgInputRest
histo for phi correlation of gammas from input particles to source
Definition: External.C:220
void InitializeDecayChannelHist(TH1F *hist, Int_t np)
TH2F ** fHistPtPhiInput
histo for phi of gammas from input particles
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
TH2F ** fHistPhiGammaSourcePhiInput
histo for pt correlation of gammas from input particles to source
Double_t ptMax
Double_t yMin
Definition: External.C:196
void GetAndSetPtParametrizations(AliGenEMCocktailV2 *mcCocktailGen)
TH1 * SetHist1D(TH1 *hist, TString histType, TString histName, TString xTitle, TString yTitle, Int_t nBinsX, Double_t xMin, Double_t xMax, Bool_t optSumw2)
Double_t yMax
TH2F ** fHistPtYGammaSource
histo for gammas from input particles