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