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