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