1c5acb87 |
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 is 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 | /* $Id: $ */ |
16 | |
17 | //_________________________________________________________________________ |
18 | // Class that contains the algorithm for the reconstruction of jet, cone around leading particle |
19 | // The seed is a backward particle (direct photon) |
20 | // 1)Take the trigger particle stored in AliAODPWG4ParticleCorrelation, |
21 | // 2) Search for the highest pt leading particle opposite to the photon within a phi, pt window |
22 | // 3) Take all particles around leading in a cone R with pt larger than threshold and construct the jet |
23 | // |
24 | // Class created from old AliPHOSGammaJet |
25 | // (see AliRoot versions previous Release 4-09) |
26 | // |
27 | //*-- Author: Gustavo Conesa (LNF-INFN) |
28 | ////////////////////////////////////////////////////////////////////////////// |
29 | |
30 | |
31 | // --- ROOT system --- |
32 | #include "TH2F.h" |
477d6cee |
33 | #include "TClonesArray.h" |
1c5acb87 |
34 | |
35 | //---- Analysis system ---- |
36 | #include "AliAODTrack.h" |
37 | #include "AliAODCaloCluster.h" |
38 | #include "AliCaloTrackReader.h" |
39 | #include "AliNeutralMesonSelection.h" |
1c5acb87 |
40 | #include "AliAnaParticleJetLeadingConeCorrelation.h" |
41 | #include "AliCaloPID.h" |
42 | #include "AliAODPWG4ParticleCorrelation.h" |
477d6cee |
43 | #include "AliFidutialCut.h" |
44 | #include "AliAODTrack.h" |
45 | #include "AliAODCaloCluster.h" |
1c5acb87 |
46 | |
47 | ClassImp(AliAnaParticleJetLeadingConeCorrelation) |
48 | |
49 | |
50 | //____________________________________________________________________________ |
51 | AliAnaParticleJetLeadingConeCorrelation::AliAnaParticleJetLeadingConeCorrelation() : |
52 | AliAnaPartCorrBaseClass(), fJetsOnlyInCTS(kFALSE), fPbPb(kFALSE), |
53 | fSeveralConeAndPtCuts(0), fReMakeJet(0), |
54 | fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), |
55 | fLeadingRatioMaxCut(0.), fLeadingRatioMinCut(0.), |
56 | fJetCTSRatioMaxCut(0.), fJetCTSRatioMinCut(0.), |
57 | fJetRatioMaxCut(0.), fJetRatioMinCut(0.), |
58 | fJetNCone(0),fJetNPt(0), fJetCone(0), |
59 | fJetPtThreshold(0),fJetPtThresPbPb(0), |
60 | fPtTriggerSelectionCut(0.0), fSelect(0), |
477d6cee |
61 | fSelectIsolated(0), |
1c5acb87 |
62 | //Histograms |
63 | fOutCont(0x0), |
64 | fhChargedLeadingPt(0),fhChargedLeadingPhi(0),fhChargedLeadingEta(0), |
65 | fhChargedLeadingDeltaPt(0),fhChargedLeadingDeltaPhi(0),fhChargedLeadingDeltaEta(0), |
66 | fhChargedLeadingRatioPt(0), |
67 | fhNeutralLeadingPt(0),fhNeutralLeadingPhi(0),fhNeutralLeadingEta(0), |
68 | fhNeutralLeadingDeltaPt(0),fhNeutralLeadingDeltaPhi(0),fhNeutralLeadingDeltaEta(0), |
69 | fhNeutralLeadingRatioPt(0), |
70 | fhJetPt(0),fhJetRatioPt(0),fhJetDeltaPhi(0), fhJetDeltaEta(0), |
71 | fhJetLeadingRatioPt(0),fhJetLeadingDeltaPhi(0),fhJetLeadingDeltaEta(0), |
72 | fhJetFFz(0),fhJetFFxi(0),fhJetFFpt(0),fhJetNTracksInCone(0), |
73 | fhBkgPt(0),fhBkgRatioPt(0),fhBkgDeltaPhi(0), fhBkgDeltaEta(0), |
74 | fhBkgLeadingRatioPt(0),fhBkgLeadingDeltaPhi(0),fhBkgLeadingDeltaEta(0), |
75 | fhBkgFFz(0),fhBkgFFxi(0),fhBkgFFpt(0),fhBkgNTracksInCone(0), |
76 | //Several cones and thres histograms |
77 | fhJetPts(),fhJetRatioPts(),fhJetDeltaPhis(), fhJetDeltaEtas(), |
78 | fhJetLeadingRatioPts(),fhJetLeadingDeltaPhis(),fhJetLeadingDeltaEtas(), |
79 | fhJetFFzs(),fhJetFFxis(),fhJetFFpts(),fhJetNTracksInCones(), |
80 | fhBkgPts(),fhBkgRatioPts(),fhBkgDeltaPhis(), fhBkgDeltaEtas(), |
81 | fhBkgLeadingRatioPts(),fhBkgLeadingDeltaPhis(),fhBkgLeadingDeltaEtas(), |
82 | fhBkgFFzs(),fhBkgFFxis(),fhBkgFFpts(),fhBkgNTracksInCones() |
83 | { |
84 | //Default Ctor |
477d6cee |
85 | |
1c5acb87 |
86 | //Initialize parameters |
87 | |
88 | for(Int_t i = 0; i<6; i++){ |
89 | fJetXMin1[i] = 0.0 ; |
90 | fJetXMin2[i] = 0.0 ; |
91 | fJetXMax1[i] = 0.0 ; |
92 | fJetXMax2[i] = 0.0 ; |
93 | fBkgMean[i] = 0.0 ; |
94 | fBkgRMS[i] = 0.0 ; |
95 | if( i < 2 ){ |
96 | fJetE1[i] = 0.0 ; |
97 | fJetE2[i] = 0.0 ; |
98 | fJetSigma1[i] = 0.0 ; |
99 | fJetSigma2[i] = 0.0 ; |
100 | } |
101 | } |
477d6cee |
102 | |
1c5acb87 |
103 | //Several cones and thres histograms |
104 | for(Int_t i = 0; i<5; i++){ |
105 | fJetCones[i] = 0.0 ; |
106 | fJetNameCones[i] = "" ; |
107 | fJetPtThres[i] = 0.0 ; |
108 | fJetNamePtThres[i] = "" ; |
109 | for(Int_t j = 0; j<5; j++){ |
110 | fhJetPts[i][j]=0 ; |
111 | fhJetRatioPts[i][j]=0 ; |
112 | fhJetDeltaPhis[i][j]=0 ; |
113 | fhJetDeltaEtas[i][j]=0 ; |
114 | fhJetLeadingRatioPts[i][j]=0 ; |
115 | fhJetLeadingDeltaPhis[i][j]=0 ; |
116 | fhJetLeadingDeltaEtas[i][j]=0 ; |
117 | fhJetFFzs[i][j]=0 ; |
118 | fhJetFFxis[i][j]=0 ; |
119 | fhJetFFpts[i][j]=0 ; |
120 | fhJetNTracksInCones[i][j]=0 ; |
121 | fhBkgPts[i][j]=0 ; |
122 | fhBkgRatioPts[i][j]=0 ; |
123 | fhBkgDeltaPhis[i][j]=0 ; |
124 | fhBkgDeltaEtas[i][j]=0 ; |
125 | fhBkgLeadingRatioPts[i][j]=0 ; |
126 | fhBkgLeadingDeltaPhis[i][j]=0 ; |
127 | fhBkgLeadingDeltaEtas[i][j]=0 ; |
128 | fhBkgFFzs[i][j]=0 ; |
129 | fhBkgFFxis[i][j]=0 ; |
130 | fhBkgFFpts[i][j]=0 ; |
131 | fhBkgNTracksInCones[i][j]=0 ; |
132 | } |
133 | } |
134 | |
135 | InitParameters(); |
136 | |
137 | } |
138 | |
139 | //____________________________________________________________________________ |
140 | AliAnaParticleJetLeadingConeCorrelation::AliAnaParticleJetLeadingConeCorrelation(const AliAnaParticleJetLeadingConeCorrelation & jetlc) : |
141 | AliAnaPartCorrBaseClass(jetlc), fJetsOnlyInCTS(jetlc.fJetsOnlyInCTS), fPbPb(jetlc.fPbPb), |
142 | fSeveralConeAndPtCuts(jetlc.fSeveralConeAndPtCuts), fReMakeJet(jetlc. fReMakeJet), |
143 | fDeltaPhiMaxCut(jetlc. fDeltaPhiMaxCut), fDeltaPhiMinCut(jetlc.fDeltaPhiMinCut), |
144 | fLeadingRatioMaxCut(jetlc.fLeadingRatioMaxCut), fLeadingRatioMinCut(jetlc.fLeadingRatioMinCut), |
145 | fJetCTSRatioMaxCut(jetlc.fJetCTSRatioMaxCut), |
146 | fJetCTSRatioMinCut(jetlc.fJetCTSRatioMinCut), fJetRatioMaxCut(jetlc.fJetRatioMaxCut), |
147 | fJetRatioMinCut(jetlc.fJetRatioMinCut), fJetNCone(jetlc.fJetNCone), |
148 | fJetNPt(jetlc.fJetNPt), fJetCone(jetlc.fJetCone), |
149 | fJetPtThreshold(jetlc.fJetPtThreshold),fJetPtThresPbPb(jetlc.fJetPtThresPbPb), |
477d6cee |
150 | fPtTriggerSelectionCut(jetlc.fPtTriggerSelectionCut), fSelect(jetlc.fSelect), |
151 | fSelectIsolated(jetlc.fSelectIsolated), |
1c5acb87 |
152 | //Histograms |
153 | fOutCont(jetlc. fOutCont), |
154 | fhChargedLeadingPt(jetlc.fhChargedLeadingPt), fhChargedLeadingPhi(jetlc.fhChargedLeadingPhi), |
155 | fhChargedLeadingEta(jetlc.fhChargedLeadingEta), fhChargedLeadingDeltaPt(jetlc.fhChargedLeadingDeltaPt), |
156 | fhChargedLeadingDeltaPhi(jetlc.fhChargedLeadingDeltaPhi),fhChargedLeadingDeltaEta(jetlc.fhChargedLeadingDeltaEta), |
157 | fhChargedLeadingRatioPt(jetlc.fhChargedLeadingRatioPt), |
158 | fhNeutralLeadingPt(jetlc.fhNeutralLeadingPt),fhNeutralLeadingPhi(jetlc.fhNeutralLeadingPhi), |
159 | fhNeutralLeadingEta(jetlc.fhNeutralLeadingEta), fhNeutralLeadingDeltaPt(jetlc.fhNeutralLeadingDeltaPt), |
160 | fhNeutralLeadingDeltaPhi(jetlc.fhNeutralLeadingDeltaPhi),fhNeutralLeadingDeltaEta(jetlc.fhNeutralLeadingDeltaEta), |
161 | fhNeutralLeadingRatioPt(jetlc.fhNeutralLeadingRatioPt), |
162 | fhJetPt(jetlc.fhJetPt),fhJetRatioPt(jetlc.fhJetRatioPt),fhJetDeltaPhi(jetlc.fhJetDeltaPhi), |
163 | fhJetDeltaEta(jetlc.fhJetDeltaEta), fhJetLeadingRatioPt(jetlc.fhJetLeadingRatioPt), |
164 | fhJetLeadingDeltaPhi(jetlc.fhJetLeadingDeltaPhi),fhJetLeadingDeltaEta(jetlc.fhJetLeadingDeltaEta), |
165 | fhJetFFz(jetlc.fhJetFFz),fhJetFFxi(jetlc.fhJetFFxi),fhJetFFpt(jetlc.fhJetFFpt), |
166 | fhJetNTracksInCone(jetlc.fhJetNTracksInCone), |
167 | fhBkgPt(jetlc.fhBkgPt),fhBkgRatioPt(jetlc.fhBkgRatioPt),fhBkgDeltaPhi(jetlc.fhBkgDeltaPhi), |
168 | fhBkgDeltaEta(jetlc.fhBkgDeltaEta), fhBkgLeadingRatioPt(jetlc.fhBkgLeadingRatioPt), |
169 | fhBkgLeadingDeltaPhi(jetlc.fhBkgLeadingDeltaPhi),fhBkgLeadingDeltaEta(jetlc.fhBkgLeadingDeltaEta), |
170 | fhBkgFFz(jetlc.fhBkgFFz),fhBkgFFxi(jetlc.fhBkgFFxi),fhBkgFFpt(jetlc.fhBkgFFpt), |
171 | fhBkgNTracksInCone(jetlc.fhBkgNTracksInCone), |
172 | //Several cones and thres histograms |
173 | fhJetPts(),fhJetRatioPts(),fhJetDeltaPhis(), fhJetDeltaEtas(), |
174 | fhJetLeadingRatioPts(),fhJetLeadingDeltaPhis(),fhJetLeadingDeltaEtas(), |
175 | fhJetFFzs(),fhJetFFxis(),fhJetFFpts(),fhJetNTracksInCones(), |
176 | fhBkgPts(),fhBkgRatioPts(),fhBkgDeltaPhis(), fhBkgDeltaEtas(), |
177 | fhBkgLeadingRatioPts(),fhBkgLeadingDeltaPhis(),fhBkgLeadingDeltaEtas(), |
178 | fhBkgFFzs(),fhBkgFFxis(),fhBkgFFpts(),fhBkgNTracksInCones() |
179 | { |
180 | // cpy ctor |
181 | |
182 | for(Int_t i = 0; i<6; i++){ |
183 | fJetXMin1[i] = jetlc.fJetXMin1[i] ; |
184 | fJetXMin2[i] = jetlc.fJetXMin2[i] ; |
185 | fJetXMax1[i] = jetlc.fJetXMax1[i] ; |
186 | fJetXMax2[i] = jetlc.fJetXMax2[i] ; |
187 | fBkgMean[i] = jetlc.fBkgMean[i] ; |
188 | fBkgRMS[i] = jetlc.fBkgRMS[i] ; |
189 | if( i < 2 ){ |
190 | fJetE1[i] = jetlc.fJetE1[i] ; |
191 | fJetE2[i] = jetlc.fJetE2[i] ; |
192 | fJetSigma1[i] = jetlc.fJetSigma1[i] ; |
193 | fJetSigma2[i] = jetlc.fJetSigma2[i] ; |
194 | } |
195 | } |
477d6cee |
196 | |
1c5acb87 |
197 | //Several cones and thres histograms |
198 | for(Int_t i = 0; i<5; i++){ |
199 | fJetCones[i] = jetlc.fJetCones[i] ; |
200 | fJetNameCones[i] = jetlc.fJetNameCones[i] ; |
201 | fJetPtThres[i] = jetlc.fJetPtThres[i] ; |
202 | fJetNamePtThres[i] = jetlc.fJetNamePtThres[i] ; |
203 | for(Int_t j = 0; j<5; j++){ |
204 | fhJetPts[i][j] = jetlc.fhJetPts[i][j] ; |
205 | fhJetRatioPts[i][j] = jetlc.fhJetRatioPts[i][j] ; |
206 | fhJetDeltaPhis[i][j] = jetlc.fhJetDeltaPhis[i][j] ; |
207 | fhJetDeltaEtas[i][j] = jetlc.fhJetDeltaEtas[i][j] ; |
208 | fhJetLeadingRatioPts[i][j] = jetlc.fhJetLeadingRatioPts[i][j] ; |
209 | fhJetLeadingDeltaPhis[i][j] = jetlc.fhJetLeadingDeltaPhis[i][j] ; |
210 | fhJetLeadingDeltaEtas[i][j] = jetlc.fhJetLeadingDeltaEtas[i][j] ; |
211 | fhJetFFzs[i][j] = jetlc.fhJetFFzs[i][j] ; |
212 | fhJetFFxis[i][j] = jetlc.fhJetFFxis[i][j] ; |
213 | fhJetFFpts[i][j] = jetlc.fhJetFFpts[i][j] ; |
214 | fhJetNTracksInCones[i][j] = fhJetNTracksInCones[i][j] ; |
215 | fhBkgPts[i][j] = jetlc.fhBkgPts[i][j] ; |
216 | fhBkgRatioPts[i][j] = jetlc.fhBkgRatioPts[i][j] ; |
217 | fhBkgDeltaPhis[i][j] = jetlc.fhBkgDeltaPhis[i][j] ; |
218 | fhBkgDeltaEtas[i][j] = jetlc.fhBkgDeltaEtas[i][j] ; |
219 | fhBkgLeadingRatioPts[i][j] = jetlc.fhBkgLeadingRatioPts[i][j] ; |
220 | fhBkgLeadingDeltaPhis[i][j] = jetlc.fhBkgLeadingDeltaPhis[i][j] ; |
221 | fhBkgLeadingDeltaEtas[i][j] = jetlc.fhBkgLeadingDeltaEtas[i][j] ; |
222 | fhBkgFFzs[i][j] = jetlc.fhBkgFFzs[i][j] ; |
223 | fhBkgFFxis[i][j] = jetlc.fhBkgFFxis[i][j] ; |
224 | fhBkgFFpts[i][j] = jetlc.fhBkgFFpts[i][j] ; |
225 | fhBkgNTracksInCones[i][j] = jetlc.fhBkgNTracksInCones[i][j] ; |
226 | } |
227 | } |
228 | } |
229 | |
230 | //_________________________________________________________________________ |
231 | AliAnaParticleJetLeadingConeCorrelation & AliAnaParticleJetLeadingConeCorrelation::operator = (const AliAnaParticleJetLeadingConeCorrelation & jetlc) |
232 | { |
233 | // assignment operator |
477d6cee |
234 | |
1c5acb87 |
235 | if(this == &jetlc)return *this; |
236 | ((AliAnaPartCorrBaseClass *)this)->operator=(jetlc); |
1c5acb87 |
237 | |
477d6cee |
238 | fSeveralConeAndPtCuts = jetlc.fSeveralConeAndPtCuts ; |
239 | fPbPb = jetlc.fPbPb ; |
240 | fReMakeJet = jetlc.fReMakeJet ; |
241 | fJetsOnlyInCTS = jetlc.fJetsOnlyInCTS; |
242 | |
243 | fDeltaPhiMaxCut = jetlc.fDeltaPhiMaxCut ; |
244 | fDeltaPhiMinCut = jetlc.fDeltaPhiMinCut ; |
245 | fLeadingRatioMaxCut = jetlc.fLeadingRatioMaxCut ; |
246 | fLeadingRatioMinCut = jetlc.fLeadingRatioMinCut ; |
247 | |
248 | fJetCTSRatioMaxCut = jetlc.fJetCTSRatioMaxCut ; |
249 | fJetCTSRatioMinCut = jetlc.fJetCTSRatioMinCut ; |
250 | fJetRatioMaxCut = jetlc.fJetRatioMaxCut ; |
251 | fJetRatioMinCut = jetlc.fJetRatioMinCut ; |
1c5acb87 |
252 | |
477d6cee |
253 | fJetNCone = jetlc.fJetNCone ; |
254 | fJetNPt = jetlc.fJetNPt ; fJetCone = jetlc.fJetCone ; |
255 | fJetPtThreshold = jetlc.fJetPtThreshold ; |
256 | fJetPtThresPbPb = jetlc.fJetPtThresPbPb ; |
1c5acb87 |
257 | fPtTriggerSelectionCut = jetlc.fPtTriggerSelectionCut ; |
477d6cee |
258 | fSelect = jetlc.fSelect ; |
259 | fSelectIsolated = jetlc.fSelectIsolated ; |
1c5acb87 |
260 | |
261 | for(Int_t i = 0; i<6; i++){ |
262 | fJetXMin1[i] = jetlc.fJetXMin1[i] ; |
263 | fJetXMin2[i] = jetlc.fJetXMin2[i] ; |
264 | fJetXMax1[i] = jetlc.fJetXMax1[i] ; |
265 | fJetXMax2[i] = jetlc.fJetXMax2[i] ; |
266 | fBkgMean[i] = jetlc.fBkgMean[i] ; |
267 | fBkgRMS[i] = jetlc.fBkgRMS[i] ; |
268 | if( i < 2 ){ |
269 | fJetE1[i] = jetlc.fJetE1[i] ; |
270 | fJetE2[i] = jetlc.fJetE2[i] ; |
271 | fJetSigma1[i] = jetlc.fJetSigma1[i] ; |
272 | fJetSigma2[i] = jetlc.fJetSigma2[i] ; |
273 | } |
274 | } |
275 | |
276 | //Histograms |
277 | fOutCont = jetlc. fOutCont ; |
278 | fhChargedLeadingPt = jetlc.fhChargedLeadingPt; fhChargedLeadingPhi = jetlc.fhChargedLeadingPhi; |
279 | fhChargedLeadingEta = jetlc.fhChargedLeadingEta; fhChargedLeadingDeltaPt = jetlc.fhChargedLeadingDeltaPt; |
280 | fhChargedLeadingDeltaPhi = jetlc.fhChargedLeadingDeltaPhi;fhChargedLeadingDeltaEta = jetlc.fhChargedLeadingDeltaEta; |
281 | fhChargedLeadingRatioPt = jetlc.fhChargedLeadingRatioPt; |
282 | fhNeutralLeadingPt = jetlc.fhNeutralLeadingPt;fhNeutralLeadingPhi = jetlc.fhNeutralLeadingPhi; |
283 | fhNeutralLeadingEta = jetlc.fhNeutralLeadingEta; fhNeutralLeadingDeltaPt = jetlc.fhNeutralLeadingDeltaPt; |
284 | fhNeutralLeadingDeltaPhi = jetlc.fhNeutralLeadingDeltaPhi;fhNeutralLeadingDeltaEta = jetlc.fhNeutralLeadingDeltaEta; |
285 | fhNeutralLeadingRatioPt = jetlc.fhNeutralLeadingRatioPt; |
286 | fhJetPt = jetlc.fhJetPt;fhJetRatioPt = jetlc.fhJetRatioPt;fhJetDeltaPhi = jetlc.fhJetDeltaPhi; |
287 | fhJetDeltaEta = jetlc.fhJetDeltaEta; fhJetLeadingRatioPt = jetlc.fhJetLeadingRatioPt; |
288 | fhJetLeadingDeltaPhi = jetlc.fhJetLeadingDeltaPhi;fhJetLeadingDeltaEta = jetlc.fhJetLeadingDeltaEta; |
289 | fhJetFFz = jetlc.fhJetFFz;fhJetFFxi = jetlc.fhJetFFxi;fhJetFFpt = jetlc.fhJetFFpt; |
290 | fhJetNTracksInCone = jetlc.fhJetNTracksInCone; |
291 | fhBkgPt = jetlc.fhBkgPt;fhBkgRatioPt = jetlc.fhBkgRatioPt;fhBkgDeltaPhi = jetlc.fhBkgDeltaPhi; |
292 | fhBkgDeltaEta = jetlc.fhBkgDeltaEta; fhBkgLeadingRatioPt = jetlc.fhBkgLeadingRatioPt; |
293 | fhBkgLeadingDeltaPhi = jetlc.fhBkgLeadingDeltaPhi;fhBkgLeadingDeltaEta = jetlc.fhBkgLeadingDeltaEta; |
294 | fhBkgFFz = jetlc.fhBkgFFz;fhBkgFFxi = jetlc.fhBkgFFxi;fhBkgFFpt = jetlc.fhBkgFFpt; |
295 | fhBkgNTracksInCone = jetlc.fhBkgNTracksInCone; |
296 | |
297 | |
298 | //Several cones and thres histograms |
299 | for(Int_t i = 0; i<5; i++){ |
300 | fJetCones[i] = jetlc.fJetCones[i] ; |
301 | fJetNameCones[i] = jetlc.fJetNameCones[i] ; |
302 | fJetPtThres[i] = jetlc.fJetPtThres[i] ; |
303 | fJetNamePtThres[i] = jetlc.fJetNamePtThres[i] ; |
304 | |
305 | for(Int_t j = 0; j<5; j++){ |
306 | fhJetPts[i][j] = jetlc.fhJetPts[i][j] ; |
307 | fhJetRatioPts[i][j] = jetlc.fhJetRatioPts[i][j] ; |
308 | fhJetDeltaPhis[i][j] = jetlc.fhJetDeltaPhis[i][j] ; |
309 | fhJetDeltaEtas[i][j] = jetlc.fhJetDeltaEtas[i][j] ; |
310 | fhJetLeadingRatioPts[i][j] = jetlc.fhJetLeadingRatioPts[i][j] ; |
311 | fhJetLeadingDeltaPhis[i][j] = jetlc.fhJetLeadingDeltaPhis[i][j] ; |
312 | fhJetLeadingDeltaEtas[i][j] = jetlc.fhJetLeadingDeltaEtas[i][j] ; |
313 | fhJetFFzs[i][j] = jetlc.fhJetFFzs[i][j] ; |
314 | fhJetFFxis[i][j] = jetlc.fhJetFFxis[i][j] ; |
315 | fhJetFFpts[i][j] = jetlc.fhJetFFpts[i][j] ; |
316 | fhJetNTracksInCones[i][j] = fhJetNTracksInCones[i][j] ; |
317 | fhBkgPts[i][j] = jetlc.fhBkgPts[i][j] ; |
318 | fhBkgRatioPts[i][j] = jetlc.fhBkgRatioPts[i][j] ; |
319 | fhBkgDeltaPhis[i][j] = jetlc.fhBkgDeltaPhis[i][j] ; |
320 | fhBkgDeltaEtas[i][j] = jetlc.fhBkgDeltaEtas[i][j] ; |
321 | fhBkgLeadingRatioPts[i][j] = jetlc.fhBkgLeadingRatioPts[i][j] ; |
322 | fhBkgLeadingDeltaPhis[i][j] = jetlc.fhBkgLeadingDeltaPhis[i][j] ; |
323 | fhBkgLeadingDeltaEtas[i][j] = jetlc.fhBkgLeadingDeltaEtas[i][j] ; |
324 | fhBkgFFzs[i][j] = jetlc.fhBkgFFzs[i][j] ; |
325 | fhBkgFFxis[i][j] = jetlc.fhBkgFFxis[i][j] ; |
326 | fhBkgFFpts[i][j] = jetlc.fhBkgFFpts[i][j] ; |
327 | fhBkgNTracksInCones[i][j] = jetlc.fhBkgNTracksInCones[i][j] ; |
328 | } |
329 | } |
330 | |
331 | return *this; |
332 | |
333 | } |
334 | |
335 | //____________________________________________________________________________ |
336 | AliAnaParticleJetLeadingConeCorrelation::~AliAnaParticleJetLeadingConeCorrelation() |
337 | { |
338 | // Remove all pointers except analysis output pointers. |
339 | delete [] fJetE1; |
340 | delete [] fJetE2; |
341 | delete [] fJetSigma1; |
342 | delete [] fJetSigma2; |
343 | delete [] fBkgMean; |
344 | delete [] fBkgRMS; |
345 | delete [] fJetXMin1; |
346 | delete [] fJetXMin2; |
347 | delete [] fJetXMax1; |
348 | delete [] fJetXMax2; |
349 | delete [] fJetCones; |
350 | delete [] fJetNameCones; |
351 | delete [] fJetPtThres; |
352 | delete [] fJetNamePtThres; |
353 | } |
354 | |
355 | //____________________________________________________________________________ |
356 | Double_t AliAnaParticleJetLeadingConeCorrelation::CalculateJetRatioLimit(const Double_t ptg, const Double_t *par, const Double_t *x) const { |
357 | //Calculate the ratio of the jet and trigger particle limit for the selection |
358 | //WARNING: need to check what it does |
359 | //Info("CalculateLimit","x1 %f, x2%f",x[0],x[1]); |
360 | Double_t ePP = par[0] + par[1] * ptg ; |
361 | Double_t sPP = par[2] + par[3] * ptg ; |
362 | Double_t f = x[0] + x[1] * ptg ; |
363 | Double_t ePbPb = ePP + par[4] ; |
364 | Double_t sPbPb = TMath::Sqrt(sPP*sPP+ par[5]*par[5]) ; |
365 | Double_t rat = (ePbPb - sPbPb * f) / ptg ; |
366 | //Info("CalculateLimit","ePP %f, sPP %f, f %f", ePP, sPP, f); |
367 | //Info("CalculateLimit","ePbPb %f, sPbPb %f, rat %f", ePbPb, sPbPb, rat); |
368 | return rat ; |
369 | } |
370 | |
371 | //____________________________________________________________________________ |
372 | void AliAnaParticleJetLeadingConeCorrelation::FillJetHistos(AliAODPWG4ParticleCorrelation * particle, const TLorentzVector leading, const TLorentzVector jet, const TString type, const TString lastname) |
373 | { |
374 | //Fill jet and background histograms |
375 | Double_t ptTrig = particle->Pt(); |
376 | Double_t ptJet = jet.Pt(); |
377 | Double_t ptLead = leading.Pt(); |
378 | Double_t phiTrig = particle->Phi(); |
379 | Double_t phiJet = jet.Phi(); |
380 | Double_t phiLead = leading.Phi(); |
381 | Double_t etaTrig = particle->Eta(); |
382 | Double_t etaJet = jet.Eta(); |
383 | Double_t etaLead = leading.Eta(); |
384 | |
385 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"Pt"+lastname))-> |
386 | Fill(ptTrig,ptJet); |
387 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"RatioPt"+lastname))-> |
388 | Fill(ptTrig,ptJet/ptTrig); |
389 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"LeadingRatioPt"+lastname))-> |
390 | Fill(ptTrig,ptLead/ptJet); |
391 | // dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"Phi"+lastname))-> |
392 | // Fill(ptTrig,phiJet); |
393 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"DeltaPhi"+lastname))-> |
394 | Fill(ptTrig,phiJet-phiTrig); |
395 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"LeadingDeltaPhi"+lastname))-> |
396 | Fill(ptTrig,phiJet-phiLead); |
397 | |
398 | // dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"Eta"+lastname))-> |
399 | // Fill(ptTrig,etaJet); |
400 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"DeltaEta"+lastname))-> |
401 | Fill(ptTrig,etaJet-etaTrig); |
402 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"LeadingDeltaEta"+lastname))-> |
403 | Fill(ptTrig,etaJet-etaLead); |
404 | |
405 | //Construct fragmentation function |
406 | TRefArray * pl = new TRefArray; |
407 | if(type == "Jet") pl = particle->GetRefTracks(); |
408 | else if(type == "Bkg") pl = particle->GetRefBackgroundTracks(); |
409 | |
410 | //Different pt cut for jet particles in different collisions systems |
411 | //Only needed when jet is recalculated from AODs |
412 | Float_t ptcut = fJetPtThreshold; |
413 | if(fPbPb && !fSeveralConeAndPtCuts && ptTrig > fPtTriggerSelectionCut) ptcut = fJetPtThresPbPb ; |
414 | |
415 | TVector3 p3; |
416 | Int_t nTracksInCone = 0; |
417 | for(Int_t ipr = 0;ipr < pl->GetEntriesFast() ; ipr ++ ){ |
418 | AliAODTrack* track = dynamic_cast<AliAODTrack *>(pl->At(ipr)) ; |
419 | p3.SetXYZ(track->Px(),track->Py(),track->Pz()); |
420 | |
421 | //Recheck if particle is in jet cone |
422 | if(fReMakeJet || fSeveralConeAndPtCuts) |
423 | if(!IsParticleInJetCone(p3.Eta(), p3.Phi(), leading.Eta(), leading.Phi()) ) continue ; |
424 | |
425 | nTracksInCone++; |
426 | |
427 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"FFz"+lastname)) |
428 | ->Fill(ptTrig,p3.Pt()/ptTrig); |
429 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"FFxi"+lastname)) |
430 | ->Fill(ptTrig,TMath::Log(ptTrig/p3.Pt())); |
431 | dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"FFpt"+lastname)) |
432 | ->Fill(ptTrig,p3.Pt()); |
433 | |
434 | }//track loop |
435 | |
436 | if(nTracksInCone > 0) dynamic_cast<TH2F*>(GetOutputContainer()->FindObject(type+"NTracksInCone"+lastname)) |
437 | ->Fill(ptTrig, nTracksInCone); |
438 | |
439 | } |
440 | |
441 | //________________________________________________________________________ |
442 | TList * AliAnaParticleJetLeadingConeCorrelation::GetCreateOutputObjects() |
443 | { |
444 | // Create histograms to be saved in output file and |
445 | // store them in fOutCont |
446 | |
477d6cee |
447 | if(GetDebug()>1) printf("AliAnaParticleJetLeadingConeCorrelation::GetCreateOutputObjects() - Init histograms \n"); |
448 | |
449 | fOutCont = new TList() ; |
450 | fOutCont->SetName("ParticleJetLeadingInConeCorrelationHistograms") ; |
451 | |
452 | Int_t nptbins = GetHistoNPtBins(); |
453 | Int_t nphibins = GetHistoNPhiBins(); |
454 | Int_t netabins = GetHistoNEtaBins(); |
455 | Float_t ptmax = GetHistoPtMax(); |
456 | Float_t phimax = GetHistoPhiMax(); |
457 | Float_t etamax = GetHistoEtaMax(); |
458 | Float_t ptmin = GetHistoPtMin(); |
459 | Float_t phimin = GetHistoPhiMin(); |
460 | Float_t etamin = GetHistoEtaMin(); |
461 | |
462 | fhChargedLeadingPt = new TH2F("ChargedLeadingPt","p_{T leading charge} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
463 | fhChargedLeadingPt->SetYTitle("p_{T leading charge} /p_{T trigger}"); |
464 | fhChargedLeadingPt->SetXTitle("p_{T trigger} (GeV/c)"); |
465 | |
466 | fhChargedLeadingPhi = new TH2F("ChargedLeadingPhi","#phi_{h^{#pm}} vs p_{T trigger}", nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
467 | fhChargedLeadingPhi->SetYTitle("#phi_{h^{#pm}} (rad)"); |
468 | fhChargedLeadingPhi->SetXTitle("p_{T trigger} (GeV/c)"); |
469 | |
470 | fhChargedLeadingEta = new TH2F("ChargedLeadingEta","#eta_{h^{#pm}} vs p_{T trigger}",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
471 | fhChargedLeadingEta->SetYTitle("#eta_{h^{#pm}} "); |
472 | fhChargedLeadingEta->SetXTitle("p_{T trigger} (GeV/c)"); |
473 | |
474 | fhChargedLeadingDeltaPt = new TH2F("ChargedLeadingDeltaPt","#p_{T trigger} - #p_{T h^{#pm}} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
475 | fhChargedLeadingDeltaPt->SetYTitle("#Delta p_{T} (GeV/c)"); |
476 | fhChargedLeadingDeltaPt->SetXTitle("p_{T trigger} (GeV/c)"); |
477 | |
478 | fhChargedLeadingDeltaPhi = new TH2F("ChargedLeadingDeltaPhi","#phi_{trigger} - #phi_{h^{#pm}} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
479 | fhChargedLeadingDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
480 | fhChargedLeadingDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); |
481 | |
482 | fhChargedLeadingDeltaEta = new TH2F("ChargedLeadingDeltaEta","#eta_{trigger} - #eta_{h^{#pm}} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
483 | fhChargedLeadingDeltaEta->SetYTitle("#Delta #eta"); |
484 | fhChargedLeadingDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); |
485 | |
486 | fhChargedLeadingRatioPt = new TH2F("ChargedLeadingRatioPt","p_{T leading charge} /p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
487 | fhChargedLeadingRatioPt->SetYTitle("p_{T lead charge} /p_{T trigger}"); |
488 | fhChargedLeadingRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); |
489 | |
490 | fOutCont->Add(fhChargedLeadingPt) ; |
491 | fOutCont->Add(fhChargedLeadingPhi) ; |
492 | fOutCont->Add(fhChargedLeadingEta) ; |
493 | fOutCont->Add(fhChargedLeadingDeltaPt) ; |
494 | fOutCont->Add(fhChargedLeadingDeltaPhi) ; |
495 | fOutCont->Add(fhChargedLeadingDeltaEta) ; |
496 | fOutCont->Add(fhChargedLeadingRatioPt) ; |
497 | |
498 | if(!fJetsOnlyInCTS){ |
499 | |
500 | fhNeutralLeadingPt = new TH2F("NeutralLeadingPt","p_{T leading #pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
501 | fhNeutralLeadingPt->SetYTitle("p_{T leading #pi^{0}} /p_{T trigger}"); |
502 | fhNeutralLeadingPt->SetXTitle("p_{T trigger} (GeV/c)"); |
503 | |
504 | fhNeutralLeadingPhi = new TH2F("NeutralLeadingPhi","#phi_{#pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,nphibins,phimin,phimax); |
505 | fhNeutralLeadingPhi->SetYTitle("#phi_{#pi^{0}} (rad)"); |
506 | fhNeutralLeadingPhi->SetXTitle("p_{T trigger} (GeV/c)"); |
507 | |
508 | fhNeutralLeadingEta = new TH2F("NeutralLeadingEta","#eta_{#pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,netabins,etamin,etamax); |
509 | fhNeutralLeadingEta->SetYTitle("#eta_{#pi^{0}} "); |
510 | fhNeutralLeadingEta->SetXTitle("p_{T trigger} (GeV/c)"); |
511 | |
512 | fhNeutralLeadingDeltaPt = new TH2F("NeutralLeadingDeltaPt","#p_{T trigger} - #p_{T #pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
513 | fhNeutralLeadingDeltaPt->SetYTitle("#Delta p_{T} (GeV/c)"); |
514 | fhNeutralLeadingDeltaPt->SetXTitle("p_{T trigger} (GeV/c)"); |
515 | |
516 | fhNeutralLeadingDeltaPhi = new TH2F("NeutralLeadingDeltaPhi","#phi_{trigger} - #phi_{#pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
517 | fhNeutralLeadingDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
518 | fhNeutralLeadingDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); |
519 | |
520 | fhNeutralLeadingDeltaEta = new TH2F("NeutralLeadingDeltaEta","#eta_{trigger} - #eta_{#pi^{0}} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
521 | fhNeutralLeadingDeltaEta->SetYTitle("#Delta #eta"); |
522 | fhNeutralLeadingDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); |
523 | |
524 | fhNeutralLeadingRatioPt = new TH2F("NeutralLeadingRatioPt","p_{T leading #pi^{0}} /p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
525 | fhNeutralLeadingRatioPt->SetYTitle("p_{T lead #pi^{0}} /p_{T trigger}"); |
526 | fhNeutralLeadingRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); |
527 | |
528 | fOutCont->Add(fhNeutralLeadingPt) ; |
529 | fOutCont->Add(fhNeutralLeadingPhi) ; |
530 | fOutCont->Add(fhNeutralLeadingEta) ; |
531 | fOutCont->Add(fhNeutralLeadingDeltaPt) ; |
532 | fOutCont->Add(fhNeutralLeadingDeltaPhi) ; |
533 | fOutCont->Add(fhNeutralLeadingDeltaEta) ; |
534 | fOutCont->Add(fhNeutralLeadingRatioPt) ; |
535 | |
536 | } |
537 | |
538 | if(!fSeveralConeAndPtCuts){// not several cones |
539 | |
540 | //Jet Distributions |
541 | fhJetPt = new TH2F("JetPt","p_{T jet} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
542 | fhJetPt->SetYTitle("p_{T jet}"); |
543 | fhJetPt->SetXTitle("p_{T trigger} (GeV/c)"); |
544 | |
545 | fhJetRatioPt = new TH2F("JetRatioPt","p_{T jet}/p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
546 | fhJetRatioPt->SetYTitle("p_{T jet}/p_{T trigger}"); |
547 | fhJetRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); |
548 | |
549 | fhJetDeltaPhi = new TH2F("JetDeltaPhi","#phi_{jet} - #phi_{trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
550 | fhJetDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
551 | fhJetDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); |
552 | |
553 | fhJetDeltaEta = new TH2F("JetDeltaEta","#eta_{jet} - #eta_{trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
554 | fhJetDeltaEta->SetYTitle("#Delta #eta"); |
555 | fhJetDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); |
556 | |
557 | fhJetLeadingRatioPt = new TH2F("JetLeadingRatioPt","p_{T jet} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
558 | fhJetLeadingRatioPt->SetYTitle("p_{T leading}/p_{T jet}"); |
559 | fhJetLeadingRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); |
560 | |
561 | fhJetLeadingDeltaPhi = new TH2F("JetLeadingDeltaPhi","#phi_{jet} - #phi_{leading} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
562 | fhJetLeadingDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
563 | fhJetLeadingDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); |
564 | |
565 | fhJetLeadingDeltaEta = new TH2F("JetLeadingDeltaEta","#eta_{jet} - #eta_{leading} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
566 | fhJetLeadingDeltaEta->SetYTitle("#Delta #eta"); |
567 | fhJetLeadingDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); |
568 | |
569 | fhJetFFz = new TH2F("JetFFz","z = p_{T i charged}/p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,200,0.,2); |
570 | fhJetFFz->SetYTitle("z"); |
571 | fhJetFFz->SetXTitle("p_{T trigger}"); |
572 | |
573 | fhJetFFxi = new TH2F("JetFFxi","#xi = ln(p_{T trigger}/p_{T i charged}) vs p_{T trigger}",nptbins,ptmin,ptmax,100,0.,10.); |
574 | fhJetFFxi->SetYTitle("#xi"); |
575 | fhJetFFxi->SetXTitle("p_{T trigger}"); |
576 | |
577 | fhJetFFpt = new TH2F("JetFFpt","#xi = p_{T i charged}) vs p_{T trigger}",nptbins,ptmin,ptmax,200,0.,50.); |
578 | fhJetFFpt->SetYTitle("p_{T charged hadron}"); |
579 | fhJetFFpt->SetXTitle("p_{T trigger}"); |
580 | |
581 | fhJetNTracksInCone = new TH2F("JetNTracksInCone","N particles in cone vs p_{T trigger}",nptbins,ptmin,ptmax,5000,0, 5000); |
582 | fhJetNTracksInCone->SetYTitle("N tracks in jet cone"); |
583 | fhJetNTracksInCone->SetXTitle("p_{T trigger} (GeV/c)"); |
584 | |
585 | fOutCont->Add(fhJetPt) ; |
586 | fOutCont->Add(fhJetRatioPt) ; |
587 | fOutCont->Add(fhJetDeltaPhi) ; |
588 | fOutCont->Add(fhJetDeltaEta) ; |
589 | fOutCont->Add(fhJetLeadingRatioPt) ; |
590 | fOutCont->Add(fhJetLeadingDeltaPhi) ; |
591 | fOutCont->Add(fhJetLeadingDeltaEta) ; |
592 | fOutCont->Add(fhJetFFz) ; |
593 | fOutCont->Add(fhJetFFxi) ; |
594 | fOutCont->Add(fhJetFFpt) ; |
595 | fOutCont->Add(fhJetNTracksInCone) ; |
596 | |
597 | //Bkg Distributions |
598 | fhBkgPt = new TH2F("BkgPt","p_{T bkg} vs p_{T trigger}",nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
599 | fhBkgPt->SetYTitle("p_{T bkg}"); |
600 | fhBkgPt->SetXTitle("p_{T trigger} (GeV/c)"); |
601 | |
602 | fhBkgRatioPt = new TH2F("BkgRatioPt","p_{T bkg}/p_{T trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
603 | fhBkgRatioPt->SetYTitle("p_{T bkg}/p_{T trigger}"); |
604 | fhBkgRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); |
605 | |
606 | fhBkgDeltaPhi = new TH2F("BkgDeltaPhi","#phi_{bkg} - #phi_{trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
607 | fhBkgDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
608 | fhBkgDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); |
609 | |
610 | fhBkgDeltaEta = new TH2F("BkgDeltaEta","#eta_{bkg} - #eta_{trigger} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
611 | fhBkgDeltaEta->SetYTitle("#Delta #eta"); |
612 | fhBkgDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); |
613 | |
614 | fhBkgLeadingRatioPt = new TH2F("BkgLeadingRatioPt","p_{T bkg} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,2); |
615 | fhBkgLeadingRatioPt->SetYTitle("p_{T leading}/p_{T bkg}"); |
616 | fhBkgLeadingRatioPt->SetXTitle("p_{T trigger} (GeV/c)"); |
617 | |
618 | fhBkgLeadingDeltaPhi = new TH2F("BkgLeadingDeltaPhi","#phi_{bkg} - #phi_{leading} vs p_{T trigger}",nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
619 | fhBkgLeadingDeltaPhi->SetYTitle("#Delta #phi (rad)"); |
620 | fhBkgLeadingDeltaPhi->SetXTitle("p_{T trigger} (GeV/c)"); |
621 | |
622 | fhBkgLeadingDeltaEta = new TH2F("BkgLeadingDeltaEta","#eta_{bkg} - #eta_{leading} vs p_{T trigger}",nptbins,ptmin,ptmax,120,-2,2); |
623 | fhBkgLeadingDeltaEta->SetYTitle("#Delta #eta"); |
624 | fhBkgLeadingDeltaEta->SetXTitle("p_{T trigger} (GeV/c)"); |
625 | |
626 | fhBkgFFz = new TH2F("BkgFFz","z = p_{T i charged}/p_{T trigger} vs p_{T trigger}", nptbins,ptmin,ptmax,200,0.,2); |
627 | fhBkgFFz->SetYTitle("z"); |
628 | fhBkgFFz->SetXTitle("p_{T trigger}"); |
629 | |
630 | fhBkgFFxi = new TH2F("BkgFFxi","#xi = ln(p_{T trigger}/p_{T i charged}) vs p_{T trigger}", nptbins,ptmin,ptmax,100,0.,10.); |
631 | fhBkgFFxi->SetYTitle("#xi"); |
632 | fhBkgFFxi->SetXTitle("p_{T trigger}"); |
633 | |
634 | fhBkgFFpt = new TH2F("BkgFFpt","p_{T charged hadron } vs p_{T trigger}", nptbins,ptmin,ptmax,200,0.,50.); |
635 | fhBkgFFpt->SetYTitle("p_{T charged} hadron"); |
636 | fhBkgFFpt->SetXTitle("p_{T trigger}"); |
637 | |
638 | fhBkgNTracksInCone = new TH2F("BkgNTracksInCone","N particles in cone vs p_{T trigger}",nptbins,ptmin,ptmax,5000,0, 5000); |
639 | fhBkgNTracksInCone->SetYTitle("N tracks in bkg cone"); |
640 | fhBkgNTracksInCone->SetXTitle("p_{T trigger} (GeV/c)"); |
641 | |
642 | fOutCont->Add(fhBkgPt) ; |
643 | fOutCont->Add(fhBkgRatioPt) ; |
644 | fOutCont->Add(fhBkgDeltaPhi) ; |
645 | fOutCont->Add(fhBkgDeltaEta) ; |
646 | fOutCont->Add(fhBkgLeadingRatioPt) ; |
647 | fOutCont->Add(fhBkgLeadingDeltaPhi) ; |
648 | fOutCont->Add(fhBkgLeadingDeltaEta) ; |
649 | fOutCont->Add(fhBkgFFz) ; |
650 | fOutCont->Add(fhBkgFFxi) ; |
651 | fOutCont->Add(fhBkgFFpt) ; |
652 | fOutCont->Add(fhBkgNTracksInCone) ; |
653 | |
654 | }//not several cones |
655 | else{ //If we want to study the jet for different cones and pt |
656 | for(Int_t icone = 0; icone<fJetNCone; icone++){//icone |
657 | for(Int_t ipt = 0; ipt<fJetNPt;ipt++){ //ipt |
1c5acb87 |
658 | |
477d6cee |
659 | TString lastnamehist ="Cone"+ fJetNameCones[icone]+"Pt"+ fJetNamePtThres[ipt]; |
660 | TString lastnametitle =", cone ="+fJetNameCones[icone]+", pt > " +fJetNamePtThres[ipt]+" GeV/c"; |
1c5acb87 |
661 | |
477d6cee |
662 | //Jet Distributions |
663 | fhJetPts[icone][ipt] = new TH2F("JetPt"+lastnamehist,"p_{T jet} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
664 | fhJetPts[icone][ipt]->SetYTitle("p_{T jet}"); |
665 | fhJetPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
1c5acb87 |
666 | |
477d6cee |
667 | fhJetRatioPts[icone][ipt] = new TH2F("JetRatioPt"+lastnamehist,"p_{T jet}/p_{T trigger} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,0,2); |
668 | fhJetRatioPts[icone][ipt]->SetYTitle("p_{T jet}/p_{T trigger}"); |
669 | fhJetRatioPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
1c5acb87 |
670 | |
477d6cee |
671 | fhJetDeltaPhis[icone][ipt] = new TH2F("JetDeltaPhi"+lastnamehist,"#phi_{jet} - #phi_{trigger} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
672 | fhJetDeltaPhis[icone][ipt]->SetYTitle("#Delta #phi (rad)"); |
673 | fhJetDeltaPhis[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
1c5acb87 |
674 | |
477d6cee |
675 | fhJetDeltaEtas[icone][ipt] = new TH2F("JetDeltaEta"+lastnamehist,"#eta_{jet} - #eta_{trigger} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,-2,2); |
676 | fhJetDeltaEtas[icone][ipt]->SetYTitle("#Delta #eta"); |
677 | fhJetDeltaEtas[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
1c5acb87 |
678 | |
477d6cee |
679 | fhJetLeadingRatioPts[icone][ipt] = new TH2F("JetLeadingRatioPt"+lastnamehist,"p_{T jet} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,0,2); |
680 | fhJetLeadingRatioPts[icone][ipt]->SetYTitle("p_{T leading}/p_{T jet}"); |
681 | fhJetLeadingRatioPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
1c5acb87 |
682 | |
477d6cee |
683 | fhJetLeadingDeltaPhis[icone][ipt] = new TH2F("JetLeadingDeltaPhi"+lastnamehist,"#phi_{jet} - #phi_{leading} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
684 | fhJetLeadingDeltaPhis[icone][ipt]->SetYTitle("#Delta #phi (rad)"); |
685 | fhJetLeadingDeltaPhis[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
1c5acb87 |
686 | |
477d6cee |
687 | fhJetLeadingDeltaEtas[icone][ipt] = new TH2F("JetLeadingDeltaEta"+lastnamehist,"#eta_{jet} - #eta_{leading} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,-2,2); |
688 | fhJetLeadingDeltaEtas[icone][ipt]->SetYTitle("#Delta #eta"); |
689 | fhJetLeadingDeltaEtas[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
1c5acb87 |
690 | |
477d6cee |
691 | fhJetFFzs[icone][ipt] = new TH2F("JetFFz"+lastnamehist,"z = p_{T i charged}/p_{T trigger} vs p_{T trigger}", 120,0.,120.,200,0.,2); |
692 | fhJetFFzs[icone][ipt]->SetYTitle("z"); |
693 | fhJetFFzs[icone][ipt]->SetXTitle("p_{T trigger}"); |
1c5acb87 |
694 | |
477d6cee |
695 | fhJetFFxis[icone][ipt] = new TH2F("JetFFxi"+lastnamehist,"#xi = ln(p_{T trigger}/p_{T i charged}) vs p_{T trigger}", 120,0.,120.,100,0.,10.); |
696 | fhJetFFxis[icone][ipt]->SetYTitle("#xi"); |
697 | fhJetFFxis[icone][ipt]->SetXTitle("p_{T trigger}"); |
1c5acb87 |
698 | |
477d6cee |
699 | fhJetFFpts[icone][ipt] = new TH2F("JetFFpt"+lastnamehist,"p_{T charged hadron } in jet vs p_{T trigger}", 120,0.,120.,200,0.,50.); |
700 | fhJetFFpts[icone][ipt]->SetYTitle("p_{T charged hadron}"); |
701 | fhJetFFpts[icone][ipt]->SetXTitle("p_{T trigger}"); |
1c5acb87 |
702 | |
477d6cee |
703 | fhJetNTracksInCones[icone][ipt] = new TH2F("JetNTracksInCone"+lastnamehist,"N particles in cone vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,5000,0, 5000); |
704 | fhJetNTracksInCones[icone][ipt]->SetYTitle("N tracks in jet cone"); |
705 | fhJetNTracksInCones[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
1c5acb87 |
706 | |
477d6cee |
707 | fOutCont->Add(fhJetPts[icone][ipt]) ; |
708 | fOutCont->Add(fhJetRatioPts[icone][ipt]) ; |
709 | fOutCont->Add(fhJetDeltaPhis[icone][ipt]) ; |
710 | fOutCont->Add(fhJetDeltaEtas[icone][ipt]) ; |
711 | fOutCont->Add(fhJetLeadingRatioPts[icone][ipt]) ; |
712 | fOutCont->Add(fhJetLeadingDeltaPhis[icone][ipt]) ; |
713 | fOutCont->Add(fhJetLeadingDeltaEtas[icone][ipt]) ; |
714 | fOutCont->Add(fhJetFFzs[icone][ipt]) ; |
715 | fOutCont->Add(fhJetFFxis[icone][ipt]) ; |
716 | fOutCont->Add(fhJetFFpts[icone][ipt]) ; |
717 | fOutCont->Add(fhJetNTracksInCones[icone][ipt]) ; |
718 | |
719 | //Bkg Distributions |
720 | fhBkgPts[icone][ipt] = new TH2F("BkgPt"+lastnamehist,"p_{T bkg} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); |
721 | fhBkgPts[icone][ipt]->SetYTitle("p_{T bkg}"); |
722 | fhBkgPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
723 | |
724 | fhBkgRatioPts[icone][ipt] = new TH2F("BkgRatioPt"+lastnamehist,"p_{T bkg}/p_{T trigger} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,0,2); |
725 | fhBkgRatioPts[icone][ipt]->SetYTitle("p_{T bkg}/p_{T trigger}"); |
726 | fhBkgRatioPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
727 | |
728 | fhBkgDeltaPhis[icone][ipt] = new TH2F("BkgDeltaPhi"+lastnamehist,"#phi_{bkg} - #phi_{trigger} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
729 | fhBkgDeltaPhis[icone][ipt]->SetYTitle("#Delta #phi (rad)"); |
730 | fhBkgDeltaPhis[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
731 | |
732 | fhBkgDeltaEtas[icone][ipt] = new TH2F("BkgDeltaEta"+lastnamehist,"#eta_{bkg} - #eta_{trigger} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,-2,2); |
733 | fhBkgDeltaEtas[icone][ipt]->SetYTitle("#Delta #eta"); |
734 | fhBkgDeltaEtas[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
735 | |
736 | fhBkgLeadingRatioPts[icone][ipt] = new TH2F("BkgLeadingRatioPt"+lastnamehist,"p_{T bkg} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,0,2); |
737 | fhBkgLeadingRatioPts[icone][ipt]->SetYTitle("p_{T leading}/p_{T bkg}"); |
738 | fhBkgLeadingRatioPts[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
739 | |
740 | fhBkgLeadingDeltaPhis[icone][ipt] = new TH2F("BkgLeadingDeltaPhi"+lastnamehist,"#phi_{bkg} - #phi_{leading} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,0,TMath::TwoPi()); |
741 | fhBkgLeadingDeltaPhis[icone][ipt]->SetYTitle("#Delta #phi (rad)"); |
742 | fhBkgLeadingDeltaPhis[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
743 | |
744 | fhBkgLeadingDeltaEtas[icone][ipt] = new TH2F("BkgLeadingDeltaEta"+lastnamehist,"#eta_{bkg} - #eta_{leading} vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,120,-2,2); |
745 | fhBkgLeadingDeltaEtas[icone][ipt]->SetYTitle("#Delta #eta"); |
746 | fhBkgLeadingDeltaEtas[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
747 | |
748 | fhBkgFFzs[icone][ipt] = new TH2F("BkgFFz"+lastnamehist,"z = p_{T i charged}/p_{T trigger} vs p_{T trigger}", 120,0.,120.,200,0.,2); |
749 | fhBkgFFzs[icone][ipt]->SetYTitle("z"); |
750 | fhBkgFFzs[icone][ipt]->SetXTitle("p_{T trigger}"); |
751 | |
752 | fhBkgFFxis[icone][ipt] = new TH2F("BkgFFxi"+lastnamehist,"#xi = ln(p_{T trigger}/p_{T i charged}) vs p_{T trigger}", 120,0.,120.,100,0.,10.); |
753 | fhBkgFFxis[icone][ipt]->SetYTitle("#xi"); |
754 | fhBkgFFxis[icone][ipt]->SetXTitle("p_{T trigger}"); |
755 | |
756 | fhBkgFFpts[icone][ipt] = new TH2F("BkgFFpt"+lastnamehist,"p_{T charged hadron} in jet vs p_{T trigger}", 120,0.,120.,200,0.,50.); |
757 | fhBkgFFpts[icone][ipt]->SetYTitle("p_{T charged hadron}"); |
758 | fhBkgFFpts[icone][ipt]->SetXTitle("p_{T trigger}"); |
759 | |
760 | fhBkgNTracksInCones[icone][ipt] = new TH2F("BkgNTracksInCone"+lastnamehist,"N particles in cone vs p_{T trigger}"+lastnametitle,nptbins,ptmin,ptmax,5000,0, 5000); |
761 | fhBkgNTracksInCones[icone][ipt]->SetYTitle("N tracks in bkg cone"); |
762 | fhBkgNTracksInCones[icone][ipt]->SetXTitle("p_{T trigger} (GeV/c)"); |
763 | |
764 | fOutCont->Add(fhBkgPts[icone][ipt]) ; |
765 | fOutCont->Add(fhBkgRatioPts[icone][ipt]) ; |
766 | fOutCont->Add(fhBkgDeltaPhis[icone][ipt]) ; |
767 | fOutCont->Add(fhBkgDeltaEtas[icone][ipt]) ; |
768 | fOutCont->Add(fhBkgLeadingRatioPts[icone][ipt]) ; |
769 | fOutCont->Add(fhBkgLeadingDeltaPhis[icone][ipt]) ; |
770 | fOutCont->Add(fhBkgLeadingDeltaEtas[icone][ipt]) ; |
771 | fOutCont->Add(fhBkgFFzs[icone][ipt]) ; |
772 | fOutCont->Add(fhBkgFFxis[icone][ipt]) ; |
773 | fOutCont->Add(fhBkgFFpts[icone][ipt]) ; |
774 | fOutCont->Add(fhBkgNTracksInCones[icone][ipt]) ; |
1c5acb87 |
775 | |
477d6cee |
776 | }//ipt |
777 | } //icone |
778 | }//If we want to study any cone or pt threshold |
779 | |
780 | if(GetDebug()>2){ |
781 | printf("AliAnaParticleJetLeadingConeCorrelation::GetCreateOutputObjects() - All histograms names : \n"); |
782 | |
783 | for(Int_t i = 0 ; i< fOutCont->GetEntries(); i++) |
784 | printf("Histo i %d name %s",i,((fOutCont->At(i))->GetName())); |
785 | //cout<< (fOutCont->At(i))->GetName()<<endl; |
786 | } |
787 | |
788 | return fOutCont; |
1c5acb87 |
789 | } |
790 | |
791 | //____________________________________________________________________________ |
792 | Bool_t AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle(AliAODPWG4ParticleCorrelation *particle, TLorentzVector & pLeading) |
477d6cee |
793 | const { |
1c5acb87 |
794 | //Search Charged or Neutral leading particle, select the highest one and fill AOD |
795 | |
796 | TLorentzVector pLeadingCh(0,0,0,0) ; |
797 | TLorentzVector pLeadingPi0(0,0,0,0) ; |
798 | |
799 | GetLeadingCharge(particle, pLeadingCh) ; |
800 | if(!fJetsOnlyInCTS) GetLeadingPi0(particle, pLeadingPi0) ; |
801 | |
802 | Double_t ptch = pLeadingCh.Pt(); |
803 | Double_t ptpi = pLeadingPi0.Pt(); |
804 | |
805 | if (ptch > 0 || ptpi > 0){ |
806 | if((ptch >= ptpi)){ |
477d6cee |
807 | if(GetDebug() > 1)printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle() - Leading found in CTS \n"); |
1c5acb87 |
808 | pLeading = pLeadingCh; |
477d6cee |
809 | if(GetDebug() > 1) printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle() - Found Leading: pt %f, phi %f deg, eta %f\n", |
810 | pLeading.Pt(),pLeading.Phi()*TMath::RadToDeg(),pLeading.Eta()) ; |
1c5acb87 |
811 | //Put leading in AOD |
477d6cee |
812 | particle->SetLeading(pLeadingCh); |
813 | particle->SetLeadingDetector("CTS"); |
814 | return kTRUE; |
1c5acb87 |
815 | } |
816 | else{ |
477d6cee |
817 | if(GetDebug() > 1)printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle() - Leading found in EMCAL \n"); |
1c5acb87 |
818 | pLeading = pLeadingPi0; |
477d6cee |
819 | if(GetDebug() > 1) printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle() - Found Leading: pt %f, phi %f, eta %f\n", |
820 | pLeading.Pt(),pLeading.Phi()*TMath::RadToDeg(),pLeading.Eta()) ; |
1c5acb87 |
821 | //Put leading in AOD |
822 | particle->SetLeading(pLeadingPi0); |
823 | particle->SetLeadingDetector("EMCAL"); |
824 | return kTRUE; |
825 | } |
826 | } |
827 | |
477d6cee |
828 | if(GetDebug() > 1)printf ("AliAnaParticleJetLeadingConeCorrelation::GetLeadingParticle() - NO LEADING PARTICLE FOUND \n"); |
1c5acb87 |
829 | |
830 | return kFALSE; |
831 | |
832 | } |
833 | |
834 | //____________________________________________________________________________ |
835 | void AliAnaParticleJetLeadingConeCorrelation::GetLeadingCharge(AliAODPWG4ParticleCorrelation * particle, TLorentzVector & pLeading) const |
836 | { |
837 | //Search for the charged particle with highest pt and with |
838 | //Phi=Phi_trigger-Pi and pT=0.1E_gamma |
839 | |
840 | if(GetAODCTS()){ |
841 | Double_t ptTrig = particle->Pt(); |
842 | Double_t phiTrig = particle->Phi(); |
843 | Double_t rat = -100 ; |
844 | Double_t ptl = -100 ; |
845 | Double_t phil = -100 ; |
846 | Double_t pt = -100.; |
847 | Double_t phi = -100.; |
848 | TVector3 p3; |
849 | |
850 | for(Int_t ipr = 0;ipr < GetAODCTS()->GetEntriesFast() ; ipr ++ ){ |
851 | AliAODTrack* track = (AliAODTrack *)(GetAODCTS()->At(ipr)) ; |
852 | p3.SetXYZ(track->Px(),track->Py(),track->Pz()); |
853 | pt = p3.Pt(); |
854 | phi = p3.Phi() ; |
855 | if(phi<0) phi+=TMath::TwoPi(); |
856 | rat = pt/ptTrig ; |
477d6cee |
857 | |
1c5acb87 |
858 | //Selection within angular and energy limits |
859 | if(((phiTrig-phi) > fDeltaPhiMinCut) && ((phiTrig-phi)<fDeltaPhiMaxCut) && |
860 | (rat > fLeadingRatioMinCut) && (rat < fLeadingRatioMaxCut) && (pt > ptl)) { |
861 | phil = phi ; |
862 | ptl = pt ; |
863 | pLeading.SetVect(p3); |
864 | } |
865 | }// track loop |
866 | |
477d6cee |
867 | if(GetDebug() > 1&& ptl>0 ) printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingCharge() - Leading in CTS: pt %f eta %f phi %f pt/ptTrig %f \n", |
868 | ptl, pLeading.Eta(), phil,ptl/ptTrig) ; |
1c5acb87 |
869 | |
870 | }//CTS list exist |
871 | } |
872 | |
873 | //____________________________________________________________________________ |
874 | void AliAnaParticleJetLeadingConeCorrelation::GetLeadingPi0(AliAODPWG4ParticleCorrelation * particle, TLorentzVector & pLeading) const |
875 | { |
876 | //Search for the neutral pion with highest pt and with |
877 | //Phi=Phi_trigger-Pi and pT=0.1E_gamma |
477d6cee |
878 | |
1c5acb87 |
879 | if(GetAODEMCAL()){ |
880 | Double_t ptTrig = particle->Pt(); |
881 | Double_t phiTrig = particle->Phi(); |
882 | Double_t rat = -100 ; |
883 | Double_t ptl = -100 ; |
884 | Double_t phil = -100 ; |
885 | Double_t pt = -100.; |
886 | Double_t phi = -100.; |
887 | |
888 | TLorentzVector gammai; |
889 | TLorentzVector gammaj; |
890 | |
891 | Double_t vertex[] = {0,0,0}; |
892 | if(!GetReader()->GetDataType()== AliCaloTrackReader::kMC) GetReader()->GetVertex(vertex); |
893 | |
894 | //Cluster loop, select pairs with good pt, phi and fill AODs or histograms |
895 | for(Int_t iclus = 0;iclus < GetAODEMCAL()->GetEntriesFast() ; iclus ++ ){ |
896 | AliAODCaloCluster * calo = (AliAODCaloCluster *)(GetAODEMCAL()->At(iclus)) ; |
897 | |
898 | //Cluster selection, not charged, with photon or pi0 id and in fidutial cut |
899 | Int_t pdgi=0; |
900 | if(!SelectCluster(calo,vertex, gammai, pdgi)) continue ; |
901 | |
477d6cee |
902 | if(GetDebug() > 2) printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingPi0() - Neutral cluster: pt %f, phi %f \n", |
903 | gammai.Pt(),gammai.Phi()); |
1c5acb87 |
904 | |
905 | //2 gamma overlapped, found with PID |
906 | if(pdgi == AliCaloPID::kPi0){ |
907 | pt = gammai.Pt(); |
908 | rat = pt/ptTrig; |
909 | phi = gammai.Phi(); |
910 | if(phi<0) phi+=TMath::TwoPi(); |
911 | |
912 | //Selection within angular and energy limits |
913 | if(ptl > pt && rat > fLeadingRatioMinCut && rat < fLeadingRatioMaxCut && |
914 | (phiTrig-phil) > fDeltaPhiMinCut && (phiTrig-phil) < fDeltaPhiMaxCut ) |
915 | { |
916 | phi = phil ; |
917 | pt = ptl ; |
918 | pLeading.SetPxPyPzE(gammai.Px(),gammai.Py(),gammai.Pz(),gammai.E()); |
919 | }// cuts |
920 | }// pdg = AliCaloPID::kPi0 |
477d6cee |
921 | //Make invariant mass analysis |
1c5acb87 |
922 | else if(pdgi == AliCaloPID::kPhoton){ |
923 | //Search the photon companion in case it comes from a Pi0 decay |
924 | //Apply several cuts to select the good pair |
925 | for(Int_t jclus = iclus+1; jclus < GetAODEMCAL()->GetEntriesFast() ; jclus ++ ){ |
926 | AliAODCaloCluster * calo2 = (AliAODCaloCluster *) (GetAODEMCAL()->At(jclus)) ; |
927 | |
928 | //Cluster selection, not charged with photon or pi0 id and in fidutial cut |
929 | Int_t pdgj=0; |
930 | if(!SelectCluster(calo2,vertex, gammaj, pdgj)) continue ; |
931 | |
932 | if(pdgj == AliCaloPID::kPhoton ){ |
933 | |
934 | pt = (gammai+gammaj).Pt(); |
935 | phi = (gammai+gammaj).Phi(); |
936 | rat = pt/ptTrig; |
937 | |
938 | //Selection within angular and energy limits |
939 | if(ptl > pt && rat > fLeadingRatioMinCut && rat < fLeadingRatioMaxCut && |
940 | (phiTrig-phil) > fDeltaPhiMinCut && (phiTrig-phil) < fDeltaPhiMaxCut ){ |
941 | //Select good pair (aperture and invariant mass) |
942 | if(GetNeutralMesonSelection()->SelectPair(gammai, gammaj)){ |
943 | phi = phil ; |
944 | pt = ptl ; |
945 | pLeading=(gammai+gammaj); |
946 | }//pi0 selection |
947 | |
477d6cee |
948 | if(GetDebug() > 3 ) printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingPi0() - Neutral Hadron Correlation: Selected gamma pair: pt %2.2f, phi %2.2f, eta %2.2f, M %2.3f\n", |
1c5acb87 |
949 | (gammai+gammaj).Pt(),(gammai+gammaj).Phi(),(gammai+gammaj).Eta(), (gammai+gammaj).M()); |
950 | }//Pair selected as leading |
951 | }//if pair of gammas |
952 | }//2nd loop |
953 | }// if pdg = 22 |
954 | }// 1st Loop |
955 | |
477d6cee |
956 | if(GetDebug()>2 && pLeading.Pt() >0 ) printf("AliAnaParticleJetLeadingConeCorrelation::GetLeadingPi0() - Leading EMCAL: pt %f eta %f phi %f pt/Eg %f \n", pLeading.Pt(), pLeading.Eta(), pLeading.Phi(), pLeading.Pt()/ptTrig) ; |
1c5acb87 |
957 | |
958 | }//EMCAL list exists |
959 | |
960 | } |
961 | |
962 | //____________________________________________________________________________ |
963 | void AliAnaParticleJetLeadingConeCorrelation::InitParameters() |
964 | { |
477d6cee |
965 | //Initialize the parameters of the analysis. |
1c5acb87 |
966 | |
967 | SetInputAODName("photons"); |
968 | fJetsOnlyInCTS = kFALSE ; |
969 | fPbPb = kFALSE ; |
970 | fReMakeJet = kFALSE ; |
477d6cee |
971 | |
1c5acb87 |
972 | //Leading selection parameters |
973 | fDeltaPhiMinCut = 2.9 ; |
974 | fDeltaPhiMaxCut = 3.4 ; |
975 | fLeadingRatioMinCut = 0.1; |
976 | fLeadingRatioMaxCut = 1.5; |
977 | |
978 | //Jet selection parameters |
979 | //Fixed cut |
980 | fJetRatioMaxCut = 1.2 ; |
981 | fJetRatioMinCut = 0.3 ; |
982 | fJetCTSRatioMaxCut = 1.2 ; |
983 | fJetCTSRatioMinCut = 0.3 ; |
984 | fSelect = 0 ; //0, Accept all jets, 1, selection depends on energy, 2 fixed selection |
985 | |
477d6cee |
986 | fSelectIsolated = kFALSE; |
987 | |
1c5acb87 |
988 | //Cut depending on gamma energy |
989 | fPtTriggerSelectionCut = 10.; //For Low pt jets+BKG, another limits applied |
990 | //Reconstructed jet energy dependence parameters |
991 | //e_jet = a1+e_gamma b2. |
992 | //Index 0-> Pt>2 GeV r = 0.3; Index 1-> Pt>0.5 GeV r = 0.3 |
993 | fJetE1[0] = -5.75; fJetE1[1] = -4.1; |
994 | fJetE2[0] = 1.005; fJetE2[1] = 1.05; |
995 | |
996 | //Reconstructed sigma of jet energy dependence parameters |
997 | //s_jet = a1+e_gamma b2. |
998 | //Index 0-> Pt>2 GeV r = 0.3; Index 1-> Pt>0.5 GeV r = 0.3 |
999 | fJetSigma1[0] = 2.65; fJetSigma1[1] = 2.75; |
1000 | fJetSigma2[0] = 0.0018; fJetSigma2[1] = 0.033; |
1001 | |
1002 | //Background mean energy and RMS |
1003 | //Index 0-> No BKG; Index 1-> BKG > 2 GeV; |
1004 | //Index 2-> (low pt jets)BKG > 0.5 GeV; |
1005 | //Index > 2, same for CTS conf |
1006 | fBkgMean[0] = 0.; fBkgMean[1] = 8.8 ; fBkgMean[2] = 69.5; |
1007 | fBkgMean[3] = 0.; fBkgMean[4] = 6.4; fBkgMean[5] = 48.6; |
1008 | fBkgRMS[0] = 0.; fBkgRMS[1] = 7.5; fBkgRMS[2] = 22.0; |
1009 | fBkgRMS[3] = 0.; fBkgRMS[4] = 5.4; fBkgRMS[5] = 13.2; |
1010 | |
1011 | //Factor x of min/max = E -+ x * sigma. Obtained after selecting the |
1012 | //limits for monoenergetic jets. |
1013 | //Index 0-> No BKG; Index 1-> BKG > 2 GeV; |
1014 | //Index 2-> (low pt jets) BKG > 0.5 GeV; |
1015 | //Index > 2, same for CTS conf |
1016 | |
1017 | fJetXMin1[0] =-0.69 ; fJetXMin1[1] = 0.39 ; fJetXMin1[2] =-0.88 ; |
1018 | fJetXMin1[3] =-2.0 ; fJetXMin1[4] =-0.442 ; fJetXMin1[5] =-1.1 ; |
1019 | fJetXMin2[0] = 0.066; fJetXMin2[1] = 0.038; fJetXMin2[2] = 0.034; |
1020 | fJetXMin2[3] = 0.25 ; fJetXMin2[4] = 0.113; fJetXMin2[5] = 0.077 ; |
1021 | fJetXMax1[0] =-3.8 ; fJetXMax1[1] =-0.76 ; fJetXMax1[2] =-3.6 ; |
1022 | fJetXMax1[3] =-2.7 ; fJetXMax1[4] =-1.21 ; fJetXMax1[5] =-3.7 ; |
1023 | fJetXMax2[0] =-0.012; fJetXMax2[1] =-0.022; fJetXMax2[2] = 0.016; |
1024 | fJetXMax2[3] =-0.024; fJetXMax2[4] =-0.008; fJetXMax2[5] = 0.027; |
1025 | |
1026 | |
1027 | //Different cones and pt thresholds to construct the jet |
1028 | |
1029 | fJetCone = 0.3 ; |
1030 | fJetPtThreshold = 0.5 ; |
1031 | fJetPtThresPbPb = 2. ; |
1032 | fJetNCone = 4 ; |
1033 | fJetNPt = 4 ; |
1034 | fJetCones[0] = 0.2 ; fJetNameCones[0] = "02" ; |
1035 | fJetCones[1] = 0.3 ; fJetNameCones[1] = "03" ; |
1036 | fJetCones[2] = 0.4 ; fJetNameCones[2] = "04" ; |
1037 | fJetCones[2] = 0.5 ; fJetNameCones[2] = "05" ; |
1038 | |
1039 | fJetPtThres[0] = 0.0 ; fJetNamePtThres[0] = "00" ; |
1040 | fJetPtThres[1] = 0.5 ; fJetNamePtThres[1] = "05" ; |
1041 | fJetPtThres[2] = 1.0 ; fJetNamePtThres[2] = "10" ; |
1042 | fJetPtThres[3] = 2.0 ; fJetNamePtThres[3] = "20" ; |
1043 | } |
1044 | |
1045 | //__________________________________________________________________________- |
1046 | Bool_t AliAnaParticleJetLeadingConeCorrelation::IsJetSelected(const Double_t ptTrig, const Double_t ptjet) const { |
1047 | //Given the pt of the jet and the trigger particle, select the jet or not |
1048 | //3 options, fSelect=0 accepts all, fSelect=1 selects jets depending on a |
1049 | //function energy dependent and fSelect=2 selects on simple fixed cuts |
1050 | |
1051 | if(ptjet == 0) return kFALSE; |
477d6cee |
1052 | |
1c5acb87 |
1053 | Double_t rat = ptTrig / ptjet ; |
1054 | |
1055 | //############################################################### |
1056 | if(fSelect == 0) |
1057 | return kTRUE; //Accept all jets, no restriction |
1058 | //############################################################### |
1059 | else if(fSelect == 1){ |
1060 | //Check if the energy of the reconstructed jet is within an energy window |
1061 | //WARNING: to be rechecked, don't remember what all the steps mean |
1062 | Double_t par[6]; |
1063 | Double_t xmax[2]; |
1064 | Double_t xmin[2]; |
1065 | |
1066 | Int_t iCTS = 0; |
1067 | if(fJetsOnlyInCTS) |
1068 | iCTS = 3 ; |
1069 | |
1070 | if(!fPbPb){ |
1071 | //Phythia alone, jets with pt_th > 0.2, r = 0.3 |
1072 | par[0] = fJetE1[0]; par[1] = fJetE2[0]; |
1073 | //Energy of the jet peak |
1074 | //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit |
1075 | par[2] = fJetSigma1[0]; par[3] = fJetSigma2[0]; |
1076 | //Sigma of the jet peak |
1077 | //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit |
1078 | par[4] = fBkgMean[0 + iCTS]; par[5] = fBkgRMS[0 + iCTS]; |
1079 | //Parameters reserved for PbPb bkg. |
1080 | xmax[0] = fJetXMax1[0 + iCTS]; xmax[1] = fJetXMax2[0 + iCTS]; |
1081 | xmin[0] = fJetXMin1[0 + iCTS]; xmin[1] = fJetXMin2[0 + iCTS]; |
1082 | //Factor that multiplies sigma to obtain the best limits, |
1083 | //by observation, of mono jet ratios (ptjet/ptTrig) |
1084 | //X_jet = fJetX1[0]+fJetX2[0]*e_gamma |
1085 | |
1086 | } |
1087 | else{ |
1088 | if(ptTrig > fPtTriggerSelectionCut){ |
1089 | //Phythia +PbPb with pt_th > 2 GeV/c, r = 0.3 |
1090 | par[0] = fJetE1[0]; par[1] = fJetE2[0]; |
1091 | //Energy of the jet peak, same as in pp |
1092 | //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit |
1093 | par[2] = fJetSigma1[0]; par[3] = fJetSigma2[0]; |
1094 | //Sigma of the jet peak, same as in pp |
1095 | //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit |
1096 | par[4] = fBkgMean[1 + iCTS]; par[5] = fBkgRMS[1 + iCTS]; |
1097 | //Mean value and RMS of PbPb Bkg |
1098 | xmax[0] = fJetXMax1[1 + iCTS]; xmax[1] = fJetXMax2[1 + iCTS]; |
1099 | xmin[0] = fJetXMin1[1 + iCTS]; xmin[1] = fJetXMin2[1 + iCTS]; |
1100 | //Factor that multiplies sigma to obtain the best limits, |
1101 | //by observation, of mono jet ratios (ptjet/ptTrig) mixed with PbPb Bkg, |
1102 | //pt_th > 2 GeV, r = 0.3 |
1103 | //X_jet = fJetX1[0]+fJetX2[0]*e_gamma |
1104 | |
1105 | } |
1106 | else{ |
1107 | //Phythia + PbPb with pt_th > 0.5 GeV/c, r = 0.3 |
1108 | par[0] = fJetE1[1]; par[1] = fJetE2[1]; |
1109 | //Energy of the jet peak, pt_th > 2 GeV/c, r = 0.3 |
1110 | //e_jet = fJetE1[0]+fJetE2[0]*e_gamma, simulation fit |
1111 | par[2] = fJetSigma1[1]; par[3] = fJetSigma2[1]; |
1112 | //Sigma of the jet peak, pt_th > 2 GeV/c, r = 0.3 |
1113 | //sigma_jet = fJetSigma1[0]+fJetSigma2[0]*e_gamma, simulation fit |
1114 | par[4] = fBkgMean[2 + iCTS]; par[5] = fBkgRMS[2 + iCTS]; |
1115 | //Mean value and RMS of PbPb Bkg in a 0.3 cone, pt > 2 GeV. |
1116 | xmax[0] = fJetXMax1[2 + iCTS]; xmax[1] = fJetXMax2[2 + iCTS]; |
1117 | xmin[0] = fJetXMin1[2 + iCTS]; xmin[1] = fJetXMin2[2 + iCTS]; |
1118 | //Factor that multiplies sigma to obtain the best limits, |
1119 | //by observation, of mono jet ratios (ptjet/ptTrig) mixed with PbPb Bkg, |
1120 | //pt_th > 2 GeV, r = 0.3 |
1121 | //X_jet = fJetX1[0]+fJetX2[0]*e_gamma |
1122 | |
1123 | }//If low pt jet in bkg |
1124 | }//if Bkg |
1125 | |
1126 | //Calculate minimum and maximum limits of the jet ratio. |
1127 | Double_t min = CalculateJetRatioLimit(ptTrig, par, xmin); |
1128 | Double_t max = CalculateJetRatioLimit(ptTrig, par, xmax); |
1129 | |
477d6cee |
1130 | if(GetDebug() > 3)printf("Jet selection? : Limits min %f, max %f, pt_jet %f, pt_gamma %f, pt_jet / pt_gamma %f",min,max,ptjet,ptTrig,rat); |
1c5acb87 |
1131 | |
1132 | if(( min < rat ) && ( max > ptjet/rat)) |
1133 | return kTRUE; |
1134 | else |
1135 | return kFALSE; |
1136 | }//fSelect = 1 |
1137 | //############################################################### |
1138 | else if(fSelect == 2){ |
1139 | //Simple selection |
1140 | if(!fJetsOnlyInCTS){ |
1141 | if((rat < fJetRatioMaxCut) && (rat > fJetRatioMinCut )) return kTRUE; |
1142 | } |
1143 | else{ |
1144 | if((rat < fJetCTSRatioMaxCut) && (rat > fJetCTSRatioMinCut )) return kTRUE; |
1145 | } |
1146 | }// fSelect = 2 |
1147 | //############################################################### |
1148 | else{ |
1149 | AliError("Jet selection option larger than 2, DON'T SELECT JETS"); |
1150 | return kFALSE ; |
1151 | } |
1152 | |
1153 | return kFALSE; |
1154 | |
1155 | } |
1156 | |
1157 | //___________________________________________________________________ |
1158 | Bool_t AliAnaParticleJetLeadingConeCorrelation::IsParticleInJetCone(const Double_t eta, Double_t phi, const Double_t etal, Double_t phil) |
1159 | const { |
1160 | //Check if the particle is inside the cone defined by the leading particle |
1161 | //WARNING: To be rechecked |
1162 | |
1163 | if(phi < 0) phi+=TMath::TwoPi(); |
1164 | if(phil < 0) phil+=TMath::TwoPi(); |
1165 | Double_t rad = 10000 + fJetCone; |
1166 | |
1167 | if(TMath::Abs(phi-phil) <= (TMath::TwoPi() - fJetCone)) |
1168 | rad = TMath::Sqrt(TMath::Power(eta-etal,2)+TMath::Power(phi-phil,2)); |
1169 | else{ |
1170 | if(phi-phil > TMath::TwoPi() - fJetCone) |
1171 | rad = TMath::Sqrt(TMath::Power(eta-etal,2)+TMath::Power((phi-TMath::TwoPi())-phil,2)); |
1172 | if(phi-phil < -(TMath::TwoPi() - fJetCone)) |
1173 | rad = TMath::Sqrt(TMath::Power(eta-etal,2)+TMath::Power((phi+TMath::TwoPi())-phil,2)); |
1174 | } |
1175 | |
1176 | if(rad < fJetCone) return kTRUE ; |
1177 | else return kFALSE ; |
1178 | |
1179 | } |
1180 | |
1181 | //__________________________________________________________________ |
1182 | void AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillAOD() |
1183 | { |
1184 | //Particle-Hadron Correlation Analysis, fill AODs |
1185 | |
477d6cee |
1186 | if(!GetInputAODBranch()){ |
1187 | printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillAOD() - No input particles in AOD with name branch < %s > \n", |
1188 | GetInputAODName().Data()); |
1189 | abort(); |
1190 | } |
1c5acb87 |
1191 | if(GetDebug() > 1){ |
477d6cee |
1192 | printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillAOD() - Begin jet leading cone correlation analysis, fill AODs \n"); |
1c5acb87 |
1193 | printf("In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast()); |
1194 | printf("In CTS aod entries %d\n", GetAODCTS()->GetEntriesFast()); |
1195 | printf("In EMCAL aod entries %d\n", GetAODEMCAL()->GetEntriesFast()); |
1196 | } |
1197 | |
1198 | TLorentzVector pLeading(0,0,0,0); //It will contain the kinematics of the found leading particle |
1199 | |
1200 | //Loop on stored AOD particles, trigger |
1201 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); |
1202 | for(Int_t iaod = 0; iaod < naod ; iaod++){ |
1203 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); |
1204 | |
1205 | //Search leading particles in CTS and EMCAL |
1206 | if(GetLeadingParticle(particle, pLeading)){ |
1207 | |
1208 | //Construct the jet around the leading, Fill AOD jet particle list, select jet |
1209 | //and fill AOD with jet and background |
1210 | MakeAODJet(particle, pLeading); |
1211 | |
1212 | }//Leading found |
1213 | }//AOD trigger particle loop |
1214 | |
477d6cee |
1215 | if(GetDebug() >1)printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillAOD() - End of jet leading cone analysis, fill AODs \n"); |
1c5acb87 |
1216 | |
1217 | } |
1218 | |
1219 | //__________________________________________________________________ |
1220 | void AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms() |
1221 | { |
1222 | |
1223 | //Particle-Hadron Correlation Analysis, fill histograms |
1224 | |
477d6cee |
1225 | if(!GetInputAODBranch()){ |
1226 | printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms() - No input particles in AOD with name branch < %s > \n", |
1227 | GetInputAODName().Data()); |
1228 | abort(); |
1229 | } |
1c5acb87 |
1230 | if(GetDebug() > 1){ |
477d6cee |
1231 | printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms() - Begin jet leading cone correlation analysis, fill histograms \n"); |
1c5acb87 |
1232 | printf("In particle branch aod entries %d\n", GetInputAODBranch()->GetEntriesFast()); |
1233 | printf("In CTS aod entries %d\n", GetAODCTS()->GetEntriesFast()); |
1234 | printf("In EMCAL aod entries %d\n", GetAODEMCAL()->GetEntriesFast()); |
1235 | } |
477d6cee |
1236 | |
1c5acb87 |
1237 | TLorentzVector pLeading(0,0,0,0) ; |
1238 | |
1239 | //Loop on stored AOD particles, trigger |
1240 | Int_t naod = GetInputAODBranch()->GetEntriesFast(); |
1241 | for(Int_t iaod = 0; iaod < naod ; iaod++){ |
1242 | AliAODPWG4ParticleCorrelation* particle = (AliAODPWG4ParticleCorrelation*) (GetInputAODBranch()->At(iaod)); |
1243 | |
477d6cee |
1244 | if(OnlyIsolated() && !particle->IsIsolated()) continue; |
1245 | |
1c5acb87 |
1246 | Double_t pt = particle->Pt(); |
1247 | Double_t phi = particle->Phi(); |
1248 | Double_t eta = particle->Eta(); |
1249 | |
1250 | //Get leading particle, fill histograms |
1251 | pLeading = particle->GetLeading(); |
1252 | TString det = particle->GetLeadingDetector(); |
477d6cee |
1253 | |
1c5acb87 |
1254 | if(det!="" && pLeading.Pt() > 0){ |
1255 | Double_t ptL = pLeading.Pt(); |
1256 | Double_t phiL = pLeading.Phi(); |
1257 | if(phiL < 0 ) phiL+=TMath::TwoPi(); |
1258 | Double_t etaL = pLeading.Eta(); |
1259 | |
477d6cee |
1260 | if(GetDebug() > 1) printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms() - Leading found in %s, with pt %3.2f, phi %2.2f, eta %2.2f\n", |
1261 | det.Data(), ptL, phiL, etaL); |
1c5acb87 |
1262 | if(det == "CTS"){ |
1263 | fhChargedLeadingPt->Fill(pt,ptL); |
1264 | fhChargedLeadingPhi->Fill(pt,phiL); |
1265 | fhChargedLeadingEta->Fill(pt,etaL); |
1266 | fhChargedLeadingDeltaPt->Fill(pt,pt-ptL); |
1267 | fhChargedLeadingDeltaPhi->Fill(pt,phi-phiL); |
1268 | fhChargedLeadingDeltaEta->Fill(pt,eta-etaL); |
1269 | fhChargedLeadingRatioPt->Fill(pt,ptL/pt); |
1270 | } |
1271 | else if(det== "EMCAL"){ |
1272 | fhNeutralLeadingPt->Fill(pt,ptL); |
1273 | fhNeutralLeadingPhi->Fill(pt,phiL); |
1274 | fhNeutralLeadingEta->Fill(pt,etaL); |
1275 | fhNeutralLeadingDeltaPt->Fill(pt,pt-ptL); |
1276 | fhNeutralLeadingDeltaPhi->Fill(pt,phi-phiL); |
1277 | fhNeutralLeadingDeltaEta->Fill(pt,eta-etaL); |
1278 | fhNeutralLeadingRatioPt->Fill(pt,ptL/pt); |
1279 | } |
1280 | |
1281 | //Fill Jet histograms |
1282 | TLorentzVector bkg(0,0,0,0); |
1283 | TLorentzVector jet(0,0,0,0); |
1284 | if(!fSeveralConeAndPtCuts){//just fill histograms |
1285 | if(!fReMakeJet){ |
1286 | jet=particle->GetCorrelatedJet(); |
1287 | bkg=particle->GetCorrelatedBackground(); |
1288 | } |
1289 | else MakeJetFromAOD(particle, pLeading, jet,bkg); |
1290 | |
1291 | if(jet.Pt() > 0){//Jet was found |
1292 | FillJetHistos(particle, pLeading, jet,"Jet",""); |
1293 | FillJetHistos(particle, pLeading, bkg,"Bkg",""); |
1294 | } |
1295 | } |
1296 | else if(fSeveralConeAndPtCuts){ |
1297 | for(Int_t icone = 0; icone<fJetNCone; icone++) { |
1298 | fJetCone=fJetCones[icone]; |
1299 | for(Int_t ipt = 0; ipt<fJetNPt;ipt++) { |
1300 | TString lastname ="Cone"+ fJetNameCones[icone]+"Pt"+ fJetNamePtThres[ipt]; |
1301 | fJetPtThreshold=fJetPtThres[ipt]; |
1302 | MakeJetFromAOD(particle, pLeading, jet,bkg); |
1303 | if(jet.Pt() > 0) {//Jet was found |
1304 | FillJetHistos(particle, pLeading, jet,"Jet",lastname); |
1305 | FillJetHistos(particle, pLeading, bkg,"Bkg",lastname); |
1306 | } |
1307 | }//icone |
1308 | }//ipt |
1309 | }//fSeveralConeAndPtCuts |
1310 | }//Leading |
1311 | }//AOD trigger particle loop |
1312 | |
477d6cee |
1313 | if(GetDebug() >1)printf("AliAnaParticleJetLeadingConeCorrelation::MakeAnalysisFillHistograms() - End of jet leading cone analysis, fill histograms \n"); |
1c5acb87 |
1314 | |
1315 | } |
1316 | |
1317 | //____________________________________________________________________________ |
1318 | void AliAnaParticleJetLeadingConeCorrelation::MakeAODJet(AliAODPWG4ParticleCorrelation *particle, const TLorentzVector pLeading) |
1319 | const { |
1320 | //Fill the jet with the particles around the leading particle with |
1321 | //R=fJetCone and pt_th = fJetPtThres. Calculate the energy of the jet and |
1322 | //fill aod with found information |
1323 | |
1324 | TLorentzVector bkg(0,0,0,0); |
1325 | TLorentzVector jet(0,0,0,0); |
1326 | TLorentzVector lv (0,0,0,0); //Temporal container for jet particles kinematics |
1327 | |
477d6cee |
1328 | Double_t ptTrig = particle->Pt(); |
1329 | Double_t phiTrig = particle->Phi(); |
1330 | Double_t phil = pLeading.Phi(); |
1c5acb87 |
1331 | if(phil<0) phil+=TMath::TwoPi(); |
477d6cee |
1332 | Double_t etal = pLeading.Eta(); |
1333 | Bool_t first = kTRUE; |
1334 | Bool_t firstbkg = kTRUE; |
1335 | |
1c5acb87 |
1336 | //Different pt cut for jet particles in different collisions systems |
1337 | Float_t ptcut = fJetPtThreshold; |
1338 | if(fPbPb && !fSeveralConeAndPtCuts && ptTrig > fPtTriggerSelectionCut) ptcut = fJetPtThresPbPb ; |
1339 | |
1340 | //Add charged particles to jet if they are in cone around the leading particle |
1341 | if(!GetAODCTS()) { |
477d6cee |
1342 | printf("AliAnaParticleJetLeadingConeCorrelation::MakeAODJet() - Cannot construct jets without tracks, STOP analysis"); |
1c5acb87 |
1343 | return; |
1344 | } |
1345 | |
1346 | //Fill jet with tracks |
1347 | TVector3 p3; |
1348 | for(Int_t ipr = 0;ipr < (GetAODCTS())->GetEntriesFast() ; ipr ++ ){ |
1349 | AliAODTrack* track = (AliAODTrack *)((GetAODCTS())->At(ipr)) ; |
1350 | p3.SetXYZ(track->Px(),track->Py(),track->Pz()); |
1351 | |
1352 | //Particles in jet |
1353 | if(IsParticleInJetCone(p3.Eta(), p3.Phi(), etal, phil)){ |
477d6cee |
1354 | |
1355 | if(first) { |
1356 | new (particle->GetRefTracks()) TRefArray(TProcessID::GetProcessWithUID(track)); |
1357 | first = kFALSE; |
1358 | } |
1359 | |
1c5acb87 |
1360 | particle->AddTrack(track); |
1361 | if(p3.Pt() > ptcut ){ |
1362 | lv.SetVect(p3); |
1363 | jet+=lv; |
1364 | } |
1365 | } |
1366 | //Background around (phi_gamma-pi, eta_leading) |
1367 | else if(IsParticleInJetCone(p3.Eta(),p3.Phi(),etal, phiTrig)) { |
477d6cee |
1368 | |
1369 | if(firstbkg) { |
1370 | new (particle->GetRefBackgroundTracks()) TRefArray(TProcessID::GetProcessWithUID(track)); |
1371 | firstbkg = kFALSE; |
1372 | } |
1373 | |
1c5acb87 |
1374 | particle->AddBackgroundTrack(track); |
1375 | if(p3.Pt() > ptcut ){ |
1376 | lv.SetVect(p3); |
1377 | bkg+=lv; |
1378 | } |
1379 | } |
1380 | }//Track loop |
1381 | |
1382 | //Add neutral particles to jet |
1383 | if(!fJetsOnlyInCTS && GetAODEMCAL()){ |
1384 | |
1385 | Double_t vertex[] = {0,0,0}; |
1386 | if(!GetReader()->GetDataType()== AliCaloTrackReader::kMC) GetReader()->GetVertex(vertex); |
477d6cee |
1387 | |
1388 | first = kTRUE; |
1389 | firstbkg = kTRUE; |
1c5acb87 |
1390 | for(Int_t iclus = 0;iclus < (GetAODEMCAL())->GetEntriesFast() ; iclus ++ ){ |
1391 | AliAODCaloCluster * calo = (AliAODCaloCluster *) (GetAODEMCAL()->At(iclus)) ; |
1392 | |
1393 | //Cluster selection, not charged |
1394 | if(calo->GetNTracksMatched() > 0) continue ; |
1395 | |
1396 | calo->GetMomentum(lv,vertex); |
1397 | //Particles in jet |
1398 | if(IsParticleInJetCone(lv.Eta(),lv.Phi(), etal, phil)){ |
477d6cee |
1399 | |
1400 | if(first) { |
1401 | new (particle->GetRefClusters()) TRefArray(TProcessID::GetProcessWithUID(calo)); |
1402 | first = kFALSE; |
1403 | } |
1404 | |
1c5acb87 |
1405 | particle->AddCluster(calo); |
1406 | if(lv.Pt() > ptcut ) jet+=lv; |
1407 | } |
1408 | //Background around (phi_gamma-pi, eta_leading) |
1409 | else if(IsParticleInJetCone(lv.Eta(),lv.Phi(),etal, phiTrig)){ |
477d6cee |
1410 | |
1411 | if(firstbkg) { |
1412 | new (particle->GetRefBackgroundClusters()) TRefArray(TProcessID::GetProcessWithUID(calo)); |
1413 | firstbkg = kFALSE; |
1414 | } |
1415 | |
1c5acb87 |
1416 | particle->AddBackgroundCluster(calo); |
1417 | if(lv.Pt() > ptcut ) bkg+=lv; |
1418 | } |
1419 | }//cluster loop |
1420 | }//jets with neutral particles |
1421 | |
1422 | //If there is any jet found, select after some criteria and |
1423 | //and fill AOD with corresponding TLorentzVector kinematics |
1424 | if(IsJetSelected(particle->Pt(), jet.Pt())) { |
1425 | particle->SetCorrelatedJet(jet); |
1426 | particle->SetCorrelatedBackground(bkg); |
477d6cee |
1427 | if(GetDebug()>1) printf("AliAnaParticleJetLeadingConeCorrelation::MakeAODJet() - Found jet: Trigger pt %f, Jet pt %f, Bkg pt %f\n",ptTrig,jet.Pt(),bkg.Pt()); |
1c5acb87 |
1428 | } |
1429 | |
1430 | } |
1431 | |
1432 | //____________________________________________________________________________ |
1433 | void AliAnaParticleJetLeadingConeCorrelation::MakeJetFromAOD(AliAODPWG4ParticleCorrelation *particle, const TLorentzVector pLeading, TLorentzVector & jet, TLorentzVector & bkg) |
1434 | const { |
1435 | //Fill the jet with the particles around the leading particle with |
1436 | //R=fJetCone and pt_th = fJetPtThres. Calculate the energy of the jet and |
1437 | //fill aod tlorentzvectors with jet and bakcground found |
1438 | |
1439 | TLorentzVector lv (0,0,0,0); //Temporal container for jet particles kinematics |
1440 | |
1441 | Double_t ptTrig = particle->Pt(); |
1442 | Double_t phiTrig = particle->Phi(); |
1443 | Double_t phil = pLeading.Phi(); |
1444 | Double_t etal = pLeading.Eta(); |
1445 | |
1446 | //Different pt cut for jet particles in different collisions systems |
1447 | Float_t ptcut = fJetPtThreshold; |
1448 | if(fPbPb && !fSeveralConeAndPtCuts && ptTrig > fPtTriggerSelectionCut) ptcut = fJetPtThresPbPb ; |
1449 | |
1450 | //Fill jet with tracks |
1451 | //Particles in jet |
1452 | TVector3 p3; |
1453 | for(Int_t ipr = 0;ipr < (particle->GetRefTracks())->GetEntriesFast() ; ipr ++ ){ |
1454 | AliAODTrack* track = (AliAODTrack *) ((particle-> GetRefTracks())->At(ipr)) ; |
1455 | p3.SetXYZ(track->Px(),track->Py(),track->Pz()); |
1456 | if(p3.Pt() > ptcut && IsParticleInJetCone(p3.Eta(), p3.Phi(), etal, phil) ){ |
1457 | lv.SetVect(p3); |
1458 | jet+=lv; |
1459 | } |
1460 | }//jet Track loop |
1461 | |
1462 | //Particles in background |
1463 | for(Int_t ipr = 0;ipr < (particle-> GetRefBackgroundTracks())->GetEntriesFast() ; ipr ++ ){ |
1464 | AliAODTrack* track = (AliAODTrack *) ((particle->GetRefBackgroundTracks())->At(ipr)) ; |
1465 | p3.SetXYZ(track->Px(),track->Py(),track->Pz()); |
1466 | if(p3.Pt() > ptcut && IsParticleInJetCone(p3.Eta(),p3.Phi(),etal, phiTrig) ) { |
1467 | lv.SetVect(p3); |
1468 | bkg+=lv; |
1469 | } |
1470 | }//background Track loop |
1471 | |
1472 | //Add neutral particles to jet |
1473 | if(!fJetsOnlyInCTS && (particle->GetRefClusters())){ |
1474 | |
1475 | Double_t vertex[] = {0,0,0}; |
1476 | if(!GetReader()->GetDataType()== AliCaloTrackReader::kMC) GetReader()->GetVertex(vertex); |
1477 | |
1478 | //Loop on jet particles |
1479 | for(Int_t iclus = 0;iclus < (particle->GetRefClusters())->GetEntriesFast() ; iclus ++ ){ |
1480 | AliAODCaloCluster * calo = (AliAODCaloCluster *) ((particle->GetRefClusters())->At(iclus)) ; |
1481 | calo->GetMomentum(lv,vertex); |
1482 | if(lv.Pt() > ptcut && IsParticleInJetCone(lv.Eta(),lv.Phi(), etal, phil)) jet+=lv; |
1483 | }//jet cluster loop |
1484 | |
1485 | //Loop on background particles |
1486 | for(Int_t iclus = 0;iclus < (particle->GetRefClusters())->GetEntriesFast() ; iclus ++ ){ |
1487 | AliAODCaloCluster * calo = (AliAODCaloCluster *) ((particle->GetRefClusters())->At(iclus)) ; |
1488 | calo->GetMomentum(lv,vertex); |
1489 | if( lv.Pt() > ptcut &&IsParticleInJetCone(lv.Eta(),lv.Phi(),etal, phiTrig)) bkg+=lv; |
1490 | }//background cluster loop |
1491 | }//clusters in jet |
1492 | |
1493 | //If there is any jet found, leave jet and bkg as they are, |
1494 | //if not set them to 0. |
1495 | if(!IsJetSelected(particle->Pt(), jet.Pt())) { |
1496 | jet.SetPxPyPzE(0.,0.,0.,0.); |
1497 | bkg.SetPxPyPzE(0.,0.,0.,0.); |
1498 | } |
1499 | else |
477d6cee |
1500 | if(GetDebug()>1) printf("AliAnaParticleJetLeadingConeCorrelation::MakeJetFromAOD()::Found jet: Trigger pt %f, Jet pt %f, Bkg pt %f\n",ptTrig,jet.Pt(),bkg.Pt()); |
1c5acb87 |
1501 | |
1502 | } |
1503 | |
1504 | //____________________________________________________________________________ |
1505 | Bool_t AliAnaParticleJetLeadingConeCorrelation::SelectCluster(AliAODCaloCluster * calo, Double_t *vertex, TLorentzVector & mom, Int_t & pdg) const { |
1506 | //Select cluster depending on its pid and acceptance selections |
1507 | |
1508 | //Skip matched clusters with tracks |
1509 | if(calo->GetNTracksMatched() > 0) return kFALSE; |
1510 | |
1511 | //Check PID |
1512 | calo->GetMomentum(mom,vertex);//Assume that come from vertex in straight line |
1513 | pdg = AliCaloPID::kPhoton; |
1514 | if(IsCaloPIDOn()){ |
1515 | //Get most probable PID, 2 options check PID weights (in MC this option is mandatory) |
1516 | //or redo PID, recommended option for EMCal. |
1517 | if(!IsCaloPIDRecalculationOn() || GetReader()->GetDataType() == AliCaloTrackReader::kMC ) |
1518 | pdg = GetCaloPID()->GetPdg("EMCAL",calo->PID(),mom.E());//PID with weights |
1519 | else |
1520 | pdg = GetCaloPID()->GetPdg("EMCAL",mom,calo);//PID recalculated |
1521 | |
477d6cee |
1522 | if(GetDebug() > 1) printf("AliAnaParticleJetLeadingConeCorrelation::SelectCluster() - PDG of identified particle %d\n",pdg); |
1c5acb87 |
1523 | //If it does not pass pid, skip |
1524 | if(pdg != AliCaloPID::kPhoton || pdg != AliCaloPID::kPi0) |
1525 | return kFALSE ; |
1526 | }//CaloPID |
1527 | |
1528 | //Check acceptance selection |
1529 | if(IsFidutialCutOn()){ |
1530 | Bool_t in = GetFidutialCut()->IsInFidutialCut(mom,"EMCAL") ; |
1531 | if(! in ) return kFALSE ; |
1532 | } |
1533 | |
477d6cee |
1534 | if(GetDebug() > 1) printf("AliAnaParticleJetLeadingConeCorrelation::SelectCluster() - Cluster selection cuts passed: pT %3.2f, pdg %d\n",mom.Pt(), pdg); |
1c5acb87 |
1535 | |
1536 | return kTRUE; |
1537 | |
1538 | } |
1539 | |
1540 | //__________________________________________________________________ |
1541 | void AliAnaParticleJetLeadingConeCorrelation::Print(const Option_t * opt) const |
1542 | { |
1543 | |
1544 | //Print some relevant parameters set for the analysis |
1545 | if(! opt) |
1546 | return; |
1547 | |
1548 | Info("Print", "%s %s", GetName(), GetTitle() ) ; |
1549 | |
1550 | if(fJetsOnlyInCTS)printf("Jets reconstructed in CTS \n"); |
1551 | else printf("Jets reconstructed in CTS+EMCAL \n"); |
1552 | |
1553 | if(fPbPb) printf("PbPb events, pT cut in jet cone energy reconstruction %2.1f \n", fJetPtThreshold); |
1554 | else printf("pp events, pT cut in jet cone energy reconstruction %2.1f \n", fJetPtThresPbPb); |
1555 | |
1556 | printf("If pT of trigger < %f, select jets as in pp? \n", fPtTriggerSelectionCut); |
1557 | |
1558 | printf("Phi gamma-Leading < %3.2f\n", fDeltaPhiMaxCut) ; |
1559 | printf("Phi gamma-Leading > %3.2f\n", fDeltaPhiMinCut) ; |
1560 | printf("pT Leading / pT Trigger < %3.2f\n", fLeadingRatioMaxCut) ; |
1561 | printf("pT Leading / pT Trigger > %3.2f\n", fLeadingRatioMinCut) ; |
1562 | |
1563 | if(fSelect == 2){ |
1564 | printf("pT Jet / pT Gamma < %3.2f\n", fJetRatioMaxCut) ; |
1565 | printf("pT Jet / pT Gamma > %3.2f\n", fJetRatioMinCut) ; |
1566 | printf("pT Jet (Only CTS)/ pT Trigger < %3.2f\n", fJetCTSRatioMaxCut) ; |
1567 | printf("pT Jet (Only CTS)/ pT Trigger > %3.2f\n", fJetCTSRatioMinCut) ; |
1568 | } |
1569 | else if(fSelect == 0) |
1570 | printf("Accept all reconstructed jets \n") ; |
1571 | else if(fSelect == 1) |
1572 | printf("Accept jets depending on trigger energy \n") ; |
1573 | else |
1574 | printf("Wrong jet selection option: %d \n", fSelect) ; |
477d6cee |
1575 | |
1576 | printf("Isolated Trigger? %d\n", fSelectIsolated) ; |
1c5acb87 |
1577 | |
1578 | } |