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