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