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