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