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