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