AliPhysics  6f1d526 (6f1d526)
 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 "AliMCEvent.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() && GetMC() )
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() )
1599  {
1600  TParticle * mcpartESD = GetMC()->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  AliAODMCParticle * mcpartAOD = (AliAODMCParticle *) GetMC()->GetTrack(trackLabel);
1611  if( mcpartAOD )
1612  {
1613  partInConeCharge = TMath::Abs(mcpartAOD->Charge());
1614  partInConePDG = mcpartAOD->GetPdgCode();
1615  physPrimary = mcpartAOD->IsPhysicalPrimary();
1616  }
1617  }
1618 
1619  if ( partInConeCharge > 0 && TMath::Abs(partInConePDG) != 11 ) // exclude electrons and neutrals
1620  {
1621  Int_t mcChTag = 3;
1622  if ( TMath::Abs(partInConePDG) == 211 ) mcChTag = 0;
1623  else if ( TMath::Abs(partInConePDG) == 321 ) mcChTag = 1;
1624  else if ( TMath::Abs(partInConePDG) == 2212 ) mcChTag = 2;
1625  if(physPrimary)
1626  fhPtTrackInConeMCPrimary [mcChTag]->Fill(ptTrig , pTtrack, GetEventWeight());
1627  else
1628  fhPtTrackInConeMCSecondary[mcChTag]->Fill(ptTrig , pTtrack, GetEventWeight());
1629  }
1630  }
1631 
1633  {
1634  fhPtInConeExoTrigger ->Fill(ptTrig , pTtrack, GetEventWeight());
1635  fhPtTrackInConeExoTrigger ->Fill(ptTrig , pTtrack, GetEventWeight());
1636  }
1637 
1639 
1640  coneptsumTrack+=pTtrack;
1641  if(pTtrack > coneptLeadTrack) coneptLeadTrack = pTtrack;
1642 
1643  if(fStudyPtCutInCone)
1644  {
1645  for(Int_t icut = 0; icut < fNPtCutsInCone; icut++)
1646  {
1647  if ( pTtrack > fMinPtCutInCone[icut] )
1648  {
1649  coneptsumTrackPerMinCut[icut]+=pTtrack;
1650  coneNTrackPerMinCut [icut]++;
1651  }
1652 
1653  if ( pTtrack < fMaxPtCutInCone[icut] ) coneptsumTrackPerMaxCut[icut]+=pTtrack;
1654  }
1655  }
1656 
1657  if(fStudyEtaCutInCone)
1658  {
1659  for(Int_t icut = 0; icut < fNEtaCutsInCone; icut++)
1660  {
1661  if ( TMath::Abs(track->Eta()) < fEtaCutInCone[icut] ) coneptsumTrackPerEtaCut[icut]+=pTtrack;
1662  }
1663  }
1664 
1665  if(fStudyRCutInCone)
1666  {
1667  Float_t distance = GetIsolationCut()->Radius(aodParticle->Eta(), aodParticle->Phi(), track->Eta(), track->Phi());
1668  for(Int_t icut = 0; icut < fNRCutsInCone; icut++)
1669  {
1670  if ( distance < fRCutInCone[icut] )
1671  {
1672  coneptsumTrackPerRCut[icut]+=pTtrack;
1673  fhPtTrackInConePerRCut->Fill(icut+1, pTtrack, GetEventWeight());
1674  if(ptTrig > 10) fhPtTrackInConePerRCutLargePtTrig->Fill(icut+1, pTtrack, GetEventWeight());
1675  }
1676  }
1677  }
1678 
1680  {
1681  for(Int_t icut = 0; icut < fNNCellsInCandidate; icut++)
1682  {
1683  if ( fCluster->GetNCells() >= fNCellsInCandidate[icut] )
1684  {
1685  coneptsumTrackPerNCellCut[icut]+=pTtrack;
1686  fhPtTrackInConePerNCellCut->Fill(icut+1, pTtrack, GetEventWeight());
1687  if(ptTrig > 10) fhPtTrackInConePerNCellCutLargePtTrig->Fill(icut+1, pTtrack, GetEventWeight());
1688  }
1689  }
1690 
1691  for(Int_t icut = 0; icut < fNExoCutInCandidate; icut++)
1692  {
1693  if ( fClusterExoticity < fExoCutInCandidate[icut] )
1694  {
1695  coneptsumTrackPerExoCut[icut]+=pTtrack;
1696  fhPtTrackInConePerExoCut->Fill(icut+1, pTtrack, GetEventWeight());
1697  if(ptTrig > 10) fhPtTrackInConePerExoCutLargePtTrig->Fill(icut+1, pTtrack, GetEventWeight());
1698  }
1699  }
1700  }
1701 
1702  Bool_t okTOF = kFALSE ;
1703  Int_t trackBC = 0;
1704  if(fStudyTracksInCone)
1705  {
1706  phitrack = track->Phi();
1707  etatrack = track->Eta();
1708 
1709  fhPhiTrackInCone->Fill(pTtrack, phitrack, GetEventWeight());
1710  fhEtaTrackInCone->Fill(pTtrack, etatrack, GetEventWeight());
1711  fhEtaPhiTrackInCone->Fill(etatrack, phitrack, GetEventWeight());
1712 
1713  // TOF
1714  ULong_t status = track->GetStatus();
1715  okTOF = (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ;
1716  trackBC = track->GetTOFBunchCrossing(bz);
1717  Double32_t tof = track->GetTOFsignal()*1e-3;
1718 
1719  Int_t vtxBC = GetReader()->GetVertexBC();
1720  if(vtxBC == 0 || vtxBC==AliVTrack::kTOFBCNA) fhPtTrackInConeVtxBC0->Fill(ptTrig, pTtrack, GetEventWeight());
1721 
1722  if(okTOF)
1723  {
1724  fhTrackTOFInCone->Fill(pTtrack,tof,GetEventWeight());
1725 
1727  fhTrackTOFInConeExoTrigger->Fill(pTtrack,tof,GetEventWeight());
1728 
1729  if(trackBC == 0)
1730  {
1731  fhPtTrackInConeTOFBC0 ->Fill(ptTrig , pTtrack , GetEventWeight());
1732  fhPhiTrackInConeTOFBC0->Fill(pTtrack, phitrack, GetEventWeight());
1733  fhEtaTrackInConeTOFBC0->Fill(pTtrack, etatrack, GetEventWeight());
1734  fhEtaPhiTrackInConeTOFBC0->Fill(etatrack, phitrack, GetEventWeight());
1735  fhTrackTOFInConeBC0 ->Fill(pTtrack, tof , GetEventWeight());
1736  coneptsumTrackTOFBC0 += pTtrack;
1737  }
1738  else
1739  {
1740  fhPtTrackInConeTOFBCN ->Fill(ptTrig , pTtrack , GetEventWeight());
1741  fhPhiTrackInConeTOFBCN->Fill(pTtrack, phitrack, GetEventWeight());
1742  fhEtaTrackInConeTOFBCN->Fill(pTtrack, etatrack, GetEventWeight());
1743  fhEtaPhiTrackInConeTOFBCN->Fill(etatrack, phitrack, GetEventWeight());
1744  coneptsumTrackTOFBCN += pTtrack;
1745  }
1746  }
1747  else
1748  {
1749  fhPtTrackInConeTOFNo ->Fill(ptTrig, pTtrack , GetEventWeight());
1750  fhPhiTrackInConeTOFNo->Fill(ptTrig, phitrack, GetEventWeight());
1751  fhEtaTrackInConeTOFNo->Fill(ptTrig, etatrack, GetEventWeight());
1752  fhEtaPhiTrackInConeTOFNo->Fill(etatrack, phitrack, GetEventWeight());
1753  coneptsumTrackTOFNo += pTtrack;
1754  }
1755 
1756 
1757  Bool_t bITSRefit = (status & AliVTrack::kITSrefit) == AliVTrack::kITSrefit;
1758  Bool_t bConstrained = (!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1));
1759  //printf("Track %d, pt %2.2f, eta %2.2f, phi %2.2f, SPDRefit %d, refit %d\n",
1760  // itrack, pTtrack, etatrack, phitrack, bConstrained, bITSRefit);
1761 
1762  if(bConstrained)
1763  {
1764  if(bITSRefit)
1765  {
1766  coneptsumTrackITSRefitOnSPDOff += pTtrack;
1767  fhPtTrackInConeITSRefitOnSPDOff ->Fill(ptTrig, pTtrack , GetEventWeight());
1768  fhPhiTrackInConeITSRefitOnSPDOff->Fill(ptTrig, phitrack, GetEventWeight());
1769  fhEtaTrackInConeITSRefitOnSPDOff->Fill(ptTrig, etatrack, GetEventWeight());
1770  fhEtaPhiTrackInConeITSRefitOnSPDOff->Fill(etatrack, phitrack, GetEventWeight());
1771  }
1772  else
1773  {
1774  coneptsumTrackITSRefitOffSPDOff += pTtrack;
1775  fhPtTrackInConeITSRefitOffSPDOff ->Fill(ptTrig, pTtrack , GetEventWeight());
1776  fhPhiTrackInConeITSRefitOffSPDOff->Fill(ptTrig, phitrack, GetEventWeight());
1777  fhEtaTrackInConeITSRefitOffSPDOff->Fill(ptTrig, etatrack, GetEventWeight());
1778  fhEtaPhiTrackInConeITSRefitOffSPDOff->Fill(etatrack, phitrack, GetEventWeight());
1779  }
1780  }
1781  else
1782  {
1783  coneptsumTrackITSRefitOnSPDOn += pTtrack;
1784  fhPtTrackInConeITSRefitOnSPDOn ->Fill(ptTrig, pTtrack , GetEventWeight());
1785  fhPhiTrackInConeITSRefitOnSPDOn->Fill(ptTrig, phitrack, GetEventWeight());
1786  fhEtaTrackInConeITSRefitOnSPDOn->Fill(ptTrig, etatrack, GetEventWeight());
1787  fhEtaPhiTrackInConeITSRefitOnSPDOn->Fill(etatrack, phitrack, GetEventWeight());
1788  }
1789 
1790  if(okTOF && trackBC == 0 && !bConstrained)
1791  {
1792  fhPtTrackInConeTOFBC0ITSRefitOnSPDOn ->Fill(ptTrig , pTtrack , GetEventWeight());
1793  fhPhiTrackInConeTOFBC0ITSRefitOnSPDOn->Fill(pTtrack, phitrack, GetEventWeight());
1794  fhEtaTrackInConeTOFBC0ITSRefitOnSPDOn->Fill(pTtrack, etatrack, GetEventWeight());
1795  fhEtaPhiTrackInConeTOFBC0ITSRefitOnSPDOn->Fill(etatrack, phitrack, GetEventWeight());
1796  coneptsumTrackTOFBC0ITSRefitOnSPDOn += pTtrack;
1797  }
1798  }
1799 
1800  if(IsPileUpAnalysisOn())
1801  {
1802  if(GetReader()->IsPileUpFromSPD())
1803  {
1804  fhPtInConePileUp[0] ->Fill(ptTrig, pTtrack, GetEventWeight());
1805  if(fStudyTracksInCone)
1806  {
1807  if(okTOF && trackBC!=0 ) fhPtTrackInConeOtherBCPileUpSPD->Fill(ptTrig, pTtrack, GetEventWeight());
1808  if(okTOF && trackBC==0 ) fhPtTrackInConeBC0PileUpSPD ->Fill(ptTrig, pTtrack, GetEventWeight());
1809  }
1810  }
1811  if(GetReader()->IsPileUpFromEMCal()) fhPtInConePileUp[1]->Fill(ptTrig, pTtrack, GetEventWeight());
1812  if(GetReader()->IsPileUpFromSPDOrEMCal()) fhPtInConePileUp[2]->Fill(ptTrig, pTtrack, GetEventWeight());
1813  if(GetReader()->IsPileUpFromSPDAndEMCal()) fhPtInConePileUp[3]->Fill(ptTrig, pTtrack, GetEventWeight());
1814  if(GetReader()->IsPileUpFromSPDAndNotEMCal()) fhPtInConePileUp[4]->Fill(ptTrig, pTtrack, GetEventWeight());
1815  if(GetReader()->IsPileUpFromEMCalAndNotSPD()) fhPtInConePileUp[5]->Fill(ptTrig, pTtrack, GetEventWeight());
1816  if(GetReader()->IsPileUpFromNotSPDAndNotEMCal()) fhPtInConePileUp[6]->Fill(ptTrig, pTtrack, GetEventWeight());
1817  }
1818  }
1819 
1820  fhConeSumPtTrack ->Fill(ptTrig, coneptsumTrack , GetEventWeight());
1821  fhConePtLeadTrack->Fill(ptTrig, coneptLeadTrack, GetEventWeight());
1823  fhConeSumPtTrackExoTrigger ->Fill(ptTrig, coneptsumTrack , GetEventWeight());
1824 
1825  if(fStudyTracksInCone)
1826  {
1827  fhConeSumPtTrackTOFBC0->Fill(ptTrig, coneptsumTrackTOFBC0, GetEventWeight());
1828  fhConeSumPtTrackTOFBCN->Fill(ptTrig, coneptsumTrackTOFBCN, GetEventWeight());
1829  fhConeSumPtTrackTOFNo ->Fill(ptTrig, coneptsumTrackTOFNo , GetEventWeight());
1830 
1831  fhConeSumPtTrackITSRefitOnSPDOn ->Fill(ptTrig, coneptsumTrackITSRefitOnSPDOn , GetEventWeight());
1832  fhConeSumPtTrackITSRefitOffSPDOff->Fill(ptTrig, coneptsumTrackITSRefitOffSPDOff, GetEventWeight());
1833  fhConeSumPtTrackITSRefitOnSPDOff ->Fill(ptTrig, coneptsumTrackITSRefitOnSPDOff , GetEventWeight());
1834 
1835  fhConeSumPtTrackTOFBC0ITSRefitOnSPDOn->Fill(ptTrig, coneptsumTrackTOFBC0ITSRefitOnSPDOn, GetEventWeight());
1836  }
1837 
1838  aodParticle->SetChargedLeadPtInCone(coneptLeadTrack);
1839  aodParticle->SetChargedPtSumInCone(coneptsumTrack);
1840 
1841  if(fStudyPtCutInCone)
1842  {
1843  for(Int_t icut = 0; icut < fNPtCutsInCone; icut++)
1844  {
1845  fhConeSumPtTrackPerMinPtCut->Fill(icut+1, coneptsumTrackPerMinCut[icut], GetEventWeight());
1846  fhConeSumPtTrackPerMaxPtCut->Fill(icut+1, coneptsumTrackPerMaxCut[icut], GetEventWeight());
1847  fhConeNTrackPerMinPtCut ->Fill(icut+1, coneNTrackPerMinCut [icut], GetEventWeight());
1848 
1849  if ( ptTrig > 10 )
1850  {
1851  fhConeSumPtTrackPerMinPtCutLargePtTrig->Fill(icut+1, coneptsumTrackPerMinCut[icut], GetEventWeight());
1852  fhConeSumPtTrackPerMaxPtCutLargePtTrig->Fill(icut+1, coneptsumTrackPerMaxCut[icut], GetEventWeight());
1853  fhConeNTrackPerMinPtCutLargePtTrig ->Fill(icut+1, coneNTrackPerMinCut [icut], GetEventWeight());
1854  }
1855  }
1856  }
1857 
1858  if(fStudyEtaCutInCone)
1859  {
1860  for(Int_t icut = 0; icut < fNEtaCutsInCone; icut++)
1861  {
1862  fhConeSumPtTrackPerEtaCut ->Fill(icut+1, coneptsumTrackPerEtaCut[icut], GetEventWeight());
1863  if ( ptTrig > 10 ) fhConeSumPtTrackPerEtaCutLargePtTrig->Fill(icut+1, coneptsumTrackPerEtaCut[icut], GetEventWeight());
1864  }
1865  }
1866 
1867  if(fStudyRCutInCone)
1868  {
1869  for(Int_t icut = 0; icut < fNRCutsInCone; icut++)
1870  {
1871  fhConeSumPtTrackPerRCut ->Fill(icut+1, coneptsumTrackPerRCut[icut], GetEventWeight());
1872  if ( ptTrig > 10 ) fhConeSumPtTrackPerRCutLargePtTrig->Fill(icut+1, coneptsumTrackPerRCut[icut], GetEventWeight());
1873  }
1874  }
1875 
1877  {
1878  for(Int_t icut = 0; icut < fNNCellsInCandidate; icut++)
1879  {
1880  fhConeSumPtTrackPerNCellCut->Fill(icut, coneptsumTrackPerNCellCut[icut], GetEventWeight());
1881  if ( ptTrig > 10 ) fhConeSumPtTrackPerNCellCutLargePtTrig->Fill(icut, coneptsumTrackPerNCellCut[icut], GetEventWeight());
1882  }
1883 
1884  for(Int_t icut = 0; icut < fNExoCutInCandidate; icut++)
1885  {
1886  fhConeSumPtTrackPerExoCut->Fill(icut, coneptsumTrackPerExoCut[icut], GetEventWeight());
1887  if ( ptTrig > 10 ) fhConeSumPtTrackPerExoCutLargePtTrig->Fill(icut, coneptsumTrackPerExoCut[icut], GetEventWeight());
1888  }
1889  }
1890 }
1891 
1892 //_____________________________________________________________________________
1894 //_____________________________________________________________________________
1896 {
1897  AliVEvent * event = GetReader()->GetInputEvent();
1898 
1899  fhTimeENoCut->Fill(energy, time, GetEventWeight());
1900  if(GetReader()->IsPileUpFromSPD()) fhTimeESPD ->Fill(energy, time, GetEventWeight());
1901  if(event->IsPileupFromSPDInMultBins()) fhTimeESPDMulti->Fill(energy, time, GetEventWeight());
1902 
1903  if(energy < 8) return; // Fill time figures for high energy clusters not too close to trigger threshold
1904 
1905  AliESDEvent* esdEv = dynamic_cast<AliESDEvent*> (event);
1906  AliAODEvent* aodEv = dynamic_cast<AliAODEvent*> (event);
1907 
1908  // N pile up vertices
1909  Int_t nVerticesSPD = -1;
1910  Int_t nVerticesTracks = -1;
1911 
1912  if (esdEv)
1913  {
1914  nVerticesSPD = esdEv->GetNumberOfPileupVerticesSPD();
1915  nVerticesTracks = esdEv->GetNumberOfPileupVerticesTracks();
1916 
1917  }//ESD
1918  else if (aodEv)
1919  {
1920  nVerticesSPD = aodEv->GetNumberOfPileupVerticesSPD();
1921  nVerticesTracks = aodEv->GetNumberOfPileupVerticesTracks();
1922  }//AOD
1923 
1924  fhTimeNPileUpVertSPD ->Fill(time, nVerticesSPD , GetEventWeight());
1925  fhTimeNPileUpVertTrack->Fill(time, nVerticesTracks, GetEventWeight());
1926 
1927  //printf("Is SPD %d, Is SPD Multi %d, n spd %d, n track %d\n",
1928  // GetReader()->IsPileUpFromSPD(),event->IsPileupFromSPDInMultBins(),nVerticesSPD,nVerticesTracks);
1929 
1930  Int_t ncont = -1;
1931  Float_t z1 = -1, z2 = -1;
1932  Float_t diamZ = -1;
1933  for(Int_t iVert=0; iVert<nVerticesSPD;iVert++)
1934  {
1935  if (esdEv)
1936  {
1937  const AliESDVertex* pv=esdEv->GetPileupVertexSPD(iVert);
1938  ncont=pv->GetNContributors();
1939  z1 = esdEv->GetPrimaryVertexSPD()->GetZ();
1940  z2 = pv->GetZ();
1941  diamZ = esdEv->GetDiamondZ();
1942  }//ESD
1943  else if (aodEv)
1944  {
1945  AliAODVertex *pv=aodEv->GetVertex(iVert);
1946  if(pv->GetType()!=AliAODVertex::kPileupSPD) continue;
1947  ncont=pv->GetNContributors();
1948  z1=aodEv->GetPrimaryVertexSPD()->GetZ();
1949  z2=pv->GetZ();
1950  diamZ = aodEv->GetDiamondZ();
1951  }// AOD
1952 
1953  Double_t distZ = TMath::Abs(z2-z1);
1954  diamZ = TMath::Abs(z2-diamZ);
1955 
1956  fhTimeNPileUpVertContributors ->Fill(time, ncont, GetEventWeight());
1957  fhTimePileUpMainVertexZDistance->Fill(time, distZ, GetEventWeight());
1958  fhTimePileUpMainVertexZDiamond ->Fill(time, diamZ, GetEventWeight());
1959 
1960  }// loop
1961 }
1962 
1963 //_____________________________________________________________________________________________________________________
1965 //_____________________________________________________________________________________________________________________
1967 (AliAODPWG4ParticleCorrelation *pCandidate,
1968  Float_t coneptsum, Float_t coneptsumTrack, Float_t coneptsumClust,
1969  Float_t coneleadpt, Int_t mcIndex)
1970 {
1971  if(!fFillTMHisto && !fFillSSHisto && !fFillBackgroundBinHistograms && !fFillTaggedDecayHistograms) return;
1972 
1973  Int_t nMaxima = pCandidate->GetNLM();
1974  Int_t mcTag = pCandidate->GetTag() ;
1975  Bool_t isolated = pCandidate->IsIsolated();
1976 
1977  Float_t m02 = pCandidate->GetM02() ;
1978  Float_t energy = pCandidate->E();
1979  Float_t pt = pCandidate->Pt();
1980  Float_t eta = pCandidate->Eta();
1981  Float_t phi = pCandidate->Phi();
1982  if(phi<0) phi+= TMath::TwoPi();
1983 
1984  // Candidates tagged as decay in another analysis (AliAnaPi0EbE)
1985  //
1986  if(fFillTaggedDecayHistograms)
1987  {
1988  Int_t decayTag = pCandidate->DecayTag();
1989  if(decayTag < 0) decayTag = 0;
1990 
1991  for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
1992  {
1993  if(!GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit])) continue;
1994 
1995  if(fFillSSHisto) fhPtLambda0Decay[isolated][ibit]->Fill(pt, m02, GetEventWeight());
1996 
1997  // In case it was not done on the trigger selection task
1998  // apply here a shower shape cut to select photons
1999  if( m02 > fDecayTagsM02Cut ) continue;
2000 
2001  fhPtDecay [isolated][ibit]->Fill(pt, GetEventWeight());
2002  fhEtaPhiDecay[isolated][ibit]->Fill(eta, phi, GetEventWeight());
2003 
2004  if(IsDataMC())
2005  {
2006  fhPtDecayMC[isolated][ibit][mcIndex]->Fill(pt, GetEventWeight());
2007 
2008  if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
2009  fhPtDecayMC[isolated][ibit][kmcPhoton]->Fill(pt, GetEventWeight());
2010 
2011  if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2012  {
2013  if ( mcIndex == kmcPi0Decay ) fhPtDecayMC[isolated][ibit][kmcPi0DecayLostPair]->Fill(pt, GetEventWeight());
2014  else if( mcIndex == kmcEtaDecay ) fhPtDecayMC[isolated][ibit][kmcEtaDecayLostPair]->Fill(pt, GetEventWeight());
2015  }
2016  }
2017  } // bit loop
2018  } // decay histograms
2019 
2020  // Get the max pt leading in cone or the sum of pt in cone
2021  // assign a bin to the candidate, depending on both quantities
2022  // see the shower shape in those bins.
2023  if(fFillBackgroundBinHistograms)
2024  {
2025  // Get the background bin for this cone and trigger
2026  Int_t ptsumBin = -1;
2027  Int_t leadptBin = -1;
2028 
2029  AliDebug(1,Form("pT cand: %2.2f, In cone pT: Sum %2.2f, Lead %2.2f, n bins %d",pt,coneptsum,coneleadpt,fNBkgBin));
2030 
2031  for(Int_t ibin = 0; ibin < fNBkgBin; ibin++)
2032  {
2033  if( coneptsum >= fBkgBinLimit[ibin] && coneptsum < fBkgBinLimit[ibin+1]) ptsumBin = ibin;
2034  if( coneleadpt >= fBkgBinLimit[ibin] && coneleadpt < fBkgBinLimit[ibin+1]) leadptBin = ibin;
2035  }
2036 
2037  // Fill the histograms per bin of pt lead or pt sum
2038 
2039  if ( leadptBin >= 0 )
2040  {
2041  AliDebug(1,Form("\t Lead bin %d [%2.2f,%2.2f]", leadptBin,fBkgBinLimit[leadptBin],fBkgBinLimit[leadptBin+1]));
2042 
2043  fhPtLeadConeBin[leadptBin]->Fill(pt, GetEventWeight());
2044 
2045  if(fFillSSHisto)
2046  fhPtLeadConeBinLambda0[leadptBin]->Fill(pt, m02, GetEventWeight());
2047 
2048  if ( leadptBin == 0 )
2049  AliDebug(1,Form("No track/clusters in isolation cone: cand pt %2.2f GeV/c, track multiplicity %d, N clusters %d",
2050  pt, GetTrackMultiplicity(),GetEMCALClusters()->GetEntriesFast()));
2051  }
2052 
2053  if ( ptsumBin >= 0 )
2054  {
2055  AliDebug(1,Form("\t Sum bin %d [%2.2f,%2.2f]" , ptsumBin ,fBkgBinLimit[ptsumBin] ,fBkgBinLimit[ptsumBin +1]));
2056 
2057  fhSumPtConeBin[ptsumBin]->Fill(pt, GetEventWeight());
2058 
2059  if(fFillSSHisto) fhSumPtConeBinLambda0[ptsumBin]->Fill(pt, m02, GetEventWeight());
2060  }
2061 
2062  // Check if it was a decay
2063  if( fFillTaggedDecayHistograms && m02 < fDecayTagsM02Cut )
2064  {
2065  Int_t decayTag = pCandidate->DecayTag();
2066  if(decayTag < 0) decayTag = 0;
2067 
2068  for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
2069  {
2070  if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
2071  {
2072  Int_t leadptBinDecay = leadptBin+ibit*fNBkgBin;
2073  Int_t ptsumBinDecay = ptsumBin+ibit*fNBkgBin;
2074  if( leadptBin >=0 ) fhPtLeadConeBinDecay[leadptBinDecay]->Fill(pt, GetEventWeight());
2075  if( ptsumBin >=0 ) fhSumPtConeBinDecay [ ptsumBinDecay]->Fill(pt, GetEventWeight());
2076  }
2077  }
2078  }
2079 
2080  if(IsDataMC())
2081  {
2082  Int_t leadptBinMC = leadptBin+mcIndex*fNBkgBin;
2083  Int_t ptsumBinMC = ptsumBin+mcIndex*fNBkgBin;
2084 
2085  if( leadptBin >=0 )
2086  {
2087  fhPtLeadConeBinMC[leadptBinMC]->Fill(pt, GetEventWeight());
2088  if(fFillSSHisto) fhPtLeadConeBinLambda0MC[leadptBinMC]->Fill(pt, m02, GetEventWeight());
2089  }
2090 
2091  if( ptsumBin >=0 )
2092  {
2093  fhSumPtConeBinMC [ ptsumBinMC]->Fill(pt, GetEventWeight());
2094  if(fFillSSHisto) fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt, m02, GetEventWeight());
2095  }
2096 
2097  if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
2098  {
2099  leadptBinMC = leadptBin+kmcPhoton*fNBkgBin;
2100  ptsumBinMC = ptsumBin+kmcPhoton*fNBkgBin;
2101  if( leadptBin >=0 )
2102  {
2103  fhPtLeadConeBinMC[leadptBinMC]->Fill(pt, GetEventWeight());
2104  if(fFillSSHisto) fhPtLeadConeBinLambda0MC[leadptBinMC]->Fill(pt, m02, GetEventWeight());
2105  }
2106 
2107  if( ptsumBin >=0 )
2108  {
2109  fhSumPtConeBinMC [ ptsumBinMC]->Fill(pt, GetEventWeight());
2110  if(fFillSSHisto) fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt, m02, GetEventWeight());
2111  }
2112  }
2113 
2114  // Check if decay and if pair is lost
2115  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2116  {
2117  if ( mcIndex == kmcPi0Decay )
2118  {
2119  leadptBinMC = leadptBin+kmcPi0DecayLostPair*fNBkgBin;
2120  ptsumBinMC = ptsumBin+kmcPi0DecayLostPair*fNBkgBin;
2121  }
2122  else if(mcIndex == kmcEtaDecay)
2123  {
2124  leadptBinMC = leadptBin+kmcEtaDecayLostPair*fNBkgBin;
2125  ptsumBinMC = ptsumBin+kmcEtaDecayLostPair*fNBkgBin;
2126  }
2127  else
2128  AliFatal(Form("Lost decay Bit assigned to bad case, mcIndex %d",mcIndex));
2129 
2130  if( leadptBin >=0 )
2131  {
2132  fhPtLeadConeBinMC[leadptBinMC]->Fill(pt, GetEventWeight());
2133  if(fFillSSHisto) fhPtLeadConeBinLambda0MC[leadptBinMC]->Fill(pt, m02, GetEventWeight());
2134  }
2135 
2136  if( ptsumBin >=0 )
2137  {
2138  fhSumPtConeBinMC [ ptsumBinMC]->Fill(pt);
2139  if(fFillSSHisto) fhSumPtConeBinLambda0MC [ ptsumBinMC]->Fill(pt, m02, GetEventWeight());
2140  }
2141 
2142  } // check decays with lost pairs
2143 
2144  } // MC data
2145  } // background dependent bins
2146 
2147  // Fill histograms on selected pt bins of the trigger particle
2148  Int_t ptTrigBin = -1;
2149  if(fFillPtTrigBinHistograms)
2150  {
2151  for(Int_t ibin = 0; ibin < fNPtTrigBin; ibin++)
2152  {
2153  if( pt >= fPtTrigBinLimit[ibin] && pt < fPtTrigBinLimit[ibin+1]) ptTrigBin = ibin;
2154  }
2155 
2156  // Fill the histograms if the bin is found.
2157  if ( ptTrigBin >= 0 )
2158  {
2159  AliDebug(1,Form("Trigger pT %f, bin %d [%2.2f,%2.2f]",pt,ptTrigBin,fPtTrigBinLimit[ptTrigBin],fPtTrigBinLimit[ptTrigBin+1]));
2160 
2161  fhPtTrigBinPtLeadCone[ptTrigBin]->Fill(coneleadpt, GetEventWeight());
2162  fhPtTrigBinSumPtCone [ptTrigBin]->Fill(coneptsum , GetEventWeight());
2163 
2164  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2165  {
2166  fhPtTrigBinSumPtTrackCone [ptTrigBin]->Fill(coneptsumTrack, GetEventWeight());
2167  fhPtTrigBinSumPtClusterCone[ptTrigBin]->Fill(coneptsumClust, GetEventWeight());
2168  }
2169 
2170  if(fFillSSHisto)
2171  {
2172  fhPtTrigBinLambda0vsPtLeadCone[ptTrigBin]->Fill(coneleadpt, m02, GetEventWeight());
2173  fhPtTrigBinLambda0vsSumPtCone [ptTrigBin]->Fill(coneptsum , m02, GetEventWeight());
2174 
2175  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2176  {
2177  fhPtTrigBinLambda0vsSumPtTrackCone [ptTrigBin]->Fill(coneptsumTrack, m02, GetEventWeight());
2178  fhPtTrigBinLambda0vsSumPtClusterCone[ptTrigBin]->Fill(coneptsumClust, m02, GetEventWeight());
2179  }
2180  }
2181 
2182  // Check if it was a decay
2183  if( fFillTaggedDecayHistograms && m02 < fDecayTagsM02Cut )
2184  {
2185  Int_t decayTag = pCandidate->DecayTag();
2186  if(decayTag < 0) decayTag = 0;
2187 
2188  for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
2189  {
2190  if(GetNeutralMesonSelection()->CheckDecayBit(decayTag,fDecayBits[ibit]))
2191  {
2192  Int_t binDecay = ptTrigBin+ibit*fNPtTrigBin;
2193  if( binDecay > 0 )
2194  {
2195  fhPtTrigBinPtLeadConeDecay[binDecay]->Fill(coneleadpt, GetEventWeight());
2196  fhPtTrigBinSumPtConeDecay [binDecay]->Fill(coneptsum , GetEventWeight());
2197 
2198  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2199  {
2200  fhPtTrigBinSumPtTrackConeDecay [binDecay]->Fill(coneptsumTrack, GetEventWeight());
2201  fhPtTrigBinSumPtClusterConeDecay[binDecay]->Fill(coneptsumClust, GetEventWeight());
2202  }
2203  }
2204  }
2205  }
2206  } // decay
2207 
2208  if( IsDataMC() )
2209  {
2210  Int_t ptTrigBinMC = ptTrigBin+mcIndex*fNPtTrigBin;
2211 
2212  fhPtTrigBinPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt , GetEventWeight());
2213  fhPtTrigBinSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , GetEventWeight());
2214 
2215  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2216  {
2217  fhPtTrigBinSumPtTrackConeMC [ptTrigBinMC]->Fill(coneptsumTrack, GetEventWeight());
2218  fhPtTrigBinSumPtClusterConeMC[ptTrigBinMC]->Fill(coneptsumClust, GetEventWeight());
2219  }
2220 
2221  if(fFillSSHisto)
2222  {
2223  fhPtTrigBinLambda0vsPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt , m02, GetEventWeight());
2224  fhPtTrigBinLambda0vsSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , m02, GetEventWeight());
2225 
2226  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2227  {
2228  fhPtTrigBinLambda0vsSumPtTrackConeMC [ptTrigBinMC]->Fill(coneptsumTrack, m02, GetEventWeight());
2229  fhPtTrigBinLambda0vsSumPtClusterConeMC[ptTrigBinMC]->Fill(coneptsumClust, m02, GetEventWeight());
2230  }
2231  }
2232 
2233  if(GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton))
2234  {
2235  ptTrigBinMC = ptTrigBin+kmcPhoton*fNPtTrigBin;
2236 
2237  fhPtTrigBinPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt, GetEventWeight());
2238  fhPtTrigBinSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , GetEventWeight());
2239 
2240  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2241  {
2242  fhPtTrigBinSumPtTrackConeMC [ptTrigBinMC]->Fill(coneptsumTrack, GetEventWeight());
2243  fhPtTrigBinSumPtClusterConeMC[ptTrigBinMC]->Fill(coneptsumClust, GetEventWeight());
2244  }
2245 
2246  if(fFillSSHisto)
2247  {
2248  fhPtTrigBinLambda0vsPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt, m02, GetEventWeight());
2249  fhPtTrigBinLambda0vsSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , m02, GetEventWeight());
2250 
2251  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2252  {
2253  fhPtTrigBinLambda0vsSumPtTrackConeMC [ptTrigBinMC]->Fill(coneptsumTrack, m02, GetEventWeight());
2254  fhPtTrigBinLambda0vsSumPtClusterConeMC[ptTrigBinMC]->Fill(coneptsumClust, m02, GetEventWeight());
2255  }
2256  }
2257  } // photon MC
2258 
2259  // decays with lost pair
2260  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2261  {
2262  if ( mcIndex == kmcPi0Decay ) ptTrigBinMC = ptTrigBin+kmcPi0DecayLostPair*fNPtTrigBin;
2263  else if( mcIndex == kmcEtaDecay ) ptTrigBinMC = ptTrigBin+kmcEtaDecayLostPair*fNPtTrigBin;
2264 
2265  fhPtTrigBinPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt , GetEventWeight());
2266  fhPtTrigBinSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , GetEventWeight());
2267 
2268  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2269  {
2270  fhPtTrigBinSumPtTrackConeMC [ptTrigBinMC]->Fill(coneptsumTrack, GetEventWeight());
2271  fhPtTrigBinSumPtClusterConeMC[ptTrigBinMC]->Fill(coneptsumClust, GetEventWeight());
2272  }
2273 
2274  if(fFillSSHisto)
2275  {
2276  fhPtTrigBinLambda0vsPtLeadConeMC[ptTrigBinMC]->Fill(coneleadpt , m02, GetEventWeight());
2277  fhPtTrigBinLambda0vsSumPtConeMC [ptTrigBinMC]->Fill(coneptsum , m02, GetEventWeight());
2278 
2279  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2280  {
2281  fhPtTrigBinLambda0vsSumPtTrackConeMC [ptTrigBinMC]->Fill(coneptsumTrack, m02, GetEventWeight());
2282  fhPtTrigBinLambda0vsSumPtClusterConeMC[ptTrigBinMC]->Fill(coneptsumClust, m02, GetEventWeight());
2283  }
2284  }
2285  } // lost decays MC
2286 
2287  } // MC
2288 
2289  } // proper pT bin found
2290  } // pT trigger bins
2291 
2292  //
2293  // Shower shape dependent histograms
2294  //
2295  if(fFillSSHisto)
2296  {
2297  //fhPtLambda0Eiso->Fill(pt, m02, coneptsum);
2298 
2299  fhELambda0 [isolated]->Fill(energy, m02, GetEventWeight());
2300  fhPtLambda0[isolated]->Fill(pt, m02, GetEventWeight());
2301  //fhELambda1 [isolated]->Fill(energy, m20);
2302 
2303  //
2304  // MC
2305  //
2306  if(IsDataMC())
2307  {
2308  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2309  fhPtLambda0MC[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
2310 
2311  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2312  {
2313  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MC[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2314  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MC[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2315  }
2316 
2317  fhPtLambda0MC[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
2318 
2319  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
2320  {
2321  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2322  fhPtLambda0MCConv[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
2323 
2324  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2325  {
2326  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCConv[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2327  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCConv[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2328  }
2329 
2330  fhPtLambda0MCConv[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
2331  } // Conversion
2332 
2333  //
2334  // Check overlaps
2335  //
2336  Int_t noverlaps = 0;
2337  if ( fFillOverlapHistograms && fCluster )
2338  {
2339  const UInt_t nlabels = fCluster->GetNLabels();
2340  Int_t overpdg[nlabels];
2341  Int_t overlab[nlabels];
2342  noverlaps = GetMCAnalysisUtils()->GetNOverlaps(fCluster->GetLabels(), nlabels, mcTag, -1,
2343  GetReader(), overpdg, overlab);
2344 
2345  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2346  fhPtNOverlap[kmcPhoton][isolated]->Fill(pt, noverlaps, GetEventWeight());
2347 
2348  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2349  {
2350  if ( mcIndex == kmcPi0Decay ) fhPtNOverlap[kmcPi0DecayLostPair][isolated]->Fill(pt, noverlaps, GetEventWeight());
2351  else if( mcIndex == kmcEtaDecay ) fhPtNOverlap[kmcEtaDecayLostPair][isolated]->Fill(pt, noverlaps, GetEventWeight());
2352  }
2353 
2354  fhPtNOverlap[mcIndex][isolated]->Fill(pt, noverlaps, GetEventWeight());
2355 
2356  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
2357  {
2358  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2359  fhPtNOverlapConv[kmcPhoton][isolated]->Fill(pt, noverlaps, GetEventWeight());
2360 
2361  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2362  {
2363  if ( mcIndex == kmcPi0Decay ) fhPtNOverlapConv[kmcPi0DecayLostPair][isolated]->Fill(pt, noverlaps, GetEventWeight());
2364  else if( mcIndex == kmcEtaDecay ) fhPtNOverlapConv[kmcEtaDecayLostPair][isolated]->Fill(pt, noverlaps, GetEventWeight());
2365  }
2366 
2367  fhPtNOverlapConv[mcIndex][isolated]->Fill(pt, noverlaps, GetEventWeight());
2368  } // Conversion
2369 
2370 
2371  if ( noverlaps == 1 )
2372  {
2373  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2374  fhPtLambda0MCWith1Overlap[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
2375 
2376  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2377  {
2378  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCWith1Overlap[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2379  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCWith1Overlap[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2380  }
2381 
2382  fhPtLambda0MCWith1Overlap[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
2383 
2384  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
2385  {
2386  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2387  fhPtLambda0MCConvWith1Overlap[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
2388 
2389  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2390  {
2391  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCConvWith1Overlap[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2392  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCConvWith1Overlap[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2393  }
2394 
2395  fhPtLambda0MCConvWith1Overlap[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
2396  } // Conversion
2397  } // At least 1 overlap
2398  else if (noverlaps == 0 ) // No overlap
2399  {
2400  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2401  fhPtLambda0MCWithNoOverlap[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
2402 
2403  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2404  {
2405  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCWithNoOverlap[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2406  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCWithNoOverlap[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2407  }
2408 
2409  fhPtLambda0MCWithNoOverlap[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
2410 
2411  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
2412  {
2413  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2414  fhPtLambda0MCConvWithNoOverlap[kmcPhoton][isolated]->Fill(pt, m02, GetEventWeight());
2415 
2416  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCDecayPairLost) )
2417  {
2418  if ( mcIndex == kmcPi0Decay ) fhPtLambda0MCConvWithNoOverlap[kmcPi0DecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2419  else if( mcIndex == kmcEtaDecay ) fhPtLambda0MCConvWithNoOverlap[kmcEtaDecayLostPair][isolated]->Fill(pt, m02, GetEventWeight());
2420  }
2421 
2422  fhPtLambda0MCConvWithNoOverlap[mcIndex][isolated]->Fill(pt, m02, GetEventWeight());
2423  } // Conversion
2424  } // more than 1 overlap
2425  }
2426 
2427  //
2428  // Sum in cone and shower shape in different pT bins of candidate and overlap condition
2429  //
2430  if(fFillPtTrigBinHistograms && fFillSSHisto)
2431  {
2432  Int_t ptTrigBinMC = ptTrigBin+mcIndex *fNPtTrigBin;
2433  Int_t ptTrigBinMCPhoton = ptTrigBin+kmcPhoton*fNPtTrigBin;
2434  Int_t ptTrigBinMCPi0Lost = ptTrigBin+kmcPi0DecayLostPair*fNPtTrigBin;
2435  Int_t ptTrigBinMCEtaLost = ptTrigBin+kmcEtaDecayLostPair*fNPtTrigBin;
2436 
2437  if ( ptTrigBin >= 0 )
2438  {
2439  fhPtTrigBinLambda0vsSumPtConeMC[ptTrigBinMC]->Fill(coneptsum, m02, GetEventWeight());
2440 
2441  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2442  {
2443  fhPtTrigBinLambda0vsSumPtTrackConeMC [ptTrigBinMC]->Fill(coneptsumTrack, m02, GetEventWeight());
2444  fhPtTrigBinLambda0vsSumPtClusterConeMC[ptTrigBinMC]->Fill(coneptsumClust, m02, GetEventWeight());
2445  }
2446 
2447  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2448  {
2449  fhPtTrigBinLambda0vsSumPtConeMC[ptTrigBinMCPhoton]->Fill(coneptsum, m02, GetEventWeight());
2450 
2451  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2452  {
2453  fhPtTrigBinLambda0vsSumPtTrackConeMC [ptTrigBinMCPhoton]->Fill(coneptsumTrack, m02, GetEventWeight());
2454  fhPtTrigBinLambda0vsSumPtClusterConeMC[ptTrigBinMCPhoton]->Fill(coneptsumClust, m02, GetEventWeight());
2455  }
2456  }
2457 
2458  if( mcIndex == kmcPi0Decay )
2459  {
2460  fhPtTrigBinLambda0vsSumPtConeMC[ptTrigBinMCPi0Lost]->Fill(coneptsum, m02, GetEventWeight());
2461 
2462  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2463  {
2464  fhPtTrigBinLambda0vsSumPtTrackConeMC [ptTrigBinMCPi0Lost]->Fill(coneptsumTrack, m02, GetEventWeight());
2465  fhPtTrigBinLambda0vsSumPtClusterConeMC[ptTrigBinMCPi0Lost]->Fill(coneptsumClust, m02, GetEventWeight());
2466  }
2467  }
2468 
2469  if( mcIndex == kmcEtaDecay )
2470  {
2471  fhPtTrigBinLambda0vsSumPtConeMC[ptTrigBinMCEtaLost]->Fill(coneptsum, m02, GetEventWeight());
2472 
2473  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2474  {
2475  fhPtTrigBinLambda0vsSumPtTrackConeMC [ptTrigBinMCEtaLost]->Fill(coneptsumTrack, m02, GetEventWeight());
2476  fhPtTrigBinLambda0vsSumPtClusterConeMC[ptTrigBinMCEtaLost]->Fill(coneptsumClust, m02, GetEventWeight());
2477  }
2478  }
2479 
2480  if(fFillOverlapHistograms)
2481  {
2482  if ( noverlaps == 0 )
2483  {
2484  fhPtTrigBinLambda0vsSumPtConeMCNoOverlap[ptTrigBinMC]->Fill(coneptsum, m02, GetEventWeight());
2485 
2486  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2487  {
2488  fhPtTrigBinLambda0vsSumPtTrackConeMCNoOverlap [ptTrigBinMC]->Fill(coneptsumTrack, m02, GetEventWeight());
2489  fhPtTrigBinLambda0vsSumPtClusterConeMCNoOverlap[ptTrigBinMC]->Fill(coneptsumClust, m02, GetEventWeight());
2490  }
2491 
2492  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2493  {
2494  fhPtTrigBinLambda0vsSumPtConeMCNoOverlap[ptTrigBinMCPhoton]->Fill(coneptsum, m02, GetEventWeight());
2495 
2496  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2497  {
2498  fhPtTrigBinLambda0vsSumPtTrackConeMCNoOverlap [ptTrigBinMCPhoton]->Fill(coneptsumTrack, m02, GetEventWeight());
2499  fhPtTrigBinLambda0vsSumPtClusterConeMCNoOverlap[ptTrigBinMCPhoton]->Fill(coneptsumClust, m02, GetEventWeight());
2500  }
2501  }
2502 
2503  if( mcIndex == kmcPi0Decay )
2504  {
2505  fhPtTrigBinLambda0vsSumPtConeMCNoOverlap[ptTrigBinMCPi0Lost]->Fill(coneptsum, m02, GetEventWeight());
2506 
2507  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2508  {
2509  fhPtTrigBinLambda0vsSumPtTrackConeMCNoOverlap [ptTrigBinMCPi0Lost]->Fill(coneptsumTrack, m02, GetEventWeight());
2510  fhPtTrigBinLambda0vsSumPtClusterConeMCNoOverlap[ptTrigBinMCPi0Lost]->Fill(coneptsumClust, m02, GetEventWeight());
2511  }
2512  }
2513 
2514  if( mcIndex == kmcEtaDecay )
2515  {
2516  fhPtTrigBinLambda0vsSumPtConeMCNoOverlap[ptTrigBinMCEtaLost]->Fill(coneptsum, m02, GetEventWeight());
2517 
2518  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2519  {
2520  fhPtTrigBinLambda0vsSumPtTrackConeMCNoOverlap [ptTrigBinMCEtaLost]->Fill(coneptsumTrack, m02, GetEventWeight());
2521  fhPtTrigBinLambda0vsSumPtClusterConeMCNoOverlap[ptTrigBinMCEtaLost]->Fill(coneptsumClust, m02, GetEventWeight());
2522  }
2523  }
2524 
2525 
2526  } // nover = 0
2527  else if ( noverlaps == 1 )
2528  {
2529  fhPtTrigBinLambda0vsSumPtConeMC1Overlap[ptTrigBinMC]->Fill(coneptsum, m02, GetEventWeight());
2530  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2531  {
2532  fhPtTrigBinLambda0vsSumPtTrackConeMC1Overlap [ptTrigBinMC]->Fill(coneptsumTrack, m02, GetEventWeight());
2533  fhPtTrigBinLambda0vsSumPtClusterConeMC1Overlap[ptTrigBinMC]->Fill(coneptsumClust, m02, GetEventWeight());
2534  }
2535 
2536  if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) )
2537  {
2538  fhPtTrigBinLambda0vsSumPtConeMC1Overlap[ptTrigBinMCPhoton]->Fill(coneptsum, m02, GetEventWeight());
2539 
2540  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2541  {
2542  fhPtTrigBinLambda0vsSumPtTrackConeMC1Overlap [ptTrigBinMCPhoton]->Fill(coneptsumTrack, m02, GetEventWeight());
2543  fhPtTrigBinLambda0vsSumPtClusterConeMC1Overlap[ptTrigBinMCPhoton]->Fill(coneptsumClust, m02, GetEventWeight());
2544  }
2545 
2546  if( mcIndex == kmcPi0Decay )
2547  {
2548  fhPtTrigBinLambda0vsSumPtConeMC1Overlap[ptTrigBinMCPi0Lost]->Fill(coneptsum, m02, GetEventWeight());
2549 
2550  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2551  {
2552  fhPtTrigBinLambda0vsSumPtTrackConeMC1Overlap [ptTrigBinMCPi0Lost]->Fill(coneptsumTrack, m02, GetEventWeight());
2553  fhPtTrigBinLambda0vsSumPtClusterConeMC1Overlap[ptTrigBinMCPi0Lost]->Fill(coneptsumClust, m02, GetEventWeight());
2554  }
2555  }
2556 
2557  if( mcIndex == kmcEtaDecay )
2558  {
2559  fhPtTrigBinLambda0vsSumPtConeMC1Overlap[ptTrigBinMCEtaLost]->Fill(coneptsum, m02, GetEventWeight());
2560 
2561  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
2562  {
2563  fhPtTrigBinLambda0vsSumPtTrackConeMC1Overlap [ptTrigBinMCEtaLost]->Fill(coneptsumTrack, m02, GetEventWeight());
2564  fhPtTrigBinLambda0vsSumPtClusterConeMC1Overlap[ptTrigBinMCEtaLost]->Fill(coneptsumClust, m02, GetEventWeight());
2565  }
2566  }
2567  }
2568  } // nover = 1
2569  } // fill overlaps
2570 
2571  } // pt bin exists
2572  } // fFillPtTrigBinHistograms && fFillSSHisto
2573 
2574  } // MC
2575 
2576  if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
2577  GetModuleNumber(pCandidate) >= GetFirstSMCoveredByTRD() )
2578  {
2579  fhELambda0TRD [isolated]->Fill(energy, m02, GetEventWeight());
2580  fhPtLambda0TRD[isolated]->Fill(pt , m02, GetEventWeight());
2581  //fhELambda1TRD [isolated]->Fill(energy, m20 );
2582  }
2583 
2584  if(fFillNLMHistograms)
2585  {
2586  fhNLocMax[isolated]->Fill(energy, nMaxima, GetEventWeight());
2587  if (nMaxima==1)
2588  {
2589  fhELambda0LocMax1[isolated]->Fill(energy, m02, GetEventWeight());
2590  fhELambda1LocMax1[isolated]->Fill(energy, m02, GetEventWeight());
2591  }
2592  else if(nMaxima==2)
2593  {
2594  fhELambda0LocMax2[isolated]->Fill(energy, m02, GetEventWeight());
2595  fhELambda1LocMax2[isolated]->Fill(energy, m02, GetEventWeight());
2596  }
2597  else
2598  {
2599  fhELambda0LocMaxN[isolated]->Fill(energy, m02, GetEventWeight());
2600  fhELambda1LocMaxN[isolated]->Fill(energy, m02, GetEventWeight());
2601  }
2602  }
2603  } // SS histo fill
2604 
2605  // Track matching dependent histograms
2606  if ( fFillTMHisto && fCluster )
2607  {
2608  Float_t dZ = fCluster->GetTrackDz();
2609  Float_t dR = fCluster->GetTrackDx();
2610 
2611 // if(fCluster->IsEMCAL() && GetCaloUtils()->IsRecalculationOfClusterTrackMatchingOn())
2612 // {
2613 // dR = 2000., dZ = 2000.;
2614 // GetCaloUtils()->GetEMCALRecoUtils()->GetMatchedResiduals(fCluster->GetID(),dZ,dR);
2615 // }
2616 
2617  //printf("ParticleIsolation: dPhi %f, dEta %f\n",dR,dZ);
2618  if(fhTrackMatchedDEta[isolated] && TMath::Abs(dR) < 999)
2619  {
2620  fhTrackMatchedDEta[isolated]->Fill(energy, dZ, GetEventWeight());
2621  fhTrackMatchedDPhi[isolated]->Fill(energy, dR, GetEventWeight());
2622  if(energy > 0.5) fhTrackMatchedDEtaDPhi[isolated]->Fill(dZ, dR, GetEventWeight());
2623  if(IsDataMC())
2624  {
2625  fhTrackMatchedDEtaMC[mcIndex][isolated]->Fill(energy, dZ, GetEventWeight());
2626  fhTrackMatchedDPhiMC[mcIndex][isolated]->Fill(energy, dR, GetEventWeight());
2627  if(energy > 0.5) fhTrackMatchedDEtaDPhiMC[mcIndex][isolated]->Fill(dZ, dR, GetEventWeight());
2628  }
2629  }
2630 
2631  // Check dEdx and E/p of matched clusters
2632 
2633  if(TMath::Abs(dZ) < 0.05 && TMath::Abs(dR) < 0.05)
2634  {
2635  AliVTrack *track = GetCaloUtils()->GetMatchedTrack(fCluster, GetReader()->GetInputEvent());
2636 
2637  if(track)
2638  {
2639  Float_t dEdx = track->GetTPCsignal();
2640  fhdEdx[isolated]->Fill(fCluster->E(), dEdx, GetEventWeight());
2641 
2642  Float_t eOverp = fCluster->E()/track->P();
2643  fhEOverP[isolated]->Fill(fCluster->E(), eOverp, GetEventWeight());
2644  }
2645  //else
2646  // printf("AliAnaParticleIsolation::FillTrackMatchingShowerShapeHistograms() - Residual OK but (dR, dZ)= (%2.4f,%2.4f) no track associated WHAT? \n", dR,dZ);
2647 
2648 
2649  if(IsDataMC())
2650  {
2651  if ( !GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) )
2652  {
2653  if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) ||
2654  GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 2.5, GetEventWeight());
2655  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 0.5, GetEventWeight());
2656  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 1.5, GetEventWeight());
2657  else fhTrackMatchedMCParticle[isolated]->Fill(energy, 3.5, GetEventWeight());
2658 
2659  }
2660  else
2661  {
2662  if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) ||
2663  GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 6.5, GetEventWeight());
2664  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 4.5, GetEventWeight());
2665  else if ( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCElectron) ) fhTrackMatchedMCParticle[isolated]->Fill(energy, 5.5, GetEventWeight());
2666  else fhTrackMatchedMCParticle[isolated]->Fill(energy, 7.5, GetEventWeight());
2667  }
2668  } // MC
2669  } // match window
2670  }// TM histos fill
2671 }
2672 
2673 //______________________________________________________
2675 //______________________________________________________
2677 {
2678  TString parList ; //this will be list of parameters used for this analysis.
2679  const Int_t buffersize = 255;
2680  char onePar[buffersize] ;
2681 
2682  snprintf(onePar, buffersize,"--- AliAnaParticleIsolation ---:") ;
2683  parList+=onePar ;
2684  snprintf(onePar, buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
2685  parList+=onePar ;
2686  snprintf(onePar, buffersize,"Isolation Cand. Detector: %s;",fIsoDetectorString.Data()) ;
2687  parList+=onePar ;
2688  snprintf(onePar, buffersize,"Fill histo UE %d",fFillUEBandSubtractHistograms) ;
2689  parList+=onePar ;
2690  snprintf(onePar, buffersize,"fReMakeIC =%d (Flag for reisolation during histogram filling);",fReMakeIC) ;
2691  parList+=onePar ;
2692  snprintf(onePar, buffersize,"fMakeSeveralIC=%d (Flag for isolation with several cuts at the same time );",fMakeSeveralIC) ;
2693  parList+=onePar ;
2694  snprintf(onePar, buffersize,"fFillTMHisto=%d (Flag for track matching histograms);",fFillTMHisto) ;
2695  parList+=onePar ;
2696  snprintf(onePar, buffersize,"fFillSSHisto=%d (Flag for shower shape histograms);",fFillSSHisto) ;
2697  parList+=onePar ;
2698 
2699  if(fMakeSeveralIC)
2700  {
2701  snprintf(onePar, buffersize,"fNCones =%d (Number of cone sizes);",fNCones) ;
2702  parList+=onePar ;
2703  snprintf(onePar, buffersize,"fNPtThresFrac=%d (Flag for isolation with several cuts at the same time);",fNPtThresFrac) ;
2704  parList+=onePar ;
2705 
2706  for(Int_t icone = 0; icone < fNCones ; icone++)
2707  {
2708  snprintf(onePar, buffersize,"fConeSizes[%d]=%1.2f (isolation cone size);",icone, fConeSizes[icone]) ;
2709  parList+=onePar ;
2710  }
2711  for(Int_t ipt = 0; ipt < fNPtThresFrac ; ipt++)
2712  {
2713  snprintf(onePar, buffersize,"fPtThresholds[%d]=%1.2f (isolation pt threshold);",ipt, fPtThresholds[ipt]) ;
2714  parList+=onePar ;
2715  }
2716  for(Int_t ipt = 0; ipt < fNPtThresFrac ; ipt++)
2717  {
2718  snprintf(onePar, buffersize,"fPtFractions[%d]=%1.2f (isolation pt fraction threshold);",ipt, fPtFractions[ipt]) ;
2719  parList+=onePar ;
2720  }
2721  for(Int_t ipt = 0; ipt < fNPtThresFrac ; ipt++)
2722  {
2723  snprintf(onePar, buffersize,"fSumPtThresholds[%d]=%1.2f (isolation sum pt threshold);",ipt, fSumPtThresholds[ipt]) ;
2724  parList+=onePar ;
2725  }
2726  }
2727 
2728  //Get parameters set in base class.
2729  parList += GetBaseParametersList() ;
2730 
2731  //Get parameters set in IC class.
2732  if(!fMakeSeveralIC)parList += GetIsolationCut()->GetICParametersList() ;
2733 
2734  return new TObjString(parList) ;
2735 }
2736 
2737 //________________________________________________________
2740 //________________________________________________________
2742 {
2743  TList * outputContainer = new TList() ;
2744  outputContainer->SetName("IsolatedParticleHistos") ;
2745 
2747  Int_t nphibins = GetHistogramRanges()->GetHistoPhiBins();
2748  Int_t netabins = GetHistogramRanges()->GetHistoEtaBins();
2758  Int_t ntimebins= GetHistogramRanges()->GetHistoTimeBins();
2761 
2768 
2769  Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins();
2772  Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins();
2773  Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax();
2774  Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
2775 
2776  Int_t nptsumbins = GetHistogramRanges()->GetHistoNPtSumBins();
2779  Int_t nptinconebins = GetHistogramRanges()->GetHistoNPtInConeBins();
2780  Float_t ptinconemax = GetHistogramRanges()->GetHistoPtInConeMax();
2781  Float_t ptinconemin = GetHistogramRanges()->GetHistoPtInConeMin();
2782 
2786 
2787  // Init the number of modules, set in the class AliCalorimeterUtils
2788  //
2789  InitCaloParameters(); // See AliCaloTrackCorrBaseClass
2790 
2791  //Float_t ptthre = GetIsolationCut()->GetPtThreshold();
2792  //Float_t ptsumthre = GetIsolationCut()->GetSumPtThreshold();
2793  //Float_t ptfrac = GetIsolationCut()->GetPtFraction();
2796  Int_t particle = GetIsolationCut()->GetParticleTypeInCone() ;
2797 
2798  TString sThreshold = "";
2799  if ( method == AliIsolationCut::kSumPtIC )
2800  {
2801  sThreshold = Form(", %2.2f < #Sigma #it{p}_{T}^{in cone} < %2.2f GeV/#it{c}",
2802  GetIsolationCut()->GetSumPtThreshold(), GetIsolationCut()->GetSumPtThresholdMax());
2803  if(GetIsolationCut()->GetSumPtThresholdMax() > 200)
2804  sThreshold = Form(", #Sigma #it{p}_{T}^{in cone} = %2.2f GeV/#it{c}",
2805  GetIsolationCut()->GetSumPtThreshold());
2806  }
2807  else if ( method == AliIsolationCut::kPtThresIC)
2808  {
2809  sThreshold = Form(", %2.2f < #it{p}_{T}^{th} < %2.2f GeV/#it{c}",
2810  GetIsolationCut()->GetPtThreshold(),GetIsolationCut()->GetPtThresholdMax());
2811  if(GetIsolationCut()->GetSumPtThreshold() > 200)
2812  sThreshold = Form(", #it{p}_{T}^{th} = %2.2f GeV/#it{c}",
2813  GetIsolationCut()->GetPtThreshold());
2814  }
2815  else if ( method == AliIsolationCut::kPtFracIC)
2816  sThreshold = Form(", #Sigma #it{p}_{T}^{in cone}/#it{p}_{T}^{trig} = %2.2f" ,
2817  GetIsolationCut()->GetPtFraction());
2818 
2819  TString sParticle = ", x^{0,#pm}";
2820  if ( particle == AliIsolationCut::kOnlyNeutral ) sParticle = ", x^{0}";
2821  else if ( particle == AliIsolationCut::kOnlyCharged ) sParticle = ", x^{#pm}";
2822 
2823  TString parTitle = Form("#it{R} = %2.2f%s%s" ,GetIsolationCut()->GetConeSize(),sThreshold.Data(),sParticle.Data());
2824  TString parTitleR = Form("#it{R} = %2.2f%s" ,GetIsolationCut()->GetConeSize(),sParticle.Data());
2825  TString parTitleRCh = Form("#it{R} = %2.2f, x^{#pm}",GetIsolationCut()->GetConeSize());
2826  TString parTitleRNe = Form("#it{R} = %2.2f, x^{0}" ,GetIsolationCut()->GetConeSize());
2827 
2828  TString pileUpName[] = {"SPD","EMCAL","SPDOrEMCAL","SPDAndEMCAL","SPDAndNotEMCAL","EMCALAndNotSPD","NotSPDAndNotEMCAL"} ;
2829 
2830  // MC histograms title and name
2831  TString mcPartType[] = { "#gamma" , "#gamma_{prompt}" , "#gamma_{fragmentation}",
2832  "#pi^{0} (merged #gamma)", "#gamma_{#pi decay}" , "#gamma_{#pi decay} lost companion",
2833  "#eta (merged #gamma)" , "#gamma_{#eta decay}", "#gamma_{#eta decay} lost companion",
2834  "#gamma_{other decay}" , "e^{#pm}" , "hadrons?"} ;
2835 
2836  TString mcPartName[] = { "Photon","PhotonPrompt","PhotonFrag",
2837  "Pi0" ,"Pi0Decay" ,"Pi0DecayLostPair",
2838  "Eta" ,"EtaDecay" ,"EtaDecayLostPair",
2839  "OtherDecay","Electron","Hadron"} ;
2840 
2841  // Primary MC histograms title and name
2842  TString pptype[] = { "#gamma" , "#gamma_{#pi decay}" , "#gamma_{#eta decay}", "#gamma_{other decay}",
2843  "#gamma_{prompt}", "#gamma_{fragmentation}", "#gamma_{ISR}" ,
2844  "#pi^{0}" , "#eta"} ;
2845 
2846  TString ppname[] = { "Photon" , "PhotonPi0Decay","PhotonEtaDecay", "PhotonOtherDecay",
2847  "PhotonPrompt", "PhotonFrag" , "PhotonISR" ,
2848  "Pi0" , "Eta"} ;
2849 
2850  // Not Isolated histograms, reference histograms
2851 
2852  fhENoIso = new TH1F("hENoIso",
2853  Form("Number of not isolated leading particles vs #it{p}_{T}, %s",parTitle.Data()),
2854  nptbins,ptmin,ptmax);
2855  fhENoIso->SetYTitle("#it{counts}");
2856  fhENoIso->SetXTitle("E (GeV/#it{c})");
2857  outputContainer->Add(fhENoIso) ;
2858 
2859  fhPtNoIso = new TH1F("hPtNoIso",
2860  Form("Number of not isolated leading particles vs #it{p}_{T}, %s",parTitle.Data()),
2861  nptbins,ptmin,ptmax);
2862  fhPtNoIso->SetYTitle("#it{counts}");
2863  fhPtNoIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2864  outputContainer->Add(fhPtNoIso) ;
2865 
2867  {
2868  fhENoIsoExoTrigger = new TH1F
2869  ("hENoIsoExoTrigger",
2870  Form("Number of not isolated particles vs E, %s, exot>0.97",parTitle.Data()),
2871  nptbins,ptmin,ptmax);
2872  fhENoIsoExoTrigger->SetYTitle("d#it{N} / d#it{E}");
2873  fhENoIsoExoTrigger->SetXTitle("#it{E} (GeV/#it{c})");
2874  outputContainer->Add(fhENoIsoExoTrigger) ;
2875 
2876  fhPtNoIsoExoTrigger = new TH1F
2877  ("hPtNoIsoExoTrigger",
2878  Form("Number of not isolated particles vs #it{p}_{T}, %s, exot>0.97",parTitle.Data()),
2879  nptbins,ptmin,ptmax);
2880  fhPtNoIsoExoTrigger->SetYTitle("d#it{N} / #it{p}_{T}");
2881  fhPtNoIsoExoTrigger->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2882  outputContainer->Add(fhPtNoIsoExoTrigger) ;
2883  }
2884 
2885  fhEtaPhiNoIso = new TH2F("hEtaPhiNoIso",
2886  Form("Number of not isolated leading particles #eta vs #varphi, %s",parTitle.Data()),
2887  netabins,etamin,etamax,nphibins,phimin,phimax);
2888  fhEtaPhiNoIso->SetXTitle("#eta");
2889  fhEtaPhiNoIso->SetYTitle("#varphi (rad)");
2890  outputContainer->Add(fhEtaPhiNoIso) ;
2891 
2892  if(IsDataMC())
2893  {
2894  // For histograms in arrays, index in the array, corresponding to any particle origin
2895 
2896  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
2897  {
2898  fhPtNoIsoMC[imc] = new TH1F(Form("hPtNoIsoMC%s",mcPartName[imc].Data()),
2899  Form("#it{p}_{T} of NOT isolated %s, %s",mcPartType[imc].Data(),parTitle.Data()),
2900  nptbins,ptmin,ptmax);
2901  fhPtNoIsoMC[imc]->SetYTitle("#it{counts}");
2902  fhPtNoIsoMC[imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2903  outputContainer->Add(fhPtNoIsoMC[imc]) ;
2904 
2905  fhPtIsoMC[imc] = new TH1F(Form("hPtMC%s",mcPartName[imc].Data()),
2906  Form("#it{p}_{T} of isolated %s, %s",mcPartType[imc].Data(),parTitle.Data()),
2907  nptbins,ptmin,ptmax);
2908  fhPtIsoMC[imc]->SetYTitle("#it{counts}");
2909  fhPtIsoMC[imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2910  outputContainer->Add(fhPtIsoMC[imc]) ;
2911 
2912  fhPhiIsoMC[imc] = new TH2F(Form("hPhiMC%s",mcPartName[imc].Data()),
2913  Form("#varphi vs #it{p}_{T} of isolated %s, %s",mcPartType[imc].Data(),parTitle.Data()),
2914  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
2915  fhPhiIsoMC[imc]->SetYTitle("#varphi (rad)");
2916  fhPhiIsoMC[imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2917  outputContainer->Add(fhPhiIsoMC[imc]) ;
2918 
2919  fhEtaIsoMC[imc] = new TH2F(Form("hEtaMC%s",mcPartName[imc].Data()),
2920  Form("#eta vs #it{p}_{T} of isolated %s, %s",mcPartType[imc].Data(),parTitle.Data()),
2921  nptbins,ptmin,ptmax,netabins,etamin,etamax);
2922  fhEtaIsoMC[imc]->SetYTitle("#eta");
2923  fhEtaIsoMC[imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2924  outputContainer->Add(fhEtaIsoMC[imc]) ;
2925  }
2926  }
2927 
2928  // Histograms for tagged candidates as decay
2930  {
2931  TString isoName [] = {"NoIso","Iso"};
2932  TString isoTitle[] = {"Not isolated" ,"isolated"};
2933 
2934  for(Int_t ibit = 0; ibit < fNDecayBits; ibit++)
2935  {
2936  for(Int_t iso = 0; iso < 2; iso++)
2937  {
2938  if(fMakeSeveralIC && iso) continue;
2939  fhPtDecay[iso][ibit] =
2940  new TH1F(Form("hPtDecay%s_bit%d",isoName[iso].Data(),fDecayBits[ibit]),
2941  Form("Number of %s leading pi0 decay particles vs #it{p}_{T}, bit %d, %s",isoTitle[iso].Data(),fDecayBits[ibit],parTitle.Data()),
2942  nptbins,ptmin,ptmax);
2943  fhPtDecay[iso][ibit]->SetYTitle("#it{counts}");
2944  fhPtDecay[iso][ibit]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2945  outputContainer->Add(fhPtDecay[iso][ibit]) ;
2946 
2947  fhEtaPhiDecay[iso][ibit] =
2948  new TH2F(Form("hEtaPhiDecay%s_bit%d",isoName[iso].Data(),fDecayBits[ibit]),
2949  Form("Number of %s leading Pi0 decay particles #eta vs #varphi, bit %d, %s",isoTitle[iso].Data(),fDecayBits[ibit],parTitle.Data()),
2950  netabins,etamin,etamax,nphibins,phimin,phimax);
2951  fhEtaPhiDecay[iso][ibit]->SetXTitle("#eta");
2952  fhEtaPhiDecay[iso][ibit]->SetYTitle("#varphi (rad)");
2953  outputContainer->Add(fhEtaPhiDecay[iso][ibit]) ;
2954 
2955  if(fFillSSHisto)
2956  {
2957  fhPtLambda0Decay[iso][ibit] = new TH2F
2958  (Form("hPtLambda0Decay%s_bit%d",isoName[iso].Data(),fDecayBits[ibit]),
2959  Form("%s cluster : #it{p}_{T} vs #lambda_{0}, decay bit %d, %s",isoTitle[iso].Data(), fDecayBits[ibit], parTitle.Data()),
2960  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
2961  fhPtLambda0Decay[iso][ibit]->SetYTitle("#lambda_{0}^{2}");
2962  fhPtLambda0Decay[iso][ibit]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
2963  outputContainer->Add(fhPtLambda0Decay[iso][ibit]) ;
2964  }
2965 
2966  if(IsDataMC())
2967  {
2968  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
2969  {
2970  fhPtDecayMC[iso][ibit][imc] =
2971  new TH1F(Form("hPtDecay%s_bit%d_MC%s",isoName[iso].Data(),fDecayBits[ibit],mcPartName[imc].Data()),
2972  Form("#it{p}_{T} of %s, decay bit %d, %s, %s",isoTitle[iso].Data(),fDecayBits[ibit],mcPartType[imc].Data(),parTitle.Data()),
2973  nptbins,ptmin,ptmax);
2974  fhPtDecayMC[iso][ibit][imc]->SetYTitle("#it{counts}");
2975  fhPtDecayMC[iso][ibit][imc]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
2976  outputContainer->Add(fhPtDecayMC[iso][ibit][imc]) ;
2977  }// MC particle loop
2978  }// MC
2979  } // bit loop
2980  } //iso loop
2981  }// decay
2982 
2983  if(!fMakeSeveralIC)
2984  {
2985  TString isoName [] = {"NoIso","Iso"};
2986  TString isoTitle[] = {"Not isolated" ,"isolated"};
2987 
2988  fhEIso = new TH1F("hE",
2989  Form("Number of isolated particles vs E, %s",parTitle.Data()),
2990  nptbins,ptmin,ptmax);
2991  fhEIso->SetYTitle("d#it{N} / d#it{E}");
2992  fhEIso->SetXTitle("#it{E} (GeV/#it{c})");
2993  outputContainer->Add(fhEIso) ;
2994 
2995  fhPtIso = new TH1F("hPt",
2996  Form("Number of isolated particles vs #it{p}_{T}, %s",parTitle.Data()),
2997  nptbins,ptmin,ptmax);
2998  fhPtIso->SetYTitle("d#it{N} / #it{p}_{T}");
2999  fhPtIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3000  outputContainer->Add(fhPtIso) ;
3001 
3003  {
3004  fhEIsoExoTrigger = new TH1F
3005  ("hEIsoExoTrigger",
3006  Form("Number of isolated particles vs E, %s, exot>0.97",parTitle.Data()),
3007  nptbins,ptmin,ptmax);
3008  fhEIsoExoTrigger->SetYTitle("d#it{N} / d#it{E}");
3009  fhEIsoExoTrigger->SetXTitle("#it{E} (GeV/#it{c})");
3010  outputContainer->Add(fhEIsoExoTrigger) ;
3011 
3012  fhPtIsoExoTrigger = new TH1F
3013  ("hPtIsoExoTrigger",
3014  Form("Number of isolated particles vs #it{p}_{T}, %s, exot>0.97",parTitle.Data()),
3015  nptbins,ptmin,ptmax);
3016  fhPtIsoExoTrigger->SetYTitle("d#it{N} / #it{p}_{T}");
3017  fhPtIsoExoTrigger->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3018  outputContainer->Add(fhPtIsoExoTrigger) ;
3019  }
3020 
3021  fhPhiIso = new TH2F("hPhi",
3022  Form("Number of isolated particles vs #varphi, %s",parTitle.Data()),
3023  nptbins,ptmin,ptmax,nphibins,phimin,phimax);
3024  fhPhiIso->SetYTitle("#varphi (rad)");
3025  fhPhiIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3026  outputContainer->Add(fhPhiIso) ;
3027 
3028  fhEtaIso = new TH2F("hEta",
3029  Form("Number of isolated particles vs #eta, %s",parTitle.Data()),
3030  nptbins,ptmin,ptmax,netabins,etamin,etamax);
3031  fhEtaIso->SetYTitle("#eta");
3032  fhEtaIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3033  outputContainer->Add(fhEtaIso) ;
3034 
3035  fhEtaPhiIso = new TH2F("hEtaPhiIso",
3036  Form("Number of isolated particles #eta vs #varphi, %s",parTitle.Data()),
3037  netabins,etamin,etamax,nphibins,phimin,phimax);
3038  fhEtaPhiIso->SetXTitle("#eta");
3039  fhEtaPhiIso->SetYTitle("#varphi (rad)");
3040  outputContainer->Add(fhEtaPhiIso) ;
3041 
3043  {
3044  fhPtCentralityIso = new TH2F("hPtCentrality",
3045  Form("centrality vs #it{p}_{T} for isolated particles, %s",parTitle.Data()),
3046  nptbins,ptmin,ptmax, 100,0,100);
3047  fhPtCentralityIso->SetYTitle("centrality");
3048  fhPtCentralityIso->SetXTitle("#it{p}_{T}(GeV/#it{c})");
3049  outputContainer->Add(fhPtCentralityIso) ;
3050 
3051  fhPtEventPlaneIso = new TH2F("hPtEventPlane",
3052  Form("event plane angle vs #it{p}_{T} for isolated particles, %s",parTitle.Data()),
3053  nptbins,ptmin,ptmax, 100,0,TMath::Pi());
3054  fhPtEventPlaneIso->SetYTitle("Event plane angle (rad)");
3055  fhPtEventPlaneIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3056  outputContainer->Add(fhPtEventPlaneIso) ;
3057  }
3058 
3059  if(fFillNLMHistograms)
3060  {
3061  fhPtNLocMaxIso = new TH2F("hPtNLocMax",
3062  Form("Number of isolated particles vs #it{p}_{T}, %s",parTitle.Data()),
3063  nptbins,ptmin,ptmax,10,0,10);
3064  fhPtNLocMaxIso->SetYTitle("#it{NLM}");
3065  fhPtNLocMaxIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3066 
3067  fhPtNLocMaxNoIso = new TH2F("hPtNLocMaxNoIso",
3068  Form("Number of not isolated particles vs #it{p}_{T}, %s",parTitle.Data()),
3069  nptbins,ptmin,ptmax,10,0,10);
3070  fhPtNLocMaxNoIso->SetYTitle("#it{NLM}");
3071  fhPtNLocMaxNoIso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3072  outputContainer->Add(fhPtNLocMaxNoIso) ;
3073  }
3074 
3075  fhConePtLead = new TH2F("hConePtLead",
3076  Form("Track or Cluster leading #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3077  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
3078  fhConePtLead->SetYTitle("#it{p}_{T, leading} (GeV/#it{c})");
3079  fhConePtLead->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3080  outputContainer->Add(fhConePtLead) ;
3081 
3082  fhConeSumPt = new TH2F
3083  ("hConePtSum",
3084  Form("Track and Cluster #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3085  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3086  fhConeSumPt->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3087  fhConeSumPt->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3088  outputContainer->Add(fhConeSumPt) ;
3089 
3091  {
3093  ("hConePtSumExoTrigger",
3094  Form("#Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, exo trigger",r),
3095  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3096  fhConeSumPtExoTrigger->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3097  fhConeSumPtExoTrigger->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3098  outputContainer->Add(fhConeSumPtExoTrigger) ;
3099  }
3100 
3101 // fhPtLambda0Eiso = new TH3F
3102 // (Form("hPtLambda0Eiso"),
3103 // 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.);
3104 // fhPtLambda0Eiso->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3105 // fhPtLambda0Eiso->SetYTitle("#lambda_{0}^{2}");
3106 // fhPtLambda0Eiso->SetZTitle("E_{T}^{iso} (GeV/#it{c})");
3107 // outputContainer->Add(fhPtLambda0Eiso) ;
3108 
3109  fhConeSumPtTrigEtaPhi = new TH2F("hConePtSumTrigEtaPhi",
3110  Form("Trigger #eta vs #varphi, #Sigma #it{p}_{T} in isolation cone for %s",parTitleR.Data()),
3111  netabins,etamin,etamax,nphibins,phimin,phimax);
3112  fhConeSumPtTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3113  fhConeSumPtTrigEtaPhi->SetXTitle("#eta_{trigger}");
3114  fhConeSumPtTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
3115  outputContainer->Add(fhConeSumPtTrigEtaPhi) ;
3116 
3117  fhPtInCone = new TH2F("hPtInCone",
3118  Form("#it{p}_{T} of clusters and tracks in isolation cone for %s",parTitleR.Data()),
3119  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3120  fhPtInCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3121  fhPtInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3122  outputContainer->Add(fhPtInCone) ;
3123 
3125  {
3126  fhPtInConeExoTrigger = new TH2F("hPtInConeExoTrigger",
3127  Form("#it{p}_{T} in isolation cone for %s, exotic trigger",parTitleR.Data()),
3128  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3129  fhPtInConeExoTrigger->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3130  fhPtInConeExoTrigger->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3131  outputContainer->Add(fhPtInConeExoTrigger) ;
3132  }
3133 
3135  {
3136  fhPtLeadConeBin = new TH1F*[fNBkgBin];
3137  fhSumPtConeBin = new TH1F*[fNBkgBin];
3138  if(fFillSSHisto)
3139  {
3142  }
3143 
3145  {
3148  }
3149 
3150  if(IsDataMC())
3151  {
3152  fhPtLeadConeBinMC = new TH1F*[fNBkgBin*fgkNmcTypes];
3153  fhSumPtConeBinMC = new TH1F*[fNBkgBin*fgkNmcTypes];
3154 
3155  if(fFillSSHisto)
3156  {
3159  }
3160  }
3161 
3162  for(Int_t ibin = 0; ibin < fNBkgBin; ibin++)
3163  {
3164  fhPtLeadConeBin[ibin] = new TH1F
3165  (Form("hPtLeadCone_Bin%d",ibin),
3166  Form("cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, %s",
3167  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax);
3168  fhPtLeadConeBin[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
3169  fhPtLeadConeBin[ibin]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3170  outputContainer->Add(fhPtLeadConeBin[ibin]) ;
3171 
3172  fhSumPtConeBin[ibin] = new TH1F
3173  (Form("hSumPtCone_Bin%d",ibin),
3174  Form("in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, %s",
3175  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax);
3176  fhSumPtConeBin[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
3177  fhSumPtConeBin[ibin]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3178  outputContainer->Add(fhSumPtConeBin[ibin]) ;
3179 
3181  {
3182  for(Int_t idecay = 0; idecay < fNDecayBits; idecay++)
3183  {
3184  Int_t bindecay = ibin+idecay*fNBkgBin;
3185 
3186  fhPtLeadConeBinDecay[bindecay] = new TH1F
3187  (Form("hPtLeadCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
3188  Form("Decay bit %d, cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, %s",
3189  fDecayBits[idecay],fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax);
3190  fhPtLeadConeBinDecay[bindecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
3191  fhPtLeadConeBinDecay[bindecay]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3192  outputContainer->Add(fhPtLeadConeBinDecay[bindecay]) ;
3193 
3194  fhSumPtConeBinDecay[bindecay] = new TH1F
3195  (Form("hSumPtCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
3196  Form("Decay bit %d, in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, %s",
3197  fDecayBits[idecay],fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax);
3198  fhSumPtConeBinDecay[bindecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
3199  fhSumPtConeBinDecay[bindecay]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3200  outputContainer->Add(fhSumPtConeBinDecay[bindecay]) ;
3201  }
3202  }
3203 
3204  if(IsDataMC())
3205  {
3206  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
3207  {
3208  Int_t binmc = ibin+imc*fNBkgBin;
3209  fhPtLeadConeBinMC[binmc] = new TH1F
3210  (Form("hPtLeadCone_Bin%d_MC%s",ibin, mcPartName[imc].Data()),
3211  Form("in cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, MC %s, %s",
3212  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),nptbins,ptmin,ptmax);
3213  fhPtLeadConeBinMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
3214  fhPtLeadConeBinMC[binmc]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3215  outputContainer->Add(fhPtLeadConeBinMC[binmc]) ;
3216 
3217  fhSumPtConeBinMC[binmc] = new TH1F
3218  (Form("hSumPtCone_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
3219  Form("in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, MC %s, %s",
3220  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),nptbins,ptmin,ptmax);
3221  fhSumPtConeBinMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
3222  fhSumPtConeBinMC[binmc]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3223  outputContainer->Add(fhSumPtConeBinMC[binmc]) ;
3224  } // MC particle loop
3225  }
3226 
3227  if(fFillSSHisto)
3228  {
3229  fhPtLeadConeBinLambda0[ibin] = new TH2F
3230  (Form("hPtLeadConeLambda0_Bin%d",ibin),
3231  Form("#lambda_{0}, in cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, %s",
3232  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3233  fhPtLeadConeBinLambda0[ibin]->SetYTitle("#lambda_{0}^{2}");
3234  fhPtLeadConeBinLambda0[ibin]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3235  outputContainer->Add(fhPtLeadConeBinLambda0[ibin]) ;
3236 
3237  fhSumPtConeBinLambda0[ibin] = new TH2F
3238  (Form("hSumPtConeLambda0_Bin%d",ibin),
3239  Form("#lambda_{0}, in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, %s",
3240  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3241  fhSumPtConeBinLambda0[ibin]->SetYTitle("#lambda_{0}^{2}");
3242  fhSumPtConeBinLambda0[ibin]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3243  outputContainer->Add(fhSumPtConeBinLambda0[ibin]) ;
3244 
3245  if(IsDataMC())
3246  {
3247  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
3248  {
3249  Int_t binmc = ibin+imc*fNBkgBin;
3250  fhPtLeadConeBinLambda0MC[binmc] = new TH2F
3251  (Form("hPtLeadConeLambda0_Bin%d_MC%s",ibin, mcPartName[imc].Data()),
3252  Form("#lambda_{0}, in cone %2.2f<#it{p}_{T}^{leading}<%2.2f GeV/#it{c}, MC %s, %s",
3253  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3254  fhPtLeadConeBinLambda0MC[binmc]->SetYTitle("#lambda_{0}^{2}");
3255  fhPtLeadConeBinLambda0MC[binmc]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3256  outputContainer->Add(fhPtLeadConeBinLambda0MC[binmc]) ;
3257 
3258  fhSumPtConeBinLambda0MC[binmc] = new TH2F
3259  (Form("hSumPtConeLambda0_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
3260  Form("#lambda_{0}, in cone %2.2f <#Sigma #it{p}_{T}< %2.2f GeV/#it{c}, MC %s, %s",
3261  fBkgBinLimit[ibin],fBkgBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3262  fhSumPtConeBinLambda0MC[binmc]->SetYTitle("#lambda_{0}^{2}");
3263  fhSumPtConeBinLambda0MC[binmc]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3264  outputContainer->Add(fhSumPtConeBinLambda0MC[binmc]) ;
3265  } // MC particle loop
3266  }
3267  } // shower shape on
3268  } // pt in cone bin loop
3269  } // bkg cone pt bin histograms
3270 
3272  {
3273  fhPtTrigBinPtLeadCone = new TH1F*[fNPtTrigBin];
3274  fhPtTrigBinSumPtCone = new TH1F*[fNPtTrigBin];
3275 
3278 
3279  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3280  {
3283 
3286  }
3287 
3288  if(IsDataMC())
3289  {
3292  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3293  {
3296  }
3297  }
3298 
3299  if(fFillSSHisto)
3300  {
3303  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3304  {
3307  }
3308 
3309  if(IsDataMC())
3310  {
3313  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3314  {
3317  }
3318 
3320  {
3323  if ( GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3324  {
3329  }
3330  }
3331  }
3332  }
3333 
3334  for(Int_t ibin = 0; ibin < fNPtTrigBin; ibin++)
3335  {
3336  fhPtTrigBinPtLeadCone[ibin] = new TH1F
3337  (Form("hPtTrigBin_PtLeadCone_Bin%d",ibin),
3338  Form("#it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, %s",
3339  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax);
3340  fhPtTrigBinPtLeadCone[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
3341  fhPtTrigBinPtLeadCone[ibin]->SetXTitle("#it{p}_{T}^{in cone} (GeV/#it{c})");
3342  outputContainer->Add(fhPtTrigBinPtLeadCone[ibin]) ;
3343 
3344  fhPtTrigBinSumPtCone[ibin] = new TH1F
3345  (Form("hPtTrigBin_SumPtCone_Bin%d",ibin),
3346  Form("#Sigma #it{p}_{T}^{in cone} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3347  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleR.Data()),nptsumbins,ptsummin,ptsummax);
3348  fhPtTrigBinSumPtCone[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
3349  fhPtTrigBinSumPtCone[ibin]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
3350  outputContainer->Add(fhPtTrigBinSumPtCone[ibin]) ;
3351 
3352  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3353  {
3354  fhPtTrigBinSumPtTrackCone[ibin] = new TH1F
3355  (Form("hPtTrigBin_SumPtTrackCone_Bin%d",ibin),
3356  Form("#Sigma #it{p}_{T}^{in cone}_{track} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3357  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleRCh.Data()),nptsumbins,ptsummin,ptsummax);
3358  fhPtTrigBinSumPtTrackCone[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
3359  fhPtTrigBinSumPtTrackCone[ibin]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{track} (GeV/#it{c})");
3360  outputContainer->Add(fhPtTrigBinSumPtTrackCone[ibin]) ;
3361 
3362  fhPtTrigBinSumPtClusterCone[ibin] = new TH1F
3363  (Form("hPtTrigBin_SumPtClusterCone_Bin%d",ibin),
3364  Form("#Sigma #it{p}_{T}^{in cone}_{cluster} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3365  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleRNe.Data()),nptsumbins,ptsummin,ptsummax);
3366  fhPtTrigBinSumPtClusterCone[ibin]->SetYTitle("d #it{N} / d #it{p}_{T}");
3367  fhPtTrigBinSumPtClusterCone[ibin]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{cluster} (GeV/#it{c})");
3368  outputContainer->Add(fhPtTrigBinSumPtClusterCone[ibin]) ;
3369  }
3370 
3372  {
3373  for(Int_t idecay = 0; idecay < fNDecayBits; idecay++)
3374  {
3375  Int_t binDecay = ibin+idecay*fNPtTrigBin;
3376 
3377  fhPtTrigBinPtLeadConeDecay[binDecay] = new TH1F
3378  (Form("hPtTrigBin_PtLeadCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
3379  Form("Decay bit %d, #it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, %s",
3380  fDecayBits[idecay],fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax);
3381  fhPtTrigBinPtLeadConeDecay[binDecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
3382  fhPtTrigBinPtLeadConeDecay[binDecay]->SetXTitle("#it{p}_{T}^{lead in cone} (GeV/#it{c})");
3383  outputContainer->Add(fhPtTrigBinPtLeadConeDecay[binDecay]) ;
3384 
3385  fhPtTrigBinSumPtConeDecay[binDecay] = new TH1F
3386  (Form("hPtTrigBin_SumPtCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
3387  Form("Decay bit %d, #Sigma #it{p}_{T}^{in cone} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3388  fDecayBits[idecay],fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleR.Data()),nptsumbins,ptsummin,ptsummax);
3389  fhPtTrigBinSumPtConeDecay[binDecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
3390  fhPtTrigBinSumPtConeDecay[binDecay]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
3391  outputContainer->Add(fhPtTrigBinSumPtConeDecay[binDecay]) ;
3392 
3393  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3394  {
3395  fhPtTrigBinSumPtTrackConeDecay[binDecay] = new TH1F
3396  (Form("hPtTrigBin_SumPtTrackCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
3397  Form("Decay bit %d, #Sigma #it{p}_{T}^{in cone}_{track} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3398  fDecayBits[idecay],fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleRCh.Data()),nptsumbins,ptsummin,ptsummax);
3399  fhPtTrigBinSumPtTrackConeDecay[binDecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
3400  fhPtTrigBinSumPtTrackConeDecay[binDecay]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{track} (GeV/#it{c})");
3401  outputContainer->Add(fhPtTrigBinSumPtTrackConeDecay[binDecay]) ;
3402 
3403  fhPtTrigBinSumPtClusterConeDecay[binDecay] = new TH1F
3404  (Form("hPtTrigBin_SumPtClusterCone_Bin%d_DecayBit%d",ibin,fDecayBits[idecay]),
3405  Form("Decay bit %d, #Sigma #it{p}_{T}^{in cone}_{cluster} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3406  fDecayBits[idecay],fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleRNe.Data()),nptsumbins,ptsummin,ptsummax);
3407  fhPtTrigBinSumPtClusterConeDecay[binDecay]->SetYTitle("d #it{N} / d #it{p}_{T}");
3408  fhPtTrigBinSumPtClusterConeDecay[binDecay]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{cluster} (GeV/#it{c})");
3409  outputContainer->Add(fhPtTrigBinSumPtClusterConeDecay[binDecay]) ;
3410  }
3411  }
3412  }
3413 
3414  if(IsDataMC())
3415  {
3416  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
3417  {
3418  Int_t binmc = ibin+imc*fNPtTrigBin;
3419  fhPtTrigBinPtLeadConeMC[binmc] = new TH1F
3420  (Form("hPtTrigBin_PtLeadCone_Bin%d_MC%s",ibin, mcPartName[imc].Data()),
3421  Form("#it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, MC %s, %s",
3422  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),nptbins,ptmin,ptmax);
3423  fhPtTrigBinPtLeadConeMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
3424  fhPtTrigBinPtLeadConeMC[binmc]->SetXTitle("#it{p}_{T}^{lead in cone} (GeV/#it{c})");
3425  outputContainer->Add(fhPtTrigBinPtLeadConeMC[binmc]) ;
3426 
3427  fhPtTrigBinSumPtConeMC[binmc] = new TH1F
3428  (Form("hPtTrigBin_SumPtCone_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
3429  Form("#Sigma #it{p}_{T}^{in cone}, %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, MC %s, %s",
3430  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),nptsumbins,ptsummin,ptsummax);
3431  fhPtTrigBinSumPtConeMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
3432  fhPtTrigBinSumPtConeMC[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
3433  outputContainer->Add(fhPtTrigBinSumPtConeMC[binmc]) ;
3434 
3435  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3436  {
3437  fhPtTrigBinSumPtTrackConeMC[binmc] = new TH1F
3438  (Form("hPtTrigBin_SumPtTrackCone_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
3439  Form("#Sigma #it{p}_{T}^{in cone}_{track}, %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, MC %s, %s",
3440  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleRCh.Data()),nptsumbins,ptsummin,ptsummax);
3441  fhPtTrigBinSumPtTrackConeMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
3442  fhPtTrigBinSumPtTrackConeMC[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{track} (GeV/#it{c})");
3443  outputContainer->Add(fhPtTrigBinSumPtTrackConeMC[binmc]) ;
3444 
3445  fhPtTrigBinSumPtClusterConeMC[binmc] = new TH1F
3446  (Form("hPtTrigBin_SumPtClusterCone_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
3447  Form("#Sigma #it{p}_{T}^{in cone}_{cluster}, %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, MC %s, %s",
3448  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleRNe.Data()),nptsumbins,ptsummin,ptsummax);
3449  fhPtTrigBinSumPtClusterConeMC[binmc]->SetYTitle("d #it{N} / d #it{p}_{T}");
3450  fhPtTrigBinSumPtClusterConeMC[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
3451  outputContainer->Add(fhPtTrigBinSumPtClusterConeMC[binmc]) ;
3452  }
3453  } // MC particle loop
3454  } // MC
3455 
3456  if(fFillSSHisto)
3457  {
3459  (Form("hPtTrigBin_PtLeadConeVSLambda0_Bin%d",ibin),
3460  Form("#lambda_{0} vs #it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, %s",
3461  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleR.Data()),nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3462  fhPtTrigBinLambda0vsPtLeadCone[ibin]->SetYTitle("#lambda_{0}^{2}");
3463  fhPtTrigBinLambda0vsPtLeadCone[ibin]->SetXTitle("#it{p}_{T}^{lead in cone} (GeV/#it{c})");
3464  outputContainer->Add(fhPtTrigBinLambda0vsPtLeadCone[ibin]) ;
3465 
3467  (Form("hPtTrigBin_SumPtConeVSLambda0_Bin%d",ibin),
3468  Form("#lambda_{0} vs #Sigma #it{p}_{T}^{in cone} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3469  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleR.Data()),nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3470  fhPtTrigBinLambda0vsSumPtCone[ibin]->SetYTitle("#lambda_{0}^{2}");
3471  fhPtTrigBinLambda0vsSumPtCone[ibin]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
3472  outputContainer->Add(fhPtTrigBinLambda0vsSumPtCone[ibin]) ;
3473 
3474  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3475  {
3477  (Form("hPtTrigBin_SumPtTrackConeVSLambda0_Bin%d",ibin),
3478  Form("#lambda_{0} vs #Sigma #it{p}_{T}^{in cone}_{track} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3479  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleRCh.Data()),nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3480  fhPtTrigBinLambda0vsSumPtTrackCone[ibin]->SetYTitle("#lambda_{0}^{2}");
3481  fhPtTrigBinLambda0vsSumPtTrackCone[ibin]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{track} (GeV/#it{c})");
3482  outputContainer->Add(fhPtTrigBinLambda0vsSumPtTrackCone[ibin]) ;
3483 
3485  (Form("hPtTrigBin_SumPtClusterConeVSLambda0_Bin%d",ibin),
3486  Form("#lambda_{0} vs #Sigma #it{p}_{T}^{in cone}_{cluster} %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, %s",
3487  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], parTitleRNe.Data()),nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3488  fhPtTrigBinLambda0vsSumPtClusterCone[ibin]->SetYTitle("#lambda_{0}^{2}");
3489  fhPtTrigBinLambda0vsSumPtClusterCone[ibin]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{cluster} (GeV/#it{c})");
3490  outputContainer->Add(fhPtTrigBinLambda0vsSumPtClusterCone[ibin]) ;
3491  }
3492 
3493  if(IsDataMC())
3494  {
3495  for(Int_t imc = 0; imc < fgkNmcTypes; imc++)
3496  {
3497  Int_t binmc = ibin+imc*fNPtTrigBin;
3499  (Form("hPtTrigBin_PtLeadConeVSLambda0_Bin%d_MC%s",ibin, mcPartName[imc].Data()),
3500  Form("#lambda_{0} vs #it{p}_{T}^{lead. in cone}, %2.2f<#it{p}_{T}^{cand}<%2.2f GeV/#it{c}, MC %s, %s",
3501  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),
3502  nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
3503  fhPtTrigBinLambda0vsPtLeadConeMC[binmc]->SetYTitle("#lambda_{0}^{2}");
3504  fhPtTrigBinLambda0vsPtLeadConeMC[binmc]->SetXTitle("#it{p}_{T}^{lead in cone} (GeV/#it{c})");
3505  outputContainer->Add(fhPtTrigBinLambda0vsPtLeadConeMC[binmc]) ;
3506 
3508  (Form("hPtTrigBin_SumPtConeVSLambda0_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
3509  Form("#lambda_{0} vs #Sigma #it{p}_{T}^{in cone}, %2.2f <#it{p}_{T}^{cand}< %2.2f GeV/#it{c}, MC %s, %s",
3510  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),
3511  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3512  fhPtTrigBinLambda0vsSumPtConeMC[binmc]->SetYTitle("#lambda_{0}^{2}");
3513  fhPtTrigBinLambda0vsSumPtConeMC[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
3514  outputContainer->Add(fhPtTrigBinLambda0vsSumPtConeMC[binmc]) ;
3515 
3516  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3517  {
3519  (Form("hPtTrigBin_SumPtTrackConeVSLambda0_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
3520  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",
3521  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleRCh.Data()),
3522  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3523  fhPtTrigBinLambda0vsSumPtTrackConeMC[binmc]->SetYTitle("#lambda_{0}^{2}");
3524  fhPtTrigBinLambda0vsSumPtTrackConeMC[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{track} (GeV/#it{c})");
3525  outputContainer->Add(fhPtTrigBinLambda0vsSumPtTrackConeMC[binmc]) ;
3526 
3528  (Form("hPtTrigBin_SumPtClusterConeVSLambda0_Bin%d_MC%s",ibin,mcPartName[imc].Data()),
3529  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",
3530  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleRNe.Data()),
3531  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3532  fhPtTrigBinLambda0vsSumPtClusterConeMC[binmc]->SetYTitle("#lambda_{0}^{2}");
3533  fhPtTrigBinLambda0vsSumPtClusterConeMC[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{cluster} (GeV/#it{c})");
3534  outputContainer->Add(fhPtTrigBinLambda0vsSumPtClusterConeMC[binmc]) ;
3535  }
3536 
3538  {
3540  (Form("hPtTrigBin_SumPtConeVSLambda0_Bin%d_MC_NoOverlap%s",ibin,mcPartName[imc].Data()),
3541  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",
3542  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),
3543  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3544  fhPtTrigBinLambda0vsSumPtConeMCNoOverlap[binmc]->SetYTitle("#lambda_{0}^{2}");
3545  fhPtTrigBinLambda0vsSumPtConeMCNoOverlap[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
3546  outputContainer->Add(fhPtTrigBinLambda0vsSumPtConeMCNoOverlap[binmc]) ;
3547 
3549  (Form("hPtTrigBin_SumPtConeVSLambda0_Bin%d_MC_1Overlap%s",ibin,mcPartName[imc].Data()),
3550  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",
3551  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleR.Data()),
3552  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3553  fhPtTrigBinLambda0vsSumPtConeMC1Overlap[binmc]->SetYTitle("#lambda_{0}^{2}");
3554  fhPtTrigBinLambda0vsSumPtConeMC1Overlap[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone} (GeV/#it{c})");
3555  outputContainer->Add(fhPtTrigBinLambda0vsSumPtConeMC1Overlap[binmc]) ;
3556 
3557  if(GetIsolationCut()->GetParticleTypeInCone()==AliIsolationCut::kNeutralAndCharged )
3558  {
3560  (Form("hPtTrigBin_SumPtTrackConeVSLambda0_Bin%d_MC_NoOverlap%s",ibin,mcPartName[imc].Data()),
3561  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",
3562  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleRCh.Data()),
3563  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3564  fhPtTrigBinLambda0vsSumPtTrackConeMCNoOverlap[binmc]->SetYTitle("#lambda_{0}^{2}");
3565  fhPtTrigBinLambda0vsSumPtTrackConeMCNoOverlap[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{track} (GeV/#it{c})");
3566  outputContainer->Add(fhPtTrigBinLambda0vsSumPtTrackConeMCNoOverlap[binmc]) ;
3567 
3569  (Form("hPtTrigBin_SumPtClusterConeVSLambda0_Bin%d_MC_NoOverlap%s",ibin,mcPartName[imc].Data()),
3570  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",
3571  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleRNe.Data()),
3572  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3573  fhPtTrigBinLambda0vsSumPtClusterConeMCNoOverlap[binmc]->SetYTitle("#lambda_{0}^{2}");
3574  fhPtTrigBinLambda0vsSumPtClusterConeMCNoOverlap[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{cluster} (GeV/#it{c})");
3575  outputContainer->Add(fhPtTrigBinLambda0vsSumPtClusterConeMCNoOverlap[binmc]) ;
3576 
3578  (Form("hPtTrigBin_SumPtTrackConeVSLambda0_Bin%d_MC_1Overlap%s",ibin,mcPartName[imc].Data()),
3579  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",
3580  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleRCh.Data()),
3581  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3582  fhPtTrigBinLambda0vsSumPtTrackConeMC1Overlap[binmc]->SetYTitle("#lambda_{0}^{2}");
3583  fhPtTrigBinLambda0vsSumPtTrackConeMC1Overlap[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{track} (GeV/#it{c})");
3584  outputContainer->Add(fhPtTrigBinLambda0vsSumPtTrackConeMC1Overlap[binmc]) ;
3585 
3587  (Form("hPtTrigBin_SumPtClusterConeVSLambda0_Bin%d_MC_1Overlap%s",ibin,mcPartName[imc].Data()),
3588  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",
3589  fPtTrigBinLimit[ibin],fPtTrigBinLimit[ibin+1], mcPartType[imc].Data(), parTitleRNe.Data()),
3590  nptsumbins,ptsummin,ptsummax,ssbins,ssmin,ssmax);
3591  fhPtTrigBinLambda0vsSumPtClusterConeMC1Overlap[binmc]->SetYTitle("#lambda_{0}^{2}");
3592  fhPtTrigBinLambda0vsSumPtClusterConeMC1Overlap[binmc]->SetXTitle("#Sigma #it{p}_{T}^{in cone}_{cluster} (GeV/#it{c})");
3593  outputContainer->Add(fhPtTrigBinLambda0vsSumPtClusterConeMC1Overlap[binmc]) ;
3594 
3595  }
3596  } // Overlap histograms
3597  } // MC particle loop
3598  } // MC
3599  } // SS histo
3600  } // pt trig bin loop
3601  } // pt trig bin histograms
3602 
3604  {
3605  fhPtInConeCent = new TH2F("hPtInConeCent",
3606  Form("#it{p}_{T} in isolation cone for %s",parTitleR.Data()),
3607  100,0,100,nptinconebins,ptinconemin,ptinconemax);
3608  fhPtInConeCent->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3609  fhPtInConeCent->SetXTitle("centrality");
3610  outputContainer->Add(fhPtInConeCent) ;
3611  }
3612 
3613  // Cluster only histograms
3614  if(GetIsolationCut()->GetParticleTypeInCone()!=AliIsolationCut::kOnlyCharged)
3615  {
3616  fhConeSumPtCluster = new TH2F
3617  ("hConePtSumCluster",
3618  Form("Cluster #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3619  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3620  fhConeSumPtCluster->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3621  fhConeSumPtCluster->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3622  outputContainer->Add(fhConeSumPtCluster) ;
3623 
3625  {
3627  ("hConePtSumClusterExoTrigger",
3628  Form("Cluster #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, exo trigger",r),
3629  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3630  fhConeSumPtClusterExoTrigger->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3631  fhConeSumPtClusterExoTrigger->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3632  outputContainer->Add(fhConeSumPtClusterExoTrigger) ;
3633  }
3634 
3635  if(fStudyPtCutInCone)
3636  {
3638  ("hConeNClusterPerMinPtCut",
3639  Form("N clusters, different min #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f",r),
3640  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nmultbin,multmin,multmax);
3641  fhConeNClusterPerMinPtCut->SetYTitle("#it{N}^{cluster}");
3642  fhConeNClusterPerMinPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
3643  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
3644  fhConeNClusterPerMinPtCut->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fMinPtCutInCone[i-1]));
3645  outputContainer->Add(fhConeNClusterPerMinPtCut) ;
3646 
3648  ("hConeNClusterPerMinPtCutLargePtTrig",
3649  Form("N cluster, different min #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f, #it{p}_{T}^{trig} > 10 GeV",r),
3650  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nmultbin,multmin,multmax);
3651  fhConeNClusterPerMinPtCutLargePtTrig->SetYTitle("#it{N}^{cluster}");
3652  fhConeNClusterPerMinPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
3653  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
3654  fhConeNClusterPerMinPtCutLargePtTrig->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fMinPtCutInCone[i-1]));
3655  outputContainer->Add(fhConeNClusterPerMinPtCutLargePtTrig) ;
3656 
3658  ("hConePtSumClusterPerMinPtCut",
3659  Form("Cluster #Sigma #it{p}_{T}, different min #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f",r),
3660  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nptsumbins,ptsummin,ptsummax);
3661  fhConeSumPtClusterPerMinPtCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3662  fhConeSumPtClusterPerMinPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
3663  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
3664  fhConeSumPtClusterPerMinPtCut->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fMinPtCutInCone[i-1]));
3665  outputContainer->Add(fhConeSumPtClusterPerMinPtCut) ;
3666 
3668  ("hConePtSumClusterPerMinPtCutLargePtTrig",
3669  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),
3670  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nptsumbins,ptsummin,ptsummax);
3671  fhConeSumPtClusterPerMinPtCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3672  fhConeSumPtClusterPerMinPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
3673  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
3674  fhConeSumPtClusterPerMinPtCutLargePtTrig->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fMinPtCutInCone[i-1]));
3675  outputContainer->Add(fhConeSumPtClusterPerMinPtCutLargePtTrig) ;
3676 
3677 
3679  ("hConePtSumClusterPerMaxPtCut",
3680  Form("Cluster #Sigma #it{p}_{T}, different max #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f",r),
3681  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nptsumbins,ptsummin,ptsummax);
3682  fhConeSumPtClusterPerMaxPtCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3683  fhConeSumPtClusterPerMaxPtCut->SetXTitle("#it{p}_{T, max} (GeV/#it{c})");
3684  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
3685  fhConeSumPtClusterPerMaxPtCut->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fMaxPtCutInCone[i-1]));
3686  outputContainer->Add(fhConeSumPtClusterPerMaxPtCut) ;
3687 
3689  ("hConePtSumClusterPerMaxPtCutLargePtTrig",
3690  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),
3691  fNPtCutsInCone,-0.5,fNPtCutsInCone-0.5,nptsumbins,ptsummin,ptsummax);
3692  fhConeSumPtClusterPerMaxPtCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3693  fhConeSumPtClusterPerMaxPtCutLargePtTrig->SetXTitle("#it{p}_{T, max} (GeV/#it{c})");
3694  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
3695  fhConeSumPtClusterPerMaxPtCutLargePtTrig->GetXaxis()->SetBinLabel(i ,Form("%2.1f",fMaxPtCutInCone[i-1]));
3696  outputContainer->Add(fhConeSumPtClusterPerMaxPtCutLargePtTrig) ;
3697  }
3698 
3699  if(fStudyRCutInCone)
3700  {
3702  ("hConePtSumClusterPerRCut","Cluster #Sigma #it{p}_{T}, different #it{R} cuts",
3703  fNRCutsInCone,0.5,fNRCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
3704  fhConeSumPtClusterPerRCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3705  fhConeSumPtClusterPerRCut->SetXTitle("#it{R}");
3706  for(Int_t i = 1; i <= fNRCutsInCone; i++)
3707  fhConeSumPtClusterPerRCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fRCutInCone[i-1]));
3708  outputContainer->Add(fhConeSumPtClusterPerRCut) ;
3709 
3711  ("hConePtSumClusterPerRCutLargePtTrig","Cluster #Sigma #it{p}_{T}, different #it{R} cuts, #it{p}_{T}^{trig} > 10 GeV",
3712  fNRCutsInCone,0.5,fNRCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
3713  fhConeSumPtClusterPerRCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3714  fhConeSumPtClusterPerRCutLargePtTrig->SetXTitle("#it{R}");
3715  for(Int_t i = 1; i <= fNRCutsInCone; i++)
3716  fhConeSumPtClusterPerRCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fRCutInCone[i-1]));
3717  outputContainer->Add(fhConeSumPtClusterPerRCutLargePtTrig) ;
3718 
3720  ("hPtClusterInConePerRCut","Cluster #it{p}_{T}, different #it{R} cuts",
3721  fNRCutsInCone,0.5,fNRCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
3722  fhPtClusterInConePerRCut->SetYTitle("#it{p}_{T}^{cluster} (GeV/#it{c})");
3723  fhPtClusterInConePerRCut->SetXTitle("#it{R}");
3724  for(Int_t i = 1; i <= fNRCutsInCone; i++)
3725  fhPtClusterInConePerRCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fRCutInCone[i-1]));
3726  outputContainer->Add(fhPtClusterInConePerRCut) ;
3727 
3729  ("hPtClusterInConePerRCutLargePtTrig","Cluster #it{p}_{T}, different #it{R} cuts, #it{p}_{T}^{trig} > 10 GeV",
3730  fNRCutsInCone,0.5,fNRCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
3731  fhPtClusterInConePerRCutLargePtTrig->SetYTitle("#it{p}_{T}^{cluster} (GeV/#it{c})");
3732  fhPtClusterInConePerRCutLargePtTrig->SetXTitle("#it{R}");
3733  for(Int_t i = 1; i <= fNRCutsInCone; i++)
3734  fhPtClusterInConePerRCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fRCutInCone[i-1]));
3735  outputContainer->Add(fhPtClusterInConePerRCutLargePtTrig) ;
3736  }
3737 
3739  {
3741  ("hConePtSumClusterPerNCellCut","Cluster #Sigma #it{p}_{T}, different #it{N}_{cell} cuts",
3742  fNNCellsInCandidate,0.5,fNNCellsInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
3743  fhConeSumPtClusterPerNCellCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3744  fhConeSumPtClusterPerNCellCut->SetXTitle("#it{N}_{cell}^{min}");
3745  for(Int_t i = 1; i <= fNNCellsInCandidate; i++)
3746  fhConeSumPtClusterPerNCellCut->GetXaxis()->SetBinLabel(i, Form("%d",fNCellsInCandidate[i-1]));
3747  outputContainer->Add(fhConeSumPtClusterPerNCellCut) ;
3748 
3750  ("hConePtSumClusterPerNCellCutLargePtTrig","Cluster #Sigma #it{p}_{T}, different #it{N}_{cell} cuts, #it{p}_{T}^{trig} > 10 GeV",
3751  fNNCellsInCandidate,0.5,fNNCellsInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
3752  fhConeSumPtClusterPerNCellCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3753  fhConeSumPtClusterPerNCellCutLargePtTrig->SetXTitle("#it{N}_{cell}^{min}");
3754  for(Int_t i = 1; i <= fNNCellsInCandidate; i++)
3755  fhConeSumPtClusterPerNCellCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%d",fNCellsInCandidate[i-1]));
3756  outputContainer->Add(fhConeSumPtClusterPerNCellCutLargePtTrig) ;
3757 
3759  ("hPtClusterInConePerNCellCut","Cluster #it{p}_{T}, different #it{N}_{cell} cuts",
3760  fNNCellsInCandidate,0.5,fNNCellsInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
3761  fhPtClusterInConePerNCellCut->SetYTitle("#it{p}_{T}^{cluster} (GeV/#it{c})");
3762  fhPtClusterInConePerNCellCut->SetXTitle("#it{N}_{cell}^{min}");
3763  for(Int_t i = 1; i <= fNNCellsInCandidate; i++)
3764  fhPtClusterInConePerNCellCut->GetXaxis()->SetBinLabel(i, Form("%d",fNCellsInCandidate[i-1]));
3765  outputContainer->Add(fhPtClusterInConePerNCellCut) ;
3766 
3768  ("hPtClusterInConePerNCellCutLargePtTrig","Cluster #it{p}_{T}, different #it{N}_{cell} cuts, #it{p}_{T}^{trig} > 10 GeV",
3769  fNNCellsInCandidate,0.5,fNNCellsInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
3770  fhPtClusterInConePerNCellCutLargePtTrig->SetYTitle("#it{p}_{T}^{cluster} (GeV/#it{c})");
3771  fhPtClusterInConePerNCellCutLargePtTrig->SetXTitle("#it{N}_{cell}^{min}");
3772  for(Int_t i = 1; i <= fNNCellsInCandidate; i++)
3773  fhPtClusterInConePerNCellCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%d",fNCellsInCandidate[i-1]));
3774  outputContainer->Add(fhPtClusterInConePerNCellCutLargePtTrig) ;
3775 
3776 
3778  ("hConePtSumClusterPerExoCut","Cluster #Sigma #it{p}_{T}, different exoticity cuts",
3779  fNExoCutInCandidate,0.5,fNExoCutInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
3780  fhConeSumPtClusterPerExoCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3781  fhConeSumPtClusterPerExoCut->SetXTitle("exoticity");
3782  for(Int_t i = 1; i <= fNExoCutInCandidate; i++)
3783  fhConeSumPtClusterPerExoCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fExoCutInCandidate[i-1]));
3784  outputContainer->Add(fhConeSumPtClusterPerExoCut) ;
3785 
3787  ("hConePtSumClusterPerExoCutLargePtTrig","Cluster #Sigma #it{p}_{T}, different exoticity cuts, #it{p}_{T}^{trig} > 10 GeV",
3788  fNExoCutInCandidate,0.5,fNExoCutInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
3789  fhConeSumPtClusterPerExoCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3790  fhConeSumPtClusterPerExoCutLargePtTrig->SetXTitle("exoticity");
3791  for(Int_t i = 1; i <= fNExoCutInCandidate; i++)
3792  fhConeSumPtClusterPerExoCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fExoCutInCandidate[i-1]));
3793  outputContainer->Add(fhConeSumPtClusterPerExoCutLargePtTrig) ;
3794 
3796  ("hPtClusterInConePerExoCut","Cluster #it{p}_{T}, different exoticity cuts",
3797  fNExoCutInCandidate,0.5,fNExoCutInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
3798  fhPtClusterInConePerExoCut->SetYTitle("#it{p}_{T}^{cluster} (GeV/#it{c})");
3799  fhPtClusterInConePerExoCut->SetXTitle("exoticity");
3800  for(Int_t i = 1; i <= fNExoCutInCandidate; i++)
3801  fhPtClusterInConePerExoCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fExoCutInCandidate[i-1]));
3802  outputContainer->Add(fhPtClusterInConePerExoCut) ;
3803 
3805  ("hPtClusterInConePerExoCutLargePtTrig","Cluster #it{p}_{T}, different exoticity cuts, #it{p}_{T}^{trig} > 10 GeV",
3806  fNExoCutInCandidate,0.5,fNExoCutInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
3807  fhPtClusterInConePerExoCutLargePtTrig->SetYTitle("#it{p}_{T}^{cluster} (GeV/#it{c})");
3808  fhPtClusterInConePerExoCutLargePtTrig->SetXTitle("exoticity");
3809  for(Int_t i = 1; i <= fNExoCutInCandidate; i++)
3810  fhPtClusterInConePerExoCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fExoCutInCandidate[i-1]));
3811  outputContainer->Add(fhPtClusterInConePerExoCutLargePtTrig) ;
3812  }
3813 
3814  fhConePtLeadCluster = new TH2F("hConeLeadPtCluster",
3815  Form("Cluster leading in isolation cone for #it{R} = %2.2f",r),
3816  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
3817  fhConePtLeadCluster->SetYTitle("#it{p}_{T, leading} (GeV/#it{c})");
3818  fhConePtLeadCluster->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3819  outputContainer->Add(fhConePtLeadCluster) ;
3820 
3821 
3823  {
3824  fhConeSumPtCell = new TH2F("hConePtSumCell",
3825  Form("Cell #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
3826  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3827  fhConeSumPtCell->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3828  fhConeSumPtCell->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3829  outputContainer->Add(fhConeSumPtCell) ;
3830  }
3831 
3833  {
3834  fhConeSumPtEtaBandUECluster = new TH2F("hConePtSumEtaBandUECluster",
3835  "#Sigma cluster #it{p}_{T} in UE Eta Band",
3836  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3837  fhConeSumPtEtaBandUECluster->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3838  fhConeSumPtEtaBandUECluster->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3839  outputContainer->Add(fhConeSumPtEtaBandUECluster) ;
3840 
3841  fhConeSumPtPhiBandUECluster = new TH2F("hConePtSumPhiBandUECluster",
3842  "#Sigma cluster #it{p}_{T} UE Phi Band",
3843  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3844  fhConeSumPtPhiBandUECluster->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3845  fhConeSumPtPhiBandUECluster->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3846  outputContainer->Add(fhConeSumPtPhiBandUECluster) ;
3847 
3849  {
3850  fhConeSumPtEtaBandUEClusterTrigEtaPhi = new TH2F("hConePtSumEtaBandUEClusterTrigEtaPhi",
3851  "Trigger #eta vs #varphi, #Sigma cluster #it{p}_{T} in UE Eta Band",
3852  netabins,etamin,etamax,nphibins,phimin,phimax);
3853  fhConeSumPtEtaBandUEClusterTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3854  fhConeSumPtEtaBandUEClusterTrigEtaPhi->SetXTitle("#eta_{trigger}");
3855  fhConeSumPtEtaBandUEClusterTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
3856  outputContainer->Add(fhConeSumPtEtaBandUEClusterTrigEtaPhi) ;
3857 
3858  fhConeSumPtPhiBandUEClusterTrigEtaPhi = new TH2F("hConePtSumPhiBandUEClusterTrigEtaPhi",
3859  "Trigger #eta vs #varphi, #Sigma cluster #it{p}_{T} UE Phi Band",
3860  netabins,etamin,etamax,nphibins,phimin,phimax);
3861  fhConeSumPtPhiBandUEClusterTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3862  fhConeSumPtPhiBandUEClusterTrigEtaPhi->SetXTitle("#eta_{trigger}");
3863  fhConeSumPtPhiBandUEClusterTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
3864  outputContainer->Add(fhConeSumPtPhiBandUEClusterTrigEtaPhi) ;
3865 
3866  fhEtaBandClusterEtaPhi = new TH2F("hEtaBandClusterEtaPhi",
3867  Form("#eta vs #varphi of clusters in #eta band isolation cone for #it{R} = %2.2f",r),
3868  netabins,-1,1,nphibins,0,TMath::TwoPi());
3869  fhEtaBandClusterEtaPhi->SetXTitle("#eta");
3870  fhEtaBandClusterEtaPhi->SetYTitle("#varphi (rad)");
3871  outputContainer->Add(fhEtaBandClusterEtaPhi) ;
3872 
3873  fhPhiBandClusterEtaPhi = new TH2F("hPhiBandClusterEtaPhi",
3874  Form("#eta vs #varphi of clusters in #varphi band isolation cone for #it{R} = %2.2f",r),
3875  netabins,-1,1,nphibins,0,TMath::TwoPi());
3876  fhPhiBandClusterEtaPhi->SetXTitle("#eta");
3877  fhPhiBandClusterEtaPhi->SetYTitle("#varphi (rad)");
3878  outputContainer->Add(fhPhiBandClusterEtaPhi) ;
3879 
3880  fhEtaPhiInConeCluster= new TH2F("hEtaPhiInConeCluster",
3881  Form("#eta vs #varphi of clusters in cone for #it{R} = %2.2f",r),
3882  netabins,-1,1,nphibins,0,TMath::TwoPi());
3883  fhEtaPhiInConeCluster->SetXTitle("#eta");
3884  fhEtaPhiInConeCluster->SetYTitle("#varphi (rad)");
3885  outputContainer->Add(fhEtaPhiInConeCluster) ;
3886 
3887  fhEtaPhiCluster= new TH2F("hEtaPhiCluster",
3888  Form("#eta vs #varphi of all clusters"),
3889  netabins,-1,1,nphibins,0,TMath::TwoPi());
3890  fhEtaPhiCluster->SetXTitle("#eta");
3891  fhEtaPhiCluster->SetYTitle("#varphi (rad)");
3892  outputContainer->Add(fhEtaPhiCluster) ;
3893  }
3894 
3896  {
3897  fhConeSumPtEtaBandUECell = new TH2F("hConePtSumEtaBandUECell",
3898  "#Sigma cell #it{p}_{T} in UE Eta Band",
3899  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3900  fhConeSumPtEtaBandUECell->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3901  fhConeSumPtEtaBandUECell->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3902  outputContainer->Add(fhConeSumPtEtaBandUECell) ;
3903 
3904  fhConeSumPtPhiBandUECell = new TH2F("hConePtSumPhiBandUECell",
3905  "#Sigma cell #it{p}_{T} UE Phi Band",
3906  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
3907  fhConeSumPtPhiBandUECell->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
3908  fhConeSumPtPhiBandUECell->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
3909  outputContainer->Add(fhConeSumPtPhiBandUECell) ;
3910 
3911  fhConeSumPtEtaBandUECellTrigEtaPhi = new TH2F("hConePtSumEtaBandUECellTrigEtaPhi",
3912  "Trigger #eta vs #varphi, #Sigma cell #it{p}_{T} in UE Eta Band",
3913  netabins,etamin,etamax,nphibins,phimin,phimax);
3914  fhConeSumPtEtaBandUECellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3915  fhConeSumPtEtaBandUECellTrigEtaPhi->SetXTitle("#eta_{trigger}");
3916  fhConeSumPtEtaBandUECellTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
3917  outputContainer->Add(fhConeSumPtEtaBandUECellTrigEtaPhi) ;
3918 
3919  fhConeSumPtPhiBandUECellTrigEtaPhi = new TH2F("hConePtSumPhiBandUECellTrigEtaPhi",
3920  "Trigger #eta vs #varphi, #Sigma cell #it{p}_{T} UE Phi Band",
3921  netabins,etamin,etamax,nphibins,phimin,phimax);
3922  fhConeSumPtPhiBandUECellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
3923  fhConeSumPtPhiBandUECellTrigEtaPhi->SetXTitle("#eta_{trigger}");
3924  fhConeSumPtPhiBandUECellTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
3925  outputContainer->Add(fhConeSumPtPhiBandUECellTrigEtaPhi) ;
3926  }
3927 
3928  fhEtaBandClusterPt = new TH2F("hEtaBandClusterPt",
3929  Form("#it{p}_{T} of clusters in #eta band isolation cone for #it{R} = %2.2f",r),
3930  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
3931  fhEtaBandClusterPt->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
3932  fhEtaBandClusterPt->SetYTitle("#it{p}_{T}^{cluster-band} (GeV/#it{c})");
3933  outputContainer->Add(fhEtaBandClusterPt) ;
3934 
3935  fhPhiBandClusterPt = new TH2F("hPhiBandClusterPt",
3936  Form("#it{p}_{T} of clusters in #varphi band isolation cone for #it{R} = %2.2f",r),
3937  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
3938  fhPhiBandClusterPt->SetXTitle("#it{p}_{T}^{trig} (GeV/#it{c})");
3939  fhPhiBandClusterPt->SetYTitle("#it{p}_{T}^{cluster-band} (GeV/#it{c})");
3940  outputContainer->Add(fhPhiBandClusterPt) ;
3941  }
3942 
3943  fhPtClusterInCone = new TH2F("hPtClusterInCone",
3944  Form("#it{p}_{T} of clusters in isolation cone for #it{R} = %2.2f",r),
3945  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3946  fhPtClusterInCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3947  fhPtClusterInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3948  outputContainer->Add(fhPtClusterInCone) ;
3949 
3951  {
3952  fhPtClusterInConeExoTrigger = new TH2F("hPtClusterInConeExoTrigger",
3953  Form("#it{p}_{T} of clusters in isolation cone for #it{R} = %2.2f, exotic trigger",r),
3954  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
3955  fhPtClusterInConeExoTrigger->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3956  fhPtClusterInConeExoTrigger->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3957  outputContainer->Add(fhPtClusterInConeExoTrigger) ;
3958  }
3959 
3961  {
3962  fhPtCellInCone = new TH2F("hPtCellInCone",
3963  Form("#it{p}_{T} of cells in isolation cone for #it{R} = %2.2f",r),
3964  nptbins,ptmin,ptmax,1000,0,50);
3965  fhPtCellInCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
3966  fhPtCellInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3967  outputContainer->Add(fhPtCellInCone) ;
3968 
3969  fhEtaBandCell = new TH2F("hEtaBandCell",
3970  Form("#col vs #row of cells in #eta band isolation cone for #it{R} = %2.2f",r),
3971  96,0,95,128,0,127);
3972  fhEtaBandCell->SetXTitle("#col");
3973  fhEtaBandCell->SetYTitle("#row");
3974  outputContainer->Add(fhEtaBandCell) ;
3975 
3976  fhPhiBandCell = new TH2F("hPhiBandCell",
3977  Form("#col vs #row of cells in #varphi band isolation cone for #it{R} = %2.2f",r),
3978  96,0,95,128,0,127);
3979  fhPhiBandCell->SetXTitle("#col");
3980  fhPhiBandCell->SetYTitle("#row");
3981  outputContainer->Add(fhPhiBandCell) ;
3982  }
3983 
3985  {
3986  fhConeSumPtEtaUENormCluster = new TH2F("hConeSumPtEtaUENormCluster",
3987  Form("Clusters #Sigma #it{p}_{T} in normalized #eta band, #it{R} = %2.2f",r),
3988  nptbins,ptmin,ptmax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
3989  fhConeSumPtEtaUENormCluster->SetYTitle("#Sigma #it{p}_{T}^{#eta-band}_{norm} (GeV/#it{c})");
3990  fhConeSumPtEtaUENormCluster->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3991  outputContainer->Add(fhConeSumPtEtaUENormCluster) ;
3992 
3993  fhConeSumPtPhiUENormCluster = new TH2F("hConeSumPtPhiUENormCluster",
3994  Form("Clusters #Sigma #it{p}_{T} in normalized #varphi band, #it{R} = %2.2f",r),
3995  nptbins,ptmin,ptmax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
3996  fhConeSumPtPhiUENormCluster->SetYTitle("#Sigma #it{p}_{T}^{#varphi-band}_{norm} (GeV/#it{c})");
3997  fhConeSumPtPhiUENormCluster->SetXTitle("#it{p}_{T} (GeV/#it{c})");
3998  outputContainer->Add(fhConeSumPtPhiUENormCluster) ;
3999 
4000  fhConeSumPtEtaUESubCluster = new TH2F("hConeSumPtEtaUESubCluster",
4001  Form("Clusters #Sigma #it{p}_{T} after bkg subtraction from #eta band in the isolation cone for #it{R} = %2.2f",r),
4002  nptbins,ptmin,ptmax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4003  fhConeSumPtEtaUESubCluster->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4004  fhConeSumPtEtaUESubCluster->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4005  outputContainer->Add(fhConeSumPtEtaUESubCluster) ;
4006 
4007  fhConeSumPtPhiUESubCluster = new TH2F("hConeSumPtPhiUESubCluster",
4008  Form("Clusters #Sigma #it{p}_{T} after bkg subtraction from #varphi band in the isolation cone for #it{R} = %2.2f",r),
4009  nptbins,ptmin,ptmax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4010  fhConeSumPtPhiUESubCluster->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4011  fhConeSumPtPhiUESubCluster->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4012  outputContainer->Add(fhConeSumPtPhiUESubCluster) ;
4013 
4015  {
4016  fhConeSumPtEtaUESubClusterTrigEtaPhi = new TH2F("hConeSumPtEtaUESubClusterTrigEtaPhi",
4017  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),
4018  netabins,etamin,etamax,nphibins,phimin,phimax);
4019  fhConeSumPtEtaUESubClusterTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
4020  fhConeSumPtEtaUESubClusterTrigEtaPhi->SetXTitle("#eta_{trigger}");
4021  fhConeSumPtEtaUESubClusterTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
4022  outputContainer->Add(fhConeSumPtEtaUESubClusterTrigEtaPhi) ;
4023 
4024  fhConeSumPtPhiUESubClusterTrigEtaPhi = new TH2F("hConeSumPtPhiUESubClusterTrigEtaPhi",
4025  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),
4026  netabins,etamin,etamax,nphibins,phimin,phimax);
4027  fhConeSumPtPhiUESubClusterTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
4028  fhConeSumPtPhiUESubClusterTrigEtaPhi->SetXTitle("#eta_{trigger}");
4029  fhConeSumPtPhiUESubClusterTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
4030  outputContainer->Add(fhConeSumPtPhiUESubClusterTrigEtaPhi) ;
4031  }
4032 
4034  {
4035  fhConeSumPtEtaUESubCell = new TH2F("hConeSumPtEtaUESubCell",
4036  Form("Cells #Sigma #it{p}_{T} after bkg subtraction from #eta band in the isolation cone for #it{R} = %2.2f",r),
4037  nptbins,ptmin,ptmax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4038  fhConeSumPtEtaUESubCell->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4039  fhConeSumPtEtaUESubCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4040  outputContainer->Add(fhConeSumPtEtaUESubCell) ;
4041 
4042  fhConeSumPtPhiUESubCell = new TH2F("hConeSumPtPhiUESubCell",
4043  Form("Cells #Sigma #it{p}_{T} after bkg subtraction from #varphi band in the isolation cone for #it{R} = %2.2f",r),
4044  nptbins,ptmin,ptmax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4045  fhConeSumPtPhiUESubCell->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4046  fhConeSumPtPhiUESubCell->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4047  outputContainer->Add(fhConeSumPtPhiUESubCell) ;
4048 
4049  fhConeSumPtEtaUESubCellTrigEtaPhi = new TH2F("hConeSumPtEtaUESubCellTrigEtaPhi",
4050  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),
4051  netabins,etamin,etamax,nphibins,phimin,phimax);
4052  fhConeSumPtEtaUESubCellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
4053  fhConeSumPtEtaUESubCellTrigEtaPhi->SetXTitle("#eta_{trigger}");
4054  fhConeSumPtEtaUESubCellTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
4055  outputContainer->Add(fhConeSumPtEtaUESubCellTrigEtaPhi) ;
4056 
4057  fhConeSumPtPhiUESubCellTrigEtaPhi = new TH2F("hConeSumPtPhiUESubCellTrigEtaPhi",
4058  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),
4059  netabins,etamin,etamax,nphibins,phimin,phimax);
4060  fhConeSumPtPhiUESubCellTrigEtaPhi->SetZTitle("#Sigma #it{p}_{T}");
4061  fhConeSumPtPhiUESubCellTrigEtaPhi->SetXTitle("#eta_{trigger}");
4062  fhConeSumPtPhiUESubCellTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
4063  outputContainer->Add(fhConeSumPtPhiUESubCellTrigEtaPhi) ;
4064  }
4065 
4067  {
4068  fhFractionClusterOutConeEta = new TH2F("hFractionClusterOutConeEta",
4069  Form("Fraction of the isolation cone #it{R} = %2.2f, out of clusters #eta acceptance",r),
4070  nptbins,ptmin,ptmax,100,0,1);
4071  fhFractionClusterOutConeEta->SetYTitle("#it{fraction}");
4072  fhFractionClusterOutConeEta->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
4073  outputContainer->Add(fhFractionClusterOutConeEta) ;
4074 
4075  fhFractionClusterOutConeEtaTrigEtaPhi = new TH2F("hFractionClusterOutConeEtaTrigEtaPhi",
4076  Form("Fraction of the isolation cone #it{R} = %2.2f, out of clusters #eta acceptance, in trigger #eta-#varphi ",r),
4077  netabins,etamin,etamax,nphibins,phimin,phimax);
4078  fhFractionClusterOutConeEtaTrigEtaPhi->SetZTitle("#it{fraction}");
4079  fhFractionClusterOutConeEtaTrigEtaPhi->SetXTitle("#eta_{trigger}");
4080  fhFractionClusterOutConeEtaTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
4081  outputContainer->Add(fhFractionClusterOutConeEtaTrigEtaPhi) ;
4082 
4083  fhFractionClusterOutConePhi = new TH2F("hFractionClusterOutConePhi",
4084  Form("Fraction of the isolation cone #it{R} = %2.2f, out of clusters #varphi acceptance",r),
4085  nptbins,ptmin,ptmax,100,0,1);
4086  fhFractionClusterOutConePhi->SetYTitle("#it{fraction}");
4087  fhFractionClusterOutConePhi->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
4088  outputContainer->Add(fhFractionClusterOutConePhi) ;
4089 
4090  fhFractionClusterOutConePhiTrigEtaPhi = new TH2F("hFractionClusterOutConePhiTrigEtaPhi",
4091  Form("Fraction of the isolation cone #it{R} = %2.2f, out of clusters #varphi acceptance, in trigger #eta-#varphi ",r),
4092  netabins,etamin,etamax,nphibins,phimin,phimax);
4093  fhFractionClusterOutConePhiTrigEtaPhi->SetZTitle("#it{fraction}");
4094  fhFractionClusterOutConePhiTrigEtaPhi->SetXTitle("#eta_{trigger}");
4095  fhFractionClusterOutConePhiTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
4096  outputContainer->Add(fhFractionClusterOutConePhiTrigEtaPhi) ;
4097 
4098 
4099  fhConeSumPtSubvsConeSumPtTotPhiCluster = new TH2F("hConeSumPtSubvsConeSumPtTotPhiCluster",
4100  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),
4101  nptsumbins,ptsummin,ptsummax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4102  fhConeSumPtSubvsConeSumPtTotPhiCluster->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
4103  fhConeSumPtSubvsConeSumPtTotPhiCluster->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
4104  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotPhiCluster);
4105 
4106  fhConeSumPtSubNormvsConeSumPtTotPhiCluster = new TH2F("hConeSumPtSubNormvsConeSumPtTotPhiCluster",
4107  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),
4108  nptsumbins,ptsummin,ptsummax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4109  fhConeSumPtSubNormvsConeSumPtTotPhiCluster->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
4110  fhConeSumPtSubNormvsConeSumPtTotPhiCluster->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
4111  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotPhiCluster);
4112 
4113  fhConeSumPtSubvsConeSumPtTotEtaCluster = new TH2F("hConeSumPtSubvsConeSumPtTotEtaCluster",
4114  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),
4115  nptsumbins,ptsummin,ptsummax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4116  fhConeSumPtSubvsConeSumPtTotEtaCluster->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
4117  fhConeSumPtSubvsConeSumPtTotEtaCluster->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
4118  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotEtaCluster);
4119 
4120  fhConeSumPtSubNormvsConeSumPtTotEtaCluster = new TH2F("hConeSumPtSubNormvsConeSumPtTotEtaCluster",
4121  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),
4122  nptsumbins,ptsummin,ptsummax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4123  fhConeSumPtSubNormvsConeSumPtTotEtaCluster->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
4124  fhConeSumPtSubNormvsConeSumPtTotEtaCluster->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
4125  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotEtaCluster);
4126 
4127  fhConeSumPtVSUEClusterEtaBand = new TH2F("hConeSumPtVSUEClusterEtaBand",
4128  Form("#Sigma #it{p}_{T} in cone versus #Sigma #it{p}_{T} in #eta band for cluster (before normalization), R=%2.2f",r),
4129  nptsumbins,ptsummin,ptsummax,2*nptsumbins,ptsummin,2*ptsummax);
4130  fhConeSumPtVSUEClusterEtaBand->SetXTitle("#Sigma #it{p}_{T} cone (GeV/#it{c})");
4131  fhConeSumPtVSUEClusterEtaBand->SetYTitle("#Sigma #it{p}_{T} UE (GeV/#it{c})");
4132  outputContainer->Add(fhConeSumPtVSUEClusterEtaBand);
4133 
4134  fhConeSumPtVSUEClusterPhiBand = new TH2F("hConeSumPtVSUEClusterPhiBand",
4135  Form("#Sigma #it{p}_{T} in cone versus #Sigma #it{p}_{T} in #varphi band for cluster (before normalization), R=%2.2f",r),
4136  nptsumbins,ptsummin,ptsummax,8*nptsumbins,ptsummin,8*ptsummax);
4137  fhConeSumPtVSUEClusterPhiBand->SetXTitle("#Sigma #it{p}_{T} cone (GeV/#it{c})");
4138  fhConeSumPtVSUEClusterPhiBand->SetYTitle("#Sigma #it{p}_{T} UE (GeV/#it{c})");
4139  outputContainer->Add(fhConeSumPtVSUEClusterPhiBand);
4140  }
4141 
4143  {
4144  fhFractionCellOutConeEta = new TH2F("hFractionCellOutConeEta",
4145  Form("Fraction of the isolation cone #it{R} = %2.2f, out of cells #eta acceptance",r),
4146  nptbins,ptmin,ptmax,100,0,1);
4147  fhFractionCellOutConeEta->SetYTitle("#it{fraction}");
4148  fhFractionCellOutConeEta->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
4149  outputContainer->Add(fhFractionCellOutConeEta) ;
4150 
4151  fhFractionCellOutConeEtaTrigEtaPhi = new TH2F("hFractionCellOutConeEtaTrigEtaPhi",
4152  Form("Fraction of the isolation cone #it{R} = %2.2f, out of cells #eta acceptance, in trigger #eta-#varphi ",r),
4153  netabins,etamin,etamax,nphibins,phimin,phimax);
4154  fhFractionCellOutConeEtaTrigEtaPhi->SetZTitle("#it{fraction}");
4155  fhFractionCellOutConeEtaTrigEtaPhi->SetXTitle("#eta_{trigger}");
4156  fhFractionCellOutConeEtaTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
4157  outputContainer->Add(fhFractionCellOutConeEtaTrigEtaPhi) ;
4158 
4159  fhFractionCellOutConePhi = new TH2F("hFractionCellOutConePhi",
4160  Form("Fraction of the isolation cone #it{R} = %2.2f, out of cells #varphi acceptance",r),
4161  nptbins,ptmin,ptmax,100,0,1);
4162  fhFractionCellOutConePhi->SetYTitle("#it{fraction}");
4163  fhFractionCellOutConePhi->SetXTitle("#it{p}_{T,trigger} (GeV/#it{c})");
4164  outputContainer->Add(fhFractionCellOutConePhi) ;
4165 
4166  fhFractionCellOutConePhiTrigEtaPhi = new TH2F("hFractionCellOutConePhiTrigEtaPhi",
4167  Form("Fraction of the isolation cone #it{R} = %2.2f, out of cells #varphi acceptance, in trigger #eta-#varphi ",r),
4168  netabins,etamin,etamax,nphibins,phimin,phimax);
4169  fhFractionCellOutConePhiTrigEtaPhi->SetZTitle("#it{fraction}");
4170  fhFractionCellOutConePhiTrigEtaPhi->SetXTitle("#eta_{trigger}");
4171  fhFractionCellOutConePhiTrigEtaPhi->SetYTitle("#varphi_{trigger} (rad)");
4172  outputContainer->Add(fhFractionCellOutConePhiTrigEtaPhi) ;
4173 
4174 
4175  fhConeSumPtSubvsConeSumPtTotPhiCell = new TH2F("hConeSumPtSubvsConeSumPtTotPhiCell",
4176  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),
4177  nptsumbins,ptsummin,ptsummax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4178  fhConeSumPtSubvsConeSumPtTotPhiCell->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
4179  fhConeSumPtSubvsConeSumPtTotPhiCell->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
4180  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotPhiCell);
4181 
4182  fhConeSumPtSubNormvsConeSumPtTotPhiCell = new TH2F("hConeSumPtSubNormvsConeSumPtTotPhiCell",
4183  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),
4184  nptsumbins,ptsummin,ptsummax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4185  fhConeSumPtSubNormvsConeSumPtTotPhiCell->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
4186  fhConeSumPtSubNormvsConeSumPtTotPhiCell->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
4187  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotPhiCell);
4188 
4189  fhConeSumPtSubvsConeSumPtTotEtaCell = new TH2F("hConeSumPtSubvsConeSumPtTotEtaCell",
4190  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),
4191  nptsumbins,ptsummin,ptsummax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4192  fhConeSumPtSubvsConeSumPtTotEtaCell->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
4193  fhConeSumPtSubvsConeSumPtTotEtaCell->SetYTitle("#Sigma #it{p}_{T, sub} (GeV/#it{c})");
4194  outputContainer->Add(fhConeSumPtSubvsConeSumPtTotEtaCell);
4195 
4196  fhConeSumPtSubNormvsConeSumPtTotEtaCell = new TH2F("hConeSumPtSubNormvsConeSumPtTotEtaCell",
4197  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),
4198  nptsumbins,ptsummin,ptsummax,1.2*nptsumbins,-ptsummax*0.2,ptsummax);
4199  fhConeSumPtSubNormvsConeSumPtTotEtaCell->SetXTitle("#Sigma #it{p}_{T, tot} (GeV/#it{c})");
4200  fhConeSumPtSubNormvsConeSumPtTotEtaCell->SetYTitle("#Sigma #it{p}_{T, sub norm} (GeV/#it{c})");
4201  outputContainer->Add(fhConeSumPtSubNormvsConeSumPtTotEtaCell);
4202  }
4203  }
4204  }
4205 
4206  // Track only histograms
4207  if(GetIsolationCut()->GetParticleTypeInCone()!=AliIsolationCut::kOnlyNeutral)
4208  {
4209  fhConePtLeadTrack = new TH2F
4210  ("hConeLeadPtTrack",
4211  Form("Track leading in isolation cone for #it{R} = %2.2f",r),
4212  nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
4213  fhConePtLeadTrack->SetYTitle("#it{p}_{T, leading} (GeV/#it{c})");
4214  fhConePtLeadTrack->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4215  outputContainer->Add(fhConePtLeadTrack) ;
4216 
4217  fhPtTrackInCone = new TH2F
4218  ("hPtTrackInCone",
4219  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f",r),
4220  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4221  fhPtTrackInCone->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4222  fhPtTrackInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4223  outputContainer->Add(fhPtTrackInCone) ;
4224 
4225  if(IsDataMC())
4226  {
4227  TString mcChPartName[] = {"Pion","Kaon","Proton","Other"};
4228  for(Int_t imc = 0; imc < 4; imc++)
4229  {
4230  fhPtTrackInConeMCPrimary[imc] = new TH2F
4231  (Form("hPtTrackInCone_Primary_%s",mcChPartName[imc].Data()),
4232  Form("reconstructed #it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, primary MC %s",r,mcChPartName[imc].Data()),
4233  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4234  fhPtTrackInConeMCPrimary[imc]->SetYTitle("#it{p}_{T in cone}^{reco} (GeV/#it{c})");
4235  fhPtTrackInConeMCPrimary[imc]->SetXTitle("#it{p}_{T}^{reco} (GeV/#it{c})");
4236  outputContainer->Add(fhPtTrackInConeMCPrimary[imc]) ;
4237 
4238  fhPtTrackInConeMCSecondary[imc] = new TH2F
4239  (Form("hPtTrackInCone_Secondary_%s",mcChPartName[imc].Data()),
4240  Form("reconstructed #it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, secondary MC %s",r,mcChPartName[imc].Data()),
4241  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4242  fhPtTrackInConeMCSecondary[imc]->SetYTitle("#it{p}_{T in cone}^{reco} (GeV/#it{c})");
4243  fhPtTrackInConeMCSecondary[imc]->SetXTitle("#it{p}_{T}^{reco} (GeV/#it{c})");
4244  outputContainer->Add(fhPtTrackInConeMCSecondary[imc]) ;
4245 
4247  (Form("hPtTrackInCone_Gener_Primary_%s",mcChPartName[imc].Data()),
4248  Form("generated #it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, primary MC %s",r,mcChPartName[imc].Data()),
4249  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4250  fhPtTrackInConeMCPrimaryGener[imc]->SetYTitle("#it{p}_{T in cone}^{gener} (GeV/#it{c})");
4251  fhPtTrackInConeMCPrimaryGener[imc]->SetXTitle("#it{p}_{T}^{gener} (GeV/#it{c})");
4252  outputContainer->Add(fhPtTrackInConeMCPrimaryGener[imc]) ;
4253 
4255  (Form("hPtTrackInCone_Gener_Secondary_%s",mcChPartName[imc].Data()),
4256  Form("generated #it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, secondary MC %s",r,mcChPartName[imc].Data()),
4257  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4258  fhPtTrackInConeMCSecondaryGener[imc]->SetYTitle("#it{p}_{T in cone}^{gener} (GeV/#it{c})");
4259  fhPtTrackInConeMCSecondaryGener[imc]->SetXTitle("#it{p}_{T}^{gener} (GeV/#it{c})");
4260  outputContainer->Add(fhPtTrackInConeMCSecondaryGener[imc]) ;
4261  }
4262 
4263  }
4264 
4266  {
4267  fhPtTrackInConeExoTrigger = new TH2F("hPtTrackInConeExoTrigger",
4268  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, exotic trigger",r),
4269  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4270  fhPtTrackInConeExoTrigger->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4271  fhPtTrackInConeExoTrigger->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4272  outputContainer->Add(fhPtTrackInConeExoTrigger) ;
4273  }
4274 
4275  if(fStudyPtCutInCone)
4276  {
4278  ("hConeNTrackPerMinPtCut",
4279  Form("N tracks, different #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f",r),
4280  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nmultbin,multmin,multmax);
4281  fhConeNTrackPerMinPtCut->SetYTitle("#it{N}^{track}");
4282  fhConeNTrackPerMinPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4283  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4284  fhConeNTrackPerMinPtCut->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMinPtCutInCone[i-1]));
4285  outputContainer->Add(fhConeNTrackPerMinPtCut) ;
4286 
4288  ("hConeNTrackPerMinPtCutLargePtTrig",
4289  Form("N tracks, different #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f, #it{p}_{T}^{trig} > 10 GeV",r),
4290  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nmultbin,multmin,multmax);
4291  fhConeNTrackPerMinPtCutLargePtTrig->SetYTitle("#it{N}^{track}");
4292  fhConeNTrackPerMinPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4293  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4294  fhConeNTrackPerMinPtCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMinPtCutInCone[i-1]));
4295  outputContainer->Add(fhConeNTrackPerMinPtCutLargePtTrig) ;
4296 
4298  ("hConePtSumTrackPerMinPtCut",
4299  Form("Track #Sigma #it{p}_{T}, different #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f",r),
4300  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4301  fhConeSumPtTrackPerMinPtCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4302  fhConeSumPtTrackPerMinPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4303  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4304  fhConeSumPtTrackPerMinPtCut->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMinPtCutInCone[i-1]));
4305  outputContainer->Add(fhConeSumPtTrackPerMinPtCut) ;
4306 
4308  ("hConePtSumTrackPerMinPtCutLargePtTrig",
4309  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),
4310  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4311  fhConeSumPtTrackPerMinPtCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4312  fhConeSumPtTrackPerMinPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4313  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4314  fhConeSumPtTrackPerMinPtCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMinPtCutInCone[i-1]));
4315  outputContainer->Add(fhConeSumPtTrackPerMinPtCutLargePtTrig) ;
4316 
4318  {
4320  ("hPerpConeNTrackPerMinPtCut",
4321  Form("N tracks, different #it{p}_{T} cuts in perpendicular cone for #it{R} = %2.2f",r),
4322  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nmultbin,multmin,multmax);
4323  fhPerpConeNTrackPerMinPtCut->SetYTitle("#it{N}^{track}");
4324  fhPerpConeNTrackPerMinPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4325  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4326  fhPerpConeNTrackPerMinPtCut->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMinPtCutInCone[i-1]));
4327  outputContainer->Add(fhPerpConeNTrackPerMinPtCut) ;
4328 
4330  ("hPerpConeNTrackPerMinPtCutLargePtTrig",
4331  Form("N tracks, different #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f, #it{p}_{T}^{trig} > 10 GeV",r),
4332  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nmultbin,multmin,multmax);
4333  fhPerpConeNTrackPerMinPtCutLargePtTrig->SetYTitle("#it{N}^{track}");
4334  fhPerpConeNTrackPerMinPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4335  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4336  fhPerpConeNTrackPerMinPtCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMinPtCutInCone[i-1]));
4337  outputContainer->Add(fhPerpConeNTrackPerMinPtCutLargePtTrig) ;
4338 
4340  ("hPerpConePtSumTrackPerMinPtCut",
4341  Form("Track #Sigma #it{p}_{T}, different #it{p}_{T} cuts in perpendicular cone for #it{R} = %2.2f",r),
4342  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4343  fhPerpConeSumPtTrackPerMinPtCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4344  fhPerpConeSumPtTrackPerMinPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4345  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4346  fhPerpConeSumPtTrackPerMinPtCut->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMinPtCutInCone[i-1]));
4347  outputContainer->Add(fhPerpConeSumPtTrackPerMinPtCut) ;
4348 
4350  ("hPerpConePtSumTrackPerMinPtCutLargePtTrig",
4351  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),
4352  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4353  fhPerpConeSumPtTrackPerMinPtCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4354  fhPerpConeSumPtTrackPerMinPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4355  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4356  fhPerpConeSumPtTrackPerMinPtCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMinPtCutInCone[i-1]));
4357  outputContainer->Add(fhPerpConeSumPtTrackPerMinPtCutLargePtTrig) ;
4358  }
4359 
4361  ("hConePtSumTrackPerMaxPtCut",
4362  Form("Track #Sigma #it{p}_{T}, different #it{p}_{T} cuts in isolation cone for #it{R} = %2.2f",r),
4363  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4364  fhConeSumPtTrackPerMaxPtCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4365  fhConeSumPtTrackPerMaxPtCut->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4366  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4367  fhConeSumPtTrackPerMaxPtCut->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMaxPtCutInCone[i-1]));
4368  outputContainer->Add(fhConeSumPtTrackPerMaxPtCut) ;
4369 
4371  ("hConePtSumTrackPerMaxPtCutLargePtTrig",
4372  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),
4373  fNPtCutsInCone,0.5,fNPtCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4374  fhConeSumPtTrackPerMaxPtCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4375  fhConeSumPtTrackPerMaxPtCutLargePtTrig->SetXTitle("#it{p}_{T, min} (GeV/#it{c})");
4376  for(Int_t i = 1; i <= fNPtCutsInCone; i++)
4377  fhConeSumPtTrackPerMaxPtCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.1f",fMaxPtCutInCone[i-1]));
4378  outputContainer->Add(fhConeSumPtTrackPerMaxPtCutLargePtTrig) ;
4379  }
4380 
4381  if(fStudyEtaCutInCone)
4382  {
4383  fhConeSumPtTrackPerEtaCut = new TH2F("hConePtSumTrackPerEtaCut",
4384  Form("Track #Sigma #it{p}_{T}, different #eta cuts in isolation cone for #it{R} = %2.2f",r),
4385  fNEtaCutsInCone,0.5,fNEtaCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4386  fhConeSumPtTrackPerEtaCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4387  fhConeSumPtTrackPerEtaCut->SetXTitle("#eta_{max}");
4388  for(Int_t i = 1; i <= fNEtaCutsInCone; i++)
4389  fhConeSumPtTrackPerEtaCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fEtaCutInCone[i-1]));
4390  outputContainer->Add(fhConeSumPtTrackPerEtaCut) ;
4391 
4392  fhConeSumPtTrackPerEtaCutLargePtTrig = new TH2F("hConePtSumTrackPerEtaCutLargePtTrig",
4393  Form("Track #Sigma #it{p}_{T}, different #eta cuts in isolation cone for #it{R} = %2.2f, #it{p}_{T}^{trig} > 10 GeV",r),
4394  fNEtaCutsInCone,0.5,fNEtaCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4395  fhConeSumPtTrackPerEtaCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4396  fhConeSumPtTrackPerEtaCutLargePtTrig->SetXTitle("#eta_{max}");
4397  for(Int_t i = 1; i <= fNEtaCutsInCone; i++)
4398  fhConeSumPtTrackPerEtaCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fEtaCutInCone[i-1]));
4399  outputContainer->Add(fhConeSumPtTrackPerEtaCutLargePtTrig) ;
4400  }
4401 
4402  if(fStudyRCutInCone)
4403  {
4405  ("hConePtSumTrackPerRCut","Track #Sigma #it{p}_{T}, different #it{R} cuts",
4406  fNRCutsInCone,0.5,fNRCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4407  fhConeSumPtTrackPerRCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4408  fhConeSumPtTrackPerRCut->SetXTitle("#it{R}");
4409  for(Int_t i = 1; i <= fNRCutsInCone; i++)
4410  fhConeSumPtTrackPerRCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fRCutInCone[i-1]));
4411  outputContainer->Add(fhConeSumPtTrackPerRCut) ;
4412 
4414  ("hConePtSumTrackPerRCutLargePtTrig","Track #Sigma #it{p}_{T}, different #it{R} cuts, #it{p}_{T}^{trig} > 10 GeV",
4415  fNRCutsInCone,0.5,fNRCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4416  fhConeSumPtTrackPerRCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4417  fhConeSumPtTrackPerRCutLargePtTrig->SetXTitle("#it{R}");
4418  for(Int_t i = 1; i <= fNRCutsInCone; i++)
4419  fhConeSumPtTrackPerRCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fRCutInCone[i-1]));
4420  outputContainer->Add(fhConeSumPtTrackPerRCutLargePtTrig) ;
4421 
4423  ("hPtTrackInConePerRCut","Track #it{p}_{T}, different #it{R} cuts",
4424  fNRCutsInCone,0.5,fNRCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4425  fhPtTrackInConePerRCut->SetYTitle("#it{p}_{T}^{track} (GeV/#it{c})");
4426  fhPtTrackInConePerRCut->SetXTitle("#it{R}");
4427  for(Int_t i = 1; i <= fNRCutsInCone; i++)
4428  fhPtTrackInConePerRCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fRCutInCone[i-1]));
4429  outputContainer->Add(fhPtTrackInConePerRCut) ;
4430 
4432  ("hPtTrackInConePerRCutLargePtTrig","Track #it{p}_{T}, different #it{R} cuts, #it{p}_{T}^{trig} > 10 GeV",
4433  fNRCutsInCone,0.5,fNRCutsInCone+0.5,nptsumbins,ptsummin,ptsummax);
4434  fhPtTrackInConePerRCutLargePtTrig->SetYTitle("#it{p}_{T}^{track} (GeV/#it{c})");
4435  fhPtTrackInConePerRCutLargePtTrig->SetXTitle("#it{R}");
4436  for(Int_t i = 1; i <= fNRCutsInCone; i++)
4437  fhPtTrackInConePerRCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fRCutInCone[i-1]));
4438  outputContainer->Add(fhPtTrackInConePerRCutLargePtTrig) ;
4439  }
4440 
4442  {
4444  ("hConePtSumTrackPerNCellCut","Track #Sigma #it{p}_{T}, different #it{N}_{cell} cuts",
4445  fNNCellsInCandidate,0.5,fNNCellsInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
4446  fhConeSumPtTrackPerNCellCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4447  fhConeSumPtTrackPerNCellCut->SetXTitle("#it{N}_{cell}^{min}");
4448  for(Int_t i = 1; i <= fNNCellsInCandidate; i++)
4449  fhConeSumPtTrackPerNCellCut->GetXaxis()->SetBinLabel(i, Form("%d",fNCellsInCandidate[i-1]));
4450  outputContainer->Add(fhConeSumPtTrackPerNCellCut) ;
4451 
4453  ("hConePtSumTrackPerNCellCutLargePtTrig","Track #Sigma #it{p}_{T}, different #it{N}_{cell} cuts, #it{p}_{T}^{trig} > 10 GeV",
4454  fNNCellsInCandidate,0.5,fNNCellsInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
4455  fhConeSumPtTrackPerNCellCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4456  fhConeSumPtTrackPerNCellCutLargePtTrig->SetXTitle("#it{N}_{cell}^{min}");
4457  for(Int_t i = 1; i <= fNNCellsInCandidate; i++)
4458  fhConeSumPtTrackPerNCellCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%d",fNCellsInCandidate[i-1]));
4459  outputContainer->Add(fhConeSumPtTrackPerNCellCutLargePtTrig) ;
4460 
4462  ("hPtTrackInConePerNCellCut","Track #it{p}_{T}, different #it{N}_{cell} cuts",
4463  fNNCellsInCandidate,0.5,fNNCellsInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
4464  fhPtTrackInConePerNCellCut->SetYTitle("#it{p}_{T}^{track} (GeV/#it{c})");
4465  fhPtTrackInConePerNCellCut->SetXTitle("#it{N}_{cell}^{min}");
4466  for(Int_t i = 1; i <= fNNCellsInCandidate; i++)
4467  fhPtTrackInConePerNCellCut->GetXaxis()->SetBinLabel(i, Form("%d",fNCellsInCandidate[i-1]));
4468  outputContainer->Add(fhPtTrackInConePerNCellCut) ;
4469 
4471  ("hPtTrackInConePerNCellCutLargePtTrig","Track #it{p}_{T}, different #it{N}_{cell} cuts, #it{p}_{T}^{trig} > 10 GeV",
4472  fNNCellsInCandidate,0.5,fNNCellsInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
4473  fhPtTrackInConePerNCellCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T}^{track} (GeV/#it{c})");
4474  fhPtTrackInConePerNCellCutLargePtTrig->SetXTitle("#it{N}_{cell}^{min}");
4475  for(Int_t i = 1; i <= fNNCellsInCandidate; i++)
4476  fhPtTrackInConePerNCellCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%d",fNCellsInCandidate[i-1]));
4477  outputContainer->Add(fhPtTrackInConePerNCellCutLargePtTrig) ;
4478 
4480  ("hConePtSumTrackPerExoCut","Track #Sigma #it{p}_{T}, different exoticity cuts",
4481  fNExoCutInCandidate,0.5,fNExoCutInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
4482  fhConeSumPtTrackPerExoCut->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4483  fhConeSumPtTrackPerExoCut->SetXTitle("exoticity");
4484  for(Int_t i = 1; i <= fNExoCutInCandidate; i++)
4485  fhConeSumPtTrackPerExoCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fExoCutInCandidate[i-1]));
4486  outputContainer->Add(fhConeSumPtTrackPerExoCut) ;
4487 
4489  ("hConePtSumTrackPerExoCutLargePtTrig","Track #Sigma #it{p}_{T}, different exoticity cuts, #it{p}_{T}^{trig} > 10 GeV",
4490  fNExoCutInCandidate,0.5,fNExoCutInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
4491  fhConeSumPtTrackPerExoCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4492  fhConeSumPtTrackPerExoCutLargePtTrig->SetXTitle("exoticity");
4493  for(Int_t i = 1; i <= fNExoCutInCandidate; i++)
4494  fhConeSumPtTrackPerExoCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fExoCutInCandidate[i-1]));
4495  outputContainer->Add(fhConeSumPtTrackPerExoCutLargePtTrig) ;
4496 
4498  ("hPtTrackInConePerExoCut","Track #it{p}_{T}, different exoticity cuts",
4499  fNExoCutInCandidate,0.5,fNExoCutInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
4500  fhPtTrackInConePerExoCut->SetYTitle("#it{p}_{T}^{track} (GeV/#it{c})");
4501  fhPtTrackInConePerExoCut->SetXTitle("exoticity");
4502  for(Int_t i = 1; i <= fNExoCutInCandidate; i++)
4503  fhPtTrackInConePerExoCut->GetXaxis()->SetBinLabel(i, Form("%2.2f",fExoCutInCandidate[i-1]));
4504  outputContainer->Add(fhPtTrackInConePerExoCut) ;
4505 
4507  ("hPtTrackInConePerExoCutLargePtTrig","Track #it{p}_{T}, different exoticity cuts, #it{p}_{T}^{trig} > 10 GeV",
4508  fNExoCutInCandidate,0.5,fNExoCutInCandidate+0.5,nptsumbins,ptsummin,ptsummax);
4509  fhPtTrackInConePerExoCutLargePtTrig->SetYTitle("#Sigma #it{p}_{T}^{track} (GeV/#it{c})");
4510  fhPtTrackInConePerExoCutLargePtTrig->SetXTitle("exoticity");
4511  for(Int_t i = 1; i <= fNExoCutInCandidate; i++)
4512  fhPtTrackInConePerExoCutLargePtTrig->GetXaxis()->SetBinLabel(i, Form("%2.2f",fExoCutInCandidate[i-1]));
4513  outputContainer->Add(fhPtTrackInConePerExoCutLargePtTrig) ;
4514  }
4515 
4516 
4517  fhConeSumPtTrack = new TH2F
4518  ("hConePtSumTrack",
4519  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f",r),
4520  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4521  fhConeSumPtTrack->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4522  fhConeSumPtTrack->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4523  outputContainer->Add(fhConeSumPtTrack) ;
4524 
4526  {
4528  ("hConePtSumTrackExoTrigger",
4529  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, exo trigger",r),
4530  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4531  fhConeSumPtTrackExoTrigger->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4532  fhConeSumPtTrackExoTrigger->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4533  outputContainer->Add(fhConeSumPtTrackExoTrigger) ;
4534  }
4535 
4536  if(fStudyTracksInCone)
4537  {
4538  Int_t ntofbins = 1000;
4539  Int_t mintof = -500;
4540  Int_t maxtof = 500;
4541 
4542  fhTrackTOFInCone = new TH2F
4543  ("hTrackTOFInCone","TOF signal vs track #it{p}_{T}",
4544  nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
4545  fhTrackTOFInCone->SetYTitle("TOF signal (ns)");
4546  fhTrackTOFInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4547  outputContainer->Add(fhTrackTOFInCone);
4548 
4550  {
4552  ("hTrackTOFInConeExoTrigger","TOF signal vs track #it{p}_{T}, exoticity > 0.97",
4553  nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
4554  fhTrackTOFInConeExoTrigger->SetYTitle("TOF signal (ns)");
4555  fhTrackTOFInConeExoTrigger->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4556  outputContainer->Add(fhTrackTOFInConeExoTrigger);
4557  }
4558 
4559  fhTrackTOFInConeBC0 = new TH2F
4560  ("hTrackTOFInConeBC0","TOF signal vs track #it{p}_{T}, BC=0",
4561  nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
4562  fhTrackTOFInConeBC0->SetYTitle("TOF signal (ns)");
4563  fhTrackTOFInConeBC0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4564  outputContainer->Add(fhTrackTOFInConeBC0);
4565 
4566  fhPtTrackInConeVtxBC0 = new TH2F("hPtTrackInConeVtxBC0",
4567  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC==0",r),
4568  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4569  fhPtTrackInConeVtxBC0->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4570  fhPtTrackInConeVtxBC0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4571  outputContainer->Add(fhPtTrackInConeVtxBC0) ;
4572 
4573  fhEtaPhiTrackInCone = new TH2F("hEtaPhiTrackInCone",
4574  Form("#eta vs #varphi of Tracks in cone for #it{R} = %2.2f",r),
4575  netabins,-1,1,nphibins,0,TMath::TwoPi());
4576  fhEtaPhiTrackInCone->SetXTitle("#eta");
4577  fhEtaPhiTrackInCone->SetYTitle("#varphi (rad)");
4578  outputContainer->Add(fhEtaPhiTrackInCone) ;
4579 
4580  fhEtaTrackInCone = new TH2F("hEtaTrackInCone",
4581  Form("#eta vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f",r),
4582  nptbins,ptmin,ptmax,netabins,-1,1);
4583  fhEtaTrackInCone->SetYTitle("#eta");
4584  fhEtaTrackInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4585  outputContainer->Add(fhEtaTrackInCone) ;
4586 
4587  fhPhiTrackInCone = new TH2F("hPhiTrackInCone",
4588  Form("#varphi vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f",r),
4589  nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
4590  fhPhiTrackInCone->SetYTitle("#varphi (rad)");
4591  fhPhiTrackInCone->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4592  outputContainer->Add(fhPhiTrackInCone) ;
4593 
4594  //
4595  // Different track cuts:
4596  //
4597  // TOF info
4598  //
4599  fhConeSumPtTrackTOFBC0 = new TH2F("hConePtSumTrackTOFBC0",
4600  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, track TOF BC=0",r),
4601  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4602  fhConeSumPtTrackTOFBC0->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4603  fhConeSumPtTrackTOFBC0->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4604  outputContainer->Add(fhConeSumPtTrackTOFBC0) ;
4605 
4606  fhConeSumPtTrackTOFBCN = new TH2F("hConePtSumTrackTOFBCN",
4607  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, track TOF BC!=0",r),
4608  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4609  fhConeSumPtTrackTOFBCN->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4610  fhConeSumPtTrackTOFBCN->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4611  outputContainer->Add(fhConeSumPtTrackTOFBCN) ;
4612 
4613  fhConeSumPtTrackTOFNo = new TH2F("hConePtSumTrackTOFNo",
4614  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, track no TOF",r),
4615  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4616  fhConeSumPtTrackTOFNo->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4617  fhConeSumPtTrackTOFNo->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4618  outputContainer->Add(fhConeSumPtTrackTOFNo) ;
4619 
4620  fhPtTrackInConeTOFBC0 = new TH2F("hPtTrackInConeTOFBC0",
4621  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC=0",r),
4622  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4623  fhPtTrackInConeTOFBC0->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4624  fhPtTrackInConeTOFBC0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4625  outputContainer->Add(fhPtTrackInConeTOFBC0) ;
4626 
4627  fhPtTrackInConeTOFBCN = new TH2F("hPtTrackInConeTOFBCN",
4628  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC!=0",r),
4629  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4630  fhPtTrackInConeTOFBCN->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4631  fhPtTrackInConeTOFBCN->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4632  outputContainer->Add(fhPtTrackInConeTOFBCN) ;
4633 
4634  fhPtTrackInConeTOFNo = new TH2F("hPtTrackInConeTOFNo",
4635  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, no TOF",r),
4636  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4637  fhPtTrackInConeTOFNo->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4638  fhPtTrackInConeTOFNo->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4639  outputContainer->Add(fhPtTrackInConeTOFNo) ;
4640 
4641 
4642  fhEtaPhiTrackInConeTOFBC0 = new TH2F("hEtaPhiTrackInConeTOFBC0",
4643  Form("#eta vs #varphi of Tracks in cone for #it{R} = %2.2f, TOF BC=0",r),
4644  netabins,-1,1,nphibins,0,TMath::TwoPi());
4645  fhEtaPhiTrackInConeTOFBC0->SetXTitle("#eta");
4646  fhEtaPhiTrackInConeTOFBC0->SetYTitle("#varphi (rad)");
4647  outputContainer->Add(fhEtaPhiTrackInConeTOFBC0) ;
4648 
4649  fhEtaPhiTrackInConeTOFBCN = new TH2F("hEtaPhiTrackInConeTOFBCN",
4650  Form("#eta vs #varphi of Tracks in cone for #it{R} = %2.2f, TOF BC!=0",r),
4651  netabins,-1,1,nphibins,0,TMath::TwoPi());
4652  fhEtaPhiTrackInConeTOFBCN->SetXTitle("#eta");
4653  fhEtaPhiTrackInConeTOFBCN->SetYTitle("#varphi (rad)");
4654  outputContainer->Add(fhEtaPhiTrackInConeTOFBCN) ;
4655 
4656  fhEtaPhiTrackInConeTOFNo = new TH2F("hEtaPhiTrackInConeTOFNo",
4657  Form("#eta vs #varphi of Tracks in cone for #it{R} = %2.2f, no TOF",r),
4658  netabins,-1,1,nphibins,0,TMath::TwoPi());
4659  fhEtaPhiTrackInConeTOFNo->SetXTitle("#eta");
4660  fhEtaPhiTrackInConeTOFNo->SetYTitle("#varphi (rad)");
4661  outputContainer->Add(fhEtaPhiTrackInConeTOFNo) ;
4662 
4663  fhEtaTrackInConeTOFBC0 = new TH2F("hEtaTrackInConeTOFBC0",
4664  Form("#eta vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, TOF BC=0",r),
4665  nptbins,ptmin,ptmax,netabins,-1,1);
4666  fhEtaTrackInConeTOFBC0->SetYTitle("#eta");
4667  fhEtaTrackInConeTOFBC0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4668  outputContainer->Add(fhEtaTrackInConeTOFBC0) ;
4669 
4670  fhEtaTrackInConeTOFBCN = new TH2F("hEtaTrackInConeTOFBCN",
4671  Form("#eta vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, TOF BC!=0",r),
4672  nptbins,ptmin,ptmax,netabins,-1,1);
4673  fhEtaTrackInConeTOFBCN->SetYTitle("#eta");
4674  fhEtaTrackInConeTOFBCN->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4675  outputContainer->Add(fhEtaTrackInConeTOFBCN) ;
4676 
4677  fhEtaTrackInConeTOFNo = new TH2F("hEtaTrackInConeTOFNo",
4678  Form("#eta vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, no TOF",r),
4679  nptbins,ptmin,ptmax,netabins,-1,1);
4680  fhEtaTrackInConeTOFNo->SetYTitle("#eta");
4681  fhEtaTrackInConeTOFNo->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4682  outputContainer->Add(fhEtaTrackInConeTOFNo) ;
4683 
4684  fhPhiTrackInConeTOFBC0 = new TH2F("hPhiTrackInConeTOFBC0",
4685  Form("#varphi vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, TOF BC=0",r),
4686  nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
4687  fhPhiTrackInConeTOFBC0->SetYTitle("#varphi (rad)");
4688  fhPhiTrackInConeTOFBC0->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4689  outputContainer->Add(fhPhiTrackInConeTOFBC0) ;
4690 
4691  fhPhiTrackInConeTOFBCN = new TH2F("hPhiTrackInConeTOFBCN",
4692  Form("#varphi vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, TOF BC!=0",r),
4693  nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
4694  fhPhiTrackInConeTOFBCN->SetYTitle("#varphi (rad)");
4695  fhPhiTrackInConeTOFBCN->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4696  outputContainer->Add(fhPhiTrackInConeTOFBCN) ;
4697 
4698  fhPhiTrackInConeTOFNo = new TH2F("hPhiTrackInConeTOFNo",
4699  Form("#varphi vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, no TOF",r),
4700  nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
4701  fhPhiTrackInConeTOFNo->SetYTitle("#varphi (rad)");
4702  fhPhiTrackInConeTOFNo->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4703  outputContainer->Add(fhPhiTrackInConeTOFNo) ;
4704 
4705  //
4706  // ITS info
4707  //
4708  fhConeSumPtTrackITSRefitOnSPDOn = new TH2F("hConePtSumTrackITSRefitOnSPDOn",
4709  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, track ITS Refit SPD On",r),
4710  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4711  fhConeSumPtTrackITSRefitOnSPDOn->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4712  fhConeSumPtTrackITSRefitOnSPDOn->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4713  outputContainer->Add(fhConeSumPtTrackITSRefitOnSPDOn) ;
4714 
4715  fhConeSumPtTrackITSRefitOnSPDOff = new TH2F("hConePtSumTrackITSRefitOnSPDOff",
4716  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, track ITS Refit SPD Off",r),
4717  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4718  fhConeSumPtTrackITSRefitOnSPDOff->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4719  fhConeSumPtTrackITSRefitOnSPDOff->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4720  outputContainer->Add(fhConeSumPtTrackITSRefitOnSPDOff) ;
4721 
4722  fhConeSumPtTrackITSRefitOffSPDOff = new TH2F("hConePtSumTrackITSRefitOffSPDOff",
4723  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, track no ITS Refit SPD Off",r),
4724  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
4725  fhConeSumPtTrackITSRefitOffSPDOff->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
4726  fhConeSumPtTrackITSRefitOffSPDOff->SetXTitle("#it{p}_{T, trigger} (GeV/#it{c})");
4727  outputContainer->Add(fhConeSumPtTrackITSRefitOffSPDOff) ;
4728 
4729  fhPtTrackInConeITSRefitOnSPDOn = new TH2F("hPtTrackInConeITSRefitOnSPDOn",
4730  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC=0",r),
4731  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4732  fhPtTrackInConeITSRefitOnSPDOn->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4733  fhPtTrackInConeITSRefitOnSPDOn->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4734  outputContainer->Add(fhPtTrackInConeITSRefitOnSPDOn) ;
4735 
4736  fhPtTrackInConeITSRefitOnSPDOff = new TH2F("hPtTrackInConeITSRefitOnSPDOff",
4737  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, TOF from BC!=0",r),
4738  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4739  fhPtTrackInConeITSRefitOnSPDOff->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4740  fhPtTrackInConeITSRefitOnSPDOff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4741  outputContainer->Add(fhPtTrackInConeITSRefitOnSPDOff) ;
4742 
4743  fhPtTrackInConeITSRefitOffSPDOff = new TH2F("hPtTrackInConeITSRefitOffSPDOff",
4744  Form("#it{p}_{T} of tracks in isolation cone for #it{R} = %2.2f, no ITS Refit SPD Off",r),
4745  nptbins,ptmin,ptmax,nptinconebins,ptinconemin,ptinconemax);
4746  fhPtTrackInConeITSRefitOffSPDOff->SetYTitle("#it{p}_{T in cone} (GeV/#it{c})");
4747  fhPtTrackInConeITSRefitOffSPDOff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4748  outputContainer->Add(fhPtTrackInConeITSRefitOffSPDOff) ;
4749 
4750 
4751  fhEtaPhiTrackInConeITSRefitOnSPDOn = new TH2F("hEtaPhiTrackInConeITSRefitOnSPDOn",
4752  Form("#eta vs #varphi of Tracks in cone for #it{R} = %2.2f, ITS Refit SPD On",r),
4753  netabins,-1,1,nphibins,0,TMath::TwoPi());
4754  fhEtaPhiTrackInConeITSRefitOnSPDOn->SetXTitle("#eta");
4755  fhEtaPhiTrackInConeITSRefitOnSPDOn->SetYTitle("#varphi (rad)");
4756  outputContainer->Add(fhEtaPhiTrackInConeITSRefitOnSPDOn) ;
4757 
4758  fhEtaPhiTrackInConeITSRefitOnSPDOff = new TH2F("hEtaPhiTrackInConeITSRefitOnSPDOff",
4759  Form("#eta vs #varphi of Tracks in cone for #it{R} = %2.2f, ITS Refit SPD Off",r),
4760  netabins,-1,1,nphibins,0,TMath::TwoPi());
4761  fhEtaPhiTrackInConeITSRefitOnSPDOff->SetXTitle("#eta");
4762  fhEtaPhiTrackInConeITSRefitOnSPDOff->SetYTitle("#varphi (rad)");
4763  outputContainer->Add(fhEtaPhiTrackInConeITSRefitOnSPDOff) ;
4764 
4765  fhEtaPhiTrackInConeITSRefitOffSPDOff = new TH2F("hEtaPhiTrackInConeITSRefitOffSPDOff",
4766  Form("#eta vs #varphi of Tracks in cone for #it{R} = %2.2f, no ITS Refit SPD Off",r),
4767  netabins,-1,1,nphibins,0,TMath::TwoPi());
4768  fhEtaPhiTrackInConeITSRefitOffSPDOff->SetXTitle("#eta");
4769  fhEtaPhiTrackInConeITSRefitOffSPDOff->SetYTitle("#varphi (rad)");
4770  outputContainer->Add(fhEtaPhiTrackInConeITSRefitOffSPDOff) ;
4771 
4772  fhEtaTrackInConeITSRefitOnSPDOn = new TH2F("hEtaTrackInConeITSRefitOnSPDOn",
4773  Form("#eta vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, ITS Refit SPD On",r),
4774  nptbins,ptmin,ptmax,netabins,-1,1);
4775  fhEtaTrackInConeITSRefitOnSPDOn->SetYTitle("#eta");
4776  fhEtaTrackInConeITSRefitOnSPDOn->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4777  outputContainer->Add(fhEtaTrackInConeITSRefitOnSPDOn) ;
4778 
4779  fhEtaTrackInConeITSRefitOnSPDOff = new TH2F("hEtaTrackInConeITSRefitOnSPDOff",
4780  Form("#eta vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, ITS Refit SPD Off",r),
4781  nptbins,ptmin,ptmax,netabins,-1,1);
4782  fhEtaTrackInConeITSRefitOnSPDOff->SetYTitle("#eta");
4783  fhEtaTrackInConeITSRefitOnSPDOff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4784  outputContainer->Add(fhEtaTrackInConeITSRefitOnSPDOff) ;
4785 
4786  fhEtaTrackInConeITSRefitOffSPDOff = new TH2F("hEtaTrackInConeITSRefitOffSPDOff",
4787  Form("#eta vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, no ITS Refit SPD Off",r),
4788  nptbins,ptmin,ptmax,netabins,-1,1);
4789  fhEtaTrackInConeITSRefitOffSPDOff->SetYTitle("#eta");
4790  fhEtaTrackInConeITSRefitOffSPDOff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4791  outputContainer->Add(fhEtaTrackInConeITSRefitOffSPDOff) ;
4792 
4793  fhPhiTrackInConeITSRefitOnSPDOn = new TH2F("hPhiTrackInConeITSRefitOnSPDOn",
4794  Form("#varphi vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, ITS Refit SPD On",r),
4795  nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
4796  fhPhiTrackInConeITSRefitOnSPDOn->SetYTitle("#varphi (rad)");
4797  fhPhiTrackInConeITSRefitOnSPDOn->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4798  outputContainer->Add(fhPhiTrackInConeITSRefitOnSPDOn) ;
4799 
4800  fhPhiTrackInConeITSRefitOnSPDOff = new TH2F("hPhiTrackInConeITSRefitOnSPDOff",
4801  Form("#varphi vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, ITS Refit SPD Off",r),
4802  nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
4803  fhPhiTrackInConeITSRefitOnSPDOff->SetYTitle("#varphi (rad)");
4804  fhPhiTrackInConeITSRefitOnSPDOff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4805  outputContainer->Add(fhPhiTrackInConeITSRefitOnSPDOff) ;
4806 
4807  fhPhiTrackInConeITSRefitOffSPDOff = new TH2F("hPhiTrackInConeITSRefitOffSPDOff",
4808  Form("#varphi vs #it{p}_{T} of Tracks in cone for #it{R} = %2.2f, no ITS Refit SPD Off",r),
4809  nptbins,ptmin,ptmax,nphibins,0,TMath::TwoPi());
4810  fhPhiTrackInConeITSRefitOffSPDOff->SetYTitle("#varphi (rad)");
4811  fhPhiTrackInConeITSRefitOffSPDOff->SetXTitle("#it{p}_{T} (GeV/#it{c})");
4812  outputContainer->Add(fhPhiTrackInConeITSRefitOffSPDOff) ;
4813 
4814  //
4815  // TOF and ITS info
4816  //
4817  fhConeSumPtTrackTOFBC0ITSRefitOnSPDOn = new TH2F("hConePtSumTrackTOFBC0ITSRefitOnSPDOn",
4818  Form("Track #Sigma #it{p}_{T} in isolation cone for #it{R} = %2.2f, track TOF BC=0, track ITS Refit SPD On",r),
4819  nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);