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