AliPhysics  2e7186c (2e7186c)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnaParticleIsolation.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 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 <TClonesArray.h>
18 #include <TList.h>
19 #include <TObjString.h>
20 #include <TH2F.h>
21 #include <TH3F.h>
22 #include <TClass.h>
23 #include <TH2F.h>
24 #include "TParticle.h"
25 #include "TDatabasePDG.h"
26 
27 // --- Analysis system ---
29 #include "AliCaloTrackReader.h"
30 #include "AliStack.h"
31 #include "AliIsolationCut.h"
32 #include "AliFiducialCut.h"
33 #include "AliMCAnalysisUtils.h"
35 #include "AliAODMCParticle.h"
36 #include "AliAODPWG4ParticleCorrelation.h"
37 #include "AliMCAnalysisUtils.h"
38 #include "AliVTrack.h"
39 #include "AliVCluster.h"
40 #include "AliESDEvent.h"
41 #include "AliAODEvent.h"
42 
43 // --- Detectors ---
44 #include "AliEMCALGeometry.h"
45 #include "AliPHOSGeoUtils.h"
46 
50 
51 //__________________________________________________
53 //__________________________________________________
56 fIsoDetector(-1), fIsoDetectorString(""),
57 fReMakeIC(0), fMakeSeveralIC(0),
58 fFillTMHisto(0), fFillSSHisto(1), fFillEMCALRegionSSHistograms(0),
59 fFillUEBandSubtractHistograms(1), fFillCellHistograms(0),
60 fFillOverlapHistograms(0), fStudyFECCorrelation(0),
61 fFillTaggedDecayHistograms(0), fNDecayBits(0),
62 fDecayBits(), fDecayTagsM02Cut(0),
63 fFillNLMHistograms(0),
64 fLeadingOnly(0), fCheckLeadingWithNeutralClusters(0),
65 fSelectPrimariesInCone(0), fMakePrimaryPi0DecayStudy(0),
66 fFillBackgroundBinHistograms(0), fNBkgBin(0),
67 fFillPtTrigBinHistograms(0), fNPtTrigBin(0),
68 fMinCellsAngleOverlap(0),
69 // Several IC
70 fNCones(0), fNPtThresFrac(0),
71 fConeSizes(), fPtThresholds(),
72 fPtFractions(), fSumPtThresholds(),
73 fStudyPtCutInCone(0), fNPtCutsInCone(0), fPtCutInCone(),
74 fMomentum(), fMomIso(),
75 fMomDaugh1(), fMomDaugh2(),
76 fTrackVector(), fProdVertex(),
77 fCluster(0), fClustersArr(0),
78 // Histograms
79 fhEIso(0), fhPtIso(0),
80 fhPtCentralityIso(0), fhPtEventPlaneIso(0),
81 fhPtNLocMaxIso(0),
82 fhPhiIso(0), fhEtaIso(0), fhEtaPhiIso(0),
83 fhEtaPhiNoIso(0),
84 fhENoIso(0), fhPtNoIso(0), fhPtNLocMaxNoIso(0),
85 fhPtInCone(0),
86 fhPtClusterInCone(0), fhPtCellInCone(0), fhPtTrackInCone(0),
87 fhPtTrackInConeOtherBC(0), fhPtTrackInConeOtherBCPileUpSPD(0),
88 fhPtTrackInConeBC0(0), fhPtTrackInConeVtxBC0(0),
89 fhPtTrackInConeBC0PileUpSPD(0),
90 fhPtInConePileUp(), fhPtInConeCent(0),
91 fhPerpConeSumPt(0), fhPtInPerpCone(0),
92 fhEtaPhiInConeCluster(0), fhEtaPhiCluster(0),
93 fhEtaPhiInConeTrack(0), fhEtaPhiTrack(0),
94 fhEtaBandCluster(0), fhPhiBandCluster(0),
95 fhEtaBandTrack(0), fhPhiBandTrack(0),
96 fhEtaBandCell(0), fhPhiBandCell(0),
97 fhConePtLead(0), fhConePtLeadCluster(0), fhConePtLeadTrack(0),
98 fhConePtLeadClustervsTrack(0), fhConePtLeadClusterTrackFrac(0),
99 fhConeSumPt(0), fhPtLambda0Eiso(0), fhConeSumPtCellTrack(0),
100 fhConeSumPtCell(0), fhConeSumPtCluster(0), fhConeSumPtTrack(0),
101 fhConeSumPtEtaBandUECluster(0), fhConeSumPtPhiBandUECluster(0),
102 fhConeSumPtEtaBandUETrack(0), fhConeSumPtPhiBandUETrack(0),
103 fhConeSumPtEtaBandUECell(0), fhConeSumPtPhiBandUECell(0),
104 fhConeSumPtTrigEtaPhi(0),
105 fhConeSumPtCellTrackTrigEtaPhi(0),
106 fhConeSumPtEtaBandUEClusterTrigEtaPhi(0), fhConeSumPtPhiBandUEClusterTrigEtaPhi(0),
107 fhConeSumPtEtaBandUETrackTrigEtaPhi(0), fhConeSumPtPhiBandUETrackTrigEtaPhi(0),
108 fhConeSumPtEtaBandUECellTrigEtaPhi(0), fhConeSumPtPhiBandUECellTrigEtaPhi(0),
109 fhConeSumPtEtaUESub(0), fhConeSumPtPhiUESub(0),
110 fhConeSumPtEtaUESubTrigEtaPhi(0), fhConeSumPtPhiUESubTrigEtaPhi(0),
111 fhConeSumPtEtaUESubTrackCell(0), fhConeSumPtPhiUESubTrackCell(0),
112 fhConeSumPtEtaUESubTrackCellTrigEtaPhi(0), fhConeSumPtPhiUESubTrackCellTrigEtaPhi(0),
113 fhConeSumPtEtaUESubCluster(0), fhConeSumPtPhiUESubCluster(0),
114 fhConeSumPtEtaUESubClusterTrigEtaPhi(0), fhConeSumPtPhiUESubClusterTrigEtaPhi(0),
115 fhConeSumPtEtaUESubCell(0), fhConeSumPtPhiUESubCell(0),
116 fhConeSumPtEtaUESubCellTrigEtaPhi(0), fhConeSumPtPhiUESubCellTrigEtaPhi(0),
117 fhConeSumPtEtaUESubTrack(0), fhConeSumPtPhiUESubTrack(0),
118 fhConeSumPtEtaUESubTrackTrigEtaPhi(0), fhConeSumPtPhiUESubTrackTrigEtaPhi(0),
119 fhFractionTrackOutConeEta(0), fhFractionTrackOutConeEtaTrigEtaPhi(0),
120 fhFractionClusterOutConeEta(0), fhFractionClusterOutConeEtaTrigEtaPhi(0),
121 fhFractionClusterOutConePhi(0), fhFractionClusterOutConePhiTrigEtaPhi(0),
122 fhFractionCellOutConeEta(0), fhFractionCellOutConeEtaTrigEtaPhi(0),
123 fhFractionCellOutConePhi(0), fhFractionCellOutConePhiTrigEtaPhi(0),
124 fhConeSumPtClustervsTrack(0), fhConeSumPtClusterTrackFrac(0),
125 fhConeSumPtEtaUESubClustervsTrack(0), fhConeSumPtPhiUESubClustervsTrack(0),
126 fhConeSumPtCellvsTrack(0),
127 fhConeSumPtEtaUESubCellvsTrack(0), fhConeSumPtPhiUESubCellvsTrack(0),
128 fhEtaBandClustervsTrack(0), fhPhiBandClustervsTrack(0),
129 fhEtaBandNormClustervsTrack(0), fhPhiBandNormClustervsTrack(0),
130 fhEtaBandCellvsTrack(0), fhPhiBandCellvsTrack(0),
131 fhEtaBandNormCellvsTrack(0), fhPhiBandNormCellvsTrack(0),
132 fhConeSumPtSubvsConeSumPtTotPhiTrack(0), fhConeSumPtSubNormvsConeSumPtTotPhiTrack(0),
133 fhConeSumPtSubvsConeSumPtTotEtaTrack(0), fhConeSumPtSubNormvsConeSumPtTotEtaTrack(0),
134 fhConeSumPtSubvsConeSumPtTotPhiCluster(0), fhConeSumPtSubNormvsConeSumPtTotPhiCluster(0),
135 fhConeSumPtSubvsConeSumPtTotEtaCluster(0), fhConeSumPtSubNormvsConeSumPtTotEtaCluster(0),
136 fhConeSumPtSubvsConeSumPtTotPhiCell(0), fhConeSumPtSubNormvsConeSumPtTotPhiCell(0),
137 fhConeSumPtSubvsConeSumPtTotEtaCell(0), fhConeSumPtSubNormvsConeSumPtTotEtaCell(0),
138 fhConeSumPtVSUETracksEtaBand(0), fhConeSumPtVSUETracksPhiBand(0),
139 fhConeSumPtVSUEClusterEtaBand(0), fhConeSumPtVSUEClusterPhiBand(0),
140 fhPtPrimMCPi0DecayPairOutOfCone(0),
141 fhPtPrimMCPi0DecayPairOutOfAcceptance(0),
142 fhPtPrimMCPi0DecayPairOutOfAcceptanceNoOverlap(0),
143 fhPtPrimMCPi0DecayPairAcceptInConeLowPt(0),
144 fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlap(0),
145 fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlapCaloE(0),
146 fhPtPrimMCPi0DecayPairNoOverlap(0),
147 fhPtPrimMCPi0DecayIsoPairOutOfCone(0),
148 fhPtPrimMCPi0DecayIsoPairOutOfAcceptance(0),
149 fhPtPrimMCPi0DecayIsoPairOutOfAcceptanceNoOverlap(0),
150 fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPt(0),
151 fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlap(0),
152 fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlapCaloE(0),
153 fhPtPrimMCPi0DecayIsoPairNoOverlap(0),
154 fhPtPrimMCPi0Overlap(0), fhPtPrimMCPi0IsoOverlap(0),
155 fhPtPrimMCEtaDecayPairOutOfCone(0),
156 fhPtPrimMCEtaDecayPairOutOfAcceptance(0),
157 fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap(0),
158 fhPtPrimMCEtaDecayPairAcceptInConeLowPt(0),
159 fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap(0),
160 fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE(0),
161 fhPtPrimMCEtaDecayPairNoOverlap(0),
162 fhPtPrimMCEtaDecayIsoPairOutOfCone(0),
163 fhPtPrimMCEtaDecayIsoPairOutOfAcceptance(0),
164 fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap(0),
165 fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt(0),
166 fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap(0),
167 fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE(0),
168 fhPtPrimMCEtaDecayIsoPairNoOverlap(0),
169 fhPtPrimMCEtaOverlap(0), fhPtPrimMCEtaIsoOverlap(0),
170 fhPtLeadConeBin(0), fhSumPtConeBin(0),
171 fhPtLeadConeBinMC(0), fhSumPtConeBinMC(0),
172 fhPtLeadConeBinDecay(0), fhSumPtConeBinDecay(0),
173 fhPtLeadConeBinLambda0(0), fhSumPtConeBinLambda0(0),
174 fhPtLeadConeBinLambda0MC(0), fhSumPtConeBinLambda0MC(0),
175 fhPtTrigBinPtLeadCone(0), fhPtTrigBinSumPtCone(0),
176 fhPtTrigBinPtLeadConeMC(0), fhPtTrigBinSumPtConeMC(0),
177 fhPtTrigBinPtLeadConeDecay(0), fhPtTrigBinSumPtConeDecay(0),
178 fhPtTrigBinLambda0vsPtLeadCone(0), fhPtTrigBinLambda0vsSumPtCone(0),
179 fhPtTrigBinLambda0vsPtLeadConeMC(0), fhPtTrigBinLambda0vsSumPtConeMC(0),
180 // Number of local maxima in cluster
181 fhNLocMax(),
182 fhELambda0LocMax1(), fhELambda1LocMax1(),
183 fhELambda0LocMax2(), fhELambda1LocMax2(),
184 fhELambda0LocMaxN(), fhELambda1LocMaxN(),
185 // PileUp
186 fhEIsoPileUp(), fhPtIsoPileUp(),
187 fhENoIsoPileUp(), fhPtNoIsoPileUp(),
188 fhTimeENoCut(0), fhTimeESPD(0), fhTimeESPDMulti(0),
189 fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
190 fhTimeNPileUpVertContributors(0),
191 fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0),
192 fhConeSumPtClusterPerPtCut(0), fhConeSumPtClusterPerPtCutLargePtTrig(0),
193 fhConeSumPtTrackPerPtCut(0), fhConeSumPtTrackPerPtCutLargePtTrig(0),
194 fhConeSumPtClusterFECCorrPair(0), fhConeSumPtClusterFECCorrOdd(0),
195 fhConeSumPtClusterFECCorrPair2Max(0), fhConeSumPtClusterFECCorrOdd2Max(0),
196 fhConeSumPtClusterFECCorrPairHighCut(0), fhConeSumPtClusterFECCorrOddHighCut(0),
197 fhConeSumPtClusterFECCorrPair2MaxHighCut(0), fhConeSumPtClusterFECCorrOdd2MaxHighCut(0)
198 {
199  InitParameters();
200 
201  for(Int_t i = 0; i < 5 ; i++)
202  {
203  fConeSizes[i] = 0 ;
204 
205  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
206  fhSumPtLeadingPtMC[imc][i] = 0 ;
207 
208  for(Int_t j = 0; j < 5 ; j++)
209  {
210  fhPtThresIsolated [i][j] = 0 ;
211  fhPtFracIsolated [i][j] = 0 ;
212  fhSumPtIsolated [i][j] = 0 ;
213 
214  fhEtaPhiPtThresIso [i][j] = 0 ;
215  fhEtaPhiPtThresDecayIso [i][j] = 0 ;
216  fhPtPtThresDecayIso [i][j] = 0 ;
217 
218  fhEtaPhiPtFracIso [i][j] = 0 ;
219  fhEtaPhiPtFracDecayIso [i][j] = 0 ;
220  fhPtPtFracDecayIso [i][j] = 0 ;
221  fhPtPtSumDecayIso [i][j] = 0 ;
222  fhPtSumDensityIso [i][j] = 0 ;
223  fhPtSumDensityDecayIso [i][j] = 0 ;
224  fhEtaPhiSumDensityIso [i][j] = 0 ;
225  fhEtaPhiSumDensityDecayIso [i][j] = 0 ;
226  fhPtFracPtSumIso [i][j] = 0 ;
227  fhPtFracPtSumDecayIso [i][j] = 0 ;
228  fhEtaPhiFracPtSumIso [i][j] = 0 ;
229  fhEtaPhiFracPtSumDecayIso [i][j] = 0 ;
230 
231  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
232  {
233  fhPtThresIsolatedMC[imc][i][j] = 0 ;
234  fhPtFracIsolatedMC [imc][i][j] = 0 ;
235  fhSumPtIsolatedMC [imc][i][j] = 0 ;
236 
237  }
238  }
239  }
240 
241  for(Int_t ibit =0; ibit < AliNeutralMesonSelection::fgkMaxNDecayBits; ibit++)
242  {
243  for(Int_t iso =0; iso < 2; iso++)
244  {
245  fhPtDecay [iso][ibit] = 0;
246  fhEtaPhiDecay [iso][ibit] = 0;
247  fhPtLambda0Decay[iso][ibit] = 0;
248  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
249  fhPtDecayMC[iso][ibit][imc] = 0;
250  }
251  }
252 
253  for(Int_t i = 0; i < 5 ; i++)
254  {
255  fPtFractions [i] = 0 ;
256  fPtThresholds [i] = 0 ;
257  fSumPtThresholds[i] = 0 ;
258 
259  fhSumPtLeadingPt [i] = 0 ;
260  fhPtLeadingPt [i] = 0 ;
261  fhPerpSumPtLeadingPt[i] = 0 ;
262  fhPerpPtLeadingPt [i] = 0 ;
263  }
264 
265  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
266  {
267  fhPtNoIsoMC [imc] = 0;
268  fhPtIsoMC [imc] = 0;
269  fhPhiIsoMC [imc] = 0;
270  fhEtaIsoMC [imc] = 0;
271 
272  for(Int_t i = 0; i < 2 ; i++)
273  {
274  fhPtLambda0MC [imc][i] = 0;
275  fhPtLambda0MCConv [imc][i] = 0;
276  fhPtLambda0MCWith1Overlap [imc][i] = 0;
277  fhPtLambda0MCConvWith1Overlap[imc][i] = 0;
278  fhPtLambda0MCWithNOverlap [imc][i] = 0;
279  fhPtLambda0MCConvWithNOverlap[imc][i] = 0;
280  fhPtNOverlap [imc][i] = 0;
281  fhPtNOverlapConv [imc][i] = 0;
282  fhTrackMatchedDEtaMC [imc][i] = 0 ;
283  fhTrackMatchedDPhiMC [imc][i] = 0 ;
284  fhTrackMatchedDEtaDPhiMC [imc][i] = 0 ;
285  }
286  }
287 
288  for(Int_t i = 0; i < 2 ; i++)
289  {
291  fhdEdx [i] = 0 ; fhEOverP [i] = 0 ; fhTrackMatchedMCParticle[i] = 0 ;
292  fhELambda0 [i] = 0 ; fhPtLambda0 [i] = 0 ; //fhELambda1 [i] = 0 ;
293  fhELambda0TRD [i] = 0 ; fhPtLambda0TRD [i] = 0 ; //fhELambda1TRD [i] = 0 ;
294 
295  // Number of local maxima in cluster
296  fhNLocMax [i] = 0 ;
297  fhELambda0LocMax1[i] = 0 ; fhELambda1LocMax1[i] = 0 ;
298  fhELambda0LocMax2[i] = 0 ; fhELambda1LocMax2[i] = 0 ;
299  fhELambda0LocMaxN[i] = 0 ; fhELambda1LocMaxN[i] = 0 ;
300 
302  for(Int_t iR = 0; iR < 6; iR++) fhMCConversionLambda0RcutTRD[iR][i] = 0;
303 
304  for(Int_t ieta = 0; ieta < 4; ieta++)
305  {
306  for(Int_t iphi = 0; iphi < 3; iphi++)
307  {
308 // fhLam0EMCALRegion [i][ieta][iphi] = 0;
309 // fhLam0EMCALRegionTRD[i][ieta][iphi] = 0;
310 //
311 // for(Int_t ireg = 0; ireg < 6; ireg++)
312 // {
313 // fhLam0EMCALRegionMCConvRcut [i][ieta][iphi][ireg] = 0;
314 // fhLam0EMCALRegionTRDMCConvRcut[i][ieta][iphi][ireg] = 0;
315 // }
316 
317  for(Int_t ism =0; ism < 20; ism++)
318  {
319  fhLam0EMCALRegionPerSM[i][ieta][iphi][ism] = 0;
320  }
321  }
322  }
323  for(Int_t j = 0; j < 7; j++) fhEtaPhiLam0BinPtBin[i][j] = 0 ;
324  }
325 
326  // Acceptance
327  for(Int_t i = 0; i < fgkNmcPrimTypes; i++)
328  {
329  fhPtPrimMCiso[i] = 0;
330  fhEPrimMC [i] = 0;
331  fhPtPrimMC [i] = 0;
332  fhEtaPrimMC [i] = 0;
333  fhPhiPrimMC [i] = 0;
334  }
335 
336  // Pile-Up
337 
338  for(Int_t i = 0 ; i < 7 ; i++)
339  {
340  fhPtInConePileUp[i] = 0 ;
341  fhEIsoPileUp [i] = 0 ;
342  fhPtIsoPileUp [i] = 0 ;
343  fhENoIsoPileUp [i] = 0 ;
344  fhPtNoIsoPileUp [i] = 0 ;
345  }
346 }
347 
348 //_______________________________________________________________________________________________
350 //_______________________________________________________________________________________________
351 void AliAnaParticleIsolation::CalculateCaloUEBand(AliAODPWG4ParticleCorrelation * pCandidate,
352  Float_t & etaBandPtSum, Float_t & phiBandPtSum)
353 {
354  if( GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kOnlyCharged ) return ;
355 
356  Float_t conesize = GetIsolationCut()->GetConeSize();
357 
358  // Select the Calorimeter
359  TObjArray * pl = 0x0;
360  if (GetCalorimeter() == kPHOS )
361  pl = GetPHOSClusters();
362  else if (GetCalorimeter() == kEMCAL)
363  pl = GetEMCALClusters();
364 
365  if(!pl) return ;
366 
367  // Get vertex for cluster momentum calculation
368  Double_t vertex[] = {0,0,0} ; //vertex ;
369  if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
370  GetReader()->GetVertex(vertex);
371 
372  Float_t ptTrig = pCandidate->Pt() ;
373  Float_t phiTrig = pCandidate->Phi();
374  Float_t etaTrig = pCandidate->Eta();
375 
376  for(Int_t icluster=0; icluster < pl->GetEntriesFast(); icluster++)
377  {
378  AliVCluster* cluster = (AliVCluster *) pl->At(icluster);
379 
380  if ( !cluster )
381  {
382  AliWarning("Cluster not available?");
383  continue;
384  }
385 
386  // Do not count the candidate (photon or pi0) or the daughters of the candidate
387  if(cluster->GetID() == pCandidate->GetCaloLabel(0) ||
388  cluster->GetID() == pCandidate->GetCaloLabel(1) ) continue ;
389 
390  // Remove matched clusters to tracks if Neutral and Track info is used
392  IsTrackMatched(cluster,GetReader()->GetInputEvent())) continue ;
393 
394  cluster->GetMomentum(fMomentum,vertex) ;//Assume that come from vertex in straight line
395 
396  // Exclude particles in cone
397  Float_t rad = GetIsolationCut()->Radius(etaTrig, phiTrig, fMomentum.Eta(), fMomentum.Phi());
398 
399  // Histograms of eta and phi for all clusters
400  fhEtaPhiCluster->Fill(fMomentum.Eta(), fMomentum.Phi(), GetEventWeight());
401  if(rad < conesize)
402  {
403  // Histogrqmw for all clusters in cone
405  continue ;
406  }
407 
408  // Fill histogram for UE in phi band in EMCal acceptance
409  if(fMomentum.Eta() > (etaTrig-conesize) && fMomentum.Eta() < (etaTrig+conesize))
410  {
411  phiBandPtSum+=fMomentum.Pt();
412  fhPhiBandCluster->Fill(fMomentum.Eta(), fMomentum.Phi(), GetEventWeight());
413 
414  }
415 
416  // Fill histogram for UE in eta band in EMCal acceptance
417  if(fMomentum.Phi() > (phiTrig-conesize) && fMomentum.Phi() < (phiTrig+conesize))
418  {
419  etaBandPtSum+=fMomentum.Pt();
420  fhEtaBandCluster->Fill(fMomentum.Eta(), fMomentum.Phi(), GetEventWeight());
421  }
422  }
423 
424  fhConeSumPtEtaBandUECluster ->Fill(ptTrig , etaBandPtSum, GetEventWeight());
425  fhConeSumPtPhiBandUECluster ->Fill(ptTrig , phiBandPtSum, GetEventWeight());
426  fhConeSumPtEtaBandUEClusterTrigEtaPhi->Fill(etaTrig, phiTrig, etaBandPtSum *GetEventWeight()); // Check
427  fhConeSumPtPhiBandUEClusterTrigEtaPhi->Fill(etaTrig, phiTrig, phiBandPtSum *GetEventWeight()); // Check
428 }
429 
430 //________________________________________________________________________________________________
432 //________________________________________________________________________________________________
433 void AliAnaParticleIsolation::CalculateCaloCellUEBand(AliAODPWG4ParticleCorrelation * pCandidate,
434  Float_t & etaBandPtSumCells, Float_t & phiBandPtSumCells)
435 {
436  if( GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kOnlyCharged ) return ;
437 
438  Float_t conesize = GetIsolationCut()->GetConeSize();
439 
440  Float_t phiTrig = pCandidate->Phi();
441  if(phiTrig<0) phiTrig += TMath::TwoPi();
442 
443  Float_t etaTrig = pCandidate->Eta();
444 
445  if(pCandidate->GetDetectorTag()==kEMCAL)
446  {
447  AliEMCALGeometry* eGeom = AliEMCALGeometry::GetInstance();
448  Int_t absId = -999;
449 
450  if (eGeom->GetAbsCellIdFromEtaPhi(etaTrig,phiTrig,absId))
451  {
452  if(!eGeom->CheckAbsCellId(absId)) return ;
453 
454  // Get absolute (col,row) of trigger particle
455  Int_t nSupMod = eGeom->GetSuperModuleNumber(absId);
456  Int_t nModule = -1;
457  Int_t imEta=-1, imPhi=-1;
458  Int_t ieta =-1, iphi =-1;
459 
460  if (eGeom->GetCellIndex(absId,nSupMod,nModule,imPhi,imEta))
461  {
462  eGeom->GetCellPhiEtaIndexInSModule(nSupMod,nModule,imPhi,imEta,iphi,ieta);
463 
464  Int_t colTrig = ieta;
465  if (nSupMod % 2) colTrig = AliEMCALGeoParams::fgkEMCALCols + ieta ;
466 
467  Int_t rowTrig = iphi + AliEMCALGeoParams::fgkEMCALRows*int(nSupMod/2);
468 
469  Int_t sqrSize = int(conesize/0.0143);
470 
471  AliVCaloCells * cells = GetEMCALCells();
472 
473  Int_t nTotalRows = AliEMCALGeoParams::fgkEMCALRows*16/3 ; // 24*(16/3) 5 full-size Sectors (2 SM) + 1 one-third Sector (2 SM)
474  Int_t nTotalCols = 2*AliEMCALGeoParams::fgkEMCALCols;
475  // printf("nTotalRows %i, nTotalCols %i\n",nTotalRows,nTotalCols);
476  // Loop on cells in eta band
477 
478  Int_t irowmin = rowTrig-sqrSize;
479  if ( irowmin < 0 ) irowmin = 0 ;
480 
481  Int_t irowmax = rowTrig+sqrSize;
482  if ( irowmax > AliEMCALGeoParams::fgkEMCALRows ) irowmax = AliEMCALGeoParams::fgkEMCALRows;
483 
484  for(Int_t irow = irowmin; irow <irowmax; irow++)
485  {
486  for(Int_t icol = 0; icol < nTotalCols; icol++)
487  {
488  Int_t inSector = int(irow/AliEMCALGeoParams::fgkEMCALRows);
489  if(inSector==5) continue;
490  Int_t inSupMod = -1;
491  Int_t icolLoc = -1;
492  if(icol < AliEMCALGeoParams::fgkEMCALCols)
493  {
494  inSupMod = 2*inSector + 1;
495  icolLoc = icol;
496  }
497  else if(icol > AliEMCALGeoParams::fgkEMCALCols - 1)
498  {
499  inSupMod = 2*inSector;
500  icolLoc = icol-AliEMCALGeoParams::fgkEMCALCols;
501  }
502 
503  Int_t irowLoc = irow - AliEMCALGeoParams::fgkEMCALRows*inSector ;
504 
505  // Exclude cells in cone
506  if(TMath::Abs(icol-colTrig) < sqrSize || TMath::Abs(irow-rowTrig) < sqrSize){
507  continue ;
508  }
509 
510  Int_t iabsId = eGeom->GetAbsCellIdFromCellIndexes(inSupMod,irowLoc,icolLoc);
511  if(!eGeom->CheckAbsCellId(iabsId)) continue;
512 
513  etaBandPtSumCells += cells->GetCellAmplitude(iabsId);
514 
515  fhEtaBandCell->Fill(colTrig, rowTrig, GetEventWeight());
516 
517  // printf("ETA inSupMod %i,irowLoc %i,icolLoc %i, iabsId %i, etaBandPtSumCells %f\n",nSupMod,irowLoc,icolLoc,iabsId,etaBandPtSumCells);
518  }
519  }
520 
521  Int_t icolmin = colTrig-sqrSize;
522  if ( icolmin < 0 ) icolmin = 0;
523 
524  Int_t icolmax = colTrig+sqrSize;
525  if ( icolmax > AliEMCALGeoParams::fgkEMCALCols ) icolmax = AliEMCALGeoParams::fgkEMCALCols;
526 
527  // Loop on cells in phi band
528  for(Int_t icol = icolmin; icol < icolmax; icol++)
529  {
530  for(Int_t irow = 0; irow < nTotalRows; irow++)
531  {
532  Int_t inSector = int(irow/AliEMCALGeoParams::fgkEMCALRows);
533  if ( inSector == 5 ) continue ;
534 
535  Int_t inSupMod = -1;
536  Int_t icolLoc = -1;
537  // printf("icol %i, irow %i, inSector %i\n",icol,irow ,inSector);
538 
539  if(icol < AliEMCALGeoParams::fgkEMCALCols)
540  {
541  // printf("icol < AliEMCALGeoParams::fgkEMCALCols %i\n",AliEMCALGeoParams::fgkEMCALCols );
542  inSupMod = 2*inSector + 1;
543  icolLoc = icol;
544  }
545  else if(icol > AliEMCALGeoParams::fgkEMCALCols - 1)
546  {
547  // printf("icol > AliEMCALGeoParams::fgkEMCALCols -1 %i\n",AliEMCALGeoParams::fgkEMCALCols -1 );
548  inSupMod = 2*inSector;
549  icolLoc = icol-AliEMCALGeoParams::fgkEMCALCols;
550  }
551 
552  Int_t irowLoc = irow - AliEMCALGeoParams::fgkEMCALRows*inSector ; // Stesso problema di sopra //
553 
554  // Exclude cells in cone
555  if(TMath::Abs(icol-colTrig) < sqrSize) {
556  //printf("TMath::Abs(icol-colTrig) %i < sqrSize %i\n",TMath::Abs(icol-colTrig) ,sqrSize);continue ;
557  }
558  if(TMath::Abs(irow-rowTrig) < sqrSize) {
559  //printf("TMath::Abs(irow-rowTrig) %i < sqrSize %i\n",TMath::Abs(irow-rowTrig) ,sqrSize);continue ;
560  }
561 
562  Int_t iabsId = eGeom->GetAbsCellIdFromCellIndexes(inSupMod,irowLoc,icolLoc);
563  if(!eGeom->CheckAbsCellId(iabsId))
564  {
565  AliWarning(Form("!eGeom->CheckAbsCellId(iabsId=%i) inSupMod %i irowLoc %i icolLoc %i",iabsId,inSupMod, irowLoc, icolLoc));
566  continue;
567  }
568 
569  phiBandPtSumCells += cells->GetCellAmplitude(iabsId);
570 
571  fhPhiBandCell->Fill(colTrig, rowTrig, GetEventWeight());
572  //printf("inSupMod %i,irowLoc %i,icolLoc %i, iabsId %i, phiBandPtSumCells %f\n",nSupMod,irowLoc,icolLoc,iabsId,phiBandPtSumCells);
573  }
574  }
575  }
576  }
577  }
578 
579  Float_t ptTrig = pCandidate->Pt();
580 
581  fhConeSumPtEtaBandUECell ->Fill(ptTrig , etaBandPtSumCells, GetEventWeight());
582  fhConeSumPtPhiBandUECell ->Fill(ptTrig , phiBandPtSumCells, GetEventWeight());
583  fhConeSumPtEtaBandUECellTrigEtaPhi->Fill(etaTrig, phiTrig, etaBandPtSumCells *GetEventWeight()); // Check
584  fhConeSumPtPhiBandUECellTrigEtaPhi->Fill(etaTrig, phiTrig, phiBandPtSumCells *GetEventWeight()); // Check
585 }
586 
587 //________________________________________________________________________________________________
589 //________________________________________________________________________________________________
590 void AliAnaParticleIsolation::CalculateTrackUEBand(AliAODPWG4ParticleCorrelation * pCandidate,
591  Float_t & etaBandPtSum, Float_t & phiBandPtSum)
592 {
593  if( GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kOnlyNeutral ) return ;
594 
595  Float_t conesize = GetIsolationCut()->GetConeSize();
596 
597  Double_t sumptPerp= 0. ;
598  Float_t ptTrig = pCandidate->Pt() ;
599  Float_t phiTrig = pCandidate->Phi();
600  Float_t etaTrig = pCandidate->Eta();
601 
602  TObjArray * trackList = GetCTSTracks() ;
603  for(Int_t itrack=0; itrack < trackList->GetEntriesFast(); itrack++)
604  {
605  AliVTrack* track = (AliVTrack *) trackList->At(itrack);
606 
607  if(!track)
608  {
609  AliWarning("Track not available?");
610  continue;
611  }
612 
613  // In case of isolation of single tracks or conversion photon (2 tracks) or pi0 (4 tracks),
614  // do not count the candidate or the daughters of the candidate
615  // in the isolation conte
616  if ( pCandidate->GetDetectorTag() == kCTS ) // make sure conversions are tagged as kCTS!!!
617  {
618  Int_t trackID = GetReader()->GetTrackID(track) ; // needed instead of track->GetID() since AOD needs some manipulations
619  Bool_t contained = kFALSE;
620 
621  for(Int_t i = 0; i < 4; i++)
622  {
623  if( trackID == pCandidate->GetTrackLabel(i) ) contained = kTRUE;
624  }
625 
626  if ( contained ) continue ;
627  }
628 
629  // Histogram of eta:phi for all tracks
630  fhEtaPhiTrack->Fill(track->Eta(), track->Phi(), GetEventWeight());
631 
632  //exclude particles in cone
633  Float_t rad = GetIsolationCut()->Radius(etaTrig, phiTrig, track->Eta(), track->Phi());
634  if(rad < conesize)
635  {
636  // Histogram of eta:phi for all tracks in cone
637  fhEtaPhiInConeTrack->Fill(track->Eta(), track->Phi(), GetEventWeight());
638  continue ;
639  }
640 
641  // Fill histogram for UE in phi band
642  if(track->Eta() > (etaTrig-conesize) && track->Eta() < (etaTrig+conesize))
643  {
644  phiBandPtSum+=track->Pt();
645  fhPhiBandTrack->Fill(track->Eta(), track->Phi(), GetEventWeight());
646  }
647 
648  // Fill histogram for UE in eta band in EMCal acceptance
649  if(track->Phi() > (phiTrig-conesize) && track->Phi() < (phiTrig+conesize))
650  {
651  etaBandPtSum+=track->Pt();
652  fhEtaBandTrack->Fill(track->Eta(), track->Phi(), GetEventWeight());
653  }
654 
655  // Fill the histograms at +-45 degrees in phi from trigger particle, perpedicular to trigger axis in phi
656  Double_t pTrack = TMath::Sqrt(track->Px()*track->Px()+track->Py()*track->Py());
657  Double_t dPhi = phiTrig - track->Phi() + TMath::PiOver2();
658  Double_t dEta = etaTrig - track->Eta();
659  Double_t arg = dPhi*dPhi + dEta*dEta;
660 
661  if(TMath::Sqrt(arg) < conesize)
662  {
663  fhPtInPerpCone->Fill(ptTrig, pTrack, GetEventWeight());
664  sumptPerp+=track->Pt();
665  }
666 
667  dPhi = phiTrig - track->Phi() - TMath::PiOver2();
668  arg = dPhi*dPhi + dEta*dEta;
669 
670  if(TMath::Sqrt(arg) < conesize)
671  {
672  fhPtInPerpCone->Fill(ptTrig, pTrack, GetEventWeight());
673  sumptPerp+=track->Pt();
674  }
675  }
676 
677  fhPerpConeSumPt ->Fill(ptTrig , sumptPerp , GetEventWeight());
678  fhConeSumPtEtaBandUETrack ->Fill(ptTrig , etaBandPtSum, GetEventWeight());
679  fhConeSumPtPhiBandUETrack ->Fill(ptTrig , phiBandPtSum, GetEventWeight());
680  fhConeSumPtEtaBandUETrackTrigEtaPhi->Fill(etaTrig, phiTrig, etaBandPtSum *GetEventWeight()); // check
681  fhConeSumPtPhiBandUETrackTrigEtaPhi->Fill(etaTrig, phiTrig, phiBandPtSum *GetEventWeight()); // check
682 }
683 
684 //_____________________________________________________________________________________________________________________________________
686 //_____________________________________________________________________________________________________________________________________
687 void AliAnaParticleIsolation::CalculateNormalizeUEBandPerUnitArea(AliAODPWG4ParticleCorrelation * pCandidate, Float_t coneptsumCluster,
688  Float_t coneptsumCell, Float_t coneptsumTrack,
689  Float_t &etaBandptsumTrackNorm, Float_t &etaBandptsumClusterNorm)
690 {
691  Float_t etaUEptsumTrack = 0 ;
692  Float_t phiUEptsumTrack = 0 ;
693  Float_t etaUEptsumCluster = 0 ;
694  Float_t phiUEptsumCluster = 0 ;
695  Float_t etaUEptsumCell = 0 ;
696  Float_t phiUEptsumCell = 0 ;
697 
698  Int_t partTypeInCone = GetIsolationCut()->GetParticleTypeInCone();
699 
700  // Do the normalization
701 
702  Float_t conesize = GetIsolationCut()->GetConeSize();
703  Float_t coneA = conesize*conesize*TMath::Pi(); // A = pi R^2, isolation cone area
704  Float_t ptTrig = pCandidate->Pt() ;
705  Float_t phiTrig = pCandidate->Phi();
706  Float_t etaTrig = pCandidate->Eta();
707 
708 
709  // ------ //
710  // Tracks //
711  // ------ //
712  Float_t phiUEptsumTrackNorm = 0 ;
713  Float_t etaUEptsumTrackNorm = 0 ;
714  Float_t coneptsumTrackSubPhi = 0 ;
715  Float_t coneptsumTrackSubEta = 0 ;
716  Float_t coneptsumTrackSubPhiNorm = 0 ;
717  Float_t coneptsumTrackSubEtaNorm = 0 ;
718  etaBandptsumTrackNorm = 0 ;
719 
720  if ( partTypeInCone != AliIsolationCut::kOnlyNeutral )
721  {
722  // Sum the pT in the phi or eta band for clusters or tracks
723  CalculateTrackUEBand (pCandidate,etaUEptsumTrack ,phiUEptsumTrack );// rajouter ici l'histo eta phi
724 
725  // Fill histograms
726  fhConeSumPtVSUETracksEtaBand->Fill(coneptsumTrack, etaUEptsumTrack, GetEventWeight());
727  fhConeSumPtVSUETracksPhiBand->Fill(coneptsumTrack, phiUEptsumTrack, GetEventWeight());
728 
729 
730  Float_t correctConeSumTrack = 1;
731  Float_t correctConeSumTrackPhi = 1;
732 
734  phiUEptsumTrack,etaUEptsumTrack,
735  phiUEptsumTrackNorm,etaUEptsumTrackNorm,
736  correctConeSumTrack,correctConeSumTrackPhi);
737 
738  coneptsumTrackSubPhi = coneptsumTrack - phiUEptsumTrackNorm;
739  coneptsumTrackSubEta = coneptsumTrack - etaUEptsumTrackNorm;
740 
741  etaBandptsumTrackNorm = etaUEptsumTrackNorm;
742 
743  fhConeSumPtPhiUESubTrack ->Fill(ptTrig , coneptsumTrackSubPhi, GetEventWeight());
744  fhConeSumPtPhiUESubTrackTrigEtaPhi ->Fill(etaTrig, phiTrig, coneptsumTrackSubPhi *GetEventWeight()); // check
745  fhConeSumPtEtaUESubTrack ->Fill(ptTrig , coneptsumTrackSubEta, GetEventWeight());
746  fhConeSumPtEtaUESubTrackTrigEtaPhi ->Fill(etaTrig, phiTrig, coneptsumTrackSubEta *GetEventWeight()); // check
747 
748  fhFractionTrackOutConeEta ->Fill(ptTrig , correctConeSumTrack-1, GetEventWeight());
749  fhFractionTrackOutConeEtaTrigEtaPhi->Fill(etaTrig, phiTrig,correctConeSumTrack-1 *GetEventWeight()); // check
750 
751  if(coneptsumTrack > 0)
752  {
753  coneptsumTrackSubPhiNorm = coneptsumTrackSubPhi/coneptsumTrack;
754  coneptsumTrackSubEtaNorm = coneptsumTrackSubEta/coneptsumTrack;
755  }
756 
757  fhConeSumPtSubvsConeSumPtTotPhiTrack ->Fill(coneptsumTrack, coneptsumTrackSubPhi , GetEventWeight());
758  fhConeSumPtSubNormvsConeSumPtTotPhiTrack->Fill(coneptsumTrack, coneptsumTrackSubPhiNorm, GetEventWeight());
759  fhConeSumPtSubvsConeSumPtTotEtaTrack ->Fill(coneptsumTrack, coneptsumTrackSubEta , GetEventWeight());
760  fhConeSumPtSubNormvsConeSumPtTotEtaTrack->Fill(coneptsumTrack, coneptsumTrackSubEtaNorm, GetEventWeight());
761  }
762 
763  // ------------------------ //
764  // EMCal Clusters and cells //
765  // ------------------------ //
766  Float_t phiUEptsumClusterNorm = 0 ;
767  Float_t etaUEptsumClusterNorm = 0 ;
768  Float_t coneptsumClusterSubPhi = 0 ;
769  Float_t coneptsumClusterSubEta = 0 ;
770  Float_t coneptsumClusterSubPhiNorm = 0 ;
771  Float_t coneptsumClusterSubEtaNorm = 0 ;
772  Float_t phiUEptsumCellNorm = 0 ;
773  Float_t etaUEptsumCellNorm = 0 ;
774  Float_t coneptsumCellSubPhi = 0 ;
775  Float_t coneptsumCellSubEta = 0 ;
776  Float_t coneptsumCellSubPhiNorm = 0 ;
777  Float_t coneptsumCellSubEtaNorm = 0 ;
778  etaBandptsumClusterNorm = 0;
779 
780  if ( partTypeInCone != AliIsolationCut::kOnlyCharged )
781  {
782  // -------------- //
783  // EMCal clusters //
784  // -------------- //
785 
786  // Sum the pT in the phi or eta band for clusters or tracks
787  CalculateCaloUEBand (pCandidate,etaUEptsumCluster,phiUEptsumCluster);// rajouter ici l'histo eta phi
788 
789  // Fill histograms
790  fhConeSumPtVSUEClusterEtaBand->Fill(coneptsumCluster, etaUEptsumCluster, GetEventWeight());
791  fhConeSumPtVSUEClusterPhiBand->Fill(coneptsumCluster, phiUEptsumCluster, GetEventWeight());
792 
793  Float_t correctConeSumClusterEta = 1;
794  Float_t correctConeSumClusterPhi = 1;
795 
797  phiUEptsumCluster,etaUEptsumCluster,
798  phiUEptsumClusterNorm,etaUEptsumClusterNorm,
799  correctConeSumClusterEta,correctConeSumClusterPhi);
800 
801  // In case that cone is out of eta and phi side, we are over correcting, not too often with the current cuts ...
802  // Comment if not used
803  // Float_t coneBadCellsCoeff =1;
804  // Float_t etaBandBadCellsCoeff=1;
805  // Float_t phiBandBadCellsCoeff=1;
806  // GetIsolationCut()->GetCoeffNormBadCell(pCandidate, GetReader(),coneBadCellsCoeff,etaBandBadCellsCoeff,phiBandBadCellsCoeff) ;
807 
808  //coneptsumCluster=coneptsumCluster*coneBadCellsCoeff*correctConeSumClusterEta*correctConeSumClusterPhi;
809 
810  coneptsumClusterSubPhi = coneptsumCluster - phiUEptsumClusterNorm;
811  coneptsumClusterSubEta = coneptsumCluster - etaUEptsumClusterNorm;
812 
813  etaBandptsumClusterNorm = etaUEptsumClusterNorm;
814 
815  fhConeSumPtPhiUESubCluster ->Fill(ptTrig , coneptsumClusterSubPhi, GetEventWeight());
816  fhConeSumPtPhiUESubClusterTrigEtaPhi ->Fill(etaTrig, phiTrig, coneptsumClusterSubPhi *GetEventWeight()); // check
817  fhConeSumPtEtaUESubCluster ->Fill(ptTrig , coneptsumClusterSubEta, GetEventWeight());
818  fhConeSumPtEtaUESubClusterTrigEtaPhi ->Fill(etaTrig, phiTrig, coneptsumClusterSubEta *GetEventWeight()); // check
819 
820  fhFractionClusterOutConeEta ->Fill(ptTrig , correctConeSumClusterEta-1, GetEventWeight());
821  fhFractionClusterOutConeEtaTrigEtaPhi->Fill(etaTrig, phiTrig, correctConeSumClusterEta-1 *GetEventWeight()); // check
822  fhFractionClusterOutConePhi ->Fill(ptTrig , correctConeSumClusterPhi-1, GetEventWeight());
823  fhFractionClusterOutConePhiTrigEtaPhi->Fill(etaTrig, phiTrig, correctConeSumClusterPhi-1 *GetEventWeight()); // check
824 
825  if(coneptsumCluster!=0)
826  {
827  coneptsumClusterSubPhiNorm = coneptsumClusterSubPhi/coneptsumCluster;
828  coneptsumClusterSubEtaNorm = coneptsumClusterSubEta/coneptsumCluster;
829  }
830 
831  fhConeSumPtSubvsConeSumPtTotPhiCluster ->Fill(coneptsumCluster,coneptsumClusterSubPhi , GetEventWeight());
832  fhConeSumPtSubNormvsConeSumPtTotPhiCluster->Fill(coneptsumCluster,coneptsumClusterSubPhiNorm, GetEventWeight());
833  fhConeSumPtSubvsConeSumPtTotEtaCluster ->Fill(coneptsumCluster,coneptsumClusterSubEta , GetEventWeight());
834  fhConeSumPtSubNormvsConeSumPtTotEtaCluster->Fill(coneptsumCluster,coneptsumClusterSubEtaNorm, GetEventWeight());
835 
836  // ----------- //
837  // EMCal Cells //
838  // ----------- //
839 
840  if ( fFillCellHistograms )
841  {
842  // Sum the pT in the phi or eta band for clusters or tracks
843  CalculateCaloCellUEBand(pCandidate,etaUEptsumCell ,phiUEptsumCell );
844 
845  // Move to AliIsolationCut the calculation not the histograms??
846 
847  //Careful here if EMCal limits changed .. 2010 (4 SM) to 2011-12 (10 SM), for the moment consider 100 deg in phi
848  Float_t emcEtaSize = 0.7*2; // TO FIX
849  Float_t emcPhiSize = TMath::DegToRad()*100.; // TO FIX
850 
851  if(((2*conesize*emcPhiSize)-coneA)!=0)phiUEptsumCellNorm = phiUEptsumCell*(coneA / ((2*conesize*emcPhiSize)-coneA));
852  if(((2*conesize*emcEtaSize)-coneA)!=0)etaUEptsumCellNorm = etaUEptsumCell*(coneA / ((2*conesize*emcEtaSize)-coneA));
853 
854  // Need to correct coneptsumCluster by the fraction of the cone out of the calorimeter cut acceptance!
855 
856  Float_t correctConeSumCellEta = 1;
857  if(TMath::Abs(etaTrig)+conesize > emcEtaSize/2.)
858  {
859  Float_t excess = TMath::Abs(etaTrig) + conesize - emcEtaSize/2.;
860  correctConeSumCellEta = GetIsolationCut()->CalculateExcessAreaFraction(excess);
861  //printf("Excess EMC-Eta %2.3f, coneA %2.2f, excessA %2.2f, angle %2.2f,factor %2.2f\n",excess,coneA, excessA, angle*TMath::RadToDeg(), correctConeSumClusterEta);
862  // Need to correct phi band surface if part of the cone falls out of track cut acceptance!
863  if(((2*(conesize-excess)*emcPhiSize)-(coneA-correctConeSumCellEta))!=0)phiUEptsumCellNorm = phiUEptsumCell*(coneA / ((2*(conesize-excess)*emcPhiSize)-(coneA-correctConeSumCellEta)));
864  }
865 
866  Float_t correctConeSumCellPhi = 1;
867  //printf("EMCPhiTrig %2.2f, conesize %2.2f, sum %2.2f, rest %2.2f \n",phiTrig*TMath::RadToDeg(),conesize*TMath::RadToDeg(),(phiTrig+conesize)*TMath::RadToDeg(),(phiTrig-conesize)*TMath::RadToDeg() );
868  if((phiTrig+conesize > 180*TMath::DegToRad()) ||
869  (phiTrig-conesize < 80*TMath::DegToRad()))
870  {
871  Float_t excess = 0;
872  if( phiTrig+conesize > 180*TMath::DegToRad() ) excess = conesize + phiTrig - 180*TMath::DegToRad() ;
873  else excess = conesize - phiTrig + 80*TMath::DegToRad() ;
874 
875  correctConeSumCellPhi = GetIsolationCut()->CalculateExcessAreaFraction(excess);
876  //printf("Excess EMC-Phi %2.3f, coneA %2.2f, excessA %2.2f, angle %2.2f,factor %2.2f\n",excess,coneA, excessA, angle*TMath::RadToDeg(), correctConeSumClusterPhi);
877 
878  // Need to correct eta band surface if part of the cone falls out of track cut acceptance!
879  if(((2*(conesize-excess)*emcEtaSize)-(coneA-correctConeSumCellPhi))!=0)etaUEptsumCellNorm = etaUEptsumCell*(coneA / ((2*(conesize-excess)*emcEtaSize)-(coneA-correctConeSumCellPhi)));
880  }
881 
882  // In case that cone is out of eta and phi side, we are over correcting, not too often with the current cuts ...
883  coneptsumCellSubPhi = coneptsumCell*correctConeSumCellEta*correctConeSumCellPhi - phiUEptsumCellNorm;
884  coneptsumCellSubEta = coneptsumCell*correctConeSumCellEta*correctConeSumCellPhi - etaUEptsumCellNorm;
885 
886  fhConeSumPtPhiUESubCell ->Fill(ptTrig , coneptsumCellSubPhi, GetEventWeight());
887  fhConeSumPtPhiUESubCellTrigEtaPhi ->Fill(etaTrig, phiTrig, coneptsumCellSubPhi *GetEventWeight()); // check
888  fhConeSumPtEtaUESubCell ->Fill(ptTrig , coneptsumCellSubEta, GetEventWeight());
889  fhConeSumPtEtaUESubCellTrigEtaPhi ->Fill(etaTrig, phiTrig, coneptsumCellSubEta *GetEventWeight()); // check
890 
891  fhFractionCellOutConeEta ->Fill(ptTrig , correctConeSumCellEta-1, GetEventWeight());
892  fhFractionCellOutConeEtaTrigEtaPhi->Fill(etaTrig, phiTrig, correctConeSumCellEta-1 *GetEventWeight()); // check
893  fhFractionCellOutConePhi ->Fill(ptTrig , correctConeSumCellPhi-1, GetEventWeight());
894  fhFractionCellOutConePhiTrigEtaPhi->Fill(etaTrig, phiTrig, correctConeSumCellPhi-1 *GetEventWeight()); // check
895  if ( coneptsumCell > 0.01 )
896  {
897  coneptsumCellSubPhiNorm = coneptsumCellSubPhi/coneptsumCell;
898  coneptsumCellSubEtaNorm = coneptsumCellSubEta/coneptsumCell;
899  }
900 
901  fhConeSumPtSubvsConeSumPtTotPhiCell ->Fill(coneptsumCell,coneptsumCellSubPhi , GetEventWeight());
902  fhConeSumPtSubNormvsConeSumPtTotPhiCell->Fill(coneptsumCell,coneptsumCellSubPhiNorm, GetEventWeight());
903  fhConeSumPtSubvsConeSumPtTotEtaCell ->Fill(coneptsumCell,coneptsumCellSubEta , GetEventWeight());
904  fhConeSumPtSubNormvsConeSumPtTotEtaCell->Fill(coneptsumCell,coneptsumCellSubEtaNorm, GetEventWeight());
905  }
906  }
907 
908  if ( partTypeInCone == AliIsolationCut::kNeutralAndCharged )
909  {
910  // --------------------------- //
911  // Tracks and clusters in cone //
912  // --------------------------- //
913 
914  Double_t sumPhiUESub = coneptsumClusterSubPhi + coneptsumTrackSubPhi;
915  Double_t sumEtaUESub = coneptsumClusterSubEta + coneptsumTrackSubEta;
916 
917  fhConeSumPtPhiUESub ->Fill(ptTrig , sumPhiUESub, GetEventWeight());
918  fhConeSumPtPhiUESubTrigEtaPhi->Fill(etaTrig, phiTrig, sumPhiUESub *GetEventWeight()); // check
919  fhConeSumPtEtaUESub ->Fill(ptTrig , sumEtaUESub, GetEventWeight());
920  fhConeSumPtEtaUESubTrigEtaPhi->Fill(etaTrig, phiTrig, sumEtaUESub *GetEventWeight()); // check
921 
922  fhEtaBandClustervsTrack ->Fill(etaUEptsumCluster ,etaUEptsumTrack , GetEventWeight());
923  fhPhiBandClustervsTrack ->Fill(phiUEptsumCluster ,phiUEptsumTrack , GetEventWeight());
924  fhEtaBandNormClustervsTrack->Fill(etaUEptsumClusterNorm,etaUEptsumTrackNorm, GetEventWeight());
925  fhPhiBandNormClustervsTrack->Fill(phiUEptsumClusterNorm,phiUEptsumTrackNorm, GetEventWeight());
926 
927  fhConeSumPtEtaUESubClustervsTrack->Fill(coneptsumClusterSubEta, coneptsumTrackSubEta, GetEventWeight());
928  fhConeSumPtPhiUESubClustervsTrack->Fill(coneptsumClusterSubPhi, coneptsumTrackSubPhi, GetEventWeight());
929 
930  // ------------------------ //
931  // Tracks and cells in cone //
932  // ------------------------ //
933 
935  {
936  Double_t sumPhiUESubTrackCell = coneptsumCellSubPhi + coneptsumTrackSubPhi;
937  Double_t sumEtaUESubTrackCell = coneptsumCellSubEta + coneptsumTrackSubEta;
938 
939  fhConeSumPtPhiUESubTrackCell ->Fill(ptTrig , sumPhiUESubTrackCell, GetEventWeight());
940  fhConeSumPtPhiUESubTrackCellTrigEtaPhi->Fill(etaTrig, phiTrig, sumPhiUESubTrackCell *GetEventWeight()); // check
941  fhConeSumPtEtaUESubTrackCell ->Fill(ptTrig , sumEtaUESubTrackCell, GetEventWeight());
942  fhConeSumPtEtaUESubTrackCellTrigEtaPhi->Fill(etaTrig, phiTrig, sumEtaUESubTrackCell *GetEventWeight()); // check
943 
944  fhEtaBandCellvsTrack ->Fill(etaUEptsumCell , etaUEptsumTrack , GetEventWeight());
945  fhPhiBandCellvsTrack ->Fill(phiUEptsumCell , phiUEptsumTrack , GetEventWeight());
946  fhEtaBandNormCellvsTrack->Fill(etaUEptsumCellNorm, etaUEptsumTrackNorm, GetEventWeight());
947  fhPhiBandNormCellvsTrack->Fill(phiUEptsumCellNorm, phiUEptsumTrackNorm, GetEventWeight());
948 
949  fhConeSumPtEtaUESubCellvsTrack->Fill(coneptsumCellSubEta, coneptsumTrackSubEta, GetEventWeight());
950  fhConeSumPtPhiUESubCellvsTrack->Fill(coneptsumCellSubPhi, coneptsumTrackSubPhi, GetEventWeight());
951  }
952  }
953 }
954 
955 //______________________________________________________________________________________________________________
957 //______________________________________________________________________________________________________________
958 void AliAnaParticleIsolation::CalculateCaloSignalInCone(AliAODPWG4ParticleCorrelation * aodParticle,
959  Float_t & coneptsumCluster, Float_t & coneptLeadCluster)
960 {
961  coneptLeadCluster = 0;
962  coneptsumCluster = 0;
963 
964  if( GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kOnlyCharged ) return ;
965 
966  Float_t ptTrig = aodParticle->Pt();
967 
968  // Recover reference arrays with clusters and tracks
969  TObjArray * refclusters = aodParticle->GetObjArray(GetAODObjArrayName()+"Clusters");
970  if(!refclusters)
971  {
972  fhConeSumPtCluster ->Fill(ptTrig, coneptsumCluster , GetEventWeight());
973  fhConePtLeadCluster->Fill(ptTrig, coneptLeadCluster, GetEventWeight());
974 
975  return ;
976  }
977 
978  // Get vertex for cluster momentum calculation
979  Double_t vertex[] = {0,0,0} ; //vertex ;
980  if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
981  GetReader()->GetVertex(vertex);
982 
983  Float_t ptcone = 0;
984  Float_t coneptsumClusterPerCut[20];
986  {
987  for(Int_t icut = 0; icut < fNPtCutsInCone; icut++)
988  coneptsumClusterPerCut[icut] = 0;
989  }
990 
991  Float_t ptSumPairFEC = 0;
992  Float_t ptSumPairFEC2Max = 0;
993  Float_t ptSumOddFEC = 0;
994  Float_t ptSumOddFEC2Max = 0;
995  Float_t ptSumPairFECHighCut = 0;
996  Float_t ptSumPairFEC2MaxHighCut = 0;
997  Float_t ptSumOddFECHighCut = 0;
998  Float_t ptSumOddFEC2MaxHighCut = 0;
999 
1000  for(Int_t icalo=0; icalo < refclusters->GetEntriesFast(); icalo++)
1001  {
1002  AliVCluster* calo = (AliVCluster *) refclusters->At(icalo);
1003  calo->GetMomentum(fMomentum,vertex) ;//Assume that come from vertex in straight line
1004 
1005  ptcone = fMomentum.Pt();
1006 
1007  fhPtInCone ->Fill(ptTrig, ptcone, GetEventWeight());
1008  fhPtClusterInCone->Fill(ptTrig, ptcone, GetEventWeight());
1009 
1010  if(IsPileUpAnalysisOn())
1011  {
1012  if(GetReader()->IsPileUpFromSPD()) fhPtInConePileUp[0]->Fill(ptTrig, ptcone, GetEventWeight());
1013  if(GetReader()->IsPileUpFromEMCal()) fhPtInConePileUp[1]->Fill(ptTrig, ptcone, GetEventWeight());
1014  if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtInConePileUp[2]->Fill(ptTrig, ptcone, GetEventWeight());
1015  if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtInConePileUp[3]->Fill(ptTrig, ptcone, GetEventWeight());
1016  if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtInConePileUp[4]->Fill(ptTrig, ptcone, GetEventWeight());
1017  if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtInConePileUp[5]->Fill(ptTrig, ptcone, GetEventWeight());
1018  if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtInConePileUp[6]->Fill(ptTrig, ptcone, GetEventWeight());
1019  }
1020 
1022 
1023  coneptsumCluster+=ptcone;
1024  if(ptcone > coneptLeadCluster) coneptLeadCluster = ptcone;
1025 
1026  if(fStudyPtCutInCone)
1027  {
1028  for(Int_t icut = 0; icut < fNPtCutsInCone; icut++)
1029  {
1030  if ( ptcone > fPtCutInCone[icut] ) coneptsumClusterPerCut[icut]+=ptcone;
1031  }
1032  }
1033 
1035  {
1036  // Find 2 highest energy cells in cluster
1037  Int_t absIdMax = -1;
1038  Int_t absIdMax2 = -1;
1039  Float_t emax = 0;
1040  Float_t emax2 = 0;
1041  for (Int_t ipos = 0; ipos < calo->GetNCells(); ipos++)
1042  {
1043  Int_t absId = calo->GetCellsAbsId()[ipos];
1044 
1045  Float_t eCell = GetEMCALCells()->GetCellAmplitude(absId);
1046 
1047  if ( eCell > emax )
1048  {
1049  emax2 = emax;
1050  absIdMax2 = absIdMax;
1051 
1052  emax = eCell;
1053  absIdMax = absId;
1054  }
1055  else if(eCell > emax2)
1056  {
1057  emax2 = eCell;
1058  absIdMax2 = absId;
1059  }
1060  }
1061 
1062  Int_t absIdCorr[] = {-1,-1,-1,-1};
1063  Bool_t correlMaxOK = GetCaloUtils()->GetFECCorrelatedCellAbsId(absIdMax, absIdCorr);
1064 
1065  Int_t idMax = -1;
1066  Int_t idMax2 = -1;
1067  Bool_t pairCol = kFALSE;
1068  for(Int_t id = 0; id < 4; id++)
1069  {
1070  if ( absIdMax == absIdCorr[id]) idMax = id;
1071  else if( absIdMax2 == absIdCorr[id]) idMax2 = id;
1072  }
1073 
1074  if ( idMax==0 || idMax == 3 ) ptSumPairFEC+=ptcone;
1075  else ptSumOddFEC +=ptcone;
1076 
1077  if ( idMax2 >=0 )
1078  {
1079  if ( idMax==0 || idMax == 3 ) ptSumPairFEC2Max+=ptcone;
1080  else ptSumOddFEC2Max +=ptcone;
1081  }
1082 
1083  if(ptcone > 0.7)
1084  {
1085  if ( idMax==0 || idMax == 3 ) ptSumPairFECHighCut+=ptcone;
1086  else ptSumOddFECHighCut +=ptcone;
1087 
1088  if ( idMax2 >=0 )
1089  {
1090  if ( idMax==0 || idMax == 3 ) ptSumPairFEC2MaxHighCut+=ptcone;
1091  else ptSumOddFEC2MaxHighCut +=ptcone;
1092  }
1093  }
1094  } // FEC corr
1095  }
1096 
1097  fhConeSumPtCluster ->Fill(ptTrig, coneptsumCluster , GetEventWeight());
1098  fhConePtLeadCluster->Fill(ptTrig, coneptLeadCluster, GetEventWeight());
1099 
1100  aodParticle->SetNeutralLeadPtInCone(coneptLeadCluster);
1101  aodParticle->SetNeutralPtSumInCone(coneptsumCluster);
1102 
1103  if(fStudyPtCutInCone)
1104  {
1105  for(Int_t icut = 0; icut < fNPtCutsInCone; icut++)
1106  {
1107  fhConeSumPtClusterPerPtCut->Fill(icut, coneptsumClusterPerCut[icut], GetEventWeight());
1108  if ( ptTrig > 10 ) fhConeSumPtClusterPerPtCutLargePtTrig->Fill(icut, coneptsumClusterPerCut[icut], GetEventWeight());
1109  }
1110  }
1111 
1113  {
1114  fhConeSumPtClusterFECCorrPair ->Fill(ptTrig, ptSumPairFEC, GetEventWeight());
1115  fhConeSumPtClusterFECCorrOdd ->Fill(ptTrig, ptSumOddFEC , GetEventWeight());
1116  fhConeSumPtClusterFECCorrPair2Max ->Fill(ptTrig, ptSumPairFEC2Max, GetEventWeight());
1117  fhConeSumPtClusterFECCorrOdd2Max ->Fill(ptTrig, ptSumOddFEC2Max , GetEventWeight());
1118 
1119  fhConeSumPtClusterFECCorrPairHighCut ->Fill(ptTrig, ptSumPairFECHighCut, GetEventWeight());
1120  fhConeSumPtClusterFECCorrOddHighCut ->Fill(ptTrig, ptSumOddFECHighCut , GetEventWeight());
1121  fhConeSumPtClusterFECCorrPair2MaxHighCut ->Fill(ptTrig, ptSumPairFEC2MaxHighCut, GetEventWeight());
1122  fhConeSumPtClusterFECCorrOdd2MaxHighCut ->Fill(ptTrig, ptSumOddFEC2MaxHighCut , GetEventWeight());
1123  }
1124 }
1125 
1126 //______________________________________________________________________________________________________
1129 //______________________________________________________________________________________________________
1130 void AliAnaParticleIsolation::CalculateCaloCellSignalInCone(AliAODPWG4ParticleCorrelation * aodParticle,
1131  Float_t & coneptsumCell)
1132 {
1133  if( GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kOnlyCharged ) return ;
1134 
1135  Float_t conesize = GetIsolationCut()->GetConeSize();
1136 
1137  Float_t ptTrig = aodParticle->Pt();
1138  Float_t phiTrig = aodParticle->Phi();
1139  if(phiTrig<0) phiTrig += TMath::TwoPi();
1140  Float_t etaTrig = aodParticle->Eta();
1141 
1142  if(aodParticle->GetDetectorTag()==kEMCAL)
1143  {
1144  AliEMCALGeometry* eGeom = AliEMCALGeometry::GetInstance();
1145  Int_t absId = -999;
1146 
1147  if (eGeom->GetAbsCellIdFromEtaPhi(etaTrig,phiTrig,absId))
1148  {
1149  if(!eGeom->CheckAbsCellId(absId)) return ;
1150 
1151  // Get absolute (col,row) of trigger particle
1152  Int_t nSupMod = eGeom->GetSuperModuleNumber(absId);
1153  Int_t nModule = -1;
1154  Int_t imEta=-1, imPhi=-1;
1155  Int_t ieta =-1, iphi =-1;
1156 
1157  if (eGeom->GetCellIndex(absId,nSupMod,nModule,imPhi,imEta))
1158  {
1159  Int_t iEta=-1, iPhi=-1;
1160  eGeom->GetCellPhiEtaIndexInSModule(nSupMod,nModule,imPhi,imEta,iphi,ieta);
1161 
1162  Int_t colTrig = iEta;
1163  if (nSupMod % 2) colTrig = AliEMCALGeoParams::fgkEMCALCols + iEta ;
1164  Int_t rowTrig = iPhi + AliEMCALGeoParams::fgkEMCALRows*int(nSupMod/2);
1165 
1166  Int_t sqrSize = int(conesize/0.0143);
1167 
1168  AliVCaloCells * cells = GetEMCALCells();
1169 
1170  // Loop on cells in cone
1171  for(Int_t irow = rowTrig-sqrSize; irow < rowTrig+sqrSize; irow++)
1172  {
1173  for(Int_t icol = colTrig-sqrSize; icol < colTrig+sqrSize; icol++)
1174  {
1175  Int_t inSector = int(irow/AliEMCALGeoParams::fgkEMCALRows);
1176  if(inSector==5) continue;
1177 
1178  Int_t inSupMod = -1;
1179  Int_t icolLoc = -1;
1180  if(icol < AliEMCALGeoParams::fgkEMCALCols)
1181  {
1182  inSupMod = 2*inSector + 1;
1183  icolLoc = icol;
1184  }
1185  else if(icol > AliEMCALGeoParams::fgkEMCALCols - 1)
1186  {
1187  inSupMod = 2*inSector;
1188  icolLoc = icol-AliEMCALGeoParams::fgkEMCALCols;
1189  }
1190 
1191  Int_t irowLoc = irow - AliEMCALGeoParams::fgkEMCALRows*inSector ;
1192 
1193  Int_t iabsId = eGeom->GetAbsCellIdFromCellIndexes(inSupMod,irowLoc,icolLoc);
1194  if(!eGeom->CheckAbsCellId(iabsId)) continue;
1195 
1196  fhPtCellInCone->Fill(ptTrig, cells->GetCellAmplitude(iabsId), GetEventWeight());
1197  coneptsumCell += cells->GetCellAmplitude(iabsId);
1198  }
1199  }
1200  }
1201  }
1202  }
1203 
1204  fhConeSumPtCell->Fill(ptTrig, coneptsumCell, GetEventWeight());
1205 }
1206 
1207 //___________________________________________________________________________________________________________
1209 //___________________________________________________________________________________________________________
1210 void AliAnaParticleIsolation::CalculateTrackSignalInCone(AliAODPWG4ParticleCorrelation * aodParticle,
1211  Float_t & coneptsumTrack, Float_t & coneptLeadTrack)
1212 {
1213  coneptLeadTrack = 0;
1214  coneptsumTrack = 0;
1215  if( GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kOnlyNeutral ) return ;
1216 
1217  Float_t ptTrig = aodParticle->Pt();
1218  // Recover reference arrays with clusters and tracks
1219  TObjArray * reftracks = aodParticle->GetObjArray(GetAODObjArrayName()+"Tracks");
1220  if(!reftracks)
1221  {
1222  fhConeSumPtTrack ->Fill(ptTrig, coneptsumTrack , GetEventWeight());
1223  fhConePtLeadTrack->Fill(ptTrig, coneptLeadTrack, GetEventWeight());
1224 
1225  return ;
1226  }
1227 
1228  Double_t bz = GetReader()->GetInputEvent()->GetMagneticField();
1229 
1230  Float_t pTtrack = 0;
1231  Float_t coneptsumTrackPerCut[20];
1232  if(fStudyPtCutInCone)
1233  {
1234  for(Int_t icut = 0; icut < fNPtCutsInCone; icut++)
1235  coneptsumTrackPerCut[icut] = 0;
1236  }
1237 
1238  for(Int_t itrack=0; itrack < reftracks->GetEntriesFast(); itrack++)
1239  {
1240  AliVTrack* track = (AliVTrack *) reftracks->At(itrack);
1241 
1242  pTtrack = track->Pt();
1243 
1244  fhPtInCone ->Fill(ptTrig, pTtrack, GetEventWeight());
1245  fhPtTrackInCone->Fill(ptTrig, pTtrack, GetEventWeight());
1246 
1247  if(IsPileUpAnalysisOn())
1248  {
1249  ULong_t status = track->GetStatus();
1250  Bool_t okTOF = ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) ;
1251  //Double32_t tof = track->GetTOFsignal()*1e-3;
1252  Int_t trackBC = track->GetTOFBunchCrossing(bz);
1253 
1254  if ( okTOF && trackBC!=0 ) fhPtTrackInConeOtherBC->Fill(ptTrig,pTtrack, GetEventWeight());
1255  else if( okTOF && trackBC==0 ) fhPtTrackInConeBC0 ->Fill(ptTrig,pTtrack, GetEventWeight());
1256 
1257  Int_t vtxBC = GetReader()->GetVertexBC();
1258  if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTrackInConeVtxBC0->Fill(ptTrig, pTtrack, GetEventWeight());
1259 
1260  if(GetReader()->IsPileUpFromSPD()) { fhPtInConePileUp[0] ->Fill(ptTrig, pTtrack, GetEventWeight());
1261  if(okTOF && trackBC!=0 ) fhPtTrackInConeOtherBCPileUpSPD->Fill(ptTrig, pTtrack, GetEventWeight());
1262  if(okTOF && trackBC==0 ) fhPtTrackInConeBC0PileUpSPD ->Fill(ptTrig, pTtrack, GetEventWeight()); }
1263  if(GetReader()->IsPileUpFromEMCal()) fhPtInConePileUp[1]->Fill(ptTrig, pTtrack, GetEventWeight());
1264  if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtInConePileUp[2]->Fill(ptTrig, pTtrack, GetEventWeight());
1265  if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtInConePileUp[3]->Fill(ptTrig, pTtrack, GetEventWeight());
1266  if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtInConePileUp[4]->Fill(ptTrig, pTtrack, GetEventWeight());
1267  if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtInConePileUp[5]->Fill(ptTrig, pTtrack, GetEventWeight());
1268  if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtInConePileUp[6]->Fill(ptTrig, pTtrack, GetEventWeight());
1269  }
1270 
1272 
1273  coneptsumTrack+=pTtrack;
1274  if(pTtrack > coneptLeadTrack) coneptLeadTrack = pTtrack;
1275 
1276  if(fStudyPtCutInCone)
1277  {
1278  for(Int_t icut = 0; icut < fNPtCutsInCone; icut++)
1279  {
1280  if ( pTtrack > fPtCutInCone[icut] ) coneptsumTrackPerCut[icut]+=pTtrack;
1281  }
1282  }
1283  }
1284 
1285  fhConeSumPtTrack ->Fill(ptTrig, coneptsumTrack , GetEventWeight());
1286  fhConePtLeadTrack->Fill(ptTrig, coneptLeadTrack, GetEventWeight());
1287 
1288  aodParticle->SetChargedLeadPtInCone(coneptLeadTrack);
1289  aodParticle->SetChargedPtSumInCone(coneptsumTrack);
1290 
1291  if(fStudyPtCutInCone)
1292  {
1293  for(Int_t icut = 0; icut < fNPtCutsInCone; icut++)
1294  {
1295  fhConeSumPtTrackPerPtCut ->Fill(icut, coneptsumTrackPerCut[icut], GetEventWeight());
1296  if ( ptTrig > 10 ) fhConeSumPtTrackPerPtCutLargePtTrig->Fill(icut, coneptsumTrackPerCut[icut], GetEventWeight());
1297  }
1298  }
1299 }
1300 
1301 //_____________________________________________________________________________
1303 //_____________________________________________________________________________
1305 {
1306 // if ( clusterID < 0 )
1307 // {
1308 // AliWarning(Form("ID of cluster = %d, not possible!", clusterID));
1309 // return;
1310 // }
1311 
1312 // Int_t iclus = -1;
1313 // TObjArray* clusters = 0x0;
1314 // if (GetCalorimeter() == kEMCAL) clusters = GetEMCALClusters();
1315 // else if(GetCalorimeter() == kPHOS ) clusters = GetPHOSClusters();
1316 //
1317 // Float_t energy = 0;
1318 // Float_t time = -1000;
1319 //
1320 // if(clusters)
1321 // {
1322 // AliVCluster *cluster = FindCluster(clusters,clusterID,iclus);
1323 // energy = cluster->E();
1324 // time = cluster->GetTOF()*1e9;
1325 // }
1326 
1327  //printf("E %f, time %f\n",energy,time);
1328  AliVEvent * event = GetReader()->GetInputEvent();
1329 
1330  fhTimeENoCut->Fill(energy, time, GetEventWeight());
1331  if(GetReader()->IsPileUpFromSPD()) fhTimeESPD ->Fill(energy, time, GetEventWeight());
1332  if(event->IsPileupFromSPDInMultBins()) fhTimeESPDMulti->Fill(energy, time, GetEventWeight());
1333 
1334  if(energy < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold
1335 
1336  AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
1337  AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
1338 
1339  // N pile up vertices
1340  Int_t nVerticesSPD = -1;
1341  Int_t nVerticesTracks = -1;
1342 
1343  if (esdEv)
1344  {
1345  nVerticesSPD = esdEv->GetNumberOfPileupVerticesSPD();
1346  nVerticesTracks = esdEv->GetNumberOfPileupVerticesTracks();
1347 
1348  }//ESD
1349  else if (aodEv)
1350  {
1351  nVerticesSPD = aodEv->GetNumberOfPileupVerticesSPD();
1352  nVerticesTracks = aodEv->GetNumberOfPileupVerticesTracks();
1353  }//AOD
1354 
1355  fhTimeNPileUpVertSPD ->Fill(time, nVerticesSPD , GetEventWeight());
1356  fhTimeNPileUpVertTrack->Fill(time, nVerticesTracks, GetEventWeight());
1357 
1358  //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n",
1359  // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVerticesSPD,nVerticesTracks);
1360 
1361  Int_t ncont = -1;
1362  Float_t z1 = -1, z2 = -1;
1363  Float_t diamZ = -1;
1364  for(Int_t iVert=0; iVert<nVerticesSPD;iVert++)
1365  {
1366  if (esdEv)
1367  {
1368  const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert);
1369  ncont=pv->GetNContributors();
1370  z1 = esdEv->GetPrimaryVertexSPD()->GetZ();
1371  z2 = pv->GetZ();
1372  diamZ = esdEv->GetDiamondZ();
1373  }//ESD
1374  else if (aodEv)
1375  {
1376  AliAODVertex *pv=aodEv->GetVertex(iVert);
1377  if(pv->GetType()!=AliAODVertex::kPileupSPD) continue;
1378  ncont=pv->GetNContributors();
1379  z1=aodEv->GetPrimaryVertexSPD()->GetZ();
1380  z2=pv->GetZ();
1381  diamZ = aodEv->GetDiamondZ();
1382  }// AOD
1383 
1384  Double_t distZ = TMath::Abs(z2-z1);
1385  diamZ = TMath::Abs(z2-diamZ);
1386 
1387  fhTimeNPileUpVertContributors ->Fill(time, ncont, GetEventWeight());
1388  fhTimePileUpMainVertexZDistance->Fill(time, distZ, GetEventWeight());
1389  fhTimePileUpMainVertexZDiamond ->Fill(time, diamZ, GetEventWeight());
1390 
1391  }// loop
1392 }
1393 
1394 //_____________________________________________________________________________________________________________________
1396 //_____________________________________________________________________________________________________________________
1397 void AliAnaParticleIsolation::FillTrackMatchingShowerShapeControlHistograms(AliAODPWG4ParticleCorrelation *pCandidate,
1398  Float_t coneptsum, Float_t coneleadpt,
1399  Int_t mcIndex)
1400 {
1402 
1403  Int_t clusterID = pCandidate->GetCaloLabel(0) ;
1404  Int_t nMaxima = pCandidate->GetNLM();
1405  Int_t mcTag = pCandidate->GetTag() ;
1406  Bool_t isolated = pCandidate->IsIsolated();
1407 
1408  if ( clusterID < 0 )
1409  {
1410  AliWarning(Form("ID of cluster = %d, not possible!", clusterID));
1411  return;
1412  }
1413 
1414  Float_t m02 = pCandidate->GetM02() ;
1415  Float_t energy = pCandidate->E();
1416  Float_t pt = pCandidate->Pt();
1417  Float_t eta = pCandidate->Eta();
1418  Float_t phi = pCandidate->Phi();
1419  if(phi<0) phi+= TMath::TwoPi();
1420 
1421  // Recover original cluster if requested
1422  //
1424  {
1425  Int_t iclus = -1;
1427  else if(GetCalorimeter() == kPHOS ) fClustersArr = GetPHOSClusters();
1428 
1429  if(!fClustersArr) return;
1430 
1431  fCluster = FindCluster(fClustersArr,clusterID,iclus);
1432  }
1433 
1434  // Candidates tagged as decay in another analysis (AliAnaPi0EbE)
1435  //
1437  {
1438  Int_t decayTag = pCandidate->DecayTag();
1439  if(decayTag < 0) decayTag = 0;
1440 
1441  for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
1442  {
1443  if(!GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) continue;
1444 
1445  if(fFillSSHisto) fhPtLambda0Decay[isolated][ibit]->Fill(pt, m02, GetEventWeight());
1446 
1447  // In case it was not done on the trigger selection task
1448  // apply here a shower shape cut to select photons
1449  if( m02 > fDecayTagsM02Cut ) continue;
1450 
1451  fhPtDecay [isolated][ibit]->Fill(pt, GetEventWeight());
1452  fhEtaPhiDecay[isolated][ibit]->Fill(eta, phi, GetEventWeight());
1453 
1454  if(IsDataMC())
1455  {
1456  fhPtDecayMC[isolated][ibit][mcIndex]->Fill(pt, GetEventWeight());
1457 
1458  if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
1459  fhPtDecayMC[isolated][ibit][kmcPhoton]->Fill(pt, GetEventWeight());
1460 
1461  if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1462  {
1463  if ( mcIndex == kmcPi0Decay ) fhPtDecayMC[isolated][ibit][kmcPi0DecayLostPair]->Fill(pt, GetEventWeight());
1464  else if( mcIndex == kmcEtaDecay ) fhPtDecayMC[isolated][ibit][kmcEtaDecayLostPair]->Fill(pt, GetEventWeight());
1465  }
1466  }
1467  } // bit loop
1468  } // decay histograms
1469 
1470  // Get the max pt leading in cone or the sum of pt in cone
1471  // assign a bin to the candidate, depending on both quantities
1472  // see the shower shape in those bins.
1474  {
1475  // Get the background bin for this cone and trigger
1476  Int_t ptsumBin = -1;
1477  Int_t leadptBin = -1;
1478 
1479  AliDebug(1,Form("pT cand: %2.2f, In cone pT: Sum %2.2f, Lead %2.2f, n bins %d",pt,coneptsum,coneleadpt,fNBkgBin));
1480 
1481  for(Int_t ibin = 0; ibin < fNBkgBin; ibin++)
1482  {
1483  if( coneptsum >= fBkgBinLimit[ibin] && coneptsum < fBkgBinLimit[ibin+1]) ptsumBin = ibin;
1484  if( coneleadpt >= fBkgBinLimit[ibin] && coneleadpt < fBkgBinLimit[ibin+1]) leadptBin = ibin;
1485  }
1486 
1487  // Fill the histograms per bin of pt lead or pt sum
1488 
1489  if ( leadptBin >= 0 )
1490  {
1491  AliDebug(1,Form("\t Lead bin %d [%2.2f,%2.2f]", leadptBin,fBkgBinLimit[leadptBin],fBkgBinLimit[leadptBin+1]));
1492 
1493  fhPtLeadConeBin[leadptBin]->Fill(pt, GetEventWeight());
1494 
1495  if(fFillSSHisto)
1496  fhPtLeadConeBinLambda0[leadptBin]->Fill(pt, m02, GetEventWeight());
1497 
1498  if ( leadptBin == 0 )
1499  AliDebug(1,Form("No track/clusters in isolation cone: cand pt %2.2f GeV/c, track multiplicity %d, N clusters %d",
1500  pt, GetTrackMultiplicity(),GetEMCALClusters()->GetEntriesFast()));
1501  }
1502 
1503  if ( ptsumBin >= 0 )
1504  {
1505  AliDebug(1,Form("\t Sum bin %d [%2.2f,%2.2f]" , ptsumBin ,fBkgBinLimit[ptsumBin] ,fBkgBinLimit[ptsumBin +1]));
1506 
1507  fhSumPtConeBin[ptsumBin]->Fill(pt, GetEventWeight());
1508 
1509  if(fFillSSHisto) fhSumPtConeBinLambda0[ptsumBin]->Fill(pt, m02, GetEventWeight());
1510  }
1511 
1512  // Check if it was a decay
1514  {
1515  Int_t decayTag = pCandidate->DecayTag();
1516  if(decayTag < 0) decayTag = 0;
1517 
1518  for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
1519  {
1520  if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
1521  {
1522  Int_t leadptBinDecay = leadptBin+ibit*fNBkgBin;
1523  Int_t ptsumBinDecay = ptsumBin+ibit*fNBkgBin;
1524  if( leadptBin >=0 ) fhPtLeadConeBinDecay[leadptBinDecay]->Fill(pt, GetEventWeight());
1525  if( ptsumBin >=0 ) fhSumPtConeBinDecay [ ptsumBinDecay]->Fill(pt, GetEventWeight());
1526  }
1527  }
1528  }
1529 
1530  if(IsDataMC())
1531  {
1532  Int_t leadptBinMC = leadptBin+mcIndex*fNBkgBin;
1533  Int_t ptsumBinMC = ptsumBin+mcIndex*fNBkgBin;
1534 
1535  if( leadptBin >=0 )
1536  {
1537  fhPtLeadConeBinMC[leadptBinMC]->Fill(pt, GetEventWeight());
1538  if(fFillSSHisto) fhPtLeadConeBinLambda0MC[leadptBinMC]->Fill(pt, m02, GetEventWeight());
1539  }
1540 
1541  if( ptsumBin >=0 )
1542  {
1543  fhSumPtConeBinMC [ ptsumBinMC]->Fill(pt, GetEventWeight());
1544  if(fFillSSHisto) fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt, m02, GetEventWeight());
1545  }
1546 
1547  if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
1548  {
1549  leadptBinMC = leadptBin+kmcPhoton*fNBkgBin;
1550  ptsumBinMC = ptsumBin+kmcPhoton*fNBkgBin;
1551  if( leadptBin >=0 )
1552  {
1553  fhPtLeadConeBinMC[leadptBinMC]->Fill(pt, GetEventWeight());
1554  if(fFillSSHisto) fhPtLeadConeBinLambda0MC[leadptBinMC]->Fill(pt, m02, GetEventWeight());
1555  }
1556 
1557  if( ptsumBin >=0 )
1558  {
1559  fhSumPtConeBinMC [ ptsumBinMC]->Fill(pt, GetEventWeight());
1560  if(fFillSSHisto) fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt, m02, GetEventWeight());
1561  }
1562  }
1563 
1564  // Check if decay and if pair is lost
1565  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1566  {
1567  if ( mcIndex == kmcPi0Decay )
1568  {
1569  leadptBinMC = leadptBin+kmcPi0DecayLostPair*fNBkgBin;
1570  ptsumBinMC = ptsumBin+kmcPi0DecayLostPair*fNBkgBin;
1571  }
1572  else if(mcIndex == kmcEtaDecay)
1573  {
1574  leadptBinMC = leadptBin+kmcEtaDecayLostPair*fNBkgBin;
1575  ptsumBinMC = ptsumBin+kmcEtaDecayLostPair*fNBkgBin;
1576  }
1577  else
1578  AliFatal(Form("Lost decay Bit assigned to bad case, mcIndex %d",mcIndex));
1579 
1580  if( leadptBin >=0 )
1581  {
1582  fhPtLeadConeBinMC[leadptBinMC]->Fill(pt, GetEventWeight());
1583  if(fFillSSHisto) fhPtLeadConeBinLambda0MC[leadptBinMC]->Fill(pt, m02, GetEventWeight());
1584  }
1585 
1586  if( ptsumBin >=0 )
1587  {
1588  fhSumPtConeBinMC [ ptsumBinMC]->Fill(pt);
1589  if(fFillSSHisto) fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt, m02, GetEventWeight());
1590  }
1591 
1592  } // check decays with lost pairs
1593 
1594  } // MC data
1595  } // background dependent bins
1596 
1598  {
1599  // Get the background bin for this cone and trigger
1600  Int_t ptTrigBin = -1;
1601 
1602  for(Int_t ibin = 0; ibin < fNPtTrigBin; ibin++)
1603  {
1604  if( pt >= fPtTrigBinLimit[ibin] && coneptsum < fPtTrigBinLimit[ibin+1]) ptTrigBin = ibin;
1605  }
1606 
1607  // Fill the histograms per pT candidate bin of pt lead or pt sum
1608 
1609  if ( ptTrigBin >= 0 )
1610  {
1611  AliDebug(1,Form("Trigger pT %f, bin %d [%2.2f,%2.2f]",pt,ptTrigBin,fPtTrigBinLimit[ptTrigBin],fPtTrigBinLimit[ptTrigBin+1]));
1612 
1613  fhPtTrigBinPtLeadCone[ptTrigBin]->Fill(coneleadpt, GetEventWeight());
1614  fhPtTrigBinSumPtCone [ptTrigBin]->Fill(coneptsum , GetEventWeight());
1615 
1616  if(fFillSSHisto)
1617  {
1618  fhPtTrigBinLambda0vsPtLeadCone[ptTrigBin]->Fill(coneleadpt, m02, GetEventWeight());
1619  fhPtTrigBinLambda0vsSumPtCone [ptTrigBin]->Fill(coneptsum , m02, GetEventWeight());
1620  }
1621  }
1622 
1623  // Check if it was a decay
1625  {
1626  Int_t decayTag = pCandidate->DecayTag();
1627  if(decayTag < 0) decayTag = 0;
1628  for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
1629  {
1630  if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
1631  {
1632  Int_t binDecay = ptTrigBin+ibit*fNPtTrigBin;
1633  if( binDecay > 0 )
1634  {
1635  fhPtTrigBinPtLeadConeDecay[binDecay]->Fill(coneleadpt, GetEventWeight());
1636  fhPtTrigBinSumPtConeDecay [binDecay]->Fill(coneptsum , GetEventWeight());
1637  }
1638  }
1639  }
1640  }
1641 
1642  if( IsDataMC() )
1643  {
1644  Int_t ptTrigBinMC = ptTrigBin+mcIndex*fNPtTrigBin;
1645 
1646  if( ptTrigBin >=0 )
1647  {
1648  fhPtTrigBinPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt, GetEventWeight());
1649  fhPtTrigBinSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , GetEventWeight());
1650 
1651  if(fFillSSHisto)
1652  {
1653  fhPtTrigBinLambda0vsPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt, m02, GetEventWeight());
1654  fhPtTrigBinLambda0vsSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , m02, GetEventWeight());
1655  }
1656  }
1657 
1658  if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
1659  {
1660  ptTrigBinMC = ptTrigBin+kmcPhoton*fNPtTrigBin;
1661  if( ptTrigBin >=0 )
1662  {
1663  fhPtTrigBinPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt, GetEventWeight());
1664  fhPtTrigBinSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , GetEventWeight());
1665 
1666  if(fFillSSHisto)
1667  {
1668  fhPtTrigBinLambda0vsPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt, m02, GetEventWeight());
1669  fhPtTrigBinLambda0vsSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , m02, GetEventWeight());
1670  }
1671  }
1672  } // photon MC
1673 
1674  // decays with lost pair
1675  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1676  {
1677  if ( mcIndex == kmcPi0Decay ) ptTrigBinMC = ptTrigBin+kmcPi0DecayLostPair*fNPtTrigBin;
1678  else if( mcIndex == kmcEtaDecay ) ptTrigBinMC = ptTrigBin+kmcEtaDecayLostPair*fNPtTrigBin;
1679 
1680  if( ptTrigBin >=0 )
1681  {
1682  fhPtTrigBinPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt, GetEventWeight());
1683  fhPtTrigBinSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , GetEventWeight());
1684  if(fFillSSHisto)
1685  {
1686  fhPtTrigBinLambda0vsPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt, m02, GetEventWeight());
1687  fhPtTrigBinLambda0vsSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , m02, GetEventWeight());
1688  }
1689  }
1690  } // lost decays MC
1691 
1692  } // MC
1693  } // pT trigger bins
1694 
1695  // Shower shape dependent histograms
1696  if(fFillSSHisto)
1697  {
1698  fhELambda0 [isolated]->Fill(energy, m02, GetEventWeight());
1699  fhPtLambda0[isolated]->Fill(pt, m02, GetEventWeight());
1700  //fhELambda1 [isolated]->Fill(energy, m20);
1701 
1702  if(IsDataMC())
1703  {
1704  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
1705  fhPtLambda0MC[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
1706 
1707  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1708  {
1709  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MC[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1710  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MC[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1711  }
1712 
1713  fhPtLambda0MC[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
1714 
1715  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
1716  {
1717  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
1718  fhPtLambda0MCConv[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
1719 
1720  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1721  {
1722  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCConv[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1723  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCConv[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1724  }
1725 
1726  fhPtLambda0MCConv[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
1727  } // Conversion
1728 
1729 
1730  Int_t noverlaps = 0;
1732  {
1733  const UInt_t nlabels = fCluster->GetNLabels();
1734  Int_t overpdg[nlabels];
1735  Int_t overlab[nlabels];
1736  noverlaps = GetMCAnalysisUtils()->GetNOverlaps(fCluster->GetLabels(), nlabels, mcTag, -1,
1737  GetReader(), overpdg, overlab);
1738 
1740  fhPtNOverlap[kmcPhoton][isolated]->Fill(pt, noverlaps, GetEventWeight());
1741 
1743  {
1744  if ( mcIndex == kmcPi0Decay ) fhPtNOverlap[kmcPi0DecayLostPair][isolated]->Fill(pt, noverlaps, GetEventWeight());
1745  else if( mcIndex == kmcEtaDecay ) fhPtNOverlap[kmcEtaDecayLostPair][isolated]->Fill(pt, noverlaps, GetEventWeight());
1746  }
1747 
1748  fhPtNOverlap[mcIndex][isolated]->Fill(pt, noverlaps, GetEventWeight());
1749 
1750  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
1751  {
1752  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
1753  fhPtNOverlapConv[kmcPhoton][isolated]->Fill(pt, noverlaps, GetEventWeight());
1754 
1755  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1756  {
1757  if ( mcIndex == kmcPi0Decay ) fhPtNOverlapConv[kmcPi0DecayLostPair][isolated]->Fill(pt, noverlaps, GetEventWeight());
1758  else if( mcIndex == kmcEtaDecay ) fhPtNOverlapConv[kmcEtaDecayLostPair][isolated]->Fill(pt, noverlaps, GetEventWeight());
1759  }
1760 
1761  fhPtNOverlapConv[mcIndex][isolated]->Fill(pt, noverlaps, GetEventWeight());
1762  } // Conversion
1763  }
1764 
1765  if ( noverlaps == 1 )
1766  {
1767  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
1768  fhPtLambda0MCWith1Overlap[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
1769 
1770  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1771  {
1772  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCWith1Overlap[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1773  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCWith1Overlap[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1774  }
1775 
1776  fhPtLambda0MCWith1Overlap[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
1777 
1778  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
1779  {
1780  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
1781  fhPtLambda0MCConvWith1Overlap[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
1782 
1783  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1784  {
1785  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCConvWith1Overlap[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1786  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCConvWith1Overlap[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1787  }
1788 
1789  fhPtLambda0MCConvWith1Overlap[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
1790  } // Conversion
1791  } // At least 1 overlap
1792  else if (noverlaps > 1 ) // More than 1 overlap
1793  {
1794  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
1795  fhPtLambda0MCWithNOverlap[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
1796 
1797  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1798  {
1799  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCWithNOverlap[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1800  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCWithNOverlap[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1801  }
1802 
1803  fhPtLambda0MCWithNOverlap[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
1804 
1805  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
1806  {
1807  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
1808  fhPtLambda0MCConvWithNOverlap[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
1809 
1810  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
1811  {
1812  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCConvWithNOverlap[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1813  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCConvWithNOverlap[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
1814  }
1815 
1816  fhPtLambda0MCConvWithNOverlap[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
1817  } // Conversion
1818  } // more than 1 overlap
1819  } // MC
1820 
1821  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
1822  GetModuleNumber(pCandidate) >= GetFirstSMCoveredByTRD() )
1823  {
1824  fhELambda0TRD [isolated]->Fill(energy, m02, GetEventWeight());
1825  fhPtLambda0TRD[isolated]->Fill(pt , m02, GetEventWeight());
1826  //fhELambda1TRD [isolated]->Fill(energy, m20 );
1827  }
1828 
1829  if(fFillNLMHistograms)
1830  {
1831  fhNLocMax[isolated]->Fill(energy, nMaxima, GetEventWeight());
1832  if (nMaxima==1)
1833  {
1834  fhELambda0LocMax1[isolated]->Fill(energy, m02, GetEventWeight());
1835  fhELambda1LocMax1[isolated]->Fill(energy, m02, GetEventWeight());
1836  }
1837  else if(nMaxima==2)
1838  {
1839  fhELambda0LocMax2[isolated]->Fill(energy, m02, GetEventWeight());
1840  fhELambda1LocMax2[isolated]->Fill(energy, m02, GetEventWeight());
1841  }
1842  else
1843  {
1844  fhELambda0LocMaxN[isolated]->Fill(energy, m02, GetEventWeight());
1845  fhELambda1LocMaxN[isolated]->Fill(energy, m02, GetEventWeight());
1846  }
1847  }
1848  } // SS histo fill
1849 
1850  // Track matching dependent histograms
1851  if(fFillTMHisto)
1852  {
1853  Float_t dZ = fCluster->GetTrackDz();
1854  Float_t dR = fCluster->GetTrackDx();
1855 
1856 // if(fCluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
1857 // {
1858 // dR = 2000., dZ = 2000.;
1859 // GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(fCluster->GetID(),dZ,dR);
1860 // }
1861 
1862  //printf("ParticleIsolation: dPhi %f, dEta %f\n",dR,dZ);
1863  if(fhTrackMatchedDEta[isolated] && TMath::Abs(dR) < 999)
1864  {
1865  fhTrackMatchedDEta[isolated]->Fill(energy, dZ, GetEventWeight());
1866  fhTrackMatchedDPhi[isolated]->Fill(energy, dR, GetEventWeight());
1867  if(energy > 0.5) fhTrackMatchedDEtaDPhi[isolated]->Fill(dZ, dR, GetEventWeight());
1868  if(IsDataMC())
1869  {
1870  fhTrackMatchedDEtaMC[mcIndex][isolated]->Fill(energy, dZ, GetEventWeight());
1871  fhTrackMatchedDPhiMC[mcIndex][isolated]->Fill(energy, dR, GetEventWeight());
1872  if(energy > 0.5) fhTrackMatchedDEtaDPhiMC[mcIndex][isolated]->Fill(dZ, dR, GetEventWeight());
1873  }
1874  }
1875 
1876  // Check dEdx and E/p of matched clusters
1877 
1878  if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
1879  {
1880  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(fCluster, GetReader()->GetInputEvent());
1881 
1882  if(track)
1883  {
1884  Float_t dEdx = track->GetTPCsignal();
1885  fhdEdx[isolated]->Fill(fCluster->E(), dEdx, GetEventWeight());
1886 
1887  Float_t eOverp = fCluster->E()/track->P();
1888  fhEOverP[isolated]->Fill(fCluster->E(), eOverp, GetEventWeight());
1889  }
1890  //else
1891  // printf("AliAnaParticleIsolation::FillTrackMatchingShowerShapeHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
1892 
1893 
1894  if(IsDataMC())
1895  {
1897  {
1900  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 0.5, GetEventWeight());
1901  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 1.5, GetEventWeight());
1902  else fhTrackMatchedMCParticle[isolated]->Fill(energy, 3.5, GetEventWeight());
1903 
1904  }
1905  else
1906  {
1907  if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) ||
1908  GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 6.5, GetEventWeight());
1909  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 4.5, GetEventWeight());
1910  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 5.5, GetEventWeight());
1911  else fhTrackMatchedMCParticle[isolated]->Fill(energy, 7.5, GetEventWeight());
1912  }
1913  } // MC
1914  } // match window
1915  }// TM histos fill
1916 }
1917 
1918 //______________________________________________________
1920 //______________________________________________________
1922 {
1923  TString parList ; //this will be list of parameters used for this analysis.
1924  const Int_t buffersize = 255;
1925  char onePar[buffersize] ;
1926 
1927  snprintf(onePar, buffersize,"--- AliAnaParticleIsolation ---:") ;
1928  parList+=onePar ;
1929  snprintf(onePar, buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
1930  parList+=onePar ;
1931  snprintf(onePar, buffersize,"Isolation Cand Detector: %s;",fIsoDetectorString.Data()) ;
1932  parList+=onePar ;
1933  snprintf(onePar, buffersize,"fReMakeIC =%d (Flag for reisolation during histogram filling);",fReMakeIC) ;
1934  parList+=onePar ;
1935  snprintf(onePar, buffersize,"fMakeSeveralIC=%d (Flag for isolation with several cuts at the same time );",fMakeSeveralIC) ;
1936  parList+=onePar ;
1937  snprintf(onePar, buffersize,"fFillTMHisto=%d (Flag for track matching histograms);",fFillTMHisto) ;
1938  parList+=onePar ;
1939  snprintf(onePar, buffersize,"fFillSSHisto=%d (Flag for shower shape histograms);",fFillSSHisto) ;
1940  parList+=onePar ;
1941 
1942  if(fMakeSeveralIC)
1943  {
1944  snprintf(onePar, buffersize,"fNCones =%d (Number of cone sizes);",fNCones) ;
1945  parList+=onePar ;
1946  snprintf(onePar, buffersize,"fNPtThresFrac=%d (Flag for isolation with several cuts at the same time);",fNPtThresFrac) ;
1947  parList+=onePar ;
1948 
1949  for(Int_t icone = 0; icone < fNCones ; icone++)
1950  {
1951  snprintf(onePar, buffersize,"fConeSizes[%d]=%1.2f (isolation cone size);",icone, fConeSizes[icone]) ;
1952  parList+=onePar ;
1953  }
1954  for(Int_t ipt = 0; ipt < fNPtThresFrac ; ipt++)
1955  {
1956  snprintf(onePar, buffersize,"fPtThresholds[%d]=%1.2f (isolation pt threshold);",ipt, fPtThresholds[ipt]) ;
1957  parList+=onePar ;
1958  }
1959  for(Int_t ipt = 0; ipt < fNPtThresFrac ; ipt++)
1960  {
1961  snprintf(onePar, buffersize,"fPtFractions[%d]=%1.2f (isolation pt fraction threshold);",ipt, fPtFractions[ipt]) ;
1962  parList+=onePar ;
1963  }
1964  for(Int_t ipt = 0; ipt < fNPtThresFrac ; ipt++)
1965  {
1966  snprintf(onePar, buffersize,"fSumPtThresholds[%d]=%1.2f (isolation sum pt threshold);",ipt, fSumPtThresholds[ipt]) ;
1967  parList+=onePar ;
1968  }
1969  }
1970 
1971  //Get parameters set in base class.
1972  parList += GetBaseParametersList() ;
1973 
1974  //Get parameters set in IC class.
1975  if(!fMakeSeveralIC)parList += GetIsolationCut()->GetICParametersList() ;
1976 
1977  return new TObjString(parList) ;
1978 }
1979 
1980 //________________________________________________________
1983 //________________________________________________________
1985 {
1986  TList * outputContainer = new TList() ;
1987  outputContainer->SetName("IsolatedParticleHistos") ;
1988 
1990  Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins();
1991  Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
2001  Int_t ntimebins= GetHistogramRanges()->GetHistoTimeBins();
2004 
2011 
2012  Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
2015  Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
2016  Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax();
2017  Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
2018 
2019  Int_t nptsumbins = GetHistogramRanges()->GetHistoNPtSumBins();
2022  Int_t nptinconebins = GetHistogramRanges()->GetHistoNPtInConeBins();
2023  Float_t ptinconemax = GetHistogramRanges()->GetHistoPtInConeMax();
2024  Float_t ptinconemin = GetHistogramRanges()->GetHistoPtInConeMin();
2025 
2026  //Float_t ptthre = GetIsolationCut()->GetPtThreshold();
2027  //Float_t ptsumthre = GetIsolationCut()->GetSumPtThreshold();
2028  //Float_t ptfrac = GetIsolationCut()->GetPtFraction();
2031  Int_t particle = GetIsolationCut()->GetParticleTypeInCone() ;
2032 
2033  TString sThreshold = "";
2034  if ( method == AliIsolationCut::kSumPtIC )
2035  {
2036  sThreshold = Form(", %2.2f < #Sigma #it{p}_{T}^{in cone} < %2.2f GeV/#it{c}",
2037  GetIsolationCut()->GetSumPtThreshold(), GetIsolationCut()->GetSumPtThresholdMax());
2038  if(GetIsolationCut()->GetSumPtThresholdMax() > 200)
2039  sThreshold = Form(", #Sigma #it{p}_{T}^{in cone} = %2.2f GeV/#it{c}",
2040  GetIsolationCut()->GetSumPtThreshold());
2041  }
2042  else if ( method == AliIsolationCut::kPtThresIC)
2043  {
2044  sThreshold = Form(", %2.2f < #it{p}_{T}^{th} < %2.2f GeV/#it{c}",
2045  GetIsolationCut()->GetPtThreshold(),GetIsolationCut()->GetPtThresholdMax());
2046  if(GetIsolationCut()->GetSumPtThreshold() > 200)
2047  sThreshold = Form(", #it{p}_{T}^{th} = %2.2f GeV/#it{c}",
2048  GetIsolationCut()->GetPtThreshold());
2049  }
2050  else if ( method == AliIsolationCut::kPtFracIC)
2051  sThreshold = Form(", #Sigma #it{p}_{T}^{in cone}/#it{p}_{T}^{trig} = %2.2f" ,
2052  GetIsolationCut()->GetPtFraction());
2053 
2054  TString sParticle = ", x^{0,#pm}";
2055  if ( particle == AliIsolationCut::kOnlyNeutral ) sParticle = ", x^{0}";
2056  else if ( particle == AliIsolationCut::kOnlyCharged ) sParticle = ", x^{#pm}";
2057 
2058  TString parTitle = Form("#it{R} = %2.2f%s%s",GetIsolationCut()->GetConeSize(), sThreshold.Data(),sParticle.Data());
2059 
2060  TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
2061 
2062  // MC histograms title and name
2063  TString mcPartType[] = { "#gamma" , "#gamma_{prompt}" , "#gamma_{fragmentation}",
2064  "#pi^{0} (merged #gamma)", "#gamma_{#pi decay}" , "#gamma_{#pi decay} lost companion",
2065  "#eta (merged #gamma)" , "#gamma_{#eta decay}", "#gamma_{#eta decay} lost companion",
2066  "#gamma_{other decay}" , "e^{#pm}" , "hadrons?"} ;
2067 
2068  TString mcPartName[] = { "Photon","PhotonPrompt","PhotonFrag",
2069  "Pi0" ,"Pi0Decay" ,"Pi0DecayLostPair",
2070  "Eta" ,"EtaDecay" ,"EtaDecayLostPair",
2071  "OtherDecay","Electron","Hadron"} ;
2072 
2073  // Primary MC histograms title and name
2074  TString pptype[] = { "#gamma" , "#gamma_{#pi decay}" , "#gamma_{#eta decay}", "#gamma_{other decay}",
2075  "#gamma_{prompt}", "#gamma_{fragmentation}", "#gamma_{ISR}" ,
2076  "#pi^{0}" , "#eta"} ;
2077 
2078  TString ppname[] = { "Photon" , "PhotonPi0Decay","PhotonEtaDecay", "PhotonOtherDecay",
2079  "PhotonPrompt", "PhotonFrag" , "PhotonISR" ,
2080  "Pi0" , "Eta"} ;
2081 
2082  // Not Isolated histograms, reference histograms
2083 
2084  fhENoIso = new TH1F("hENoIso",
2085  Form("Number of not isolated leading particles vs #it{p}_{T}, %s",parTitle.Data()),
2086  nptbins,ptmin,ptmax);
2087  fhENoIso->SetYTitle("#it{counts}");
2088  fhENoIso->SetXTitle("E (GeV/#it{c})");
2089  outputContainer->Add(fhENoIso) ;
2090 
2091  fhPtNoIso = new TH1F("hPtNoIso",
2092  Form("Number of not isolated leading particles vs #it{p}_{T}, %s",parTitle.Data()),
2093  nptbins,ptmin,ptmax);
2094  fhPtNoIso->SetYTitle("#it{counts}");
2095  fhPtNoIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2096  outputContainer->Add(fhPtNoIso) ;
2097 
2098  fhEtaPhiNoIso = new TH2F("hEtaPhiNoIso",
2099  Form("Number of not isolated leading particles #eta vs #phi, %s",parTitle.Data()),
2100  netabins,etamin,etamax,nphibins,phimin,phimax);
2101  fhEtaPhiNoIso->SetXTitle("#eta");
2102  fhEtaPhiNoIso->SetYTitle("#phi");
2103  outputContainer->Add(fhEtaPhiNoIso) ;
2104 
2105  if(IsDataMC())
2106  {
2107  // For histograms in arrays, index in the array, corresponding to any particle origin
2108 
2109  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
2110  {
2111  fhPtNoIsoMC[imc] = new TH1F(Form("hPtNoIsoMC%s",mcPartName[imc].Data()),
2112  Form("#it{p}_{T} of NOT isolated %s, %s",mcPartType[imc].Data(),parTitle.Data()),
2113  nptbins,ptmin,ptmax);
2114  fhPtNoIsoMC[imc]->SetYTitle("#it{counts}");
2115  fhPtNoIsoMC[imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2116  outputContainer->Add(fhPtNoIsoMC[imc]) ;
2117 
2118  fhPtIsoMC[imc] = new TH1F(Form("hPtMC%s",mcPartName[imc].Data()),
2119  Form("#it{p}_{T} of isolated %s, %s",mcPartType[imc].Data(),parTitle.Data()),
2120  nptbins,ptmin,ptmax);
2121  fhPtIsoMC[imc]->SetYTitle("#it{counts}");
2122  fhPtIsoMC[imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2123  outputContainer->Add(fhPtIsoMC[imc]) ;
2124 
2125  fhPhiIsoMC[imc] = new TH2F(Form("hPhiMC%s",mcPartName[imc].Data()),
2126  Form("#phi vs #it{p}_{T} of isolated %s, %s",mcPartType[imc].Data(),parTitle.Data()),
2127  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2128  fhPhiIsoMC[imc]->SetYTitle("#phi");
2129  fhPhiIsoMC[imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2130  outputContainer->Add(fhPhiIsoMC[imc]) ;
2131 
2132  fhEtaIsoMC[imc] = new TH2F(Form("hEtaMC%s",mcPartName[imc].Data()),
2133  Form("#phi vs #it{p}_{T} of isolated %s, %s",mcPartType[imc].Data(),parTitle.Data()),
2134  nptbins,ptmin,ptmax,netabins,etamin,etamax);
2135  fhEtaIsoMC[imc]->SetYTitle("#eta");
2136  fhEtaIsoMC[imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2137  outputContainer->Add(fhEtaIsoMC[imc]) ;
2138  }
2139  }
2140 
2141  // Histograms for tagged candidates as decay
2143  {
2144  TString isoName [] = {"NoIso","Iso"};
2145  TString isoTitle[] = {"Not isolated" ,"isolated"};
2146 
2147  for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
2148  {
2149  for(Int_t iso = 0; iso < 2; iso++)
2150  {
2151  if(fMakeSeveralIC && iso) continue;
2152  fhPtDecay[iso][ibit] =
2153  new TH1F(Form("hPtDecay%s_bit%d",isoName[iso].Data(),fDecayBits[ibit]),
2154  Form("Number of %s leading pi0 decay particles vs #it{p}_{T}, bit %d, %s",isoTitle[iso].Data(),fDecayBits[ibit],parTitle.Data()),
2155  nptbins,ptmin,ptmax);
2156  fhPtDecay[iso][ibit]->SetYTitle("#it{counts}");
2157  fhPtDecay[iso][ibit]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2158  outputContainer->Add(fhPtDecay[iso][ibit]) ;
2159 
2160  fhEtaPhiDecay[iso][ibit] =
2161  new TH2F(Form("hEtaPhiDecay%s_bit%d",isoName[iso].Data(),fDecayBits[ibit]),
2162  Form("Number of %s leading Pi0 decay particles #eta vs #phi, bit %d, %s",isoTitle[iso].Data(),fDecayBits[ibit],parTitle.Data()),
2163  netabins,etamin,etamax,nphibins,phimin,phimax);
2164  fhEtaPhiDecay[iso][ibit]->SetXTitle("#eta");
2165  fhEtaPhiDecay[iso][ibit]->SetYTitle("#phi");
2166  outputContainer->Add(fhEtaPhiDecay[iso][ibit]) ;
2167 
2168  if(fFillSSHisto)
2169  {
2170  fhPtLambda0Decay[iso][ibit] = new TH2F
2171  (Form("hPtLambda0Decay%s_bit%d",isoName[iso].Data(),fDecayBits[ibit]),
2172  Form("%s cluster : #it{p}_{T} vs #lambda_{0}, decay bit %d, %s",isoTitle[iso].Data(), fDecayBits[ibit], parTitle.Data()),
2173  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2174  fhPtLambda0Decay[iso][ibit]->SetYTitle("#lambda_{0}^{2}");
2175  fhPtLambda0Decay[iso][ibit]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2176  outputContainer->Add(fhPtLambda0Decay[iso][ibit]) ;
2177  }
2178 
2179  if(IsDataMC())
2180  {
2181  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
2182  {
2183  fhPtDecayMC[iso][ibit][imc] =
2184  new TH1F(Form("hPtDecay%s_bit%d_MC%s",isoName[iso].Data(),fDecayBits[ibit],mcPartName[imc].Data()),
2185  Form("#it{p}_{T} of %s, decay bit %d, %s, %s",isoTitle[iso].Data(),fDecayBits[ibit],mcPartType[imc].Data(),parTitle.Data()),
2186  nptbins,ptmin,ptmax);
2187  fhPtDecayMC[iso][ibit][imc]->SetYTitle("#it{counts}");
2188  fhPtDecayMC[iso][ibit][imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2189  outputContainer->Add(fhPtDecayMC[iso][ibit][imc]) ;
2190  }// MC particle loop
2191  }// MC
2192  } // bit loop
2193  } //iso loop
2194  }// decay
2195 
2196  if(!fMakeSeveralIC)
2197  {
2198  TString isoName [] = {"NoIso","Iso"};
2199  TString isoTitle[] = {"Not isolated" ,"isolated"};
2200 
2201  fhEIso = new TH1F("hE",
2202  Form("Number of isolated particles vs E, %s",parTitle.Data()),
2203  nptbins,ptmin,ptmax);
2204  fhEIso->SetYTitle("d#it{N} / d#it{E}");
2205  fhEIso->SetXTitle("#it{E} (GeV/#it{c})");
2206  outputContainer->Add(fhEIso) ;
2207 
2208  fhPtIso = new TH1F("hPt",
2209  Form("Number of isolated particles vs #it{p}_{T}, %s",parTitle.Data()),
2210  nptbins,ptmin,ptmax);
2211  fhPtIso->SetYTitle("d#it{N} / #it{p}_{T}");
2212  fhPtIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2213  outputContainer->Add(fhPtIso) ;
2214 
2215  fhPhiIso = new TH2F("hPhi",
2216  Form("Number of isolated particles vs #phi, %s",parTitle.Data()),
2217  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2218  fhPhiIso->SetYTitle("#phi");
2219  fhPhiIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2220  outputContainer->Add(fhPhiIso) ;
2221 
2222  fhEtaIso = new TH2F("hEta",
2223  Form("Number of isolated particles vs #eta, %s",parTitle.Data()),
2224  nptbins,ptmin,ptmax,netabins,etamin,etamax);
2225  fhEtaIso->SetYTitle("#eta");
2226  fhEtaIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2227  outputContainer->Add(fhEtaIso) ;
2228 
2229  fhEtaPhiIso = new TH2F("hEtaPhiIso",
2230  Form("Number of isolated particles #eta vs #phi, %s",parTitle.Data()),
2231  netabins,etamin,etamax,nphibins,phimin,phimax);
2232  fhEtaPhiIso->SetXTitle("#eta");
2233  fhEtaPhiIso->SetYTitle("#phi");
2234  outputContainer->Add(fhEtaPhiIso) ;
2235 
2237  {
2238  fhPtCentralityIso = new TH2F("hPtCentrality",
2239  Form("centrality vs #it{p}_{T} for isolated particles, %s",parTitle.Data()),
2240  nptbins,ptmin,ptmax, 100,0,100);
2241  fhPtCentralityIso->SetYTitle("centrality");
2242  fhPtCentralityIso->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2243  outputContainer->Add(fhPtCentralityIso) ;
2244 
2245  fhPtEventPlaneIso = new TH2F("hPtEventPlane",
2246  Form("event plane angle vs #it{p}_{T} for isolated particles, %s",parTitle.Data()),
2247  nptbins,ptmin,ptmax, 100,0,TMath::Pi());
2248  fhPtEventPlaneIso->SetYTitle("Event plane angle (rad)");
2249  fhPtEventPlaneIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2250  outputContainer->Add(fhPtEventPlaneIso) ;
2251  }
2252 
2253  if(fFillNLMHistograms)
2254  {
2255  fhPtNLocMaxIso = new TH2F("hPtNLocMax",
2256  Form("Number of isolated particles vs #it{p}_{T}, %s",parTitle.Data()),
2257  nptbins,ptmin,ptmax,10,0,10);
2258  fhPtNLocMaxIso->SetYTitle("#it{NLM}");
2259  fhPtNLocMaxIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2260 
2261  fhPtNLocMaxNoIso = new TH2F("hPtNLocMaxNoIso",
2262  Form("Number of not isolated particles vs #it{p}_{T}, %s",parTitle.Data()),
2263  nptbins,ptmin,ptmax,10,0,10);
2264  fhPtNLocMaxNoIso->SetYTitle("#it{NLM}");
2265  fhPtNLocMaxNoIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2266  outputContainer->Add(fhPtNLocMaxNoIso) ;
2267  }
2268 
2269  fhConePtLead = new TH2F("hConePtLead",
2270  Form("Track or Cluster leading #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
2271  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2272  fhConePtLead->SetYTitle("#it{p}_{T, leading} (GeV/#it{c})");
2273  fhConePtLead->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2274  outputContainer->Add(fhConePtLead) ;
2275 
2276  fhConeSumPt = new TH2F("hConePtSum",
2277  Form("Track and Cluster #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
2278  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2279  fhConeSumPt->SetYTitle("#Sigma #it{p}_{T}");
2280  fhConeSumPt->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2281  outputContainer->Add(fhConeSumPt) ;
2282 
2283  fhPtLambda0Eiso = new TH3F
2284  (Form("hPtLambda0Eiso"),
2285  Form("ABCD 3D Matrix: #it{p}_{T} vs #lambda_{0}^{2} vs E_{T}^{iso}, %s",parTitle.Data()),70,0.,70.,200,0.,2.,110,-10.,100.);
2286  fhPtLambda0Eiso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2287  fhPtLambda0Eiso->SetYTitle("#lambda_{0}^{2}");
2288  fhPtLambda0Eiso->SetZTitle("E_{T}^{iso} (GeV/c)");
2289  outputContainer->Add(fhPtLambda0Eiso) ;
2290 
2291  fhConeSumPtTrigEtaPhi = new TH2F("hConePtSumTrigEtaPhi",
2292  Form("Trigger #eta vs #phi, #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
2293  netabins,etamin,etamax,nphibins,phimin,phimax);
2294  fhConeSumPtTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2295  fhConeSumPtTrigEtaPhi->SetXTitle("#eta_{trigger}");
2296  fhConeSumPtTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2297  outputContainer->Add(fhConeSumPtTrigEtaPhi) ;
2298 
2299  fhPtInCone = new TH2F("hPtInCone",
2300  Form("#it{p}_{T} of clusters and tracks in isolation cone for #it{R} = %2.2f",r),
2301  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
2302  fhPtInCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
2303  fhPtInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2304  outputContainer->Add(fhPtInCone) ;
2305 
2307  {
2308  fhPtLeadConeBin = new TH1F*[fNBkgBin];
2309  fhSumPtConeBin = new TH1F*[fNBkgBin];
2310  if(fFillSSHisto)
2311  {
2314  }
2315 
2317  {
2320  }
2321 
2322  if(IsDataMC())
2323  {
2324  fhPtLeadConeBinMC = new TH1F*[fNBkgBin*fgkNmcTypes];
2325  fhSumPtConeBinMC = new TH1F*[fNBkgBin*fgkNmcTypes];
2326 
2327  if(fFillSSHisto)
2328  {
2331  }
2332  }
2333 
2334  for(Int_t ibin = 0; ibin < fNBkgBin; ibin++)
2335  {
2336  fhPtLeadConeBin[ibin] = new TH1F
2337  (Form("hPtLeadCone_Bin%d",ibin),
2338  Form("cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, %s",
2339  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax);
2340  fhPtLeadConeBin[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
2341  fhPtLeadConeBin[ibin]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2342  outputContainer->Add(fhPtLeadConeBin[ibin]) ;
2343 
2344  fhSumPtConeBin[ibin] = new TH1F
2345  (Form("hSumPtCone_Bin%d",ibin),
2346  Form("in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, %s",
2347  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax);
2348  fhSumPtConeBin[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
2349  fhSumPtConeBin[ibin]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2350  outputContainer->Add(fhSumPtConeBin[ibin]) ;
2351 
2353  {
2354  for(Int_t idecay = 0; idecay < fNDecayBits; idecay++)
2355  {
2356  Int_t bindecay = ibin+idecay*fNBkgBin;
2357 
2358  fhPtLeadConeBinDecay[bindecay] = new TH1F
2359  (Form("hPtLeadCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
2360  Form("Decay bit %d, cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, %s",
2361  fDecayBits[idecay],fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax);
2362  fhPtLeadConeBinDecay[bindecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
2363  fhPtLeadConeBinDecay[bindecay]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2364  outputContainer->Add(fhPtLeadConeBinDecay[bindecay]) ;
2365 
2366  fhSumPtConeBinDecay[bindecay] = new TH1F
2367  (Form("hSumPtCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
2368  Form("Decay bit %d, in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, %s",
2369  fDecayBits[idecay],fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax);
2370  fhSumPtConeBinDecay[bindecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
2371  fhSumPtConeBinDecay[bindecay]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2372  outputContainer->Add(fhSumPtConeBinDecay[bindecay]) ;
2373  }
2374  }
2375 
2376  if(IsDataMC())
2377  {
2378  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
2379  {
2380  Int_t binmc = ibin+imc*fNBkgBin;
2381  fhPtLeadConeBinMC[binmc] = new TH1F
2382  (Form("hPtLeadCone_Bin%d_MC%s",ibin, mcPartName[imc].Data()),
2383  Form("in cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, MC %s, %s",
2384  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], mcPartType[imc].Data(), parTitle.Data()),nptbins,ptmin,ptmax);
2385  fhPtLeadConeBinMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
2386  fhPtLeadConeBinMC[binmc]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2387  outputContainer->Add(fhPtLeadConeBinMC[binmc]) ;
2388 
2389  fhSumPtConeBinMC[binmc] = new TH1F
2390  (Form("hSumPtCone_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
2391  Form("in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, MC %s, %s",
2392  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], mcPartType[imc].Data(), parTitle.Data()),nptbins,ptmin,ptmax);
2393  fhSumPtConeBinMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
2394  fhSumPtConeBinMC[binmc]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2395  outputContainer->Add(fhSumPtConeBinMC[binmc]) ;
2396  } // MC particle loop
2397  }
2398 
2399  if(fFillSSHisto)
2400  {
2401  fhPtLeadConeBinLambda0[ibin] = new TH2F
2402  (Form("hPtLeadConeLambda0_Bin%d",ibin),
2403  Form("#lambda_{0}, in cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, %s",
2404  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2405  fhPtLeadConeBinLambda0[ibin]->SetYTitle("#lambda_{0}^{2}");
2406  fhPtLeadConeBinLambda0[ibin]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2407  outputContainer->Add(fhPtLeadConeBinLambda0[ibin]) ;
2408 
2409  fhSumPtConeBinLambda0[ibin] = new TH2F
2410  (Form("hSumPtConeLambda0_Bin%d",ibin),
2411  Form("#lambda_{0}, in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, %s",
2412  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2413  fhSumPtConeBinLambda0[ibin]->SetYTitle("#lambda_{0}^{2}");
2414  fhSumPtConeBinLambda0[ibin]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2415  outputContainer->Add(fhSumPtConeBinLambda0[ibin]) ;
2416 
2417  if(IsDataMC())
2418  {
2419  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
2420  {
2421  Int_t binmc = ibin+imc*fNBkgBin;
2422  fhPtLeadConeBinLambda0MC[binmc] = new TH2F
2423  (Form("hPtLeadConeLambda0_Bin%d_MC%s",ibin, mcPartName[imc].Data()),
2424  Form("#lambda_{0}, in cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, MC %s, %s",
2425  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], mcPartType[imc].Data(), parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2426  fhPtLeadConeBinLambda0MC[binmc]->SetYTitle("#lambda_{0}^{2}");
2427  fhPtLeadConeBinLambda0MC[binmc]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2428  outputContainer->Add(fhPtLeadConeBinLambda0MC[binmc]) ;
2429 
2430  fhSumPtConeBinLambda0MC[binmc] = new TH2F
2431  (Form("hSumPtConeLambda0_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
2432  Form("#lambda_{0}, in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, MC %s, %s",
2433  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], mcPartType[imc].Data(), parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2434  fhSumPtConeBinLambda0MC[binmc]->SetYTitle("#lambda_{0}^{2}");
2435  fhSumPtConeBinLambda0MC[binmc]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2436  outputContainer->Add(fhSumPtConeBinLambda0MC[binmc]) ;
2437  } // MC particle loop
2438  }
2439  } // shower shape on
2440  } // pt in cone bin loop
2441  } // bkg cone pt bin histograms
2442 
2444  {
2445  fhPtTrigBinPtLeadCone = new TH1F*[fNPtTrigBin];
2446  fhPtTrigBinSumPtCone = new TH1F*[fNPtTrigBin];
2447 
2450 
2451  if(IsDataMC())
2452  {
2455  }
2456 
2457  if(fFillSSHisto)
2458  {
2461 
2462  if(IsDataMC())
2463  {
2466  }
2467  }
2468 
2469  for(Int_t ibin = 0; ibin < fNPtTrigBin; ibin++)
2470  {
2471  fhPtTrigBinPtLeadCone[ibin] = new TH1F
2472  (Form("hPtTrigBin_PtLeadCone_Bin%d",ibin),
2473  Form("#it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, %s",
2474  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax);
2475  fhPtTrigBinPtLeadCone[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
2476  fhPtTrigBinPtLeadCone[ibin]->SetXTitle("#it{p}_{T}^{in cone} (GeV/#it{c})");
2477  outputContainer->Add(fhPtTrigBinPtLeadCone[ibin]) ;
2478 
2479  fhPtTrigBinSumPtCone[ibin] = new TH1F
2480  (Form("hPtTrigBin_SumPtCone_Bin%d",ibin),
2481  Form("#Sigma #it{p}_{T}^{in cone} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
2482  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitle.Data()),nptsumbins,ptsummin,ptsummax);
2483  fhPtTrigBinSumPtCone[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
2484  fhPtTrigBinSumPtCone[ibin]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
2485  outputContainer->Add(fhPtTrigBinSumPtCone[ibin]) ;
2486 
2488  {
2489  for(Int_t idecay = 0; idecay < fNDecayBits; idecay++)
2490  {
2491  Int_t binDecay = ibin+idecay*fNPtTrigBin;
2492 
2493  fhPtTrigBinPtLeadConeDecay[binDecay] = new TH1F
2494  (Form("hPtTrigBin_PtLeadCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
2495  Form("Decay bit %d, #it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, %s",
2496  fDecayBits[idecay],fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax);
2497  fhPtTrigBinPtLeadConeDecay[binDecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
2498  fhPtTrigBinPtLeadConeDecay[binDecay]->SetXTitle("#it{p}_{T}^{lead in cone} (GeV/#it{c})");
2499  outputContainer->Add(fhPtTrigBinPtLeadConeDecay[binDecay]) ;
2500 
2501  fhPtTrigBinSumPtConeDecay[binDecay] = new TH1F
2502  (Form("hPtTrigBin_SumPtCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
2503  Form("Decay bit %d, #Sigma #it{p}_{T}^{in cone} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
2504  fDecayBits[idecay],fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitle.Data()),nptsumbins,ptsummin,ptsummax);
2505  fhPtTrigBinSumPtConeDecay[binDecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
2506  fhPtTrigBinSumPtConeDecay[binDecay]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
2507  outputContainer->Add(fhPtTrigBinSumPtConeDecay[binDecay]) ;
2508  }
2509  }
2510 
2511  if(IsDataMC())
2512  {
2513  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
2514  {
2515  Int_t binmc = ibin+imc*fNPtTrigBin;
2516  fhPtTrigBinPtLeadConeMC[binmc] = new TH1F
2517  (Form("hPtTrigBin_PtLeadCone_Bin%d_MC%s",ibin, mcPartName[imc].Data()),
2518  Form("#it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, MC %s, %s",
2519  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitle.Data()),nptbins,ptmin,ptmax);
2520  fhPtTrigBinPtLeadConeMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
2521  fhPtTrigBinPtLeadConeMC[binmc]->SetXTitle("#it{p}_{T}^{lead in cone} (GeV/#it{c})");
2522  outputContainer->Add(fhPtTrigBinPtLeadConeMC[binmc]) ;
2523 
2524  fhPtTrigBinSumPtConeMC[binmc] = new TH1F
2525  (Form("hPtTrigBin_SumPtCone_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
2526  Form("#Sigma #it{p}_{T}^{in cone}, %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, MC %s, %s",
2527  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitle.Data()),nptsumbins,ptsummin,ptsummax);
2528  fhPtTrigBinSumPtConeMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
2529  fhPtTrigBinSumPtConeMC[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
2530  outputContainer->Add(fhPtTrigBinSumPtConeMC[binmc]) ;
2531  } // MC particle loop
2532  } // MC
2533 
2534  if(fFillSSHisto)
2535  {
2537  (Form("hPtTrigBin_PtLeadConeVSLambda0_Bin%d",ibin),
2538  Form("#lambda_{0} vs #it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, %s",
2539  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2540  fhPtTrigBinLambda0vsPtLeadCone[ibin]->SetYTitle("#lambda_{0}^{2}");
2541  fhPtTrigBinLambda0vsPtLeadCone[ibin]->SetXTitle("#it{p}_{T}^{lead in cone} (GeV/#it{c})");
2542  outputContainer->Add(fhPtTrigBinLambda0vsPtLeadCone[ibin]) ;
2543 
2545  (Form("hPtTrigBin_SumPtConeVSLambda0_Bin%d",ibin),
2546  Form("#lambda_{0} vs #Sigma #it{p}_{T}^{in cone} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
2547  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitle.Data()),nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
2548  fhPtTrigBinLambda0vsSumPtCone[ibin]->SetYTitle("#lambda_{0}^{2}");
2549  fhPtTrigBinLambda0vsSumPtCone[ibin]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
2550  outputContainer->Add(fhPtTrigBinLambda0vsSumPtCone[ibin]) ;
2551 
2552  if(IsDataMC())
2553  {
2554  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
2555  {
2556  Int_t binmc = ibin+imc*fNPtTrigBin;
2558  (Form("hPtTrigBin_PtLeadConeVSLambda0_Bin%d_MC%s",ibin, mcPartName[imc].Data()),
2559  Form("#lambda_{0} vs #it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, MC %s, %s",
2560  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2561  fhPtTrigBinLambda0vsPtLeadConeMC[binmc]->SetYTitle("#lambda_{0}^{2}");
2562  fhPtTrigBinLambda0vsPtLeadConeMC[binmc]->SetXTitle("#it{p}_{T}^{lead in cone} (GeV/#it{c})");
2563  outputContainer->Add(fhPtTrigBinLambda0vsPtLeadConeMC[binmc]) ;
2564 
2566  (Form("hPtTrigBin_SumPtConeVSLambda0_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
2567  Form("#lambda_{0} vs #Sigma #it{p}_{T}^{in cone}, %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, MC %s, %s",
2568  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitle.Data()),nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
2569  fhPtTrigBinLambda0vsSumPtConeMC[binmc]->SetYTitle("#lambda_{0}^{2}");
2570  fhPtTrigBinLambda0vsSumPtConeMC[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
2571  outputContainer->Add(fhPtTrigBinLambda0vsSumPtConeMC[binmc]) ;
2572  } // MC particle loop
2573  } // MC
2574  } // SS histo
2575  } // pt trig bin loop
2576  } // pt trig bin histograms
2577 
2579  {
2580  fhPtInConeCent = new TH2F("hPtInConeCent",
2581  Form("#it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
2582  100,0,100,nptinconebins,ptinconemin,ptinconemax);
2583  fhPtInConeCent->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
2584  fhPtInConeCent->SetXTitle("centrality");
2585  outputContainer->Add(fhPtInConeCent) ;
2586  }
2587 
2588  // Cluster only histograms
2589  if(GetIsolationCut()->GetParticleTypeInCone()!=AliIsolationCut::kOnlyCharged)
2590  {
2591  fhConeSumPtCluster = new TH2F("hConePtSumCluster",
2592  Form("Cluster #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
2593  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2594  fhConeSumPtCluster->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2595  fhConeSumPtCluster->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2596  outputContainer->Add(fhConeSumPtCluster) ;
2597 
2598  if(fStudyPtCutInCone)
2599  {
2600  fhConeSumPtClusterPerPtCut = new TH2F("hConePtSumClusterPerPtCut",
2601  Form("Cluster #Sigma #it{p}_{T}, different pT cuts in isolation cone for #it{R} = %2.2f",r),
2602  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nptsumbins,ptsummin,ptsummax);
2603  fhConeSumPtClusterPerPtCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2604  fhConeSumPtClusterPerPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
2605  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
2606  fhConeSumPtClusterPerPtCut->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fPtCutInCone[i-1]));
2607  outputContainer->Add(fhConeSumPtClusterPerPtCut) ;
2608 
2609  fhConeSumPtClusterPerPtCutLargePtTrig = new TH2F("hConePtSumClusterPerPtCutLargePtTrig",
2610  Form("Cluster #Sigma #it{p}_{T}, different pT cuts in isolation cone for #it{R} = %2.2f, #it{p}_{T}^{trig} > 10 GeV",r),
2611  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nptsumbins,ptsummin,ptsummax);
2612  fhConeSumPtClusterPerPtCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2613  fhConeSumPtClusterPerPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
2614  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
2615  fhConeSumPtClusterPerPtCutLargePtTrig->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fPtCutInCone[i-1]));
2616  outputContainer->Add(fhConeSumPtClusterPerPtCutLargePtTrig) ;
2617  }
2618 
2620  {
2621  fhConeSumPtClusterFECCorrOdd = new TH2F("hConePtSumClusterFECCorrOdd",
2622  Form("Cluster #Sigma #it{p}_{T} for #it{R} = %2.2f, odd column in FEC",r),
2623  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2624  fhConeSumPtClusterFECCorrOdd->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2625  fhConeSumPtClusterFECCorrOdd->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2626  outputContainer->Add(fhConeSumPtClusterFECCorrOdd) ;
2627 
2628  fhConeSumPtClusterFECCorrOdd2Max = new TH2F("hConePtSumClusterFECCorrOdd2Max",
2629  Form("Cluster #Sigma #it{p}_{T} for #it{R} = %2.2f, odd column in FEC, (n,n+1) max cells",r),
2630  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2631  fhConeSumPtClusterFECCorrOdd2Max->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2632  fhConeSumPtClusterFECCorrOdd2Max->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2633  outputContainer->Add(fhConeSumPtClusterFECCorrOdd2Max) ;
2634 
2635  fhConeSumPtClusterFECCorrOddHighCut = new TH2F("hConePtSumClusterFECCorrOddHighCut",
2636  Form("Cluster #Sigma #it{p}_{T} for #it{R} = %2.2f, odd column in FEC, #it{E}_{T} > 0.7 GeV",r),
2637  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2638  fhConeSumPtClusterFECCorrOddHighCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2639  fhConeSumPtClusterFECCorrOddHighCut->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2640  outputContainer->Add(fhConeSumPtClusterFECCorrOddHighCut) ;
2641 
2642  fhConeSumPtClusterFECCorrOdd2MaxHighCut = new TH2F("hConePtSumClusterFECCorrOdd2Max",
2643  Form("Cluster #Sigma #it{p}_{T} for #it{R} = %2.2f, odd column in FEC, (n,n+1) max cells, #it{E}_{T}> 0.7 GeV",r),
2644  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2645  fhConeSumPtClusterFECCorrOdd2MaxHighCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2646  fhConeSumPtClusterFECCorrOdd2MaxHighCut->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2647  outputContainer->Add(fhConeSumPtClusterFECCorrOdd2MaxHighCut) ;
2648 
2649  fhConeSumPtClusterFECCorrPair = new TH2F("hConePtSumClusterFECCorrPair",
2650  Form("Cluster #Sigma #it{p}_{T} for #it{R} = %2.2f, pair column in FEC",r),
2651  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2652  fhConeSumPtClusterFECCorrPair->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2653  fhConeSumPtClusterFECCorrPair->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2654  outputContainer->Add(fhConeSumPtClusterFECCorrPair) ;
2655 
2656  fhConeSumPtClusterFECCorrPair2Max = new TH2F("hConePtSumClusterFECCorrPair2Max",
2657  Form("Cluster #Sigma #it{p}_{T} for #it{R} = %2.2f, pair column in FEC, (n,n+1) max cells",r),
2658  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2659  fhConeSumPtClusterFECCorrPair2Max->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2660  fhConeSumPtClusterFECCorrPair2Max->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2661  outputContainer->Add(fhConeSumPtClusterFECCorrPair2Max) ;
2662 
2663  fhConeSumPtClusterFECCorrPairHighCut = new TH2F("hConePtSumClusterFECCorrPairHighCut",
2664  Form("Cluster #Sigma #it{p}_{T} for #it{R} = %2.2f, pair column in FEC, #it{E}_{T} > 0.7 GeV",r),
2665  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2666  fhConeSumPtClusterFECCorrPairHighCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2667  fhConeSumPtClusterFECCorrPairHighCut->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2668  outputContainer->Add(fhConeSumPtClusterFECCorrPairHighCut) ;
2669 
2670  fhConeSumPtClusterFECCorrPair2MaxHighCut = new TH2F("hConePtSumClusterFECCorrPair2Max",
2671  Form("Cluster #Sigma #it{p}_{T} for #it{R} = %2.2f, pair column in FEC, (n,n+1) max cells, #it{E}_{T}> 0.7 GeV",r),
2672  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2673  fhConeSumPtClusterFECCorrPair2MaxHighCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
2674  fhConeSumPtClusterFECCorrPair2MaxHighCut->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2675 
2676  outputContainer->Add(fhConeSumPtClusterFECCorrPair2MaxHighCut) ;
2677  }
2678 
2679  fhConePtLeadCluster = new TH2F("hConeLeadPtCluster",
2680  Form("Cluster leading in isolation cone for #it{R} = %2.2f",r),
2681  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
2682  fhConePtLeadCluster->SetYTitle("#it{p}_{T, leading} (GeV/#it{c})");
2683  fhConePtLeadCluster->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2684  outputContainer->Add(fhConePtLeadCluster) ;
2685 
2686 
2688  {
2689  fhConeSumPtCell = new TH2F("hConePtSumCell",
2690  Form("Cell #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
2691  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2692  fhConeSumPtCell->SetYTitle("#Sigma #it{p}_{T}");
2693  fhConeSumPtCell->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2694  outputContainer->Add(fhConeSumPtCell) ;
2695  }
2696 
2698  {
2699  fhConeSumPtEtaBandUECluster = new TH2F("hConePtSumEtaBandUECluster",
2700  "#Sigma cluster #it{p}_{T} in UE Eta Band",
2701  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2702  fhConeSumPtEtaBandUECluster->SetYTitle("#Sigma #it{p}_{T}");
2703  fhConeSumPtEtaBandUECluster->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2704  outputContainer->Add(fhConeSumPtEtaBandUECluster) ;
2705 
2706  fhConeSumPtPhiBandUECluster = new TH2F("hConePtSumPhiBandUECluster",
2707  "#Sigma cluster #it{p}_{T} UE Phi Band",
2708  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2709  fhConeSumPtPhiBandUECluster->SetYTitle("#Sigma #it{p}_{T}");
2710  fhConeSumPtPhiBandUECluster->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2711  outputContainer->Add(fhConeSumPtPhiBandUECluster) ;
2712 
2713  fhConeSumPtEtaBandUEClusterTrigEtaPhi = new TH2F("hConePtSumEtaBandUEClusterTrigEtaPhi",
2714  "Trigger #eta vs #phi, #Sigma cluster #it{p}_{T} in UE Eta Band",
2715  netabins,etamin,etamax,nphibins,phimin,phimax);
2716  fhConeSumPtEtaBandUEClusterTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2717  fhConeSumPtEtaBandUEClusterTrigEtaPhi->SetXTitle("#eta_{trigger}");
2718  fhConeSumPtEtaBandUEClusterTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2719  outputContainer->Add(fhConeSumPtEtaBandUEClusterTrigEtaPhi) ;
2720 
2721  fhConeSumPtPhiBandUEClusterTrigEtaPhi = new TH2F("hConePtSumPhiBandUEClusterTrigEtaPhi",
2722  "Trigger #eta vs #phi, #Sigma cluster #it{p}_{T} UE Phi Band",
2723  netabins,etamin,etamax,nphibins,phimin,phimax);
2724  fhConeSumPtPhiBandUEClusterTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2725  fhConeSumPtPhiBandUEClusterTrigEtaPhi->SetXTitle("#eta_{trigger}");
2726  fhConeSumPtPhiBandUEClusterTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2727  outputContainer->Add(fhConeSumPtPhiBandUEClusterTrigEtaPhi) ;
2728 
2730  {
2731  fhConeSumPtEtaBandUECell = new TH2F("hConePtSumEtaBandUECell",
2732  "#Sigma cell #it{p}_{T} in UE Eta Band",
2733  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2734  fhConeSumPtEtaBandUECell->SetYTitle("#Sigma #it{p}_{T}");
2735  fhConeSumPtEtaBandUECell->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2736  outputContainer->Add(fhConeSumPtEtaBandUECell) ;
2737 
2738  fhConeSumPtPhiBandUECell = new TH2F("hConePtSumPhiBandUECell",
2739  "#Sigma cell #it{p}_{T} UE Phi Band",
2740  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
2741  fhConeSumPtPhiBandUECell->SetYTitle("#Sigma #it{p}_{T}");
2742  fhConeSumPtPhiBandUECell->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
2743  outputContainer->Add(fhConeSumPtPhiBandUECell) ;
2744 
2745  fhConeSumPtEtaBandUECellTrigEtaPhi = new TH2F("hConePtSumEtaBandUECellTrigEtaPhi",
2746  "Trigger #eta vs #phi, #Sigma cell #it{p}_{T} in UE Eta Band",
2747  netabins,etamin,etamax,nphibins,phimin,phimax);
2748  fhConeSumPtEtaBandUECellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2749  fhConeSumPtEtaBandUECellTrigEtaPhi->SetXTitle("#eta_{trigger}");
2750  fhConeSumPtEtaBandUECellTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2751  outputContainer->Add(fhConeSumPtEtaBandUECellTrigEtaPhi) ;
2752 
2753  fhConeSumPtPhiBandUECellTrigEtaPhi = new TH2F("hConePtSumPhiBandUECellTrigEtaPhi",
2754  "Trigger #eta vs #phi, #Sigma cell #it{p}_{T} UE Phi Band",
2755  netabins,etamin,etamax,nphibins,phimin,phimax);
2756  fhConeSumPtPhiBandUECellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2757  fhConeSumPtPhiBandUECellTrigEtaPhi->SetXTitle("#eta_{trigger}");
2758  fhConeSumPtPhiBandUECellTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2759  outputContainer->Add(fhConeSumPtPhiBandUECellTrigEtaPhi) ;
2760  }
2761 
2762  fhEtaBandCluster = new TH2F("hEtaBandCluster",
2763  Form("#eta vs #phi of clusters in #eta band isolation cone for #it{R} = %2.2f",r),
2764  netabins,-1,1,nphibins,0,TMath::TwoPi());
2765  fhEtaBandCluster->SetXTitle("#eta");
2766  fhEtaBandCluster->SetYTitle("#phi");
2767  outputContainer->Add(fhEtaBandCluster) ;
2768 
2769  fhPhiBandCluster = new TH2F("hPhiBandCluster",
2770  Form("#eta vs #phi of clusters in #phi band isolation cone for #it{R} = %2.2f",r),
2771  netabins,-1,1,nphibins,0,TMath::TwoPi());
2772  fhPhiBandCluster->SetXTitle("#eta");
2773  fhPhiBandCluster->SetYTitle("#phi");
2774  outputContainer->Add(fhPhiBandCluster) ;
2775 
2776  fhEtaPhiInConeCluster= new TH2F("hEtaPhiInConeCluster",
2777  Form("#eta vs #phi of clusters in cone for #it{R} = %2.2f",r),
2778  netabins,-1,1,nphibins,0,TMath::TwoPi());
2779  fhEtaPhiInConeCluster->SetXTitle("#eta");
2780  fhEtaPhiInConeCluster->SetYTitle("#phi");
2781  outputContainer->Add(fhEtaPhiInConeCluster) ;
2782 
2783  fhEtaPhiCluster= new TH2F("hEtaPhiCluster",
2784  Form("#eta vs #phi of all clusters"),
2785  netabins,-1,1,nphibins,0,TMath::TwoPi());
2786  fhEtaPhiCluster->SetXTitle("#eta");
2787  fhEtaPhiCluster->SetYTitle("#phi");
2788  outputContainer->Add(fhEtaPhiCluster) ;
2789 
2790  }
2791 
2792  fhPtClusterInCone = new TH2F("hPtClusterInCone",
2793  Form("#it{p}_{T} of clusters in isolation cone for #it{R} = %2.2f",r),
2794  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
2795  fhPtClusterInCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
2796  fhPtClusterInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2797  outputContainer->Add(fhPtClusterInCone) ;
2798 
2800  {
2801  fhPtCellInCone = new TH2F("hPtCellInCone",
2802  Form("#it{p}_{T} of cells in isolation cone for #it{R} = %2.2f",r),
2803  nptbins,ptmin,ptmax,1000,0,50);
2804  fhPtCellInCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
2805  fhPtCellInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2806  outputContainer->Add(fhPtCellInCone) ;
2807 
2808  fhEtaBandCell = new TH2F("hEtaBandCell",
2809  Form("#col vs #row of cells in #eta band isolation cone for #it{R} = %2.2f",r),
2810  96,0,95,128,0,127);
2811  fhEtaBandCell->SetXTitle("#col");
2812  fhEtaBandCell->SetYTitle("#row");
2813  outputContainer->Add(fhEtaBandCell) ;
2814 
2815  fhPhiBandCell = new TH2F("hPhiBandCell",
2816  Form("#col vs #row of cells in #phi band isolation cone for #it{R} = %2.2f",r),
2817  96,0,95,128,0,127);
2818  fhPhiBandCell->SetXTitle("#col");
2819  fhPhiBandCell->SetYTitle("#row");
2820  outputContainer->Add(fhPhiBandCell) ;
2821  }
2822 
2824  {
2825  fhConeSumPtEtaUESubCluster = new TH2F("hConeSumPtEtaUESubCluster",
2826  Form("Clusters #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
2827  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
2828  fhConeSumPtEtaUESubCluster->SetYTitle("#Sigma #it{p}_{T}");
2829  fhConeSumPtEtaUESubCluster->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2830  outputContainer->Add(fhConeSumPtEtaUESubCluster) ;
2831 
2832  fhConeSumPtPhiUESubCluster = new TH2F("hConeSumPtPhiUESubCluster",
2833  Form("Clusters #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
2834  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
2835  fhConeSumPtPhiUESubCluster->SetYTitle("#Sigma #it{p}_{T}");
2836  fhConeSumPtPhiUESubCluster->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2837  outputContainer->Add(fhConeSumPtPhiUESubCluster) ;
2838 
2839  fhConeSumPtEtaUESubClusterTrigEtaPhi = new TH2F("hConeSumPtEtaUESubClusterTrigEtaPhi",
2840  Form("Trigger #eta vs #phi, Clusters #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
2841  netabins,etamin,etamax,nphibins,phimin,phimax);
2842  fhConeSumPtEtaUESubClusterTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2843  fhConeSumPtEtaUESubClusterTrigEtaPhi->SetXTitle("#eta_{trigger}");
2844  fhConeSumPtEtaUESubClusterTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2845  outputContainer->Add(fhConeSumPtEtaUESubClusterTrigEtaPhi) ;
2846 
2847  fhConeSumPtPhiUESubClusterTrigEtaPhi = new TH2F("hConeSumPtPhiUESubClusterTrigEtaPhi",
2848  Form("Trigger #eta vs #phi, Clusters #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
2849  netabins,etamin,etamax,nphibins,phimin,phimax);
2850  fhConeSumPtPhiUESubClusterTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2851  fhConeSumPtPhiUESubClusterTrigEtaPhi->SetXTitle("#eta_{trigger}");
2852  fhConeSumPtPhiUESubClusterTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2853  outputContainer->Add(fhConeSumPtPhiUESubClusterTrigEtaPhi) ;
2854 
2856  {
2857  fhConeSumPtEtaUESubCell = new TH2F("hConeSumPtEtaUESubCell",
2858  Form("Cells #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
2859  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
2860  fhConeSumPtEtaUESubCell->SetYTitle("#Sigma #it{p}_{T}");
2861  fhConeSumPtEtaUESubCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2862  outputContainer->Add(fhConeSumPtEtaUESubCell) ;
2863 
2864  fhConeSumPtPhiUESubCell = new TH2F("hConeSumPtPhiUESubCell",
2865  Form("Cells #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
2866  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
2867  fhConeSumPtPhiUESubCell->SetYTitle("#Sigma #it{p}_{T}");
2868  fhConeSumPtPhiUESubCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2869  outputContainer->Add(fhConeSumPtPhiUESubCell) ;
2870 
2871  fhConeSumPtEtaUESubCellTrigEtaPhi = new TH2F("hConeSumPtEtaUESubCellTrigEtaPhi",
2872  Form("Trigger #eta vs #phi, Cells #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
2873  netabins,etamin,etamax,nphibins,phimin,phimax);
2874  fhConeSumPtEtaUESubCellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2875  fhConeSumPtEtaUESubCellTrigEtaPhi->SetXTitle("#eta_{trigger}");
2876  fhConeSumPtEtaUESubCellTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2877  outputContainer->Add(fhConeSumPtEtaUESubCellTrigEtaPhi) ;
2878 
2879  fhConeSumPtPhiUESubCellTrigEtaPhi = new TH2F("hConeSumPtPhiUESubCellTrigEtaPhi",
2880  Form("Trigger #eta vs #phi, Cells #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
2881  netabins,etamin,etamax,nphibins,phimin,phimax);
2882  fhConeSumPtPhiUESubCellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
2883  fhConeSumPtPhiUESubCellTrigEtaPhi->SetXTitle("#eta_{trigger}");
2884  fhConeSumPtPhiUESubCellTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2885  outputContainer->Add(fhConeSumPtPhiUESubCellTrigEtaPhi) ;
2886  }
2887 
2888  fhFractionClusterOutConeEta = new TH2F("hFractionClusterOutConeEta",
2889  Form("Fraction of the isolation cone #it{R} = %2.2f, out of clusters #eta acceptance",r),
2890  nptbins,ptmin,ptmax,100,0,1);
2891  fhFractionClusterOutConeEta->SetYTitle("#it{fraction}");
2892  fhFractionClusterOutConeEta->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
2893  outputContainer->Add(fhFractionClusterOutConeEta) ;
2894 
2895  fhFractionClusterOutConeEtaTrigEtaPhi = new TH2F("hFractionClusterOutConeEtaTrigEtaPhi",
2896  Form("Fraction of the isolation cone #it{R} = %2.2f, out of clusters #eta acceptance, in trigger #eta-#phi ",r),
2897  netabins,etamin,etamax,nphibins,phimin,phimax);
2898  fhFractionClusterOutConeEtaTrigEtaPhi->SetZTitle("#it{fraction}");
2899  fhFractionClusterOutConeEtaTrigEtaPhi->SetXTitle("#eta_{trigger}");
2900  fhFractionClusterOutConeEtaTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2901  outputContainer->Add(fhFractionClusterOutConeEtaTrigEtaPhi) ;
2902 
2903  fhFractionClusterOutConePhi = new TH2F("hFractionClusterOutConePhi",
2904  Form("Fraction of the isolation cone #it{R} = %2.2f, out of clusters #phi acceptance",r),
2905  nptbins,ptmin,ptmax,100,0,1);
2906  fhFractionClusterOutConePhi->SetYTitle("#it{fraction}");
2907  fhFractionClusterOutConePhi->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
2908  outputContainer->Add(fhFractionClusterOutConePhi) ;
2909 
2910  fhFractionClusterOutConePhiTrigEtaPhi = new TH2F("hFractionClusterOutConePhiTrigEtaPhi",
2911  Form("Fraction of the isolation cone #it{R} = %2.2f, out of clusters #phi acceptance, in trigger #eta-#phi ",r),
2912  netabins,etamin,etamax,nphibins,phimin,phimax);
2913  fhFractionClusterOutConePhiTrigEtaPhi->SetZTitle("#it{fraction}");
2914  fhFractionClusterOutConePhiTrigEtaPhi->SetXTitle("#eta_{trigger}");
2915  fhFractionClusterOutConePhiTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2916  outputContainer->Add(fhFractionClusterOutConePhiTrigEtaPhi) ;
2917 
2918  fhConeSumPtSubvsConeSumPtTotPhiCluster = new TH2F("hConeSumPtSubvsConeSumPtTotPhiCluster",
2919  Form("#Sigma #it{p}_{T} in cone after bkg sub from #phi band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
2920  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
2921  fhConeSumPtSubvsConeSumPtTotPhiCluster->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
2922  fhConeSumPtSubvsConeSumPtTotPhiCluster->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
2923  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotPhiCluster);
2924 
2925  fhConeSumPtSubNormvsConeSumPtTotPhiCluster = new TH2F("hConeSumPtSubNormvsConeSumPtTotPhiCluster",
2926  Form("#Sigma #it{p}_{T, norm} in cone after bkg sub from #phi band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
2927  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
2928  fhConeSumPtSubNormvsConeSumPtTotPhiCluster->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
2929  fhConeSumPtSubNormvsConeSumPtTotPhiCluster->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
2930  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotPhiCluster);
2931 
2932  fhConeSumPtSubvsConeSumPtTotEtaCluster = new TH2F("hConeSumPtSubvsConeSumPtTotEtaCluster",
2933  Form("#Sigma #it{p}_{T} in cone after bkg sub from #eta band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
2934  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
2935  fhConeSumPtSubvsConeSumPtTotEtaCluster->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
2936  fhConeSumPtSubvsConeSumPtTotEtaCluster->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
2937  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotEtaCluster);
2938 
2939  fhConeSumPtSubNormvsConeSumPtTotEtaCluster = new TH2F("hConeSumPtSubNormvsConeSumPtTotEtaCluster",
2940  Form("#Sigma #it{p}_{T, norm} in cone after bkg sub from #eta band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
2941  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
2942  fhConeSumPtSubNormvsConeSumPtTotEtaCluster->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
2943  fhConeSumPtSubNormvsConeSumPtTotEtaCluster->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
2944  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotEtaCluster);
2945 
2946  fhConeSumPtVSUEClusterEtaBand = new TH2F("hConeSumPtVSUEClusterEtaBand",
2947  Form("#Sigma #it{p}_{T} in cone versus #Sigma #it{p}_{T} in eta band for cluster (before normalization), R=%2.2f",r),
2948  nptsumbins,ptsummin,ptsummax,2*nptsumbins,ptsummin,2*ptsummax);
2949  fhConeSumPtVSUEClusterEtaBand->SetXTitle("#Sigma #it{p}_{T} cone (GeV/#it{c})");
2950  fhConeSumPtVSUEClusterEtaBand->SetYTitle("#Sigma #it{p}_{T} UE (GeV/#it{c})");
2951  outputContainer->Add(fhConeSumPtVSUEClusterEtaBand);
2952 
2953  fhConeSumPtVSUEClusterPhiBand = new TH2F("hConeSumPtVSUEClusterPhiBand",
2954  Form("#Sigma #it{p}_{T} in cone versus #Sigma #it{p}_{T} in phi band for cluster (before normalization), R=%2.2f",r),
2955  nptsumbins,ptsummin,ptsummax,8*nptsumbins,ptsummin,8*ptsummax);
2956  fhConeSumPtVSUEClusterPhiBand->SetXTitle("#Sigma #it{p}_{T} cone (GeV/#it{c})");
2957  fhConeSumPtVSUEClusterPhiBand->SetYTitle("#Sigma #it{p}_{T} UE (GeV/#it{c})");
2958  outputContainer->Add(fhConeSumPtVSUEClusterPhiBand);
2959 
2961  {
2962  fhFractionCellOutConeEta = new TH2F("hFractionCellOutConeEta",
2963  Form("Fraction of the isolation cone #it{R} = %2.2f, out of cells #eta acceptance",r),
2964  nptbins,ptmin,ptmax,100,0,1);
2965  fhFractionCellOutConeEta->SetYTitle("#it{fraction}");
2966  fhFractionCellOutConeEta->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
2967  outputContainer->Add(fhFractionCellOutConeEta) ;
2968 
2969  fhFractionCellOutConeEtaTrigEtaPhi = new TH2F("hFractionCellOutConeEtaTrigEtaPhi",
2970  Form("Fraction of the isolation cone #it{R} = %2.2f, out of cells #eta acceptance, in trigger #eta-#phi ",r),
2971  netabins,etamin,etamax,nphibins,phimin,phimax);
2972  fhFractionCellOutConeEtaTrigEtaPhi->SetZTitle("#it{fraction}");
2973  fhFractionCellOutConeEtaTrigEtaPhi->SetXTitle("#eta_{trigger}");
2974  fhFractionCellOutConeEtaTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2975  outputContainer->Add(fhFractionCellOutConeEtaTrigEtaPhi) ;
2976 
2977  fhFractionCellOutConePhi = new TH2F("hFractionCellOutConePhi",
2978  Form("Fraction of the isolation cone #it{R} = %2.2f, out of cells #phi acceptance",r),
2979  nptbins,ptmin,ptmax,100,0,1);
2980  fhFractionCellOutConePhi->SetYTitle("#it{fraction}");
2981  fhFractionCellOutConePhi->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
2982  outputContainer->Add(fhFractionCellOutConePhi) ;
2983 
2984  fhFractionCellOutConePhiTrigEtaPhi = new TH2F("hFractionCellOutConePhiTrigEtaPhi",
2985  Form("Fraction of the isolation cone #it{R} = %2.2f, out of cells #phi acceptance, in trigger #eta-#phi ",r),
2986  netabins,etamin,etamax,nphibins,phimin,phimax);
2987  fhFractionCellOutConePhiTrigEtaPhi->SetZTitle("#it{fraction}");
2988  fhFractionCellOutConePhiTrigEtaPhi->SetXTitle("#eta_{trigger}");
2989  fhFractionCellOutConePhiTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
2990  outputContainer->Add(fhFractionCellOutConePhiTrigEtaPhi) ;
2991 
2992 
2993  fhConeSumPtSubvsConeSumPtTotPhiCell = new TH2F("hConeSumPtSubvsConeSumPtTotPhiCell",
2994  Form("#Sigma #it{p}_{T} in cone after bkg sub from #phi band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
2995  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
2996  fhConeSumPtSubvsConeSumPtTotPhiCell->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
2997  fhConeSumPtSubvsConeSumPtTotPhiCell->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
2998  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotPhiCell);
2999 
3000  fhConeSumPtSubNormvsConeSumPtTotPhiCell = new TH2F("hConeSumPtSubNormvsConeSumPtTotPhiCell",
3001  Form("#Sigma #it{p}_{T, norm} in cone after bkg sub from #phi band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
3002  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3003  fhConeSumPtSubNormvsConeSumPtTotPhiCell->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
3004  fhConeSumPtSubNormvsConeSumPtTotPhiCell->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
3005  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotPhiCell);
3006 
3007  fhConeSumPtSubvsConeSumPtTotEtaCell = new TH2F("hConeSumPtSubvsConeSumPtTotEtaCell",
3008  Form("#Sigma #it{p}_{T} in cone after bkg sub from #eta band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
3009  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3010  fhConeSumPtSubvsConeSumPtTotEtaCell->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
3011  fhConeSumPtSubvsConeSumPtTotEtaCell->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
3012  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotEtaCell);
3013 
3014  fhConeSumPtSubNormvsConeSumPtTotEtaCell = new TH2F("hConeSumPtSubNormvsConeSumPtTotEtaCell",
3015  Form("#Sigma #it{p}_{T, norm} in cone after bkg sub from #eta band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
3016  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3017  fhConeSumPtSubNormvsConeSumPtTotEtaCell->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
3018  fhConeSumPtSubNormvsConeSumPtTotEtaCell->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
3019  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotEtaCell);
3020  }
3021  }
3022  }
3023 
3024  // Track only histograms
3025  if(GetIsolationCut()->GetParticleTypeInCone()!=AliIsolationCut::kOnlyNeutral)
3026  {
3027  fhConeSumPtTrack = new TH2F("hConePtSumTrack",
3028  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3029  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3030  fhConeSumPtTrack->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3031  fhConeSumPtTrack->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3032  outputContainer->Add(fhConeSumPtTrack) ;
3033 
3034  if(fStudyPtCutInCone)
3035  {
3036  fhConeSumPtTrackPerPtCut = new TH2F("hConePtSumTrackPerPtCut",
3037  Form("Track #Sigma #it{p}_{T}, different pT cuts in isolation cone for #it{R} = %2.2f",r),
3038  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nptsumbins,ptsummin,ptsummax);
3039  fhConeSumPtTrackPerPtCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3040  fhConeSumPtTrackPerPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
3041  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
3042  fhConeSumPtTrackPerPtCut->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fPtCutInCone[i-1]));
3043  outputContainer->Add(fhConeSumPtTrackPerPtCut) ;
3044 
3045  fhConeSumPtTrackPerPtCutLargePtTrig = new TH2F("hConePtSumTrackPerPtCutLargePtTrig",
3046  Form("Track #Sigma #it{p}_{T}, different pT cuts in isolation cone for #it{R} = %2.2f, #it{p}_{T}^{trig} > 10 GeV",r),
3047  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nptsumbins,ptsummin,ptsummax);
3048  fhConeSumPtTrackPerPtCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3049  fhConeSumPtTrackPerPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
3050  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
3051  fhConeSumPtTrackPerPtCutLargePtTrig->GetXaxis()->SetBinLabel(i ,Form("%2.2f",fPtCutInCone[i-1]));
3052  outputContainer->Add(fhConeSumPtTrackPerPtCutLargePtTrig) ;
3053  }
3054 
3055  fhConePtLeadTrack = new TH2F("hConeLeadPtTrack",
3056  Form("Track leading in isolation cone for #it{R} = %2.2f",r),
3057  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
3058  fhConePtLeadTrack->SetYTitle("#it{p}_{T, leading} (GeV/#it{c})");
3059  fhConePtLeadTrack->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3060  outputContainer->Add(fhConePtLeadTrack) ;
3061 
3062  fhPtTrackInCone = new TH2F("hPtTrackInCone",
3063  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f",r),
3064  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3065  fhPtTrackInCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3066  fhPtTrackInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3067  outputContainer->Add(fhPtTrackInCone) ;
3068 
3069 
3071  {
3072  fhConeSumPtEtaBandUETrack = new TH2F("hConePtSumEtaBandUETrack",
3073  "#Sigma track #it{p}_{T} in UE Eta Band",
3074  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3075  fhConeSumPtEtaBandUETrack->SetYTitle("#Sigma #it{p}_{T}");
3076  fhConeSumPtEtaBandUETrack->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3077  outputContainer->Add(fhConeSumPtEtaBandUETrack) ;
3078 
3079  fhConeSumPtPhiBandUETrack = new TH2F("hConePtSumPhiBandUETrack",
3080  "#Sigma track #it{p}_{T} in UE Phi Band",
3081  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax*8);
3082  fhConeSumPtPhiBandUETrack->SetYTitle("#Sigma #it{p}_{T}");
3083  fhConeSumPtPhiBandUETrack->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3084  outputContainer->Add(fhConeSumPtPhiBandUETrack) ;
3085 
3086 
3087  fhConeSumPtEtaBandUETrackTrigEtaPhi = new TH2F("hConePtSumEtaBandUETrackTrigEtaPhi",
3088  "Trigger #eta vs #phi, #Sigma track #it{p}_{T} in UE Eta Band",
3089  netabins,etamin,etamax,nphibins,phimin,phimax);
3090  fhConeSumPtEtaBandUETrackTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3091  fhConeSumPtEtaBandUETrackTrigEtaPhi->SetXTitle("#eta_{trigger}");
3092  fhConeSumPtEtaBandUETrackTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3093  outputContainer->Add(fhConeSumPtEtaBandUETrackTrigEtaPhi) ;
3094 
3095  fhConeSumPtPhiBandUETrackTrigEtaPhi = new TH2F("hConePtSumPhiBandUETrackTrigEtaPhi",
3096  "Trigger #eta vs #phi, #Sigma track #it{p}_{T} in UE Phi Band",
3097  netabins,etamin,etamax,nphibins,phimin,phimax);
3098  fhConeSumPtPhiBandUETrackTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3099  fhConeSumPtPhiBandUETrackTrigEtaPhi->SetXTitle("#eta_{trigger}");
3100  fhConeSumPtPhiBandUETrackTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3101  outputContainer->Add(fhConeSumPtPhiBandUETrackTrigEtaPhi) ;
3102 
3103  fhEtaBandTrack = new TH2F("hEtaBandTrack",
3104  Form("#eta vs #phi of tracks in #eta band isolation cone for #it{R} = %2.2f",r),
3105  netabins,-1,1,nphibins,0,TMath::TwoPi());
3106  fhEtaBandTrack->SetXTitle("#eta");
3107  fhEtaBandTrack->SetYTitle("#phi");
3108  outputContainer->Add(fhEtaBandTrack) ;
3109 
3110  fhPhiBandTrack = new TH2F("hPhiBandTrack",
3111  Form("#eta vs #phi of tracks in #phi band isolation cone for #it{R} = %2.2f",r),
3112  netabins,-1,1,nphibins,0,TMath::TwoPi());
3113  fhPhiBandTrack->SetXTitle("#eta");
3114  fhPhiBandTrack->SetYTitle("#phi");
3115  outputContainer->Add(fhPhiBandTrack) ;
3116 
3117  fhConeSumPtEtaUESubTrack = new TH2F("hConeSumPtEtaUESubTrack",
3118  Form("Tracks #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
3119  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
3120  fhConeSumPtEtaUESubTrack->SetYTitle("#Sigma #it{p}_{T}");
3121  fhConeSumPtEtaUESubTrack->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3122  outputContainer->Add(fhConeSumPtEtaUESubTrack) ;
3123 
3124  fhConeSumPtPhiUESubTrack = new TH2F("hConeSumPtPhiUESubTrack",
3125  Form("Tracks #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
3126  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
3127  fhConeSumPtPhiUESubTrack->SetYTitle("#Sigma #it{p}_{T}");
3128  fhConeSumPtPhiUESubTrack->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3129  outputContainer->Add(fhConeSumPtPhiUESubTrack) ;
3130 
3131  fhConeSumPtEtaUESubTrackTrigEtaPhi = new TH2F("hConeSumPtEtaUESubTrackTrigEtaPhi",
3132  Form("Trigger #eta vs #phi, Tracks #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
3133  netabins,etamin,etamax,nphibins,phimin,phimax);
3134  fhConeSumPtEtaUESubTrackTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3135  fhConeSumPtEtaUESubTrackTrigEtaPhi->SetXTitle("#eta_{trigger}");
3136  fhConeSumPtEtaUESubTrackTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3137  outputContainer->Add(fhConeSumPtEtaUESubTrackTrigEtaPhi) ;
3138 
3139  fhConeSumPtPhiUESubTrackTrigEtaPhi = new TH2F("hConeSumPtPhiUESubTrackTrigEtaPhi",
3140  Form("Trigger #eta vs #phi, Tracks #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
3141  netabins,etamin,etamax,nphibins,phimin,phimax);
3142  fhConeSumPtPhiUESubTrackTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3143  fhConeSumPtPhiUESubTrackTrigEtaPhi->SetXTitle("#eta_{trigger}");
3144  fhConeSumPtPhiUESubTrackTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3145  outputContainer->Add(fhConeSumPtPhiUESubTrackTrigEtaPhi) ;
3146 
3147  fhFractionTrackOutConeEta = new TH2F("hFractionTrackOutConeEta",
3148  Form("Fraction of the isolation cone #it{R} = %2.2f, out of tracks #eta acceptance",r),
3149  nptbins,ptmin,ptmax,100,0,1);
3150  fhFractionTrackOutConeEta->SetYTitle("#it{fraction}");
3151  fhFractionTrackOutConeEta->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
3152  outputContainer->Add(fhFractionTrackOutConeEta) ;
3153 
3154  fhFractionTrackOutConeEtaTrigEtaPhi = new TH2F("hFractionTrackOutConeEtaTrigEtaPhi",
3155  Form("Fraction of the isolation cone #it{R} = %2.2f, out of tracks #eta acceptance, in trigger #eta-#phi ",r),
3156  netabins,etamin,etamax,nphibins,phimin,phimax);
3157  fhFractionTrackOutConeEtaTrigEtaPhi->SetZTitle("#it{fraction}");
3158  fhFractionTrackOutConeEtaTrigEtaPhi->SetXTitle("#eta_{trigger}");
3159  fhFractionTrackOutConeEtaTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3160  outputContainer->Add(fhFractionTrackOutConeEtaTrigEtaPhi) ;
3161 
3162  fhConeSumPtSubvsConeSumPtTotPhiTrack = new TH2F("hConeSumPtSubvsConeSumPtTotPhiTrack",
3163  Form("#Sigma #it{p}_{T} in cone after bkg sub from #phi band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
3164  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3165  fhConeSumPtSubvsConeSumPtTotPhiTrack->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
3166  fhConeSumPtSubvsConeSumPtTotPhiTrack->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
3167  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotPhiTrack);
3168 
3169  fhConeSumPtSubNormvsConeSumPtTotPhiTrack = new TH2F("hConeSumPtSubNormvsConeSumPtTotPhiTrack",
3170  Form("#Sigma #it{p}_{T, norm} in cone after bkg sub from #phi band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
3171  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3172  fhConeSumPtSubNormvsConeSumPtTotPhiTrack->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
3173  fhConeSumPtSubNormvsConeSumPtTotPhiTrack->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
3174  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotPhiTrack);
3175 
3176  fhConeSumPtSubvsConeSumPtTotEtaTrack = new TH2F("hConeSumPtSubvsConeSumPtTotEtaTrack",
3177  Form("#Sigma #it{p}_{T} in cone after bkg sub from #eta band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
3178  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3179  fhConeSumPtSubvsConeSumPtTotEtaTrack->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
3180  fhConeSumPtSubvsConeSumPtTotEtaTrack->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
3181  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotEtaTrack);
3182 
3183  fhConeSumPtSubNormvsConeSumPtTotEtaTrack = new TH2F("hConeSumPtSubNormvsConeSumPtTotEtaTrack",
3184  Form("#Sigma #it{p}_{T, norm} in cone after bkg sub from #eta band vs #Sigma #it{p}_{T} in cone before bkg sub, R=%2.2f",r),
3185  nptsumbins,ptsummin,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3186  fhConeSumPtSubNormvsConeSumPtTotEtaTrack->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
3187  fhConeSumPtSubNormvsConeSumPtTotEtaTrack->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
3188  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotEtaTrack);
3189 
3190 
3191  // UE in perpendicular cone
3192  fhPerpConeSumPt = new TH2F("hPerpConePtSum",
3193  Form("#Sigma #it{p}_{T} in isolation cone at #pm 45 degree phi from trigger particle, #it{R} = %2.2f",r),
3194  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3195  fhPerpConeSumPt->SetYTitle("#Sigma #it{p}_{T}");
3196  fhPerpConeSumPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3197  outputContainer->Add(fhPerpConeSumPt) ;
3198 
3199  fhPtInPerpCone = new TH2F("hPtInPerpCone",
3200  Form("#it{p}_{T} in isolation cone at #pm 45 degree phi from trigger particle, #it{R} = %2.2f",r),
3201  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3202  fhPtInPerpCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3203  fhPtInPerpCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3204  outputContainer->Add(fhPtInPerpCone) ;
3205 
3206  fhEtaPhiTrack= new TH2F("hEtaPhiTrack",
3207  Form("#eta vs #phi of all Tracks"),
3208  netabins,-1,1,nphibins,0,TMath::TwoPi());
3209  fhEtaPhiTrack->SetXTitle("#eta");
3210  fhEtaPhiTrack->SetYTitle("#phi");
3211  outputContainer->Add(fhEtaPhiTrack) ;
3212 
3213  fhEtaPhiInConeTrack= new TH2F("hEtaPhiInConeTrack",
3214  Form("#eta vs #phi of Tracks in cone for #it{R} = %2.2f",r),
3215  netabins,-1,1,nphibins,0,TMath::TwoPi());
3216  fhEtaPhiInConeTrack->SetXTitle("#eta");
3217  fhEtaPhiInConeTrack->SetYTitle("#phi");
3218  outputContainer->Add(fhEtaPhiInConeTrack) ;
3219 
3220  fhConeSumPtVSUETracksEtaBand = new TH2F("hConeSumPtVSUETracksEtaBand",
3221  Form("#Sigma #it{p}_{T} in cone versus #Sigma #it{p}_{T} in eta band for tracks (before normalization), R=%2.2f",r),
3222  nptsumbins,ptsummin,ptsummax,2*nptsumbins,ptsummin,2*ptsummax);
3223  fhConeSumPtVSUETracksEtaBand->SetXTitle("#Sigma #it{p}_{T} cone (GeV/#it{c})");
3224  fhConeSumPtVSUETracksEtaBand->SetYTitle("#Sigma #it{p}_{T} UE (GeV/#it{c})");
3225  outputContainer->Add(fhConeSumPtVSUETracksEtaBand);
3226 
3227  fhConeSumPtVSUETracksPhiBand = new TH2F("hConeSumPtVSUETracksPhiBand",
3228  Form("#Sigma #it{p}_{T} in cone versus #Sigma #it{p}_{T} in phi band for tracks (before normalization), R=%2.2f",r),
3229  nptsumbins,ptsummin,ptsummax,8*nptsumbins,ptsummin,8*ptsummax);
3230  fhConeSumPtVSUETracksPhiBand->SetXTitle("#Sigma #it{p}_{T} cone (GeV/#it{c})");
3231  fhConeSumPtVSUETracksPhiBand->SetYTitle("#Sigma #it{p}_{T} UE (GeV/#it{c})");
3232  outputContainer->Add(fhConeSumPtVSUETracksPhiBand);
3233  }
3234  }
3235 
3236  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3237  {
3238  fhConeSumPtClustervsTrack = new TH2F("hConePtSumClustervsTrack",
3239  Form("Track vs Cluster #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3240  nptsumbins,ptsummin,ptsummax,nptsumbins,ptsummin,ptsummax);
3241  fhConeSumPtClustervsTrack->SetXTitle("#Sigma #it{p}_{T}^{cluster} (GeV/#it{c})");
3242  fhConeSumPtClustervsTrack->SetYTitle("#Sigma #it{p}_{T}^{track} (GeV/#it{c})");
3243  outputContainer->Add(fhConeSumPtClustervsTrack) ;
3244 
3245  fhConeSumPtClusterTrackFrac = new TH2F("hConePtSumClusterTrackFraction",
3246  Form("#Sigma #it{p}_{T}^{cluster}/#Sigma #it{p}_{T}^{track} in isolation cone for #it{R} = %2.2f",r),
3247  nptbins,ptmin,ptmax,200,0,5);
3248  fhConeSumPtClusterTrackFrac->SetYTitle("#Sigma #it{p}^{cluster}_{T} /#Sigma #it{p}_{T}^{track}");
3249  fhConeSumPtClusterTrackFrac->SetXTitle("#it{p}^{trigger}_{T} (GeV/#it{c})");
3250  outputContainer->Add(fhConeSumPtClusterTrackFrac) ;
3251 
3252 
3253  fhConePtLeadClustervsTrack = new TH2F("hConePtLeadClustervsTrack",
3254  Form("Track vs Cluster lead #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3255  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
3256  fhConePtLeadClustervsTrack->SetXTitle("#it{p}^{leading cluster}_{T} (GeV/#it{c})");
3257  fhConePtLeadClustervsTrack->SetYTitle("#it{p}^{leading track}_{T} (GeV/#it{c})");
3258  outputContainer->Add(fhConePtLeadClustervsTrack) ;
3259 
3260  fhConePtLeadClusterTrackFrac = new TH2F("hConePtLeadClusterTrackFraction",
3261  Form(" #it{p}^{leading cluster}_{T}/#it{p}^{leading track}_{T} in isolation cone for #it{R} = %2.2f",r),
3262  nptbins,ptmin,ptmax,200,0,5);
3263  fhConePtLeadClusterTrackFrac->SetYTitle("#it{p}^{leading cluster}_{T}/ #it{p}^{leading track}_{T}");
3264  fhConePtLeadClusterTrackFrac->SetXTitle("#it{p}^{trigger}_{T} (GeV/#it{c})");
3265  outputContainer->Add(fhConePtLeadClusterTrackFrac) ;
3266 
3267 
3269  {
3270  fhConeSumPtCellvsTrack = new TH2F("hConePtSumCellvsTrack",
3271  Form("Track vs cell #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3272  nptsumbins,ptsummin,ptsummax,nptsumbins,ptsummin,ptsummax);
3273  fhConeSumPtCellvsTrack->SetXTitle("#Sigma #it{p}_{T} cell");
3274  fhConeSumPtCellvsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3275  outputContainer->Add(fhConeSumPtCellvsTrack) ;
3276 
3277  fhConeSumPtCellTrack = new TH2F("hConePtSumCellTrack",
3278  Form("Track and Cell #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3279  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3280  fhConeSumPtCellTrack->SetYTitle("#Sigma #it{p}_{T}");
3281  fhConeSumPtCellTrack->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3282  outputContainer->Add(fhConeSumPtCellTrack) ;
3283 
3284  fhConeSumPtCellTrackTrigEtaPhi = new TH2F("hConePtSumCellTrackTrigEtaPhi",
3285  Form("Trigger #eta vs #phi, #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3286  netabins,etamin,etamax,nphibins,phimin,phimax);
3287  fhConeSumPtCellTrackTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3288  fhConeSumPtCellTrackTrigEtaPhi->SetXTitle("#eta_{trigger}");
3289  fhConeSumPtCellTrackTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3290  outputContainer->Add(fhConeSumPtCellTrackTrigEtaPhi) ;
3291  }
3292 
3294  {
3295  fhConeSumPtEtaUESub = new TH2F("hConeSumPtEtaUESub",
3296  Form("#Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
3297  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
3298  fhConeSumPtEtaUESub->SetYTitle("#Sigma #it{p}_{T}");
3299  fhConeSumPtEtaUESub->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3300  outputContainer->Add(fhConeSumPtEtaUESub) ;
3301 
3302  fhConeSumPtPhiUESub = new TH2F("hConeSumPtPhiUESub",
3303  Form("#Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
3304  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
3305  fhConeSumPtPhiUESub->SetYTitle("#Sigma #it{p}_{T}");
3306  fhConeSumPtPhiUESub->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3307  outputContainer->Add(fhConeSumPtPhiUESub) ;
3308 
3309  fhConeSumPtEtaUESubTrigEtaPhi = new TH2F("hConeSumPtEtaUESubTrigEtaPhi",
3310  Form("Trigger #eta vs #phi, #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
3311  netabins,etamin,etamax,nphibins,phimin,phimax);
3312  fhConeSumPtEtaUESubTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3313  fhConeSumPtEtaUESubTrigEtaPhi->SetXTitle("#eta_{trigger}");
3314  fhConeSumPtEtaUESubTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3315  outputContainer->Add(fhConeSumPtEtaUESubTrigEtaPhi) ;
3316 
3317  fhConeSumPtPhiUESubTrigEtaPhi = new TH2F("hConeSumPtPhiUESubTrigEtaPhi",
3318  Form("Trigger #eta vs #phi, #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
3319  netabins,etamin,etamax,nphibins,phimin,phimax);
3320  fhConeSumPtPhiUESubTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3321  fhConeSumPtPhiUESubTrigEtaPhi->SetXTitle("#eta_{trigger}");
3322  fhConeSumPtPhiUESubTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3323  outputContainer->Add(fhConeSumPtPhiUESubTrigEtaPhi) ;
3324 
3325  fhConeSumPtEtaUESubClustervsTrack = new TH2F("hConePtSumEtaUESubClustervsTrack",
3326  Form("Track vs Cluster #Sigma #it{p}_{T} UE sub eta band in isolation cone for #it{R} = %2.2f",r),
3327  2*nptsumbins,-ptsummax,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3328  fhConeSumPtEtaUESubClustervsTrack->SetXTitle("#Sigma #it{p}_{T} cluster");
3329  fhConeSumPtEtaUESubClustervsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3330  outputContainer->Add(fhConeSumPtEtaUESubClustervsTrack) ;
3331 
3332  fhConeSumPtPhiUESubClustervsTrack = new TH2F("hConePhiUESubPtSumClustervsTrack",
3333  Form("Track vs Cluster #Sigma #it{p}_{T} UE sub phi band in isolation cone for #it{R} = %2.2f",r),
3334  2*nptsumbins,-ptsummax,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3335  fhConeSumPtPhiUESubClustervsTrack->SetXTitle("#Sigma #it{p}_{T} cluster");
3336  fhConeSumPtPhiUESubClustervsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3337  outputContainer->Add(fhConeSumPtPhiUESubClustervsTrack) ;
3338 
3339  fhEtaBandClustervsTrack = new TH2F("hEtaBandClustervsTrack",
3340  Form("Track vs Cluster #Sigma #it{p}_{T} in Eta band in isolation cone for #it{R} = %2.2f",r),
3341  nptsumbins,ptsummin,ptsummax,nptsumbins,ptsummin,ptsummax);
3342  fhEtaBandClustervsTrack->SetXTitle("#Sigma #it{p}_{T} cluster");
3343  fhEtaBandClustervsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3344  outputContainer->Add(fhEtaBandClustervsTrack) ;
3345 
3346  fhPhiBandClustervsTrack = new TH2F("hPhiBandClustervsTrack",
3347  Form("Track vs Cluster #Sigma #it{p}_{T} in Phi band in isolation cone for #it{R} = %2.2f",r),
3348  nptsumbins,ptsummin,ptsummax*4,nptsumbins,ptsummin,ptsummax*8);
3349  fhPhiBandClustervsTrack->SetXTitle("#Sigma #it{p}_{T} cluster");
3350  fhPhiBandClustervsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3351  outputContainer->Add(fhPhiBandClustervsTrack) ;
3352 
3353  fhEtaBandNormClustervsTrack = new TH2F("hEtaBandNormClustervsTrack",
3354  Form("Track vs Cluster #Sigma #it{p}_{T} in Eta band in isolation cone for #it{R} = %2.2f",r),
3355  nptsumbins,ptsummin,ptsummax,nptsumbins,ptsummin,ptsummax);
3356  fhEtaBandNormClustervsTrack->SetXTitle("#Sigma #it{p}_{T} cluster");
3357  fhEtaBandNormClustervsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3358  outputContainer->Add(fhEtaBandNormClustervsTrack) ;
3359 
3360  fhPhiBandNormClustervsTrack = new TH2F("hPhiBandNormClustervsTrack",
3361  Form("Track vs Cluster #Sigma #it{p}_{T} in Phi band in isolation cone for #it{R} = %2.2f",r),
3362  nptsumbins,ptsummin,ptsummax,nptsumbins,ptsummin,ptsummax);
3363  fhPhiBandNormClustervsTrack->SetXTitle("#Sigma #it{p}_{T} cluster");
3364  fhPhiBandNormClustervsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3365  outputContainer->Add(fhPhiBandNormClustervsTrack) ;
3366 
3367  fhConeSumPtEtaUESubClustervsTrack = new TH2F("hConePtSumEtaUESubClustervsTrack",
3368  Form("Track vs Cluster #Sigma #it{p}_{T} UE sub eta band in isolation cone for #it{R} = %2.2f",r),
3369  2*nptsumbins,-ptsummax,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3370  fhConeSumPtEtaUESubClustervsTrack->SetXTitle("#Sigma #it{p}_{T} cluster");
3371  fhConeSumPtEtaUESubClustervsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3372  outputContainer->Add(fhConeSumPtEtaUESubClustervsTrack) ;
3373 
3374  fhConeSumPtPhiUESubClustervsTrack = new TH2F("hConePhiUESubPtSumClustervsTrack",
3375  Form("Track vs Cluster #Sigma #it{p}_{T} UE sub phi band in isolation cone for #it{R} = %2.2f",r),
3376  2*nptsumbins,-ptsummax,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3377  fhConeSumPtPhiUESubClustervsTrack->SetXTitle("#Sigma #it{p}_{T} cluster");
3378  fhConeSumPtPhiUESubClustervsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3379  outputContainer->Add(fhConeSumPtPhiUESubClustervsTrack) ;
3380 
3382  {
3383 
3384  fhConeSumPtEtaUESubCellvsTrack = new TH2F("hConePtSumEtaUESubCellvsTrack",
3385  Form("Track vs Cell #Sigma #it{p}_{T} UE sub eta band in isolation cone for #it{R} = %2.2f",r),
3386  2*nptsumbins,-ptsummax,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3387  fhConeSumPtEtaUESubCellvsTrack->SetXTitle("#Sigma #it{p}_{T} cell");
3388  fhConeSumPtEtaUESubCellvsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3389  outputContainer->Add(fhConeSumPtEtaUESubCellvsTrack) ;
3390 
3391  fhConeSumPtPhiUESubCellvsTrack = new TH2F("hConePhiUESubPtSumCellvsTrack",
3392  Form("Track vs Cell #Sigma #it{p}_{T} UE sub phi band in isolation cone for #it{R} = %2.2f",r),
3393  2*nptsumbins,-ptsummax,ptsummax,2*nptsumbins,-ptsummax,ptsummax);
3394  fhConeSumPtPhiUESubCellvsTrack->SetXTitle("#Sigma #it{p}_{T} cell");
3395  fhConeSumPtPhiUESubCellvsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3396  outputContainer->Add(fhConeSumPtPhiUESubCellvsTrack) ;
3397 
3398  fhEtaBandCellvsTrack = new TH2F("hEtaBandCellvsTrack",
3399  Form("Track vs Cell #Sigma #it{p}_{T} in Eta band in isolation cone for #it{R} = %2.2f",r),
3400  nptsumbins,ptsummin,ptsummax,nptsumbins,ptsummin,ptsummax);
3401  fhEtaBandCellvsTrack->SetXTitle("#Sigma #it{p}_{T} cell");
3402  fhEtaBandCellvsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3403  outputContainer->Add(fhEtaBandCellvsTrack) ;
3404 
3405  fhPhiBandCellvsTrack = new TH2F("hPhiBandCellvsTrack",
3406  Form("Track vs Cell #Sigma #it{p}_{T} in Phi band in isolation cone for #it{R} = %2.2f",r),
3407  nptsumbins,ptsummin,ptsummax*4,nptsumbins,ptsummin,ptsummax*8);
3408  fhPhiBandCellvsTrack->SetXTitle("#Sigma #it{p}_{T} cell");
3409  fhPhiBandCellvsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3410  outputContainer->Add(fhPhiBandCellvsTrack) ;
3411 
3412  fhEtaBandNormCellvsTrack = new TH2F("hEtaBandNormCellvsTrack",
3413  Form("Track vs Cell #Sigma #it{p}_{T} in Eta band in isolation cone for #it{R} = %2.2f",r),
3414  nptsumbins,ptsummin,ptsummax,nptsumbins,ptsummin,ptsummax);
3415  fhEtaBandNormCellvsTrack->SetXTitle("#Sigma #it{p}_{T} cell");
3416  fhEtaBandNormCellvsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3417  outputContainer->Add(fhEtaBandNormCellvsTrack) ;
3418 
3419  fhPhiBandNormCellvsTrack = new TH2F("hPhiBandNormCellvsTrack",
3420  Form("Track vs Cell #Sigma #it{p}_{T} in Phi band in isolation cone for #it{R} = %2.2f",r),
3421  nptsumbins,ptsummin,ptsummax,nptsumbins,ptsummin,ptsummax);
3422  fhPhiBandNormCellvsTrack->SetXTitle("#Sigma #it{p}_{T} cell");
3423  fhPhiBandNormCellvsTrack->SetYTitle("#Sigma #it{p}_{T} track");
3424  outputContainer->Add(fhPhiBandNormCellvsTrack) ;
3425 
3426  fhConeSumPtEtaUESubTrackCell = new TH2F("hConeSumPtEtaUESubTrackCell",
3427  Form("Tracks #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
3428  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
3429  fhConeSumPtEtaUESubTrackCell->SetYTitle("#Sigma #it{p}_{T}");
3430  fhConeSumPtEtaUESubTrackCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3431  outputContainer->Add(fhConeSumPtEtaUESubTrackCell) ;
3432 
3433  fhConeSumPtPhiUESubTrackCell = new TH2F("hConeSumPtPhiUESubTrackCell",
3434  Form("Tracks #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
3435  nptbins,ptmin,ptmax,2*nptsumbins,-ptsummax,ptsummax);
3436  fhConeSumPtPhiUESubTrackCell->SetYTitle("#Sigma #it{p}_{T}");
3437  fhConeSumPtPhiUESubTrackCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3438  outputContainer->Add(fhConeSumPtPhiUESubTrackCell) ;
3439 
3440  fhConeSumPtEtaUESubTrackCellTrigEtaPhi = new TH2F("hConeSumPtEtaUESubTrackCellTrigEtaPhi",
3441  Form("Trigger #eta vs #phi, Tracks #Sigma #it{p}_{T} after bkg subtraction from eta band in the isolation cone for #it{R} = %2.2f",r),
3442  netabins,etamin,etamax,nphibins,phimin,phimax);
3443  fhConeSumPtEtaUESubTrackCellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3444  fhConeSumPtEtaUESubTrackCellTrigEtaPhi->SetXTitle("#eta_{trigger}");
3445  fhConeSumPtEtaUESubTrackCellTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3446  outputContainer->Add(fhConeSumPtEtaUESubTrackCellTrigEtaPhi) ;
3447 
3448  fhConeSumPtPhiUESubTrackCellTrigEtaPhi = new TH2F("hConeSumPtPhiUESubTrackCellTrigEtaPhi",
3449  Form("Trigger #eta vs #phi, Tracks #Sigma #it{p}_{T} after bkg subtraction from phi band in the isolation cone for #it{R} = %2.2f",r),
3450  netabins,etamin,etamax,nphibins,phimin,phimax);
3451  fhConeSumPtPhiUESubTrackCellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3452  fhConeSumPtPhiUESubTrackCellTrigEtaPhi->SetXTitle("#eta_{trigger}");
3453  fhConeSumPtPhiUESubTrackCellTrigEtaPhi->SetYTitle("#phi_{trigger} (rad)");
3454  outputContainer->Add(fhConeSumPtPhiUESubTrackCellTrigEtaPhi) ;
3455  }
3456  }
3457  }
3458 
3459  TString region[] = {"ITS","TPC","TRD","TOF","Top EMCal","In EMCal"}; // conversion regions
3460 
3461  for(Int_t iso = 0; iso < 2; iso++)
3462  {
3463  if(fFillTMHisto)
3464  {
3465  fhTrackMatchedDEta[iso] = new TH2F
3466  (Form("hTrackMatchedDEta%s",isoName[iso].Data()),
3467  Form("%s - d#eta of cluster-track vs cluster energy, %s",isoTitle[iso].Data(),parTitle.Data()),
3468  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3469  fhTrackMatchedDEta[iso]->SetYTitle("d#eta");
3470  fhTrackMatchedDEta[iso]->SetXTitle("E_{cluster} (GeV)");
3471 
3472  fhTrackMatchedDPhi[iso] = new TH2F
3473  (Form("hTrackMatchedDPhi%s",isoName[iso].Data()),
3474  Form("%s - d#phi of cluster-track vs cluster energy, %s",isoTitle[iso].Data(),parTitle.Data()),
3475  nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
3476  fhTrackMatchedDPhi[iso]->SetYTitle("d#phi (rad)");
3477  fhTrackMatchedDPhi[iso]->SetXTitle("E_{cluster} (GeV)");
3478 
3479  fhTrackMatchedDEtaDPhi[iso] = new TH2F
3480  (Form("hTrackMatchedDEtaDPhi%s",isoName[iso].Data()),
3481  Form("%s - d#eta vs d#phi of cluster-track, %s",isoTitle[iso].Data(),parTitle.Data()),
3482  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
3483  fhTrackMatchedDEtaDPhi[iso]->SetYTitle("d#phi (rad)");
3484  fhTrackMatchedDEtaDPhi[iso]->SetXTitle("d#eta");
3485 
3486  outputContainer->Add(fhTrackMatchedDEta[iso]) ;
3487  outputContainer->Add(fhTrackMatchedDPhi[iso]) ;
3488  outputContainer->Add(fhTrackMatchedDEtaDPhi[iso]) ;
3489 
3490  if(IsDataMC())
3491  {
3492  for(int imc = 0; imc < fgkNmcTypes; imc++)
3493  {
3494  fhTrackMatchedDEtaMC[imc][iso] = new TH2F(Form("hTrackMatchedDEta%s_MC%s",isoName[iso].Data(),mcPartName[imc].Data()),
3495  Form("%s - d#eta of cluster-track vs cluster energy, %s",isoTitle[iso].Data(),parTitle.Data()),
3496  nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
3497  fhTrackMatchedDEtaMC[imc][iso]->SetYTitle("d#eta");
3498  fhTrackMatchedDEtaMC[imc][iso]->SetXTitle("E_{cluster} (GeV)");
3499 
3500  fhTrackMatchedDPhiMC[imc][iso] = new TH2F(Form("hTrackMatchedDPhi%s_MC%s",isoName[iso].Data(),mcPartName[imc].Data()),
3501  Form("%s - d#phi of cluster-track vs cluster energy, %s",isoTitle[iso].Data(),parTitle.Data()),
3502  nptbins,ptmin,ptmax,nresetabins,resphimin,resphimax);
3503  fhTrackMatchedDPhiMC[imc][iso]->SetYTitle("d#phi");
3504  fhTrackMatchedDPhiMC[imc][iso]->SetXTitle("E_{cluster} (GeV)");
3505 
3506  fhTrackMatchedDEtaDPhiMC[imc][iso] = new TH2F
3507  (Form("hTrackMatchedDEtaDPhi%s_MC%s",isoName[iso].Data(),mcPartName[imc].Data()),
3508  Form("%s - d#eta vs d#phi of cluster-track, %s",isoTitle[iso].Data(),parTitle.Data()),
3509  nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
3510  fhTrackMatchedDEtaDPhiMC[imc][iso]->SetYTitle("d#phi (rad)");
3511  fhTrackMatchedDEtaDPhiMC[imc][iso]->SetXTitle("d#eta");
3512 
3513  outputContainer->Add(fhTrackMatchedDEtaMC[imc][iso]) ;
3514  outputContainer->Add(fhTrackMatchedDPhiMC[imc][iso]) ;
3515  outputContainer->Add(fhTrackMatchedDEtaDPhiMC[imc][iso]);
3516  }
3517 
3518  }
3519 
3520  fhdEdx[iso] = new TH2F
3521  (Form("hdEdx%s",isoName[iso].Data()),
3522  Form("%s - Matched track <d#it{E}/d#it{x}> vs cluster #it{E}, %s",isoTitle[iso].Data(),parTitle.Data()),
3523  nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
3524  fhdEdx[iso]->SetXTitle("#it{E} (GeV)");
3525  fhdEdx[iso]->SetYTitle("<d#it{E}/d#it{x}>");
3526  outputContainer->Add(fhdEdx[iso]);
3527 
3528  fhEOverP[iso] = new TH2F
3529  (Form("hEOverP%s",isoName[iso].Data()),
3530  Form("%s - Matched track #it{E}/#it{p} vs cluster, %s",isoTitle[iso].Data(),parTitle.Data()),
3531  nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
3532  fhEOverP[iso]->SetXTitle("#it{E} (GeV)");
3533  fhEOverP[iso]->SetYTitle("#it{E}/#it{p}");
3534  outputContainer->Add(fhEOverP[iso]);
3535 
3536  if(IsDataMC())
3537  {
3538  fhTrackMatchedMCParticle[iso] = new TH2F
3539  (Form("hTrackMatchedMCParticle%s",isoName[iso].Data()),
3540  Form("%s - Origin of particle vs cluster #it{E}, %s",isoTitle[iso].Data(),parTitle.Data()),
3541  nptbins,ptmin,ptmax,8,0,8);
3542  fhTrackMatchedMCParticle[iso]->SetXTitle("#it{E} (GeV)");
3543  //fhTrackMatchedMCParticle[iso]->SetYTitle("Particle type");
3544 
3545  fhTrackMatchedMCParticle[iso]->GetYaxis()->SetBinLabel(1 ,"Photon");
3546  fhTrackMatchedMCParticle[iso]->GetYaxis()->SetBinLabel(2 ,"Electron");
3547  fhTrackMatchedMCParticle[iso]->GetYaxis()->SetBinLabel(3 ,"Meson Merged");
3548  fhTrackMatchedMCParticle[iso]->GetYaxis()->SetBinLabel(4 ,"Rest");
3549  fhTrackMatchedMCParticle[iso]->GetYaxis()->SetBinLabel(5 ,"Conv. Photon");
3550  fhTrackMatchedMCParticle[iso]->GetYaxis()->SetBinLabel(6 ,"Conv. Electron");
3551  fhTrackMatchedMCParticle[iso]->GetYaxis()->SetBinLabel(7 ,"Conv. Merged");
3552  fhTrackMatchedMCParticle[iso]->GetYaxis()->SetBinLabel(8 ,"Conv. Rest");
3553 
3554  outputContainer->Add(fhTrackMatchedMCParticle[iso]);
3555  }
3556  }
3557 
3558  if(fFillSSHisto)
3559  {
3560  fhELambda0[iso] = new TH2F
3561  (Form("hELambda0%s",isoName[iso].Data()),
3562  Form("%s cluster : #it{E} vs #lambda_{0}, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3563  fhELambda0[iso]->SetYTitle("#lambda_{0}^{2}");
3564  fhELambda0[iso]->SetXTitle("#it{E} (GeV)");
3565  outputContainer->Add(fhELambda0[iso]) ;
3566 
3567 // fhELambda1[iso] = new TH2F
3568 // (Form("hELambda1%s",isoName[iso].Data()),
3569 // Form("%s cluster: #it{E} vs #lambda_{1}, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3570 // fhELambda1[iso]->SetYTitle("#lambda_{1}^{2}");
3571 // fhELambda1[iso]->SetXTitle("#it{E} (GeV)");
3572 // outputContainer->Add(fhELambda1[iso]) ;
3573 
3574  fhPtLambda0[iso] = new TH2F
3575  (Form("hPtLambda0%s",isoName[iso].Data()),
3576  Form("%s cluster : #it{p}_{T} vs #lambda_{0}, %s",isoTitle[iso].Data(), parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3577  fhPtLambda0[iso]->SetYTitle("#lambda_{0}^{2}");
3578  fhPtLambda0[iso]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3579  outputContainer->Add(fhPtLambda0[iso]) ;
3580 
3581  if(IsDataMC())
3582  {
3583  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
3584  {
3585  fhPtLambda0MC[imc][iso] = new TH2F(Form("hPtLambda0%s_MC%s",isoName[iso].Data(),mcPartName[imc].Data()),
3586  Form("%s cluster : #it{p}_{T} vs #lambda_{0}: %s %s",isoTitle[iso].Data(),mcPartType[imc].Data(),parTitle.Data()),
3587  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3588  fhPtLambda0MC[imc][iso]->SetYTitle("#lambda_{0}^{2}");
3589  fhPtLambda0MC[imc][iso]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3590  outputContainer->Add( fhPtLambda0MC[imc][iso]) ;
3591 
3592  fhPtLambda0MCConv[imc][iso] = new TH2F(Form("hPtLambda0%s_MC%sConv",isoName[iso].Data(),mcPartName[imc].Data()),
3593  Form("%s cluster : #it{p}_{T} vs #lambda_{0}: %s %s, from conversion",isoTitle[iso].Data(),mcPartType[imc].Data(),parTitle.Data()),
3594  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3595  fhPtLambda0MCConv[imc][iso]->SetYTitle("#lambda_{0}^{2}");
3596  fhPtLambda0MCConv[imc][iso]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3597  outputContainer->Add( fhPtLambda0MCConv[imc][iso]) ;
3598 
3600  {
3601  fhPtLambda0MCWith1Overlap[imc][iso] = new TH2F(Form("hPtLambda0%s_MC%s_1Overlap",isoName[iso].Data(),mcPartName[imc].Data()),
3602  Form("%s cluster : #it{p}_{T} vs #lambda_{0}: %s %s, 1 overlap",isoTitle[iso].Data(),mcPartType[imc].Data(),parTitle.Data()),
3603  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3604  fhPtLambda0MCWith1Overlap[imc][iso]->SetYTitle("#lambda_{0}^{2}");
3605  fhPtLambda0MCWith1Overlap[imc][iso]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3606  outputContainer->Add( fhPtLambda0MCWith1Overlap[imc][iso]) ;
3607 
3608  fhPtLambda0MCConvWith1Overlap[imc][iso] = new TH2F(Form("hPtLambda0%s_MC%sConv_1Overlap",isoName[iso].Data(),mcPartName[imc].Data()),
3609  Form("%s cluster : #it{p}_{T} vs #lambda_{0}: %s %s, from conversion, 1 overlap",isoTitle[iso].Data(),mcPartType[imc].Data(),parTitle.Data()),
3610  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3611  fhPtLambda0MCConvWith1Overlap[imc][iso]->SetYTitle("#lambda_{0}^{2}");
3612  fhPtLambda0MCConvWith1Overlap[imc][iso]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3613  outputContainer->Add( fhPtLambda0MCConvWith1Overlap[imc][iso]) ;
3614 
3615  fhPtLambda0MCWithNOverlap[imc][iso] = new TH2F(Form("hPtLambda0%s_MC%s_NOverlap",isoName[iso].Data(),mcPartName[imc].Data()),
3616  Form("%s cluster : #it{p}_{T} vs #lambda_{0}: %s %s, 1 overlap",isoTitle[iso].Data(),mcPartType[imc].Data(),parTitle.Data()),
3617  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3618  fhPtLambda0MCWithNOverlap[imc][iso]->SetYTitle("#lambda_{0}^{2}");
3619  fhPtLambda0MCWithNOverlap[imc][iso]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3620  outputContainer->Add( fhPtLambda0MCWithNOverlap[imc][iso]) ;
3621 
3622  fhPtLambda0MCConvWithNOverlap[imc][iso] = new TH2F(Form("hPtLambda0%s_MC%sConv_NOverlap",isoName[iso].Data(),mcPartName[imc].Data()),
3623  Form("%s cluster : #it{p}_{T} vs #lambda_{0}: %s %s, from conversion, 1 overlap",isoTitle[iso].Data(),mcPartType[imc].Data(),parTitle.Data()),
3624  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3625  fhPtLambda0MCConvWithNOverlap[imc][iso]->SetYTitle("#lambda_{0}^{2}");
3626  fhPtLambda0MCConvWithNOverlap[imc][iso]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3627  outputContainer->Add( fhPtLambda0MCConvWithNOverlap[imc][iso]) ;
3628 
3629 
3630  fhPtNOverlap[imc][iso] = new TH2F(Form("hPtNOverlaps%s_MC%s_1Overlap",isoName[iso].Data(),mcPartName[imc].Data()),
3631  Form("%s cluster : #it{p}_{T} vs #lambda_{0}: %s %s, 1 overlap",isoTitle[iso].Data(),mcPartType[imc].Data(),parTitle.Data()),
3632  nptbins,ptmin,ptmax,10,0,10);
3633  fhPtNOverlap[imc][iso]->SetYTitle("#it{N} overlaps");
3634  fhPtNOverlap[imc][iso]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3635  outputContainer->Add( fhPtNOverlap[imc][iso]) ;
3636 
3637  fhPtNOverlapConv[imc][iso] = new TH2F(Form("hPtNOverlaps%s_MC%sConv_1Overlap",isoName[iso].Data(),mcPartName[imc].Data()),
3638  Form("%s cluster : #it{p}_{T} vs #lambda_{0}: %s %s, from conversion, 1 overlap",isoTitle[iso].Data(),mcPartType[imc].Data(),parTitle.Data()),
3639  nptbins,ptmin,ptmax,10,0,10);
3640  fhPtNOverlapConv[imc][iso]->SetYTitle("#it{N} overlaps");
3641  fhPtNOverlapConv[imc][iso]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3642  outputContainer->Add( fhPtNOverlapConv[imc][iso]) ;
3643  }
3644 
3645  }
3646  }
3647 
3649  {
3650  fhPtLambda0TRD[iso] = new TH2F
3651  (Form("hPtLambda0TRD%s",isoName[iso].Data()),
3652  Form("%s cluster: #it{p}_{T} vs #lambda_{0}, SM behind TRD, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3653  fhPtLambda0TRD[iso]->SetYTitle("#lambda_{0}^{2}");
3654  fhPtLambda0TRD[iso]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3655  outputContainer->Add(fhPtLambda0TRD[iso]) ;
3656 
3657  fhELambda0TRD[iso] = new TH2F
3658  (Form("hELambda0TRD%s",isoName[iso].Data()),
3659  Form("%s cluster: #it{E} vs #lambda_{0}, SM behind TRD, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3660  fhELambda0TRD[iso]->SetYTitle("#lambda_{0}^{2}");
3661  fhELambda0TRD[iso]->SetXTitle("#it{E} (GeV)");
3662  outputContainer->Add(fhELambda0TRD[iso]) ;
3663 
3664 // fhELambda1TRD[iso] = new TH2F
3665 // (Form("hELambda1TRD%s",isoName[iso].Data()),
3666 // Form("%s cluster: #it{E} vs #lambda_{1}, SM behind TRD, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3667 // fhELambda1TRD[iso]->SetYTitle("#lambda_{1}^{2}");
3668 // fhELambda1TRD[iso]->SetXTitle("#it{E} (GeV)");
3669 // outputContainer->Add(fhELambda1TRD[iso]) ;
3670  }
3671 
3672  if(fFillNLMHistograms)
3673  {
3674  fhNLocMax[iso] = new TH2F
3675  (Form("hNLocMax%s",isoName[iso].Data()),
3676  Form("%s - Number of local maxima in cluster, %s",isoTitle[iso].Data(),parTitle.Data()),
3677  nptbins,ptmin,ptmax,10,0,10);
3678  fhNLocMax[iso]->SetYTitle("#it{NLM}");
3679  fhNLocMax[iso]->SetXTitle("#it{E} (GeV)");
3680  outputContainer->Add(fhNLocMax[iso]) ;
3681 
3682  fhELambda0LocMax1[iso] = new TH2F
3683  (Form("hELambda0LocMax1%s",isoName[iso].Data()),
3684  Form("%s cluster (#eta) pairs: #it{E} vs #lambda_{0}, #it{NLM}=1, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3685  fhELambda0LocMax1[iso]->SetYTitle("#lambda_{0}^{2}");
3686  fhELambda0LocMax1[iso]->SetXTitle("#it{E} (GeV)");
3687  outputContainer->Add(fhELambda0LocMax1[iso]) ;
3688 
3689  fhELambda1LocMax1[iso] = new TH2F
3690  (Form("hELambda1LocMax1%s",isoName[iso].Data()),
3691  Form("%s cluster (#eta) pairs: #it{E} vs #lambda_{1}, #it{NLM}=1, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3692  fhELambda1LocMax1[iso]->SetYTitle("#lambda_{1}^{2}");
3693  fhELambda1LocMax1[iso]->SetXTitle("#it{E} (GeV)");
3694  outputContainer->Add(fhELambda1LocMax1[iso]) ;
3695 
3696  fhELambda0LocMax2[iso] = new TH2F
3697  (Form("hELambda0LocMax2%s",isoName[iso].Data()),
3698  Form("%s cluster (#eta) pairs: #it{E} vs #lambda_{0}, #it{NLM}=2, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3699  fhELambda0LocMax2[iso]->SetYTitle("#lambda_{0}^{2}");
3700  fhELambda0LocMax2[iso]->SetXTitle("#it{E} (GeV)");
3701  outputContainer->Add(fhELambda0LocMax2[iso]) ;
3702 
3703  fhELambda1LocMax2[iso] = new TH2F
3704  (Form("hELambda1LocMax2%s",isoName[iso].Data()),
3705  Form("%s cluster (#eta) pairs: #it{E} vs #lambda_{1}, #it{NLM}=2, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3706  fhELambda1LocMax2[iso]->SetYTitle("#lambda_{1}^{2}");
3707  fhELambda1LocMax2[iso]->SetXTitle("#it{E} (GeV)");
3708  outputContainer->Add(fhELambda1LocMax2[iso]) ;
3709 
3710  fhELambda0LocMaxN[iso] = new TH2F
3711  ( Form("hELambda0LocMaxN%s",isoName[iso].Data()),
3712  Form("%s cluster (#eta) pairs: #it{E} vs #lambda_{0}, #it{NLM}>2, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3713  fhELambda0LocMaxN[iso]->SetYTitle("#lambda_{0}^{2}");
3714  fhELambda0LocMaxN[iso]->SetXTitle("#it{E} (GeV)");
3715  outputContainer->Add(fhELambda0LocMaxN[iso]) ;
3716 
3717  fhELambda1LocMaxN[iso] = new TH2F
3718  (Form("hELambda1LocMaxN%s",isoName[iso].Data()),
3719  Form("%s cluster (#eta) pairs: #it{E} vs #lambda_{1}, #it{NLM}>2, %s",isoTitle[iso].Data(),parTitle.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3720  fhELambda1LocMaxN[iso]->SetYTitle("#lambda_{1}^{2}");
3721  fhELambda1LocMaxN[iso]->SetXTitle("#it{E} (GeV)");
3722  outputContainer->Add(fhELambda1LocMaxN[iso]) ;
3723  } // NLM
3724  } // SS histo
3725 
3726 
3728  {
3729  for(Int_t ieta = 0; ieta < 4; ieta++)
3730  {
3731  for(Int_t iphi = 0; iphi < 3; iphi++)
3732  {
3733 // fhLam0EMCALRegion[iso][ieta][iphi] =
3734 // new TH2F(Form("hLam0_%s_eta%d_phi%d",isoName[iso].Data(),ieta,iphi),
3735 // Form("%s, cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, region eta %d, phi %d",
3736 // isoTitle[iso].Data(),ieta,iphi),
3737 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3738 // fhLam0EMCALRegion[iso][ieta][iphi]->SetYTitle("#lambda_{0}^{2}");
3739 // fhLam0EMCALRegion[iso][ieta][iphi]->SetXTitle("#it{p}_{T} (GeV)");
3740 // outputContainer->Add(fhLam0EMCALRegion[iso][ieta][iphi]) ;
3741 //
3742 // if(GetFirstSMCoveredByTRD() >= 0)
3743 // {
3744 // fhLam0EMCALRegionTRD[iso][ieta][iphi] =
3745 // new TH2F(Form("hLam0TRD_%s_eta%d_phi%d",isoName[iso].Data(),ieta,iphi),
3746 // Form("%s, cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, region eta %d, phi %d, SM covered by TRD",
3747 // isoTitle[iso].Data(),ieta,iphi),
3748 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3749 // fhLam0EMCALRegionTRD[iso][ieta][iphi]->SetYTitle("#lambda_{0}^{2}");
3750 // fhLam0EMCALRegionTRD[iso][ieta][iphi]->SetXTitle("#it{p}_{T} (GeV)");
3751 // outputContainer->Add(fhLam0EMCALRegionTRD[iso][ieta][iphi]) ;
3752 // } // TRD
3753 
3754  for(Int_t ism = 0; ism < GetCaloUtils()->GetNumberOfSuperModulesUsed(); ism++)
3755  {
3756  fhLam0EMCALRegionPerSM[iso][ieta][iphi][ism] =
3757  new TH2F(Form("hLam0_%s_eta%d_phi%d_sm%d",isoName[iso].Data(),ieta,iphi,ism),
3758  Form("%s, cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, sm %d, region eta %d, phi %d",
3759  isoTitle[iso].Data(),ism,ieta,iphi),
3760  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3761  fhLam0EMCALRegionPerSM[iso][ieta][iphi][ism]->SetYTitle("#lambda_{0}^{2}");
3762  fhLam0EMCALRegionPerSM[iso][ieta][iphi][ism]->SetXTitle("#it{p}_{T} (GeV)");
3763  outputContainer->Add(fhLam0EMCALRegionPerSM[iso][ieta][iphi][ism]) ;
3764  } // ism
3765  } // iphi
3766  } // ieta
3767 
3768  Float_t ptLimit[] = {2,3,4,5,6,8,10,12};
3769  for(Int_t ipt = 0; ipt < 7; ipt++)
3770  {
3771  fhEtaPhiLam0BinPtBin[iso][ipt] = new TH2F
3772  (Form("hEtaPhiLam0BinPtBin%d%s",ipt,isoName[iso].Data()),
3773  Form("%s, #eta vs #phi in #it{p}_{T}=[%2.1f,%2.1f] GeV/#it{c} and #lambda^{2}_{0}=[0.3,0.4]",
3774  isoTitle[iso].Data(),ptLimit[ipt],ptLimit[ipt+1]),
3775  netabins,etamin,etamax,nphibins,phimin,phimax);
3776  fhEtaPhiLam0BinPtBin[iso][ipt]->SetYTitle("#phi (rad)");
3777  fhEtaPhiLam0BinPtBin[iso][ipt]->SetXTitle("#eta");
3778  outputContainer->Add(fhEtaPhiLam0BinPtBin[iso][ipt]) ;
3779  }
3780  } // regions in EMCal
3781 
3782  if(IsDataMC())
3783  {
3784  fhMCConversionVertex[iso] = new TH2F(Form("hMCPhotonConversionVertex%s",isoName[iso].Data()),
3785  Form("%s, cluster from converted photon, #it{p}_{T} vs vertex distance, %s",
3786  isoTitle[iso].Data(),parTitle.Data()),
3787  nptbins,ptmin,ptmax,500,0,500);
3788  fhMCConversionVertex[iso]->SetYTitle("#it{R} (cm)");
3789  fhMCConversionVertex[iso]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3790  outputContainer->Add(fhMCConversionVertex[iso]) ;
3791 
3792  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0)
3793  {
3794  fhMCConversionVertexTRD[iso] = new TH2F(Form("hMCPhotonConversionVertexTRD%s",isoName[iso].Data()),
3795  Form("%s, cluster from converted photon, #it{p}_{T} vs vertex distance, %s, SM covered by TRD",
3796  isoTitle[iso].Data(),parTitle.Data()),
3797  nptbins,ptmin,ptmax,500,0,500);
3798  fhMCConversionVertexTRD[iso]->SetYTitle("#it{R} (cm)");
3799  fhMCConversionVertexTRD[iso]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3800  outputContainer->Add(fhMCConversionVertexTRD[iso]) ;
3801  }
3802 
3803  if(fFillSSHisto)
3804  {
3805  for(Int_t iR = 0; iR < 6; iR++)
3806  {
3807  fhMCConversionLambda0Rcut[iR][iso] = new TH2F(Form("hMCPhotonConversionLambda0%s_R%d",isoName[iso].Data(),iR),
3808  Form("%s, cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, conversion in %s",
3809  isoTitle[iso].Data(),region[iR].Data()),
3810  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3811  fhMCConversionLambda0Rcut[iR][iso]->SetYTitle("#lambda_{0}^{2}");
3812  fhMCConversionLambda0Rcut[iR][iso]->SetXTitle("#it{p}_{T} (GeV)");
3813  outputContainer->Add(fhMCConversionLambda0Rcut[iR][iso]) ;
3814 
3815  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0)
3816  {
3817  fhMCConversionLambda0RcutTRD[iR][iso] = new TH2F(Form("hMCPhotonConversionLambda0TRD%s_R%d",isoName[iso].Data(),iR),
3818  Form("%s, cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, conversion in %s, SM covered by TRD",
3819  isoTitle[iso].Data(),region[iR].Data()),
3820  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3821  fhMCConversionLambda0RcutTRD[iR][iso]->SetYTitle("#lambda_{0}^{2}");
3822  fhMCConversionLambda0RcutTRD[iR][iso]->SetXTitle("#it{p}_{T} (GeV)");
3823  outputContainer->Add(fhMCConversionLambda0RcutTRD[iR][iso]) ;
3824  }
3825  }
3826 
3827 // if(GetCalorimeter() == kEMCAL && fFillEMCALRegionSSHistograms)
3828 // {
3829 // for(Int_t ieta = 0; ieta < 4; ieta++)
3830 // {
3831 // for(Int_t iphi = 0; iphi < 3; iphi++)
3832 // {
3833 // for(Int_t iReg = 0; iReg < 6; iReg++)
3834 // {
3835 // fhLam0EMCALRegionMCConvRcut[iso][ieta][iphi][iReg] =
3836 // new TH2F(Form("hMCPhotonConversionLambda0%s_R%d_eta%d_phi%d",isoName[iso].Data(),iReg,ieta,iphi),
3837 // Form("%s,cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, conversion in %s, region eta %d, phi %d",
3838 // isoTitle[iso].Data(),region[iReg].Data(),ieta,iphi),
3839 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3840 // fhLam0EMCALRegionMCConvRcut[iso][ieta][iphi][iReg]->SetYTitle("#lambda_{0}^{2}");
3841 // fhLam0EMCALRegionMCConvRcut[iso][ieta][iphi][iReg]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3842 // outputContainer->Add(fhLam0EMCALRegionMCConvRcut[iso][ieta][iphi][iReg]) ;
3843 //
3844 // if(GetFirstSMCoveredByTRD() >= 0)
3845 // {
3846 // fhLam0EMCALRegionTRDMCConvRcut[iso][ieta][iphi][iReg] =
3847 // new TH2F(Form("hMCPhotonConversionLambda0TRD%s_R%d_eta%d_phi%d",isoName[iso].Data(),iReg,ieta,iphi),
3848 // Form("%s,cluster from converted photon, #it{p}_{T} vs #lambda_{0}^{2}, conversion in %s, region eta %d, phi %d, SM covered by TRD",
3849 // isoTitle[iso].Data(),region[iReg].Data(),ieta,iphi),
3850 // nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3851 // fhLam0EMCALRegionTRDMCConvRcut[iso][ieta][iphi][iReg]->SetYTitle("#lambda_{0}^{2}");
3852 // fhLam0EMCALRegionTRDMCConvRcut[iso][ieta][iphi][iReg]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3853 // outputContainer->Add(fhLam0EMCALRegionTRDMCConvRcut[iso][ieta][iphi][iReg]) ;
3854 // } // TRD
3855 //
3856 // } // iR
3857 // } // iphi
3858 // } // ieta
3859 // } // regions in EMCal
3860 
3861 
3862  } // Shower shape histograms
3863  }
3864  } // control histograms for isolated and non isolated objects
3865 
3866 
3867  if(IsPileUpAnalysisOn())
3868  {
3869  fhPtTrackInConeOtherBC = new TH2F("hPtTrackInConeOtherBC",
3870  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC!=0",r),
3871  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3872  fhPtTrackInConeOtherBC->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3873  fhPtTrackInConeOtherBC->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3874  outputContainer->Add(fhPtTrackInConeOtherBC) ;
3875 
3876  fhPtTrackInConeOtherBCPileUpSPD = new TH2F("hPtTrackInConeOtherBCPileUpSPD",
3877  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC!=0, pile-up from SPD",r),
3878  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3879  fhPtTrackInConeOtherBCPileUpSPD->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3880  fhPtTrackInConeOtherBCPileUpSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3881  outputContainer->Add(fhPtTrackInConeOtherBCPileUpSPD) ;
3882 
3883  fhPtTrackInConeBC0 = new TH2F("hPtTrackInConeBC0",
3884  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC==0",r),
3885  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3886  fhPtTrackInConeBC0->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3887  fhPtTrackInConeBC0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3888  outputContainer->Add(fhPtTrackInConeBC0) ;
3889 
3890  fhPtTrackInConeVtxBC0 = new TH2F("hPtTrackInConeVtxBC0",
3891  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC==0",r),
3892  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3893  fhPtTrackInConeVtxBC0->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3894  fhPtTrackInConeVtxBC0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3895  outputContainer->Add(fhPtTrackInConeVtxBC0) ;
3896 
3897 
3898  fhPtTrackInConeBC0PileUpSPD = new TH2F("hPtTrackInConeBC0PileUpSPD",
3899  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC==0, pile-up from SPD",r),
3900  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3901  fhPtTrackInConeBC0PileUpSPD->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3902  fhPtTrackInConeBC0PileUpSPD->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3903  outputContainer->Add(fhPtTrackInConeBC0PileUpSPD) ;
3904 
3905 
3906  for (Int_t i = 0; i < 7 ; i++)
3907  {
3908  fhPtInConePileUp[i] = new TH2F(Form("hPtInConePileUp%s",pileUpName[i].Data()),
3909  Form("#it{p}_{T} in isolation cone for #it{R} = %2.2f, from pile-up (%s)",r,pileUpName[i].Data()),
3910  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3911  fhPtInConePileUp[i]->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3912  fhPtInConePileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3913  outputContainer->Add(fhPtInConePileUp[i]) ;
3914  }
3915  }
3916 
3917  if(IsDataMC())
3918  {
3919  // For histograms in arrays, index in the array, corresponding to any particle origin
3920 
3921  for(Int_t i = 0; i < fgkNmcPrimTypes; i++)
3922  {
3923  fhEPrimMC[i] = new TH1F(Form("hEPrim_MC%s",ppname[i].Data()),
3924  Form("primary photon %s : #it{E}, %s",pptype[i].Data(),parTitle.Data()),
3925  nptbins,ptmin,ptmax);
3926  fhEPrimMC[i]->SetXTitle("#it{E} (GeV)");
3927  outputContainer->Add(fhEPrimMC[i]) ;
3928 
3929  fhPtPrimMC[i] = new TH1F(Form("hPtPrim_MC%s",ppname[i].Data()),
3930  Form("primary photon %s : #it{p}_{T}, %s",pptype[i].Data(),parTitle.Data()),
3931  nptbins,ptmin,ptmax);
3932  fhPtPrimMC[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3933  outputContainer->Add(fhPtPrimMC[i]) ;
3934 
3935  fhPtPrimMCiso[i] = new TH1F(Form("hPtPrim_MCiso%s",ppname[i].Data()),
3936  Form("primary isolated photon %s : #it{p}_{T}, %s",pptype[i].Data(),parTitle.Data()),
3937  nptbins,ptmin,ptmax);
3938  fhPtPrimMCiso[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3939  outputContainer->Add(fhPtPrimMCiso[i]) ;
3940 
3941  fhEtaPrimMC[i] = new TH2F(Form("hEtaPrim_MC%s",ppname[i].Data()),
3942  Form("primary photon %s : #eta vs #it{p}_{T}, %s",pptype[i].Data(),parTitle.Data()),
3943  nptbins,ptmin,ptmax,200,-2,2);
3944  fhEtaPrimMC[i]->SetYTitle("#eta");
3945  fhEtaPrimMC[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3946  outputContainer->Add(fhEtaPrimMC[i]) ;
3947 
3948  fhPhiPrimMC[i] = new TH2F(Form("hPhiPrim_MC%s",ppname[i].Data()),
3949  Form("primary photon %s : #phi vs #it{p}_{T}, %s",pptype[i].Data(),parTitle.Data()),
3950  nptbins,ptmin,ptmax,200,0.,TMath::TwoPi());
3951  fhPhiPrimMC[i]->SetYTitle("#phi");
3952  fhPhiPrimMC[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3953  outputContainer->Add(fhPhiPrimMC[i]) ;
3954  }
3955 
3957  {
3958  fhPtPrimMCPi0DecayPairAcceptInConeLowPt = new TH1F("hPtPrim_MCPhotonPi0DecayPairAcceptInConeLowPt",
3959  Form("primary photon %s : #it{p}_{T}, pair in cone, %s",pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
3960  nptbins,ptmin,ptmax);
3961  fhPtPrimMCPi0DecayPairAcceptInConeLowPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3962  outputContainer->Add(fhPtPrimMCPi0DecayPairAcceptInConeLowPt) ;
3963 
3964  fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPt = new TH1F("hPtPrim_MCisoPhotonPi0DecayPairAcceptInConeLowPt",
3965  Form("isolated primary photon %s, pair in cone : #it{p}_{T}, %s",
3966  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
3967  nptbins,ptmin,ptmax);
3968  fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3969  outputContainer->Add(fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPt) ;
3970 
3971  fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlap = new TH1F("hPtPrim_MCPhotonPi0DecayPairAcceptInConeLowPtNoOverlap",
3972  Form("primary photon %s, no overlap, pair in cone : #it{p}_{T}, %s",
3973  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
3974  nptbins,ptmin,ptmax);
3975  fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3976  outputContainer->Add(fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlap) ;
3977 
3978  fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlap = new TH1F("hPtPrim_MCisoPhotonPi0DecayPairAcceptInConeLowPtNoOverlap",
3979  Form("isolated primary photon %s, pair in cone,no overlap : #it{p}_{T}, %s",
3980  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
3981  nptbins,ptmin,ptmax);
3982  fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3984 
3985  fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlapCaloE = new TH1F("hPtPrim_MCPhotonPi0DecayPairAcceptInConeLowPtNoOverlapCaloE",
3986  Form("primary photon %s, no overlap, pair in cone, E > calo min: #it{p}_{T}, %s",
3987  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
3988  nptbins,ptmin,ptmax);
3989  fhPtPrimMCPi0DecayPairAcceptInConeLowPtNoOverlapCaloE->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3991 
3992  fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlapCaloE = new TH1F("hPtPrim_MCisoPhotonPi0DecayPairAcceptInConeLowPtNoOverlapCaloE",
3993  Form("isolated primary photon %s, pair in cone,no overlap, E > calo min: #it{p}_{T}, %s",
3994  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
3995  nptbins,ptmin,ptmax);
3996  fhPtPrimMCPi0DecayIsoPairAcceptInConeLowPtNoOverlapCaloE->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3998 
3999 
4000  fhPtPrimMCPi0DecayPairNoOverlap = new TH1F("hPtPrim_MCPhotonPi0DecayPairNoOverlap",
4001  Form("primary photon %s, no overlap: #it{p}_{T}, %s",
4002  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
4003  nptbins,ptmin,ptmax);
4004  fhPtPrimMCPi0DecayPairNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4005  outputContainer->Add(fhPtPrimMCPi0DecayPairNoOverlap) ;
4006 
4007  fhPtPrimMCPi0DecayIsoPairNoOverlap = new TH1F("hPtPrim_MCisoPhotonPi0DecayPairNoOverlap",
4008  Form("isolated primary photon %s, no overlap: #it{p}_{T}, %s",
4009  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
4010  nptbins,ptmin,ptmax);
4011  fhPtPrimMCPi0DecayIsoPairNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4012  outputContainer->Add(fhPtPrimMCPi0DecayIsoPairNoOverlap) ;
4013 
4014  fhPtPrimMCPi0DecayPairOutOfCone = new TH1F("hPtPrim_MCPhotonPi0DecayPairOutOfCone",
4015  Form("primary photon %s : #it{p}_{T}, pair out of cone, %s",pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
4016  nptbins,ptmin,ptmax);
4017  fhPtPrimMCPi0DecayPairOutOfCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4018  outputContainer->Add(fhPtPrimMCPi0DecayPairOutOfCone) ;
4019 
4020  fhPtPrimMCPi0DecayIsoPairOutOfCone = new TH1F("hPtPrim_MCisoPhotonPi0DecayPairOutOfCone",
4021  Form("isolated primary photon %s, pair out of cone : #it{p}_{T}, %s",
4022  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
4023  nptbins,ptmin,ptmax);
4024  fhPtPrimMCPi0DecayIsoPairOutOfCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4025  outputContainer->Add(fhPtPrimMCPi0DecayIsoPairOutOfCone) ;
4026 
4027  fhPtPrimMCPi0DecayPairOutOfAcceptance = new TH1F("hPtPrim_MCPhotonPi0DecayPairOutOfAcceptance",
4028  Form("primary photon %s : #it{p}_{T}, pair out of acceptance, %s",pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
4029  nptbins,ptmin,ptmax);
4030  fhPtPrimMCPi0DecayPairOutOfAcceptance->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4031  outputContainer->Add(fhPtPrimMCPi0DecayPairOutOfAcceptance) ;
4032 
4033  fhPtPrimMCPi0DecayPairOutOfAcceptanceNoOverlap = new TH1F("hPtPrim_MCPhotonPi0DecayPairOutOfAcceptanceNoOverlap",
4034  Form("primary photon %s : #it{p}_{T}, pair out of acceptance, no overlap, %s",pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
4035  nptbins,ptmin,ptmax);
4036  fhPtPrimMCPi0DecayPairOutOfAcceptanceNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4037  outputContainer->Add(fhPtPrimMCPi0DecayPairOutOfAcceptanceNoOverlap) ;
4038 
4039  fhPtPrimMCPi0DecayIsoPairOutOfAcceptance = new TH1F("hPtPrim_MCisoPhotonPi0DecayPairOutOfAcceptance",
4040  Form("isolated primary photon %s, pair out of acceptance : #it{p}_{T}, %s",
4041  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
4042  nptbins,ptmin,ptmax);
4043  fhPtPrimMCPi0DecayIsoPairOutOfAcceptance->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4044  outputContainer->Add(fhPtPrimMCPi0DecayIsoPairOutOfAcceptance) ;
4045 
4046  fhPtPrimMCPi0DecayIsoPairOutOfAcceptanceNoOverlap = new TH1F("hPtPrim_MCisoPhotonPi0DecayPairOutOfAcceptanceNoOverlap",
4047  Form("isolated primary photon %s, pair out of acceptance, no overlap : #it{p}_{T}, %s",
4048  pptype[kmcPrimPi0Decay].Data(),parTitle.Data()),
4049  nptbins,ptmin,ptmax);
4050  fhPtPrimMCPi0DecayIsoPairOutOfAcceptanceNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4052 
4053  fhPtPrimMCPi0Overlap = new TH1F("hPtPrim_MCPi0Overlap",
4054  Form("primary %s, overlap: #it{p}_{T}, %s",
4055  pptype[kmcPrimPi0].Data(),parTitle.Data()),
4056  nptbins,ptmin,ptmax);
4057  fhPtPrimMCPi0Overlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4058  outputContainer->Add(fhPtPrimMCPi0Overlap) ;
4059 
4060  fhPtPrimMCPi0IsoOverlap = new TH1F("hPtPrim_MCisoPi0Overlap",
4061  Form("primary %s, overlap: #it{p}_{T}, %s",
4062  pptype[kmcPrimPi0].Data(),parTitle.Data()),
4063  nptbins,ptmin,ptmax);
4064  fhPtPrimMCPi0IsoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4065  outputContainer->Add(fhPtPrimMCPi0IsoOverlap) ;
4066 
4067 
4068 
4069 
4070 
4071 
4072 
4073 
4074  fhPtPrimMCEtaDecayPairAcceptInConeLowPt = new TH1F("hPtPrim_MCPhotonEtaDecayPairAcceptInConeLowPt",
4075  Form("primary photon %s : #it{p}_{T}, pair in cone, %s",pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4076  nptbins,ptmin,ptmax);
4077  fhPtPrimMCEtaDecayPairAcceptInConeLowPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4078  outputContainer->Add(fhPtPrimMCEtaDecayPairAcceptInConeLowPt) ;
4079 
4080  fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairAcceptInConeLowPt",
4081  Form("isolated primary photon %s, pair in cone : #it{p}_{T}, %s",
4082  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4083  nptbins,ptmin,ptmax);
4084  fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4085  outputContainer->Add(fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPt) ;
4086 
4087  fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap = new TH1F("hPtPrim_MCPhotonEtaDecayPairAcceptInConeLowPtNoOverlap",
4088  Form("primary photon %s, no overlap, pair in cone : #it{p}_{T}, %s",
4089  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4090  nptbins,ptmin,ptmax);
4091  fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4092  outputContainer->Add(fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlap) ;
4093 
4094  fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairAcceptInConeLowPtNoOverlap",
4095  Form("isolated primary photon %s, pair in cone,no overlap : #it{p}_{T}, %s",
4096  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4097  nptbins,ptmin,ptmax);
4098  fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4100 
4101  fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE = new TH1F("hPtPrim_MCPhotonEtaDecayPairAcceptInConeLowPtNoOverlapCaloE",
4102  Form("primary photon %s, no overlap, pair in cone, E > calo min: #it{p}_{T}, %s",
4103  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4104  nptbins,ptmin,ptmax);
4105  fhPtPrimMCEtaDecayPairAcceptInConeLowPtNoOverlapCaloE->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4107 
4108  fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairAcceptInConeLowPtNoOverlapCaloE",
4109  Form("isolated primary photon %s, pair in cone,no overlap, E > calo min: #it{p}_{T}, %s",
4110  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4111  nptbins,ptmin,ptmax);
4112  fhPtPrimMCEtaDecayIsoPairAcceptInConeLowPtNoOverlapCaloE->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4114 
4115 
4116  fhPtPrimMCEtaDecayPairNoOverlap = new TH1F("hPtPrim_MCPhotonEtaDecayPairNoOverlap",
4117  Form("primary photon %s, no overlap: #it{p}_{T}, %s",
4118  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4119  nptbins,ptmin,ptmax);
4120  fhPtPrimMCEtaDecayPairNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4121  outputContainer->Add(fhPtPrimMCEtaDecayPairNoOverlap) ;
4122 
4123  fhPtPrimMCEtaDecayIsoPairNoOverlap = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairNoOverlap",
4124  Form("isolated primary photon %s, no overlap: #it{p}_{T}, %s",
4125  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4126  nptbins,ptmin,ptmax);
4127  fhPtPrimMCEtaDecayIsoPairNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4128  outputContainer->Add(fhPtPrimMCEtaDecayIsoPairNoOverlap) ;
4129 
4130  fhPtPrimMCEtaDecayPairOutOfCone = new TH1F("hPtPrim_MCPhotonEtaDecayPairOutOfCone",
4131  Form("primary photon %s : #it{p}_{T}, pair out of cone, %s",pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4132  nptbins,ptmin,ptmax);
4133  fhPtPrimMCEtaDecayPairOutOfCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4134  outputContainer->Add(fhPtPrimMCEtaDecayPairOutOfCone) ;
4135 
4136  fhPtPrimMCEtaDecayIsoPairOutOfCone = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairOutOfCone",
4137  Form("isolated primary photon %s, pair out of cone : #it{p}_{T}, %s",
4138  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4139  nptbins,ptmin,ptmax);
4140  fhPtPrimMCEtaDecayIsoPairOutOfCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4141  outputContainer->Add(fhPtPrimMCEtaDecayIsoPairOutOfCone) ;
4142 
4143  fhPtPrimMCEtaDecayPairOutOfAcceptance = new TH1F("hPtPrim_MCPhotonEtaDecayPairOutOfAcceptance",
4144  Form("primary photon %s : #it{p}_{T}, pair out of acceptance, %s",pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4145  nptbins,ptmin,ptmax);
4146  fhPtPrimMCEtaDecayPairOutOfAcceptance->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4147  outputContainer->Add(fhPtPrimMCEtaDecayPairOutOfAcceptance) ;
4148 
4149  fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap = new TH1F("hPtPrim_MCPhotonEtaDecayPairOutOfAcceptanceNoOverlap",
4150  Form("primary photon %s : #it{p}_{T}, pair out of acceptance, no overlap, %s",pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4151  nptbins,ptmin,ptmax);
4152  fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4153  outputContainer->Add(fhPtPrimMCEtaDecayPairOutOfAcceptanceNoOverlap) ;
4154 
4155  fhPtPrimMCEtaDecayIsoPairOutOfAcceptance = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairOutOfAcceptance",
4156  Form("isolated primary photon %s, pair out of acceptance : #it{p}_{T}, %s",
4157  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4158  nptbins,ptmin,ptmax);
4159  fhPtPrimMCEtaDecayIsoPairOutOfAcceptance->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4160  outputContainer->Add(fhPtPrimMCEtaDecayIsoPairOutOfAcceptance) ;
4161 
4162  fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap = new TH1F("hPtPrim_MCisoPhotonEtaDecayPairOutOfAcceptanceNoOverlap",
4163  Form("isolated primary photon %s, pair out of acceptance, no overlap : #it{p}_{T}, %s",
4164  pptype[kmcPrimEtaDecay].Data(),parTitle.Data()),
4165  nptbins,ptmin,ptmax);
4166  fhPtPrimMCEtaDecayIsoPairOutOfAcceptanceNoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4168 
4169  fhPtPrimMCEtaOverlap = new TH1F("hPtPrim_MCEtaOverlap",
4170  Form("primary %s, overlap: #it{p}_{T}, %s",
4171  pptype[kmcPrimEta].Data(),parTitle.Data()),
4172  nptbins,ptmin,ptmax);
4173  fhPtPrimMCEtaOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4174  outputContainer->Add(fhPtPrimMCEtaOverlap) ;
4175 
4176  fhPtPrimMCEtaIsoOverlap = new TH1F("hPtPrim_MCisoEtaOverlap",
4177  Form("primary %s, overlap: #it{p}_{T}, %s",
4178  pptype[kmcPrimEta].Data(),parTitle.Data()),
4179  nptbins,ptmin,ptmax);
4180  fhPtPrimMCEtaIsoOverlap->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4181  outputContainer->Add(fhPtPrimMCEtaIsoOverlap) ;
4182 
4183  }
4184 
4185  }//Histos with MC
4186 
4187  }
4188 
4189  if(fMakeSeveralIC)
4190  {
4191  const Int_t buffersize = 255;
4192  char name[buffersize];
4193  char title[buffersize];
4194  for(Int_t icone = 0; icone<fNCones; icone++)
4195  {
4196  // sum pt in cone vs. pt leading
4197  snprintf(name, buffersize,"hSumPtLeadingPt_Cone_%d",icone);
4198  snprintf(title, buffersize,"#Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",fConeSizes[icone]);
4199  fhSumPtLeadingPt[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4200  fhSumPtLeadingPt[icone] ->SetYTitle("#sum_{cone}#it{p}_{T} (GeV/#it{c})");//#Sigma #it{p}_{T}
4201  fhSumPtLeadingPt[icone] ->SetXTitle("#it{p}_{T}^{leading} (GeV/#it{c})");
4202  outputContainer->Add(fhSumPtLeadingPt[icone]) ;
4203 
4204  // pt in cone vs. pt leading
4205  snprintf(name, buffersize,"hPtLeadingPt_Cone_%d",icone);
4206  snprintf(title, buffersize,"#it{p}_{T} in isolation cone for #it{R} = %2.2f",fConeSizes[icone]);
4207  fhPtLeadingPt[icone] = new TH2F(name, title, nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4208  fhPtLeadingPt[icone] ->SetYTitle("#it{p}_{T}^{cone} (GeV/#it{c})");
4209  fhPtLeadingPt[icone] ->SetXTitle("#it{p}_{T}^{leading} (GeV/#it{c})");
4210  outputContainer->Add(fhPtLeadingPt[icone]) ;
4211 
4212  // sum pt in cone vs. pt leading in the forward region (for background subtraction studies)
4213  snprintf(name, buffersize,"hPerpSumPtLeadingPt_Cone_%d",icone);
4214  snprintf(title, buffersize,"#Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",fConeSizes[icone]);
4215  fhPerpSumPtLeadingPt[icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4216  fhPerpSumPtLeadingPt[icone] ->SetYTitle("#sum_{cone}#it{p}_{T} (GeV/#it{c})");//#Sigma #it{p}_{T}
4217  fhPerpSumPtLeadingPt[icone] ->SetXTitle("#it{p}_{T}^{leading} (GeV/#it{c})");
4218  outputContainer->Add(fhPerpSumPtLeadingPt[icone]) ;
4219 
4220  // pt in cone vs. pt leading in the forward region (for background subtraction studies)
4221  snprintf(name, buffersize,"hPerpPtLeadingPt_Cone_%d",icone);
4222  snprintf(title, buffersize,"#it{p}_{T} in isolation cone for #it{R} = %2.2f",fConeSizes[icone]);
4223  fhPerpPtLeadingPt[icone] = new TH2F(name, title, nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4224  fhPerpPtLeadingPt[icone] ->SetYTitle("#it{p}_{T}^{cone} (GeV/#it{c})");
4225  fhPerpPtLeadingPt[icone] ->SetXTitle("#it{p}_{T}^{leading} (GeV/#it{c})");
4226  outputContainer->Add(fhPerpPtLeadingPt[icone]) ;
4227 
4228  if(IsDataMC())
4229  {
4230  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
4231  {
4232  snprintf(name , buffersize,"hSumPtLeadingPt_MC%s_Cone_%d",mcPartName[imc].Data(),icone);
4233  snprintf(title, buffersize,"Candidate %s #it{p}_{T} vs cone #Sigma #it{p}_{T} for #it{R}=%2.2f",mcPartType[imc].Data(),fConeSizes[icone]);
4234  fhSumPtLeadingPtMC[imc][icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4235  fhSumPtLeadingPtMC[imc][icone]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4236  fhSumPtLeadingPtMC[imc][icone]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
4237  outputContainer->Add(fhSumPtLeadingPtMC[imc][icone]) ;
4238  }
4239  }//Histos with MC
4240 
4241  for(Int_t ipt = 0; ipt<fNPtThresFrac;ipt++)
4242  {
4243  snprintf(name, buffersize,"hPtThres_Cone_%d_Pt%d",icone,ipt);
4244  snprintf(title, buffersize,"Isolated candidate #it{p}_{T} distribution for #it{R} = %2.2f and #it{p}_{T}^{th} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtThresholds[ipt]);
4245  fhPtThresIsolated[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
4246  fhPtThresIsolated[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4247  outputContainer->Add(fhPtThresIsolated[icone][ipt]) ;
4248 
4249  snprintf(name, buffersize,"hPtFrac_Cone_%d_Pt%d",icone,ipt);
4250  snprintf(title, buffersize,"Isolated candidate #it{p}_{T} distribution for #it{R} = %2.2f and #it{p}_{T}^{fr} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtFractions[ipt]);
4251  fhPtFracIsolated[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
4252  fhPtFracIsolated[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4253  outputContainer->Add(fhPtFracIsolated[icone][ipt]) ;
4254 
4255  snprintf(name, buffersize,"hSumPt_Cone_%d_Pt%d",icone,ipt);
4256  snprintf(title, buffersize,"Isolated candidate #it{p}_{T} distribution for #it{R} = %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
4257  fhSumPtIsolated[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
4258  // fhSumPtIsolated[icone][ipt]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4259  fhSumPtIsolated[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4260  outputContainer->Add(fhSumPtIsolated[icone][ipt]) ;
4261 
4262  snprintf(name, buffersize,"hPtSumDensity_Cone_%d_Pt%d",icone,ipt);
4263  snprintf(title, buffersize,"Isolated candidate #it{p}_{T} distribution for density in #it{R} = %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
4264  fhPtSumDensityIso[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);//,nptsumbins,ptsummin,ptsummax);
4265  //fhPtSumIsolated[icone][ipt]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4266  fhPtSumDensityIso[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4267  outputContainer->Add(fhPtSumDensityIso[icone][ipt]) ;
4268 
4269  snprintf(name, buffersize,"hPtFracPtSum_Cone_%d_Pt%d",icone,ipt);
4270  snprintf(title, buffersize,"Isolated candidate #it{p}_{T} distribution for PtFracPtSum in #it{R} = %2.2f and #it{p}_{T}^{fr} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtFractions[ipt]);
4271  fhPtFracPtSumIso[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);//,nptsumbins,ptsummin,ptsummax);
4272  //fhPtSumIsolated[icone][ipt]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4273  fhPtFracPtSumIso[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4274  outputContainer->Add(fhPtFracPtSumIso[icone][ipt]) ;
4275 
4276  // eta:phi
4277  snprintf(name, buffersize,"hEtaPhiPtThres_Cone_%d_Pt%d",icone,ipt);
4278  snprintf(title, buffersize,"Isolated candidate #eta:#phi distribution for #it{R} = %2.2f and #it{p}_{T}^{th} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtThresholds[ipt]);
4279  fhEtaPhiPtThresIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4280  fhEtaPhiPtThresIso[icone][ipt]->SetXTitle("#eta");
4281  fhEtaPhiPtThresIso[icone][ipt]->SetYTitle("#phi");
4282  outputContainer->Add(fhEtaPhiPtThresIso[icone][ipt]) ;
4283 
4284  snprintf(name, buffersize,"hEtaPhiPtFrac_Cone_%d_Pt%d",icone,ipt);
4285  snprintf(title, buffersize,"Isolated candidate #eta:#phi distribution for #it{R} = %2.2f and #it{p}_{T}^{fr} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtFractions[ipt]);
4286  fhEtaPhiPtFracIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4287  fhEtaPhiPtFracIso[icone][ipt]->SetXTitle("#eta");
4288  fhEtaPhiPtFracIso[icone][ipt]->SetYTitle("#phi");
4289  outputContainer->Add(fhEtaPhiPtFracIso[icone][ipt]) ;
4290 
4291  snprintf(name, buffersize,"hEtaPhiPtSum_Cone_%d_Pt%d",icone,ipt);
4292  snprintf(title, buffersize,"Isolated candidate #eta:#phi distribution for #it{R} = %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
4293  fhEtaPhiPtSumIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4294  fhEtaPhiPtSumIso[icone][ipt]->SetXTitle("#eta");
4295  fhEtaPhiPtSumIso[icone][ipt]->SetYTitle("#phi");
4296  outputContainer->Add(fhEtaPhiPtSumIso[icone][ipt]) ;
4297 
4298  snprintf(name, buffersize,"hEtaPhiSumDensity_Cone_%d_Pt%d",icone,ipt);
4299  snprintf(title, buffersize,"Isolated candidate #eta:#phi distribution for density #it{R} = %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
4300  fhEtaPhiSumDensityIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4301  fhEtaPhiSumDensityIso[icone][ipt]->SetXTitle("#eta");
4302  fhEtaPhiSumDensityIso[icone][ipt]->SetYTitle("#phi");
4303  outputContainer->Add(fhEtaPhiSumDensityIso[icone][ipt]) ;
4304 
4305  snprintf(name, buffersize,"hEtaPhiFracPtSum_Cone_%d_Pt%d",icone,ipt);
4306  snprintf(title, buffersize,"Isolated candidate #eta:#phi distribution for FracPtSum #it{R} = %2.2f and #it{p}_{T}^{fr} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtFractions[ipt]);
4307  fhEtaPhiFracPtSumIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4308  fhEtaPhiFracPtSumIso[icone][ipt]->SetXTitle("#eta");
4309  fhEtaPhiFracPtSumIso[icone][ipt]->SetYTitle("#phi");
4310  outputContainer->Add(fhEtaPhiFracPtSumIso[icone][ipt]) ;
4311 
4313  {
4314  // pt decays isolated
4315  snprintf(name, buffersize,"hPtThres_Decay_Cone_%d_Pt%d",icone,ipt);
4316  snprintf(title, buffersize,"Isolated decay candidate #it{p}_{T} distribution for #it{R} = %2.2f and #it{p}_{T}^{th} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtThresholds[ipt]);
4317  fhPtPtThresDecayIso[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
4318  fhPtPtThresDecayIso[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4319  outputContainer->Add(fhPtPtThresDecayIso[icone][ipt]) ;
4320 
4321  snprintf(name, buffersize,"hPtFrac_Decay_Cone_%d_Pt%d",icone,ipt);
4322  snprintf(title, buffersize,"Isolated decay candidate #it{p}_{T} distribution for #it{R} = %2.2f and #it{p}_{T}^{fr} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtFractions[ipt]);
4323  fhPtPtFracDecayIso[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
4324  fhPtPtFracDecayIso[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4325  outputContainer->Add(fhPtPtFracDecayIso[icone][ipt]) ;
4326 
4327  snprintf(name, buffersize,"hPtSum_Decay_Cone_%d_Pt%d",icone,ipt);
4328  snprintf(title, buffersize,"Isolated decay candidate #it{p}_{T} distribution for #it{R} = %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
4329  fhPtPtSumDecayIso[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);//,nptsumbins,ptsummin,ptsummax);
4330  // fhPtPtSumDecayIso[icone]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4331  fhPtPtSumDecayIso[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4332  outputContainer->Add(fhPtPtSumDecayIso[icone][ipt]) ;
4333 
4334  snprintf(name, buffersize,"hPtSumDensity_Decay_Cone_%d_Pt%d",icone,ipt);
4335  snprintf(title, buffersize,"Isolated decay candidate #it{p}_{T} distribution for density in #it{R} = %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
4336  fhPtSumDensityDecayIso[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);//,nptsumbins,ptsummin,ptsummax);
4337  // fhPtPtSumDecayIso[icone]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4338  fhPtSumDensityDecayIso[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4339  outputContainer->Add(fhPtSumDensityDecayIso[icone][ipt]) ;
4340 
4341  snprintf(name, buffersize,"hPtFracPtSum_Decay_Cone_%d_Pt%d",icone,ipt);
4342  snprintf(title, buffersize,"Isolated decay candidate #it{p}_{T} distribution for PtFracPtSum in #it{R} = %2.2f and #it{p}_{T}^{fr} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtFractions[ipt]);
4343  fhPtFracPtSumDecayIso[icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);//,nptsumbins,ptsummin,ptsummax);
4344  // fhPtPtSumDecayIso[icone]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4345  fhPtFracPtSumDecayIso[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4346  outputContainer->Add(fhPtFracPtSumDecayIso[icone][ipt]) ;
4347 
4348  // eta:phi decays
4349  snprintf(name, buffersize,"hEtaPhiPtThres_Decay_Cone_%d_Pt%d",icone,ipt);
4350  snprintf(title, buffersize,"Isolated decay candidate #eta:#phi distribution for #it{R} = %2.2f and #it{p}_{T}^{th} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtThresholds[ipt]);
4351  fhEtaPhiPtThresDecayIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4352  fhEtaPhiPtThresDecayIso[icone][ipt]->SetXTitle("#eta");
4353  fhEtaPhiPtThresDecayIso[icone][ipt]->SetYTitle("#phi");
4354  outputContainer->Add(fhEtaPhiPtThresDecayIso[icone][ipt]) ;
4355 
4356  snprintf(name, buffersize,"hEtaPhiPtFrac_Decay_Cone_%d_Pt%d",icone,ipt);
4357  snprintf(title, buffersize,"Isolated decay candidate #eta:#phi distribution for #it{R} = %2.2f and #it{p}_{T}^{fr} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtFractions[ipt]);
4358  fhEtaPhiPtFracDecayIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4359  fhEtaPhiPtFracDecayIso[icone][ipt]->SetXTitle("#eta");
4360  fhEtaPhiPtFracDecayIso[icone][ipt]->SetYTitle("#phi");
4361  outputContainer->Add(fhEtaPhiPtFracDecayIso[icone][ipt]) ;
4362 
4363 
4364  snprintf(name, buffersize,"hEtaPhiPtSum_Decay_Cone_%d_Pt%d",icone,ipt);
4365  snprintf(title, buffersize,"Isolated decay candidate #eta:#phi distribution for #it{R} = %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
4366  fhEtaPhiPtSumDecayIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4367  fhEtaPhiPtSumDecayIso[icone][ipt]->SetXTitle("#eta");
4368  fhEtaPhiPtSumDecayIso[icone][ipt]->SetYTitle("#phi");
4369  outputContainer->Add(fhEtaPhiPtSumDecayIso[icone][ipt]) ;
4370 
4371  snprintf(name, buffersize,"hEtaPhiSumDensity_Decay_Cone_%d_Pt%d",icone,ipt);
4372  snprintf(title, buffersize,"Isolated decay candidate #eta:#phi distribution for density #it{R} = %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
4373  fhEtaPhiSumDensityDecayIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4374  fhEtaPhiSumDensityDecayIso[icone][ipt]->SetXTitle("#eta");
4375  fhEtaPhiSumDensityDecayIso[icone][ipt]->SetYTitle("#phi");
4376  outputContainer->Add(fhEtaPhiSumDensityDecayIso[icone][ipt]) ;
4377 
4378  snprintf(name, buffersize,"hEtaPhiFracPtSum_Decay_Cone_%d_Pt%d",icone,ipt);
4379  snprintf(title, buffersize,"Isolated decay candidate #eta:#phi distribution for FracPtSum #it{R} = %2.2f and #it{p}_{T}^{fr} = %2.2f GeV/#it{c}",fConeSizes[icone],fPtFractions[ipt]);
4380  fhEtaPhiFracPtSumDecayIso[icone][ipt] = new TH2F(name, title,netabins,etamin,etamax,nphibins,phimin,phimax);
4381  fhEtaPhiFracPtSumDecayIso[icone][ipt]->SetXTitle("#eta");
4382  fhEtaPhiFracPtSumDecayIso[icone][ipt]->SetYTitle("#phi");
4383  outputContainer->Add(fhEtaPhiFracPtSumDecayIso[icone][ipt]) ;
4384 
4385  }
4386 
4387  if(IsDataMC())
4388  {
4389  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
4390  {
4391  snprintf(name , buffersize,"hPtThreshMC%s_Cone_%d_Pt%d",mcPartName[imc].Data(),icone,ipt);
4392  snprintf(title, buffersize,"Isolated %s #it{p}_{T} for #it{R}=%2.2f and #it{p}_{T}^{th}=%2.2f",
4393  mcPartType[imc].Data(),fConeSizes[icone], fPtThresholds[ipt]);
4394  fhPtThresIsolatedMC[imc][icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
4395  fhPtThresIsolatedMC[imc][icone][ipt]->SetYTitle("#it{counts}");
4396  fhPtThresIsolatedMC[imc][icone][ipt]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
4397  outputContainer->Add(fhPtThresIsolatedMC[imc][icone][ipt]) ;
4398 
4399 
4400  snprintf(name , buffersize,"hPtFracMC%s_Cone_%d_Pt%d",mcPartName[imc].Data(),icone,ipt);
4401  snprintf(title, buffersize,"Isolated %s #it{p}_{T} for #it{R}=%2.2f and #Sigma #it{p}_{T}^{in cone}/#it{p}_{T}^{trig}=%2.2f",
4402  mcPartType[imc].Data(),fConeSizes[icone], fPtFractions[ipt]);
4403  fhPtFracIsolatedMC[imc][icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
4404  fhPtFracIsolatedMC[imc][icone][ipt]->SetYTitle("#it{counts}");
4405  fhPtFracIsolatedMC[imc][icone][ipt]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
4406  outputContainer->Add(fhPtFracIsolatedMC[imc][icone][ipt]) ;
4407 
4408  snprintf(name , buffersize,"hSumPtMC%s_Cone_%d_Pt%d",mcPartName[imc].Data(),icone,ipt);
4409  snprintf(title, buffersize,"Isolated %s #it{p}_{T} for #it{R}=%2.2f and #Sigma #it{p}_{T}^{in cone}=%2.2f",
4410  mcPartType[imc].Data(),fConeSizes[icone], fSumPtThresholds[ipt]);
4411  fhSumPtIsolatedMC[imc][icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
4412  fhSumPtIsolatedMC[imc][icone][ipt]->SetYTitle("#it{counts}");
4413  fhSumPtIsolatedMC[imc][icone][ipt]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
4414  outputContainer->Add(fhSumPtIsolatedMC[imc][icone][ipt]) ;
4415  }
4416  }//Histos with MC
4417  }//icone loop
4418  }//ipt loop
4419  }
4420 
4421  if(IsPileUpAnalysisOn())
4422  {
4423  for (Int_t i = 0; i < 7 ; i++)
4424  {
4425  fhEIsoPileUp[i] = new TH1F(Form("hEPileUp%s",pileUpName[i].Data()),
4426  Form("Number of isolated particles vs E, %s, pile-up event by %s",parTitle.Data(),pileUpName[i].Data()),
4427  nptbins,ptmin,ptmax);
4428  fhEIsoPileUp[i]->SetYTitle("d#it{N} / d#it{E}");
4429  fhEIsoPileUp[i]->SetXTitle("#it{E} (GeV)");
4430  outputContainer->Add(fhEIsoPileUp[i]) ;
4431 
4432  fhPtIsoPileUp[i] = new TH1F(Form("hPtPileUp%s",pileUpName[i].Data()),
4433  Form("Number of isolated particles vs #it{p}_{T}, %s, pile-up event by %s",parTitle.Data(),pileUpName[i].Data()),
4434  nptbins,ptmin,ptmax);
4435  fhPtIsoPileUp[i]->SetYTitle("d#it{N} / #it{p}_{T}");
4436  fhPtIsoPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4437  outputContainer->Add(fhPtIsoPileUp[i]) ;
4438 
4439  fhENoIsoPileUp[i] = new TH1F(Form("hENoIsoPileUp%s",pileUpName[i].Data()),
4440  Form("Number of not isolated particles vs E, %s, pile-up event by %s",parTitle.Data(),pileUpName[i].Data()),
4441  nptbins,ptmin,ptmax);
4442  fhENoIsoPileUp[i]->SetYTitle("d#it{N} / dE");
4443  fhENoIsoPileUp[i]->SetXTitle("#it{E} (GeV)");
4444  outputContainer->Add(fhENoIsoPileUp[i]) ;
4445 
4446  fhPtNoIsoPileUp[i] = new TH1F(Form("hPtNoIsoPileUp%s",pileUpName[i].Data()),
4447  Form("Number of not isolated particles vs #it{p}_{T}, %s, pile-up event by %s",parTitle.Data(),pileUpName[i].Data()),
4448  nptbins,ptmin,ptmax);
4449  fhPtNoIsoPileUp[i]->SetYTitle("d#it{N} / #it{p}_{T}");
4450  fhPtNoIsoPileUp[i]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4451  outputContainer->Add(fhPtNoIsoPileUp[i]) ;
4452  }
4453 
4454  fhTimeENoCut = new TH2F ("hTimeE_NoCut","time of cluster vs E of clusters, no cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
4455  fhTimeENoCut->SetXTitle("#it{E} (GeV)");
4456  fhTimeENoCut->SetYTitle("#it{time} (ns)");
4457  outputContainer->Add(fhTimeENoCut);
4458 
4459  fhTimeESPD = new TH2F ("hTimeE_SPD","time of cluster vs E of clusters, SPD cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
4460  fhTimeESPD->SetXTitle("#it{E} (GeV)");
4461  fhTimeESPD->SetYTitle("#it{time} (ns)");
4462  outputContainer->Add(fhTimeESPD);
4463 
4464  fhTimeESPDMulti = new TH2F ("hTimeE_SPDMulti","time of cluster vs E of clusters, SPD multi cut", nptbins,ptmin,ptmax, ntimebins,timemin,timemax);
4465  fhTimeESPDMulti->SetXTitle("#it{E} (GeV)");
4466  fhTimeESPDMulti->SetYTitle("#it{time} (ns)");
4467  outputContainer->Add(fhTimeESPDMulti);
4468 
4469  fhTimeNPileUpVertSPD = new TH2F ("hTime_NPileUpVertSPD","time of cluster vs N pile-up SPD vertex", ntimebins,timemin,timemax,50,0,50);
4470  fhTimeNPileUpVertSPD->SetYTitle("# vertex ");
4471  fhTimeNPileUpVertSPD->SetXTitle("#it{time} (ns)");
4472  outputContainer->Add(fhTimeNPileUpVertSPD);
4473 
4474  fhTimeNPileUpVertTrack = new TH2F ("hTime_NPileUpVertTracks","time of cluster vs N pile-up Tracks vertex", ntimebins,timemin,timemax, 50,0,50 );
4475  fhTimeNPileUpVertTrack->SetYTitle("# vertex ");
4476  fhTimeNPileUpVertTrack->SetXTitle("#it{time} (ns)");
4477  outputContainer->Add(fhTimeNPileUpVertTrack);
4478 
4479  fhTimeNPileUpVertContributors = new TH2F ("hTime_NPileUpVertContributors","time of cluster vs N constributors to pile-up SPD vertex", ntimebins,timemin,timemax,50,0,50);
4480  fhTimeNPileUpVertContributors->SetYTitle("# vertex ");
4481  fhTimeNPileUpVertContributors->SetXTitle("#it{time} (ns)");
4482  outputContainer->Add(fhTimeNPileUpVertContributors);
4483 
4484  fhTimePileUpMainVertexZDistance = new TH2F ("hTime_PileUpMainVertexZDistance","time of cluster vs distance in Z pile-up SPD vertex - main SPD vertex",ntimebins,timemin,timemax,100,0,50);
4485  fhTimePileUpMainVertexZDistance->SetYTitle("distance #it{z} (cm) ");
4486  fhTimePileUpMainVertexZDistance->SetXTitle("#it{time} (ns)");
4487  outputContainer->Add(fhTimePileUpMainVertexZDistance);
4488 
4489  fhTimePileUpMainVertexZDiamond = new TH2F ("hTime_PileUpMainVertexZDiamond","time of cluster vs distance in Z pile-up SPD vertex - z diamond",ntimebins,timemin,timemax,100,0,50);
4490  fhTimePileUpMainVertexZDiamond->SetYTitle("diamond distance #it{z} (cm) ");
4491  fhTimePileUpMainVertexZDiamond->SetXTitle("#it{time} (ns)");
4492  outputContainer->Add(fhTimePileUpMainVertexZDiamond);
4493  }
4494 
4495  return outputContainer ;
4496 }
4497 
4498 //____________________________________________________
4500 //____________________________________________________
4502 {
4503  if(!IsDataMC()) return -1;
4504 
4505  if (GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPrompt))