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