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