AliPhysics  449db5a (449db5a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnaPi0EbE.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 // --- ROOT system ---
17 #include <TList.h>
18 #include <TClonesArray.h>
19 #include <TObjString.h>
20 
21 // --- Analysis system ---
22 #include "AliAnaPi0EbE.h"
23 #include "AliCaloTrackReader.h"
24 #include "AliIsolationCut.h"
26 #include "AliCaloPID.h"
27 #include "AliMCAnalysisUtils.h"
28 #include "AliMCEvent.h"
29 #include "AliFiducialCut.h"
30 #include "AliVCluster.h"
31 #include "AliESDEvent.h"
32 #include "AliAODEvent.h"
33 #include "AliVParticle.h"
34 
38 
39 //____________________________
42 //____________________________
45 fAnaType(kIMCalo),
46 fNLMCutMin(-1), fNLMCutMax(10),
47 fFillAllNLMHistograms(0), fFillTMHisto(0),
48 fFillSelectClHisto(0),
49 fM02MaxCutForIM(0), fM02MinCutForIM(0),
50 fSelectIsolatedDecay(kFALSE), fSelectPairInIsoCone(0),
51 fR(0), fIsoCandMinPt(0),
52 fMinDist(0.), fMinDist2(0.), fMinDist3(0.),
53 fTimeCutMin(-10000), fTimeCutMax(10000),
54 fRejectTrackMatch(kTRUE), fCheckSplitDistToBad(0),
55 fFillWeightHistograms(kFALSE), fFillOnlySimpleSSHisto(1),
56 fFillEMCALBCHistograms(0),
57 fInputAODGammaConvName(""),
58 fMomentum(), fMomentum1(), fMomentum2(),
59 fMomentum12(),fPrimaryMom(), fGrandMotherMom(),
60 // Histograms
61 fhPt(0), fhE(0),
62 fhPtEta(0), fhPtPhi(0), fhEtaPhi(0),
63 fhEtaPhiEMCALBC0(0), fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0),
64 fhTimeTriggerEMCALBC0UMReMatchOpenTime(0),
65 fhTimeTriggerEMCALBC0UMReMatchCheckNeigh(0),
66 fhTimeTriggerEMCALBC0UMReMatchBoth(0),
67 fhPtCentrality(), fhPtEventPlane(0), fhMCPtCentrality(),
68 fhPtReject(0), fhEReject(0),
69 fhPtEtaReject(0), fhPtPhiReject(0), fhEtaPhiReject(0),
70 fhMass(0), fhMassPt(0),
71 fhMassPtMaxPair(0), fhMassPtMinPair(0), fhMassSplitPt(0),
72 fhSelectedMass(0), fhSelectedMassPt(0), fhSelectedMassSplitPt(0),
73 fhMassPtIsoRCut(0),
74 fhMassNoOverlap(0), fhMassPtNoOverlap(0), fhMassSplitPtNoOverlap(0),
75 fhSelectedMassNoOverlap(0), fhSelectedMassPtNoOverlap(0), fhSelectedMassSplitPtNoOverlap(0),
76 fhMCPi0PtRecoPtPrim(0), fhMCEtaPtRecoPtPrim(0),
77 fhMCPi0PtRecoPtPrimNoOverlap(0), fhMCEtaPtRecoPtPrimNoOverlap(0),
78 fhMCPi0SplitPtRecoPtPrim(0), fhMCEtaSplitPtRecoPtPrim(0),
79 fhMCPi0SplitPtRecoPtPrimNoOverlap(0), fhMCEtaSplitPtRecoPtPrimNoOverlap(0),
80 fhMCPi0SelectedPtRecoPtPrim(0), fhMCEtaSelectedPtRecoPtPrim(0),
81 fhMCPi0SelectedPtRecoPtPrimNoOverlap(0), fhMCEtaSelectedPtRecoPtPrimNoOverlap(0),
82 fhMCPi0SelectedSplitPtRecoPtPrim(0), fhMCEtaSelectedSplitPtRecoPtPrim(0),
83 fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap(0), fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap(0),
84 fhAsymmetry(0), fhSelectedAsymmetry(0),
85 fhSplitE(0), fhSplitPt(0),
86 fhSplitPtEta(0), fhSplitPtPhi(0),
87 fhNLocMaxSplitPt(0),
88 fhPtDecay(0),
89 
90 // Shower shape histos
91 fhPtDispersion(0), fhPtLambda0(0), fhPtLambda0NoSplitCut(0),
92 fhPtLambda1(0), fhPtLambda0NoTRD(0), fhPtLambda0FracMaxCellCut(0),
93 fhPtFracMaxCell(0), fhPtFracMaxCellNoTRD(0),
94 fhPtNCells(0), fhPtTime(0), fhEPairDiffTime(0),
95 fhPtDispEta(0), fhPtDispPhi(0),
96 fhPtSumEta(0), fhPtSumPhi(0), fhPtSumEtaPhi(0),
97 fhPtDispEtaPhiDiff(0), fhPtSphericity(0),
98 
99 // MC histos
100 fhMCPtDecayLostPairPi0(0), fhMCPtDecayLostPairEta(0),
101 fhMCE(), fhMCPt(),
102 fhMCPtPhi(), fhMCPtEta(),
103 fhMCEReject(), fhMCPtReject(),
104 fhMCPi0PtGenRecoFraction(0), fhMCEtaPtGenRecoFraction(0),
105 fhMCPi0DecayPt(0), fhMCPi0DecayPtFraction(0),
106 fhMCEtaDecayPt(0), fhMCEtaDecayPtFraction(0),
107 fhMCOtherDecayPt(0),
108 fhMassPairMCPi0(0), fhMassPairMCEta(0),
109 fhAnglePairMCPi0(0), fhAnglePairMCEta(0),
110 fhMCPi0PtOrigin(0x0), fhMCEtaPtOrigin(0x0),
111 fhMCNotResonancePi0PtOrigin(0), fhMCPi0PtStatus(0x0),
112 fhMCPi0ProdVertex(0), fhMCEtaProdVertex(0),
113 
114 // Weight studies
115 fhECellClusterRatio(0), fhECellClusterLogRatio(0),
116 fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
117 fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0),
118 fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0),
119 fhTrackMatchedDEtaNeg(0), fhTrackMatchedDPhiNeg(0), fhTrackMatchedDEtaDPhiNeg(0),
120 fhTrackMatchedMCParticlePt(0),
121 fhTrackMatchedMCParticleDEta(0), fhTrackMatchedMCParticleDPhi(0),
122 fhdEdx(0), fhEOverP(0), fhEOverPNoTRD(0),
123 // Number of local maxima in cluster
124 fhNLocMaxPt(0), fhNLocMaxPtReject(0),
125 // PileUp
126 fhTimePtNoCut(0), fhTimePtSPD(0), fhTimePtSPDMulti(0),
127 fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
128 fhTimeNPileUpVertContributors(0),
129 fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0),
130 fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0),
131 fhPtNPileUpSPDVtxTimeCut(0), fhPtNPileUpTrkVtxTimeCut(0),
132 fhPtNPileUpSPDVtxTimeCut2(0), fhPtNPileUpTrkVtxTimeCut2(0)
133 {
134  for(Int_t i = 0; i < fgkNmcTypes; i++)
135  {
136  fhMCE [i] = 0;
137  fhMCPt [i] = 0;
138  fhMCPtPhi [i] = 0;
139  fhMCPtEta [i] = 0;
140  fhMCPtCentrality [i] = 0;
141 
142  fhMCSplitE [i] = 0;
143  fhMCSplitPt [i] = 0;
144  fhMCSplitPtPhi [i] = 0;
145  fhMCSplitPtEta [i] = 0;
146 
147  fhMCNLocMaxPt [i] = 0;
148  fhMCNLocMaxSplitPt [i] = 0;
149  fhMCNLocMaxPtReject[i] = 0;
150 
151  fhMCPtDecay [i] = 0;
152  fhMCPtLambda0 [i] = 0;
153  fhMCPtLambda0NoTRD [i] = 0;
155  fhMCPtFracMaxCell [i] = 0;
156  fhMCPtLambda1 [i] = 0;
157  fhMCPtDispersion [i] = 0;
158 
159  fhMCPtDispEta [i] = 0;
160  fhMCPtDispPhi [i] = 0;
161  fhMCPtSumEtaPhi [i] = 0;
162  fhMCPtDispEtaPhiDiff[i] = 0;
163  fhMCPtSphericity [i] = 0;
164  fhMCPtAsymmetry [i] = 0;
165 
166  fhMCMassPt [i]=0;
167  fhMCMassSplitPt [i]=0;
168  fhMCSelectedMassPt [i]=0;
170 
171  fhMCMassPtNoOverlap [i]=0;
175 
176  for(Int_t j = 0; j < 7; j++)
177  {
178  fhMCLambda0DispEta [j][i] = 0;
179  fhMCLambda0DispPhi [j][i] = 0;
180  fhMCDispEtaDispPhi [j][i] = 0;
181  fhMCAsymmetryLambda0 [j][i] = 0;
182  fhMCAsymmetryDispEta [j][i] = 0;
183  fhMCAsymmetryDispPhi [j][i] = 0;
184  }
185  }
186 
187  for(Int_t j = 0; j < 7; j++)
188  {
189  fhLambda0DispEta [j] = 0;
190  fhLambda0DispPhi [j] = 0;
191  fhDispEtaDispPhi [j] = 0;
192  fhAsymmetryLambda0 [j] = 0;
193  fhAsymmetryDispEta [j] = 0;
194  fhAsymmetryDispPhi [j] = 0;
195 
196  fhPtPileUp [j] = 0;
197  }
198 
199  for(Int_t i = 0; i < 3; i++)
200  {
201  fhPtLambda0LocMax [i] = 0;
202  fhPtLambda1LocMax [i] = 0;
203  fhPtDispersionLocMax [i] = 0;
204  fhPtDispEtaLocMax [i] = 0;
205  fhPtDispPhiLocMax [i] = 0;
206  fhPtSumEtaPhiLocMax [i] = 0;
208  fhPtSphericityLocMax [i] = 0;
209  fhPtAsymmetryLocMax [i] = 0;
210  fhMassPtLocMax [i] = 0;
211  fhSelectedMassPtLocMax [i] = 0;
212  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
213  {
214  fhMCPtLambda0LocMax [ipart][i] = 0;
215  fhMCSelectedMassPtLocMax[ipart][i] = 0;
216  }
217 
222 
227 
228  }
229 
230  // Weight studies
231  for(Int_t i =0; i < 14; i++){
232  fhLambda0ForW0[i] = 0;
233  //fhLambda1ForW0[i] = 0;
234  if(i<8)fhMassPairLocMax[i] = 0;
235  }
236 
237  for(Int_t i = 0; i < 11; i++)
238  {
239  fhEtaPhiTriggerEMCALBC [i] = 0 ;
240  fhTimeTriggerEMCALBC [i] = 0 ;
242 
243  fhEtaPhiTriggerEMCALBCUM [i] = 0 ;
244  fhTimeTriggerEMCALBCUM [i] = 0 ;
245 
246  }
247 
248  for(Int_t iSM = 0; iSM < 22; iSM++)
249  {
250  fhNLocMaxPtSM[iSM] = 0;
251  for(Int_t inlm = 0; inlm < 3; inlm++)
252  {
253  fhSelectedMassPtLocMaxSM [inlm][iSM] = 0;
254  fhSelectedLambda0PtLocMaxSM [inlm][iSM] = 0;
255  }
256  }
257 
258  // Initialize parameters
259  InitParameters();
260 
261 }
262 
263 //______________________________________________________________________________________________
268 //______________________________________________________________________________________________
270 {
272  if( id < 0 ) return;
273 
275  if(TMath::Abs(bc) >= 6) AliInfo(Form("Trigger BC not expected = %d",bc));
276 
277  if(phi < 0) phi+=TMath::TwoPi();
278 
279  if(energy > 2)
280  {
281  Double_t timeUS = TMath::Abs(time);
282 
283  if (timeUS < 25) fhEtaPhiEMCALBC0->Fill(eta, phi, GetEventWeight());
284  else if (timeUS < 75) fhEtaPhiEMCALBC1->Fill(eta, phi, GetEventWeight());
285  else fhEtaPhiEMCALBCN->Fill(eta, phi, GetEventWeight());
286  }
287 
288  if(TMath::Abs(bc) >= 6) return ;
289 
290  if(GetReader()->IsBadCellTriggerEvent() || GetReader()->IsExoticEvent()) return ;
291 
292  if(GetReader()->IsTriggerMatched())
293  {
294  if(energy > 2)
295  fhEtaPhiTriggerEMCALBC[bc+5]->Fill(eta, phi, GetEventWeight());
296 
297  fhTimeTriggerEMCALBC[bc+5]->Fill(energy, time, GetEventWeight());
298 
299  if(GetReader()->IsPileUpFromSPD())
300  fhTimeTriggerEMCALBCPileUpSPD[bc+5]->Fill(energy, time, GetEventWeight());
301  }
302  else
303  {
304  if(energy > 2)
305  fhEtaPhiTriggerEMCALBCUM[bc+5]->Fill(eta, phi, GetEventWeight());
306 
307  fhTimeTriggerEMCALBCUM[bc+5]->Fill(energy, time, GetEventWeight());
308 
309  if(bc==0)
310  {
311  if(GetReader()->IsTriggerMatchedOpenCuts(0))
313 
314  if(GetReader()->IsTriggerMatchedOpenCuts(1))
316 
317  if(GetReader()->IsTriggerMatchedOpenCuts(2))
318  fhTimeTriggerEMCALBC0UMReMatchBoth ->Fill(energy, time, GetEventWeight());
319  }
320  }
321 }
322 
323 //___________________________________________________________________________________
326 //___________________________________________________________________________________
327 void AliAnaPi0EbE::FillPileUpHistograms(Float_t pt, Float_t time, AliVCluster * calo)
328 {
329  //printf("E %f, time %f\n",energy,time);
330  AliVEvent * event = GetReader()->GetInputEvent();
331 
332  fhTimePtNoCut->Fill(pt, time, GetEventWeight());
333 
334  if(GetReader()->IsPileUpFromSPD()) { fhPtPileUp[0]->Fill(pt, GetEventWeight()); fhTimePtSPD->Fill(pt, time, GetEventWeight()); }
335  if(GetReader()->IsPileUpFromEMCal()) fhPtPileUp[1]->Fill(pt, GetEventWeight());
336  if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtPileUp[2]->Fill(pt, GetEventWeight());
337  if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtPileUp[3]->Fill(pt, GetEventWeight());
338  if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtPileUp[4]->Fill(pt, GetEventWeight());
339  if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtPileUp[5]->Fill(pt, GetEventWeight());
340  if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtPileUp[6]->Fill(pt, GetEventWeight());
341 
342  if(event->IsPileupFromSPDInMultBins()) fhTimePtSPDMulti->Fill(pt, time, GetEventWeight());
343 
344  // cells in cluster
345 
346  AliVCaloCells* cells = 0;
347  if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
348  else cells = GetPHOSCells();
349 
350  Float_t maxCellFraction = 0.;
351  Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells,calo,maxCellFraction);
352 
353  Double_t tmax = cells->GetCellTime(absIdMax);
354  GetCaloUtils()->RecalibrateCellTime(tmax, GetCalorimeter(), absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
355  tmax*=1.e9;
356 
357  // Loop on cells inside cluster, max cell must be over 100 MeV and time in BC=0
358  if(cells->GetCellAmplitude(absIdMax) > 0.1 && TMath::Abs(tmax) < 30)
359  {
360  for (Int_t ipos = 0; ipos < calo->GetNCells(); ipos++)
361  {
362  Int_t absId = calo->GetCellsAbsId()[ipos];
363 
364  if( absId == absIdMax ) continue ;
365 
366  Double_t timecell = cells->GetCellTime(absId);
367  Float_t amp = cells->GetCellAmplitude(absId);
368  Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
369  GetCaloUtils()->GetEMCALRecoUtils()->AcceptCalibrateCell(absId,bc,amp,timecell,cells);
370  timecell*=1e9;
371 
372  Float_t diff = (tmax-timecell);
373 
374  if( cells->GetCellAmplitude(absIdMax) < 0.1 ) continue ;
375 
376  if(GetReader()->IsPileUpFromSPD())
377  {
378  fhPtCellTimePileUp[0]->Fill(pt, timecell, GetEventWeight());
379  fhPtTimeDiffPileUp[0]->Fill(pt, diff , GetEventWeight());
380  }
381 
382  if(GetReader()->IsPileUpFromEMCal())
383  {
384  fhPtCellTimePileUp[1]->Fill(pt, timecell, GetEventWeight());
385  fhPtTimeDiffPileUp[1]->Fill(pt, diff , GetEventWeight());
386  }
387 
388  if(GetReader()->IsPileUpFromSPDOrEMCal())
389  {
390  fhPtCellTimePileUp[2]->Fill(pt, timecell, GetEventWeight());
391  fhPtTimeDiffPileUp[2]->Fill(pt, diff , GetEventWeight());
392  }
393 
394  if(GetReader()->IsPileUpFromSPDAndEMCal())
395  {
396  fhPtCellTimePileUp[3]->Fill(pt, timecell, GetEventWeight());
397  fhPtTimeDiffPileUp[3]->Fill(pt, diff , GetEventWeight());
398  }
399 
400  if(GetReader()->IsPileUpFromSPDAndNotEMCal())
401  {
402  fhPtCellTimePileUp[4]->Fill(pt, timecell, GetEventWeight());
403  fhPtTimeDiffPileUp[4]->Fill(pt, diff , GetEventWeight());
404  }
405 
406  if(GetReader()->IsPileUpFromEMCalAndNotSPD())
407  {
408  fhPtCellTimePileUp[5]->Fill(pt, timecell, GetEventWeight());
409  fhPtTimeDiffPileUp[5]->Fill(pt, diff , GetEventWeight());
410  }
411 
412  if(GetReader()->IsPileUpFromNotSPDAndNotEMCal())
413  {
414  fhPtCellTimePileUp[6]->Fill(pt, timecell, GetEventWeight());
415  fhPtTimeDiffPileUp[6]->Fill(pt, diff , GetEventWeight());
416  }
417  }//loop
418  }
419 
420  if(pt < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold
421 
422  AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
423  AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
424 
425  // N pile up vertices
426  Int_t nVtxSPD = -1;
427  Int_t nVtxTrk = -1;
428 
429  if (esdEv)
430  {
431  nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
432  nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
433 
434  } // ESD
435  else if (aodEv)
436  {
437  nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
438  nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
439  } // AOD
440 
441  fhTimeNPileUpVertSPD ->Fill(time, nVtxSPD, GetEventWeight());
442  fhTimeNPileUpVertTrack->Fill(time, nVtxTrk, GetEventWeight());
443 
444  fhPtNPileUpSPDVtx->Fill(pt, nVtxSPD, GetEventWeight());
445  fhPtNPileUpTrkVtx->Fill(pt, nVtxTrk, GetEventWeight());
446 
447  if(TMath::Abs(time) < 25)
448  {
449  fhPtNPileUpSPDVtxTimeCut ->Fill(pt, nVtxSPD, GetEventWeight());
450  fhPtNPileUpTrkVtxTimeCut ->Fill(pt, nVtxTrk, GetEventWeight());
451  }
452 
453  if(time < 75 && time > -25)
454  {
455  fhPtNPileUpSPDVtxTimeCut2->Fill(pt, nVtxSPD, GetEventWeight());
456  fhPtNPileUpTrkVtxTimeCut2->Fill(pt, nVtxTrk, GetEventWeight());
457  }
458 
459  //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n",
460  // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVtxSPD,nVtxTracks);
461 
462  Int_t ncont = -1;
463  Float_t z1 = -1, z2 = -1;
464  Float_t diamZ = -1;
465  for(Int_t iVert=0; iVert<nVtxSPD;iVert++)
466  {
467  if (esdEv)
468  {
469  const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert);
470  ncont=pv->GetNContributors();
471  z1 = esdEv->GetPrimaryVertexSPD()->GetZ();
472  z2 = pv->GetZ();
473  diamZ = esdEv->GetDiamondZ();
474  }//ESD
475  else if (aodEv)
476  {
477  AliAODVertex *pv=aodEv->GetVertex(iVert);
478  if(pv->GetType()!=AliAODVertex::kPileupSPD) continue;
479  ncont=pv->GetNContributors();
480  z1=aodEv->GetPrimaryVertexSPD()->GetZ();
481  z2=pv->GetZ();
482  diamZ = aodEv->GetDiamondZ();
483  } // AOD
484 
485  Double_t distZ = TMath::Abs(z2-z1);
486  diamZ = TMath::Abs(z2-diamZ);
487 
488  fhTimeNPileUpVertContributors ->Fill(time, ncont, GetEventWeight());
489  fhTimePileUpMainVertexZDistance->Fill(time, distZ, GetEventWeight());
490  fhTimePileUpMainVertexZDiamond ->Fill(time, diamZ, GetEventWeight());
491 
492  } // vertex loop
493 }
494 
495 //__________________________________________________________________________
498 //__________________________________________________________________________
500 {
501  Float_t ener = fMomentum.E();
502  Float_t pt = fMomentum.Pt();
503 
504  Float_t phi = fMomentum.Phi();
505  if(phi < 0) phi+=TMath::TwoPi();
506 
507  Float_t eta = fMomentum.Eta();
508 
509  fhPtReject ->Fill(pt , GetEventWeight());
510  fhEReject ->Fill(ener, GetEventWeight());
511 
512  fhPtEtaReject ->Fill(pt , eta, GetEventWeight());
513  fhPtPhiReject ->Fill(pt , phi, GetEventWeight());
514  fhEtaPhiReject ->Fill(eta, phi, GetEventWeight());
515 
516  fhNLocMaxPtReject->Fill(pt, nMaxima, GetEventWeight());
517 
518  if(IsDataMC())
519  {
520  Int_t mcIndex = GetMCIndex(mctag);
521  fhMCEReject [mcIndex] ->Fill(ener, GetEventWeight());
522  fhMCPtReject [mcIndex] ->Fill(pt , GetEventWeight());
523 
524  if(fFillAllNLMHistograms) fhMCNLocMaxPtReject[mcIndex]->Fill(pt, nMaxima, GetEventWeight());
525  }
526 }
527 
528 //_______________________________________________________________________________________________
530 //_______________________________________________________________________________________________
531 void AliAnaPi0EbE::FillSelectedClusterHistograms(AliVCluster* cluster, Float_t pt, Int_t nMaxima,
532  Int_t tag, Float_t asy)
533 {
534  Float_t ener = cluster->E();
535  Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
536  Float_t l0 = cluster->GetM02();
537  Float_t l1 = cluster->GetM20();
538  Int_t nSM = GetModuleNumber(cluster);
539 
540  Int_t ptbin = -1;
541  if (pt < 2 ) ptbin = 0;
542  else if (pt < 4 ) ptbin = 1;
543  else if (pt < 6 ) ptbin = 2;
544  else if (pt < 10) ptbin = 3;
545  else if (pt < 15) ptbin = 4;
546  else if (pt < 20) ptbin = 5;
547  else ptbin = 6;
548 
549  Int_t indexMax = -1;
550  if (nMaxima==1) indexMax = 0 ;
551  else if(nMaxima==2) indexMax = 1 ;
552  else indexMax = 2 ;
553 
554  FillWeightHistograms(cluster);
555 
556  fhPtLambda0->Fill(pt, l0, GetEventWeight());
557  fhPtLambda1->Fill(pt, l1, GetEventWeight());
558 
559  fhNLocMaxPt->Fill(pt, nMaxima, GetEventWeight());
560 
562  {
563  if(nSM < fNModules && nSM >=0)
564  fhNLocMaxPtSM[nSM]->Fill(pt, nMaxima, GetEventWeight());
565 
566  fhPtLambda0LocMax [indexMax]->Fill(pt, l0, GetEventWeight());
567  fhPtLambda1LocMax [indexMax]->Fill(pt, l1, GetEventWeight());
568  }
569 
570  Float_t ll0 = 0., ll1 = 0.;
571  Float_t dispp= 0., dEta = 0., dPhi = 0.;
572  Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
573  AliVCaloCells * cell = 0x0;
574  Float_t maxCellFraction = 0;
575 
577  {
578  cell = GetEMCALCells();
579 
580  GetCaloUtils()->GetMaxEnergyCell(cell, cluster, maxCellFraction);
581  fhPtFracMaxCell->Fill(pt, maxCellFraction, GetEventWeight());
582 
583  if(maxCellFraction < 0.5)
584  fhPtLambda0FracMaxCellCut->Fill(pt, l0, GetEventWeight());
585 
586  GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(),
587  cell, cluster,
588  ll0, ll1, dispp, dEta, dPhi,
589  sEta, sPhi, sEtaPhi);
590  fhPtDispersion -> Fill(pt, disp , GetEventWeight());
591  fhPtDispEta -> Fill(pt, dEta , GetEventWeight());
592  fhPtDispPhi -> Fill(pt, dPhi , GetEventWeight());
593  fhPtSumEta -> Fill(pt, sEta , GetEventWeight());
594  fhPtSumPhi -> Fill(pt, sPhi , GetEventWeight());
595  fhPtSumEtaPhi -> Fill(pt, sEtaPhi , GetEventWeight());
596  fhPtDispEtaPhiDiff-> Fill(pt, dPhi-dEta, GetEventWeight());
597  if(dEta+dPhi>0)
598  fhPtSphericity-> Fill(pt, (dPhi-dEta)/(dEta+dPhi), GetEventWeight());
599 
600  fhDispEtaDispPhi[ptbin]->Fill(dEta, dPhi, GetEventWeight());
601  fhLambda0DispEta[ptbin]->Fill(l0 , dEta, GetEventWeight());
602  fhLambda0DispPhi[ptbin]->Fill(l0 , dPhi, GetEventWeight());
603 
604  if (fAnaType==kSSCalo)
605  {
606  // Asymmetry histograms
607  fhAsymmetryLambda0[ptbin]->Fill(l0 , asy, GetEventWeight());
608  fhAsymmetryDispEta[ptbin]->Fill(dEta, asy, GetEventWeight());
609  fhAsymmetryDispPhi[ptbin]->Fill(dPhi, asy, GetEventWeight());
610  }
611 
613  {
614  fhPtDispersionLocMax [indexMax]->Fill(pt, disp , GetEventWeight());
615  fhPtDispEtaLocMax [indexMax]->Fill(pt, dEta , GetEventWeight());
616  fhPtDispPhiLocMax [indexMax]->Fill(pt, dPhi , GetEventWeight());
617  fhPtSumEtaPhiLocMax [indexMax]->Fill(pt, sEtaPhi , GetEventWeight());
618  fhPtDispEtaPhiDiffLocMax[indexMax]->Fill(pt, dPhi-dEta, GetEventWeight());
619  if(dEta+dPhi>0)
620  fhPtSphericityLocMax[indexMax]->Fill(pt, (dPhi-dEta)/(dEta+dPhi), GetEventWeight());
621  if(fAnaType==kSSCalo)
622  fhPtAsymmetryLocMax [indexMax]->Fill(pt, asy, GetEventWeight());
623  }
624  }
625 
626  if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
628  {
629  fhPtLambda0NoTRD ->Fill(pt, l0, GetEventWeight());
631  fhPtFracMaxCellNoTRD->Fill(pt, maxCellFraction, GetEventWeight());
632  }
633 
634  fhPtTime ->Fill(pt, cluster->GetTOF()*1.e9, GetEventWeight());
635  fhPtNCells->Fill(pt, cluster->GetNCells() , GetEventWeight());
636 
637  // Fill Track matching control histograms
638  if(fFillTMHisto)
639  {
640  Float_t dZ = cluster->GetTrackDz();
641  Float_t dR = cluster->GetTrackDx();
642 
643 // if(cluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
644 // {
645 // dR = 2000., dZ = 2000.;
646 // GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(cluster->GetID(),dZ,dR);
647 // }
648  //printf("Pi0EbE: dPhi %f, dEta %f\n",dR,dZ);
649 
650  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(cluster, GetReader()->GetInputEvent());
651 
652  Bool_t positive = kFALSE;
653  if(track) positive = (track->Charge()>0);
654 
655  if(fhTrackMatchedDEta && TMath::Abs(dR) < 999)
656  {
657  fhTrackMatchedDEta->Fill(pt, dZ, GetEventWeight());
658  fhTrackMatchedDPhi->Fill(pt, dR, GetEventWeight());
659  if(ener > 0.5)
660  fhTrackMatchedDEtaDPhi->Fill(dZ, dR, GetEventWeight());
661 
662  if(track)
663  {
664  if(positive)
665  {
666  fhTrackMatchedDEtaPos->Fill(pt, dZ, GetEventWeight());
667  fhTrackMatchedDPhiPos->Fill(pt, dR, GetEventWeight());
668  if(ener > 0.5)
669  fhTrackMatchedDEtaDPhiPos->Fill(dZ, dR, GetEventWeight());
670  }
671  else
672  {
673  fhTrackMatchedDEtaNeg->Fill(pt, dZ, GetEventWeight());
674  fhTrackMatchedDPhiNeg->Fill(pt, dR, GetEventWeight());
675  if(ener > 0.5)
676  fhTrackMatchedDEtaDPhiNeg->Fill(dZ, dR, GetEventWeight());
677  }
678  }
679  }
680 
681  // Check dEdx and E/p of matched clusters
682 
683  if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
684  {
685  if(track)
686  {
687  Float_t dEdx = track->GetTPCsignal();
688  fhdEdx->Fill(pt, dEdx, GetEventWeight());
689 
690  Float_t eOverp = cluster->E()/track->P();
691  fhEOverP->Fill(pt, eOverp, GetEventWeight());
692 
693  // Change nSM for year > 2011 (< 4 in 2012-13, none after)
694  if(GetCalorimeter()==kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
696  fhEOverPNoTRD->Fill(pt, eOverp, GetEventWeight());
697 
698  }
699  //else
700  // printf("AliAnaPi0EbE::FillSelectedClusterHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
701 
702  if(IsDataMC())
703  {
704  Float_t mctag = -1;
705  if ( !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) )
706  {
707  if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
708  GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) mctag = 2.5 ;
709  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) mctag = 0.5 ;
710  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) mctag = 1.5 ;
711  else mctag = 3.5 ;
712 
713  }
714  else
715  {
716  if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) ||
717  GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) ) mctag = 6.5 ;
718  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) ) mctag = 4.5 ;
719  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) ) mctag = 5.5 ;
720  else mctag = 7.5 ;
721  }
722 
723  fhTrackMatchedMCParticlePt ->Fill(pt, mctag, GetEventWeight());
724  fhTrackMatchedMCParticleDEta->Fill(dZ, mctag, GetEventWeight());
725  fhTrackMatchedMCParticleDPhi->Fill(dR, mctag, GetEventWeight());
726 
727  } // MC
728  }
729  } // Track matching histograms
730 
731  if(IsDataMC())
732  {
733  Int_t mcIndex = GetMCIndex(tag);
734 
735  fhMCPtLambda0[mcIndex] ->Fill(pt, l0, GetEventWeight());
736  fhMCPtLambda1[mcIndex] ->Fill(pt, l1, GetEventWeight());
738  fhMCPtLambda0LocMax[mcIndex][indexMax]->Fill(pt, l0, GetEventWeight());
739 
740  if(GetCalorimeter()==kEMCAL &&
741  GetFirstSMCoveredByTRD() >= 0 &&
743  fhMCPtLambda0NoTRD[mcIndex]->Fill(pt, l0, GetEventWeight());
744 
746  {
747  if(maxCellFraction < 0.5)
748  fhMCPtLambda0FracMaxCellCut[mcIndex]->Fill(pt, l0, GetEventWeight());
749 
750  fhMCPtFracMaxCell [mcIndex]->Fill(pt, maxCellFraction, GetEventWeight());
751 
752  fhMCPtDispersion [mcIndex]->Fill(pt, disp , GetEventWeight());
753  fhMCPtDispEta [mcIndex]->Fill(pt, dEta , GetEventWeight());
754  fhMCPtDispPhi [mcIndex]->Fill(pt, dPhi , GetEventWeight());
755  fhMCPtSumEtaPhi [mcIndex]->Fill(pt, sEtaPhi , GetEventWeight());
756  fhMCPtDispEtaPhiDiff [mcIndex]->Fill(pt, dPhi-dEta, GetEventWeight());
757  if(dEta+dPhi > 0)
758  fhMCPtSphericity[mcIndex]-> Fill(pt, (dPhi-dEta)/(dEta+dPhi), GetEventWeight());
759 
760  if (fAnaType==kSSCalo)
761  {
762  fhMCAsymmetryLambda0[ptbin][mcIndex]->Fill(l0 , asy, GetEventWeight());
763  fhMCAsymmetryDispEta[ptbin][mcIndex]->Fill(dEta, asy, GetEventWeight());
764  fhMCAsymmetryDispPhi[ptbin][mcIndex]->Fill(dPhi, asy, GetEventWeight());
765  }
766 
767  fhMCDispEtaDispPhi[ptbin][mcIndex]->Fill(dEta, dPhi, GetEventWeight());
768  fhMCLambda0DispEta[ptbin][mcIndex]->Fill(l0 , dEta, GetEventWeight());
769  fhMCLambda0DispPhi[ptbin][mcIndex]->Fill(l0 , dPhi, GetEventWeight());
770  } // only SS simple?
771  } // MC
772 }
773 
774 //________________________________________________________
776 //________________________________________________________
777 void AliAnaPi0EbE::FillWeightHistograms(AliVCluster *clus)
778 {
779  if(!fFillWeightHistograms || GetMixedEvent()) return;
780 
781  AliVCaloCells* cells = 0;
782  if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
783  else cells = GetPHOSCells();
784 
785  // First recalculate energy in case non linearity was applied
786  Float_t energy = 0;
787  Float_t ampMax = 0;
788  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
789  {
790 
791  Int_t id = clus->GetCellsAbsId()[ipos];
792 
793  // Recalibrate cell energy if needed
794  Float_t amp = cells->GetCellAmplitude(id);
796 
797  energy += amp;
798 
799  if(amp> ampMax)
800  ampMax = amp;
801 
802  } // energy loop
803 
804  if(energy <=0 )
805  {
806  AliInfo(Form("Wrong calculated energy %f",energy));
807  return;
808  }
809 
810  fhEMaxCellClusterRatio ->Fill(energy, ampMax/energy , GetEventWeight());
811  fhEMaxCellClusterLogRatio->Fill(energy, TMath::Log(ampMax/energy), GetEventWeight());
812 
813  // Get the ratio and log ratio to all cells in cluster
814  for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
815  {
816  Int_t id = clus->GetCellsAbsId()[ipos];
817 
818  // Recalibrate cell energy if needed
819  Float_t amp = cells->GetCellAmplitude(id);
821 
822  fhECellClusterRatio ->Fill(energy, amp/energy , GetEventWeight());
823  fhECellClusterLogRatio->Fill(energy, TMath::Log(amp/energy), GetEventWeight());
824  }
825 
826  // Recalculate shower shape for different W0
827  if ( GetCalorimeter() == kEMCAL )
828  {
829  Float_t l0org = clus->GetM02();
830  Float_t l1org = clus->GetM20();
831  Float_t dorg = clus->GetDispersion();
832 
833  for(Int_t iw = 0; iw < 14; iw++)
834  {
835  GetCaloUtils()->GetEMCALRecoUtils()->SetW0(1+iw*0.5);
836  GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), cells, clus);
837 
838  fhLambda0ForW0[iw]->Fill(energy, clus->GetM02(), GetEventWeight());
839 // fhLambda1ForW0[iw]->Fill(energy, clus->GetM20(), GetEventWeight());
840 
841  } // w0 loop
842 
843  // Set the original values back
844  clus->SetM02(l0org);
845  clus->SetM20(l1org);
846  clus->SetDispersion(dorg);
847 
848  } // EMCAL
849 }
850 
851 //__________________________________________
853 //__________________________________________
855 {
856  TString parList ; // this will be list of parameters used for this analysis.
857  const Int_t buffersize = 255;
858  char onePar[buffersize] ;
859 
860  snprintf(onePar,buffersize,"--- AliAnaPi0EbE ---\n") ;
861  parList+=onePar ;
862  snprintf(onePar,buffersize,"fAnaType=%d (selection type) \n",fAnaType) ;
863  parList+=onePar ;
864  snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
865  parList+=onePar ;
866  snprintf(onePar,buffersize,"Local maxima in cluster: %d < nlm < %d;",fNLMCutMin,fNLMCutMax) ;
867  parList+=onePar ;
868 
869  if(fAnaType == kSSCalo)
870  {
871  snprintf(onePar,buffersize,"E cut: %2.2f<E<%2.2f;",GetMinEnergy(),GetMaxEnergy()) ;
872  parList+=onePar ;
873  snprintf(onePar,buffersize,"N cell cut: N > %d;",GetCaloPID()->GetClusterSplittingMinNCells()) ;
874  parList+=onePar ;
875  snprintf(onePar,buffersize,"Min Dist to Bad channel: fMinDist =%2.2f; fMinDist2=%2.2f, fMinDist3=%2.2f;",fMinDist, fMinDist2,fMinDist3) ;
876  parList+=onePar ;
877  snprintf(onePar,buffersize,"Min E cut for NLM cases: 1) %2.2f; 2) %2.2f; 3) %2.2f;",fNLMECutMin[0],fNLMECutMin[1],fNLMECutMin[2]) ;
878  parList+=onePar ;
879  snprintf(onePar,buffersize,"Reject Matched tracks?: %d;",fRejectTrackMatch) ;
880  parList+=onePar ;
881  snprintf(onePar,buffersize,"Reject split cluster close to border or bad?: %d;",fCheckSplitDistToBad) ;
882  parList+=onePar ;
883  snprintf(onePar,buffersize,"Time cut: %2.2f<t<%2.2f;",fTimeCutMin,fTimeCutMax) ;
884  parList+=onePar ;
885 
886  // Get parameters set in PID class.
887  parList += GetCaloPID()->GetPIDParametersList() ;
888  }
889  else if(fAnaType == kIMCalo || fAnaType == kIMCaloTracks)
890  {
891  snprintf(onePar,buffersize,"Select %s;", (GetNeutralMesonSelection()->GetParticle()).Data()) ;
892  parList+=onePar ;
893  snprintf(onePar,buffersize,"Mass cut: %2.2f<M<%2.2f;",GetNeutralMesonSelection()->GetInvMassMinCut() ,GetNeutralMesonSelection()->GetInvMassMaxCut()) ;
894  parList+=onePar ;
895  }
896  else if(fAnaType == kIMCaloTracks)
897  {
898  snprintf(onePar,buffersize,"Photon Conv Array: %s;",fInputAODGammaConvName.Data()) ;
899  parList+=onePar ;
900  }
901  else if(fAnaType == kIMCalo)
902  {
903  snprintf(onePar,buffersize,"Time Diff: %2.2f;",GetPairTimeCut()) ;
904  parList+=onePar ;
905  }
906 
907  // Get parameters set in base class.
908  //parList += GetBaseParametersList() ;
909 
910  return new TObjString(parList) ;
911 }
912 
913 //_____________________________________________
914 // Create histograms to be saved in output file and
915 // store them in outputContainer.
916 //_____________________________________________
918 {
919  TList * outputContainer = new TList() ;
920  outputContainer->SetName("Pi0EbEHistos") ;
921 
929 
930  Int_t nmassbins = GetHistogramRanges()->GetHistoMassBins();
933 
940 
941  Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
944  Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
947 
948  Int_t ntimptbins = GetHistogramRanges()->GetHistoTimeBins();
951 
952  // Init the number of modules, set in the class AliCalorimeterUtils
953  //
954  InitCaloParameters(); // See AliCaloTrackCorrBaseClass
955 
956  TString nlm[] = {"1 Local Maxima","2 Local Maxima", "NLM > 2"};
957 
958  TString ptype [] = {"#pi^{0}", "#eta", "#gamma (direct)","#gamma (#pi^{0})", "#gamma (#eta)", "#gamma (other)", "e^{#pm}" , "hadron/other combinations"};
959  TString pname [] = {"Pi0" , "Eta" , "Photon" ,"Pi0Decay" , "EtaDecay" , "OtherDecay" , "Electron", "Hadron"};
960 
961  Int_t bin[] = {0,2,4,6,10,15,20,100}; // energy bins
962 
963  fhPt = new TH1F("hPt","Number of identified #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
964  fhPt->SetYTitle("#it{N}");
965  fhPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
966  outputContainer->Add(fhPt) ;
967 
968  fhE = new TH1F("hE","Number of identified #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
969  fhE->SetYTitle("#it{N}");
970  fhE->SetXTitle("#it{E} (GeV)");
971  outputContainer->Add(fhE) ;
972 
973  fhPtPhi = new TH2F
974  ("hPtPhi","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #varphi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
975  fhPtPhi->SetYTitle("#varphi (rad)");
976  fhPtPhi->SetXTitle("#it{E} (GeV)");
977  outputContainer->Add(fhPtPhi) ;
978 
979  fhPtEta = new TH2F
980  ("hPtEta","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
981  fhPtEta->SetYTitle("#eta");
982  fhPtEta->SetXTitle("#it{E} (GeV)");
983  outputContainer->Add(fhPtEta) ;
984 
985  fhEtaPhi = new TH2F
986  ("hEtaPhi","Selected #pi^{0} (#eta) pairs: #eta vs #varphi",netabins,etamin,etamax, nphibins,phimin,phimax);
987  fhEtaPhi->SetYTitle("#varphi (rad)");
988  fhEtaPhi->SetXTitle("#eta");
989  outputContainer->Add(fhEtaPhi) ;
990 
992  {
993  fhEtaPhiEMCALBC0 = new TH2F
994  ("hEtaPhiEMCALBC0","cluster, #it{E} > 2 GeV, #eta vs #varphi, for clusters with |#it{t}| < 25 ns, EMCAL-BC=0",netabins,etamin,etamax,nphibins,phimin,phimax);
995  fhEtaPhiEMCALBC0->SetYTitle("#varphi (rad)");
996  fhEtaPhiEMCALBC0->SetXTitle("#eta");
997  outputContainer->Add(fhEtaPhiEMCALBC0) ;
998 
999  fhEtaPhiEMCALBC1 = new TH2F
1000  ("hEtaPhiEMCALBC1","cluster, #it{E} > 2 GeV, #eta vs #varphi, for clusters with 25 < |#it{t}| < 75 ns, EMCAL-BC=1",netabins,etamin,etamax,nphibins,phimin,phimax);
1001  fhEtaPhiEMCALBC1->SetYTitle("#varphi (rad)");
1002  fhEtaPhiEMCALBC1->SetXTitle("#eta");
1003  outputContainer->Add(fhEtaPhiEMCALBC1) ;
1004 
1005  fhEtaPhiEMCALBCN = new TH2F
1006  ("hEtaPhiEMCALBCN","cluster, #it{E} > 2 GeV, #eta vs #varphi, for clusters with |#it{t}| > 75 ns, EMCAL-BC>1",netabins,etamin,etamax,nphibins,phimin,phimax);
1007  fhEtaPhiEMCALBCN->SetYTitle("#varphi (rad)");
1008  fhEtaPhiEMCALBCN->SetXTitle("#eta");
1009  outputContainer->Add(fhEtaPhiEMCALBCN) ;
1010 
1011  for(Int_t i = 0; i < 11; i++)
1012  {
1013  fhEtaPhiTriggerEMCALBC[i] = new TH2F
1014  (Form("hEtaPhiTriggerEMCALBC%d",i-5),
1015  Form("meson #it{E} > 2 GeV, #eta vs #varphi, Trigger EMCAL-BC=%d",i-5),
1016  netabins,etamin,etamax,nphibins,phimin,phimax);
1017  fhEtaPhiTriggerEMCALBC[i]->SetYTitle("#varphi (rad)");
1018  fhEtaPhiTriggerEMCALBC[i]->SetXTitle("#eta");
1019  outputContainer->Add(fhEtaPhiTriggerEMCALBC[i]) ;
1020 
1021  fhTimeTriggerEMCALBC[i] = new TH2F
1022  (Form("hTimeTriggerEMCALBC%d",i-5),
1023  Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
1024  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1025  fhTimeTriggerEMCALBC[i]->SetXTitle("#it{E} (GeV)");
1026  fhTimeTriggerEMCALBC[i]->SetYTitle("#it{t} (ns)");
1027  outputContainer->Add(fhTimeTriggerEMCALBC[i]);
1028 
1030  (Form("hTimeTriggerEMCALBC%dPileUpSPD",i-5),
1031  Form("meson #it{t} vs #it{E}, Trigger EMCAL-BC=%d",i-5),
1032  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1033  fhTimeTriggerEMCALBCPileUpSPD[i]->SetXTitle("#it{E} (GeV)");
1034  fhTimeTriggerEMCALBCPileUpSPD[i]->SetYTitle("#it{t} (ns)");
1035  outputContainer->Add(fhTimeTriggerEMCALBCPileUpSPD[i]);
1036 
1038  (Form("hEtaPhiTriggerEMCALBC%d_UnMatch",i-5),
1039  Form("meson #it{E} > 2 GeV, #eta vs #varphi, unmatched trigger EMCAL-BC=%d",i-5),
1040  netabins,etamin,etamax,nphibins,phimin,phimax);
1041  fhEtaPhiTriggerEMCALBCUM[i]->SetYTitle("#varphi (rad)");
1042  fhEtaPhiTriggerEMCALBCUM[i]->SetXTitle("#eta");
1043  outputContainer->Add(fhEtaPhiTriggerEMCALBCUM[i]) ;
1044 
1045  fhTimeTriggerEMCALBCUM[i] = new TH2F
1046  (Form("hTimeTriggerEMCALBC%d_UnMatch",i-5),
1047  Form("meson #it{t} vs #it{E}, unmatched trigger EMCAL-BC=%d",i-5),
1048  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1049  fhTimeTriggerEMCALBCUM[i]->SetXTitle("#it{E} (GeV)");
1050  fhTimeTriggerEMCALBCUM[i]->SetYTitle("#it{t} (ns)");
1051  outputContainer->Add(fhTimeTriggerEMCALBCUM[i]);
1052 
1053  }
1054 
1055  fhTimeTriggerEMCALBC0UMReMatchOpenTime = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_OpenTime",
1056  "cluster #it{t} vs #it{E} of clusters, no match, rematch open time",
1057  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1058  fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetXTitle("#it{E} (GeV)");
1059  fhTimeTriggerEMCALBC0UMReMatchOpenTime->SetYTitle("#it{t} (ns)");
1060  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchOpenTime);
1061 
1062 
1063  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_CheckNeighbours",
1064  "cluster #it{t} vs #it{E} of clusters, no match, rematch with neigbour parches",
1065  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1066  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetXTitle("#it{E} (GeV)");
1067  fhTimeTriggerEMCALBC0UMReMatchCheckNeigh->SetYTitle("#it{t} (ns)");
1068  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchCheckNeigh);
1069 
1070  fhTimeTriggerEMCALBC0UMReMatchBoth = new TH2F("hTimeTriggerBC0_UnMatch_ReMatch_Both",
1071  "cluster #it{t} vs #it{E} of clusters, no match, rematch open time and neigbour",
1072  nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
1073  fhTimeTriggerEMCALBC0UMReMatchBoth->SetXTitle("#it{E} (GeV)");
1074  fhTimeTriggerEMCALBC0UMReMatchBoth->SetYTitle("#it{t} (ns)");
1075  outputContainer->Add(fhTimeTriggerEMCALBC0UMReMatchBoth);
1076 
1077  }
1078 
1080  {
1081  fhPtCentrality = new TH2F("hPtCentrality","centrality vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,100);
1082  fhPtCentrality->SetYTitle("centrality");
1083  fhPtCentrality->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1084  outputContainer->Add(fhPtCentrality) ;
1085 
1086  fhPtEventPlane = new TH2F("hPtEventPlane","event plane angle vs #it{p}_{T}",nptbins,ptmin,ptmax, 100,0,TMath::Pi());
1087  fhPtEventPlane->SetYTitle("Event plane angle (rad)");
1088  fhPtEventPlane->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1089  outputContainer->Add(fhPtEventPlane) ;
1090  }
1091 
1092  if(fAnaType == kSSCalo)
1093  {
1094  fhPtReject = new TH1F("hPtReject","Number of rejected as #pi^{0} (#eta) decay",nptbins,ptmin,ptmax);
1095  fhPtReject->SetYTitle("#it{N}");
1096  fhPtReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1097  outputContainer->Add(fhPtReject) ;
1098 
1099  fhEReject = new TH1F("hEReject","Number of rejected as #pi^{0} (#eta) decay pairs",nptbins,ptmin,ptmax);
1100  fhEReject->SetYTitle("#it{N}");
1101  fhEReject->SetXTitle("#it{E} (GeV)");
1102  outputContainer->Add(fhEReject) ;
1103 
1104  fhPtPhiReject = new TH2F
1105  ("hPtPhiReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #varphi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
1106  fhPtPhiReject->SetYTitle("#varphi (rad)");
1107  fhPtPhiReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1108  outputContainer->Add(fhPtPhiReject) ;
1109 
1110  fhPtEtaReject = new TH2F
1111  ("hPtEtaReject","Rejected #pi^{0} (#eta) cluster: #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
1112  fhPtEtaReject->SetYTitle("#eta");
1113  fhPtEtaReject->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1114  outputContainer->Add(fhPtEtaReject) ;
1115 
1116  fhEtaPhiReject = new TH2F
1117  ("hEtaPhiReject","Rejected #pi^{0} (#eta) cluster: #eta vs #varphi",netabins,etamin,etamax, nphibins,phimin,phimax);
1118  fhEtaPhiReject->SetYTitle("#varphi (rad)");
1119  fhEtaPhiReject->SetXTitle("#eta");
1120  outputContainer->Add(fhEtaPhiReject) ;
1121 
1122  fhNLocMaxPtReject = new TH2F("hNLocMaxPtReject","Number of local maxima in cluster, rejected clusters",
1123  nptbins,ptmin,ptmax,20,0,20);
1124  fhNLocMaxPtReject ->SetYTitle("N maxima");
1125  fhNLocMaxPtReject ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1126  outputContainer->Add(fhNLocMaxPtReject) ;
1127  }
1128 
1129  fhMass = new TH2F
1130  ("hMass","all pairs #it{M}: #it{E} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1131  fhMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1132  fhMass->SetXTitle("#it{E} (GeV)");
1133  outputContainer->Add(fhMass) ;
1134 
1135  fhSelectedMass = new TH2F
1136  ("hSelectedMass","Selected #pi^{0} (#eta) pairs #it{M}: E vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1137  fhSelectedMass->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1138  fhSelectedMass->SetXTitle("#it{E} (GeV)");
1139  outputContainer->Add(fhSelectedMass) ;
1140 
1141  fhMassPt = new TH2F
1142  ("hMassPt","all pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1143  fhMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1144  fhMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1145  outputContainer->Add(fhMassPt) ;
1146 
1147  fhMassPtMaxPair = new TH2F
1148  ("hMassPtMaxPair","all pairs #it{M}: #it{p}_{T}^{max} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1149  fhMassPtMaxPair->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1150  fhMassPtMaxPair->SetXTitle("#it{p}_{T}^{max} (GeV/#it{c})");
1151  outputContainer->Add(fhMassPtMaxPair) ;
1152 
1153  fhMassPtMinPair = new TH2F
1154  ("hMassPtMinPair","all pairs #it{M}: #it{p}_{T}^{min} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1155  fhMassPtMinPair->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1156  fhMassPtMinPair->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1157  outputContainer->Add(fhMassPtMinPair) ;
1158 
1159  fhSelectedMassPt = new TH2F
1160  ("hSelectedMassPt","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1161  fhSelectedMassPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1162  fhSelectedMassPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1163  outputContainer->Add(fhSelectedMassPt) ;
1164 
1166  {
1167  fhMassPtIsoRCut = new TH2F
1168  ("hMassPtIsoRCut",Form("#it{M}: #it{p}_{T} vs #it{M}, for R = %1.1f, #it{p}_{T,1} < %2.2f",fR,fIsoCandMinPt),
1169  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1170  fhMassPtIsoRCut->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1171  fhMassPtIsoRCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1172  outputContainer->Add(fhMassPtIsoRCut) ;
1173  }
1174 
1175  if(fAnaType == kSSCalo)
1176  {
1178  ("hPtLambda0NoSplitCut","all clusters: #it{p}_{T} vs #lambda_{0}^{2}",nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1179  fhPtLambda0NoSplitCut->SetYTitle("#lambda_{0}^{2}");
1180  fhPtLambda0NoSplitCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1181  outputContainer->Add(fhPtLambda0NoSplitCut) ;
1182 
1183  for(Int_t inlm = 0; inlm < 3; inlm++)
1184  {
1185  fhMassPtLocMax[inlm] = new TH2F
1186  (Form("hMassPtNLocMax%d",inlm+1),Form("all pairs #it{M}: #it{p}_{T} vs #it{M} and NLM=%s",nlm[inlm].Data()),nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1187  fhMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1188  fhMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1189  outputContainer->Add(fhMassPtLocMax[inlm]) ;
1190 
1191  fhSelectedMassPtLocMax[inlm] = new TH2F
1192  (Form("hSelectedMassPtLocMax%d",inlm+1),Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, NLM=%s",nlm[inlm].Data()),nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1193  fhSelectedMassPtLocMax[inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1194  fhSelectedMassPtLocMax[inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1195  outputContainer->Add(fhSelectedMassPtLocMax[inlm]) ;
1196 
1198  {
1199  for(Int_t iSM = 0; iSM < fNModules; iSM++)
1200  {
1201  if(iSM < fFirstModule || iSM > fLastModule) continue;
1202 
1203  fhSelectedMassPtLocMaxSM[inlm][iSM] = new TH2F
1204  (Form("hSelectedMassPtLocMax%d_SM%d",inlm+1,iSM),Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, NLM=%s for SM=%d",nlm[inlm].Data(),iSM),nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1205  fhSelectedMassPtLocMaxSM[inlm][iSM]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1206  fhSelectedMassPtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1207  outputContainer->Add(fhSelectedMassPtLocMaxSM[inlm][iSM]) ;
1208 
1209  fhSelectedLambda0PtLocMaxSM[inlm][iSM] = new TH2F
1210  (Form("hSelectedLambda0PtLocMax%d_SM%d",inlm+1,iSM),Form("Selected #pi^{0} (#eta) pairs #lambda_{0}^{2}: #it{p}_{T} vs #it{M}, NLM=%s for SM=%d",nlm[inlm].Data(),iSM),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1211  fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetYTitle("#lambda_{0}^{2}");
1212  fhSelectedLambda0PtLocMaxSM[inlm][iSM]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1213  outputContainer->Add(fhSelectedLambda0PtLocMaxSM[inlm][iSM]) ;
1214  }
1215  }
1216 
1217  if(IsDataMC())
1218  {
1219  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1220  {
1221  fhMCSelectedMassPtLocMax[ipart][inlm] = new TH2F
1222  (Form("hSelectedMassPtLocMax%d_MC%s",inlm+1,pname[ipart].Data()),
1223  Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, NLM=%s, from MC %s",nlm[inlm].Data(),ptype[ipart].Data()),
1224  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1225  fhMCSelectedMassPtLocMax[ipart][inlm]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1226  fhMCSelectedMassPtLocMax[ipart][inlm]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1227  outputContainer->Add(fhMCSelectedMassPtLocMax[ipart][inlm]) ;
1228  }
1229  }
1230  }
1231 
1232  if(IsDataMC())
1233  {
1234  fhMassNoOverlap = new TH2F
1235  ("hMassNoOverlap","all pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1236  fhMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1237  fhMassNoOverlap->SetXTitle("#it{E} (GeV)");
1238  outputContainer->Add(fhMassNoOverlap) ;
1239 
1241  ("hSelectedMassNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{E} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1242  fhSelectedMassNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1243  fhSelectedMassNoOverlap->SetXTitle("#it{E} (GeV)");
1244  outputContainer->Add(fhSelectedMassNoOverlap) ;
1245 
1246  fhMassPtNoOverlap = new TH2F
1247  ("hMassPtNoOverlap","all pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1248  fhMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1249  fhMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1250  outputContainer->Add(fhMassPtNoOverlap) ;
1251 
1253  ("hSelectedMassPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M}, no overlap",nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1254  fhSelectedMassPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1255  fhSelectedMassPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1256  outputContainer->Add(fhSelectedMassPtNoOverlap) ;
1257  }
1258  }
1259 
1260  if(fAnaType != kSSCalo)
1261  {
1262  fhPtDecay = new TH1F("hPtDecay","Selected #pi^{0} (#eta) decay photons",nptbins,ptmin,ptmax);
1263  fhPtDecay->SetYTitle("#it{N}");
1264  fhPtDecay->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1265  outputContainer->Add(fhPtDecay) ;
1266 
1267  if(IsDataMC())
1268  {
1269  fhMCPtDecayLostPairPi0 = new TH1F("hPtDecay_MCPi0DecayLostPair","Selected #pi^{0} (#eta) decay photons, from MC #gamma #pi^{0} decay, companion lost",
1270  nptbins,ptmin,ptmax);
1271  fhMCPtDecayLostPairPi0->SetYTitle("#it{N}");
1272  fhMCPtDecayLostPairPi0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1273  outputContainer->Add(fhMCPtDecayLostPairPi0) ;
1274 
1275  fhMCPtDecayLostPairEta = new TH1F("hPtDecay_MCEtaDecayLostPair","Selected #pi^{0} (#eta) decay photons, from MC #gamma #eta decay, companion lost",
1276  nptbins,ptmin,ptmax);
1277  fhMCPtDecayLostPairEta->SetYTitle("#it{N}");
1278  fhMCPtDecayLostPairEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1279  outputContainer->Add(fhMCPtDecayLostPairEta) ;
1280 
1281  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1282  {
1283  fhMCPtDecay[ipart] = new TH1F(Form("hPtDecay_MC%s",pname[ipart].Data()),
1284  Form("Selected #pi^{0} (#eta) decay photons, from MC %s",ptype[ipart].Data()),
1285  nptbins,ptmin,ptmax);
1286  fhMCPtDecay[ipart]->SetYTitle("#it{N}");
1287  fhMCPtDecay[ipart]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1288  outputContainer->Add(fhMCPtDecay[ipart]) ;
1289  }
1290  }
1291  }
1292 
1294 
1295  if( fFillSelectClHisto )
1296  {
1297  fhPtLambda0 = new TH2F
1298  ("hPtLambda0","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1299  fhPtLambda0->SetYTitle("#lambda_{0}^{2}");
1300  fhPtLambda0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1301  outputContainer->Add(fhPtLambda0) ;
1302 
1303  fhPtLambda1 = new TH2F
1304  ("hPtLambda1","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1305  fhPtLambda1->SetYTitle("#lambda_{1}^{2}");
1306  fhPtLambda1->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1307  outputContainer->Add(fhPtLambda1) ;
1308 
1310  {
1311  fhPtLambda0NoTRD = new TH2F
1312  ("hPtLambda0NoTRD","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, not behind TRD",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1313  fhPtLambda0NoTRD->SetYTitle("#lambda_{0}^{2}");
1314  fhPtLambda0NoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1315  outputContainer->Add(fhPtLambda0NoTRD) ;
1316 
1318  {
1320  ("hPtFracMaxCellNoTRD","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy, not behind TRD",nptbins,ptmin,ptmax,100,0,1);
1321  fhPtFracMaxCellNoTRD->SetYTitle("Fraction");
1322  fhPtFracMaxCellNoTRD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1323  outputContainer->Add(fhPtFracMaxCellNoTRD) ;
1324  }
1325  }
1326 
1328  {
1329  fhPtDispersion = new TH2F
1330  ("hPtDispersion","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1331  fhPtDispersion->SetYTitle("D^{2}");
1332  fhPtDispersion->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1333  outputContainer->Add(fhPtDispersion) ;
1334 
1336  ("hPtLambda0FracMaxCellCut","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy < 0.5",nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1337  fhPtLambda0FracMaxCellCut->SetYTitle("#lambda_{0}^{2}");
1338  fhPtLambda0FracMaxCellCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1339  outputContainer->Add(fhPtLambda0FracMaxCellCut) ;
1340 
1341  fhPtFracMaxCell = new TH2F
1342  ("hPtFracMaxCell","Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, Max cell fraction of energy",nptbins,ptmin,ptmax,100,0,1);
1343  fhPtFracMaxCell->SetYTitle("Fraction");
1344  fhPtFracMaxCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1345  outputContainer->Add(fhPtFracMaxCell) ;
1346 
1347  fhPtDispEta = new TH2F ("hPtDispEta","#sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs #it{p}_{T}", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1348  fhPtDispEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1349  fhPtDispEta->SetYTitle("#sigma^{2}_{#eta #eta}");
1350  outputContainer->Add(fhPtDispEta);
1351 
1352  fhPtDispPhi = new TH2F ("hPtDispPhi","#sigma^{2}_{#varphi #varphi} = #Sigma w_{i}(#varphi_{i} - <#varphi>)^{2} / #Sigma w_{i} vs #it{p}_{T}", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1353  fhPtDispPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1354  fhPtDispPhi->SetYTitle("#sigma^{2}_{#varphi #varphi}");
1355  outputContainer->Add(fhPtDispPhi);
1356 
1357  fhPtSumEta = new TH2F ("hPtSumEta","#sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i})^{2} / #Sigma w_{i} - <#eta>^{2} vs #it{p}_{T}", nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1358  fhPtSumEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1359  fhPtSumEta->SetYTitle("#delta^{2}_{#eta #eta}");
1360  outputContainer->Add(fhPtSumEta);
1361 
1362  fhPtSumPhi = new TH2F ("hPtSumPhi","#sigma^{2}_{#varphi #varphi} = #Sigma w_{i}(#varphi_{i})^{2}/ #Sigma w_{i} - <#varphi>^{2} vs #it{p}_{T}",
1363  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
1364  fhPtSumPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1365  fhPtSumPhi->SetYTitle("#delta^{2}_{#varphi #varphi}");
1366  outputContainer->Add(fhPtSumPhi);
1367 
1368  fhPtSumEtaPhi = new TH2F ("hPtSumEtaPhi","#delta^{2}_{#eta #varphi} = #Sigma w_{i}(#varphi_{i} #eta_{i} ) / #Sigma w_{i} - <#varphi><#eta> vs #it{p}_{T}",
1369  nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
1370  fhPtSumEtaPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1371  fhPtSumEtaPhi->SetYTitle("#delta^{2}_{#eta #varphi}");
1372  outputContainer->Add(fhPtSumEtaPhi);
1373 
1374  fhPtDispEtaPhiDiff = new TH2F ("hPtDispEtaPhiDiff","#sigma^{2}_{#varphi #varphi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",
1375  nptbins,ptmin,ptmax,200, -10,10);
1376  fhPtDispEtaPhiDiff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1377  fhPtDispEtaPhiDiff->SetYTitle("#sigma^{2}_{#varphi #varphi}-#sigma^{2}_{#eta #eta}");
1378  outputContainer->Add(fhPtDispEtaPhiDiff);
1379 
1380  fhPtSphericity = new TH2F ("hPtSphericity","(#sigma^{2}_{#varphi #varphi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#varphi #varphi}) vs #it{p}_{T} (GeV/#it{c})",
1381  nptbins,ptmin,ptmax, 200, -1,1);
1382  fhPtSphericity->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1383  fhPtSphericity->SetYTitle("s = (#sigma^{2}_{#varphi #varphi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#varphi #varphi})");
1384  outputContainer->Add(fhPtSphericity);
1385 
1386  for(Int_t i = 0; i < 7; i++)
1387  {
1388  fhDispEtaDispPhi[i] = new TH2F (Form("hDispEtaDispPhi_EBin%d",i),Form("#sigma^{2}_{#varphi #varphi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",bin[i],bin[i+1]),
1389  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1390  fhDispEtaDispPhi[i]->SetXTitle("#sigma^{2}_{#eta #eta}");
1391  fhDispEtaDispPhi[i]->SetYTitle("#sigma^{2}_{#varphi #varphi}");
1392  outputContainer->Add(fhDispEtaDispPhi[i]);
1393 
1394  fhLambda0DispEta[i] = new TH2F (Form("hLambda0DispEta_EBin%d",i),Form("#lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",bin[i],bin[i+1]),
1395  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1396  fhLambda0DispEta[i]->SetXTitle("#lambda^{2}_{0}");
1397  fhLambda0DispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
1398  outputContainer->Add(fhLambda0DispEta[i]);
1399 
1400  fhLambda0DispPhi[i] = new TH2F (Form("hLambda0DispPhi_EBin%d",i),Form("#lambda^{2}_{0}} vs #sigma^{2}_{#varphi #varphi} for %d < E < %d GeV",bin[i],bin[i+1]),
1401  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
1402  fhLambda0DispPhi[i]->SetXTitle("#lambda^{2}_{0}");
1403  fhLambda0DispPhi[i]->SetYTitle("#sigma^{2}_{#varphi #varphi}");
1404  outputContainer->Add(fhLambda0DispPhi[i]);
1405  }
1406  }
1407 
1408  fhNLocMaxPt = new TH2F("hNLocMaxPt","Number of local maxima in cluster, selected clusters",
1409  nptbins,ptmin,ptmax,20,0,20);
1410  fhNLocMaxPt ->SetYTitle("N maxima");
1411  fhNLocMaxPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1412  outputContainer->Add(fhNLocMaxPt) ;
1413 
1415  {
1416  for(Int_t iSM = 0; iSM < fNModules; iSM++)
1417  {
1418  if(iSM < fFirstModule || iSM > fLastModule) continue;
1419 
1420  fhNLocMaxPtSM[iSM] = new TH2F(Form("hNLocMaxPt_SM%d",iSM),Form("Number of local maxima in cluster, selected clusters in SM %d",iSM),
1421  nptbins,ptmin,ptmax,20,0,20);
1422  fhNLocMaxPtSM[iSM] ->SetYTitle("N maxima");
1423  fhNLocMaxPtSM[iSM] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1424  outputContainer->Add(fhNLocMaxPtSM[iSM]) ;
1425  }
1426 
1427  for (Int_t i = 0; i < 3; i++)
1428  {
1429  fhPtLambda0LocMax[i] = new TH2F(Form("hPtLambda0LocMax%d",i+1),
1430  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s",nlm[i].Data()),
1431  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1432  fhPtLambda0LocMax[i]->SetYTitle("#lambda_{0}^{2}");
1433  fhPtLambda0LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1434  outputContainer->Add(fhPtLambda0LocMax[i]) ;
1435 
1436  if(IsDataMC())
1437  {
1438  for(Int_t ipart = 0; ipart < fgkNmcTypes; ipart++)
1439  {
1440  fhMCPtLambda0LocMax[ipart][i] = new TH2F
1441  (Form("hPtLambda0LocMax%d_MC%s",i+1,pname[ipart].Data()),
1442  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{0}, NLM=%s, MC %s",nlm[i].Data(),ptype[ipart].Data()),
1443  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1444  fhMCPtLambda0LocMax[ipart][i]->SetYTitle("#lambda_{0}^{2}");
1445  fhMCPtLambda0LocMax[ipart][i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1446  outputContainer->Add(fhMCPtLambda0LocMax[ipart][i]) ;
1447  }
1448  }
1449 
1450  fhPtLambda1LocMax[i] = new TH2F(Form("hPtLambda1LocMax%d",i+1),
1451  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #lambda_{1}, %s",nlm[i].Data()),
1452  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1453  fhPtLambda1LocMax[i]->SetYTitle("#lambda_{1}^{2}");
1454  fhPtLambda1LocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1455  outputContainer->Add(fhPtLambda1LocMax[i]) ;
1456 
1458  {
1459  fhPtDispersionLocMax[i] = new TH2F(Form("hPtDispersionLocMax%d",i+1),
1460  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs dispersion^{2}, %s",nlm[i].Data()),
1461  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1462  fhPtDispersionLocMax[i]->SetYTitle("dispersion^{2}");
1463  fhPtDispersionLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1464  outputContainer->Add(fhPtDispersionLocMax[i]) ;
1465 
1466  fhPtDispEtaLocMax[i] = new TH2F(Form("hPtDispEtaLocMax%d",i+1),
1467  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #eta}, %s",nlm[i].Data()),
1468  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1469  fhPtDispEtaLocMax[i]->SetYTitle("#sigma_{#eta #eta}");
1470  fhPtDispEtaLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1471  outputContainer->Add(fhPtDispEtaLocMax[i]) ;
1472 
1473  fhPtDispPhiLocMax[i] = new TH2F(Form("hPtDispPhiLocMax%d",i+1),
1474  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#varphi #varphi}, %s",nlm[i].Data()),
1475  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1476  fhPtDispPhiLocMax[i]->SetYTitle("#sigma_{#varphi #varphi}");
1477  fhPtDispPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1478  outputContainer->Add(fhPtDispPhiLocMax[i]) ;
1479 
1480  fhPtSumEtaPhiLocMax[i] = new TH2F(Form("hPtSumEtaPhiLocMax%d",i+1),
1481  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#eta #varphi}, %s",nlm[i].Data()),
1482  nptbins,ptmin,ptmax,2*ssbins,-ssmax,ssmax);
1483  fhPtSumEtaPhiLocMax[i]->SetYTitle("#sigma_{#eta #varphi}");
1484  fhPtSumEtaPhiLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1485  outputContainer->Add(fhPtSumEtaPhiLocMax[i]) ;
1486 
1487  fhPtDispEtaPhiDiffLocMax[i] = new TH2F(Form("hPtDispEtaPhiDiffLocMax%d",i+1),
1488  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#varphi #varphi} - #sigma_{#eta #eta}, %s",nlm[i].Data()),
1489  nptbins,ptmin,ptmax,200, -10,10);
1490  fhPtDispEtaPhiDiffLocMax[i]->SetYTitle("#sigma_{#varphi #varphi} - #sigma_{#eta #eta}");
1491  fhPtDispEtaPhiDiffLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1492  outputContainer->Add(fhPtDispEtaPhiDiffLocMax[i]) ;
1493 
1494  fhPtSphericityLocMax[i] = new TH2F(Form("hPtSphericityLocMax%d",i+1),
1495  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #sigma_{#varphi #varphi} - #sigma_{#eta #eta} / (#sigma_{#varphi #varphi} + #sigma_{#eta #eta}), %s",nlm[i].Data()),
1496  nptbins,ptmin,ptmax,200, -1,1);
1497  fhPtSphericityLocMax[i]->SetYTitle("#sigma_{#varphi #varphi} - #sigma_{#eta #eta} / (#sigma_{#varphi #varphi} + #sigma_{#eta #eta})");
1498  fhPtSphericityLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1499  outputContainer->Add(fhPtSphericityLocMax[i]) ;
1500  }
1501  }
1502  } // all NLM histos
1503 
1504  fhPtNCells = new TH2F ("hPtNCells","N cells in cluster vs E ", nptbins,ptmin,ptmax, nbins,nmin,nmax);
1505  fhPtNCells->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1506  fhPtNCells->SetYTitle("# of cells in cluster");
1507  outputContainer->Add(fhPtNCells);
1508 
1509  fhPtTime = new TH2F("hPtTime","cluster time vs pair E",nptbins,ptmin,ptmax, tbins,tmin,tmax);
1510  fhPtTime->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1511  fhPtTime->SetYTitle("t (ns)");
1512  outputContainer->Add(fhPtTime);
1513 
1514  }
1515 
1516  if(fAnaType != kIMCaloTracks)
1517  {
1518  fhEPairDiffTime = new TH2F("hEPairDiffTime","cluster pair time difference vs E",nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
1519  fhEPairDiffTime->SetXTitle("#it{E}_{pair} (GeV)");
1520  fhEPairDiffTime->SetYTitle("#Delta t (ns)");
1521  outputContainer->Add(fhEPairDiffTime);
1522  }
1523 
1524  if(fAnaType == kIMCalo)
1525  {
1526  TString combiName [] = {"1LocMax","2LocMax","NLocMax","1LocMax2LocMax","1LocMaxNLocMax","2LocMaxNLocMax","1LocMaxSSBad","NLocMaxSSGood"};
1527  TString combiTitle[] = {"1 Local Maxima in both clusters","2 Local Maxima in both clusters","more than 2 Local Maxima in both clusters",
1528  "1 Local Maxima paired with 2 Local Maxima","1 Local Maxima paired with more than 2 Local Maxima",
1529  "2 Local Maxima paired with more than 2 Local Maxima",
1530  "1 Local Maxima paired with #lambda_{0}^{2}>0.3","N Local Maxima paired with 0.1<#lambda_{0}^{2}<0.3"};
1531 
1533  {
1534  for (Int_t i = 0; i < 8 ; i++)
1535  {
1536  if (fAnaType == kIMCaloTracks && i > 2 ) continue ;
1537 
1538  fhMassPairLocMax[i] = new TH2F
1539  (Form("MassPairLocMax%s",combiName[i].Data()),
1540  Form("#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}, %s", combiTitle[i].Data()),
1541  nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1542  fhMassPairLocMax[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1543  fhMassPairLocMax[i]->SetXTitle("#it{E}_{pair} (GeV)");
1544  outputContainer->Add(fhMassPairLocMax[i]) ;
1545  }
1546  }
1547  }
1548 
1549  if(fFillTMHisto)
1550  {
1551  fhTrackMatchedDEta = new TH2F
1552  ("hTrackMatchedDEta",
1553  "d#eta of cluster-track vs cluster #it{p}_{T}",
1554  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1555  fhTrackMatchedDEta->SetYTitle("d#eta");
1556  fhTrackMatchedDEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1557 
1558  fhTrackMatchedDPhi = new TH2F
1559  ("hTrackMatchedDPhi",
1560  "d#varphi of cluster-track vs cluster #it{p}_{T}",
1561  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1562  fhTrackMatchedDPhi->SetYTitle("d#varphi (rad)");
1563  fhTrackMatchedDPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1564 
1566  ("hTrackMatchedDEtaDPhi",
1567  "d#eta vs d#varphi of cluster-track",
1568  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1569  fhTrackMatchedDEtaDPhi->SetYTitle("d#varphi (rad)");
1570  fhTrackMatchedDEtaDPhi->SetXTitle("d#eta");
1571 
1572  outputContainer->Add(fhTrackMatchedDEta) ;
1573  outputContainer->Add(fhTrackMatchedDPhi) ;
1574  outputContainer->Add(fhTrackMatchedDEtaDPhi) ;
1575 
1577  ("hTrackMatchedDEtaPos",
1578  "d#eta of cluster-track vs cluster #it{p}_{T}",
1579  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1580  fhTrackMatchedDEtaPos->SetYTitle("d#eta");
1581  fhTrackMatchedDEtaPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1582 
1584  ("hTrackMatchedDPhiPos",
1585  "d#varphi of cluster-track vs cluster #it{p}_{T}",
1586  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1587  fhTrackMatchedDPhiPos->SetYTitle("d#varphi (rad)");
1588  fhTrackMatchedDPhiPos->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1589 
1591  ("hTrackMatchedDEtaDPhiPos",
1592  "d#eta vs d#varphi of cluster-track",
1593  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1594  fhTrackMatchedDEtaDPhiPos->SetYTitle("d#varphi (rad)");
1595  fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta");
1596 
1597  outputContainer->Add(fhTrackMatchedDEtaPos) ;
1598  outputContainer->Add(fhTrackMatchedDPhiPos) ;
1599  outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ;
1600 
1602  ("hTrackMatchedDEtaNeg",
1603  "d#eta of cluster-track vs cluster #it{p}_{T}",
1604  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
1605  fhTrackMatchedDEtaNeg->SetYTitle("d#eta");
1606  fhTrackMatchedDEtaNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1607 
1609  ("hTrackMatchedDPhiNeg",
1610  "d#varphi of cluster-track vs cluster #it{p}_{T}",
1611  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
1612  fhTrackMatchedDPhiNeg->SetYTitle("d#varphi (rad)");
1613  fhTrackMatchedDPhiNeg->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1614 
1616  ("hTrackMatchedDEtaDPhiNeg",
1617  "d#eta vs d#varphi of cluster-track",
1618  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
1619  fhTrackMatchedDEtaDPhiNeg->SetYTitle("d#varphi (rad)");
1620  fhTrackMatchedDEtaDPhiNeg->SetXTitle("d#eta");
1621 
1622  outputContainer->Add(fhTrackMatchedDEtaNeg) ;
1623  outputContainer->Add(fhTrackMatchedDPhiNeg) ;
1624  outputContainer->Add(fhTrackMatchedDEtaDPhiNeg) ;
1625 
1626  fhdEdx = new TH2F ("hdEdx","matched track <dE/dx> vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
1627  fhdEdx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1628  fhdEdx->SetYTitle("<#it{dE}/#it{dx}>");
1629  outputContainer->Add(fhdEdx);
1630 
1631  fhEOverP = new TH2F ("hEOverP","matched track E/p vs cluster #it{p}_{T}", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1632  fhEOverP->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1633  fhEOverP->SetYTitle("#it{E}/#it{p}");
1634  outputContainer->Add(fhEOverP);
1635 
1637  {
1638  fhEOverPNoTRD = new TH2F ("hEOverPNoTRD","matched track E/p vs cluster E, SM not behind TRD ", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
1639  fhEOverPNoTRD->SetXTitle("#it{E} (GeV)");
1640  fhEOverPNoTRD->SetYTitle("#it{E}/#it{p}");
1641  outputContainer->Add(fhEOverPNoTRD);
1642  }
1643 
1644  if(IsDataMC() && fFillTMHisto)
1645  {
1647  ("hTrackMatchedMCParticlePt",
1648  "Origin of particle vs energy",
1649  nptbins,ptmin,ptmax,8,0,8);
1650  fhTrackMatchedMCParticlePt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1651  //fhTrackMatchedMCParticlePt->SetYTitle("Particle type");
1652 
1653  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(1 ,"Photon");
1654  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(2 ,"Electron");
1655  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1656  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(4 ,"Rest");
1657  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1658  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1659  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1660  fhTrackMatchedMCParticlePt->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1661 
1662  outputContainer->Add(fhTrackMatchedMCParticlePt);
1663 
1665  ("hTrackMatchedMCParticleDEta",
1666  "Origin of particle vs #eta residual",
1667  nresetabins,resetamin,resetamax,8,0,8);
1668  fhTrackMatchedMCParticleDEta->SetXTitle("#Delta #eta");
1669  //fhTrackMatchedMCParticleDEta->SetYTitle("Particle type");
1670 
1671  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(1 ,"Photon");
1672  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(2 ,"Electron");
1673  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1674  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(4 ,"Rest");
1675  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1676  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1677  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1678  fhTrackMatchedMCParticleDEta->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1679 
1680  outputContainer->Add(fhTrackMatchedMCParticleDEta);
1681 
1683  ("hTrackMatchedMCParticleDPhi",
1684  "Origin of particle vs #varphi residual",
1685  nresphibins,resphimin,resphimax,8,0,8);
1686  fhTrackMatchedMCParticleDPhi->SetXTitle("#Delta #varphi");
1687  //fhTrackMatchedMCParticleDPhi->SetYTitle("Particle type");
1688 
1689  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(1 ,"Photon");
1690  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(2 ,"Electron");
1691  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
1692  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(4 ,"Rest");
1693  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
1694  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
1695  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
1696  fhTrackMatchedMCParticleDPhi->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
1697 
1698  outputContainer->Add(fhTrackMatchedMCParticleDPhi);
1699  }
1700  }
1701 
1703  {
1704  fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
1705  nptbins,ptmin,ptmax, 100,0,1.);
1706  fhECellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1707  fhECellClusterRatio->SetYTitle("#it{E}_{cell i}/#it{E}_{cluster}");
1708  outputContainer->Add(fhECellClusterRatio);
1709 
1710  fhECellClusterLogRatio = new TH2F ("hECellClusterLogRatio"," Log(cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
1711  nptbins,ptmin,ptmax, 100,-10,0);
1712  fhECellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1713  fhECellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
1714  outputContainer->Add(fhECellClusterLogRatio);
1715 
1716  fhEMaxCellClusterRatio = new TH2F ("hEMaxCellClusterRatio"," max cell energy / cluster energy vs cluster energy, for selected decay photons from neutral meson",
1717  nptbins,ptmin,ptmax, 100,0,1.);
1718  fhEMaxCellClusterRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1719  fhEMaxCellClusterRatio->SetYTitle("#it{E}_{max cell}/#it{E}_{cluster}");
1720  outputContainer->Add(fhEMaxCellClusterRatio);
1721 
1722  fhEMaxCellClusterLogRatio = new TH2F ("hEMaxCellClusterLogRatio"," Log(max cell energy / cluster energy) vs cluster energy, for selected decay photons from neutral meson",
1723  nptbins,ptmin,ptmax, 100,-10,0);
1724  fhEMaxCellClusterLogRatio->SetXTitle("#it{E}_{cluster} (GeV) ");
1725  fhEMaxCellClusterLogRatio->SetYTitle("Log (#it{E}_{max cell}/#it{E}_{cluster})");
1726  outputContainer->Add(fhEMaxCellClusterLogRatio);
1727 
1728  for(Int_t iw = 0; iw < 14; iw++)
1729  {
1730  fhLambda0ForW0[iw] = new TH2F (Form("hLambda0ForW0%d",iw),Form("shower shape, #lambda^{2}_{0} vs E, w0 = %1.1f, for selected decay photons from neutral meson",1+0.5*iw),
1731  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1732  fhLambda0ForW0[iw]->SetXTitle("#it{E}_{cluster}");
1733  fhLambda0ForW0[iw]->SetYTitle("#lambda^{2}_{0}");
1734  outputContainer->Add(fhLambda0ForW0[iw]);
1735 
1736  // fhLambda1ForW0[iw] = new TH2F (Form("hLambda1ForW0%d",iw),Form("shower shape, #lambda^{2}_{1} vs E, w0 = %1.1f, for selected decay photons from neutral meson",0.5+0.5*iw),
1737  // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
1738  // fhLambda1ForW0[iw]->SetXTitle("#it{E}_{cluster}");
1739  // fhLambda1ForW0[iw]->SetYTitle("#lambda^{2}_{1}");
1740  // outputContainer->Add(fhLambda1ForW0[iw]);
1741  }
1742  }
1743 
1744  if(IsDataMC())
1745  {
1746  // Origin
1747 
1748  fhMCPi0PtOrigin = new TH2F("hMCPi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ;
1749  fhMCPi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1750  fhMCPi0PtOrigin->SetYTitle("Origin");
1751  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1752  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1753  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1754  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1755  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho");
1756  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega");
1757  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K");
1758  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other");
1759  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta");
1760  fhMCPi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime");
1761  outputContainer->Add(fhMCPi0PtOrigin) ;
1762 
1763  fhMCNotResonancePi0PtOrigin = new TH2F("hMCNotResonancePi0PtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,11,0,11) ;
1764  fhMCNotResonancePi0PtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1765  fhMCNotResonancePi0PtOrigin->SetYTitle("Origin");
1766  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1767  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1768  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1769  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1770  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(5 ,"#rho");
1771  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(6 ,"#omega");
1772  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(7 ,"K");
1773  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(8 ,"Other");
1774  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(9 ,"#eta");
1775  fhMCNotResonancePi0PtOrigin->GetYaxis()->SetBinLabel(10 ,"#eta prime");
1776  outputContainer->Add(fhMCNotResonancePi0PtOrigin) ;
1777 
1778  fhMCPi0PtStatus = new TH2F("hMCPi0PtStatus","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs status",nptbins,ptmin,ptmax,101,-50,50) ;
1779  fhMCPi0PtStatus->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1780  fhMCPi0PtStatus->SetYTitle("Status");
1781  outputContainer->Add(fhMCPi0PtStatus) ;
1782 
1783  fhMCEtaPtOrigin = new TH2F("hMCEtaPtOrigin","Reconstructed pair from generated #pi^{0} #it{p}_{T} vs origin",nptbins,ptmin,ptmax,7,0,7) ;
1784  fhMCEtaPtOrigin->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1785  fhMCEtaPtOrigin->SetYTitle("Origin");
1786  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(1 ,"Status 21");
1787  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(2 ,"Quark");
1788  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(3 ,"qq Resonances");
1789  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(4 ,"Resonances");
1790  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(5 ,"Other");
1791  fhMCEtaPtOrigin->GetYaxis()->SetBinLabel(6 ,"#eta prime");
1792  outputContainer->Add(fhMCEtaPtOrigin) ;
1793 
1794  fhMCPi0ProdVertex = new TH2F("hMCPi0ProdVertex","Selected reco pair from generated #pi^{0} #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
1795  fhMCPi0ProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1796  fhMCPi0ProdVertex->SetYTitle("#it{R} (cm)");
1797  outputContainer->Add(fhMCPi0ProdVertex) ;
1798 
1799  fhMCEtaProdVertex = new TH2F("hMCEtaProdVertex","Selected reco pair from generated #eta #it{p}_{T} vs production vertex",200,ptmin,20+ptmin,5000,0,500) ;
1800  fhMCEtaProdVertex->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1801  fhMCEtaProdVertex->SetYTitle("#it{R} (cm)");
1802  outputContainer->Add(fhMCEtaProdVertex) ;
1803 
1804  if(GetReader()->GetDataType() != AliCaloTrackReader::kMC && fAnaType==kSSCalo)
1805  {
1806  fhMCPi0PtGenRecoFraction = new TH2F("hMCPi0PtGenRecoFraction","Number of clusters from #pi^{0} (2 #gamma) identified as #pi^{0} (#eta), #it{p}_{T} versus E primary #pi^{0} / E reco",
1807  nptbins,ptmin,ptmax,200,0,2);
1808  fhMCPi0PtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1809  fhMCPi0PtGenRecoFraction->SetYTitle("#it{E}^{#pi^{0} mother} / #it{E}^{rec}");
1810  outputContainer->Add(fhMCPi0PtGenRecoFraction) ;
1811 
1812  fhMCEtaPtGenRecoFraction = new TH2F("hMCEtaPtGenRecoFraction","Number of clusters from #eta (2 #gamma) identified as #pi^{0} (#eta),#it{p}_{T} versus E primary #eta / E reco",
1813  nptbins,ptmin,ptmax,200,0,2);
1814  fhMCEtaPtGenRecoFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1815  fhMCEtaPtGenRecoFraction->SetYTitle("#it{E}^{ #eta mother} / #it{E}^{rec}");
1816  outputContainer->Add(fhMCEtaPtGenRecoFraction) ;
1817 
1818  fhMCPi0DecayPt = new TH1F("hMCPi0DecayPt","Number of #gamma from #pi^{0} decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1819  fhMCPi0DecayPt->SetYTitle("#it{N}");
1820  fhMCPi0DecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1821  outputContainer->Add(fhMCPi0DecayPt) ;
1822 
1823  fhMCPi0DecayPtFraction = new TH2F("hMCPi0DecayPtFraction","Number of #gamma from #pi^{0} decay identified as #pi^{0} (#eta), #it{p}_{T} versus E primary #gamma / #it{E} primary #pi^{0}",
1824  nptbins,ptmin,ptmax,100,0,1);
1825  fhMCPi0DecayPtFraction->SetXTitle("p^{rec}_{T} (GeV/#it{c})");
1826  fhMCPi0DecayPtFraction->SetYTitle("E^{gen} / E^{gen-mother}");
1827  outputContainer->Add(fhMCPi0DecayPtFraction) ;
1828 
1829  fhMCEtaDecayPt = new TH1F("hMCEtaDecayPt","Number of #gamma from #eta decay identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1830  fhMCEtaDecayPt->SetYTitle("#it{N}");
1831  fhMCEtaDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1832  outputContainer->Add(fhMCEtaDecayPt) ;
1833 
1834  fhMCEtaDecayPtFraction = new TH2F("hMCEtaDecayPtFraction","Number of #gamma from #eta decay identified as #pi^{0} (#eta), #it{p}_{T} versus E primary #gamma / E primary #eta",
1835  nptbins,ptmin,ptmax,100,0,1);
1836  fhMCEtaDecayPtFraction->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1837  fhMCEtaDecayPtFraction->SetYTitle("#it{E}^{gen} / #it{E}^{gen-mother}");
1838  outputContainer->Add(fhMCEtaDecayPtFraction) ;
1839 
1840  fhMCOtherDecayPt = new TH1F("hMCOtherDecayPt","Number of #gamma decay (not #eta or #pi^{0}) identified as #pi^{0} (#eta)",nptbins,ptmin,ptmax);
1841  fhMCOtherDecayPt->SetYTitle("#it{N}");
1842  fhMCOtherDecayPt->SetXTitle("#it{p}^{rec}_{T} (GeV/#it{c})");
1843  outputContainer->Add(fhMCOtherDecayPt) ;
1844  }
1845 
1846  if(fAnaType!=kSSCalo)
1847  {
1848  fhAnglePairMCPi0 = new TH2F
1849  ("AnglePairMCPi0",
1850  "Angle between decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,250,0,0.5);
1851  fhAnglePairMCPi0->SetYTitle("#alpha (rad)");
1852  fhAnglePairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1853  outputContainer->Add(fhAnglePairMCPi0) ;
1854 
1855  fhAnglePairMCEta = new TH2F
1856  ("AnglePairMCEta",
1857  "Angle between decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,250,0,0.5);
1858  fhAnglePairMCEta->SetYTitle("#alpha (rad)");
1859  fhAnglePairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1860  outputContainer->Add(fhAnglePairMCEta) ;
1861 
1862  fhMassPairMCPi0 = new TH2F
1863  ("MassPairMCPi0",
1864  "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #pi^{0}",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1865  fhMassPairMCPi0->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1866  fhMassPairMCPi0->SetXTitle("#it{E}_{pair} (GeV)");
1867  outputContainer->Add(fhMassPairMCPi0) ;
1868 
1869  fhMassPairMCEta = new TH2F
1870  ("MassPairMCEta",
1871  "#it{M} for decay #gamma pair vs #it{E}_{pair}, origin #eta",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
1872  fhMassPairMCEta->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1873  fhMassPairMCEta->SetXTitle("#it{E}_{pair} (GeV)");
1874  outputContainer->Add(fhMassPairMCEta) ;
1875  }
1876 
1877  Int_t ntypes = fgkNmcTypes;
1878  if(fAnaType != kSSCalo) ntypes = 2;
1879 
1880  for(Int_t i = 0; i < ntypes; i++)
1881  {
1882  fhMCE[i] = new TH1F
1883  (Form("hE_MC%s",pname[i].Data()),
1884  Form("Identified as #pi^{0} (#eta), cluster from %s",
1885  ptype[i].Data()),
1886  nptbins,ptmin,ptmax);
1887  fhMCE[i]->SetYTitle("#it{N}");
1888  fhMCE[i]->SetXTitle("#it{E} (GeV)");
1889  outputContainer->Add(fhMCE[i]) ;
1890 
1891  fhMCPt[i] = new TH1F
1892  (Form("hPt_MC%s",pname[i].Data()),
1893  Form("Identified as #pi^{0} (#eta), cluster from %s",
1894  ptype[i].Data()),
1895  nptbins,ptmin,ptmax);
1896  fhMCPt[i]->SetYTitle("#it{N}");
1897  fhMCPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1898  outputContainer->Add(fhMCPt[i]) ;
1899 
1901  {
1902  fhMCPtCentrality[i] = new TH2F
1903  (Form("hPtCentrality_MC%s",pname[i].Data()),
1904  Form("Identified as #pi^{0} (#eta), cluster from %s",
1905  ptype[i].Data()),
1906  nptbins,ptmin,ptmax, 100,0,100);
1907  fhMCPtCentrality[i]->SetYTitle("centrality");
1908  fhMCPtCentrality[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1909  outputContainer->Add(fhMCPtCentrality[i]) ;
1910  }
1911 
1912  if(fAnaType == kSSCalo)
1913  {
1914  fhMCNLocMaxPt[i] = new TH2F
1915  (Form("hNLocMaxPt_MC%s",pname[i].Data()),
1916  Form("cluster from %s, #it{p}_{T} of cluster vs NLM, accepted",ptype[i].Data()),
1917  nptbins,ptmin,ptmax,20,0,20);
1918  fhMCNLocMaxPt[i] ->SetYTitle("#it{NLM}");
1919  fhMCNLocMaxPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1920  outputContainer->Add(fhMCNLocMaxPt[i]) ;
1921 
1922  fhMCNLocMaxPtReject[i] = new TH2F
1923  (Form("hNLocMaxPtReject_MC%s",pname[i].Data()),
1924  Form("cluster from %s, #it{p}_{T} of cluster vs NLM, rejected",ptype[i].Data()),
1925  nptbins,ptmin,ptmax,20,0,20);
1926  fhMCNLocMaxPtReject[i] ->SetYTitle("#it{NLM}");
1927  fhMCNLocMaxPtReject[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1928  outputContainer->Add(fhMCNLocMaxPtReject[i]) ;
1929 
1930  fhMCEReject[i] = new TH1F
1931  (Form("hEReject_MC%s",pname[i].Data()),
1932  Form("Rejected as #pi^{0} (#eta), cluster from %s",
1933  ptype[i].Data()),
1934  nptbins,ptmin,ptmax);
1935  fhMCEReject[i]->SetYTitle("#it{N}");
1936  fhMCEReject[i]->SetXTitle("#it{E} (GeV)");
1937  outputContainer->Add(fhMCEReject[i]) ;
1938 
1939  fhMCPtReject[i] = new TH1F
1940  (Form("hPtReject_MC%s",pname[i].Data()),
1941  Form("Rejected as #pi^{0} (#eta), cluster from %s",
1942  ptype[i].Data()),
1943  nptbins,ptmin,ptmax);
1944  fhMCPtReject[i]->SetYTitle("#it{N}");
1945  fhMCPtReject[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1946  outputContainer->Add(fhMCPtReject[i]) ;
1947  }
1948 
1949  fhMCPtPhi[i] = new TH2F
1950  (Form("hPtPhi_MC%s",pname[i].Data()),
1951  Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
1952  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
1953  fhMCPtPhi[i]->SetYTitle("#varphi");
1954  fhMCPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1955  outputContainer->Add(fhMCPtPhi[i]) ;
1956 
1957  fhMCPtEta[i] = new TH2F
1958  (Form("hPtEta_MC%s",pname[i].Data()),
1959  Form("Identified as #pi^{0} (#eta), cluster from %s",
1960  ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
1961  fhMCPtEta[i]->SetYTitle("#eta");
1962  fhMCPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1963  outputContainer->Add(fhMCPtEta[i]) ;
1964 
1965  fhMCMassPt[i] = new TH2F
1966  (Form("hMassPt_MC%s",pname[i].Data()),
1967  Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1968  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1969  fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1970  fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1971  outputContainer->Add(fhMCMassPt[i]) ;
1972 
1973  fhMCSelectedMassPt[i] = new TH2F
1974  (Form("hSelectedMassPt_MC%s",pname[i].Data()),
1975  Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
1976  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1977  fhMCSelectedMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1978  fhMCSelectedMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1979  outputContainer->Add(fhMCSelectedMassPt[i]) ;
1980 
1981  if(fAnaType == kSSCalo)
1982  {
1983  fhMCMassPtNoOverlap[i] = new TH2F
1984  (Form("hMassPtNoOverlap_MC%s",pname[i].Data()),
1985  Form("all pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1986  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1987  fhMCMassPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1988  fhMCMassPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1989  outputContainer->Add(fhMCMassPtNoOverlap[i]) ;
1990 
1992  (Form("hSelectedMassPtNoOverlap_MC%s",pname[i].Data()),
1993  Form("Selected #pi^{0} (#eta) pairs #it{M}: #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
1994  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
1995  fhMCSelectedMassPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
1996  fhMCSelectedMassPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
1997  outputContainer->Add(fhMCSelectedMassPtNoOverlap[i]) ;
1998  }
1999 
2000  if( fFillSelectClHisto )
2001  {
2002  fhMCPtLambda0[i] = new TH2F(Form("hELambda0_MC%s",pname[i].Data()),
2003  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}",ptype[i].Data()),
2004  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2005  fhMCPtLambda0[i]->SetYTitle("#lambda_{0}^{2}");
2006  fhMCPtLambda0[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2007  outputContainer->Add(fhMCPtLambda0[i]) ;
2008 
2009  fhMCPtLambda1[i] = new TH2F(Form("hELambda1_MC%s",pname[i].Data()),
2010  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{1}^{2}",ptype[i].Data()),
2011  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2012  fhMCPtLambda1[i]->SetYTitle("#lambda_{1}^{2}");
2013  fhMCPtLambda1[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2014  outputContainer->Add(fhMCPtLambda1[i]) ;
2015 
2017  {
2018  fhMCPtLambda0NoTRD[i] = new TH2F(Form("hELambda0NoTRD_MC%s",pname[i].Data()),
2019  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, NoTRD",ptype[i].Data()),
2020  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2021  fhMCPtLambda0NoTRD[i]->SetYTitle("#lambda_{0}^{2}");
2022  fhMCPtLambda0NoTRD[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2023  outputContainer->Add(fhMCPtLambda0NoTRD[i]) ;
2024  }
2025 
2027  {
2028  fhMCPtDispersion[i] = new TH2F(Form("hEDispersion_MC%s",pname[i].Data()),
2029  Form("Selected pair, cluster from %s : #it{p}_{T} vs dispersion^{2}",ptype[i].Data()),
2030  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2031  fhMCPtDispersion[i]->SetYTitle("#it{D}^{2}");
2032  fhMCPtDispersion[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2033  outputContainer->Add(fhMCPtDispersion[i]) ;
2034 
2035  fhMCPtDispEta[i] = new TH2F (Form("hPtDispEta_MC%s",pname[i].Data()),
2036  Form("cluster from %s : #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs #it{p}_{T}",ptype[i].Data()),
2037  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2038  fhMCPtDispEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2039  fhMCPtDispEta[i]->SetYTitle("#sigma^{2}_{#eta #eta}");
2040  outputContainer->Add(fhMCPtDispEta[i]);
2041 
2042  fhMCPtDispPhi[i] = new TH2F (Form("hPtDispPhi_MC%s",pname[i].Data()),
2043  Form("cluster from %s : #sigma^{2}_{#varphi #varphi} = #Sigma w_{i}(#varphi_{i} - <#varphi>)^{2} / #Sigma w_{i} vs #it{p}_{T}",ptype[i].Data()),
2044  nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
2045  fhMCPtDispPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2046  fhMCPtDispPhi[i]->SetYTitle("#sigma^{2}_{#varphi #varphi}");
2047  outputContainer->Add(fhMCPtDispPhi[i]);
2048 
2049  fhMCPtSumEtaPhi[i] = new TH2F (Form("hPtSumEtaPhi_MC%s",pname[i].Data()),
2050  Form("cluster from %s : #delta^{2}_{#eta #varphi} = #Sigma w_{i}(#varphi_{i} #eta_{i} ) / #Sigma w_{i} - <#varphi><#eta> vs #it{p}_{T}",ptype[i].Data()),
2051  nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
2052  fhMCPtSumEtaPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2053  fhMCPtSumEtaPhi[i]->SetYTitle("#delta^{2}_{#eta #varphi}");
2054  outputContainer->Add(fhMCPtSumEtaPhi[i]);
2055 
2056  fhMCPtDispEtaPhiDiff[i] = new TH2F (Form("hPtDispEtaPhiDiff_MC%s",pname[i].Data()),
2057  Form("cluster from %s : #sigma^{2}_{#varphi #varphi} - #sigma^{2}_{#eta #eta} vs #it{p}_{T}",ptype[i].Data()),
2058  nptbins,ptmin,ptmax,200,-10,10);
2059  fhMCPtDispEtaPhiDiff[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2060  fhMCPtDispEtaPhiDiff[i]->SetYTitle("#sigma^{2}_{#varphi #varphi}-#sigma^{2}_{#eta #eta}");
2061  outputContainer->Add(fhMCPtDispEtaPhiDiff[i]);
2062 
2063  fhMCPtSphericity[i] = new TH2F (Form("hPtSphericity_MC%s",pname[i].Data()),
2064  Form("cluster from %s : (#sigma^{2}_{#varphi #varphi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#varphi #varphi}) vs E",ptype[i].Data()),
2065  nptbins,ptmin,ptmax, 200,-1,1);
2066  fhMCPtSphericity[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2067  fhMCPtSphericity[i]->SetYTitle("#it{s} = (#sigma^{2}_{#varphi #varphi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#varphi #varphi})");
2068  outputContainer->Add(fhMCPtSphericity[i]);
2069 
2070  for(Int_t ie = 0; ie < 7; ie++)
2071  {
2072  fhMCDispEtaDispPhi[ie][i] = new TH2F (Form("hMCDispEtaDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2073  Form("cluster from %s : #sigma^{2}_{#varphi #varphi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2074  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2075  fhMCDispEtaDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2076  fhMCDispEtaDispPhi[ie][i]->SetYTitle("#sigma^{2}_{#varphi #varphi}");
2077  outputContainer->Add(fhMCDispEtaDispPhi[ie][i]);
2078 
2079  fhMCLambda0DispEta[ie][i] = new TH2F (Form("hMCLambda0DispEta_EBin%d_MC%s",ie,pname[i].Data()),
2080  Form("cluster from %s : #lambda^{2}_{0} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2081  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2082  fhMCLambda0DispEta[ie][i]->SetXTitle("#lambda^{2}_{0}");
2083  fhMCLambda0DispEta[ie][i]->SetYTitle("#sigma^{2}_{#varphi #varphi}");
2084  outputContainer->Add(fhMCLambda0DispEta[ie][i]);
2085 
2086  fhMCLambda0DispPhi[ie][i] = new TH2F (Form("hMCLambda0DispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2087  Form("cluster from %s :#lambda^{2}_{0} vs #sigma^{2}_{#varphi #varphi} for %d < E < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2088  ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
2089  fhMCLambda0DispPhi[ie][i]->SetXTitle("#lambda^{2}_{0}");
2090  fhMCLambda0DispPhi[ie][i]->SetYTitle("#sigma^{2}_{#varphi #varphi}");
2091  outputContainer->Add(fhMCLambda0DispPhi[ie][i]);
2092  }
2093 
2094  fhMCPtLambda0FracMaxCellCut[i] = new TH2F(Form("hELambda0FracMaxCellCut_MC%s",pname[i].Data()),
2095  Form("Selected pair, cluster from %s : #it{p}_{T} vs #lambda_{0}^{2}, Max cell fraction of energy < 0.5 ",ptype[i].Data()),
2096  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2097  fhMCPtLambda0FracMaxCellCut[i]->SetYTitle("#lambda_{0}^{2}");
2098  fhMCPtLambda0FracMaxCellCut[i]->SetXTitle("#it{E} (GeV)");
2099  outputContainer->Add(fhMCPtLambda0FracMaxCellCut[i]) ;
2100 
2101  fhMCPtFracMaxCell[i] = new TH2F(Form("hEFracMaxCell_MC%s",pname[i].Data()),
2102  Form("Selected pair, cluster from %s : #it{p}_{T} vs Max cell fraction of energy",ptype[i].Data()),
2103  nptbins,ptmin,ptmax,100,0,1);
2104  fhMCPtFracMaxCell[i]->SetYTitle("#it{Fraction}");
2105  fhMCPtFracMaxCell[i]->SetXTitle("#it{E} (GeV)");
2106  outputContainer->Add(fhMCPtFracMaxCell[i]) ;
2107  }
2108  }
2109  }// MC particle loop
2110  }//Histos with MC
2111 
2112  if(fAnaType==kSSCalo)
2113  {
2114  fhAsymmetry = new TH2F ("hAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
2115  nptbins,ptmin,ptmax, 200, -1,1);
2116  fhAsymmetry->SetXTitle("#it{E} (GeV)");
2117  fhAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2118  outputContainer->Add(fhAsymmetry);
2119 
2120  fhSelectedAsymmetry = new TH2F ("hSelectedAsymmetry","#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",
2121  nptbins,ptmin,ptmax, 200, -1,1);
2122  fhSelectedAsymmetry->SetXTitle("#it{E} (GeV)");
2123  fhSelectedAsymmetry->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2124  outputContainer->Add(fhSelectedAsymmetry);
2125 
2126  fhSplitE = new TH1F
2127  ("hSplitE","Selected #pi^{0} (#eta) pairs energy sum of split sub-clusters",nptbins,ptmin,ptmax);
2128  fhSplitE->SetYTitle("counts");
2129  fhSplitE->SetXTitle("#it{E} (GeV)");
2130  outputContainer->Add(fhSplitE) ;
2131 
2132  fhSplitPt = new TH1F
2133  ("hSplitPt","Selected #pi^{0} (#eta) pairs #it{p}_{T} sum of split sub-clusters",nptbins,ptmin,ptmax);
2134  fhSplitPt->SetYTitle("counts");
2135  fhSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2136  outputContainer->Add(fhSplitPt) ;
2137 
2138 
2139  fhSplitPtPhi = new TH2F
2140  ("hSplitPtPhi","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #varphi",nptbins,ptmin,ptmax, nphibins,phimin,phimax);
2141  fhSplitPtPhi->SetYTitle("#varphi (rad)");
2142  fhSplitPtPhi->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2143  outputContainer->Add(fhSplitPtPhi) ;
2144 
2145  fhSplitPtEta = new TH2F
2146  ("hSplitPtEta","Selected #pi^{0} (#eta) pairs: sum split sub-cluster #it{p}_{T} vs #eta",nptbins,ptmin,ptmax,netabins,etamin,etamax);
2147  fhSplitPtEta->SetYTitle("#eta");
2148  fhSplitPtEta->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2149  outputContainer->Add(fhSplitPtEta) ;
2150 
2151 
2152  fhNLocMaxSplitPt = new TH2F("hNLocMaxSplitPt","Number of local maxima in cluster",
2153  nptbins,ptmin,ptmax,20,0,20);
2154  fhNLocMaxSplitPt ->SetYTitle("#it{NLM}");
2155  fhNLocMaxSplitPt ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2156  outputContainer->Add(fhNLocMaxSplitPt) ;
2157 
2158 
2159  fhMassSplitPt = new TH2F
2160  ("hMassSplitPt","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
2161  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2162  fhMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2163  fhMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2164  outputContainer->Add(fhMassSplitPt) ;
2165 
2167  ("hSelectedMassSplitPt","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}",
2168  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2169  fhSelectedMassSplitPt->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2170  fhSelectedMassSplitPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2171  outputContainer->Add(fhSelectedMassSplitPt) ;
2172 
2173  if(IsDataMC())
2174  {
2176  ("hMassSplitPtNoOverlap","all pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
2177  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2178  fhMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2179  fhMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2180  outputContainer->Add(fhMassSplitPtNoOverlap) ;
2181 
2183  ("hSelectedMassSplitPtNoOverlap","Selected #pi^{0} (#eta) pairs #it{M}: sum split sub-cluster #it{p}_{T} vs #it{M}, no overlap",
2184  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2185  fhSelectedMassSplitPtNoOverlap->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2186  fhSelectedMassSplitPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2187  outputContainer->Add(fhSelectedMassSplitPtNoOverlap) ;
2188 
2189 
2191  ("hMCPi0PtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2192  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2193  fhMCPi0PtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2194  fhMCPi0PtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2195  outputContainer->Add(fhMCPi0PtRecoPtPrim ) ;
2196 
2198  ("hMCPi0PtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2199  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2200  fhMCPi0PtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2201  fhMCPi0PtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2202  outputContainer->Add(fhMCPi0PtRecoPtPrimNoOverlap ) ;
2203 
2205  ("hMCPi0SelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2206  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2207  fhMCPi0SelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2208  fhMCPi0SelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2209  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrim ) ;
2210 
2212  ("hMCPi0SelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2213  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2214  fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2215  fhMCPi0SelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2216  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimNoOverlap ) ;
2217 
2218 
2220  ("hMCPi0SplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2221  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2222  fhMCPi0SplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2223  fhMCPi0SplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2224  outputContainer->Add(fhMCPi0SplitPtRecoPtPrim ) ;
2225 
2227  ("hMCPi0SplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2228  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2229  fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2230  fhMCPi0SplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2231  outputContainer->Add(fhMCPi0SplitPtRecoPtPrimNoOverlap ) ;
2232 
2234  ("hMCPi0SelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2235  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2236  fhMCPi0SelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2237  fhMCPi0SelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2238  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrim ) ;
2239 
2241  ("hMCPi0SelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2242  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2243  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2244  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2245  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap ) ;
2246 
2248  ("hMCEtaPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2249  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2250  fhMCEtaPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2251  fhMCEtaPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2252  outputContainer->Add(fhMCEtaPtRecoPtPrim ) ;
2253 
2255  ("hMCEtaPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2256  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2257  fhMCEtaPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2258  fhMCEtaPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2259  outputContainer->Add(fhMCEtaPtRecoPtPrimNoOverlap ) ;
2260 
2262  ("hMCEtaSelectedPtRecoPtPrim","#it{p}_{T,reco} vs #it{p}_{T,gen}",
2263  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2264  fhMCEtaSelectedPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2265  fhMCEtaSelectedPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2266  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrim ) ;
2267 
2269  ("hMCEtaSelectedPtRecoPtPrimNoOverlap","#it{p}_{T,reco} vs #it{p}_{T,gen}, no overlap",
2270  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2271  fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2272  fhMCEtaSelectedPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2273  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimNoOverlap ) ;
2274 
2275 
2277  ("hMCEtaSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2278  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2279  fhMCEtaSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2280  fhMCEtaSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2281  outputContainer->Add(fhMCEtaSplitPtRecoPtPrim ) ;
2282 
2284  ("hMCEtaSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2285  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2286  fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2287  fhMCEtaSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2288  outputContainer->Add(fhMCEtaSplitPtRecoPtPrimNoOverlap ) ;
2289 
2291  ("hMCEtaSelectedSplitPtRecoPtPrim","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}",
2292  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2293  fhMCEtaSelectedSplitPtRecoPtPrim ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2294  fhMCEtaSelectedSplitPtRecoPtPrim ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2295  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrim ) ;
2296 
2298  ("hMCEtaSelectedSplitPtRecoPtPrimNoOverlap","#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, no overlap",
2299  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2300  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2301  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2302  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap ) ;
2303 
2304 
2305  for(Int_t inlm = 0; inlm < 3; inlm++)
2306  {
2307  fhMCPi0PtRecoPtPrimLocMax[inlm] = new TH2F
2308  (Form("hMCPi0PtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2309  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2310  fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2311  fhMCPi0PtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2312  outputContainer->Add(fhMCPi0PtRecoPtPrimLocMax[inlm] ) ;
2313 
2315  (Form("hMCPi0SelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2316  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2317  fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2318  fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2319  outputContainer->Add(fhMCPi0SelectedPtRecoPtPrimLocMax[inlm] ) ;
2320 
2322  (Form("hMCPi0SplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2323  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2324  fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2325  fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2326  outputContainer->Add(fhMCPi0SplitPtRecoPtPrimLocMax[inlm] ) ;
2327 
2329  (Form("hMCPi0SelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2330  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2331  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2332  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2333  outputContainer->Add(fhMCPi0SelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2334 
2335  fhMCEtaPtRecoPtPrimLocMax[inlm] = new TH2F
2336  (Form("hMCEtaPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2337  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2338  fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2339  fhMCEtaPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2340  outputContainer->Add(fhMCEtaPtRecoPtPrimLocMax[inlm] ) ;
2341 
2343  (Form("hMCEtaSelectedPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2344  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2345  fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2346  fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2347  outputContainer->Add(fhMCEtaSelectedPtRecoPtPrimLocMax[inlm] ) ;
2348 
2350  (Form("hMCEtaSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2351  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2352  fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2353  fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2354  outputContainer->Add(fhMCEtaSplitPtRecoPtPrimLocMax[inlm] ) ;
2355 
2357  (Form("hMCEtaSelectedSplitPtRecoPtPrimLocMax%d",inlm+1),Form("#it{p}_{T,reco} (split sum) vs #it{p}_{T,gen}, %s",nlm[inlm].Data()),
2358  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2359  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetYTitle("#it{p}_{T,gen} (GeV/#it{c})");
2360  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ->SetXTitle("#it{p}_{T,reco} (GeV/#it{c})");
2361  outputContainer->Add(fhMCEtaSelectedSplitPtRecoPtPrimLocMax[inlm] ) ;
2362  }
2363 
2364  for(Int_t i = 0; i < fgkNmcTypes; i++)
2365  {
2366  fhMCPtAsymmetry[i] = new TH2F (Form("hEAsymmetry_MC%s",pname[i].Data()),
2367  Form("cluster from %s : #it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ) vs #it{E}",ptype[i].Data()),
2368  nptbins,ptmin,ptmax, 200,-1,1);
2369  fhMCPtAsymmetry[i]->SetXTitle("#it{E} (GeV)");
2370  fhMCPtAsymmetry[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2371  outputContainer->Add(fhMCPtAsymmetry[i]);
2372 
2373  fhMCSplitE[i] = new TH1F
2374  (Form("hSplitE_MC%s",pname[i].Data()),
2375  Form("cluster from %s, energy sum of split sub-clusters",ptype[i].Data()),
2376  nptbins,ptmin,ptmax);
2377  fhMCSplitE[i]->SetYTitle("counts");
2378  fhMCSplitE[i]->SetXTitle("#it{E} (GeV)");
2379  outputContainer->Add(fhMCSplitE[i]) ;
2380 
2381  fhMCSplitPt[i] = new TH1F
2382  (Form("hSplitPt_MC%s",pname[i].Data()),
2383  Form("cluster from %s, #it{p}_{T} sum of split sub-clusters",ptype[i].Data()),
2384  nptbins,ptmin,ptmax);
2385  fhMCSplitPt[i]->SetYTitle("counts");
2386  fhMCSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2387  outputContainer->Add(fhMCSplitPt[i]) ;
2388 
2389 
2390  fhMCSplitPtPhi[i] = new TH2F
2391  (Form("hSplitPtPhi_MC%s",pname[i].Data()),
2392  Form("Identified as #pi^{0} (#eta), cluster from %s",ptype[i].Data()),
2393  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2394  fhMCSplitPtPhi[i]->SetYTitle("#varphi");
2395  fhMCSplitPtPhi[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2396  outputContainer->Add(fhMCSplitPtPhi[i]) ;
2397 
2398  fhMCSplitPtEta[i] = new TH2F
2399  (Form("hSplitPtEta_MC%s",pname[i].Data()),
2400  Form("Identified as #pi^{0} (#eta), cluster from %s",
2401  ptype[i].Data()),nptbins,ptmin,ptmax,netabins,etamin,etamax);
2402  fhMCSplitPtEta[i]->SetYTitle("#eta");
2403  fhMCSplitPtEta[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2404  outputContainer->Add(fhMCSplitPtEta[i]) ;
2405 
2406 
2407  fhMCNLocMaxSplitPt[i] = new TH2F
2408  (Form("hNLocMaxSplitPt_MC%s",pname[i].Data()),
2409  Form("cluster from %s, #it{p}_{T} sum of split sub-clusters, for NLM",ptype[i].Data()),
2410  nptbins,ptmin,ptmax,20,0,20);
2411  fhMCNLocMaxSplitPt[i] ->SetYTitle("#it{NLM}");
2412  fhMCNLocMaxSplitPt[i] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2413  outputContainer->Add(fhMCNLocMaxSplitPt[i]) ;
2414 
2415  fhMCMassSplitPt[i] = new TH2F
2416  (Form("hMassSplitPt_MC%s",pname[i].Data()),
2417  Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
2418  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2419  fhMCMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2420  fhMCMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2421  outputContainer->Add(fhMCMassSplitPt[i]) ;
2422 
2423  fhMCSelectedMassSplitPt[i] = new TH2F
2424  (Form("hSelectedMassSplitPt_MC%s",pname[i].Data()),
2425  Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s",ptype[i].Data()),
2426  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2427  fhMCSelectedMassSplitPt[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2428  fhMCSelectedMassSplitPt[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2429  outputContainer->Add(fhMCSelectedMassSplitPt[i]) ;
2430 
2432  (Form("hMassSplitPtNoOverlap_MC%s",pname[i].Data()),
2433  Form("all pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
2434  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2435  fhMCMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2436  fhMCMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2437  outputContainer->Add(fhMCMassSplitPtNoOverlap[i]) ;
2438 
2440  (Form("hSelectedMassSplitPtNoOverlap_MC%s",pname[i].Data()),
2441  Form("Selected #pi^{0} (#eta) pairs #it{M}: split #it{p}_{T} vs #it{M} from %s, no overlap",ptype[i].Data()),
2442  nptbins,ptmin,ptmax, nmassbins,massmin,massmax);
2443  fhMCSelectedMassSplitPtNoOverlap[i]->SetYTitle("#it{M} (GeV/#it{c}^{2})");
2444  fhMCSelectedMassSplitPtNoOverlap[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2445  outputContainer->Add(fhMCSelectedMassSplitPtNoOverlap[i]) ;
2446  }
2447  }
2448  }
2449 
2451  {
2452  for(Int_t i = 0; i< 3; i++)
2453  {
2454  fhPtAsymmetryLocMax[i] = new TH2F(Form("hEAsymmetryLocMax%d",i+1),
2455  Form("Selected #pi^{0} (#eta) pairs: #it{p}_{T} vs #it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} ), %s",nlm[i].Data()),
2456  nptbins,ptmin,ptmax,200, -1,1);
2457  fhPtAsymmetryLocMax[i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2458  fhPtAsymmetryLocMax[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2459  outputContainer->Add(fhPtAsymmetryLocMax[i]) ;
2460  }
2461 
2462  for(Int_t ie = 0; ie < 7; ie++)
2463  {
2464 
2465  fhAsymmetryLambda0[ie] = new TH2F (Form("hAsymmetryLambda0_EBin%d",ie),
2466  Form("#lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2467  ssbins,ssmin,ssmax , 200,-1,1);
2468  fhAsymmetryLambda0[ie]->SetXTitle("#lambda_{0}^{2}");
2469  fhAsymmetryLambda0[ie]->SetYTitle("A = ( E1 - E2 ) / ( E1 + E2 )");
2470  outputContainer->Add(fhAsymmetryLambda0[ie]);
2471 
2472  fhAsymmetryDispEta[ie] = new TH2F (Form("hAsymmetryDispEta_EBin%d",ie),
2473  Form("#sigma^{2}_{#eta #eta} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2474  ssbins,ssmin,ssmax , 200,-1,1);
2475  fhAsymmetryDispEta[ie]->SetXTitle("#sigma^{2}_{#eta #eta}");
2476  fhAsymmetryDispEta[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2477  outputContainer->Add(fhAsymmetryDispEta[ie]);
2478 
2479  fhAsymmetryDispPhi[ie] = new TH2F (Form("hAsymmetryDispPhi_EBin%d",ie),
2480  Form("#sigma^{2}_{#varphi #varphi} vs #it{A} for %d < #it{E} < %d GeV",bin[ie],bin[ie+1]),
2481  ssbins,ssmin,ssmax , 200,-1,1);
2482  fhAsymmetryDispPhi[ie]->SetXTitle("#sigma^{2}_{#varphi #varphi}");
2483  fhAsymmetryDispPhi[ie]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2484  outputContainer->Add(fhAsymmetryDispPhi[ie]);
2485  }
2486 
2487 
2488  if(IsDataMC())
2489  {
2490  for(Int_t i = 0; i < fgkNmcTypes; i++)
2491  {
2492  for(Int_t ie = 0; ie < 7; ie++)
2493  {
2494  fhMCAsymmetryLambda0[ie][i] = new TH2F (Form("hMCAsymmetryLambda0_EBin%d_MC%s",ie,pname[i].Data()),
2495  Form("cluster from %s : #lambda_{0}^{2} vs A for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2496  ssbins,ssmin,ssmax , 200,-1,1);
2497  fhMCAsymmetryLambda0[ie][i]->SetXTitle("#lambda_{0}^{2}");
2498  fhMCAsymmetryLambda0[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2499  outputContainer->Add(fhMCAsymmetryLambda0[ie][i]);
2500 
2501  fhMCAsymmetryDispEta[ie][i] = new TH2F (Form("hMCAsymmetryDispEta_EBin%d_MC%s",ie,pname[i].Data()),
2502  Form("cluster from %s : #sigma^{2}_{#eta #eta} vs #it{A} for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2503  ssbins,ssmin,ssmax , 200,-1,1);
2504  fhMCAsymmetryDispEta[ie][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
2505  fhMCAsymmetryDispEta[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2506  outputContainer->Add(fhMCAsymmetryDispEta[ie][i]);
2507 
2508  fhMCAsymmetryDispPhi[ie][i] = new TH2F (Form("hMCAsymmetryDispPhi_EBin%d_MC%s",ie,pname[i].Data()),
2509  Form("cluster from %s : #sigma^{2}_{#varphi #varphi} vs #it{A} for %d < #it{E} < %d GeV",ptype[i].Data(),bin[ie],bin[ie+1]),
2510  ssbins,ssmin,ssmax , 200,-1,1);
2511  fhMCAsymmetryDispPhi[ie][i]->SetXTitle("#sigma^{2}_{#varphi #varphi}");
2512  fhMCAsymmetryDispPhi[ie][i]->SetYTitle("#it{A} = ( #it{E}_{1} - #it{E}_{2} ) / ( #it{E}_{1} + #it{E}_{2} )");
2513  outputContainer->Add(fhMCAsymmetryDispPhi[ie][i]);
2514  }
2515  }
2516  }
2517  }
2518 
2519  if(IsPileUpAnalysisOn())
2520  {
2521 
2522  TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
2523 
2524  for(Int_t i = 0 ; i < 7 ; i++)
2525  {
2526  fhPtPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()),
2527  Form("Selected #pi^{0} (#eta) #it{p}_{T} distribution, %s Pile-Up event",pileUpName[i].Data()), nptbins,ptmin,ptmax);
2528  fhPtPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2529  outputContainer->Add(fhPtPileUp[i]);
2530 
2531  fhPtCellTimePileUp[i] = new TH2F(Form("hPtCellTimePileUp%s",pileUpName[i].Data()),
2532  Form("Pt vs cell time in cluster, %s Pile-Up event",pileUpName[i].Data()),
2533  nptbins,ptmin,ptmax,ntimptbins,timemin,timemax);
2534  fhPtCellTimePileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2535  fhPtCellTimePileUp[i]->SetYTitle("#it{t}_{cell} (ns)");
2536  outputContainer->Add(fhPtCellTimePileUp[i]);
2537 
2538  fhPtTimeDiffPileUp[i] = new TH2F(Form("hPtTimeDiffPileUp%s",pileUpName[i].Data()),
2539  Form("Pt vs t_{max}-t_{cell} in cluster, %s Pile-Up event",pileUpName[i].Data()),
2540  nptbins,ptmin,ptmax,400,-200,200);
2541  fhPtTimeDiffPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2542  fhPtTimeDiffPileUp[i]->SetYTitle("#it{t}_{max}-#it{t}_{cell} (ns)");
2543  outputContainer->Add(fhPtTimeDiffPileUp[i]);
2544  }
2545 
2546  fhTimePtNoCut = new TH2F ("hTimePt_NoCut","#it{t} of cluster vs #it{E} of clusters, no cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2547  fhTimePtNoCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2548  fhTimePtNoCut->SetYTitle("#it{t} (ns)");
2549  outputContainer->Add(fhTimePtNoCut);
2550 
2551  fhTimePtSPD = new TH2F ("hTimePt_SPD","#it{t} of cluster vs #it{E} of clusters, SPD cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2552  fhTimePtSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2553  fhTimePtSPD->SetYTitle("#it{t} (ns)");
2554  outputContainer->Add(fhTimePtSPD);
2555 
2556  fhTimePtSPDMulti = new TH2F ("hTimePt_SPDMulti","time of cluster vs #it{E} of clusters, SPD multi cut", nptbins,ptmin,ptmax, ntimptbins,timemin,timemax);
2557  fhTimePtSPDMulti->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2558  fhTimePtSPDMulti->SetYTitle("#it{t} (ns)");
2559  outputContainer->Add(fhTimePtSPDMulti);
2560 
2561  fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","#it{t} of cluster vs #it{N} pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2562  fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
2563  fhTimeNPileUpVertSPD->SetXTitle("#it{t} (ns)");
2564  outputContainer->Add(fhTimeNPileUpVertSPD);
2565 
2566  fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","#it{t} of cluster vs #it{N} pile-up Tracks vertex", ntimptbins,timemin,timemax, 50,0,50 );
2567  fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
2568  fhTimeNPileUpVertTrack->SetXTitle("#it{t} (ns)");
2569  outputContainer->Add(fhTimeNPileUpVertTrack);
2570 
2571  fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","#it{t} of cluster vs #it{N} constributors to pile-up SPD vertex", ntimptbins,timemin,timemax,50,0,50);
2572  fhTimeNPileUpVertContributors->SetYTitle("# vertex ");
2573  fhTimeNPileUpVertContributors->SetXTitle("#it{t} (ns)");
2574  outputContainer->Add(fhTimeNPileUpVertContributors);
2575 
2576  fhTimePileUpMainVertexZDistance = new TH2F ("hTime_PileUpMainVertexZDistance","#it{t} of cluster vs distance in #it{Z} pile-up SPD vertex - main SPD vertex",ntimptbins,timemin,timemax,100,0,50);
2577  fhTimePileUpMainVertexZDistance->SetYTitle("distance #it{Z} (cm) ");
2578  fhTimePileUpMainVertexZDistance->SetXTitle("#it{t} (ns)");
2579  outputContainer->Add(fhTimePileUpMainVertexZDistance);
2580 
2581  fhTimePileUpMainVertexZDiamond = new TH2F ("hTime_PileUpMainVertexZDiamond","#it{t} of cluster vs distance in #it{Z} pile-up SPD vertex - z diamond",ntimptbins,timemin,timemax,100,0,50);
2582  fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance #it{Z} (cm) ");
2583  fhTimePileUpMainVertexZDiamond->SetXTitle("#it{t} (ns)");
2584  outputContainer->Add(fhTimePileUpMainVertexZDiamond);
2585 
2586  fhPtNPileUpSPDVtx = new TH2F ("hPt_NPileUpVertSPD","#it{p}_{T} of cluster vs #it{N} pile-up SPD vertex",
2587  nptbins,ptmin,ptmax,20,0,20);
2588  fhPtNPileUpSPDVtx->SetYTitle("# vertex ");
2589  fhPtNPileUpSPDVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2590  outputContainer->Add(fhPtNPileUpSPDVtx);
2591 
2592  fhPtNPileUpTrkVtx = new TH2F ("hPt_NPileUpVertTracks","#it{p}_{T} of cluster vs #it{N} pile-up Tracks vertex",
2593  nptbins,ptmin,ptmax, 20,0,20 );
2594  fhPtNPileUpTrkVtx->SetYTitle("# vertex ");
2595  fhPtNPileUpTrkVtx->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2596  outputContainer->Add(fhPtNPileUpTrkVtx);
2597 
2598  fhPtNPileUpSPDVtxTimeCut = new TH2F ("hPt_NPileUpVertSPD_TimeCut","#it{p}_{T} of cluster vs N pile-up SPD vertex, |tof| < 25 ns",
2599  nptbins,ptmin,ptmax,20,0,20);
2600  fhPtNPileUpSPDVtxTimeCut->SetYTitle("# vertex ");
2601  fhPtNPileUpSPDVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2602  outputContainer->Add(fhPtNPileUpSPDVtxTimeCut);
2603 
2604  fhPtNPileUpTrkVtxTimeCut = new TH2F ("hPt_NPileUpVertTracks_TimeCut","#it{p}_{T} of cluster vs N pile-up Tracks vertex, |tof| < 25 ns",
2605  nptbins,ptmin,ptmax, 20,0,20 );
2606  fhPtNPileUpTrkVtxTimeCut->SetYTitle("# vertex ");
2607  fhPtNPileUpTrkVtxTimeCut->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2608  outputContainer->Add(fhPtNPileUpTrkVtxTimeCut);
2609 
2610  fhPtNPileUpSPDVtxTimeCut2 = new TH2F ("hPt_NPileUpVertSPD_TimeCut2","#it{p}_{T} of cluster vs N pile-up SPD vertex, -25 < tof < 75 ns",
2611  nptbins,ptmin,ptmax,20,0,20);
2612  fhPtNPileUpSPDVtxTimeCut2->SetYTitle("# vertex ");
2613  fhPtNPileUpSPDVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2614  outputContainer->Add(fhPtNPileUpSPDVtxTimeCut2);
2615 
2616  fhPtNPileUpTrkVtxTimeCut2 = new TH2F ("hPt_NPileUpVertTracks_TimeCut2","#it{p}_{T} of cluster vs N pile-up Tracks vertex, -25 < tof < 75 ns",
2617  nptbins,ptmin,ptmax, 20,0,20 );
2618  fhPtNPileUpTrkVtxTimeCut2->SetYTitle("# vertex ");
2619  fhPtNPileUpTrkVtxTimeCut2->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2620  outputContainer->Add(fhPtNPileUpTrkVtxTimeCut2);
2621 
2622  }
2623 
2624  // Keep neutral meson selection histograms if requiered
2625  // Setting done in AliNeutralMesonSelection
2626 
2628  {
2630 
2631  if(GetNeutralMesonSelection()->AreNeutralMesonSelectionHistosKept())
2632  for(Int_t i = 0; i < nmsHistos->GetEntries(); i++) outputContainer->Add(nmsHistos->At(i)) ;
2633 
2634  delete nmsHistos;
2635  }
2636 
2637  return outputContainer ;
2638 }
2639 
2640 //_____________________________________________
2643 //_____________________________________________
2645 {
2646  if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) )
2647  {
2648  return kmcPi0 ;
2649  }//pi0
2650  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) )
2651  {
2652  return kmcEta ;
2653  }//eta
2654  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPrompt) ||
2656  GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCISR))
2657  {
2658  return kmcPhoton ;
2659  }//direct photon
2660  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2662  {
2663  return kmcPi0Decay ;
2664  }//decay photon from pi0
2665  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) &&
2667  {
2668  return kmcEtaDecay ;
2669  }//decay photon from eta
2670  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) )
2671  {
2672  return kmcOtherDecay ;
2673  }//decay photon from other than eta or pi0
2674  else if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron))
2675  {
2676  return kmcElectron ;
2677  }//electron
2678  else
2679  {
2680  return kmcHadron ;
2681  }//other particles
2682 }
2683 
2684 //__________________________________________________________________
2687 //__________________________________________________________________
2689  Int_t tag1 , Int_t tag2,
2690  Int_t & label, Int_t & tag)
2691 {
2692  if(label1 < 0 || label2 < 0 || label1 == label2) return ;
2693 
2694  AliDebug(0,Form("Origin of: photon1 %d; photon2 %d",tag1, tag2));
2695 
2696  if( (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCPi0Decay) &&
2697  GetMCAnalysisUtils()->CheckTagBit(tag2,AliMCAnalysisUtils::kMCPi0Decay) ) ||
2698  (GetMCAnalysisUtils()->CheckTagBit(tag1,AliMCAnalysisUtils::kMCEtaDecay) &&
2700  )
2701  {
2702  Int_t pdg1 = -1;//, pdg2 = -1;
2703  Int_t ndaugh1 = -1, ndaugh2 = -1;
2704  //Check if pi0/eta mother is the same
2705  if ( label1 >= 0 )
2706  {
2707  AliVParticle * mother1 = GetMC()->GetTrack(label1);//photon in kine tree
2708  label1 = mother1->GetMother();
2709  mother1 = GetMC()->GetTrack(label1);//pi0
2710  pdg1 = mother1->PdgCode();
2711  ndaugh1 = mother1->GetNDaughters();
2712  }
2713 
2714  if ( label2 >= 0 )
2715  {
2716  AliVParticle * mother2 = GetMC()->GetTrack(label2);//photon in kine tree
2717  label2 = mother2->GetMother();
2718  mother2 = GetMC()->GetTrack(label2);//pi0
2719  //pdg2 = mother2->PdgCode();
2720  ndaugh2 = mother2->GetNDaughters();
2721  }
2722 
2723 // printf("mother1 %d, mother2 %d\n",label1,label2);
2724  if ( label1 == label2 && label1 >= 0 && ndaugh1 == ndaugh2 && ndaugh1 == 2 )
2725  {
2726  label = label1;
2727 
2728  Double_t angle = fMomentum2.Angle(fMomentum1.Vect());
2730  Double_t epair = (fMomentum1+fMomentum2).E();
2731 
2732  if ( pdg1 == 111 )
2733  {
2734  fhMassPairMCPi0 ->Fill(epair, mass , GetEventWeight());
2735  fhAnglePairMCPi0->Fill(epair, angle, GetEventWeight());
2736 
2738 
2739 // printf("Real pi0 pair: pt %f, mass %f\n",(fMomentum1+fMomentum2).Pt(),mass);
2740 // printf(" Lab1 %d (%d), lab2 %d (%d), pdg1 %d, pdg2 %d, Is In calo %d, %d, Is lost %d, %d\n",
2741 // label1,photon1->GetLabel(),label2,photon2->GetLabel(), pdg1, pdg2,
2742 // GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairInCalo),
2743 // GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairInCalo),
2744 // GetMCAnalysisUtils()->CheckTagBit(photon1->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost),
2745 // GetMCAnalysisUtils()->CheckTagBit(photon2->GetTag(),AliMCAnalysisUtils::kMCDecayPairLost));
2746  }
2747  else if ( pdg1 == 221 )
2748  {
2749  fhMassPairMCEta ->Fill(epair, mass , GetEventWeight());
2750  fhAnglePairMCEta->Fill(epair, angle, GetEventWeight());
2751 
2753 
2754 // printf("Real eta pair\n");
2755  }
2756 
2757  } // same label
2758  } // both from eta or pi0 decay
2759 }
2760 
2761 //_______________________
2764 //_______________________
2766 {
2767  if ( GetCalorimeter() == kPHOS && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD() )
2768  AliFatal("STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!");
2769  else if ( GetCalorimeter() == kEMCAL && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD() )
2770  AliFatal("STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!");
2771 }
2772 
2773 //_________________________________
2775 //_________________________________
2777 {
2778  AddToHistogramsName("AnaPi0EbE_");
2779 
2780  fInputAODGammaConvName = "PhotonsCTS" ;
2781  fAnaType = kIMCalo ;
2782  fMinDist = 2.;
2783  fMinDist2 = 4.;
2784  fMinDist3 = 5.;
2785 
2786  fNLMECutMin[0] = 10.;
2787  fNLMECutMin[1] = 6. ;
2788  fNLMECutMin[2] = 6. ;
2789 
2790  fIsoCandMinPt = 8;
2791  fR = 0.4;
2792 
2793  fM02MinCutForIM = -1 ;
2794  fM02MaxCutForIM = -1 ;
2795 }
2796 
2797 //_______________________________________
2800 //_______________________________________
2802 {
2803  AliDebug(1,Form("Start analysis type %d",fAnaType));
2804 
2805  switch(fAnaType)
2806  {
2807  case kIMCalo:
2809  break;
2810 
2811  case kSSCalo:
2813  break;
2814 
2815  case kIMCaloTracks:
2817  break;
2818  }
2819 
2820  AliDebug(1,"End");
2821 }
2822 
2823 //____________________________________________
2829 //____________________________________________
2831 {
2832  if(!GetInputAODBranch())
2833  {
2834  AliFatal(Form("No input calo photons in AOD with name branch < %s >, STOP",GetInputAODName().Data()));
2835  return; // coverity
2836  }
2837 
2838  // Create obj array of clusters in case it is requested
2839  TObjArray *clusters = 0;
2841  GetReader()->GetDataType()!=AliCaloTrackReader::kMC )
2842  {
2843  if (GetCalorimeter()==kEMCAL) clusters = GetEMCALClusters();
2844  else if(GetCalorimeter()==kPHOS) clusters = GetPHOSClusters() ;
2845  }
2846 
2847  AliVCluster *cluster1 = 0;
2848  AliVCluster *cluster2 = 0;
2849 
2850  Int_t nphoton = GetInputAODBranch()->GetEntriesFast();
2851  for( Int_t iphoton = 0; iphoton < nphoton-1; iphoton++ )
2852  {
2853  AliAODPWG4Particle * photon1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
2854 
2855  // Vertex cut in case of mixed events
2856  // Not really in use or tested recently, remove ...
2857  Int_t evtIndex1 = 0 ;
2858  if(GetMixedEvent())
2859  {
2860  evtIndex1 = GetMixedEvent()->EventIndexForCaloCluster(photon1->GetCaloLabel(0)) ;
2861  if(TMath::Abs(GetVertex(evtIndex1)[2]) > GetZvertexCut()) continue ; //vertex cut
2862  }
2863 
2864  // Get original cluster if requested
2865  Int_t iclus = -1;
2866  if( ( fFillSelectClHisto || IsPileUpAnalysisOn() ) &&
2868  {
2869  cluster1 = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
2870 
2871  if(!cluster1) AliWarning("First cluster not found");
2872  }
2873 
2874  // Get kinematics and other parameters
2875  fMomentum1 = *(photon1->Momentum());
2876 
2877  Float_t e1 = photon1->E();
2878  Float_t tof1 = photon1->GetTime();
2879  Int_t nMaxima1 = photon1->GetNLM();
2880  Int_t lab1 = photon1->GetLabel();
2881  Int_t tag1 = photon1->GetTag();
2882  Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
2883 
2884  for( Int_t jphoton = iphoton+1; jphoton < nphoton; jphoton++ )
2885  {
2886  AliAODPWG4Particle * photon2 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(jphoton));
2887 
2888  // Do analysis only when one of the decays is isolated
2889  // Run AliAnaParticleIsolation before
2891  {
2892  Bool_t isolated2 = ((AliAODPWG4ParticleCorrelation*) photon2)->IsIsolated();
2893  if(!isolated1 && !isolated2) continue;
2894  }
2895 
2896  // Vertex cut in case of mixed events
2897  // Not really in use or tested recently, remove ...
2898  Int_t evtIndex2 = 0 ;
2899  if(GetMixedEvent())
2900  {
2901  evtIndex2 = GetMixedEvent()->EventIndexForCaloCluster(photon2->GetCaloLabel(0)) ;
2902 
2903  if(evtIndex1 == evtIndex2)
2904  continue ;
2905 
2906  if(TMath::Abs(GetVertex(evtIndex2)[2]) > GetZvertexCut()) continue ; //vertex cut
2907  }
2908 
2909  // Get kinematics and other parameters
2910  fMomentum2 = *(photon2->Momentum());
2911 
2912  Float_t e2 = photon2->E();
2913  Float_t tof2 = photon2->GetTime();
2914  Int_t nMaxima2 = photon2->GetNLM();
2915 
2916  //
2917  // Skip pairs of EMCal and DCal clusters
2918  Double_t angleOp = fMomentum1.Angle(fMomentum2.Vect());
2919 
2920  if(angleOp > DegToRad(100.)) continue;
2921 
2922  //
2923  // Select clusters with good time window difference
2924  Double_t t12diff = tof1-tof2;
2925 
2926  fhEPairDiffTime->Fill(e1+e2, t12diff, GetEventWeight());
2927 
2928  if(TMath::Abs(t12diff) > GetPairTimeCut()) continue;
2929 
2930  //
2931  // Play with the MC stack if available
2932  //
2933  Int_t mcIndex = kmcHadron;
2934  Int_t tag = 0;
2935  Int_t label =-1;
2936  if( IsDataMC() )
2937  {
2938  HasPairSameMCMother(lab1, photon2->GetLabel(),
2939  tag1, photon2->GetTag(),
2940  label, tag) ;
2941  mcIndex = GetMCIndex(tag);
2942  }
2943 
2944  // Check the invariant mass for different selection on the local maxima
2945 
2947 
2948  Double_t mass = fMomentum.M();
2949  Double_t epair = fMomentum.E();
2950  Float_t ptpair = fMomentum.Pt();
2951 
2952  //
2953  // NLM dependent histograms
2954  //
2956  {
2957  if(nMaxima1==nMaxima2)
2958  {
2959  if (nMaxima1==1) fhMassPairLocMax[0]->Fill(epair, mass, GetEventWeight());
2960  else if(nMaxima1==2) fhMassPairLocMax[1]->Fill(epair, mass, GetEventWeight());
2961  else fhMassPairLocMax[2]->Fill(epair, mass, GetEventWeight());
2962  }
2963  else if(nMaxima1==1 || nMaxima2==1)
2964  {
2965  if (nMaxima1==2 || nMaxima2==2) fhMassPairLocMax[3]->Fill(epair, mass, GetEventWeight());
2966  else fhMassPairLocMax[4]->Fill(epair, mass, GetEventWeight());
2967  }
2968  else
2969  fhMassPairLocMax[5]->Fill(epair, mass, GetEventWeight());
2970 
2971  // Combinations with SS axis cut and NLM cut
2972  if(nMaxima1 == 1 && photon2->GetM02() > 0.3)
2973  fhMassPairLocMax[6]->Fill(epair, mass, GetEventWeight());
2974 
2975  if(nMaxima2 == 1 && photon1->GetM02() > 0.3)
2976  fhMassPairLocMax[6]->Fill(epair, mass, GetEventWeight());
2977 
2978  if(nMaxima1 > 1 && photon2->GetM02() < 0.3 && photon2->GetM02() > 0.1 )
2979  fhMassPairLocMax[7]->Fill(epair, mass, GetEventWeight());
2980 
2981  if(nMaxima2 > 1 && photon1->GetM02() < 0.3 && photon1->GetM02() > 0.1 )
2982  fhMassPairLocMax[7]->Fill(epair, mass, GetEventWeight());
2983  }
2984 
2985  //
2986  // Skip pairs with too few or too many NLM
2987  //
2988  if((nMaxima1 < fNLMCutMin || nMaxima1 > fNLMCutMax) || (nMaxima2 < fNLMCutMin || nMaxima2 > fNLMCutMax))
2989  {
2990  AliDebug(1,Form("NLM out of range: cluster1 %d, cluster2 %d",nMaxima1, nMaxima2));
2991  continue ;
2992  }
2993 
2994  //
2995  // Skip pairs with too large/small SS
2996  //
2997  if(fM02MaxCutForIM > 0 && fM02MinCutForIM > 0) // 0.1 < M02 < 0.35
2998  {
2999  Float_t m02Ph1 = photon1->GetM02();
3000  Float_t m02Ph2 = photon2->GetM02();
3001 
3002  if(m02Ph1 > fM02MaxCutForIM || m02Ph1 < fM02MinCutForIM) continue ;
3003  if(m02Ph2 > fM02MaxCutForIM || m02Ph2 < fM02MinCutForIM) continue ;
3004  }
3005 
3006  //
3007  // Mass of all pairs before selection
3008  //
3009  fhMass ->Fill( epair, mass, GetEventWeight());
3010  fhMassPt->Fill(ptpair, mass, GetEventWeight());
3011 
3012  if(photon1->Pt() >= photon2->Pt())
3013  {
3014  fhMassPtMaxPair->Fill(photon1->Pt(), mass, GetEventWeight());
3015  fhMassPtMinPair->Fill(photon2->Pt(), mass, GetEventWeight());
3016  }
3017  else
3018  {
3019  fhMassPtMaxPair->Fill(photon2->Pt(), mass, GetEventWeight());
3020  fhMassPtMinPair->Fill(photon1->Pt(), mass, GetEventWeight());
3021  }
3022 
3023  if(IsDataMC() && mcIndex < 2) fhMCMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3024 
3026  {
3027  Double_t radius = GetIsolationCut()->Radius(fMomentum1.Eta(),fMomentum1.Phi(),fMomentum2.Eta(),fMomentum2.Phi());
3028 
3029  if(radius < fR) fhMassPtIsoRCut->Fill(ptpair, mass, GetEventWeight());
3030 
3031 // printf("pT pair (%f, %f), opening angle %f, radius %f; fR %1.1f, MinPt1 %2.2f\n",fMomentum1.Pt(),fMomentum2.Pt(),angleOp,radius,fR,fIsoCandMinPt);
3032  }
3033 
3034  //
3035  // Select good pair (good phi, pt cuts, aperture and invariant mass)
3036  //
3037  if(!GetNeutralMesonSelection()->SelectPair(fMomentum1, fMomentum2,GetCalorimeter())) continue;
3038 
3039  AliDebug(1,Form("Selected gamma pair: pt %f, phi %f, eta%f",
3040  fMomentum.Pt(), fMomentum.Phi()*TMath::RadToDeg(), fMomentum.Eta()));
3041 
3042  //
3043  // Tag both photons as decay if not done before
3044  // set the corresponding bit for pi0 or eta or "side" case
3045  //
3046  Int_t bit1 = photon1->DecayTag();
3047  if( bit1 < 0 ) bit1 = 0 ;
3048  if( !GetNeutralMesonSelection()->CheckDecayBit(bit1) )
3049  {
3050  AliDebug(1,Form("pT1 %2.2f; bit requested %d; decay bit1: In %d",fMomentum1.Pt(), GetNeutralMesonSelection()->GetDecayBit(), bit1));
3051 
3053  photon1->SetDecayTag(bit1);
3054 
3055  AliDebug(1,Form("\t Out %d", bit1));
3056 
3057  fhPtDecay->Fill(photon1->Pt(), GetEventWeight());
3058 
3059  //
3060  // Fill some histograms about shower shape
3061  //
3063  {
3064  FillSelectedClusterHistograms(cluster1, fMomentum1.Pt(), nMaxima1, photon1->GetTag());
3065  }
3066 
3067  //
3068  // MC origin, lost pair
3069  //
3070  if(IsDataMC())
3071  {
3072  Int_t mcIndex1 = GetMCIndex(photon1->GetTag());
3073  fhMCPtDecay[mcIndex1]->Fill(photon1->Pt(), GetEventWeight());
3074 
3076  {
3077  if ( mcIndex1 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon1->Pt(), GetEventWeight());
3078  else if( mcIndex1 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon1->Pt(), GetEventWeight());
3079  }
3080  }
3081  }
3082 
3083  //
3084  // Histogram for cluster2 tagged as decay
3085  //
3086  Int_t bit2 = photon2->DecayTag();
3087  if( bit2 < 0 ) bit2 = 0 ;
3088  if( !GetNeutralMesonSelection()->CheckDecayBit(bit2) )
3089  {
3090  AliDebug(1,Form("pT2 %2.2f; bit requested %d; decay bit2: In %d",fMomentum2.Pt(), GetNeutralMesonSelection()->GetDecayBit(), bit2));
3091 
3093  photon2->SetDecayTag(bit2);
3094 
3095  AliDebug(1,Form("\t Out %d", bit2));
3096 
3097  fhPtDecay->Fill(photon2->Pt(), GetEventWeight());
3098 
3099  // Fill some histograms about shower shape
3101  {
3102  // Get original cluster, to recover some information
3103 
3104  Int_t iclus2 = -1;
3105  cluster2 = FindCluster(clusters,photon2->GetCaloLabel(0),iclus2,iclus+1);
3106  // start new loop from iclus1+1 to gain some time
3107 
3108  if(!cluster2) AliWarning("Second cluster not found");
3109  else FillSelectedClusterHistograms(cluster2, fMomentum2.Pt(), nMaxima2, photon2->GetTag());
3110  }
3111 
3112  //
3113  // MC origin, lost pair
3114  //
3115  if(IsDataMC())
3116  {
3117  Int_t mcIndex2 = GetMCIndex(photon2->GetTag());
3118  fhMCPtDecay[mcIndex2]->Fill(photon2->Pt(), GetEventWeight());
3119 
3121  {
3122  if ( mcIndex2 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon2->Pt(), GetEventWeight());
3123  else if( mcIndex2 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon2->Pt(), GetEventWeight());
3124  }
3125  }
3126  }
3127 
3128  //
3129  // Mass of selected pairs
3130  //
3131  fhSelectedMass ->Fill( epair, mass, GetEventWeight());
3132  fhSelectedMassPt->Fill(ptpair, mass, GetEventWeight());
3133  if(IsDataMC() && mcIndex < 2) fhMCSelectedMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3134 
3135  // Fill histograms to undertand pile-up before other cuts applied
3136  // Remember to relax time cuts in the reader
3137  if(cluster1 && IsPileUpAnalysisOn()) FillPileUpHistograms(ptpair,( photon1->GetTime() + photon2->GetTime() ) / 2, cluster1);
3138 
3139  //
3140  // Create AOD for analysis
3141  //
3142  AliAODPWG4Particle pi0 = AliAODPWG4Particle(fMomentum);
3143 
3144  if ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
3145  else if( (GetNeutralMesonSelection()->GetParticle()).Contains("Eta") ) pi0.SetIdentifiedParticleType(AliCaloPID::kEta);
3146  else
3147  {
3148  AliWarning("Particle type declared in AliNeutralMeson not correct, do not add");
3149  return ;
3150  }
3151  pi0.SetDetectorTag(photon1->GetDetectorTag());
3152 
3153  // MC
3154  pi0.SetLabel(label);
3155  pi0.SetTag(tag);
3156 
3157  //Set the indeces of the original caloclusters
3158  pi0.SetCaloLabel(photon1->GetCaloLabel(0), photon2->GetCaloLabel(0));
3159  //pi0.SetInputFileIndex(input);
3160 
3161  AddAODParticle(pi0);
3162 
3163  }//2n photon loop
3164 
3165  }//1st photon loop
3166 
3167  AliDebug(1,"End fill AODs");
3168 }
3169 
3170 //__________________________________________________
3176 //__________________________________________________
3178 {
3179  // Check calorimeter input
3180  if(!GetInputAODBranch())
3181  {
3182  AliFatal(Form("No input calo photons in AOD branch with name < %s > , STOP",GetInputAODName().Data()));
3183  }
3184 
3185  // Get the array with conversion photons
3186  TClonesArray * inputAODGammaConv = (TClonesArray *) GetReader()->GetOutputEvent()->FindListObject(fInputAODGammaConvName);
3187  if(!inputAODGammaConv)
3188  {
3189  inputAODGammaConv = (TClonesArray *) GetReader()->GetInputEvent()->FindListObject(fInputAODGammaConvName);
3190 
3191  if(!inputAODGammaConv)
3192  {
3193  AliFatal(Form("No input gamma conversions in AOD branch with name < %s >",fInputAODGammaConvName.Data()));
3194  return; // coverity
3195  }
3196  }
3197 
3198  // Get shower shape information of clusters
3199  TObjArray *clusters = 0;
3201  {
3202  if (GetCalorimeter() == kEMCAL) clusters = GetEMCALClusters() ;
3203  else if(GetCalorimeter() == kPHOS ) clusters = GetPHOSClusters () ;
3204  }
3205 
3206  AliVCluster * cluster = 0;
3207 
3208  Int_t nCTS = inputAODGammaConv->GetEntriesFast();
3209  Int_t nCalo = GetInputAODBranch()->GetEntriesFast();
3210  if(nCTS<=0 || nCalo <=0)
3211  {
3212  AliDebug(1,Form("nCalo %d, nCTS %d, cannot loop",nCalo,nCTS));
3213  return;
3214  }
3215 
3216  AliDebug(1,Form("Number of conversion photons %d and number of clusters %d",nCTS,nCalo));
3217 
3218  // Do the loop, first calo, second CTS
3219  for(Int_t iphoton = 0; iphoton < GetInputAODBranch()->GetEntriesFast(); iphoton++)
3220  {
3221  AliAODPWG4Particle * photon1 = (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
3222  fMomentum1 = *(photon1->Momentum());
3223 
3224  // Do analysis only when one of the decays is isolated
3225  // Run AliAnaParticleIsolation before
3227  {
3228  Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
3229  if(!isolated1) continue;
3230  }
3231 
3232  // Get original cluster, to recover some information
3233  Int_t iclus = -1;
3235  {
3236  cluster = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
3237 
3238  if(!cluster) AliWarning("Cluster not found");
3239  }
3240 
3241  // Skip cluster with too large/small SS
3242  if(fM02MaxCutForIM > 0 && fM02MinCutForIM > 0) // 0.1 < M02 < 0.35
3243  {
3244  Float_t m02 = photon1->GetM02();
3245 
3246  if(m02 > fM02MaxCutForIM || m02 < fM02MinCutForIM) continue ;
3247  }
3248 
3249  for(Int_t jphoton = 0; jphoton < nCTS; jphoton++)
3250  {
3251  AliAODPWG4Particle * photon2 = (AliAODPWG4Particle*) (inputAODGammaConv->At(jphoton));
3252 
3253  Int_t evtIndex = 0;
3254  if(GetMixedEvent())
3255  {
3256  evtIndex = GetMixedEvent()->EventIndexForCaloCluster(photon2->GetCaloLabel(0)) ;
3257  if(TMath::Abs(GetVertex(evtIndex)[2]) > GetZvertexCut()) continue ; //vertex cut
3258  }
3259 
3260  fMomentum2 = *(photon2->Momentum());
3261 
3263 
3264  Double_t mass = fMomentum.M();
3265  Double_t epair = fMomentum.E();
3266  Float_t ptpair = fMomentum.Pt();
3267 
3268  Int_t nMaxima = photon1->GetNLM();
3270  {
3271  if (nMaxima==1) fhMassPairLocMax[0]->Fill(epair, mass, GetEventWeight());
3272  else if(nMaxima==2) fhMassPairLocMax[1]->Fill(epair, mass, GetEventWeight());
3273  else fhMassPairLocMax[2]->Fill(epair, mass, GetEventWeight());
3274  }
3275 
3276  if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax)
3277  {
3278  AliDebug(1,Form("NLM %d out of range",nMaxima));
3279  continue ;
3280  }
3281 
3282  // Play with the MC stack if available
3283  Int_t mcIndex = kmcHadron;
3284  Int_t tag = 0;
3285  Int_t label =-1;
3286  if(IsDataMC())
3287  {
3288  Int_t label2 = photon2->GetLabel();
3289  if ( label2 >= 0 ) photon2->SetTag(GetMCAnalysisUtils()->CheckOrigin(label2, GetMC()));
3290 
3291  HasPairSameMCMother(photon1->GetLabel(), photon2->GetLabel(),
3292  photon1->GetTag() , photon2->GetTag(),
3293  label, tag) ;
3294  mcIndex = GetMCIndex(tag);
3295  }
3296 
3297  // Mass of selected pairs
3298  fhMass ->Fill( epair, mass, GetEventWeight());
3299  fhMassPt->Fill(ptpair, mass, GetEventWeight());
3300 
3301  if(photon1->Pt() >= photon2->Pt())
3302  {
3303  fhMassPtMaxPair->Fill(photon1->Pt(), mass, GetEventWeight());
3304  fhMassPtMinPair->Fill(photon2->Pt(), mass, GetEventWeight());
3305  }
3306  else
3307  {
3308  fhMassPtMaxPair->Fill(photon2->Pt(), mass, GetEventWeight());
3309  fhMassPtMinPair->Fill(photon1->Pt(), mass, GetEventWeight());
3310  }
3311 
3312  if(IsDataMC() && mcIndex < 2 ) fhMCMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3313 
3314  //
3315  // Select good pair (good phi, pt cuts, aperture and invariant mass)
3316  //
3317  if(!GetNeutralMesonSelection()->SelectPair(fMomentum1, fMomentum2,GetCalorimeter())) continue ;
3318 
3319  AliDebug(1,Form("Selected gamma pair: pt %f, phi %f, eta%f",fMomentum.Pt(), fMomentum.Phi()*TMath::RadToDeg(), fMomentum.Eta()));
3320 
3321  //
3322  // Tag both photons as decay if not done before
3323  // set the corresponding bit for pi0 or eta or "side" case
3324  //
3325  Int_t bit1 = photon1->DecayTag();
3326  if( bit1 < 0 ) bit1 = 0 ;
3327  if( !GetNeutralMesonSelection()->CheckDecayBit(bit1) )
3328  {
3330  photon1->SetDecayTag(bit1);
3331 
3332  fhPtDecay->Fill(photon1->Pt(), GetEventWeight());
3333 
3334  // Fill some histograms about shower shape
3336  FillSelectedClusterHistograms(cluster, fMomentum1.Pt(), nMaxima, photon1->GetTag());
3337 
3338  if(IsDataMC())
3339  {
3340  Int_t mcIndex1 = GetMCIndex(photon1->GetTag());
3341  fhMCPtDecay[mcIndex1]->Fill(photon1->Pt(), GetEventWeight());
3342 
3344  {
3345  if ( mcIndex1 == kmcPi0Decay ) fhMCPtDecayLostPairPi0->Fill(photon1->Pt(), GetEventWeight());
3346  else if( mcIndex1 == kmcEtaDecay ) fhMCPtDecayLostPairEta->Fill(photon1->Pt(), GetEventWeight());
3347  }
3348  }
3349  }
3350 
3351  Int_t bit2 = photon2->DecayTag();
3352  if( bit2 < 0 ) bit2 = 0 ;
3353  if( !GetNeutralMesonSelection()->CheckDecayBit(bit2) )
3354  {
3356  photon2->SetDecayTag(bit2);
3357  }
3358 
3359  //
3360  // Mass of selected pairs
3361  //
3362  fhSelectedMass ->Fill( epair, mass, GetEventWeight());
3363  fhSelectedMassPt->Fill(ptpair, mass, GetEventWeight());
3364  if(IsDataMC() && mcIndex < 2) fhMCSelectedMassPt[mcIndex]->Fill(ptpair, mass, GetEventWeight());
3365 
3366  // Fill histograms to undertand pile-up before other cuts applied
3367  // Remember to relax time cuts in the reader
3368  if( cluster && IsPileUpAnalysisOn() ) FillPileUpHistograms(fMomentum.Pt(),photon1->GetTime(),cluster);
3369 
3370  //
3371  // Create AOD for analysis
3372  //
3373  AliAODPWG4Particle pi0 = AliAODPWG4Particle(fMomentum);
3374 
3375  if ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
3376  else if( (GetNeutralMesonSelection()->GetParticle()).Contains("Eta") ) pi0.SetIdentifiedParticleType(AliCaloPID::kEta);
3377  else
3378  {
3379  AliWarning("Particle type declared in AliNeutralMeson not correct, do not add");
3380  return ;
3381  }
3382 
3383  pi0.SetDetectorTag(photon1->GetDetectorTag());
3384 
3385  // MC
3386  pi0.SetLabel(label);
3387  pi0.SetTag(tag);
3388 
3389  // Set the indeces of the original tracks or caloclusters
3390  pi0.SetCaloLabel (photon1->GetCaloLabel(0) , -1);
3391  pi0.SetTrackLabel(photon2->GetTrackLabel(0), photon2->GetTrackLabel(1));
3392  //pi0.SetInputFileIndex(input);
3393 
3394  AddAODParticle(pi0);
3395 
3396  }//2n photon loop
3397 
3398  }//1st photon loop
3399 
3400  AliDebug(1,"End fill AODs");
3401 }
3402 
3403 //_________________________________________________
3415 //_________________________________________________
3417 {
3418  TObjArray * pl = 0x0;
3419  AliVCaloCells * cells = 0x0;
3420 
3421  // Select the Calorimeter of the photon
3422  if (GetCalorimeter() == kEMCAL )
3423  {
3424  pl = GetEMCALClusters();
3425  cells = GetEMCALCells();
3426  }
3427  else if (GetCalorimeter() == kPHOS)
3428  {
3429  AliFatal("kSSCalo case not implememted for PHOS");
3430  return; // for coverity
3431 
3432  //pl = GetPHOSClusters();
3433  //cells = GetPHOSCells();
3434  }
3435 
3436  if(!pl)
3437  {
3438  AliInfo(Form("TObjArray with %s clusters is NULL!",GetCalorimeterString().Data()));
3439  return;
3440  }
3441 
3442  for(Int_t icalo = 0; icalo < pl->GetEntriesFast(); icalo++)
3443  {
3444  AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
3445 
3446  Int_t evtIndex = 0 ;
3447  if (GetMixedEvent())
3448  {
3449  evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
3450  if(TMath::Abs(GetVertex(evtIndex)[2]) > GetZvertexCut()) continue ; //vertex cut
3451  }
3452 
3453  // Get Momentum vector,
3454  Double_t vertex[]={0,0,0};
3456  {
3457  calo->GetMomentum(fMomentum,GetVertex(evtIndex)) ;
3458  } // Assume that come from vertex in straight line
3459  else
3460  {
3461  calo->GetMomentum(fMomentum,vertex) ;
3462  }
3463 
3464  // If too small or big pt, skip it
3465  if(fMomentum.E() < GetMinEnergy() || fMomentum.E() > GetMaxEnergy() ) continue ;
3466 
3467  // Check acceptance selection
3468  if(IsFiducialCutOn())
3469  {
3471  if(! in ) continue ;
3472  }
3473 
3474  AliDebug(1,Form("Min pt cut and fiducial cut passed: pt %3.2f, phi %2.2f, eta %1.2f",fMomentum.Pt(),fMomentum.Phi(),fMomentum.Eta()));
3475 
3476  // Play with the MC stack if available
3477  // Check origin of the candidates
3478  Int_t tag = 0 ;
3479  if(IsDataMC())
3480  {
3481  tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(), calo->GetNLabels(), GetMC());
3482  AliDebug(1,Form("Origin of candidate %d",tag));
3483  }
3484 
3485  //Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
3486 
3487  // Check Distance to Bad channel, set bit.
3488  Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
3489  if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
3490  if(distBad < fMinDist)
3491  {
3492  // In bad channel (PHOS cristal size 2.2x2.2 cm)
3493  // FillRejectedClusterHistograms(tag,nMaxima);
3494  continue ;
3495  }
3496 
3497  AliDebug(1,Form("Bad channel cut passed %4.2f",distBad));
3498 
3499  // If too low number of cells, skip it
3500  if ( calo->GetNCells() < GetCaloPID()->GetClusterSplittingMinNCells())
3501  {
3502  //FillRejectedClusterHistograms(tag,nMaxima);
3503  continue ;
3504  }
3505 
3506  AliDebug(1,Form("N cells cut passed %d > %d",calo->GetNCells(), GetCaloPID()->GetClusterSplittingMinNCells()));
3507 
3508  //.......................................
3509  // TOF cut, BE CAREFUL WITH THIS CUT
3510  Double_t tof = calo->GetTOF()*1e9;
3511  if(tof < fTimeCutMin || tof > fTimeCutMax)
3512  {
3513  //FillRejectedClusterHistograms(tag,nMaxima);
3514  continue ;
3515  }
3516 
3517  // Check PID
3518  // PID selection or bit setting
3519  Int_t nMaxima = 0;
3520  Double_t mass = 0, angle = 0;
3521  Int_t absId1 =-1, absId2 =-1;
3522  Float_t distbad1 =-1, distbad2 =-1;
3523  Bool_t fidcut1 = 0, fidcut2 = 0;
3524 
3526  GetVertex(evtIndex),nMaxima,
3527  mass,angle,
3529  absId1,absId2,
3530  distbad1,distbad2,
3531  fidcut1,fidcut2) ;
3532 
3533 
3534  AliDebug(1,Form("PDG of identified particle %d",idPartType));
3535 
3536  // Skip events where one of the new clusters (lowest energy) is close to an EMCal border or a bad channel
3537  if( (fCheckSplitDistToBad) &&
3538  (!fidcut2 || !fidcut1 || distbad1 < fMinDist || distbad2 < fMinDist))
3539  {
3540  AliDebug(1,Form("Dist to bad channel cl %f, cl1 %f, cl2 %f; fid cl1 %d, cl2 %d",
3541  calo->GetDistanceToBadChannel(),distbad1,distbad2, fidcut1,fidcut2));
3542 
3543  //FillRejectedClusterHistograms(tag,nMaxima);
3544  continue ;
3545  }
3546 
3547  // Skip events with too few or too many NLM
3548  if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax)
3549  {
3550  //FillRejectedClusterHistograms(tag,nMaxima);
3551  continue ;
3552  }
3553 
3554  AliDebug(1,Form("NLM %d accepted",nMaxima));
3555 
3556  // Skip matched clusters with tracks
3557  if(fRejectTrackMatch && IsTrackMatched(calo, GetReader()->GetInputEvent()))
3558  {
3559  FillRejectedClusterHistograms(tag,nMaxima);
3560  continue ;
3561  }
3562 
3563  Float_t l0 = calo->GetM02();
3564  Float_t l1 = calo->GetM20();
3565  Float_t e1 = fMomentum1.Energy();
3566  Float_t e2 = fMomentum2.Energy();
3568  Float_t ptSplit = fMomentum12.Pt();
3569  Float_t eSplit = e1+e2;
3570 
3571  // Mass of all clusters
3572  fhMass ->Fill(fMomentum.E() , mass, GetEventWeight());
3573  fhMassPt->Fill(fMomentum.Pt(), mass, GetEventWeight());
3574 
3575  if(fMomentum1.Pt() >= fMomentum2.Pt())
3576  {
3578  fhMassPtMinPair->Fill(fMomentum2.Pt(), mass, GetEventWeight());
3579  }
3580  else
3581  {
3582  fhMassPtMaxPair->Fill(fMomentum2.Pt(), mass, GetEventWeight());
3584  }
3585 
3586  fhMassSplitPt->Fill(ptSplit, mass, GetEventWeight());
3587  fhPtLambda0NoSplitCut->Fill(fMomentum.Pt(), l0, GetEventWeight());
3588 
3589  // Asymmetry of all clusters
3590  Float_t asy =-10;
3591  if(e1+e2 > 0) asy = (e1-e2) / (e1+e2);
3592  fhAsymmetry->Fill(fMomentum.E(), asy, GetEventWeight());
3593 
3594  // Divide NLM in 3 cases, 1 local maxima, 2 local maxima, more than 2 local maxima
3595  Int_t indexMax = -1;
3596  if (nMaxima==1) indexMax = 0 ;
3597  else if(nMaxima==2) indexMax = 1 ;
3598  else indexMax = 2 ;
3599 
3600  fhMassPtLocMax[indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3601 
3602  Int_t mcIndex = -1;
3603  Int_t noverlaps = 0;
3604  Float_t ptprim = 0;
3605  Int_t mesonLabel = -1;
3606 
3607  if(IsDataMC())
3608  {
3609  mcIndex = GetMCIndex(tag);
3610 
3611  Bool_t ok = kFALSE;
3612  Int_t mcLabel = calo->GetLabel();
3613 
3614  fPrimaryMom = GetMCAnalysisUtils()->GetMother(mcLabel,GetMC(),ok);
3615 
3616 
3617  if(mcIndex == kmcPi0 || mcIndex == kmcEta)
3618  {
3619  if(mcIndex == kmcPi0)
3620  {
3621  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,111,GetMC(),ok,mesonLabel);
3622  if(fGrandMotherMom.E() > 0 && ok) ptprim = fGrandMotherMom.Pt();
3623  }
3624  else
3625  {
3626  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,221,GetMC(),ok,mesonLabel);
3627  if(fGrandMotherMom.E() > 0 && ok) ptprim = fGrandMotherMom.Pt();
3628  }
3629  }
3630 
3631  const UInt_t nlabels = calo->GetNLabels();
3632  Int_t overpdg[nlabels];
3633  Int_t overlab[nlabels];
3634  noverlaps = GetMCAnalysisUtils()->GetNOverlaps(calo->GetLabels(), nlabels, tag, mesonLabel, GetMC(), overpdg, overlab);
3635 
3636  fhMCMassPt [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3637  fhMCMassSplitPt[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3638 
3639  if(mcIndex==kmcPi0)
3640  {
3641  fhMCPi0PtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3642  fhMCPi0SplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3643  fhMCPi0PtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3644  fhMCPi0SplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3645 
3646  }
3647  else if(mcIndex==kmcEta)
3648  {
3649  fhMCEtaPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3650  fhMCEtaSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3651  fhMCEtaPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3652  fhMCEtaSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3653  }
3654 
3655  if(noverlaps==0)
3656  {
3657  if(mcIndex==kmcPi0)
3658  {
3659  fhMCPi0PtRecoPtPrimNoOverlap ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3660  fhMCPi0SplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3661  }
3662  else if(mcIndex==kmcEta)
3663  {
3664  fhMCEtaPtRecoPtPrimNoOverlap ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3665  fhMCEtaSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3666  }
3667 
3668  fhMassNoOverlap ->Fill(fMomentum.E() , mass, GetEventWeight());
3670  fhMassSplitPtNoOverlap->Fill(ptSplit , mass, GetEventWeight());
3671 
3672  fhMCMassPtNoOverlap [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3673  fhMCMassSplitPtNoOverlap[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3674  }
3675 
3676  fhMCPtAsymmetry[mcIndex]->Fill(fMomentum.Pt(), asy, GetEventWeight());
3677  }
3678 
3679  // If cluster does not pass pid, not pi0/eta, skip it.
3680  if (GetOutputAODName().Contains("Pi0") && idPartType != AliCaloPID::kPi0)
3681  {
3682  AliDebug(1,"Cluster is not Pi0");
3683  FillRejectedClusterHistograms(tag,nMaxima);
3684  continue ;
3685  }
3686 
3687  else if(GetOutputAODName().Contains("Eta") && idPartType != AliCaloPID::kEta)
3688  {
3689  AliDebug(1,"Cluster is not Eta");
3690  FillRejectedClusterHistograms(tag,nMaxima);
3691  continue ;
3692  }
3693 
3694  AliDebug(1,Form("Pi0/Eta selection cuts passed: pT %3.2f, pdg %d",fMomentum.Pt(), idPartType));
3695 
3696  // Mass and asymmetry of selected pairs
3697  fhSelectedAsymmetry ->Fill(fMomentum.E() , asy , GetEventWeight());
3698  fhSelectedMass ->Fill(fMomentum.E() , mass, GetEventWeight());
3699  fhSelectedMassPt ->Fill(fMomentum.Pt(), mass, GetEventWeight());
3700  fhSelectedMassSplitPt->Fill(ptSplit , mass, GetEventWeight());
3701 
3702  fhSelectedMassPtLocMax[indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3703 
3704  Int_t nSM = GetModuleNumber(calo);
3705  if(nSM < fNModules && nSM >=0 && fFillAllNLMHistograms)
3706  {
3707  fhSelectedMassPtLocMaxSM [indexMax][nSM]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3708  fhSelectedLambda0PtLocMaxSM[indexMax][nSM]->Fill(fMomentum.Pt(), l0 , GetEventWeight());
3709  }
3710 
3711  if(IsDataMC())
3712  {
3713  if(mcIndex==kmcPi0)
3714  {
3715  fhMCPi0SelectedPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3716  fhMCPi0SelectedSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3717  fhMCPi0SelectedPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3718  fhMCPi0SelectedSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3719  }
3720  else if(mcIndex==kmcEta)
3721  {
3722  fhMCEtaSelectedPtRecoPtPrim ->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3723  fhMCEtaSelectedSplitPtRecoPtPrim ->Fill(ptSplit , ptprim, GetEventWeight());
3724  fhMCEtaSelectedPtRecoPtPrimLocMax [indexMax]->Fill(fMomentum.Pt(), ptprim, GetEventWeight());
3725  fhMCEtaSelectedSplitPtRecoPtPrimLocMax[indexMax]->Fill(ptSplit , ptprim, GetEventWeight());
3726  }
3727 
3728  if(noverlaps==0)
3729  {
3732  fhSelectedMassSplitPtNoOverlap->Fill(ptSplit , mass, GetEventWeight());
3733 
3734  if(mcIndex==kmcPi0)
3735  {
3737  fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3738  }
3739  else if(mcIndex==kmcEta)
3740  {
3742  fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap->Fill(ptSplit , ptprim, GetEventWeight());
3743  }
3744  }
3745  }
3746 
3747  Float_t phi = fMomentum.Phi();
3748  if(phi<0) phi+=TMath::TwoPi();
3749 
3750  fhSplitE ->Fill( eSplit, GetEventWeight());
3751  fhSplitPt ->Fill(ptSplit, GetEventWeight());
3752  fhSplitPtPhi ->Fill(ptSplit, phi , GetEventWeight());
3753  fhSplitPtEta ->Fill(ptSplit, fMomentum.Eta(), GetEventWeight());
3754  fhNLocMaxSplitPt->Fill(ptSplit, nMaxima , GetEventWeight());
3755 
3756  // Check split-clusters with good time window difference
3757  Double_t tof1 = cells->GetCellTime(absId1);
3758  GetCaloUtils()->RecalibrateCellTime(tof1, GetCalorimeter(), absId1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
3759  tof1*=1.e9;
3760 
3761  Double_t tof2 = cells->GetCellTime(absId2);
3762  GetCaloUtils()->RecalibrateCellTime(tof2, GetCalorimeter(), absId2,GetReader()->GetInputEvent()->GetBunchCrossNumber());
3763  tof2*=1.e9;
3764 
3765  Double_t t12diff = tof1-tof2;
3766  fhEPairDiffTime->Fill(e1+e2, t12diff, GetEventWeight());
3767 
3768  if(IsDataMC())
3769  {
3770  fhMCSplitE [mcIndex]->Fill( eSplit, GetEventWeight());
3771  fhMCSplitPt [mcIndex]->Fill(ptSplit, GetEventWeight());
3772  fhMCSplitPtPhi [mcIndex]->Fill(ptSplit , phi , GetEventWeight());
3773  fhMCSplitPtEta [mcIndex]->Fill(ptSplit , fMomentum.Eta(), GetEventWeight());
3774  fhMCNLocMaxSplitPt[mcIndex]->Fill(ptSplit , nMaxima , GetEventWeight());
3775  fhMCNLocMaxPt [mcIndex]->Fill(fMomentum.Pt(), nMaxima , GetEventWeight());
3776 
3777  fhMCSelectedMassPt [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3778  fhMCSelectedMassSplitPt [mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3779  fhMCSelectedMassPtLocMax[mcIndex][indexMax]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3780 
3781  if(noverlaps==0)
3782  {
3783  fhMCSelectedMassPtNoOverlap [mcIndex]->Fill(fMomentum.Pt(), mass, GetEventWeight());
3784  fhMCSelectedMassSplitPtNoOverlap[mcIndex]->Fill(ptSplit , mass, GetEventWeight());
3785  }
3786  }
3787 
3788  // Remove clusters with NLM=x depeding on a minimim energy cut
3789  if(nMaxima == 1 && fNLMECutMin[0] > fMomentum.E()) continue;
3790  if(nMaxima == 2 && fNLMECutMin[1] > fMomentum.E()) continue;
3791  if(nMaxima > 2 && fNLMECutMin[2] > fMomentum.E()) continue;
3792 
3793  // Fill some histograms about shower shape
3795  {
3796  FillSelectedClusterHistograms(calo, fMomentum.Pt(), nMaxima, tag, asy);
3797  }
3798 
3799  // Fill histograms to undertand pile-up before other cuts applied
3800  // Remember to relax time cuts in the reader
3801  Double_t tofcluster = calo->GetTOF()*1e9;
3802 
3803  if ( IsPileUpAnalysisOn() ) FillPileUpHistograms(fMomentum.Pt(),tofcluster,calo);
3804 
3806  FillEMCALBCHistograms(fMomentum.E(), fMomentum.Eta(), fMomentum.Phi(), tofcluster);
3807 
3808  //------------------------
3809  // Create AOD for analysis
3810 
3811  AliAODPWG4Particle aodpi0 = AliAODPWG4Particle(fMomentum);
3812  aodpi0.SetLabel(mesonLabel);
3813 
3814  // Set the indeces of the original caloclusters
3815  aodpi0.SetCaloLabel(calo->GetID(),-1);
3816  aodpi0.SetDetectorTag(GetCalorimeter());
3817 
3818  if (distBad > fMinDist3) aodpi0.SetDistToBad(2) ;
3819  else if(distBad > fMinDist2) aodpi0.SetDistToBad(1) ;
3820  else aodpi0.SetDistToBad(0) ;
3821 
3822  // Check if cluster is pi0 via cluster splitting
3823  aodpi0.SetIdentifiedParticleType(idPartType);
3824 
3825  aodpi0.SetM02(l0);
3826  aodpi0.SetM20(l1);
3827  aodpi0.SetNLM(nMaxima);
3828  aodpi0.SetTime(tofcluster);
3829  aodpi0.SetNCells(calo->GetNCells());
3830  aodpi0.SetSModNumber(nSM);
3831 
3832  aodpi0.SetTag(tag);
3833 
3834  // Add AOD with pi0 object to aod branch
3835  AddAODParticle(aodpi0);
3836 
3837  } // loop
3838 
3839  AliDebug(1,"End fill AODs");
3840 }
3841 
3842 //______________________________________________
3845 //______________________________________________
3847 {
3848  if(!GetOutputAODBranch())
3849  {
3850  AliFatal(Form("No output pi0 in AOD branch with name < %s >,STOP",GetOutputAODName().Data()));
3851  return;
3852  }
3853 
3854  // Loop on stored AOD pi0
3855  Int_t naod = GetOutputAODBranch()->GetEntriesFast();
3856 
3857  AliDebug(1,Form("AOD branch entries %d", naod));
3858 
3859  Float_t cen = GetEventCentrality();
3860  Float_t ep = GetEventPlaneAngle();
3861 
3862  for(Int_t iaod = 0; iaod < naod ; iaod++)
3863  {
3864  AliAODPWG4Particle* pi0 = (AliAODPWG4Particle*) (GetOutputAODBranch()->At(iaod));
3865  Int_t pdg = pi0->GetIdentifiedParticleType();
3866 
3867  if( ( pdg != AliCaloPID::kPi0 && pdg != AliCaloPID::kEta ) ) continue;
3868 
3869  // Fill pi0 histograms
3870  Float_t ener = pi0->E();
3871  Float_t pt = pi0->Pt();
3872  Float_t phi = pi0->Phi();
3873  if(phi < 0) phi+=TMath::TwoPi();
3874  Float_t eta = pi0->Eta();
3875 
3876  fhPt ->Fill(pt , GetEventWeight());
3877  fhE ->Fill(ener, GetEventWeight());
3878 
3879  fhPtEta ->Fill(pt , eta, GetEventWeight());
3880  fhPtPhi ->Fill(pt , phi, GetEventWeight());
3881  fhEtaPhi ->Fill(eta , phi, GetEventWeight());
3882 
3884  {
3885  fhPtCentrality ->Fill(pt, cen, GetEventWeight()) ;
3886  fhPtEventPlane ->Fill(pt, ep , GetEventWeight()) ;
3887  }
3888 
3889  if(IsDataMC())
3890  {
3891  Int_t tag = pi0->GetTag();
3892  Int_t label = pi0->GetLabel();
3893  Int_t mcIndex = GetMCIndex(tag);
3894 
3895  if(fAnaType != kSSCalo && mcIndex > 1) continue;
3896 
3897  fhMCE [mcIndex] ->Fill(ener, GetEventWeight());
3898  fhMCPt [mcIndex] ->Fill(pt , GetEventWeight());
3899  fhMCPtPhi[mcIndex] ->Fill(pt , phi, GetEventWeight());
3900  fhMCPtEta[mcIndex] ->Fill(pt , eta, GetEventWeight());
3901 
3902  if ( IsHighMultiplicityAnalysisOn() ) fhMCPtCentrality[mcIndex]->Fill(pt, cen, GetEventWeight());
3903 
3904  if((mcIndex==kmcPi0Decay || mcIndex==kmcEtaDecay ||
3905  mcIndex==kmcPi0 || mcIndex==kmcEta ) &&
3906  fAnaType==kSSCalo)
3907  {
3908  Float_t efracMC = 0;
3909  Int_t momlabel = -1;
3910  Bool_t ok = kFALSE;
3911 
3912  fPrimaryMom = GetMCAnalysisUtils()->GetMother(label,GetMC(),ok);
3913  if(!ok) continue;
3914 
3915  if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0))
3916  {
3917  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetMC(),ok,momlabel);
3918  if(fGrandMotherMom.E() > 0 && ok)
3919  {
3920  efracMC = fGrandMotherMom.E()/ener;
3921  fhMCPi0PtGenRecoFraction ->Fill(pt, efracMC, GetEventWeight());
3922  }
3923  }
3924  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay))
3925  {
3926  fhMCPi0DecayPt->Fill(pt, GetEventWeight());
3927  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,111,GetMC(),ok,momlabel);
3928 
3929  if(fGrandMotherMom.E() > 0 && ok)
3930  {
3931  efracMC = fPrimaryMom.E()/fGrandMotherMom.E();
3932  fhMCPi0DecayPtFraction ->Fill(pt, efracMC, GetEventWeight());
3933  }
3934  }
3935  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta))
3936  {
3937  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetMC(),ok,momlabel);
3938  if(fGrandMotherMom.E() > 0 && ok)
3939  {
3940  efracMC = fGrandMotherMom.E()/ener;
3941  fhMCEtaPtGenRecoFraction ->Fill(pt, efracMC, GetEventWeight());
3942  }
3943  }
3944  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay))
3945  {
3946  fhMCEtaDecayPt->Fill(pt, GetEventWeight());
3947  fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(label,221,GetMC(),ok,momlabel);
3948 
3949  if(fGrandMotherMom.E() > 0 && ok)
3950  {
3951  efracMC = fPrimaryMom.E()/fGrandMotherMom.E();
3952  fhMCEtaDecayPtFraction ->Fill(pt, efracMC, GetEventWeight());
3953  }
3954  }
3955  else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
3956  {
3957  fhMCOtherDecayPt->Fill(pt, GetEventWeight());
3958  }
3959  }
3960 
3961  if( mcIndex==kmcPi0 || mcIndex==kmcEta )
3962  {
3963  AliVParticle* ancestor = GetMC()->GetTrack(label);
3964  Int_t status = ancestor->MCStatusCode();
3965  Int_t momindex = ancestor->GetMother();
3966 
3967  if(momindex < 0) return;
3968 
3969  AliVParticle* mother = GetMC()->GetTrack(momindex);
3970  Int_t mompdg = TMath::Abs(mother->PdgCode());
3971  Int_t momstatus = mother->MCStatusCode();
3972  Float_t prodR = TMath::Sqrt(mother->Xv()*mother->Xv()+mother->Yv()*mother->Yv());
3973 
3974  if( mcIndex==kmcPi0 )
3975  {
3976  fhMCPi0ProdVertex->Fill(pt, prodR , GetEventWeight());
3977  fhMCPi0PtStatus ->Fill(pt, status, GetEventWeight());
3978 
3979  if (momstatus == 21) fhMCPi0PtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
3980  else if(mompdg < 22 ) fhMCPi0PtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
3981  else if(mompdg > 2100 && mompdg < 2210) fhMCPi0PtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
3982  else if(mompdg == 221) fhMCPi0PtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
3983  else if(mompdg == 331) fhMCPi0PtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
3984  else if(mompdg == 213) fhMCPi0PtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
3985  else if(mompdg == 223) fhMCPi0PtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
3986  else if(mompdg >= 310 && mompdg <= 323) fhMCPi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
3987  else if(mompdg == 130) fhMCPi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
3988  else if(momstatus == 11 || momstatus == 12 ) fhMCPi0PtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
3989  else fhMCPi0PtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
3990 
3991  if(status != 11)
3992  {
3993  if (momstatus == 21) fhMCNotResonancePi0PtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
3994  else if(mompdg < 22 ) fhMCNotResonancePi0PtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
3995  else if(mompdg > 2100 && mompdg < 2210) fhMCNotResonancePi0PtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
3996  else if(mompdg == 221) fhMCNotResonancePi0PtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
3997  else if(mompdg == 331) fhMCNotResonancePi0PtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
3998  else if(mompdg == 213) fhMCNotResonancePi0PtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
3999  else if(mompdg == 223) fhMCNotResonancePi0PtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
4000  else if(mompdg >= 310 && mompdg <= 323) fhMCNotResonancePi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
4001  else if(mompdg == 130) fhMCNotResonancePi0PtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
4002  else if(momstatus == 11 || momstatus == 12 ) fhMCNotResonancePi0PtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
4003  else fhMCNotResonancePi0PtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
4004  }
4005  }
4006  else if (mcIndex==kmcEta )
4007  {
4008  fhMCEtaProdVertex->Fill(pt, prodR, GetEventWeight());
4009 
4010  if (momstatus == 21) fhMCEtaPtOrigin->Fill(pt, 0.5, GetEventWeight());//parton
4011  else if(mompdg < 22 ) fhMCEtaPtOrigin->Fill(pt, 1.5, GetEventWeight());//quark
4012  else if(mompdg > 2100 && mompdg < 2210) fhMCEtaPtOrigin->Fill(pt, 2.5, GetEventWeight());// resonances
4013  else if(mompdg == 221) fhMCEtaPtOrigin->Fill(pt, 8.5, GetEventWeight());//eta
4014  else if(mompdg == 331) fhMCEtaPtOrigin->Fill(pt, 9.5, GetEventWeight());//eta prime
4015  else if(mompdg == 213) fhMCEtaPtOrigin->Fill(pt, 4.5, GetEventWeight());//rho
4016  else if(mompdg == 223) fhMCEtaPtOrigin->Fill(pt, 5.5, GetEventWeight());//omega
4017  else if(mompdg >= 310 && mompdg <= 323) fhMCEtaPtOrigin->Fill(pt, 6.5, GetEventWeight());//k0S, k+-,k*
4018  else if(mompdg == 130) fhMCEtaPtOrigin->Fill(pt, 6.5, GetEventWeight());//k0L
4019  else if(momstatus == 11 || momstatus == 12 ) fhMCEtaPtOrigin->Fill(pt, 3.5, GetEventWeight());//resonances
4020  else fhMCEtaPtOrigin->Fill(pt, 7.5, GetEventWeight());//other?
4021  }
4022  }
4023  } // Histograms with MC
4024  }// aod loop
4025 
4026  AliDebug(1,"End");
4027 }
4028 
4029 //__________________________________________________
4031 //__________________________________________________
4032 void AliAnaPi0EbE::Print(const Option_t * opt) const
4033 {
4034  if(! opt)
4035  return;
4036 
4037  printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
4038 
4040 
4041  printf("Analysis Type = %d \n", fAnaType) ;
4042 
4043  if(fAnaType == kSSCalo)
4044  {
4045  printf("Calorimeter = %s\n", GetCalorimeterString().Data()) ;
4046  printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
4047  printf("Min Distance to Bad Channel 2 = %2.1f\n",fMinDist2);
4048  printf("Min Distance to Bad Channel 3 = %2.1f\n",fMinDist3);
4049  }
4050 
4051  printf(" \n") ;
4052 }
4053 
4054 
4055 
4056 
4057 
Bool_t IsPileUpFromSPD() const
Float_t GetHistoPtMax() const
TString fInputAODGammaConvName
Name of AOD branch with conversion photons.
Definition: AliAnaPi0EbE.h:204
TH2F * fhPtDispersionLocMax[3]
! pT vs lambda1 of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:437
TH2F * fhMCEtaSelectedPtRecoPtPrimNoOverlap
! pt reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:283
TH2F * fhMCPi0ProdVertex
! Spectrum of selected pi0 vs production vertex
Definition: AliAnaPi0EbE.h:400
Int_t pdg
Bool_t fFillOnlySimpleSSHisto
Fill selected cluster histograms, selected SS histograms.
Definition: AliAnaPi0EbE.h:200
TH2F * fhMCMassPtNoOverlap[fgkNmcTypes]
! Pair pT vs Mass coming from X, no random particles overlap
Definition: AliAnaPi0EbE.h:378
TH2F * fhMCMassPt[fgkNmcTypes]
! Pair pT vs Mass coming from X
Definition: AliAnaPi0EbE.h:373
TH2F * fhSelectedMassPtLocMax[3]
! Pair mass vs pT, for selected pairs, for each NLM case
Definition: AliAnaPi0EbE.h:257
TH2F * fhMCPtDispersion[fgkNmcTypes]
! pT vs dispersion of pi0 pairs but really from MC particle
Definition: AliAnaPi0EbE.h:343
TH2F * fhPtNPileUpSPDVtxTimeCut2
! Cluster pt vs number of spd pile-up vertices, time cut +-75 ns
Definition: AliAnaPi0EbE.h:467
TH1F * fhMCPtDecay[fgkNmcTypes]
! pT from MC particle
Definition: AliAnaPi0EbE.h:338
TH2F * fhMCEtaPtRecoPtPrimLocMax[3]
! pt reco vs pt prim for eta mother, vs NLM
Definition: AliAnaPi0EbE.h:291
TH2F * fhPtLambda0NoTRD
! pT vs lambda0 of selected cluster, not behind TRD
Definition: AliAnaPi0EbE.h:314
Int_t GetHistoNClusterCellMin() const
Bool_t fFillWeightHistograms
Fill weigth histograms.
Definition: AliAnaPi0EbE.h:199
TH2F * fhdEdx
! Matched track dEdx vs cluster E
Definition: AliAnaPi0EbE.h:426
Float_t GetHistoPtMin() const
TList * GetCreateOutputObjects()
TH2F * fhTimePtSPDMulti
! Time of cluster vs pT, IsSPDPileUpMulti
Definition: AliAnaPi0EbE.h:456
double Double_t
Definition: External.C:58
Int_t GetHistoShowerShapeBins() const
Float_t GetHistodEdxMax() const
virtual void AddToHistogramsName(TString add)
virtual AliVCaloCells * GetEMCALCells() const
TH2F * fhSelectedMassPtLocMaxSM[3][22]
! Pair mass vs pT, for selected pairs, for each NLM case, for each SM
Definition: AliAnaPi0EbE.h:258
TLorentzVector GetMother(Int_t label, const AliMCEvent *mcevent, Bool_t &ok)
TLorentzVector GetMotherWithPDG(Int_t label, Int_t pdg, const AliMCEvent *mcevent, Bool_t &ok, Int_t &momLabel)
TH2F * fhPtDispPhiLocMax[3]
! pT vs phi dispersion of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:439
Definition: External.C:236
anaTypes fAnaType
Select analysis type.
Definition: AliAnaPi0EbE.h:174
TH2F * fhPtDispEtaLocMax[3]
! pT vs eta dispersion of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:438
TH1F * fhPtReject
! Number of rejected as pi0/eta vs pT
Definition: AliAnaPi0EbE.h:239
TH2F * fhMassPtIsoRCut
! Pair mass vs pT, for all pairs when opening angle not larger than iso cone radius ...
Definition: AliAnaPi0EbE.h:254
Float_t fR
Isolation cone.
Definition: AliAnaPi0EbE.h:187
Int_t fLastModule
Last EMCAL/PHOS module, set in CaloUtils or depending fidutial cuts.
TH2F * fhPtCentrality
! Centrality vs pi0/eta pT
Definition: AliAnaPi0EbE.h:235
AliEMCALRecoUtils * GetEMCALRecoUtils() const
TH1F * fhMCPtDecayLostPairEta
! pT for tagged clustres when MC Eta Decay, when companion is lost
Definition: AliAnaPi0EbE.h:340
TH2F * fhMCPtLambda0FracMaxCellCut[fgkNmcTypes]
! pT vs lambda0 of pi0 pairs but really from MC particle, fraction of cluster energy in max cell cut ...
Definition: AliAnaPi0EbE.h:345
virtual Float_t GetPairTimeCut() const
Time cut in ns.
TH2F * fhTimePtSPD
! Time of cluster vs pT, IsSPDPileUp
Definition: AliAnaPi0EbE.h:455
virtual void GetVertex(Double_t vertex[3]) const
TH2F * fhSelectedMassPt
! Pair mass vs pT, for selected pairs
Definition: AliAnaPi0EbE.h:251
TH2F * fhMCPtDispEta[fgkNmcTypes]
! Shower dispersion in eta direction
Definition: AliAnaPi0EbE.h:347
TH2F * fhTimeTriggerEMCALBC0UMReMatchBoth
! Time distribution of pi0s in event, when trigger is not found, rematched open both ...
Definition: AliAnaPi0EbE.h:233
TH2F * fhMCPi0SelectedPtRecoPtPrimNoOverlap
! pt reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:282
TH2F * fhNLocMaxSplitPt
! Split sub-cluster pair pT sum, as a function of n maxima
Definition: AliAnaPi0EbE.h:306
TH2F * fhEPairDiffTime
! E pair vs Pair of clusters time difference vs E
Definition: AliAnaPi0EbE.h:320
TH2F * fhMassSplitPtNoOverlap
! Pair mass vs pT (split), for all pairs, no overlap
Definition: AliAnaPi0EbE.h:265
TH1F * fhMCEReject[fgkNmcTypes]
! Number of rejected as pi0 vs E coming from X
Definition: AliAnaPi0EbE.h:364
TH2F * fhMCEtaDecayPtFraction
! SS id, clusters id as pi0 (eta), coming from 1 photon, eta decay primary, pt vs pt decay / pt mothe...
Definition: AliAnaPi0EbE.h:388
virtual AliVEvent * GetInputEvent() const
TH2F * fhPtDispEtaPhiDiffLocMax[3]
! pT vs dispersion eta - phi
Definition: AliAnaPi0EbE.h:441
TH2F * fhMCPi0SelectedPtRecoPtPrim
! pt reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:280
Double_t mass
TObjString * GetAnalysisCuts()
Save parameters used for analysis.
Bool_t fRejectTrackMatch
Remove clusters which have an associated TPC track.
Definition: AliAnaPi0EbE.h:197
TH2F * fhMCSelectedMassPt[fgkNmcTypes]
! selected pair pT vs Mass coming from X
Definition: AliAnaPi0EbE.h:375
TH2F * fhMCDispEtaDispPhi[7][fgkNmcTypes]
! Shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
Definition: AliAnaPi0EbE.h:354
Int_t fNLMCutMin
Remove clusters/cells with number of local maxima smaller than this value.
Definition: AliAnaPi0EbE.h:176
Float_t DegToRad(Float_t deg) const
virtual AliIsolationCut * GetIsolationCut()
TH2F * fhMCLambda0DispPhi[7][fgkNmcTypes]
! Shower shape correlation l0 vs disp phi
Definition: AliAnaPi0EbE.h:350
energy
Definition: HFPtSpectrum.C:44
TH2F * fhPtSumEtaPhi
! Shower dispersion in eta and phi direction
Definition: AliAnaPi0EbE.h:328
TH2F * fhMCNLocMaxPtReject[fgkNmcTypes]
! Number of maxima in selected clusters
Definition: AliAnaPi0EbE.h:448
TH2F * fhMCPi0SelectedSplitPtRecoPtPrimLocMax[3]
! pt split reco vs pt prim for pi0 mother, vs NLM
Definition: AliAnaPi0EbE.h:297
virtual Float_t GetZvertexCut() const
Maximal number of events for mixin.
TH2F * fhPtDispEta
! Shower dispersion in eta direction
Definition: AliAnaPi0EbE.h:322
Int_t fNModules
Number of EMCAL/PHOS modules to use in analysis, set in CaloUtils.
virtual Double_t GetEventPlaneAngle() const
TH2F * fhPtPhiReject
! pT vs phi of rejected as pi0/eta
Definition: AliAnaPi0EbE.h:242
Double_t fTimeCutMax
Remove clusters/cells with time larger than this value, in ns.
Definition: AliAnaPi0EbE.h:196
TH1F * fhMCSplitPt[fgkNmcTypes]
! Number of identified as pi0 vs sum Pt split coming from X
Definition: AliAnaPi0EbE.h:368
TH2F * fhMCPi0PtRecoPtPrim
! pt reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:270
virtual Bool_t IsTrackMatched(AliVCluster *cluster, AliVEvent *event)
TH2F * fhTrackMatchedMCParticleDPhi
! Trace origin of matched particle, phi residual
Definition: AliAnaPi0EbE.h:425
TH2F * fhMassPt
! Pair mass vs pT, for all pairs
Definition: AliAnaPi0EbE.h:246
TH2F * fhMCPi0PtStatus
! Mass of reoconstructed pi0 pairs in calorimeter vs mother
Definition: AliAnaPi0EbE.h:399
TH2F * fhSplitPtEta
! Split sub-cluster pair pT sum vs eta
Definition: AliAnaPi0EbE.h:304
void MakeAnalysisFillAOD()
virtual AliNeutralMesonSelection * GetNeutralMesonSelection()
Int_t GetHistoMassBins() const
Int_t GetHistoPhiBins() const
TH2F * fhEMaxCellClusterLogRatio
! Log (e max cell / e cluster) vs e cluster for selected photons
Definition: AliAnaPi0EbE.h:408
TH2F * fhEtaPhiEMCALBC0
! Pseudorapidity vs Phi of clusters
Definition: AliAnaPi0EbE.h:221
TH2F * fhMCAsymmetryDispPhi[7][fgkNmcTypes]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:358
TH2F * fhPtSphericityLocMax[3]
! pT vs sphericity in eta vs phi
Definition: AliAnaPi0EbE.h:442
Float_t GetHistoMassMin() const
void InitParameters()
Initialize the parameters of the analysis with default values.
TH2F * fhTimePileUpMainVertexZDiamond
! Time of cluster vs difference of z diamond and pile-up vertex
Definition: AliAnaPi0EbE.h:461
TH2F * fhTimeNPileUpVertContributors
! Time of cluster vs n pile-up vertex from SPD contributors
Definition: AliAnaPi0EbE.h:459
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:30
void MakeAnalysisFillHistograms()
TH2F * fhAsymmetryLambda0[7]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:332
void FillSelectedClusterHistograms(AliVCluster *cluster, Float_t pt, Int_t nLocMax, Int_t tag, Float_t asy=0)
Fill shower shape, timing and other histograms for selected clusters.
Float_t GetHistoTrackResidualPhiMin() const
TLorentzVector fMomentum
! Cluster/pi0 momentum, kinematic temporal containers.
Definition: AliAnaPi0EbE.h:207
Double_t fTimeCutMin
Remove clusters/cells with time smaller than this value, in ns.
Definition: AliAnaPi0EbE.h:195
Float_t fIsoCandMinPt
Isolation candidate minimum pT.
Definition: AliAnaPi0EbE.h:188
Float_t GetHistoTrackResidualEtaMin() const
2 calorimeter clusters invariant mass selection
Definition: AliAnaPi0EbE.h:86
Int_t GetHistoNClusterCellBins() const
Float_t fM02MinCutForIM
Study photon clusters with l0 larger than cut, in inv. mass analysis.
Definition: AliAnaPi0EbE.h:184
virtual TClonesArray * GetOutputAODBranch() const
TH2F * fhMCEtaProdVertex
! Spectrum of selected eta vs production vertex
Definition: AliAnaPi0EbE.h:401
Float_t GetHistoDiffTimeMin() const
TH2F * fhMCSelectedMassSplitPt[fgkNmcTypes]
! selected pair pT (split) vs Mass coming from X
Definition: AliAnaPi0EbE.h:376
TH2F * fhMCPtLambda0LocMax[fgkNmcTypes][3]
! pT vs lambda0 of selected cluster, 1,2,>2 local maxima in cluster, vs originating particle ...
Definition: AliAnaPi0EbE.h:435
Int_t GetHistoPOverEBins() const
TH1F * fhMCSplitE[fgkNmcTypes]
! Number of identified as pi0 vs sum E split coming from X
Definition: AliAnaPi0EbE.h:367
TH1F * fhPt
! Number of identified pi0/eta vs pT
Definition: AliAnaPi0EbE.h:216
TH2F * fhMCPi0PtRecoPtPrimNoOverlap
! pt reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:272
TH2F * fhSelectedLambda0PtLocMaxSM[3][22]
! Pair mass vs pT, for selected pairs, for each NLM case, for each SM
Definition: AliAnaPi0EbE.h:261
TH1F * fhMCPt[fgkNmcTypes]
! Number of identified as pi0 vs Pt coming from X
Definition: AliAnaPi0EbE.h:361
Float_t fMinDist3
One more cut on distance used for acceptance-efficiency study.
Definition: AliAnaPi0EbE.h:193
Float_t GetHistoPhiMin() const
TH2F * fhTrackMatchedDEtaDPhiNeg
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV
Definition: AliAnaPi0EbE.h:421
void SetTagBit(Int_t &tag, UInt_t set) const
TH2F * fhPtLambda0
! pT vs lambda0 of selected cluster
Definition: AliAnaPi0EbE.h:311
Float_t GetHistoDiffTimeMax() const
static const Int_t fgkNmcTypes
Total number of MC origin histograms.
Definition: AliAnaPi0EbE.h:170
Int_t CheckOrigin(Int_t label, const AliMCEvent *mcevent)
TH2F * fhEOverP
! Matched track E cluster over P track vs cluster E
Definition: AliAnaPi0EbE.h:427
TH2F * fhAsymmetryDispPhi[7]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:334
TH2F * fhTimeTriggerEMCALBC0UMReMatchOpenTime
! Time distribution of pi0s in event, when trigger is not found, rematched open time trigger ...
Definition: AliAnaPi0EbE.h:231
TH2F * fhPtSphericity
! Shower sphericity in eta vs phi
Definition: AliAnaPi0EbE.h:330
TH2F * fhEMaxCellClusterRatio
! E max cell / e cluster vs e cluster for selected photons
Definition: AliAnaPi0EbE.h:407
TString GetPIDParametersList()
Put data member values in string to keep in output container.
Definition: AliCaloPID.cxx:943
TH2F * fhMCLambda0DispEta[7][fgkNmcTypes]
! Shower shape correlation l0 vs disp eta
Definition: AliAnaPi0EbE.h:349
TH2F * fhTrackMatchedDEta
! Eta distance between track and cluster vs cluster E
Definition: AliAnaPi0EbE.h:413
TH2F * fhEtaPhiTriggerEMCALBC[11]
! Pseudorapidity vs Phi of pi0 for E > 2
Definition: AliAnaPi0EbE.h:225
TH2F * fhMCPtDispPhi[fgkNmcTypes]
! Shower dispersion in phi direction
Definition: AliAnaPi0EbE.h:348
TH2F * fhAsymmetryDispEta[7]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:333
TH2F * fhMassPtMaxPair
! Pair mass vs pT max of the pair, for all pairs
Definition: AliAnaPi0EbE.h:247
TH2F * fhPtLambda0FracMaxCellCut
! pT vs lambda0 of selected cluster, fraction of cluster energy in max cell cut
Definition: AliAnaPi0EbE.h:315
TH1F * fhMCEtaDecayPt
! SS id, clusters id as pi0 (eta), coming from 1 photon, eta decay primary, pt
Definition: AliAnaPi0EbE.h:387
const Double_t etamin
TH2F * fhTimeTriggerEMCALBCPileUpSPD[11]
! Time distribution of pi0, when trigger is in a given BC, tagged as pile-up SPD
Definition: AliAnaPi0EbE.h:227
Float_t GetHistoMassMax() const
TH2F * fhMCEtaSplitPtRecoPtPrimNoOverlap
! pt split reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:278
Base class for CaloTrackCorr analysis algorithms.
void MakeInvMassInCalorimeterAndCTS()
TH2F * fhPtEta
! Pt vs eta of identified pi0/eta
Definition: AliAnaPi0EbE.h:218
1 calorimeter cluster and 1 photon conversion pair invariant mass selection
Definition: AliAnaPi0EbE.h:88
virtual TString GetCalorimeterString() const
TH2F * fhPtNCells
! pT vs N cells in selected cluster
Definition: AliAnaPi0EbE.h:318
void FillEMCALBCHistograms(Float_t energy, Float_t eta, Float_t phi, Float_t time)
TH1F * fhMCOtherDecayPt
! SS id, clusters id as pi0 (eta), coming from 1 photon, other decay primary, pt
Definition: AliAnaPi0EbE.h:389
TH2F * fhTimePileUpMainVertexZDistance
! Time of cluster vs difference of z main vertex and pile-up vertex
Definition: AliAnaPi0EbE.h:460
Float_t GetHistodEdxMin() const
virtual AliFiducialCut * GetFiducialCut()
TH2F * fhPtDispersion
! pT vs disp of selected cluster
Definition: AliAnaPi0EbE.h:310
int Int_t
Definition: External.C:63
TH2F * fhMCAsymmetryLambda0[7][fgkNmcTypes]
! E asymmetry of 2 splitted clusters vs lam0 for 5 E bins
Definition: AliAnaPi0EbE.h:356
virtual TClonesArray * GetInputAODBranch() const
TH2F * fhMCEtaPtRecoPtPrim
! pt reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:271
TH2F * fhMCSplitPtPhi[fgkNmcTypes]
! pt vs phi of identified as pi0, coming from X
Definition: AliAnaPi0EbE.h:369
TH2F * fhNLocMaxPtReject
! Number of maxima in selected clusters
Definition: AliAnaPi0EbE.h:447
TH1F * fhPtPileUp[7]
! pT distribution of selected pi0/eta
Definition: AliAnaPi0EbE.h:451
TH2F * fhMCSelectedMassSplitPtNoOverlap[fgkNmcTypes]
! selected pair pT (split) vs Mass coming from X, no random particles overlap
Definition: AliAnaPi0EbE.h:381
virtual AliHistogramRanges * GetHistogramRanges()
unsigned int UInt_t
Definition: External.C:33
TH2F * fhMCEtaSelectedSplitPtRecoPtPrimLocMax[3]
! pt split reco vs pt prim for eta mother, vs NLM
Definition: AliAnaPi0EbE.h:298
Int_t GetHistoDiffTimeBins() const
float Float_t
Definition: External.C:68
TH2F * fhMCSelectedMassPtNoOverlap[fgkNmcTypes]
! selected pair pT vs Mass coming from X, no random particles overlap
Definition: AliAnaPi0EbE.h:380
Float_t GetHistoTrackResidualPhiMax() const
Bool_t fCheckSplitDistToBad
Check the distance to bad channel and to EMCal borders of split clusters.
Definition: AliAnaPi0EbE.h:198
TH2F * fhMCEtaPtGenRecoFraction
! SS id, clusters id as pi0 (eta), coming from 2 photon, eta primary, pt vs E prim eta / E reco ...
Definition: AliAnaPi0EbE.h:384
TH2F * fhMCPi0SelectedSplitPtRecoPtPrim
! pt split reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:285
TH2F * fhPtLambda0LocMax[3]
! pT vs lambda0 of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:434
TH2F * fhEtaPhi
! eta vs phi of identified pi0/eta
Definition: AliAnaPi0EbE.h:220
const Double_t ptmax
TH2F * fhMCPtLambda1[fgkNmcTypes]
! pT vs lambda1 of pi0 pairs but really from MC particle
Definition: AliAnaPi0EbE.h:342
TH2F * fhTrackMatchedDPhiPos
! Phi distance between track and cluster vs cluster E
Definition: AliAnaPi0EbE.h:417
TH2F * fhMCPtPhi[fgkNmcTypes]
! pt vs phi of identified as pi0, coming from X
Definition: AliAnaPi0EbE.h:362
virtual AliEMCALGeometry * GetEMCALGeometry() const
TH2F * fhMCEtaSplitPtRecoPtPrim
! pt split reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:276
TH2F * fhPtEventPlane
! Event plane vs pi0/eta pT
Definition: AliAnaPi0EbE.h:236
TH2F * fhMCNLocMaxPt[fgkNmcTypes]
! Number of maxima in selected clusters, vs originating particle
Definition: AliAnaPi0EbE.h:433
TH2F * fhPtEtaReject
! pT vs eta of rejected as pi0/eta
Definition: AliAnaPi0EbE.h:241
TH2F * fhMCEtaSelectedSplitPtRecoPtPrim
! pt split reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:286
TH2F * fhMCEtaSelectedPtRecoPtPrimLocMax[3]
! pt reco vs pt prim for eta mother, vs NLM
Definition: AliAnaPi0EbE.h:296
Bool_t IsInFiducialCut(Float_t eta, Float_t phi, Int_t det) const
virtual AliAODEvent * GetOutputEvent() const
TH2F * fhSelectedAsymmetry
! Cluster pT vs asymmetry of 2 splitted clusters, for selected pairs
Definition: AliAnaPi0EbE.h:301
TH2F * fhEtaPhiReject
! eta vs phi of rejected as pi0/eta
Definition: AliAnaPi0EbE.h:243
Float_t GetHistoShowerShapeMin() const
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
TH1F * fhPtDecay
! Number of identified pi0/eta decay photons vs pT
Definition: AliAnaPi0EbE.h:308
TH2F * fhMCPi0SplitPtRecoPtPrimNoOverlap
! pt split reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:277
TH2F * fhLambda0DispEta[7]
! Shower shape correlation l0 vs disp eta
Definition: AliAnaPi0EbE.h:324
TLorentzVector fMomentum1
! Cluster/photon momentum, kinematic temporal containers.
Definition: AliAnaPi0EbE.h:208
TH2F * fhPtSumPhi
! Shower dispersion in phi direction
Definition: AliAnaPi0EbE.h:327
Int_t GetHistodEdxBins() const
virtual AliCalorimeterUtils * GetCaloUtils() const
TH2F * fhMCPtEta[fgkNmcTypes]
! pt vs eta of identified as pi0, coming from X
Definition: AliAnaPi0EbE.h:363
Int_t GetHistoNClusterCellMax() const
TH2F * fhMassPtNoOverlap
! Pair mass vs pT, for all pairs, no overlap
Definition: AliAnaPi0EbE.h:264
Int_t GetHistoTrackResidualEtaBins() const
TH2F * fhMCPtAsymmetry[fgkNmcTypes]
! E asymmetry of 2 splitted clusters vs cluster pT
Definition: AliAnaPi0EbE.h:355
TH2F * fhMCEtaSelectedPtRecoPtPrim
! pt reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:281
Int_t GetTriggerClusterBC() const
TH2F * fhEtaPhiEMCALBCN
! Pseudorapidity vs Phi of clusters
Definition: AliAnaPi0EbE.h:223
TH2F * fhMCSplitPtEta[fgkNmcTypes]
! pt vs eta of identified as pi0, coming from X
Definition: AliAnaPi0EbE.h:370
Int_t GetClusterSplittingMinNCells() const
Definition: AliCaloPID.h:268
Int_t GetHistoTrackResidualPhiBins() const
const Double_t ptmin
virtual Bool_t IsHighMultiplicityAnalysisOn() const
TH2F * fhMCPi0SelectedPtRecoPtPrimLocMax[3]
! pt reco vs pt prim for pi0 mother, vs NLM
Definition: AliAnaPi0EbE.h:295
TLorentzVector fGrandMotherMom
! Primary momentum, kinematic temporal containers.
Definition: AliAnaPi0EbE.h:212
TH2F * fhMCEtaPtRecoPtPrimNoOverlap
! pt reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:273
TH2F * fhMassPairMCEta
! Pair mass, origin is same eta
Definition: AliAnaPi0EbE.h:392
virtual Double_t GetEventWeight() const
TH2F * fhPtSumEtaPhiLocMax[3]
! pT vs dispersion in eta and phi direction
Definition: AliAnaPi0EbE.h:440
TH2F * fhPtNPileUpSPDVtx
! Cluster pt vs number of spd pile-up vertices
Definition: AliAnaPi0EbE.h:463
TH2F * fhPtNPileUpTrkVtxTimeCut2
! Cluster pt vs number of track pile-up vertices, time cut +- 75 ns
Definition: AliAnaPi0EbE.h:468
TH2F * fhMassPtMinPair
! Pair mass vs pT min of the pair, for all pairs
Definition: AliAnaPi0EbE.h:248
Bool_t SelectPair(TLorentzVector particlei, TLorentzVector particlej, Int_t calo)
TH2F * fhMCEtaPtOrigin
! Mass of reoconstructed pi0 pairs in calorimeter vs mother
Definition: AliAnaPi0EbE.h:397
TH2F * fhMCPi0PtGenRecoFraction
! SS id, clusters id as pi0 (eta), coming from 2 photon, pi0 primary, pt vs E prim pi0 / E reco ...
Definition: AliAnaPi0EbE.h:383
TH1F * fhMCE[fgkNmcTypes]
! Number of identified as pi0 vs E coming from X
Definition: AliAnaPi0EbE.h:360
TH2F * fhPtTimeDiffPileUp[7]
! pT vs Time difference inside cluster, before any selection
Definition: AliAnaPi0EbE.h:453
virtual TObjArray * GetPHOSClusters() const
TH2F * fhMCPtCentrality[fgkNmcTypes]
! Centrality vs pi0/eta pT coming from X
Definition: AliAnaPi0EbE.h:237
Float_t GetHistoEtaMin() const
TH2F * fhMCPi0SplitPtRecoPtPrim
! pt split reco vs pt prim for pi0 mother
Definition: AliAnaPi0EbE.h:275
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 * fhEtaPhiTriggerEMCALBCUM[11]
! Pseudorapidity vs Phi of pi0 for E > 2, not matched to trigger
Definition: AliAnaPi0EbE.h:228
TH2F * fhTrackMatchedDEtaDPhi
! Eta vs Phi distance between track and cluster, E cluster > 0.5 GeV
Definition: AliAnaPi0EbE.h:415
TH2F * fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap
! pt split reco vs pt prim for eta mother
Definition: AliAnaPi0EbE.h:288
Float_t fNLMECutMin[3]
Minimum energy of the cluster, depending on NLM.
Definition: AliAnaPi0EbE.h:194
TH2F * fhMCPtSphericity[fgkNmcTypes]
! Shower sphericity, eta vs phi
Definition: AliAnaPi0EbE.h:353
TH2F * fhMCPtLambda0[fgkNmcTypes]
! pT vs lambda0 of pi0 pairs but really from MC particle
Definition: AliAnaPi0EbE.h:341
TH2F * fhECellClusterLogRatio
! Log (e cell / e cluster) vs e cluster for selected photons
Definition: AliAnaPi0EbE.h:406
virtual Int_t GetModuleNumber(AliAODPWG4Particle *part) const
TH2F * fhMassPtLocMax[3]
! Pair mass vs pT, for all pairs, for each NLM case
Definition: AliAnaPi0EbE.h:256
TH2F * fhPtAsymmetryLocMax[3]
! E asymmetry of 2 splitted clusters vs cluster E for different NLM
Definition: AliAnaPi0EbE.h:443
TH2F * fhPtTime
! pT vs Time of selected cluster
Definition: AliAnaPi0EbE.h:319
TH2F * fhPtFracMaxCellNoTRD
! pT vs frac max cell of selected cluster, not behind TRD
Definition: AliAnaPi0EbE.h:317
void SetDecayBit(Int_t &tag, UInt_t set) const
TH2F * fhTrackMatchedDEtaNeg
! Eta distance between track and cluster vs cluster E
Definition: AliAnaPi0EbE.h:419
TH2F * fhTrackMatchedMCParticlePt
! Trace origin of matched particle, energy
Definition: AliAnaPi0EbE.h:423
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
TH2F * fhMassPairMCPi0
! Pair mass, origin is same pi0
Definition: AliAnaPi0EbE.h:391
TH2F * fhPtNPileUpTrkVtx
! Cluster pt vs number of track pile-up vertices
Definition: AliAnaPi0EbE.h:464
TH2F * fhMassNoOverlap
! Pair mass vs E, for all pairs, no overlap
Definition: AliAnaPi0EbE.h:263
TH2F * fhMCNLocMaxSplitPt[fgkNmcTypes]
! Number of identified as pi0 vs sum Pt split coming from X, for different NLM
Definition: AliAnaPi0EbE.h:371
TH2F * fhLambda0ForW0[14]
! L0 for 7 defined w0= 3, 3.5 ... 6 for selected photons
Definition: AliAnaPi0EbE.h:409
Float_t fM02MaxCutForIM
Study photon clusters with l0 smaller than cut, in inv. mass analysis.
Definition: AliAnaPi0EbE.h:183
Float_t GetHistoEtaMax() const
virtual void AddAODParticle(AliAODPWG4Particle part)
TH2F * fhAnglePairMCEta
! Pair opening angle, origin is same eta
Definition: AliAnaPi0EbE.h:394
TH2F * fhPtLambda1LocMax[3]
! pT vs lambda1 of selected cluster, 1,2,>2 local maxima in cluster
Definition: AliAnaPi0EbE.h:436
TH2F * fhMCPtFracMaxCell[fgkNmcTypes]
! pT vs fraction of max cell
Definition: AliAnaPi0EbE.h:346
Int_t GetHistoPtBins() const
Bool_t fFillSelectClHisto
Fill selected cluster histograms.
Definition: AliAnaPi0EbE.h:180
TH2F * fhNLocMaxPt
! number of maxima in selected clusters
Definition: AliAnaPi0EbE.h:431
TH2F * fhMCMassSplitPt[fgkNmcTypes]
! Pair pT (split) vs Mass coming from X
Definition: AliAnaPi0EbE.h:374
void FillWeightHistograms(AliVCluster *clus)
Calculate cluster energy weights and fill histograms.
TH2F * fhSelectedMassPtNoOverlap
! Pair mass vs pT, for selected pairs, no overlap
Definition: AliAnaPi0EbE.h:267
Bool_t fFillAllNLMHistograms
Fill all NLM dependent histograms.
Definition: AliAnaPi0EbE.h:178
TH2F * fhEOverPNoTRD
! Matched track E cluster over P track vs cluster E, not behind TRD
Definition: AliAnaPi0EbE.h:428
Int_t fNLMCutMax
Remove clusters/cells with number of local maxima larger than this value.
Definition: AliAnaPi0EbE.h:177
TH2F * fhSelectedMassSplitPt
! Pair mass vs pT (split), for selected pairs
Definition: AliAnaPi0EbE.h:252
TH1F * fhEReject
! Number of rejected as pi0/eta vs E
Definition: AliAnaPi0EbE.h:240
TH2F * fhPtPhi
! Pt vs phi of identified pi0/eta
Definition: AliAnaPi0EbE.h:219
Float_t fMinDist2
Cuts on Minimal distance to study acceptance evaluation.
Definition: AliAnaPi0EbE.h:192
TH2F * fhSelectedMass
! Pair mass vs E, for selected pairs
Definition: AliAnaPi0EbE.h:250
AliVTrack * GetMatchedTrack(AliVCluster *cluster, AliVEvent *event, Int_t index=-1) const
void FillRejectedClusterHistograms(Int_t mctag, Int_t nMaxima)
TLorentzVector fMomentum2
! Cluster/photon momentum, kinematic temporal containers.
Definition: AliAnaPi0EbE.h:209
void MakeInvMassInCalorimeter()
Int_t GetMCIndex(Int_t aodTag)
Float_t fMinDist
Minimal distance to bad channel to accept cluster.
Definition: AliAnaPi0EbE.h:191
Int_t GetIdentifiedParticleTypeFromClusterSplitting(AliVCluster *cluster, AliVCaloCells *cells, AliCalorimeterUtils *caloutils, Double_t vertex[3], Int_t &nLocMax, Double_t &mass, Double_t &angle, TLorentzVector &l1, TLorentzVector &l2, Int_t &absId1, Int_t &absId2, Float_t &distbad1, Float_t &distbad2, Bool_t &fidcut1, Bool_t &fidcut2) const
Definition: