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