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