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