]>
Commit | Line | Data |
---|---|---|
3af23c82 | 1 | // ************************************************************************* |
2 | // * * | |
3 | // * Task for Fragmentation Function Analysis in PWG4 Jet Task Force Train * | |
4 | // * * | |
5 | // ************************************************************************* | |
656dc810 | 6 | |
7 | ||
8 | /************************************************************************** | |
9 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
10 | * * | |
11 | * Author: The ALICE Off-line Project. * | |
12 | * Contributors are mentioned in the code where appropriate. * | |
13 | * * | |
14 | * Permission to use, copy, modify and distribute this software and its * | |
15 | * documentation strictly for non-commercial purposes is hereby granted * | |
16 | * without fee, provided that the above copyright notice appears in all * | |
17 | * copies and that both the copyright notice and this permission notice * | |
18 | * appear in the supporting documentation. The authors make no claims * | |
19 | * about the suitability of this software for any purpose. It is * | |
20 | * provided "as is" without express or implied warranty. * | |
21 | **************************************************************************/ | |
22 | ||
23 | /* $Id: */ | |
24 | ||
25 | #include "TList.h" | |
26 | #include "TH1F.h" | |
27 | #include "TH2F.h" | |
67e37e80 | 28 | #include "TH3F.h" |
656dc810 | 29 | #include "TString.h" |
3af23c82 | 30 | #include "THnSparse.h" |
ac017ff3 | 31 | #include "TProfile.h" |
32 | #include "TFile.h" | |
33 | #include "TKey.h" | |
67e37e80 | 34 | #include "TRandom3.h" |
656dc810 | 35 | |
36 | #include "AliAODInputHandler.h" | |
37 | #include "AliAODHandler.h" | |
38 | #include "AliESDEvent.h" | |
39 | #include "AliAODMCParticle.h" | |
40 | #include "AliAODJet.h" | |
3af23c82 | 41 | #include "AliAODJetEventBackground.h" |
656dc810 | 42 | #include "AliGenPythiaEventHeader.h" |
5fde4a38 | 43 | #include "AliGenHijingEventHeader.h" |
656dc810 | 44 | #include "AliInputEventHandler.h" |
45 | ||
46 | #include "AliAnalysisHelperJetTasks.h" | |
47 | #include "AliAnalysisManager.h" | |
48 | #include "AliAnalysisTaskSE.h" | |
3e1c1eee | 49 | #include "AliVParticle.h" |
50 | #include "AliVEvent.h" | |
656dc810 | 51 | |
52 | #include "AliAnalysisTaskFragmentationFunction.h" | |
53 | ||
54 | ||
55 | ClassImp(AliAnalysisTaskFragmentationFunction) | |
56 | ||
57 | //____________________________________________________________________________ | |
58 | AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction() | |
59 | : AliAnalysisTaskSE() | |
60 | ,fESD(0) | |
61 | ,fAOD(0) | |
656dc810 | 62 | ,fBranchRecJets("jets") |
3af23c82 | 63 | ,fBranchRecBackJets("backjets") |
656dc810 | 64 | ,fBranchGenJets("") |
65 | ,fTrackTypeGen(0) | |
66 | ,fJetTypeGen(0) | |
fe343c6b | 67 | ,fJetTypeRecEff(0) |
656dc810 | 68 | ,fFilterMask(0) |
ac017ff3 | 69 | ,fUsePhysicsSelection(kTRUE) |
3af23c82 | 70 | ,fEventClass(0) |
71 | ,fMaxVertexZ(10) | |
656dc810 | 72 | ,fTrackPtCut(0) |
73 | ,fTrackEtaMin(0) | |
74 | ,fTrackEtaMax(0) | |
75 | ,fTrackPhiMin(0) | |
76 | ,fTrackPhiMax(0) | |
77 | ,fJetPtCut(0) | |
78 | ,fJetEtaMin(0) | |
79 | ,fJetEtaMax(0) | |
80 | ,fJetPhiMin(0) | |
81 | ,fJetPhiMax(0) | |
82 | ,fDiJetCut(0) | |
83 | ,fDiJetDeltaPhiCut(0) | |
84 | ,fDiJetPtFractionCut(0) | |
85 | ,fDiJetCDFCut(0) | |
86 | ,fDiJetKindBins(0) | |
87 | ,fFFRadius(0) | |
1da9498b | 88 | ,fFFBckgRadius(0) |
89 | ,fBckgMode(0) | |
67e37e80 | 90 | ,fIJMode(0) |
3af23c82 | 91 | ,fQAMode(0) |
92 | ,fFFMode(0) | |
93 | ,fDJMode(0) | |
94 | ,fEffMode(0) | |
95 | ,fPhiCorrMode(0) | |
cb76764e | 96 | ,fUseRecEffRecJetPtBins(1) |
c2658535 | 97 | ,fAvgTrials(0) |
656dc810 | 98 | ,fTracksRec(0) |
99 | ,fTracksRecCuts(0) | |
100 | ,fTracksGen(0) | |
fe343c6b | 101 | ,fTracksAODMCCharged(0) |
102 | ,fTracksRecQualityCuts(0) | |
656dc810 | 103 | ,fJetsRec(0) |
104 | ,fJetsRecCuts(0) | |
105 | ,fJetsGen(0) | |
fe343c6b | 106 | ,fJetsRecEff(0) |
67e37e80 | 107 | ,fBckgJetsRec(0) |
108 | ,fBckgJetsRecCuts(0) | |
109 | ,fBckgJetsGen(0) | |
656dc810 | 110 | ,fQATrackHistosRec(0) |
111 | ,fQATrackHistosRecCuts(0) | |
112 | ,fQATrackHistosGen(0) | |
113 | ,fQAJetHistosRec(0) | |
114 | ,fQAJetHistosRecCuts(0) | |
115 | ,fQAJetHistosRecCutsLeading(0) | |
116 | ,fQAJetHistosGen(0) | |
117 | ,fQAJetHistosGenLeading(0) | |
fe343c6b | 118 | ,fQAJetHistosRecEffLeading(0) |
656dc810 | 119 | ,fFFHistosRecCuts(0) |
120 | ,fFFHistosRecLeading(0) | |
121 | ,fFFHistosRecLeadingTrack(0) | |
122 | ,fFFHistosGen(0) | |
123 | ,fFFHistosGenLeading(0) | |
124 | ,fFFHistosGenLeadingTrack(0) | |
125 | ,fIJHistosRecCuts(0) | |
126 | ,fIJHistosRecLeading(0) | |
127 | ,fIJHistosRecLeadingTrack(0) | |
128 | ,fIJHistosGen(0) | |
129 | ,fIJHistosGenLeading(0) | |
130 | ,fIJHistosGenLeadingTrack(0) | |
131 | ,fFFDiJetHistosRecCuts(0) | |
132 | ,fFFDiJetHistosRecLeading(0) | |
133 | ,fFFDiJetHistosRecLeadingTrack(0) | |
134 | ,fFFDiJetHistosGen(0) | |
135 | ,fFFDiJetHistosGenLeading(0) | |
136 | ,fFFDiJetHistosGenLeadingTrack(0) | |
137 | ,fQADiJetHistosRecCuts(0) | |
138 | ,fQADiJetHistosGen(0) | |
3af23c82 | 139 | ,fPhiCorrHistosJetArea(0) |
140 | ,fPhiCorrHistosTransverseArea(0) | |
141 | ,fPhiCorrHistosAwayArea(0) | |
656dc810 | 142 | ,fQATrackHighPtThreshold(0) |
143 | ,fFFNBinsJetPt(0) | |
144 | ,fFFJetPtMin(0) | |
145 | ,fFFJetPtMax(0) | |
146 | ,fFFNBinsPt(0) | |
147 | ,fFFPtMin(0) | |
148 | ,fFFPtMax(0) | |
149 | ,fFFNBinsXi(0) | |
150 | ,fFFXiMin(0) | |
151 | ,fFFXiMax(0) | |
152 | ,fFFNBinsZ(0) | |
153 | ,fFFZMin(0) | |
154 | ,fFFZMax(0) | |
155 | ,fQAJetNBinsPt(0) | |
156 | ,fQAJetPtMin(0) | |
157 | ,fQAJetPtMax(0) | |
158 | ,fQAJetNBinsEta(0) | |
159 | ,fQAJetEtaMin(0) | |
160 | ,fQAJetEtaMax(0) | |
161 | ,fQAJetNBinsPhi(0) | |
162 | ,fQAJetPhiMin(0) | |
163 | ,fQAJetPhiMax(0) | |
164 | ,fQATrackNBinsPt(0) | |
165 | ,fQATrackPtMin(0) | |
166 | ,fQATrackPtMax(0) | |
167 | ,fQATrackNBinsEta(0) | |
168 | ,fQATrackEtaMin(0) | |
169 | ,fQATrackEtaMax(0) | |
170 | ,fQATrackNBinsPhi(0) | |
171 | ,fQATrackPhiMin(0) | |
172 | ,fQATrackPhiMax(0) | |
173 | ,fIJNBinsJetPt(0) | |
174 | ,fIJJetPtMin(0) | |
175 | ,fIJJetPtMax(0) | |
176 | ,fIJNBinsPt(0) | |
177 | ,fIJPtMin(0) | |
178 | ,fIJPtMax(0) | |
179 | ,fIJNBinsZ(0) | |
180 | ,fIJZMin(0) | |
181 | ,fIJZMax(0) | |
182 | ,fIJNBinsCosTheta(0) | |
183 | ,fIJCosThetaMin(0) | |
184 | ,fIJCosThetaMax(0) | |
185 | ,fIJNBinsTheta(0) | |
186 | ,fIJThetaMin(0) | |
187 | ,fIJThetaMax(0) | |
188 | ,fIJNBinsJt(0) | |
189 | ,fIJJtMin(0) | |
190 | ,fIJJtMax(0) | |
191 | ,fDiJetNBinsJetInvMass(0) | |
192 | ,fDiJetJetInvMassMin(0) | |
193 | ,fDiJetJetInvMassMax(0) | |
194 | ,fDiJetNBinsJetPt(0) | |
195 | ,fDiJetJetPtMin(0) | |
196 | ,fDiJetJetPtMax(0) | |
197 | ,fDiJetNBinsPt(0) | |
198 | ,fDiJetPtMin(0) | |
199 | ,fDiJetPtMax(0) | |
200 | ,fDiJetNBinsXi(0) | |
201 | ,fDiJetXiMin(0) | |
202 | ,fDiJetXiMax(0) | |
203 | ,fDiJetNBinsZ(0) | |
204 | ,fDiJetZMin(0) | |
205 | ,fDiJetZMax(0) | |
206 | ,fQADiJetNBinsInvMass(0) | |
207 | ,fQADiJetInvMassMin(0) | |
208 | ,fQADiJetInvMassMax(0) | |
209 | ,fQADiJetNBinsJetPt(0) | |
210 | ,fQADiJetJetPtMin(0) | |
211 | ,fQADiJetJetPtMax(0) | |
212 | ,fQADiJetNBinsDeltaPhi(0) | |
213 | ,fQADiJetDeltaPhiMin(0) | |
214 | ,fQADiJetDeltaPhiMax(0) | |
215 | ,fQADiJetNBinsDeltaEta(0) | |
216 | ,fQADiJetDeltaEtaMin(0) | |
217 | ,fQADiJetDeltaEtaMax(0) | |
218 | ,fQADiJetNBinsDeltaPt(0) | |
219 | ,fQADiJetDeltaPtMin(0) | |
220 | ,fQADiJetDeltaPtMax(0) | |
3af23c82 | 221 | ,fQADiJetNBinsInBal(0) |
222 | ,fQADiJetInBalMin(0) | |
223 | ,fQADiJetInBalMax(0) | |
224 | ,fPhiCorrNBinsPt(0) | |
225 | ,fPhiCorrPtMin(0) | |
226 | ,fPhiCorrPtMax(0) | |
227 | ,fPhiCorrNBinsEta(0) | |
228 | ,fPhiCorrEtaMin(0) | |
229 | ,fPhiCorrEtaMax(0) | |
230 | ,fPhiCorrNBinsPhi(0) | |
231 | ,fPhiCorrPhiMin(0) | |
232 | ,fPhiCorrPhiMax(0) | |
656dc810 | 233 | ,fCommonHistList(0) |
234 | ,fh1EvtSelection(0) | |
235 | ,fh1VertexNContributors(0) | |
236 | ,fh1VertexZ(0) | |
237 | ,fh1EvtMult(0) | |
3af23c82 | 238 | ,fh1EvtCent(0) |
ac017ff3 | 239 | ,fh1Xsec(0) |
240 | ,fh1Trials(0) | |
241 | ,fh1PtHard(0) | |
242 | ,fh1PtHardTrials(0) | |
656dc810 | 243 | ,fh1nRecJetsCuts(0) |
244 | ,fh1nGenJets(0) | |
fe343c6b | 245 | ,fh1nRecEffJets(0) |
67e37e80 | 246 | ,fh1nRecBckgJetsCuts(0) |
247 | ,fh1nGenBckgJets(0) | |
cb76764e | 248 | ,fh2PtRecVsGenPrim(0) |
249 | ,fQATrackHistosRecEffGen(0) | |
250 | ,fQATrackHistosRecEffRec(0) | |
251 | ,fFFHistosRecEffGen(0) | |
3af23c82 | 252 | ,fFFHistosRecEffRec(0) |
253 | ,fhnResponseSinglePt(0) | |
254 | ,fhnResponseJetTrackPt(0) | |
255 | ,fhnResponseJetZ(0) | |
256 | ,fhnResponseJetXi(0) | |
1da9498b | 257 | // Background |
258 | ,fh1OutLeadingMult(0) | |
259 | ,fh1PerpMult(0) | |
3af23c82 | 260 | ,fh1ASideMult(0) |
261 | ,fh1ASideWindowMult(0) | |
262 | ,fh1PerpWindowMult(0) | |
1da9498b | 263 | ,fh1Out2JetsMult(0) |
264 | ,fh1Out3JetsMult(0) | |
67e37e80 | 265 | ,fQABckgHisto0RecCuts(0) |
266 | ,fQABckgHisto0Gen(0) | |
267 | ,fQABckgHisto1RecCuts(0) | |
268 | ,fQABckgHisto1Gen(0) | |
269 | ,fQABckgHisto2RecCuts(0) | |
270 | ,fQABckgHisto2Gen(0) | |
271 | ,fFFBckgHisto0RecCuts(0) | |
272 | ,fFFBckgHisto0RecLeading(0) | |
273 | ,fFFBckgHisto0Gen(0) | |
274 | ,fFFBckgHisto0GenLeading(0) | |
275 | ,fFFBckgHisto1RecCuts(0) | |
276 | ,fFFBckgHisto1RecLeading(0) | |
277 | ,fFFBckgHisto1Gen(0) | |
278 | ,fFFBckgHisto1GenLeading(0) | |
279 | ,fFFBckgHisto2RecCuts(0) | |
280 | ,fFFBckgHisto2RecLeading(0) | |
281 | ,fFFBckgHisto2Gen(0) | |
282 | ,fFFBckgHisto2GenLeading(0) | |
283 | ,fIJBckgHisto0RecCuts(0) | |
284 | ,fIJBckgHisto0RecLeading(0) | |
285 | ,fIJBckgHisto0Gen(0) | |
286 | ,fIJBckgHisto0GenLeading(0) | |
287 | ,fIJBckgHisto1RecCuts(0) | |
288 | ,fIJBckgHisto1RecLeading(0) | |
289 | ,fIJBckgHisto1Gen(0) | |
290 | ,fIJBckgHisto1GenLeading(0) | |
291 | ,fIJBckgHisto2RecCuts(0) | |
292 | ,fIJBckgHisto2RecLeading(0) | |
293 | ,fIJBckgHisto2Gen(0) | |
294 | ,fIJBckgHisto2GenLeading(0) | |
295 | ,fRandom(0) | |
3af23c82 | 296 | ,fBckgSubMethod(0) |
656dc810 | 297 | { |
298 | // default constructor | |
67e37e80 | 299 | fBckgType[0] = 0; |
300 | fBckgType[1] = 0; | |
301 | fBckgType[2] = 0; | |
656dc810 | 302 | } |
303 | ||
304 | //__________________________________________________________________________________________ | |
305 | AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const char *name) | |
306 | : AliAnalysisTaskSE(name) | |
307 | ,fESD(0) | |
308 | ,fAOD(0) | |
656dc810 | 309 | ,fBranchRecJets("jets") |
3af23c82 | 310 | ,fBranchRecBackJets("backjets") |
656dc810 | 311 | ,fBranchGenJets("") |
312 | ,fTrackTypeGen(0) | |
313 | ,fJetTypeGen(0) | |
fe343c6b | 314 | ,fJetTypeRecEff(0) |
656dc810 | 315 | ,fFilterMask(0) |
ac017ff3 | 316 | ,fUsePhysicsSelection(kTRUE) |
3af23c82 | 317 | ,fEventClass(0) |
318 | ,fMaxVertexZ(10) | |
656dc810 | 319 | ,fTrackPtCut(0) |
320 | ,fTrackEtaMin(0) | |
321 | ,fTrackEtaMax(0) | |
322 | ,fTrackPhiMin(0) | |
323 | ,fTrackPhiMax(0) | |
324 | ,fJetPtCut(0) | |
325 | ,fJetEtaMin(0) | |
326 | ,fJetEtaMax(0) | |
327 | ,fJetPhiMin(0) | |
328 | ,fJetPhiMax(0) | |
329 | ,fDiJetCut(0) | |
330 | ,fDiJetDeltaPhiCut(0) | |
331 | ,fDiJetPtFractionCut(0) | |
332 | ,fDiJetCDFCut(0) | |
333 | ,fDiJetKindBins(0) | |
334 | ,fFFRadius(0) | |
1da9498b | 335 | ,fFFBckgRadius(0) |
336 | ,fBckgMode(0) | |
67e37e80 | 337 | ,fIJMode(0) |
3af23c82 | 338 | ,fQAMode(0) |
339 | ,fFFMode(0) | |
340 | ,fDJMode(0) | |
341 | ,fEffMode(0) | |
342 | ,fPhiCorrMode(0) | |
cb76764e | 343 | ,fUseRecEffRecJetPtBins(1) |
c2658535 | 344 | ,fAvgTrials(0) |
656dc810 | 345 | ,fTracksRec(0) |
346 | ,fTracksRecCuts(0) | |
347 | ,fTracksGen(0) | |
fe343c6b | 348 | ,fTracksAODMCCharged(0) |
349 | ,fTracksRecQualityCuts(0) | |
656dc810 | 350 | ,fJetsRec(0) |
351 | ,fJetsRecCuts(0) | |
352 | ,fJetsGen(0) | |
fe343c6b | 353 | ,fJetsRecEff(0) |
67e37e80 | 354 | ,fBckgJetsRec(0) |
355 | ,fBckgJetsRecCuts(0) | |
356 | ,fBckgJetsGen(0) | |
656dc810 | 357 | ,fQATrackHistosRec(0) |
358 | ,fQATrackHistosRecCuts(0) | |
359 | ,fQATrackHistosGen(0) | |
360 | ,fQAJetHistosRec(0) | |
361 | ,fQAJetHistosRecCuts(0) | |
362 | ,fQAJetHistosRecCutsLeading(0) | |
363 | ,fQAJetHistosGen(0) | |
364 | ,fQAJetHistosGenLeading(0) | |
fe343c6b | 365 | ,fQAJetHistosRecEffLeading(0) |
656dc810 | 366 | ,fFFHistosRecCuts(0) |
367 | ,fFFHistosRecLeading(0) | |
368 | ,fFFHistosRecLeadingTrack(0) | |
369 | ,fFFHistosGen(0) | |
370 | ,fFFHistosGenLeading(0) | |
371 | ,fFFHistosGenLeadingTrack(0) | |
372 | ,fIJHistosRecCuts(0) | |
373 | ,fIJHistosRecLeading(0) | |
374 | ,fIJHistosRecLeadingTrack(0) | |
375 | ,fIJHistosGen(0) | |
376 | ,fIJHistosGenLeading(0) | |
377 | ,fIJHistosGenLeadingTrack(0) | |
378 | ,fFFDiJetHistosRecCuts(0) | |
379 | ,fFFDiJetHistosRecLeading(0) | |
380 | ,fFFDiJetHistosRecLeadingTrack(0) | |
381 | ,fFFDiJetHistosGen(0) | |
382 | ,fFFDiJetHistosGenLeading(0) | |
383 | ,fFFDiJetHistosGenLeadingTrack(0) | |
384 | ,fQADiJetHistosRecCuts(0) | |
385 | ,fQADiJetHistosGen(0) | |
3af23c82 | 386 | ,fPhiCorrHistosJetArea(0) |
387 | ,fPhiCorrHistosTransverseArea(0) | |
388 | ,fPhiCorrHistosAwayArea(0) | |
656dc810 | 389 | ,fQATrackHighPtThreshold(0) |
390 | ,fFFNBinsJetPt(0) | |
391 | ,fFFJetPtMin(0) | |
392 | ,fFFJetPtMax(0) | |
393 | ,fFFNBinsPt(0) | |
394 | ,fFFPtMin(0) | |
395 | ,fFFPtMax(0) | |
396 | ,fFFNBinsXi(0) | |
397 | ,fFFXiMin(0) | |
398 | ,fFFXiMax(0) | |
399 | ,fFFNBinsZ(0) | |
400 | ,fFFZMin(0) | |
401 | ,fFFZMax(0) | |
402 | ,fQAJetNBinsPt(0) | |
403 | ,fQAJetPtMin(0) | |
404 | ,fQAJetPtMax(0) | |
405 | ,fQAJetNBinsEta(0) | |
406 | ,fQAJetEtaMin(0) | |
407 | ,fQAJetEtaMax(0) | |
408 | ,fQAJetNBinsPhi(0) | |
409 | ,fQAJetPhiMin(0) | |
410 | ,fQAJetPhiMax(0) | |
411 | ,fQATrackNBinsPt(0) | |
412 | ,fQATrackPtMin(0) | |
413 | ,fQATrackPtMax(0) | |
414 | ,fQATrackNBinsEta(0) | |
415 | ,fQATrackEtaMin(0) | |
416 | ,fQATrackEtaMax(0) | |
417 | ,fQATrackNBinsPhi(0) | |
418 | ,fQATrackPhiMin(0) | |
419 | ,fQATrackPhiMax(0) | |
420 | ,fIJNBinsJetPt(0) | |
421 | ,fIJJetPtMin(0) | |
422 | ,fIJJetPtMax(0) | |
423 | ,fIJNBinsPt(0) | |
424 | ,fIJPtMin(0) | |
425 | ,fIJPtMax(0) | |
426 | ,fIJNBinsZ(0) | |
427 | ,fIJZMin(0) | |
428 | ,fIJZMax(0) | |
429 | ,fIJNBinsCosTheta(0) | |
430 | ,fIJCosThetaMin(0) | |
431 | ,fIJCosThetaMax(0) | |
432 | ,fIJNBinsTheta(0) | |
433 | ,fIJThetaMin(0) | |
434 | ,fIJThetaMax(0) | |
435 | ,fIJNBinsJt(0) | |
436 | ,fIJJtMin(0) | |
437 | ,fIJJtMax(0) | |
438 | ,fDiJetNBinsJetInvMass(0) | |
439 | ,fDiJetJetInvMassMin(0) | |
440 | ,fDiJetJetInvMassMax(0) | |
441 | ,fDiJetNBinsJetPt(0) | |
442 | ,fDiJetJetPtMin(0) | |
443 | ,fDiJetJetPtMax(0) | |
444 | ,fDiJetNBinsPt(0) | |
445 | ,fDiJetPtMin(0) | |
446 | ,fDiJetPtMax(0) | |
447 | ,fDiJetNBinsXi(0) | |
448 | ,fDiJetXiMin(0) | |
449 | ,fDiJetXiMax(0) | |
450 | ,fDiJetNBinsZ(0) | |
451 | ,fDiJetZMin(0) | |
452 | ,fDiJetZMax(0) | |
453 | ,fQADiJetNBinsInvMass(0) | |
454 | ,fQADiJetInvMassMin(0) | |
455 | ,fQADiJetInvMassMax(0) | |
456 | ,fQADiJetNBinsJetPt(0) | |
457 | ,fQADiJetJetPtMin(0) | |
458 | ,fQADiJetJetPtMax(0) | |
459 | ,fQADiJetNBinsDeltaPhi(0) | |
460 | ,fQADiJetDeltaPhiMin(0) | |
461 | ,fQADiJetDeltaPhiMax(0) | |
462 | ,fQADiJetNBinsDeltaEta(0) | |
463 | ,fQADiJetDeltaEtaMin(0) | |
464 | ,fQADiJetDeltaEtaMax(0) | |
465 | ,fQADiJetNBinsDeltaPt(0) | |
466 | ,fQADiJetDeltaPtMin(0) | |
467 | ,fQADiJetDeltaPtMax(0) | |
3af23c82 | 468 | ,fQADiJetNBinsInBal(0) |
469 | ,fQADiJetInBalMin(0) | |
470 | ,fQADiJetInBalMax(0) | |
471 | ,fPhiCorrNBinsPt(0) | |
472 | ,fPhiCorrPtMin(0) | |
473 | ,fPhiCorrPtMax(0) | |
474 | ,fPhiCorrNBinsEta(0) | |
475 | ,fPhiCorrEtaMin(0) | |
476 | ,fPhiCorrEtaMax(0) | |
477 | ,fPhiCorrNBinsPhi(0) | |
478 | ,fPhiCorrPhiMin(0) | |
479 | ,fPhiCorrPhiMax(0) | |
656dc810 | 480 | ,fCommonHistList(0) |
481 | ,fh1EvtSelection(0) | |
482 | ,fh1VertexNContributors(0) | |
483 | ,fh1VertexZ(0) | |
484 | ,fh1EvtMult(0) | |
3af23c82 | 485 | ,fh1EvtCent(0) |
ac017ff3 | 486 | ,fh1Xsec(0) |
487 | ,fh1Trials(0) | |
488 | ,fh1PtHard(0) | |
489 | ,fh1PtHardTrials(0) | |
656dc810 | 490 | ,fh1nRecJetsCuts(0) |
491 | ,fh1nGenJets(0) | |
fe343c6b | 492 | ,fh1nRecEffJets(0) |
67e37e80 | 493 | ,fh1nRecBckgJetsCuts(0) |
494 | ,fh1nGenBckgJets(0) | |
cb76764e | 495 | ,fh2PtRecVsGenPrim(0) |
496 | ,fQATrackHistosRecEffGen(0) | |
497 | ,fQATrackHistosRecEffRec(0) | |
498 | ,fFFHistosRecEffGen(0) | |
3af23c82 | 499 | ,fFFHistosRecEffRec(0) |
500 | ,fhnResponseSinglePt(0) | |
501 | ,fhnResponseJetTrackPt(0) | |
502 | ,fhnResponseJetZ(0) | |
503 | ,fhnResponseJetXi(0) | |
67e37e80 | 504 | // Background |
505 | ,fh1OutLeadingMult(0) | |
506 | ,fh1PerpMult(0) | |
3af23c82 | 507 | ,fh1ASideMult(0) |
508 | ,fh1ASideWindowMult(0) | |
509 | ,fh1PerpWindowMult(0) | |
67e37e80 | 510 | ,fh1Out2JetsMult(0) |
511 | ,fh1Out3JetsMult(0) | |
512 | ,fQABckgHisto0RecCuts(0) | |
513 | ,fQABckgHisto0Gen(0) | |
514 | ,fQABckgHisto1RecCuts(0) | |
515 | ,fQABckgHisto1Gen(0) | |
516 | ,fQABckgHisto2RecCuts(0) | |
517 | ,fQABckgHisto2Gen(0) | |
518 | ,fFFBckgHisto0RecCuts(0) | |
519 | ,fFFBckgHisto0RecLeading(0) | |
520 | ,fFFBckgHisto0Gen(0) | |
521 | ,fFFBckgHisto0GenLeading(0) | |
522 | ,fFFBckgHisto1RecCuts(0) | |
523 | ,fFFBckgHisto1RecLeading(0) | |
524 | ,fFFBckgHisto1Gen(0) | |
525 | ,fFFBckgHisto1GenLeading(0) | |
526 | ,fFFBckgHisto2RecCuts(0) | |
527 | ,fFFBckgHisto2RecLeading(0) | |
528 | ,fFFBckgHisto2Gen(0) | |
529 | ,fFFBckgHisto2GenLeading(0) | |
530 | ,fIJBckgHisto0RecCuts(0) | |
531 | ,fIJBckgHisto0RecLeading(0) | |
532 | ,fIJBckgHisto0Gen(0) | |
533 | ,fIJBckgHisto0GenLeading(0) | |
534 | ,fIJBckgHisto1RecCuts(0) | |
535 | ,fIJBckgHisto1RecLeading(0) | |
536 | ,fIJBckgHisto1Gen(0) | |
537 | ,fIJBckgHisto1GenLeading(0) | |
538 | ,fIJBckgHisto2RecCuts(0) | |
539 | ,fIJBckgHisto2RecLeading(0) | |
540 | ,fIJBckgHisto2Gen(0) | |
541 | ,fIJBckgHisto2GenLeading(0) | |
542 | ,fRandom(0) | |
3af23c82 | 543 | ,fBckgSubMethod(0) |
656dc810 | 544 | { |
545 | // constructor | |
67e37e80 | 546 | fBckgType[0] = 0; |
547 | fBckgType[1] = 0; | |
548 | fBckgType[2] = 0; | |
549 | ||
656dc810 | 550 | DefineOutput(1,TList::Class()); |
551 | ||
552 | ||
553 | } | |
554 | ||
555 | //__________________________________________________________________________________________________________________________ | |
556 | AliAnalysisTaskFragmentationFunction::AliAnalysisTaskFragmentationFunction(const AliAnalysisTaskFragmentationFunction ©) | |
557 | : AliAnalysisTaskSE() | |
558 | ,fESD(copy.fESD) | |
559 | ,fAOD(copy.fAOD) | |
656dc810 | 560 | ,fBranchRecJets(copy.fBranchRecJets) |
3af23c82 | 561 | ,fBranchRecBackJets(copy.fBranchRecBackJets) |
656dc810 | 562 | ,fBranchGenJets(copy.fBranchGenJets) |
563 | ,fTrackTypeGen(copy.fTrackTypeGen) | |
564 | ,fJetTypeGen(copy.fJetTypeGen) | |
fe343c6b | 565 | ,fJetTypeRecEff(copy.fJetTypeRecEff) |
656dc810 | 566 | ,fFilterMask(copy.fFilterMask) |
ac017ff3 | 567 | ,fUsePhysicsSelection(copy.fUsePhysicsSelection) |
3af23c82 | 568 | ,fEventClass(copy.fEventClass) |
569 | ,fMaxVertexZ(copy.fMaxVertexZ) | |
656dc810 | 570 | ,fTrackPtCut(copy.fTrackPtCut) |
571 | ,fTrackEtaMin(copy.fTrackEtaMin) | |
572 | ,fTrackEtaMax(copy.fTrackEtaMax) | |
573 | ,fTrackPhiMin(copy.fTrackPhiMin) | |
574 | ,fTrackPhiMax(copy.fTrackPhiMax) | |
575 | ,fJetPtCut(copy.fJetPtCut) | |
576 | ,fJetEtaMin(copy.fJetEtaMin) | |
577 | ,fJetEtaMax(copy.fJetEtaMax) | |
578 | ,fJetPhiMin(copy.fJetPhiMin) | |
fe343c6b | 579 | ,fJetPhiMax(copy.fJetPhiMax) |
656dc810 | 580 | ,fDiJetCut(copy.fDiJetCut) |
581 | ,fDiJetDeltaPhiCut(copy.fDiJetDeltaPhiCut) | |
582 | ,fDiJetPtFractionCut(copy.fDiJetPtFractionCut) | |
583 | ,fDiJetCDFCut(copy.fDiJetCDFCut) | |
584 | ,fDiJetKindBins(copy.fDiJetKindBins) | |
585 | ,fFFRadius(copy.fFFRadius) | |
1da9498b | 586 | ,fFFBckgRadius(copy.fFFBckgRadius) |
587 | ,fBckgMode(copy.fBckgMode) | |
67e37e80 | 588 | ,fIJMode(copy.fIJMode) |
3af23c82 | 589 | ,fQAMode(copy.fQAMode) |
590 | ,fFFMode(copy.fFFMode) | |
591 | ,fDJMode(copy.fDJMode) | |
592 | ,fEffMode(copy.fEffMode) | |
593 | ,fPhiCorrMode(copy.fPhiCorrMode) | |
cb76764e | 594 | ,fUseRecEffRecJetPtBins(copy.fUseRecEffRecJetPtBins) |
c2658535 | 595 | ,fAvgTrials(copy.fAvgTrials) |
656dc810 | 596 | ,fTracksRec(copy.fTracksRec) |
597 | ,fTracksRecCuts(copy.fTracksRecCuts) | |
598 | ,fTracksGen(copy.fTracksGen) | |
fe343c6b | 599 | ,fTracksAODMCCharged(copy.fTracksAODMCCharged) |
600 | ,fTracksRecQualityCuts(copy.fTracksRecQualityCuts) | |
656dc810 | 601 | ,fJetsRec(copy.fJetsRec) |
602 | ,fJetsRecCuts(copy.fJetsRecCuts) | |
603 | ,fJetsGen(copy.fJetsGen) | |
fe343c6b | 604 | ,fJetsRecEff(copy.fJetsRecEff) |
67e37e80 | 605 | ,fBckgJetsRec(copy.fBckgJetsRec) |
606 | ,fBckgJetsRecCuts(copy.fBckgJetsRecCuts) | |
607 | ,fBckgJetsGen(copy.fBckgJetsGen) | |
656dc810 | 608 | ,fQATrackHistosRec(copy.fQATrackHistosRec) |
609 | ,fQATrackHistosRecCuts(copy.fQATrackHistosRecCuts) | |
610 | ,fQATrackHistosGen(copy.fQATrackHistosGen) | |
611 | ,fQAJetHistosRec(copy.fQAJetHistosRec) | |
612 | ,fQAJetHistosRecCuts(copy.fQAJetHistosRecCuts) | |
613 | ,fQAJetHistosRecCutsLeading(copy.fQAJetHistosRecCutsLeading) | |
614 | ,fQAJetHistosGen(copy.fQAJetHistosGen) | |
615 | ,fQAJetHistosGenLeading(copy.fQAJetHistosGenLeading) | |
fe343c6b | 616 | ,fQAJetHistosRecEffLeading(copy.fQAJetHistosRecEffLeading) |
656dc810 | 617 | ,fFFHistosRecCuts(copy.fFFHistosRecCuts) |
618 | ,fFFHistosRecLeading(copy.fFFHistosRecLeading) | |
619 | ,fFFHistosRecLeadingTrack(copy.fFFHistosRecLeadingTrack) | |
620 | ,fFFHistosGen(copy.fFFHistosGen) | |
621 | ,fFFHistosGenLeading(copy.fFFHistosGenLeading) | |
622 | ,fFFHistosGenLeadingTrack(copy.fFFHistosGenLeadingTrack) | |
623 | ,fIJHistosRecCuts(copy.fIJHistosRecCuts) | |
624 | ,fIJHistosRecLeading(copy.fIJHistosRecLeading) | |
625 | ,fIJHistosRecLeadingTrack(copy.fIJHistosRecLeadingTrack) | |
626 | ,fIJHistosGen(copy.fIJHistosGen) | |
627 | ,fIJHistosGenLeading(copy.fIJHistosGenLeading) | |
628 | ,fIJHistosGenLeadingTrack(copy.fIJHistosGenLeadingTrack) | |
629 | ,fFFDiJetHistosRecCuts(copy.fFFDiJetHistosRecCuts) | |
630 | ,fFFDiJetHistosRecLeading(copy.fFFDiJetHistosRecLeading) | |
631 | ,fFFDiJetHistosRecLeadingTrack(copy.fFFDiJetHistosRecLeadingTrack) | |
632 | ,fFFDiJetHistosGen(copy.fFFDiJetHistosGen) | |
633 | ,fFFDiJetHistosGenLeading(copy.fFFDiJetHistosGenLeading) | |
634 | ,fFFDiJetHistosGenLeadingTrack(copy.fFFDiJetHistosGenLeadingTrack) | |
635 | ,fQADiJetHistosRecCuts(copy.fQADiJetHistosRecCuts) | |
636 | ,fQADiJetHistosGen(copy.fQADiJetHistosGen) | |
3af23c82 | 637 | ,fPhiCorrHistosJetArea(copy.fPhiCorrHistosJetArea) |
638 | ,fPhiCorrHistosTransverseArea(copy.fPhiCorrHistosTransverseArea) | |
639 | ,fPhiCorrHistosAwayArea(copy.fPhiCorrHistosAwayArea) | |
656dc810 | 640 | ,fQATrackHighPtThreshold(copy.fQATrackHighPtThreshold) |
641 | ,fFFNBinsJetPt(copy.fFFNBinsJetPt) | |
642 | ,fFFJetPtMin(copy.fFFJetPtMin) | |
643 | ,fFFJetPtMax(copy.fFFJetPtMax) | |
644 | ,fFFNBinsPt(copy.fFFNBinsPt) | |
645 | ,fFFPtMin(copy.fFFPtMin) | |
646 | ,fFFPtMax(copy.fFFPtMax) | |
647 | ,fFFNBinsXi(copy.fFFNBinsXi) | |
648 | ,fFFXiMin(copy.fFFXiMin) | |
649 | ,fFFXiMax(copy.fFFXiMax) | |
650 | ,fFFNBinsZ(copy.fFFNBinsZ) | |
651 | ,fFFZMin(copy.fFFZMin) | |
652 | ,fFFZMax(copy.fFFZMax) | |
653 | ,fQAJetNBinsPt(copy.fQAJetNBinsPt) | |
654 | ,fQAJetPtMin(copy.fQAJetPtMin) | |
655 | ,fQAJetPtMax(copy.fQAJetPtMax) | |
656 | ,fQAJetNBinsEta(copy.fQAJetNBinsEta) | |
657 | ,fQAJetEtaMin(copy.fQAJetEtaMin) | |
658 | ,fQAJetEtaMax(copy.fQAJetEtaMax) | |
659 | ,fQAJetNBinsPhi(copy.fQAJetNBinsPhi) | |
660 | ,fQAJetPhiMin(copy.fQAJetPhiMin) | |
661 | ,fQAJetPhiMax(copy.fQAJetPhiMax) | |
662 | ,fQATrackNBinsPt(copy.fQATrackNBinsPt) | |
663 | ,fQATrackPtMin(copy.fQATrackPtMin) | |
664 | ,fQATrackPtMax(copy.fQATrackPtMax) | |
665 | ,fQATrackNBinsEta(copy.fQATrackNBinsEta) | |
666 | ,fQATrackEtaMin(copy.fQATrackEtaMin) | |
667 | ,fQATrackEtaMax(copy.fQATrackEtaMax) | |
668 | ,fQATrackNBinsPhi(copy.fQATrackNBinsPhi) | |
669 | ,fQATrackPhiMin(copy.fQATrackPhiMin) | |
670 | ,fQATrackPhiMax(copy.fQATrackPhiMax) | |
671 | ,fIJNBinsJetPt(copy.fIJNBinsJetPt) | |
672 | ,fIJJetPtMin(copy.fIJJetPtMin) | |
673 | ,fIJJetPtMax(copy.fIJJetPtMax) | |
674 | ,fIJNBinsPt(copy.fIJNBinsPt) | |
675 | ,fIJPtMin(copy.fIJPtMin) | |
676 | ,fIJPtMax(copy.fIJPtMax) | |
677 | ,fIJNBinsZ(copy.fIJNBinsZ) | |
678 | ,fIJZMin(copy.fIJZMin) | |
679 | ,fIJZMax(copy.fIJZMax) | |
680 | ,fIJNBinsCosTheta(copy.fIJNBinsCosTheta) | |
681 | ,fIJCosThetaMin(copy.fIJCosThetaMin) | |
682 | ,fIJCosThetaMax(copy.fIJCosThetaMax) | |
683 | ,fIJNBinsTheta(copy.fIJNBinsTheta) | |
684 | ,fIJThetaMin(copy.fIJThetaMin) | |
685 | ,fIJThetaMax(copy.fIJThetaMax) | |
686 | ,fIJNBinsJt(copy.fIJNBinsJt) | |
687 | ,fIJJtMin(copy.fIJJtMin) | |
688 | ,fIJJtMax(copy.fIJJtMax) | |
689 | ,fDiJetNBinsJetInvMass(copy.fDiJetNBinsJetInvMass) | |
690 | ,fDiJetJetInvMassMin(copy.fDiJetJetInvMassMin) | |
691 | ,fDiJetJetInvMassMax(copy.fDiJetJetInvMassMax) | |
692 | ,fDiJetNBinsJetPt(copy.fDiJetNBinsJetPt) | |
693 | ,fDiJetJetPtMin(copy.fDiJetJetPtMin) | |
694 | ,fDiJetJetPtMax(copy.fDiJetJetPtMax) | |
695 | ,fDiJetNBinsPt(copy.fDiJetNBinsPt) | |
696 | ,fDiJetPtMin(copy.fDiJetPtMin) | |
697 | ,fDiJetPtMax(copy.fDiJetPtMax) | |
698 | ,fDiJetNBinsXi(copy.fDiJetNBinsXi) | |
699 | ,fDiJetXiMin(copy.fDiJetXiMin) | |
700 | ,fDiJetXiMax(copy.fDiJetXiMax) | |
701 | ,fDiJetNBinsZ(copy.fDiJetNBinsZ) | |
702 | ,fDiJetZMin(copy.fDiJetZMin) | |
703 | ,fDiJetZMax(copy.fDiJetZMax) | |
704 | ,fQADiJetNBinsInvMass(copy.fQADiJetNBinsInvMass) | |
705 | ,fQADiJetInvMassMin(copy.fQADiJetInvMassMin) | |
706 | ,fQADiJetInvMassMax(copy.fQADiJetInvMassMax) | |
707 | ,fQADiJetNBinsJetPt(copy.fQADiJetNBinsJetPt) | |
708 | ,fQADiJetJetPtMin(copy.fQADiJetJetPtMin) | |
709 | ,fQADiJetJetPtMax(copy.fQADiJetJetPtMax) | |
710 | ,fQADiJetNBinsDeltaPhi(copy.fQADiJetNBinsDeltaPhi) | |
711 | ,fQADiJetDeltaPhiMin(copy.fQADiJetDeltaPhiMin) | |
712 | ,fQADiJetDeltaPhiMax(copy.fQADiJetDeltaPhiMax) | |
713 | ,fQADiJetNBinsDeltaEta(copy.fQADiJetNBinsDeltaEta) | |
714 | ,fQADiJetDeltaEtaMin(copy.fQADiJetDeltaEtaMin) | |
715 | ,fQADiJetDeltaEtaMax(copy.fQADiJetDeltaEtaMax) | |
716 | ,fQADiJetNBinsDeltaPt(copy.fQADiJetNBinsDeltaPt) | |
717 | ,fQADiJetDeltaPtMin(copy.fQADiJetDeltaPtMin) | |
718 | ,fQADiJetDeltaPtMax(copy.fQADiJetDeltaPtMax) | |
3af23c82 | 719 | ,fQADiJetNBinsInBal(copy.fQADiJetNBinsInBal) |
720 | ,fQADiJetInBalMin(copy.fQADiJetInBalMin) | |
721 | ,fQADiJetInBalMax(copy.fQADiJetInBalMax) | |
722 | ,fPhiCorrNBinsPt(copy.fPhiCorrNBinsPt) | |
723 | ,fPhiCorrPtMin(copy.fPhiCorrPtMin) | |
724 | ,fPhiCorrPtMax(copy.fPhiCorrPtMax) | |
725 | ,fPhiCorrNBinsEta(copy.fPhiCorrNBinsEta) | |
726 | ,fPhiCorrEtaMin(copy.fPhiCorrEtaMin) | |
727 | ,fPhiCorrEtaMax(copy.fPhiCorrEtaMax) | |
728 | ,fPhiCorrNBinsPhi(copy.fPhiCorrNBinsPhi) | |
729 | ,fPhiCorrPhiMin(copy.fPhiCorrPhiMin) | |
730 | ,fPhiCorrPhiMax(copy.fPhiCorrPhiMax) | |
656dc810 | 731 | ,fCommonHistList(copy.fCommonHistList) |
732 | ,fh1EvtSelection(copy.fh1EvtSelection) | |
733 | ,fh1VertexNContributors(copy.fh1VertexNContributors) | |
734 | ,fh1VertexZ(copy.fh1VertexZ) | |
735 | ,fh1EvtMult(copy.fh1EvtMult) | |
3af23c82 | 736 | ,fh1EvtCent(copy.fh1EvtCent) |
ac017ff3 | 737 | ,fh1Xsec(copy.fh1Xsec) |
738 | ,fh1Trials(copy.fh1Trials) | |
739 | ,fh1PtHard(copy.fh1PtHard) | |
740 | ,fh1PtHardTrials(copy.fh1PtHardTrials) | |
656dc810 | 741 | ,fh1nRecJetsCuts(copy.fh1nRecJetsCuts) |
742 | ,fh1nGenJets(copy.fh1nGenJets) | |
fe343c6b | 743 | ,fh1nRecEffJets(copy.fh1nRecEffJets) |
67e37e80 | 744 | ,fh1nRecBckgJetsCuts(copy.fh1nRecBckgJetsCuts) |
745 | ,fh1nGenBckgJets(copy.fh1nGenBckgJets) | |
cb76764e | 746 | ,fh2PtRecVsGenPrim(copy.fh2PtRecVsGenPrim) |
747 | ,fQATrackHistosRecEffGen(copy.fQATrackHistosRecEffGen) | |
748 | ,fQATrackHistosRecEffRec(copy.fQATrackHistosRecEffRec) | |
749 | ,fFFHistosRecEffGen(copy.fFFHistosRecEffGen) | |
750 | ,fFFHistosRecEffRec(copy.fFFHistosRecEffRec) | |
3af23c82 | 751 | ,fhnResponseSinglePt(copy.fhnResponseSinglePt) |
752 | ,fhnResponseJetTrackPt(copy.fhnResponseJetTrackPt) | |
753 | ,fhnResponseJetZ(copy.fhnResponseJetZ) | |
754 | ,fhnResponseJetXi(copy.fhnResponseJetXi) | |
1da9498b | 755 | // Background |
756 | ,fh1OutLeadingMult(copy.fh1OutLeadingMult) | |
757 | ,fh1PerpMult(copy.fh1PerpMult) | |
3af23c82 | 758 | ,fh1ASideMult(copy.fh1ASideMult) |
759 | ,fh1ASideWindowMult(copy.fh1ASideWindowMult) | |
760 | ,fh1PerpWindowMult(copy.fh1PerpWindowMult) | |
1da9498b | 761 | ,fh1Out2JetsMult(copy.fh1Out2JetsMult) |
762 | ,fh1Out3JetsMult(copy.fh1Out3JetsMult) | |
67e37e80 | 763 | ,fQABckgHisto0RecCuts(copy.fQABckgHisto0RecCuts) |
764 | ,fQABckgHisto0Gen(copy.fQABckgHisto0Gen) | |
765 | ,fQABckgHisto1RecCuts(copy.fQABckgHisto1RecCuts) | |
766 | ,fQABckgHisto1Gen(copy.fQABckgHisto1Gen) | |
767 | ,fQABckgHisto2RecCuts(copy.fQABckgHisto2RecCuts) | |
768 | ,fQABckgHisto2Gen(copy.fQABckgHisto2Gen) | |
769 | ,fFFBckgHisto0RecCuts(copy.fFFBckgHisto0RecCuts) | |
770 | ,fFFBckgHisto0RecLeading(copy.fFFBckgHisto0RecLeading) | |
771 | ,fFFBckgHisto0Gen(copy.fFFBckgHisto0Gen) | |
772 | ,fFFBckgHisto0GenLeading(copy.fFFBckgHisto0GenLeading) | |
773 | ,fFFBckgHisto1RecCuts(copy.fFFBckgHisto1RecCuts) | |
774 | ,fFFBckgHisto1RecLeading(copy.fFFBckgHisto1RecLeading) | |
775 | ,fFFBckgHisto1Gen(copy.fFFBckgHisto1Gen) | |
776 | ,fFFBckgHisto1GenLeading(copy.fFFBckgHisto1GenLeading) | |
777 | ,fFFBckgHisto2RecCuts(copy.fFFBckgHisto2RecCuts) | |
778 | ,fFFBckgHisto2RecLeading(copy.fFFBckgHisto2RecLeading) | |
779 | ,fFFBckgHisto2Gen(copy.fFFBckgHisto2Gen) | |
780 | ,fFFBckgHisto2GenLeading(copy.fFFBckgHisto2GenLeading) | |
781 | ,fIJBckgHisto0RecCuts(copy.fIJBckgHisto0RecCuts) | |
782 | ,fIJBckgHisto0RecLeading(copy.fIJBckgHisto0RecLeading) | |
783 | ,fIJBckgHisto0Gen(copy.fIJBckgHisto0Gen) | |
784 | ,fIJBckgHisto0GenLeading(copy.fIJBckgHisto0GenLeading) | |
785 | ,fIJBckgHisto1RecCuts(copy.fIJBckgHisto1RecCuts) | |
786 | ,fIJBckgHisto1RecLeading(copy.fIJBckgHisto1RecLeading) | |
787 | ,fIJBckgHisto1Gen(copy.fIJBckgHisto1Gen) | |
788 | ,fIJBckgHisto1GenLeading(copy.fIJBckgHisto1GenLeading) | |
789 | ,fIJBckgHisto2RecCuts(copy.fIJBckgHisto2RecCuts) | |
790 | ,fIJBckgHisto2RecLeading(copy.fIJBckgHisto2RecLeading) | |
791 | ,fIJBckgHisto2Gen(copy.fIJBckgHisto2Gen) | |
792 | ,fIJBckgHisto2GenLeading(copy.fIJBckgHisto2GenLeading) | |
793 | ,fRandom(copy.fRandom) | |
3af23c82 | 794 | ,fBckgSubMethod(copy.fBckgSubMethod) |
656dc810 | 795 | { |
796 | // copy constructor | |
67e37e80 | 797 | fBckgType[0] = copy.fBckgType[0]; |
798 | fBckgType[1] = copy.fBckgType[1]; | |
799 | fBckgType[2] = copy.fBckgType[2]; | |
656dc810 | 800 | } |
801 | ||
802 | // _________________________________________________________________________________________________________________________________ | |
803 | AliAnalysisTaskFragmentationFunction& AliAnalysisTaskFragmentationFunction::operator=(const AliAnalysisTaskFragmentationFunction& o) | |
804 | { | |
805 | // assignment | |
806 | ||
807 | if(this!=&o){ | |
808 | ||
809 | AliAnalysisTaskSE::operator=(o); | |
810 | fESD = o.fESD; | |
811 | fAOD = o.fAOD; | |
656dc810 | 812 | fBranchRecJets = o.fBranchRecJets; |
3af23c82 | 813 | fBranchRecBackJets = o.fBranchRecBackJets; |
656dc810 | 814 | fBranchGenJets = o.fBranchGenJets; |
815 | fTrackTypeGen = o.fTrackTypeGen; | |
816 | fJetTypeGen = o.fJetTypeGen; | |
fe343c6b | 817 | fJetTypeRecEff = o.fJetTypeRecEff; |
656dc810 | 818 | fFilterMask = o.fFilterMask; |
ac017ff3 | 819 | fUsePhysicsSelection = o.fUsePhysicsSelection; |
3af23c82 | 820 | fEventClass = o.fEventClass; |
821 | fMaxVertexZ = o.fMaxVertexZ; | |
656dc810 | 822 | fTrackPtCut = o.fTrackPtCut; |
823 | fTrackEtaMin = o.fTrackEtaMin; | |
824 | fTrackEtaMax = o.fTrackEtaMax; | |
825 | fTrackPhiMin = o.fTrackPhiMin; | |
826 | fTrackPhiMax = o.fTrackPhiMax; | |
827 | fJetPtCut = o.fJetPtCut; | |
828 | fJetEtaMin = o.fJetEtaMin; | |
829 | fJetEtaMax = o.fJetEtaMax; | |
830 | fJetPhiMin = o.fJetPhiMin; | |
831 | fJetPhiMax = o.fJetPhiMin; | |
832 | fDiJetCut = o.fDiJetCut; | |
833 | fDiJetDeltaPhiCut = o.fDiJetDeltaPhiCut; | |
834 | fDiJetPtFractionCut = o.fDiJetPtFractionCut; | |
835 | fDiJetCDFCut = o.fDiJetCDFCut; | |
836 | fDiJetKindBins = o.fDiJetKindBins; | |
837 | fFFRadius = o.fFFRadius; | |
1da9498b | 838 | fFFBckgRadius = o.fFFBckgRadius; |
839 | fBckgMode = o.fBckgMode; | |
67e37e80 | 840 | fIJMode = o.fIJMode; |
3af23c82 | 841 | fQAMode = o.fQAMode; |
842 | fFFMode = o.fFFMode; | |
843 | fDJMode = o.fDJMode; | |
844 | fEffMode = o.fEffMode; | |
845 | fPhiCorrMode = o.fPhiCorrMode; | |
67e37e80 | 846 | fBckgType[0] = o.fBckgType[0]; |
847 | fBckgType[1] = o.fBckgType[1]; | |
848 | fBckgType[2] = o.fBckgType[2]; | |
cb76764e | 849 | fUseRecEffRecJetPtBins = o.fUseRecEffRecJetPtBins; |
c2658535 | 850 | fAvgTrials = o.fAvgTrials; |
656dc810 | 851 | fTracksRec = o.fTracksRec; |
852 | fTracksRecCuts = o.fTracksRecCuts; | |
853 | fTracksGen = o.fTracksGen; | |
fe343c6b | 854 | fTracksAODMCCharged = o.fTracksAODMCCharged; |
855 | fTracksRecQualityCuts = o.fTracksRecQualityCuts; | |
656dc810 | 856 | fJetsRec = o.fJetsRec; |
857 | fJetsRecCuts = o.fJetsRecCuts; | |
858 | fJetsGen = o.fJetsGen; | |
fe343c6b | 859 | fJetsRecEff = o.fJetsRecEff; |
67e37e80 | 860 | fBckgJetsRec = o.fBckgJetsRec; |
861 | fBckgJetsRecCuts = o.fBckgJetsRecCuts; | |
862 | fBckgJetsGen = o.fBckgJetsGen; | |
656dc810 | 863 | fQATrackHistosRec = o.fQATrackHistosRec; |
864 | fQATrackHistosRecCuts = o.fQATrackHistosRecCuts; | |
865 | fQATrackHistosGen = o.fQATrackHistosGen; | |
866 | fQAJetHistosRec = o.fQAJetHistosRec; | |
867 | fQAJetHistosRecCuts = o.fQAJetHistosRecCuts; | |
868 | fQAJetHistosRecCutsLeading = o.fQAJetHistosRecCutsLeading; | |
869 | fQAJetHistosGen = o.fQAJetHistosGen; | |
870 | fQAJetHistosGenLeading = o.fQAJetHistosGenLeading; | |
fe343c6b | 871 | fQAJetHistosRecEffLeading = o.fQAJetHistosRecEffLeading; |
656dc810 | 872 | fFFHistosRecCuts = o.fFFHistosRecCuts; |
873 | fFFHistosRecLeading = o.fFFHistosRecLeading; | |
874 | fFFHistosRecLeadingTrack = o.fFFHistosRecLeadingTrack; | |
875 | fFFHistosGen = o.fFFHistosGen; | |
876 | fFFHistosGenLeading = o.fFFHistosGenLeading; | |
877 | fFFHistosGenLeadingTrack = o.fFFHistosGenLeadingTrack; | |
878 | fIJHistosRecCuts = o.fIJHistosRecCuts; | |
879 | fIJHistosRecLeading = o.fIJHistosRecLeading; | |
880 | fIJHistosRecLeadingTrack = o.fIJHistosRecLeadingTrack; | |
881 | fIJHistosGen = o.fIJHistosGen; | |
882 | fIJHistosGenLeading = o.fIJHistosGenLeading; | |
883 | fIJHistosGenLeadingTrack = o.fIJHistosGenLeadingTrack; | |
884 | fFFDiJetHistosRecCuts = o.fFFDiJetHistosRecCuts; | |
885 | fFFDiJetHistosRecLeading = o.fFFDiJetHistosRecLeading; | |
886 | fFFDiJetHistosRecLeadingTrack = o.fFFDiJetHistosRecLeadingTrack; | |
887 | fFFDiJetHistosGen = o.fFFDiJetHistosGen; | |
888 | fFFDiJetHistosGenLeading = o.fFFDiJetHistosGenLeading; | |
889 | fFFDiJetHistosGenLeadingTrack = o.fFFDiJetHistosGenLeadingTrack; | |
890 | fQADiJetHistosRecCuts = o.fQADiJetHistosRecCuts; | |
891 | fQADiJetHistosGen = o.fQADiJetHistosGen; | |
3af23c82 | 892 | fPhiCorrHistosJetArea = o.fPhiCorrHistosJetArea; |
893 | fPhiCorrHistosTransverseArea = o.fPhiCorrHistosTransverseArea; | |
894 | fPhiCorrHistosAwayArea = o.fPhiCorrHistosAwayArea; | |
656dc810 | 895 | fQATrackHighPtThreshold = o.fQATrackHighPtThreshold; |
896 | fFFNBinsJetPt = o.fFFNBinsJetPt; | |
897 | fFFJetPtMin = o.fFFJetPtMin; | |
898 | fFFJetPtMax = o.fFFJetPtMax; | |
899 | fFFNBinsPt = o.fFFNBinsPt; | |
900 | fFFPtMin = o.fFFPtMin; | |
901 | fFFPtMax = o.fFFPtMax; | |
902 | fFFNBinsXi = o.fFFNBinsXi; | |
903 | fFFXiMin = o.fFFXiMin; | |
904 | fFFXiMax = o.fFFXiMax; | |
905 | fFFNBinsZ = o.fFFNBinsZ; | |
906 | fFFZMin = o.fFFZMin; | |
907 | fFFZMax = o.fFFZMax; | |
908 | fQAJetNBinsPt = o.fQAJetNBinsPt; | |
909 | fQAJetPtMin = o.fQAJetPtMin; | |
910 | fQAJetPtMax = o.fQAJetPtMax; | |
911 | fQAJetNBinsEta = o.fQAJetNBinsEta; | |
912 | fQAJetEtaMin = o.fQAJetEtaMin; | |
913 | fQAJetEtaMax = o.fQAJetEtaMax; | |
914 | fQAJetNBinsPhi = o.fQAJetNBinsPhi; | |
915 | fQAJetPhiMin = o.fQAJetPhiMin; | |
916 | fQAJetPhiMax = o.fQAJetPhiMax; | |
917 | fQATrackNBinsPt = o.fQATrackNBinsPt; | |
918 | fQATrackPtMin = o.fQATrackPtMin; | |
919 | fQATrackPtMax = o.fQATrackPtMax; | |
920 | fQATrackNBinsEta = o.fQATrackNBinsEta; | |
921 | fQATrackEtaMin = o.fQATrackEtaMin; | |
922 | fQATrackEtaMax = o.fQATrackEtaMax; | |
923 | fQATrackNBinsPhi = o.fQATrackNBinsPhi; | |
924 | fQATrackPhiMin = o.fQATrackPhiMin; | |
925 | fQATrackPhiMax = o.fQATrackPhiMax; | |
926 | fIJNBinsJetPt = o.fIJNBinsJetPt; | |
927 | fIJJetPtMin = o.fIJJetPtMin; | |
928 | fIJJetPtMax = o.fIJJetPtMax; | |
929 | fIJNBinsPt = o.fIJNBinsPt; | |
930 | fIJPtMin = o.fIJPtMin; | |
931 | fIJPtMax = o.fIJPtMax; | |
932 | fIJNBinsZ = o.fIJNBinsZ; | |
933 | fIJZMin = o.fIJZMin; | |
934 | fIJZMax = o.fIJZMax; | |
935 | fIJNBinsCosTheta = o.fIJNBinsCosTheta; | |
936 | fIJCosThetaMin = o.fIJCosThetaMin; | |
937 | fIJCosThetaMax = o.fIJCosThetaMax; | |
938 | fIJNBinsTheta = o.fIJNBinsTheta; | |
939 | fIJThetaMin = o.fIJThetaMin; | |
940 | fIJThetaMax = o.fIJThetaMax; | |
941 | fIJNBinsJt = o.fIJNBinsJt; | |
942 | fIJJtMin = o.fIJJtMin; | |
943 | fIJJtMax = o.fIJJtMax; | |
944 | fDiJetNBinsJetInvMass = o.fDiJetNBinsJetInvMass; | |
945 | fDiJetJetInvMassMin = o.fDiJetJetInvMassMin; | |
946 | fDiJetJetInvMassMax = o.fDiJetJetInvMassMax; | |
947 | fDiJetNBinsJetPt = o.fDiJetNBinsJetPt; | |
948 | fDiJetJetPtMin = o.fDiJetJetPtMin; | |
949 | fDiJetJetPtMax = o.fDiJetJetPtMax; | |
950 | fDiJetNBinsPt = o.fDiJetNBinsPt; | |
951 | fDiJetPtMin = o.fDiJetPtMin; | |
952 | fDiJetPtMax = o.fDiJetPtMax; | |
953 | fDiJetNBinsXi = o.fDiJetNBinsXi; | |
954 | fDiJetXiMin = o.fDiJetXiMin; | |
955 | fDiJetXiMax = o.fDiJetXiMax; | |
956 | fDiJetNBinsZ = o.fDiJetNBinsZ; | |
957 | fDiJetZMin = o.fDiJetZMin; | |
958 | fDiJetZMax = o.fDiJetZMax; | |
959 | fQADiJetNBinsInvMass = o.fQADiJetNBinsInvMass; | |
960 | fQADiJetInvMassMin = o.fQADiJetInvMassMin; | |
961 | fQADiJetInvMassMax = o.fQADiJetInvMassMax; | |
962 | fQADiJetNBinsJetPt = o.fQADiJetNBinsJetPt; | |
963 | fQADiJetJetPtMin = o.fQADiJetJetPtMin; | |
964 | fQADiJetJetPtMax = o.fQADiJetJetPtMax; | |
965 | fQADiJetNBinsDeltaPhi = o.fQADiJetNBinsDeltaPhi; | |
966 | fQADiJetDeltaPhiMin = o.fQADiJetDeltaPhiMin; | |
967 | fQADiJetDeltaPhiMax = o.fQADiJetDeltaPhiMax; | |
968 | fQADiJetNBinsDeltaEta = o.fQADiJetNBinsDeltaEta; | |
969 | fQADiJetDeltaEtaMin = o.fQADiJetDeltaEtaMin; | |
970 | fQADiJetDeltaEtaMax = o.fQADiJetDeltaEtaMax; | |
971 | fQADiJetNBinsDeltaPt = o.fQADiJetNBinsDeltaPt; | |
972 | fQADiJetDeltaPtMin = o.fQADiJetDeltaPtMin; | |
973 | fQADiJetDeltaPtMax = o.fQADiJetDeltaPtMax; | |
3af23c82 | 974 | fQADiJetNBinsInBal = o.fQADiJetNBinsInBal; |
975 | fQADiJetInBalMin = o.fQADiJetInBalMin; | |
976 | fQADiJetInBalMax = o.fQADiJetInBalMax; | |
977 | fPhiCorrNBinsPt = o.fPhiCorrNBinsPt; | |
978 | fPhiCorrPtMin = o.fPhiCorrPtMin; | |
979 | fPhiCorrPtMax = o.fPhiCorrPtMax; | |
980 | fPhiCorrNBinsEta = o.fPhiCorrNBinsEta; | |
981 | fPhiCorrEtaMin = o.fPhiCorrEtaMin; | |
982 | fPhiCorrEtaMax = o.fPhiCorrEtaMax; | |
983 | fPhiCorrNBinsPhi = o.fPhiCorrNBinsPhi; | |
984 | fPhiCorrPhiMin = o.fPhiCorrPhiMin; | |
985 | fPhiCorrPhiMax = o.fPhiCorrPhiMax; | |
656dc810 | 986 | fCommonHistList = o.fCommonHistList; |
987 | fh1EvtSelection = o.fh1EvtSelection; | |
988 | fh1VertexNContributors = o.fh1VertexNContributors; | |
989 | fh1VertexZ = o.fh1VertexZ; | |
990 | fh1EvtMult = o.fh1EvtMult; | |
3af23c82 | 991 | fh1EvtCent = o.fh1EvtCent; |
ac017ff3 | 992 | fh1Xsec = o.fh1Xsec; |
993 | fh1Trials = o.fh1Trials; | |
994 | fh1PtHard = o.fh1PtHard; | |
995 | fh1PtHardTrials = o.fh1PtHardTrials; | |
656dc810 | 996 | fh1nRecJetsCuts = o.fh1nRecJetsCuts; |
997 | fh1nGenJets = o.fh1nGenJets; | |
fe343c6b | 998 | fh1nRecEffJets = o.fh1nRecEffJets; |
cb76764e | 999 | fh2PtRecVsGenPrim = o.fh2PtRecVsGenPrim; |
1000 | fQATrackHistosRecEffGen = o.fQATrackHistosRecEffGen; | |
1001 | fQATrackHistosRecEffRec = o.fQATrackHistosRecEffRec; | |
1002 | fFFHistosRecEffGen = o.fFFHistosRecEffGen; | |
1003 | fFFHistosRecEffRec = o.fFFHistosRecEffRec; | |
3af23c82 | 1004 | fhnResponseSinglePt = o.fhnResponseSinglePt; |
1005 | fhnResponseJetTrackPt = o.fhnResponseJetTrackPt; | |
1006 | fhnResponseJetZ = o.fhnResponseJetZ; | |
1007 | fhnResponseJetXi = o.fhnResponseJetXi; | |
1da9498b | 1008 | // Background |
67e37e80 | 1009 | fh1OutLeadingMult = o.fh1OutLeadingMult; |
1010 | fh1PerpMult = o.fh1PerpMult; | |
3af23c82 | 1011 | fh1ASideMult = o.fh1ASideMult; |
1012 | fh1ASideWindowMult = o.fh1ASideWindowMult; | |
1013 | fh1PerpWindowMult = o.fh1PerpWindowMult; | |
67e37e80 | 1014 | fh1Out2JetsMult = o.fh1Out2JetsMult; |
1015 | fh1Out3JetsMult = o.fh1Out3JetsMult; | |
1016 | fQABckgHisto0RecCuts = o.fQABckgHisto0RecCuts; | |
1017 | fQABckgHisto0Gen = o.fQABckgHisto0Gen; | |
1018 | fQABckgHisto1RecCuts = o.fQABckgHisto1RecCuts; | |
1019 | fQABckgHisto1Gen = o.fQABckgHisto1Gen; | |
1020 | fQABckgHisto2RecCuts = o.fQABckgHisto2RecCuts; | |
1021 | fQABckgHisto2Gen = o.fQABckgHisto2Gen; | |
1022 | fFFBckgHisto0RecCuts = o.fFFBckgHisto0RecCuts; | |
1023 | fFFBckgHisto0RecLeading = o.fFFBckgHisto0RecLeading; | |
1024 | fFFBckgHisto0Gen = o.fFFBckgHisto0Gen; | |
1025 | fFFBckgHisto0GenLeading = o.fFFBckgHisto0GenLeading; | |
1026 | fFFBckgHisto1RecCuts = o.fFFBckgHisto1RecCuts; | |
1027 | fFFBckgHisto1RecLeading = o.fFFBckgHisto1RecLeading; | |
1028 | fFFBckgHisto1Gen = o.fFFBckgHisto1Gen; | |
1029 | fFFBckgHisto1GenLeading = o.fFFBckgHisto1GenLeading; | |
1030 | fFFBckgHisto2RecCuts = o.fFFBckgHisto2RecCuts; | |
1031 | fFFBckgHisto2RecLeading = o.fFFBckgHisto2RecLeading; | |
1032 | fFFBckgHisto2Gen = o.fFFBckgHisto2Gen; | |
1033 | fFFBckgHisto2GenLeading = o.fFFBckgHisto2GenLeading; | |
1034 | fIJBckgHisto0RecCuts = o.fIJBckgHisto0RecCuts; | |
1035 | fIJBckgHisto0RecLeading = o.fIJBckgHisto0RecLeading; | |
1036 | fIJBckgHisto0Gen = o.fIJBckgHisto0Gen; | |
1037 | fIJBckgHisto0GenLeading = o.fIJBckgHisto0GenLeading; | |
1038 | fIJBckgHisto1RecCuts = o.fIJBckgHisto1RecCuts; | |
1039 | fIJBckgHisto1RecLeading = o.fIJBckgHisto1RecLeading; | |
1040 | fIJBckgHisto1Gen = o.fIJBckgHisto1Gen; | |
1041 | fIJBckgHisto1GenLeading = o.fIJBckgHisto1GenLeading; | |
1042 | fIJBckgHisto2RecCuts = o.fIJBckgHisto2RecCuts; | |
1043 | fIJBckgHisto2RecLeading = o.fIJBckgHisto2RecLeading; | |
1044 | fIJBckgHisto2Gen = o.fIJBckgHisto2Gen; | |
1045 | fIJBckgHisto2GenLeading = o.fIJBckgHisto2GenLeading; | |
1046 | fRandom = o.fRandom; | |
3af23c82 | 1047 | fBckgSubMethod = o.fBckgSubMethod; |
656dc810 | 1048 | } |
1049 | ||
1050 | return *this; | |
1051 | } | |
1052 | ||
1053 | //___________________________________________________________________________ | |
1054 | AliAnalysisTaskFragmentationFunction::~AliAnalysisTaskFragmentationFunction() | |
1055 | { | |
1056 | // destructor | |
1057 | ||
fe343c6b | 1058 | if(fTracksRec) delete fTracksRec; |
1059 | if(fTracksRecCuts) delete fTracksRecCuts; | |
1060 | if(fTracksGen) delete fTracksGen; | |
1061 | if(fTracksAODMCCharged) delete fTracksAODMCCharged; | |
1062 | if(fTracksRecQualityCuts) delete fTracksRecQualityCuts; | |
1063 | if(fJetsRec) delete fJetsRec; | |
1064 | if(fJetsRecCuts) delete fJetsRecCuts; | |
1065 | if(fJetsGen) delete fJetsGen; | |
1066 | if(fJetsRecEff) delete fJetsRecEff; | |
67e37e80 | 1067 | if(fBckgMode && (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters)){ |
1068 | if(fBckgJetsRec) delete fBckgJetsRec; | |
1069 | if(fBckgJetsRecCuts) delete fBckgJetsRecCuts; | |
1070 | if(fBckgJetsGen) delete fBckgJetsGen; | |
1071 | } | |
1072 | if(fRandom) delete fRandom; | |
656dc810 | 1073 | } |
1074 | ||
1075 | //______________________________________________________________________________________________________ | |
1076 | AliAnalysisTaskFragmentationFunction::AliFragFuncHistos::AliFragFuncHistos(const char* name, | |
1077 | Int_t nJetPt, Float_t jetPtMin, Float_t jetPtMax, | |
1078 | Int_t nPt, Float_t ptMin, Float_t ptMax, | |
1079 | Int_t nXi, Float_t xiMin, Float_t xiMax, | |
1080 | Int_t nZ , Float_t zMin , Float_t zMax ) | |
1081 | : TObject() | |
1082 | ,fNBinsJetPt(nJetPt) | |
1083 | ,fJetPtMin(jetPtMin) | |
1084 | ,fJetPtMax(jetPtMax) | |
1085 | ,fNBinsPt(nPt) | |
1086 | ,fPtMin(ptMin) | |
1087 | ,fPtMax(ptMax) | |
1088 | ,fNBinsXi(nXi) | |
1089 | ,fXiMin(xiMin) | |
1090 | ,fXiMax(xiMax) | |
1091 | ,fNBinsZ(nZ) | |
1092 | ,fZMin(zMin) | |
1093 | ,fZMax(zMax) | |
1094 | ,fh2TrackPt(0) | |
1095 | ,fh2Xi(0) | |
1096 | ,fh2Z(0) | |
1097 | ,fh1JetPt(0) | |
fceb275f | 1098 | ,fNameFF(name) |
656dc810 | 1099 | { |
1100 | // default constructor | |
1101 | ||
1102 | } | |
1103 | ||
1104 | //___________________________________________________________________________ | |
1105 | AliAnalysisTaskFragmentationFunction::AliFragFuncHistos::AliFragFuncHistos(const AliFragFuncHistos& copy) | |
1106 | : TObject() | |
1107 | ,fNBinsJetPt(copy.fNBinsJetPt) | |
1108 | ,fJetPtMin(copy.fJetPtMin) | |
1109 | ,fJetPtMax(copy.fJetPtMax) | |
1110 | ,fNBinsPt(copy.fNBinsPt) | |
1111 | ,fPtMin(copy.fPtMin) | |
1112 | ,fPtMax(copy.fPtMax) | |
1113 | ,fNBinsXi(copy.fNBinsXi) | |
1114 | ,fXiMin(copy.fXiMin) | |
1115 | ,fXiMax(copy.fXiMax) | |
1116 | ,fNBinsZ(copy.fNBinsZ) | |
1117 | ,fZMin(copy.fZMin) | |
1118 | ,fZMax(copy.fZMax) | |
1119 | ,fh2TrackPt(copy.fh2TrackPt) | |
1120 | ,fh2Xi(copy.fh2Xi) | |
1121 | ,fh2Z(copy.fh2Z) | |
1122 | ,fh1JetPt(copy.fh1JetPt) | |
fceb275f | 1123 | ,fNameFF(copy.fNameFF) |
656dc810 | 1124 | { |
1125 | // copy constructor | |
1126 | } | |
1127 | ||
1128 | //_______________________________________________________________________________________________________________________________________________________________ | |
1129 | AliAnalysisTaskFragmentationFunction::AliFragFuncHistos& AliAnalysisTaskFragmentationFunction::AliFragFuncHistos::operator=(const AliAnalysisTaskFragmentationFunction::AliFragFuncHistos& o) | |
1130 | { | |
1131 | // assignment | |
1132 | ||
1133 | if(this!=&o){ | |
1134 | TObject::operator=(o); | |
1135 | fNBinsJetPt = o.fNBinsJetPt; | |
1136 | fJetPtMin = o.fJetPtMin; | |
1137 | fJetPtMax = o.fJetPtMax; | |
1138 | fNBinsPt = o.fNBinsPt; | |
1139 | fPtMin = o.fPtMin; | |
1140 | fPtMax = o.fPtMax; | |
1141 | fNBinsXi = o.fNBinsXi; | |
1142 | fXiMin = o.fXiMin; | |
1143 | fXiMax = o.fXiMax; | |
1144 | fNBinsZ = o.fNBinsZ; | |
1145 | fZMin = o.fZMin; | |
1146 | fZMax = o.fZMax; | |
1147 | fh2TrackPt = o.fh2TrackPt; | |
1148 | fh2Xi = o.fh2Xi; | |
1149 | fh2Z = o.fh2Z; | |
1150 | fh1JetPt = o.fh1JetPt; | |
fceb275f | 1151 | fNameFF = o.fNameFF; |
656dc810 | 1152 | } |
1153 | ||
1154 | return *this; | |
1155 | } | |
1156 | ||
1157 | //_________________________________________________________ | |
1158 | AliAnalysisTaskFragmentationFunction::AliFragFuncHistos::~AliFragFuncHistos() | |
1159 | { | |
1160 | // destructor | |
1161 | ||
1162 | if(fh1JetPt) delete fh1JetPt; | |
1163 | if(fh2TrackPt) delete fh2TrackPt; | |
1164 | if(fh2Xi) delete fh2Xi; | |
1165 | if(fh2Z) delete fh2Z; | |
1166 | } | |
1167 | ||
1168 | //_________________________________________________________________ | |
1169 | void AliAnalysisTaskFragmentationFunction::AliFragFuncHistos::DefineHistos() | |
1170 | { | |
1171 | // book FF histos | |
1172 | ||
fceb275f | 1173 | fh1JetPt = new TH1F(Form("fh1FFJetPt%s", fNameFF.Data()),"",fNBinsJetPt,fJetPtMin,fJetPtMax); |
1174 | fh2TrackPt = new TH2F(Form("fh2FFTrackPt%s",fNameFF.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax,fNBinsPt, fPtMin, fPtMax); | |
1175 | fh2Xi = new TH2F(Form("fh2FFXi%s",fNameFF.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax, fNBinsXi, fXiMin, fXiMax); | |
1176 | fh2Z = new TH2F(Form("fh2FFZ%s",fNameFF.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax, fNBinsZ, fZMin, fZMax); | |
656dc810 | 1177 | |
1178 | AliAnalysisTaskFragmentationFunction::SetProperties(fh1JetPt, "p_{T} [GeV/c]", "entries"); | |
1179 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2TrackPt,"jet p_{T} [GeV/c]","p_{T} [GeV/c]","entries"); | |
1180 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Xi,"jet p_{T} [GeV/c]","#xi", "entries"); | |
1181 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Z,"jet p_{T} [GeV/c]","z","entries"); | |
1182 | } | |
1183 | ||
1184 | //_______________________________________________________________________________________________________________ | |
1da9498b | 1185 | void AliAnalysisTaskFragmentationFunction::AliFragFuncHistos::FillFF(Float_t trackPt, Float_t jetPt, Bool_t incrementJetPt, Float_t norm) |
656dc810 | 1186 | { |
1187 | // fill FF | |
1188 | ||
1da9498b | 1189 | if(incrementJetPt && norm) fh1JetPt->Fill(jetPt,1/norm); |
67e37e80 | 1190 | else if(incrementJetPt) fh1JetPt->Fill(jetPt); |
1da9498b | 1191 | if(norm)fh2TrackPt->Fill(jetPt,trackPt,1/norm); |
1192 | else fh2TrackPt->Fill(jetPt,trackPt); | |
656dc810 | 1193 | |
656dc810 | 1194 | Double_t z = 0.; |
1195 | if(jetPt>0) z = trackPt / jetPt; | |
1196 | Double_t xi = 0; | |
1197 | if(z>0) xi = TMath::Log(1/z); | |
1198 | ||
1da9498b | 1199 | if(norm){ |
1200 | fh2Xi->Fill(jetPt,xi,1/norm); | |
1201 | fh2Z->Fill(jetPt,z,1/norm); | |
1202 | } | |
1203 | else { | |
1204 | fh2Xi->Fill(jetPt,xi); | |
1205 | fh2Z->Fill(jetPt,z); | |
1206 | } | |
656dc810 | 1207 | } |
1208 | ||
1209 | //_________________________________________________________________________________ | |
1210 | void AliAnalysisTaskFragmentationFunction::AliFragFuncHistos::AddToOutput(TList* list) const | |
1211 | { | |
1212 | // add histos to list | |
1213 | ||
1214 | list->Add(fh1JetPt); | |
1215 | ||
1216 | list->Add(fh2TrackPt); | |
1217 | list->Add(fh2Xi); | |
1218 | list->Add(fh2Z); | |
1219 | } | |
1220 | ||
1221 | //_________________________________________________________________________________________________________ | |
1222 | AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos::AliFragFuncQAJetHistos(const char* name, | |
1223 | Int_t nPt, Float_t ptMin, Float_t ptMax, | |
1224 | Int_t nEta, Float_t etaMin, Float_t etaMax, | |
1225 | Int_t nPhi, Float_t phiMin, Float_t phiMax) | |
1226 | : TObject() | |
1227 | ,fNBinsPt(nPt) | |
1228 | ,fPtMin(ptMin) | |
1229 | ,fPtMax(ptMax) | |
1230 | ,fNBinsEta(nEta) | |
1231 | ,fEtaMin(etaMin) | |
1232 | ,fEtaMax(etaMax) | |
1233 | ,fNBinsPhi(nPhi) | |
1234 | ,fPhiMin(phiMin) | |
1235 | ,fPhiMax(phiMax) | |
1236 | ,fh2EtaPhi(0) | |
1237 | ,fh1Pt(0) | |
fceb275f | 1238 | ,fNameQAJ(name) |
656dc810 | 1239 | { |
1240 | // default constructor | |
1241 | } | |
1242 | ||
1243 | //____________________________________________________________________________________ | |
1244 | AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos::AliFragFuncQAJetHistos(const AliFragFuncQAJetHistos& copy) | |
1245 | : TObject() | |
1246 | ,fNBinsPt(copy.fNBinsPt) | |
1247 | ,fPtMin(copy.fPtMin) | |
1248 | ,fPtMax(copy.fPtMax) | |
1249 | ,fNBinsEta(copy.fNBinsEta) | |
1250 | ,fEtaMin(copy.fEtaMin) | |
1251 | ,fEtaMax(copy.fEtaMax) | |
1252 | ,fNBinsPhi(copy.fNBinsPhi) | |
1253 | ,fPhiMin(copy.fPhiMin) | |
1254 | ,fPhiMax(copy.fPhiMax) | |
1255 | ,fh2EtaPhi(copy.fh2EtaPhi) | |
1256 | ,fh1Pt(copy.fh1Pt) | |
fceb275f | 1257 | ,fNameQAJ(copy.fNameQAJ) |
656dc810 | 1258 | { |
1259 | // copy constructor | |
1260 | } | |
1261 | ||
1262 | //________________________________________________________________________________________________________________________________________________________________________ | |
1263 | AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos& AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos::operator=(const AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos& o) | |
1264 | { | |
1265 | // assignment | |
1266 | ||
1267 | if(this!=&o){ | |
1268 | TObject::operator=(o); | |
1269 | fNBinsPt = o.fNBinsPt; | |
1270 | fPtMin = o.fPtMin; | |
1271 | fPtMax = o.fPtMax; | |
1272 | fNBinsEta = o.fNBinsEta; | |
1273 | fEtaMin = o.fEtaMin; | |
1274 | fEtaMax = o.fEtaMax; | |
1275 | fNBinsPhi = o.fNBinsPhi; | |
1276 | fPhiMin = o.fPhiMin; | |
1277 | fPhiMax = o.fPhiMax; | |
1278 | fh2EtaPhi = o.fh2EtaPhi; | |
1279 | fh1Pt = o.fh1Pt; | |
fceb275f | 1280 | fNameQAJ = o.fNameQAJ; |
656dc810 | 1281 | } |
1282 | ||
1283 | return *this; | |
1284 | } | |
1285 | ||
1286 | //______________________________________________________________ | |
1287 | AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos::~AliFragFuncQAJetHistos() | |
1288 | { | |
1289 | // destructor | |
1290 | ||
1291 | if(fh2EtaPhi) delete fh2EtaPhi; | |
1292 | if(fh1Pt) delete fh1Pt; | |
1293 | } | |
1294 | ||
1295 | //____________________________________________________________________ | |
1296 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos::DefineHistos() | |
1297 | { | |
1298 | // book jet QA histos | |
1299 | ||
fceb275f | 1300 | fh2EtaPhi = new TH2F(Form("fh2JetQAEtaPhi%s", fNameQAJ.Data()), Form("%s: #eta - #phi distribution", fNameQAJ.Data()), fNBinsEta, fEtaMin, fEtaMax, fNBinsPhi, fPhiMin, fPhiMax); |
1301 | fh1Pt = new TH1F(Form("fh1JetQAPt%s", fNameQAJ.Data()), Form("%s: p_{T} distribution", fNameQAJ.Data()), fNBinsPt, fPtMin, fPtMax); | |
656dc810 | 1302 | |
1303 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2EtaPhi, "#eta", "#phi"); | |
1304 | AliAnalysisTaskFragmentationFunction::SetProperties(fh1Pt, "p_{T} [GeV/c]", "entries"); | |
1305 | } | |
1306 | ||
1307 | //____________________________________________________________________________________________________ | |
1308 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos::FillJetQA(Float_t eta, Float_t phi, Float_t pt) | |
1309 | { | |
1310 | // fill jet QA histos | |
1311 | ||
1312 | fh2EtaPhi->Fill( eta, phi); | |
1313 | fh1Pt->Fill( pt ); | |
1314 | } | |
1315 | ||
1316 | //____________________________________________________________________________________ | |
1317 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQAJetHistos::AddToOutput(TList* list) const | |
1318 | { | |
1319 | // add histos to list | |
1320 | ||
1321 | list->Add(fh2EtaPhi); | |
1322 | list->Add(fh1Pt); | |
1323 | } | |
1324 | ||
1325 | //___________________________________________________________________________________________________________ | |
1326 | AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos::AliFragFuncQATrackHistos(const char* name, | |
1327 | Int_t nPt, Float_t ptMin, Float_t ptMax, | |
1328 | Int_t nEta, Float_t etaMin, Float_t etaMax, | |
1329 | Int_t nPhi, Float_t phiMin, Float_t phiMax, | |
1330 | Float_t ptThresh) | |
1331 | : TObject() | |
1332 | ,fNBinsPt(nPt) | |
1333 | ,fPtMin(ptMin) | |
1334 | ,fPtMax(ptMax) | |
1335 | ,fNBinsEta(nEta) | |
1336 | ,fEtaMin(etaMin) | |
1337 | ,fEtaMax(etaMax) | |
1338 | ,fNBinsPhi(nPhi) | |
1339 | ,fPhiMin(phiMin) | |
1340 | ,fPhiMax(phiMax) | |
1341 | ,fHighPtThreshold(ptThresh) | |
1342 | ,fh2EtaPhi(0) | |
1343 | ,fh1Pt(0) | |
1344 | ,fh2HighPtEtaPhi(0) | |
3af23c82 | 1345 | ,fh2PhiPt(0) |
fceb275f | 1346 | ,fNameQAT(name) |
656dc810 | 1347 | { |
1348 | // default constructor | |
1349 | } | |
1350 | ||
1351 | //__________________________________________________________________________________________ | |
1352 | AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos::AliFragFuncQATrackHistos(const AliFragFuncQATrackHistos& copy) | |
1353 | : TObject() | |
1354 | ,fNBinsPt(copy.fNBinsPt) | |
1355 | ,fPtMin(copy.fPtMin) | |
1356 | ,fPtMax(copy.fPtMax) | |
1357 | ,fNBinsEta(copy.fNBinsEta) | |
1358 | ,fEtaMin(copy.fEtaMin) | |
1359 | ,fEtaMax(copy.fEtaMax) | |
1360 | ,fNBinsPhi(copy.fNBinsPhi) | |
1361 | ,fPhiMin(copy.fPhiMin) | |
1362 | ,fPhiMax(copy.fPhiMax) | |
1363 | ,fHighPtThreshold(copy.fHighPtThreshold) | |
1364 | ,fh2EtaPhi(copy.fh2EtaPhi) | |
1365 | ,fh1Pt(copy.fh1Pt) | |
1366 | ,fh2HighPtEtaPhi(copy.fh2HighPtEtaPhi) | |
3af23c82 | 1367 | ,fh2PhiPt(copy.fh2PhiPt) |
fceb275f | 1368 | ,fNameQAT(copy.fNameQAT) |
656dc810 | 1369 | { |
1370 | // copy constructor | |
1371 | } | |
1372 | ||
1373 | // _____________________________________________________________________________________________________________________________________________________________________________ | |
1374 | AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos& AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos::operator=(const AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos& o) | |
1375 | { | |
1376 | // assignment | |
1377 | ||
1378 | if(this!=&o){ | |
1379 | TObject::operator=(o); | |
1380 | fNBinsPt = o.fNBinsPt; | |
1381 | fPtMin = o.fPtMin; | |
1382 | fPtMax = o.fPtMax; | |
1383 | fNBinsEta = o.fNBinsEta; | |
1384 | fEtaMin = o.fEtaMin; | |
1385 | fEtaMax = o.fEtaMax; | |
1386 | fNBinsPhi = o.fNBinsPhi; | |
1387 | fPhiMin = o.fPhiMin; | |
1388 | fPhiMax = o.fPhiMax; | |
1389 | fHighPtThreshold = o.fHighPtThreshold; | |
1390 | fh2EtaPhi = o.fh2EtaPhi; | |
1391 | fh1Pt = o.fh1Pt; | |
1392 | fh2HighPtEtaPhi = o.fh2HighPtEtaPhi; | |
3af23c82 | 1393 | fh2PhiPt = o.fh2PhiPt; |
fceb275f | 1394 | fNameQAT = o.fNameQAT; |
656dc810 | 1395 | } |
1396 | ||
1397 | return *this; | |
1398 | } | |
1399 | ||
1400 | //___________________________________________________________________ | |
1401 | AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos::~AliFragFuncQATrackHistos() | |
1402 | { | |
1403 | // destructor | |
1404 | ||
1405 | if(fh2EtaPhi) delete fh2EtaPhi; | |
1406 | if(fh2HighPtEtaPhi) delete fh2HighPtEtaPhi; | |
1407 | if(fh1Pt) delete fh1Pt; | |
3af23c82 | 1408 | if(fh2PhiPt) delete fh2PhiPt; |
656dc810 | 1409 | } |
1410 | ||
1411 | //______________________________________________________________________ | |
1412 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos::DefineHistos() | |
1413 | { | |
1414 | // book track QA histos | |
1415 | ||
fceb275f | 1416 | fh2EtaPhi = new TH2F(Form("fh2TrackQAEtaPhi%s", fNameQAT.Data()), Form("%s: #eta - #phi distribution", fNameQAT.Data()), fNBinsEta, fEtaMin, fEtaMax, fNBinsPhi, fPhiMin, fPhiMax); |
1417 | fh2HighPtEtaPhi = new TH2F(Form("fh2TrackQAHighPtEtaPhi%s", fNameQAT.Data()), Form("%s: #eta - #phi distribution for high-p_{T}", fNameQAT.Data()), fNBinsEta, fEtaMin, fEtaMax, fNBinsPhi, fPhiMin, fPhiMax); | |
1418 | fh1Pt = new TH1F(Form("fh1TrackQAPt%s", fNameQAT.Data()), Form("%s: p_{T} distribution", fNameQAT.Data()), fNBinsPt, fPtMin, fPtMax); | |
3af23c82 | 1419 | fh2PhiPt = new TH2F(Form("fh2TrackQAPhiPt%s", fNameQAT.Data()), Form("%s: #eta - #p_{T} distribution", fNameQAT.Data()), fNBinsPhi, fPhiMin, fPhiMax, fNBinsPt, fPtMin, fPtMax); |
1420 | ||
656dc810 | 1421 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2EtaPhi, "#eta", "#phi"); |
1422 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2HighPtEtaPhi, "#eta", "#phi"); | |
1423 | AliAnalysisTaskFragmentationFunction::SetProperties(fh1Pt, "p_{T} [GeV/c]", "entries"); | |
3af23c82 | 1424 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2PhiPt, "#phi", "p_{T} [GeV/c]"); |
656dc810 | 1425 | } |
1426 | ||
1427 | //________________________________________________________________________________________________________ | |
3af23c82 | 1428 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos::FillTrackQA(Float_t eta, Float_t phi, Float_t pt, Bool_t weightPt, Float_t norm) |
656dc810 | 1429 | { |
1430 | // fill track QA histos | |
3af23c82 | 1431 | Float_t weight = 1.; |
1432 | if(weightPt) weight = pt; | |
1433 | fh2EtaPhi->Fill( eta, phi, weight); | |
1434 | if(pt > fHighPtThreshold) fh2HighPtEtaPhi->Fill( eta, phi, weight); | |
1435 | if(norm) fh1Pt->Fill( pt, 1/norm ); | |
1436 | else fh1Pt->Fill( pt ); | |
1437 | fh2PhiPt->Fill(phi, pt); | |
656dc810 | 1438 | } |
1439 | ||
1440 | //______________________________________________________________________________________ | |
1441 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQATrackHistos::AddToOutput(TList* list) const | |
1442 | { | |
1443 | // add histos to list | |
1444 | ||
1445 | list->Add(fh2EtaPhi); | |
1446 | list->Add(fh2HighPtEtaPhi); | |
1447 | list->Add(fh1Pt); | |
3af23c82 | 1448 | list->Add(fh2PhiPt); |
656dc810 | 1449 | } |
1450 | ||
1451 | //______________________________________________________________________________________________________ | |
1452 | AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos::AliFragFuncIntraJetHistos(const char* name, | |
1453 | Int_t nJetPt, Float_t jetPtMin, Float_t jetPtMax, | |
1454 | Int_t nPt, Float_t ptMin, Float_t ptMax, | |
1455 | Int_t nZ , Float_t zMin , Float_t zMax, | |
1456 | Int_t nCosTheta , Float_t costhetaMin , Float_t costhetaMax, | |
1457 | Int_t nTheta , Float_t thetaMin , Float_t thetaMax, | |
1458 | Int_t nJt , Float_t jtMin , Float_t jtMax) | |
1459 | : TObject() | |
1460 | ,fNBinsJetPt(nJetPt) | |
1461 | ,fJetPtMin(jetPtMin) | |
1462 | ,fJetPtMax(jetPtMax) | |
1463 | ,fNBinsPt(nPt) | |
1464 | ,fPtMin(ptMin) | |
1465 | ,fPtMax(ptMax) | |
1466 | ,fNBinsZ(nZ) | |
1467 | ,fZMin(zMin) | |
1468 | ,fZMax(zMax) | |
1469 | ,fNBinsJt(nJt) | |
1470 | ,fJtMin(jtMin) | |
1471 | ,fJtMax(jtMax) | |
1472 | ,fNBinsTheta(nTheta) | |
1473 | ,fThetaMin(thetaMin) | |
1474 | ,fThetaMax(thetaMax) | |
1475 | ,fNBinsCosTheta(nCosTheta) | |
1476 | ,fCosThetaMin(costhetaMin) | |
1477 | ,fCosThetaMax(costhetaMax) | |
656dc810 | 1478 | ,fh2CosTheta(0) |
67e37e80 | 1479 | ,fh2PtZ(0) |
1480 | ,fh3ThetaZ(0) | |
1481 | ,fh3JtTheta(0) | |
1482 | ,fh3JtZ(0) | |
fceb275f | 1483 | ,fNameIJ(name) |
656dc810 | 1484 | { |
1485 | // default constructor | |
1486 | ||
1487 | } | |
1488 | ||
1489 | //___________________________________________________________________________ | |
1490 | AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos::AliFragFuncIntraJetHistos(const AliFragFuncIntraJetHistos& copy) | |
1491 | : TObject() | |
1492 | ,fNBinsJetPt(copy.fNBinsJetPt) | |
1493 | ,fJetPtMin(copy.fJetPtMin) | |
1494 | ,fJetPtMax(copy.fJetPtMax) | |
1495 | ,fNBinsPt(copy.fNBinsPt) | |
1496 | ,fPtMin(copy.fPtMin) | |
1497 | ,fPtMax(copy.fPtMax) | |
1498 | ,fNBinsZ(copy.fNBinsZ) | |
1499 | ,fZMin(copy.fZMin) | |
1500 | ,fZMax(copy.fZMax) | |
1501 | ,fNBinsJt(copy.fNBinsJt) | |
1502 | ,fJtMin(copy.fJtMin) | |
1503 | ,fJtMax(copy.fJtMax) | |
1504 | ,fNBinsTheta(copy.fNBinsTheta) | |
1505 | ,fThetaMin(copy.fThetaMin) | |
1506 | ,fThetaMax(copy.fThetaMax) | |
1507 | ,fNBinsCosTheta(copy.fNBinsCosTheta) | |
1508 | ,fCosThetaMin(copy.fCosThetaMin) | |
1509 | ,fCosThetaMax(copy.fCosThetaMax) | |
656dc810 | 1510 | ,fh2CosTheta(copy.fh2CosTheta) |
67e37e80 | 1511 | ,fh2PtZ(copy.fh2PtZ) |
1512 | ,fh3ThetaZ(copy.fh3ThetaZ) | |
1513 | ,fh3JtTheta(copy.fh3JtTheta) | |
1514 | ,fh3JtZ(copy.fh3JtZ) | |
fceb275f | 1515 | ,fNameIJ(copy.fNameIJ) |
656dc810 | 1516 | { |
1517 | // copy constructor | |
1518 | } | |
1519 | ||
1520 | //_______________________________________________________________________________________________________________________________________________________________ | |
1521 | AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos& AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos::operator=(const AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos& o) | |
1522 | { | |
1523 | // assignment | |
1524 | ||
1525 | if(this!=&o){ | |
1526 | TObject::operator=(o); | |
1527 | fNBinsJetPt = o.fNBinsJetPt; | |
1528 | fJetPtMin = o.fJetPtMin; | |
1529 | fJetPtMax = o.fJetPtMax; | |
1530 | fNBinsPt = o.fNBinsPt; | |
1531 | fPtMin = o.fPtMin; | |
1532 | fPtMax = o.fPtMax; | |
1533 | fNBinsZ = o.fNBinsZ; | |
1534 | fZMin = o.fZMin; | |
1535 | fZMax = o.fZMax; | |
1536 | fNBinsJt = o.fNBinsJt; | |
1537 | fJtMin = o.fJtMin; | |
1538 | fJtMax = o.fJtMax; | |
1539 | fNBinsTheta = o.fNBinsTheta; | |
1540 | fThetaMin = o.fThetaMin; | |
1541 | fThetaMax = o.fThetaMax; | |
1542 | fNBinsCosTheta = o.fNBinsCosTheta; | |
1543 | fCosThetaMin = o.fCosThetaMin; | |
1544 | fCosThetaMax = o.fCosThetaMax; | |
656dc810 | 1545 | fh2CosTheta = o.fh2CosTheta; |
67e37e80 | 1546 | fh2PtZ = o.fh2PtZ; |
1547 | fh3ThetaZ = o.fh3ThetaZ; | |
1548 | fh3JtTheta = o.fh3JtTheta; | |
1549 | fh3JtZ = o.fh3JtZ; | |
fceb275f | 1550 | fNameIJ = o.fNameIJ; |
656dc810 | 1551 | } |
1552 | ||
1553 | return *this; | |
1554 | } | |
1555 | ||
1556 | //_________________________________________________________ | |
1557 | AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos::~AliFragFuncIntraJetHistos() | |
1558 | { | |
1559 | // destructor | |
1560 | ||
1561 | ||
656dc810 | 1562 | if(fh2CosTheta) delete fh2CosTheta; |
67e37e80 | 1563 | if(fh2PtZ) delete fh2PtZ; |
1564 | if(fh3ThetaZ) delete fh3ThetaZ; | |
1565 | if(fh3JtTheta) delete fh3JtTheta; | |
1566 | if(fh3JtZ) delete fh3JtZ; | |
656dc810 | 1567 | |
1568 | } | |
1569 | ||
1570 | //_________________________________________________________________ | |
1571 | void AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos::DefineHistos() | |
1572 | { | |
1573 | // book FF histos | |
1574 | ||
fceb275f | 1575 | fh2CosTheta = new TH2F(Form("fh2IJcosTheta%s",fNameIJ.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax,fNBinsCosTheta, fCosThetaMin, fCosThetaMax); |
67e37e80 | 1576 | fh2PtZ = new TH2F(Form("fh2IJPtZ%s",fNameIJ.Data()),"",fNBinsPt, fPtMin, fPtMax, fNBinsZ, fZMin, fZMax); |
1577 | fh3ThetaZ = new TH3F(Form("fh3IJThetaZ%s",fNameIJ.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax, fNBinsTheta, fThetaMin, fThetaMax, fNBinsZ, fZMin, fZMax); | |
1578 | fh3JtTheta = new TH3F(Form("fh3IJJtTheta%s",fNameIJ.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax, fNBinsJt, fJtMin, fJtMax, fNBinsTheta, fThetaMin, fThetaMax); | |
1579 | fh3JtZ = new TH3F(Form("fh3IJJtZ%s",fNameIJ.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax, fNBinsJt, fJtMin, fJtMax, fNBinsZ, fZMin, fZMax); | |
656dc810 | 1580 | |
656dc810 | 1581 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2CosTheta,"jet p_{T} [GeV/c]","cos(#Theta)", "entries"); |
67e37e80 | 1582 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2PtZ,"had p_{T} [GeV/c]","z=p_{T}^{had}/p_{T}^{jet}","entries"); |
1583 | AliAnalysisTaskFragmentationFunction::SetProperties(fh3ThetaZ,"jet p_{T} [GeV/c]","#Theta [rad]","z=p_{T}^{had}/p_{T}^{jet}"); | |
1584 | AliAnalysisTaskFragmentationFunction::SetProperties(fh3JtTheta,"jet p_{T} [GeV/c]","j_{T} [GeV/c]","#Theta [rad]"); | |
1585 | AliAnalysisTaskFragmentationFunction::SetProperties(fh3JtZ,"jet p_{T} [GeV/c]","j_{T} [GeV/c]","z=p_{T}^{had}/p_{T}^{jet}"); | |
1586 | ||
656dc810 | 1587 | } |
1588 | ||
1589 | //_______________________________________________________________________________________________________________ | |
1da9498b | 1590 | void AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos::FillIntraJet(const TLorentzVector* trackV, const TLorentzVector* jetV, Float_t norm) |
656dc810 | 1591 | { |
1592 | // fill IntraJet histos | |
1593 | ||
1594 | Float_t cosTheta = 0.; Float_t theta = 0.; | |
1595 | Float_t jt = 0.; Float_t z = 0.; | |
1596 | // For Theta distribution | |
1597 | Float_t pxT = trackV->Px(); | |
1598 | Float_t pyT = trackV->Py(); | |
1599 | Float_t pzT = trackV->Pz(); | |
1600 | Float_t ptT = trackV->Pt(); | |
1601 | Float_t pT = trackV->P(); | |
1602 | Float_t etaT = trackV->Eta(); | |
1603 | Float_t phiT = trackV->Phi(); // Check the value returned | |
1604 | Float_t pxJ = jetV->Px(); | |
1605 | Float_t pyJ = jetV->Py(); | |
1606 | Float_t pzJ = jetV->Pz(); | |
1607 | Float_t ptJ = jetV->Pt(); | |
1608 | Float_t pJ = jetV->P(); | |
1609 | ||
1610 | // Compute z | |
1da9498b | 1611 | if(ptJ>0) z = (Float_t)(ptT/ptJ); |
656dc810 | 1612 | |
1613 | // Compute theta | |
1614 | cosTheta = (pxT*pxJ+pyT*pyJ+pzT*pzJ)/(pT*pJ); | |
1615 | theta = TMath::ACos(cosTheta); | |
1616 | ||
1617 | // Compute jt | |
1618 | TVector3 trackP; TVector3 jetP; | |
1619 | jetP[0] = pxJ; | |
1620 | jetP[1] = pyJ; | |
1621 | jetP[2] = pzJ; | |
1622 | trackP.SetPtEtaPhi(ptT,etaT,phiT); | |
1623 | jt = TMath::Sin(trackP.Angle(jetP))*trackP.Mag(); | |
1624 | ||
67e37e80 | 1625 | // Fill histos |
1da9498b | 1626 | if(norm){ |
1627 | fh2CosTheta->Fill(ptJ,cosTheta,1/norm); | |
67e37e80 | 1628 | fh2PtZ->Fill(ptT,z,1/norm); |
1629 | fh3ThetaZ->Fill(ptJ,theta,z,1/norm); | |
1630 | fh3JtTheta->Fill(ptJ,jt,theta,1/norm); | |
1631 | fh3JtZ->Fill(ptJ,jt,z,1/norm); | |
1da9498b | 1632 | } |
1633 | else { | |
1634 | fh2CosTheta->Fill(ptJ,cosTheta); | |
67e37e80 | 1635 | fh2PtZ->Fill(ptT,z); |
1636 | fh3ThetaZ->Fill(ptJ,theta,z); | |
1637 | fh3JtTheta->Fill(ptJ,jt,theta); | |
1638 | fh3JtZ->Fill(ptJ,jt,z); | |
1da9498b | 1639 | } |
656dc810 | 1640 | |
656dc810 | 1641 | } |
1642 | ||
1643 | //______________________________________________________________________________________________________ | |
1644 | AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos::AliFragFuncDiJetHistos(const char* name, Int_t kindSlices, | |
1645 | Int_t nJetInvMass, Float_t jetInvMassMin, Float_t jetInvMassMax, | |
1646 | Int_t nJetPt, Float_t jetPtMin, Float_t jetPtMax, | |
1647 | Int_t nPt, Float_t ptMin, Float_t ptMax, | |
1648 | Int_t nXi, Float_t xiMin, Float_t xiMax, | |
1649 | Int_t nZ , Float_t zMin , Float_t zMax) | |
1650 | : TObject() | |
1651 | ,fKindSlices(kindSlices) | |
1652 | ,fNBinsJetInvMass(nJetInvMass) | |
1653 | ,fJetInvMassMin(jetInvMassMin) | |
1654 | ,fJetInvMassMax(jetInvMassMax) | |
1655 | ,fNBinsJetPt(nJetPt) | |
1656 | ,fJetPtMin(jetPtMin) | |
1657 | ,fJetPtMax(jetPtMax) | |
1658 | ,fNBinsPt(nPt) | |
1659 | ,fPtMin(ptMin) | |
1660 | ,fPtMax(ptMax) | |
1661 | ,fNBinsXi(nXi) | |
1662 | ,fXiMin(xiMin) | |
1663 | ,fXiMax(xiMax) | |
1664 | ,fNBinsZ(nZ) | |
1665 | ,fZMin(zMin) | |
1666 | ,fZMax(zMax) | |
1667 | ,fh2TrackPtJet1(0) | |
1668 | ,fh2TrackPtJet2(0) | |
1669 | ,fh2TrackPtJet(0) | |
1670 | ,fh1Jet1Pt(0) | |
1671 | ,fh1Jet2Pt(0) | |
1672 | ,fh1JetPt(0) | |
1673 | ,fh2Xi1(0) | |
1674 | ,fh2Xi2(0) | |
1675 | ,fh2Xi(0) | |
1676 | ,fh2Z1(0) | |
1677 | ,fh2Z2(0) | |
1678 | ,fh2Z(0) | |
1679 | ,fh2Pt1(0) | |
1680 | ,fh2Pt2(0) | |
1681 | ,fh2Pt(0) | |
fceb275f | 1682 | ,fNameDJ(name) |
656dc810 | 1683 | { |
1684 | // default constructor | |
1685 | ||
1686 | } | |
1687 | ||
1688 | //______________________________________________________________________________________________________ | |
1689 | AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos::AliFragFuncDiJetHistos(const AliFragFuncDiJetHistos& copy) | |
1690 | : TObject() | |
1691 | ,fKindSlices(copy.fKindSlices) | |
1692 | ,fNBinsJetInvMass(copy.fNBinsJetInvMass) | |
1693 | ,fJetInvMassMin(copy.fJetInvMassMin) | |
1694 | ,fJetInvMassMax(copy.fJetInvMassMax) | |
1695 | ,fNBinsJetPt(copy.fNBinsJetPt) | |
1696 | ,fJetPtMin(copy.fJetPtMin) | |
1697 | ,fJetPtMax(copy.fJetPtMax) | |
1698 | ,fNBinsPt(copy.fNBinsPt) | |
1699 | ,fPtMin(copy.fPtMin) | |
1700 | ,fPtMax(copy.fPtMax) | |
1701 | ,fNBinsXi(copy.fNBinsXi) | |
1702 | ,fXiMin(copy.fXiMin) | |
1703 | ,fXiMax(copy.fXiMax) | |
1704 | ,fNBinsZ(copy.fNBinsZ) | |
1705 | ,fZMin(copy.fZMin) | |
1706 | ,fZMax(copy.fZMax) | |
1707 | ,fh2TrackPtJet1(copy.fh2TrackPtJet1) | |
1708 | ,fh2TrackPtJet2(copy.fh2TrackPtJet2) | |
1709 | ,fh2TrackPtJet(copy.fh2TrackPtJet) | |
1710 | ,fh1Jet1Pt(copy.fh1Jet1Pt) | |
1711 | ,fh1Jet2Pt(copy.fh1Jet2Pt) | |
1712 | ,fh1JetPt(copy.fh1JetPt) | |
1713 | ,fh2Xi1(copy.fh2Xi1) | |
1714 | ,fh2Xi2(copy.fh2Xi2) | |
1715 | ,fh2Xi(copy.fh2Xi2) | |
1716 | ,fh2Z1(copy.fh2Z1) | |
1717 | ,fh2Z2(copy.fh2Z2) | |
1718 | ,fh2Z(copy.fh2Z) | |
1719 | ,fh2Pt1(copy.fh2Pt1) | |
1720 | ,fh2Pt2(copy.fh2Pt2) | |
1721 | ,fh2Pt(copy.fh2Pt) | |
fceb275f | 1722 | ,fNameDJ(copy.fNameDJ) |
656dc810 | 1723 | { |
1724 | // default constructor | |
1725 | ||
1726 | } | |
1727 | ||
1728 | //_______________________________________________________________________________________________________________________________________________________________ | |
1729 | AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos& AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos::operator=(const AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos& o) | |
1730 | { | |
1731 | // assignment | |
1732 | ||
1733 | if(this!=&o){ | |
1734 | TObject::operator=(o); | |
1735 | fKindSlices = o.fKindSlices; | |
1736 | fNBinsJetInvMass = o.fNBinsJetInvMass; | |
1737 | fJetInvMassMin = o.fJetInvMassMin; | |
1738 | fJetInvMassMax = o.fJetInvMassMax; | |
1739 | fNBinsJetPt = o.fNBinsJetPt; | |
1740 | fJetPtMin = o.fJetPtMin; | |
1741 | fJetPtMax = o.fJetPtMax; | |
1742 | fNBinsPt = o.fNBinsPt; | |
1743 | fPtMin = o.fPtMin; | |
1744 | fPtMax = o.fPtMax; | |
1745 | fNBinsXi = o.fNBinsXi; | |
1746 | fXiMin = o.fXiMin; | |
1747 | fXiMax = o.fXiMax; | |
1748 | fNBinsZ = o.fNBinsZ; | |
1749 | fZMin = o.fZMin; | |
1750 | fZMax = o.fZMax; | |
1751 | fh2TrackPtJet1 = o.fh2TrackPtJet1; | |
1752 | fh2TrackPtJet2 = o.fh2TrackPtJet2; | |
1753 | fh2TrackPtJet = o.fh2TrackPtJet; | |
1754 | fh1Jet1Pt = o.fh1Jet1Pt; | |
1755 | fh1Jet2Pt = o.fh1Jet2Pt; | |
1756 | fh1JetPt = o.fh1JetPt; | |
1757 | fh2Xi1 = o.fh2Xi1; | |
1758 | fh2Xi2 = o.fh2Xi2; | |
1759 | fh2Xi = o.fh2Xi; | |
1760 | fh2Z1 = o.fh2Z1; | |
1761 | fh2Z2 = o.fh2Z2; | |
1762 | fh2Z = o.fh2Z; | |
1763 | fh2Pt1 = o.fh2Pt1; | |
1764 | fh2Pt2 = o.fh2Pt2; | |
1765 | fh2Pt = o.fh2Pt; | |
fceb275f | 1766 | fNameDJ = o.fNameDJ; |
656dc810 | 1767 | } |
1768 | ||
1769 | return *this; | |
1770 | } | |
1771 | ||
1772 | //_________________________________________________________ | |
1773 | AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos::~AliFragFuncDiJetHistos() | |
1774 | { | |
1775 | // destructor | |
1776 | ||
1777 | if(fh2TrackPtJet1) delete fh2TrackPtJet1; | |
1778 | if(fh2TrackPtJet2) delete fh2TrackPtJet2; | |
1779 | if(fh2TrackPtJet ) delete fh2TrackPtJet; | |
1780 | if(fh1Jet1Pt) delete fh1Jet1Pt; | |
1781 | if(fh1Jet2Pt) delete fh1Jet2Pt; | |
1782 | if(fh1JetPt) delete fh1JetPt; | |
1783 | if(fh2Xi1) delete fh2Xi1; | |
1784 | if(fh2Xi2) delete fh2Xi2; | |
1785 | if(fh2Xi) delete fh2Xi; | |
1786 | if(fh2Z1) delete fh2Z1; | |
1787 | if(fh2Z2) delete fh2Z2; | |
1788 | if(fh2Z) delete fh2Z; | |
1789 | if(fh2Pt1) delete fh2Pt1; | |
1790 | if(fh2Pt2) delete fh2Pt2; | |
1791 | if(fh2Pt) delete fh2Pt; | |
1792 | } | |
1793 | ||
1794 | //________________________________________________________________________ | |
1795 | void AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos::DefineDiJetHistos() | |
1796 | { | |
fceb275f | 1797 | // book DiJet histos |
1798 | ||
656dc810 | 1799 | Int_t nBins = 0; |
1800 | Double_t min = 0.; | |
1801 | Double_t max = 0.; | |
1802 | const char *xaxis = ""; | |
1803 | if(fKindSlices == 1) | |
1804 | { | |
1805 | nBins = fNBinsJetInvMass; | |
1806 | min = fJetInvMassMin; | |
1807 | max = fJetInvMassMax; | |
1808 | xaxis = "M_{JJ} [GeV]"; | |
1809 | } | |
1810 | if(fKindSlices == 2 || fKindSlices == 3) | |
1811 | { | |
1812 | nBins = fNBinsJetPt; | |
1813 | min = fJetPtMin; | |
1814 | max = fJetPtMax; | |
1815 | if(fKindSlices == 2) xaxis = "E_{Tmean} [GeV]"; | |
1816 | if(fKindSlices == 3) xaxis ="leading jet p_{T} [GeV/c]"; | |
1817 | } | |
1818 | ||
fceb275f | 1819 | fh1Jet1Pt = new TH1F(Form("fh1DJJet1Pt%s", fNameDJ.Data()), "", fNBinsJetPt, fJetPtMin, fJetPtMax); |
1820 | fh1Jet2Pt = new TH1F(Form("fh1DJJet2Pt%s", fNameDJ.Data()), "", fNBinsJetPt, fJetPtMin, fJetPtMax); | |
1821 | fh1JetPt = new TH1F(Form("fh1DJJetPt%s", fNameDJ.Data()), "", fNBinsJetPt, fJetPtMin, fJetPtMax); | |
656dc810 | 1822 | |
fceb275f | 1823 | fh2TrackPtJet1 = new TH2F(Form("fh2DJTrackPtJet1%s", fNameDJ.Data()), "",nBins, min, max, fNBinsPt, fPtMin, fPtMax); |
1824 | fh2TrackPtJet2 = new TH2F(Form("fh2DJTrackPtJet2%s", fNameDJ.Data()), "",nBins, min, max, fNBinsPt, fPtMin, fPtMax); | |
1825 | fh2TrackPtJet = new TH2F(Form("fh2DJTrackPtJet%s", fNameDJ.Data()), "",nBins, min, max, fNBinsPt, fPtMin, fPtMax); | |
656dc810 | 1826 | |
fceb275f | 1827 | fh2Xi1 = new TH2F(Form("fh2DJXi1%s", fNameDJ.Data()), "",nBins, min, max, fNBinsXi, fXiMin, fXiMax); |
1828 | fh2Xi2 = new TH2F(Form("fh2DJXi2%s", fNameDJ.Data()), "",nBins, min, max, fNBinsXi, fXiMin, fXiMax); | |
1829 | fh2Xi = new TH2F(Form("fh2DJXi%s", fNameDJ.Data()), "",nBins, min, max, fNBinsXi, fXiMin, fXiMax); | |
656dc810 | 1830 | |
fceb275f | 1831 | fh2Z1 = new TH2F(Form("fh2DJZ1%s", fNameDJ.Data()), "",nBins, min, max, fNBinsZ, fZMin, fZMax); |
1832 | fh2Z2 = new TH2F(Form("fh2DJZ2%s", fNameDJ.Data()), "",nBins, min, max, fNBinsZ, fZMin, fZMax); | |
1833 | fh2Z = new TH2F(Form("fh2DJZ%s", fNameDJ.Data()), "",nBins, min, max, fNBinsZ, fZMin, fZMax); | |
656dc810 | 1834 | |
fceb275f | 1835 | fh2Pt1 = new TH2F(Form("fh2DJPt1%s", fNameDJ.Data()), "",nBins, min, max, fNBinsPt, fPtMin, fPtMax); |
1836 | fh2Pt2 = new TH2F(Form("fh2DJPt2%s", fNameDJ.Data()), "",nBins, min, max, fNBinsPt, fPtMin, fPtMax); | |
1837 | fh2Pt = new TH2F(Form("fh2DJPtZ%s", fNameDJ.Data()), "",nBins, min, max, fNBinsPt, fPtMin, fPtMax); | |
656dc810 | 1838 | |
1839 | AliAnalysisTaskFragmentationFunction::SetProperties(fh1Jet1Pt, "p_{T} [GeV/c]", "entries"); | |
1840 | AliAnalysisTaskFragmentationFunction::SetProperties(fh1Jet2Pt, "p_{T} [GeV/c]", "entries"); | |
1841 | AliAnalysisTaskFragmentationFunction::SetProperties(fh1JetPt, "p_{T} [GeV/c]", "entries"); | |
1842 | ||
1843 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2TrackPtJet1, xaxis, "p_{T} [GeV/c]", "Entries"); | |
1844 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2TrackPtJet2, xaxis, "p_{T} [GeV/c]", "Entries"); | |
1845 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2TrackPtJet, xaxis, "p_{T} [GeV/c]", "Entries"); | |
1846 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Xi1, xaxis, "#xi", "Entries"); | |
1847 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Xi2, xaxis, "#xi", "Entries"); | |
1848 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Xi, xaxis, "#xi", "Entries"); | |
1849 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Z1, xaxis, "z", "Entries"); | |
1850 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Z2, xaxis, "z", "Entries"); | |
1851 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Z, xaxis, "z", "Entries"); | |
1852 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Pt1, xaxis, "p_{T} [GeV/c]", "Entries"); | |
1853 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Pt2, xaxis, "p_{T} [GeV/c]", "Entries"); | |
1854 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2Pt, xaxis, "p_{T} [GeV/c]", "Entries"); | |
656dc810 | 1855 | } |
1856 | ||
1857 | //________________________________________________________________________ | |
1858 | void AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos::FillDiJetFF(Int_t jetType, Float_t trackPt, Float_t jetPt, Double_t jetBin, Bool_t incrementJetPt) | |
1859 | { | |
fceb275f | 1860 | // fill DiJet FF |
1861 | ||
656dc810 | 1862 | if(jetType == 0) |
1863 | { | |
1864 | if(incrementJetPt) fh1JetPt->Fill(jetPt); | |
1865 | ||
1866 | fh2TrackPtJet->Fill(jetBin, trackPt); | |
1867 | ||
1868 | Double_t z = trackPt / jetPt; | |
1869 | Double_t xi = 0; | |
3af23c82 | 1870 | if(z>0) xi = TMath::Log(1/z); |
656dc810 | 1871 | |
1872 | fh2Xi->Fill(jetBin, xi); | |
1873 | fh2Z->Fill(jetBin, z); | |
1874 | } | |
1875 | if(jetType == 1) | |
1876 | { | |
1877 | if(incrementJetPt) fh1Jet1Pt->Fill(jetPt); | |
1878 | ||
1879 | fh2TrackPtJet1->Fill(jetBin, trackPt); | |
1880 | ||
1881 | Double_t z = trackPt / jetPt; | |
1882 | Double_t xi = 0; | |
3af23c82 | 1883 | if(z>0) xi = TMath::Log(1/z); |
656dc810 | 1884 | |
1885 | fh2Xi1->Fill(jetBin, xi); | |
1886 | fh2Z1->Fill(jetBin, z); | |
1887 | } | |
1888 | if(jetType == 2) | |
1889 | { | |
1890 | if(incrementJetPt) fh1Jet2Pt->Fill(jetPt); | |
1891 | ||
1892 | fh2TrackPtJet2->Fill(jetBin, trackPt); | |
1893 | ||
1894 | Double_t z = trackPt / jetPt; | |
1895 | Double_t xi = 0; | |
3af23c82 | 1896 | if(z>0) xi = TMath::Log(1/z); |
656dc810 | 1897 | |
1898 | fh2Xi2->Fill(jetBin, xi); | |
1899 | fh2Z2->Fill(jetBin, z); | |
1900 | } | |
1901 | ||
1902 | ||
1903 | } | |
1904 | ||
1905 | //________________________________________________________________________ | |
1906 | void AliAnalysisTaskFragmentationFunction::AliFragFuncDiJetHistos::AddToOutput(TList* list)const | |
1907 | { | |
fceb275f | 1908 | // add histos to list |
1909 | ||
656dc810 | 1910 | list->Add(fh1Jet1Pt); |
1911 | list->Add(fh1Jet2Pt); | |
1912 | list->Add(fh1JetPt); | |
1913 | list->Add(fh2TrackPtJet1); | |
1914 | list->Add(fh2TrackPtJet2); | |
1915 | list->Add(fh2TrackPtJet); | |
1916 | list->Add(fh2Xi1); | |
1917 | list->Add(fh2Xi2); | |
1918 | list->Add(fh2Xi); | |
1919 | list->Add(fh2Z1); | |
1920 | list->Add(fh2Z2); | |
1921 | list->Add(fh2Z); | |
1922 | } | |
1923 | ||
1924 | //______________________________________________________________________________________________________ | |
1925 | AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos::AliFragFuncQADiJetHistos(const char* name, Int_t kindSlices, | |
3af23c82 | 1926 | Int_t nInvMass, Float_t invMassMin, Float_t invMassMax, |
656dc810 | 1927 | Int_t nJetPt, Float_t jetPtMin, Float_t jetPtMax, |
3af23c82 | 1928 | Int_t nDeltaPhi, Float_t deltaPhiMin, Float_t deltaPhiMax, |
1929 | Int_t nDeltaEta, Float_t deltaEtaMin, Float_t deltaEtaMax, | |
1930 | Int_t nDeltaPt, Float_t deltaPtMin, Float_t deltaPtMax, | |
1931 | Int_t nInBal, Float_t inBalMin, Float_t inBalMax) | |
656dc810 | 1932 | : TObject() |
1933 | ,fKindSlices(kindSlices) | |
1934 | ,fNBinsJetInvMass(nInvMass) | |
1935 | ,fJetInvMassMin(invMassMin) | |
1936 | ,fJetInvMassMax(invMassMax) | |
1937 | ,fNBinsJetPt(nJetPt) | |
1938 | ,fJetPtMin(jetPtMin) | |
1939 | ,fJetPtMax(jetPtMax) | |
1940 | ,fNBinsDeltaPhi(nDeltaPhi) | |
1941 | ,fDeltaPhiMin(deltaPhiMin) | |
1942 | ,fDeltaPhiMax(deltaPhiMax) | |
1943 | ,fNBinsDeltaEta(nDeltaEta) | |
1944 | ,fDeltaEtaMin(deltaEtaMin) | |
1945 | ,fDeltaEtaMax(deltaEtaMax) | |
1946 | ,fNBinsDeltaPt(nDeltaPt) | |
1947 | ,fDeltaPtMin(deltaPtMin) | |
1948 | ,fDeltaPtMax(deltaPtMax) | |
3af23c82 | 1949 | ,fNBinsInBal(nInBal) |
1950 | ,fInBalMin(inBalMin) | |
1951 | ,fInBalMax(inBalMax) | |
656dc810 | 1952 | ,fh2InvMass(0) |
1953 | ,fh2DeltaPhi(0) | |
1954 | ,fh2DeltaEta(0) | |
1955 | ,fh2DeltaPt(0) | |
3af23c82 | 1956 | ,fh2InBal(0) |
fceb275f | 1957 | ,fNameQADJ(name) |
656dc810 | 1958 | { |
1959 | // default constructor | |
1960 | ||
1961 | } | |
1962 | ||
1963 | //______________________________________________________________________________________________________ | |
1964 | AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos::AliFragFuncQADiJetHistos(const AliFragFuncQADiJetHistos& copy) | |
1965 | : TObject() | |
1966 | ,fKindSlices(copy.fKindSlices) | |
1967 | ,fNBinsJetInvMass(copy.fNBinsJetInvMass) | |
1968 | ,fJetInvMassMin(copy.fJetInvMassMin) | |
1969 | ,fJetInvMassMax(copy.fJetInvMassMax) | |
1970 | ,fNBinsJetPt(copy.fNBinsJetPt) | |
1971 | ,fJetPtMin(copy.fJetPtMin) | |
1972 | ,fJetPtMax(copy.fJetPtMax) | |
1973 | ,fNBinsDeltaPhi(copy.fNBinsDeltaPhi) | |
1974 | ,fDeltaPhiMin(copy.fDeltaPhiMin) | |
1975 | ,fDeltaPhiMax(copy.fDeltaPhiMax) | |
1976 | ,fNBinsDeltaEta(copy.fNBinsDeltaEta) | |
1977 | ,fDeltaEtaMin(copy.fDeltaEtaMin) | |
1978 | ,fDeltaEtaMax(copy.fDeltaEtaMax) | |
1979 | ,fNBinsDeltaPt(copy.fNBinsDeltaPt) | |
1980 | ,fDeltaPtMin(copy.fDeltaPtMin) | |
1981 | ,fDeltaPtMax(copy.fDeltaPtMax) | |
3af23c82 | 1982 | ,fNBinsInBal(copy.fNBinsInBal) |
1983 | ,fInBalMin(copy.fInBalMin) | |
1984 | ,fInBalMax(copy.fInBalMax) | |
656dc810 | 1985 | ,fh2InvMass(copy.fh2InvMass) |
1986 | ,fh2DeltaPhi(copy.fh2DeltaPhi) | |
1987 | ,fh2DeltaEta(copy.fh2DeltaEta) | |
1988 | ,fh2DeltaPt(copy.fh2DeltaPt) | |
3af23c82 | 1989 | ,fh2InBal(copy.fh2InBal) |
fceb275f | 1990 | ,fNameQADJ(copy.fNameQADJ) |
656dc810 | 1991 | { |
1992 | // default constructor | |
1993 | ||
1994 | } | |
1995 | ||
1996 | //_______________________________________________________________________________________________________________________________________________________________ | |
1997 | AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos& AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos::operator=(const AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos& o) | |
1998 | { | |
1999 | // assignment | |
2000 | ||
2001 | if(this!=&o){ | |
2002 | TObject::operator=(o); | |
2003 | fKindSlices = o.fKindSlices; | |
2004 | fNBinsJetInvMass = o.fNBinsJetInvMass; | |
2005 | fJetInvMassMin = o.fJetInvMassMin; | |
2006 | fJetInvMassMax = o.fJetInvMassMax; | |
2007 | fNBinsJetPt = o.fNBinsJetPt; | |
2008 | fJetPtMin = o.fJetPtMin; | |
2009 | fJetPtMax = o.fJetPtMax; | |
2010 | fNBinsDeltaPhi = o.fNBinsDeltaPhi; | |
2011 | fDeltaPhiMin = o.fDeltaPhiMin; | |
2012 | fDeltaPhiMax = o.fDeltaPhiMax; | |
2013 | fNBinsDeltaEta = o.fNBinsDeltaEta; | |
2014 | fDeltaEtaMin = o.fDeltaEtaMin; | |
2015 | fDeltaEtaMax = o.fDeltaEtaMax; | |
2016 | fNBinsDeltaPt = o.fNBinsDeltaPt; | |
2017 | fDeltaPtMin = o.fDeltaPtMin; | |
2018 | fDeltaPtMax = o.fDeltaPtMax; | |
3af23c82 | 2019 | fNBinsInBal = o.fNBinsInBal; |
2020 | fInBalMin = o.fInBalMin; | |
2021 | fInBalMax = o.fInBalMax; | |
656dc810 | 2022 | fh2InvMass = o.fh2InvMass; |
2023 | fh2DeltaPhi = o.fh2DeltaPhi; | |
2024 | fh2DeltaEta = o.fh2DeltaEta; | |
2025 | fh2DeltaPt = o.fh2DeltaPt; | |
3af23c82 | 2026 | fh2InBal = o.fh2InBal; |
fceb275f | 2027 | fNameQADJ = o.fNameQADJ; |
656dc810 | 2028 | } |
2029 | ||
2030 | return *this; | |
2031 | } | |
2032 | ||
2033 | //_________________________________________________________ | |
2034 | AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos::~AliFragFuncQADiJetHistos() | |
2035 | { | |
2036 | // destructor | |
2037 | ||
2038 | if(fh2InvMass) delete fh2InvMass; | |
2039 | if(fh2DeltaPhi) delete fh2DeltaPhi; | |
2040 | if(fh2DeltaEta) delete fh2DeltaEta; | |
2041 | if(fh2DeltaPt) delete fh2DeltaPt; | |
3af23c82 | 2042 | if(fh2InBal) delete fh2InBal; |
656dc810 | 2043 | } |
2044 | ||
2045 | //________________________________________________________________________ | |
2046 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos::DefineQADiJetHistos() | |
2047 | { | |
fceb275f | 2048 | // define histos |
2049 | ||
656dc810 | 2050 | Int_t nBins = 0; |
2051 | Double_t min = 0.; | |
2052 | Double_t max = 0.; | |
2053 | const char *xaxis = ""; | |
2054 | if(fKindSlices == 1) | |
2055 | { | |
2056 | nBins = fNBinsJetInvMass; | |
2057 | min = fJetInvMassMin; | |
2058 | max = fJetInvMassMax; | |
2059 | xaxis = "M_{JJ} [GeV]"; | |
2060 | } | |
2061 | if(fKindSlices == 2 || fKindSlices == 3) | |
2062 | { | |
2063 | nBins = fNBinsJetPt; | |
2064 | min = fJetPtMin; | |
2065 | max = fJetPtMax; | |
2066 | if(fKindSlices == 2) xaxis = "E_{Tmean} [GeV]"; | |
2067 | if(fKindSlices == 3) xaxis ="leading jet p_{T} [GeV/c]"; | |
2068 | } | |
2069 | ||
2070 | ||
fceb275f | 2071 | fh2InvMass = new TH2F(Form("fh2DJInvMassPositionCut%s", fNameQADJ.Data()), "",nBins, min, max, fNBinsJetInvMass, fJetInvMassMin, fJetInvMassMax); |
2072 | fh2DeltaPhi = new TH2F(Form("fh2DJDeltaPhiPositionCut%s", fNameQADJ.Data()), "",nBins, min, max, fNBinsDeltaPhi, fDeltaPhiMin, fDeltaPhiMax); | |
2073 | fh2DeltaEta = new TH2F(Form("fh2DJDeltaEtaPositionCut%s", fNameQADJ.Data()), "",nBins, min, max, fNBinsDeltaEta, fDeltaEtaMin, fDeltaEtaMax); | |
2074 | fh2DeltaPt = new TH2F(Form("fh2DJDeltaPtPositionCut%s", fNameQADJ.Data()), "",nBins, min, max, fNBinsDeltaPt, fDeltaPtMin, fDeltaPtMax); | |
3af23c82 | 2075 | fh2InBal = new TH2F(Form("fh2DJInBalPositionCut%s", fNameQADJ.Data()), "",nBins, min, max, fNBinsInBal, fInBalMin, fInBalMax); |
2076 | ||
656dc810 | 2077 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2InvMass, xaxis, "Invariant Mass", "Entries"); |
2078 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2DeltaPhi, xaxis, "#Delta #phi", "Entries"); | |
2079 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2DeltaEta, xaxis, "#Delta #eta", "Entries"); | |
2080 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2DeltaPt, xaxis, "#Delta p_{T}", "Entries"); | |
3af23c82 | 2081 | AliAnalysisTaskFragmentationFunction::SetProperties(fh2InBal, xaxis, "(p_{T}^{1}-p_{T}^{2})/(p_{T}^{1}+p_{T}^{2})", "Entries"); |
656dc810 | 2082 | |
2083 | } | |
2084 | ||
2085 | //________________________________________________________________________ | |
3af23c82 | 2086 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos::FillDiJetQA(Double_t invMass, Double_t deltaPhi, Double_t deltaEta,Double_t deltaPt, Double_t inbal, Double_t jetBin) |
656dc810 | 2087 | { |
fceb275f | 2088 | // fill dijet QA |
2089 | ||
656dc810 | 2090 | fh2InvMass->Fill(jetBin, invMass); |
2091 | fh2DeltaPhi->Fill(jetBin, deltaPhi); | |
2092 | fh2DeltaEta->Fill(jetBin, deltaEta); | |
2093 | fh2DeltaPt->Fill(jetBin, deltaPt); | |
3af23c82 | 2094 | fh2InBal->Fill(jetBin, inbal); |
656dc810 | 2095 | } |
2096 | ||
2097 | //________________________________________________________________________ | |
2098 | void AliAnalysisTaskFragmentationFunction::AliFragFuncQADiJetHistos::AddToOutput(TList* list)const | |
2099 | { | |
fceb275f | 2100 | // add histos to list |
2101 | ||
656dc810 | 2102 | list->Add(fh2InvMass); |
2103 | list->Add(fh2DeltaPhi); | |
2104 | list->Add(fh2DeltaEta); | |
2105 | list->Add(fh2DeltaPt); | |
3af23c82 | 2106 | list->Add(fh2InBal); |
656dc810 | 2107 | } |
2108 | ||
2109 | //_________________________________________________________________________________ | |
2110 | void AliAnalysisTaskFragmentationFunction::AliFragFuncIntraJetHistos::AddToOutput(TList* list) const | |
2111 | { | |
2112 | // add histos to list | |
2113 | ||
2114 | list->Add(fh2CosTheta); | |
67e37e80 | 2115 | list->Add(fh2PtZ); |
2116 | list->Add(fh3ThetaZ); | |
2117 | list->Add(fh3JtTheta); | |
2118 | list->Add(fh3JtZ); | |
656dc810 | 2119 | |
2120 | } | |
2121 | ||
1da9498b | 2122 | //_________________________________________________________________________________ |
ac017ff3 | 2123 | Bool_t AliAnalysisTaskFragmentationFunction::Notify() |
2124 | { | |
2125 | // | |
2126 | // Implemented Notify() to read the cross sections | |
2127 | // and number of trials from pyxsec.root | |
c2658535 | 2128 | // (taken from AliAnalysisTaskJetSpectrum2) |
ac017ff3 | 2129 | // |
2130 | TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree(); | |
c2658535 | 2131 | Float_t xsection = 0; |
2132 | Float_t ftrials = 1; | |
2133 | ||
2134 | fAvgTrials = 1; | |
ac017ff3 | 2135 | if(tree){ |
2136 | TFile *curfile = tree->GetCurrentFile(); | |
2137 | if (!curfile) { | |
2138 | Error("Notify","No current file"); | |
2139 | return kFALSE; | |
2140 | } | |
2141 | if(!fh1Xsec||!fh1Trials){ | |
2142 | Printf("%s%d No Histogram fh1Xsec",(char*)__FILE__,__LINE__); | |
2143 | return kFALSE; | |
2144 | } | |
c2658535 | 2145 | AliAnalysisHelperJetTasks::PythiaInfoFromFile(curfile->GetName(),xsection,ftrials); |
ac017ff3 | 2146 | fh1Xsec->Fill("<#sigma>",xsection); |
c2658535 | 2147 | // construct a poor man average trials |
2148 | Float_t nEntries = (Float_t)tree->GetTree()->GetEntries(); | |
2149 | if(ftrials>=nEntries && nEntries>0.)fAvgTrials = ftrials/nEntries; | |
ac017ff3 | 2150 | } |
67e37e80 | 2151 | |
2152 | // Set seed for backg study | |
2153 | fRandom = new TRandom3(); | |
2154 | fRandom->SetSeed(0); | |
2155 | ||
ac017ff3 | 2156 | return kTRUE; |
2157 | } | |
2158 | ||
2159 | ||
2160 | ||
656dc810 | 2161 | //__________________________________________________________________ |
2162 | void AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects() | |
2163 | { | |
2164 | // create output objects | |
2165 | ||
2166 | if(fDebug > 1) Printf("AliAnalysisTaskFragmentationFunction::UserCreateOutputObjects()"); | |
2167 | ||
2168 | // create list of tracks and jets | |
2169 | ||
2170 | fTracksRec = new TList(); | |
2171 | fTracksRec->SetOwner(kFALSE); | |
2172 | ||
2173 | fTracksRecCuts = new TList(); | |
2174 | fTracksRecCuts->SetOwner(kFALSE); | |
2175 | ||
2176 | fTracksGen = new TList(); | |
2177 | fTracksGen->SetOwner(kFALSE); | |
2178 | ||
fe343c6b | 2179 | fTracksAODMCCharged = new TList(); |
2180 | fTracksAODMCCharged->SetOwner(kFALSE); | |
2181 | ||
2182 | fTracksRecQualityCuts = new TList(); | |
2183 | fTracksRecQualityCuts->SetOwner(kFALSE); | |
2184 | ||
656dc810 | 2185 | fJetsRec = new TList(); |
2186 | fJetsRec->SetOwner(kFALSE); | |
3af23c82 | 2187 | if(!fBranchRecJets.Contains("UA1") && fBranchRecJets.Contains("KT")) fJetsRec->SetOwner(kTRUE); |
656dc810 | 2188 | |
2189 | fJetsRecCuts = new TList(); | |
2190 | fJetsRecCuts->SetOwner(kFALSE); | |
3af23c82 | 2191 | if(!fBranchRecJets.Contains("UA1") && fBranchRecJets.Contains("KT")) fJetsRecCuts->SetOwner(kTRUE); |
656dc810 | 2192 | |
2193 | fJetsGen = new TList(); | |
2194 | fJetsGen->SetOwner(kFALSE); | |
2195 | ||
fe343c6b | 2196 | fJetsRecEff = new TList(); |
2197 | fJetsRecEff->SetOwner(kFALSE); | |
2198 | ||
656dc810 | 2199 | // fJetsKine = new TList(); |
2200 | // fJetsKine->SetOwner(kTRUE); // delete AOD jets using mom from Kine Tree via TList::Clear() | |
2201 | ||
67e37e80 | 2202 | if(fBckgMode && (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters)){ |
2203 | fBckgJetsRec = new TList(); | |
2204 | fBckgJetsRec->SetOwner(kFALSE); | |
2205 | ||
2206 | fBckgJetsRecCuts = new TList(); | |
2207 | fBckgJetsRecCuts->SetOwner(kFALSE); | |
2208 | ||
2209 | fBckgJetsGen = new TList(); | |
2210 | fBckgJetsGen->SetOwner(kFALSE); | |
2211 | } | |
656dc810 | 2212 | |
2213 | // | |
2214 | // Create histograms / output container | |
2215 | // | |
2216 | ||
2217 | OpenFile(1); | |
2218 | fCommonHistList = new TList(); | |
2219 | ||
2220 | Bool_t oldStatus = TH1::AddDirectoryStatus(); | |
2221 | TH1::AddDirectory(kFALSE); | |
2222 | ||
2223 | ||
2224 | // Histograms | |
2225 | fh1EvtSelection = new TH1F("fh1EvtSelection", "Event Selection", 6, -0.5, 5.5); | |
3af23c82 | 2226 | fh1EvtSelection->GetXaxis()->SetBinLabel(1,"ACCEPTED"); |
2227 | fh1EvtSelection->GetXaxis()->SetBinLabel(2,"event selection: rejected"); | |
2228 | fh1EvtSelection->GetXaxis()->SetBinLabel(3,"event class: rejected"); | |
2229 | fh1EvtSelection->GetXaxis()->SetBinLabel(4,"vertex Ncontr: rejected"); | |
2230 | fh1EvtSelection->GetXaxis()->SetBinLabel(5,"vertex z: rejected"); | |
2231 | fh1EvtSelection->GetXaxis()->SetBinLabel(6,"vertex type: rejected"); | |
2232 | ||
656dc810 | 2233 | fh1VertexNContributors = new TH1F("fh1VertexNContributors", "Vertex N contributors", 11,-.5, 10.5); |
2234 | fh1VertexZ = new TH1F("fh1VertexZ", "Vertex z distribution", 30, -15., 15.); | |
3af23c82 | 2235 | fh1EvtMult = new TH1F("fh1EvtMult","Event multiplicity, track pT cut > 150 MeV/c, |#eta| < 0.9",120,0.,12000.); |
2236 | fh1EvtCent = new TH1F("fh1EvtCent","centrality",100,0.,100.); | |
ac017ff3 | 2237 | fh1Xsec = new TProfile("fh1Xsec","xsec from pyxsec.root",1,0,1); |
2238 | fh1Xsec->GetXaxis()->SetBinLabel(1,"<#sigma>"); | |
2239 | fh1Trials = new TH1F("fh1Trials","trials from pyxsec.root",1,0,1); | |
2240 | fh1Trials->GetXaxis()->SetBinLabel(1,"#sum{ntrials}"); | |
2241 | fh1PtHard = new TH1F("fh1PtHard","PYTHIA Pt hard;p_{T,hard}",350,-.5,349.5); | |
2242 | fh1PtHardTrials = new TH1F("fh1PtHardTrials","PYTHIA Pt hard weight with trials;p_{T,hard}",350,-.5,349.5); | |
2243 | ||
656dc810 | 2244 | fh1nRecJetsCuts = new TH1F("fh1nRecJetsCuts","reconstructed jets per event",10,-0.5,9.5); |
2245 | fh1nGenJets = new TH1F("fh1nGenJets","generated jets per event",10,-0.5,9.5); | |
fe343c6b | 2246 | fh1nRecEffJets = new TH1F("fh1nRecEffJets","reconstruction effiency: jets per event",10,-0.5,9.5); |
cb76764e | 2247 | fh2PtRecVsGenPrim = new TH2F("fh2PtRecVsGenPrim","rec vs gen pt",fQATrackNBinsPt,fQATrackPtMin,fQATrackPtMax,fQATrackNBinsPt,fQATrackPtMin,fQATrackPtMax); |
fe343c6b | 2248 | |
67e37e80 | 2249 | // Background |
2250 | if(fBckgMode) { | |
2251 | if(fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters) { | |
2252 | fh1nRecBckgJetsCuts = new TH1F("fh1nRecBckgJetsCuts","reconstructed background jets per event",10,-0.5,9.5); | |
2253 | fh1nGenBckgJets = new TH1F("fh1nGenBckgJets","generated background jets per event",10,-0.5,9.5); | |
2254 | } | |
2255 | if(fBckgType[0]==kBckgPerp || fBckgType[1]==kBckgPerp || fBckgType[2]==kBckgPerp) | |
2256 | fh1PerpMult = new TH1F("fh1PerpMult","Background multiplicity - Cone perpendicular to leading jet axis",120,0.,120.); | |
3af23c82 | 2257 | if(fBckgType[0]==kBckgASide || fBckgType[1]==kBckgASide || fBckgType[2]==kBckgASide) |
2258 | fh1ASideMult = new TH1F("fh1ASideMult","Background multiplicity - Cone in the away side of leading jet axis",120,0.,120.); | |
2259 | if(fBckgType[0]==kBckgASideWindow || fBckgType[1]==kBckgASideWindow || fBckgType[2]==kBckgASideWindow) | |
2260 | fh1ASideWindowMult = new TH1F("fh1ASideWindowMult","Background multiplicity - Cone in the away side of leading jet axis",120,0.,120.); | |
2261 | if(fBckgType[0]==kBckgPerpWindow || fBckgType[1]==kBckgPerpWindow || fBckgType[2]==kBckgPerpWindow) | |
2262 | fh1PerpWindowMult = new TH1F("fh1PerpWindowMult","Background multiplicity - Cone in the perp direction of leading jet axis",120,0.,120.); | |
67e37e80 | 2263 | if(fBckgType[0]==kBckgOutLJ || fBckgType[1]==kBckgOutLJ || fBckgType[2]==kBckgOutLJ) |
2264 | fh1OutLeadingMult = new TH1F("fh1OutLeadingMult","Background multiplicity - Cone outside leading jet",120,0,120.); | |
2265 | if(fBckgType[0]==kBckgOut2J || fBckgType[1]==kBckgOut2J || fBckgType[2]==kBckgOut2J) | |
2266 | fh1Out2JetsMult = new TH1F("fh1Out2JetsMult","Background multiplicity - Cone outside 2 jets",120,0.,120.); | |
2267 | if(fBckgType[0]==kBckgOut3J || fBckgType[1]==kBckgOut3J || fBckgType[2]==kBckgOut3J) | |
2268 | fh1Out3JetsMult = new TH1F("fh1Out3JetsMult","Background multiplicity - Cone outside 3 jets",120,0.,120.); | |
2269 | } | |
1da9498b | 2270 | |
3af23c82 | 2271 | if(fQAMode){ |
2272 | if(fQAMode&1){ // track QA | |
2273 | fQATrackHistosRec = new AliFragFuncQATrackHistos("Rec", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2274 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2275 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2276 | fQATrackHighPtThreshold); | |
2277 | fQATrackHistosRecCuts = new AliFragFuncQATrackHistos("RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2278 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2279 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2280 | fQATrackHighPtThreshold); | |
2281 | fQATrackHistosGen = new AliFragFuncQATrackHistos("Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2282 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2283 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2284 | fQATrackHighPtThreshold); | |
2285 | } | |
656dc810 | 2286 | |
3af23c82 | 2287 | if(fQAMode&2){ // jet QA |
2288 | fQAJetHistosRec = new AliFragFuncQAJetHistos("Rec", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax, | |
2289 | fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax, | |
2290 | fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax); | |
2291 | fQAJetHistosRecCuts = new AliFragFuncQAJetHistos("RecCuts", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax, | |
2292 | fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax, | |
2293 | fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax); | |
2294 | fQAJetHistosRecCutsLeading = new AliFragFuncQAJetHistos("RecCutsLeading", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax, | |
2295 | fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax, | |
2296 | fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax); | |
2297 | fQAJetHistosGen = new AliFragFuncQAJetHistos("Gen", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax, | |
2298 | fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax, | |
2299 | fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax); | |
2300 | fQAJetHistosGenLeading = new AliFragFuncQAJetHistos("GenLeading", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax, | |
2301 | fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax, | |
2302 | fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax); | |
2303 | if(fEffMode) fQAJetHistosRecEffLeading = new AliFragFuncQAJetHistos("RecEffLeading", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax, | |
2304 | fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax,fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax); | |
2305 | } | |
2306 | } // end: QA | |
656dc810 | 2307 | |
3af23c82 | 2308 | if(fFFMode){ |
2309 | fFFHistosRecCuts = new AliFragFuncHistos("RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
656dc810 | 2310 | fFFNBinsPt, fFFPtMin, fFFPtMax, |
2311 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2312 | fFFNBinsZ , fFFZMin , fFFZMax); | |
3af23c82 | 2313 | fFFHistosRecLeading = new AliFragFuncHistos("RecLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, |
2314 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2315 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2316 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2317 | fFFHistosRecLeadingTrack = new AliFragFuncHistos("RecLeadingTrack", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2318 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2319 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2320 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2321 | fFFHistosGen = new AliFragFuncHistos("Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
656dc810 | 2322 | fFFNBinsPt, fFFPtMin, fFFPtMax, |
2323 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2324 | fFFNBinsZ , fFFZMin , fFFZMax); | |
3af23c82 | 2325 | fFFHistosGenLeading = new AliFragFuncHistos("GenLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, |
2326 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2327 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2328 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2329 | fFFHistosGenLeadingTrack = new AliFragFuncHistos("GenLeadingTrack", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2330 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2331 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2332 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2333 | } // end: FF | |
656dc810 | 2334 | |
67e37e80 | 2335 | if(fIJMode) |
2336 | { | |
2337 | fIJHistosRecCuts = new AliFragFuncIntraJetHistos("RecCuts", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
2338 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
2339 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2340 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2341 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2342 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
2343 | fIJHistosRecLeading = new AliFragFuncIntraJetHistos("RecLeading", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
2344 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
2345 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2346 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2347 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2348 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
2349 | fIJHistosRecLeadingTrack = new AliFragFuncIntraJetHistos("RecLeadingTrack", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
2350 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
2351 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2352 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2353 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2354 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
2355 | fIJHistosGen = new AliFragFuncIntraJetHistos("Gen", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
656dc810 | 2356 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
2357 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2358 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2359 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2360 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2361 | fIJHistosGenLeading = new AliFragFuncIntraJetHistos("GenLeading", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, |
2362 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
2363 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2364 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2365 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2366 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
2367 | fIJHistosGenLeadingTrack = new AliFragFuncIntraJetHistos("GenLeadingTrack", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
2368 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
2369 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2370 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2371 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2372 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
3af23c82 | 2373 | } // end: intra-jet |
67e37e80 | 2374 | |
3af23c82 | 2375 | if(fDJMode){ |
2376 | if(fDJMode&1){ | |
2377 | fFFDiJetHistosRecCuts = new AliFragFuncDiJetHistos("RecCuts", fDiJetKindBins, | |
2378 | fDiJetNBinsJetInvMass, fDiJetJetInvMassMin, fDiJetJetInvMassMax, | |
2379 | fDiJetNBinsJetPt, fDiJetJetPtMin, fDiJetJetPtMax, | |
2380 | fDiJetNBinsPt, fDiJetPtMin, fDiJetPtMax, | |
2381 | fDiJetNBinsXi, fDiJetXiMin, fDiJetXiMax, | |
2382 | fDiJetNBinsZ, fDiJetZMin, fDiJetZMax); | |
2383 | fFFDiJetHistosRecLeading = new AliFragFuncDiJetHistos("RecLeading", fDiJetKindBins, | |
2384 | fDiJetNBinsJetInvMass, fDiJetJetInvMassMin, fDiJetJetInvMassMax, | |
2385 | fDiJetNBinsJetPt, fDiJetJetPtMin, fDiJetJetPtMax, | |
2386 | fDiJetNBinsPt, fDiJetPtMin, fDiJetPtMax, | |
2387 | fDiJetNBinsXi, fDiJetXiMin, fDiJetXiMax, | |
2388 | fDiJetNBinsZ, fDiJetZMin, fDiJetZMax); | |
2389 | fFFDiJetHistosRecLeadingTrack = new AliFragFuncDiJetHistos("RecLeadingTrack", fDiJetKindBins, | |
2390 | fDiJetNBinsJetInvMass, fDiJetJetInvMassMin, fDiJetJetInvMassMax, | |
2391 | fDiJetNBinsJetPt, fDiJetJetPtMin, fDiJetJetPtMax, | |
2392 | fDiJetNBinsPt, fDiJetPtMin, fDiJetPtMax, | |
2393 | fDiJetNBinsXi, fDiJetXiMin, fDiJetXiMax, | |
2394 | fDiJetNBinsZ, fDiJetZMin, fDiJetZMax); | |
2395 | ||
2396 | fFFDiJetHistosGen = new AliFragFuncDiJetHistos("Gen", fDiJetKindBins, | |
2397 | fDiJetNBinsJetInvMass, fDiJetJetInvMassMin, fDiJetJetInvMassMax, | |
2398 | fDiJetNBinsJetPt, fDiJetJetPtMin, fDiJetJetPtMax, | |
2399 | fDiJetNBinsPt, fDiJetPtMin, fDiJetPtMax, | |
2400 | fDiJetNBinsXi, fDiJetXiMin, fDiJetXiMax, | |
2401 | fDiJetNBinsZ, fDiJetZMin, fDiJetZMax); | |
2402 | fFFDiJetHistosGenLeading = new AliFragFuncDiJetHistos("GenLeading", fDiJetKindBins, | |
2403 | fDiJetNBinsJetInvMass, fDiJetJetInvMassMin, fDiJetJetInvMassMax, | |
2404 | fDiJetNBinsJetPt, fDiJetJetPtMin, fDiJetJetPtMax, | |
2405 | fDiJetNBinsPt, fDiJetPtMin, fDiJetPtMax, | |
2406 | fDiJetNBinsXi, fDiJetXiMin, fDiJetXiMax, | |
2407 | fDiJetNBinsZ, fDiJetZMin, fDiJetZMax); | |
2408 | fFFDiJetHistosGenLeadingTrack = new AliFragFuncDiJetHistos("GenLeadingTrack", fDiJetKindBins, | |
2409 | fDiJetNBinsJetInvMass, fDiJetJetInvMassMin, fDiJetJetInvMassMax, | |
2410 | fDiJetNBinsJetPt, fDiJetJetPtMin, fDiJetJetPtMax, | |
2411 | fDiJetNBinsPt, fDiJetPtMin, fDiJetPtMax, | |
2412 | fDiJetNBinsXi, fDiJetXiMin, fDiJetXiMax, | |
2413 | fDiJetNBinsZ, fDiJetZMin, fDiJetZMax); | |
2414 | } | |
2415 | ||
2416 | if(fDJMode&2){ | |
2417 | fQADiJetHistosRecCuts = new AliFragFuncQADiJetHistos("RecCuts", fDiJetKindBins, | |
2418 | fQADiJetNBinsInvMass, fQADiJetInvMassMin, fQADiJetInvMassMax, | |
2419 | fQADiJetNBinsJetPt, fQADiJetJetPtMin, fQADiJetJetPtMax, | |
2420 | fQADiJetNBinsDeltaPhi, fQADiJetDeltaPhiMin, fQADiJetDeltaPhiMax , | |
2421 | fQADiJetNBinsDeltaEta, fQADiJetDeltaEtaMin, fQADiJetDeltaEtaMax , | |
2422 | fQADiJetNBinsDeltaPt, fQADiJetDeltaPtMin, fQADiJetDeltaPtMax, | |
2423 | fQADiJetNBinsInBal, fQADiJetInBalMin, fQADiJetInBalMax); | |
2424 | fQADiJetHistosGen = new AliFragFuncQADiJetHistos("Gen", fDiJetKindBins, | |
2425 | fQADiJetNBinsInvMass, fQADiJetInvMassMin, fQADiJetInvMassMax, | |
2426 | fDiJetNBinsJetPt, fDiJetJetPtMin, fDiJetJetPtMax, | |
2427 | fQADiJetNBinsDeltaPhi, fQADiJetDeltaPhiMin, fQADiJetDeltaPhiMax, | |
2428 | fQADiJetNBinsDeltaEta, fQADiJetDeltaEtaMin, fQADiJetDeltaEtaMax, | |
2429 | fQADiJetNBinsDeltaPt, fQADiJetDeltaPtMin, fQADiJetDeltaPtMax, | |
2430 | fQADiJetNBinsInBal, fQADiJetInBalMin, fQADiJetInBalMax); | |
2431 | } | |
2432 | } // end: di-jet | |
656dc810 | 2433 | |
cb76764e | 2434 | // efficiency |
2435 | ||
3af23c82 | 2436 | if(fEffMode){ |
2437 | if(fQAMode&1){ | |
2438 | fQATrackHistosRecEffGen = new AliFragFuncQATrackHistos("RecEffGen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2439 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2440 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2441 | fQATrackHighPtThreshold); | |
2442 | ||
2443 | fQATrackHistosRecEffRec = new AliFragFuncQATrackHistos("RecEffRec", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2444 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2445 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2446 | fQATrackHighPtThreshold); | |
cb76764e | 2447 | |
cb76764e | 2448 | |
3af23c82 | 2449 | Int_t nBinsResponseSinglePt[2] = {fFFNBinsPt, fFFNBinsPt}; |
2450 | Double_t binMinResponseSinglePt[2] = {fFFPtMin, fFFPtMin}; | |
2451 | Double_t binMaxResponseSinglePt[2] = {fFFPtMax, fFFPtMax}; | |
2452 | const char* labelsResponseSinglePt[2] = {"rec p_{T} [GeV/c]", "gen p_{T} [GeV/c]"}; | |
2453 | ||
2454 | fhnResponseSinglePt = new THnSparseF("fhnResponseSinglePt","track pt gen : track pt rec",2, | |
2455 | nBinsResponseSinglePt,binMinResponseSinglePt,binMaxResponseSinglePt); | |
2456 | ||
2457 | AliAnalysisTaskFragmentationFunction::SetProperties(fhnResponseSinglePt,2,labelsResponseSinglePt); | |
2458 | } | |
2459 | if(fFFMode){ | |
2460 | fFFHistosRecEffGen = new AliFragFuncHistos("RecEffGen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2461 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2462 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2463 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2464 | ||
2465 | fFFHistosRecEffRec = new AliFragFuncHistos("RecEffRec", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2466 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2467 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2468 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2469 | ||
2470 | ||
2471 | Int_t nBinsResponseJetTrackPt[3] = {fFFNBinsJetPt,fFFNBinsPt,fFFNBinsPt}; | |
2472 | Double_t binMinResponseJetTrackPt[3] = {fFFJetPtMin,fFFPtMin, fFFPtMin}; | |
2473 | Double_t binMaxResponseJetTrackPt[3] = {fFFJetPtMax,fFFPtMax,fFFPtMax}; | |
2474 | const char* labelsResponseJetTrackPt[3] = { "jet p_{T} [GeV/c]","rec p_{T} [GeV/c]", "gen p_{T} [GeV/c]"}; | |
2475 | ||
2476 | fhnResponseJetTrackPt = new THnSparseF("fhnResponseJetTrackPt","jet pt:track pt rec:track pt gen",3, | |
2477 | nBinsResponseJetTrackPt,binMinResponseJetTrackPt,binMaxResponseJetTrackPt); | |
2478 | ||
2479 | AliAnalysisTaskFragmentationFunction::SetProperties(fhnResponseJetTrackPt,3,labelsResponseJetTrackPt); | |
2480 | ||
2481 | Int_t nBinsResponseJetZ[3] = {fFFNBinsJetPt, fFFNBinsZ,fFFNBinsZ}; | |
2482 | Double_t binMinResponseJetZ[3] = {fFFJetPtMin, fFFZMin, fFFZMin}; | |
2483 | Double_t binMaxResponseJetZ[3] = {fFFJetPtMax, fFFZMax, fFFZMax}; | |
2484 | const char* labelsResponseJetZ[3] = { "jet p_{T} [GeV/c]","rec z","gen z"}; | |
2485 | ||
2486 | fhnResponseJetZ = new THnSparseF("fhnResponseJetZ","jet pt:track pt rec:track pt gen",3, | |
2487 | nBinsResponseJetZ,binMinResponseJetZ,binMaxResponseJetZ); | |
2488 | ||
2489 | AliAnalysisTaskFragmentationFunction::SetProperties(fhnResponseJetZ,3,labelsResponseJetZ); | |
2490 | ||
2491 | Int_t nBinsResponseJetXi[3] = {fFFNBinsJetPt, fFFNBinsXi,fFFNBinsXi}; | |
2492 | Double_t binMinResponseJetXi[3] = {fFFJetPtMin, fFFXiMin, fFFXiMin}; | |
2493 | Double_t binMaxResponseJetXi[3] = {fFFJetPtMax, fFFXiMax, fFFXiMax}; | |
2494 | const char* labelsResponseJetXi[3] = { "jet p_{T} [GeV/c]","rec xi","gen xi"}; | |
2495 | ||
2496 | fhnResponseJetXi = new THnSparseF("fhnResponseJetXi","jet pt:track xi rec:track xi gen",3, | |
2497 | nBinsResponseJetXi,binMinResponseJetXi,binMaxResponseJetXi); | |
2498 | ||
2499 | AliAnalysisTaskFragmentationFunction::SetProperties(fhnResponseJetXi,3,labelsResponseJetXi); | |
2500 | ||
2501 | } | |
2502 | } // end: efficiency | |
67e37e80 | 2503 | |
1da9498b | 2504 | // Background |
2505 | if(fBckgMode){ | |
67e37e80 | 2506 | // Track QA |
2507 | TString title[3]; | |
2508 | for(Int_t i=0; i<3; i++){ | |
2509 | if(fBckgType[i]==kBckgPerp) title[i]="Perp"; | |
3af23c82 | 2510 | else if(fBckgType[i]==kBckgPerpWindow) title[i]="PerpW"; |
2511 | else if(fBckgType[i]==kBckgASide) title[i]="ASide"; | |
2512 | else if(fBckgType[i]==kBckgASideWindow) title[i]="ASideW"; | |
67e37e80 | 2513 | else if(fBckgType[i]==kBckgOutLJ) title[i]="OutLeadingJet"; |
2514 | else if(fBckgType[i]==kBckgOut2J) title[i]="Out2Jets"; | |
2515 | else if(fBckgType[i]==kBckgOut3J) title[i]="Out3Jets"; | |
2516 | else if(fBckgType[i]==kBckgOutAJ) title[i]="AllJets"; | |
2517 | else if(fBckgType[i]==kBckgOutLJStat) title[i]="OutLeadingJetStat"; | |
2518 | else if(fBckgType[i]==kBckgOut2JStat) title[i]="Out2JetsStat"; | |
2519 | else if(fBckgType[i]==kBckgOut3JStat) title[i]="Out3JetsStat"; | |
2520 | else if(fBckgType[i]==kBckgOutAJStat) title[i]="AllJetsStat"; | |
2521 | else if(fBckgType[i]==kBckgClusters) title[i]="OutClusters"; | |
2522 | else printf("Please chose background method number %d!",i); | |
2523 | } | |
2524 | ||
3af23c82 | 2525 | if(fQAMode&1){ |
2526 | fQABckgHisto0RecCuts = new AliFragFuncQATrackHistos("Bckg"+title[0]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2527 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2528 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2529 | fQATrackHighPtThreshold); | |
2530 | fQABckgHisto0Gen = new AliFragFuncQATrackHistos("Bckg"+title[0]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2531 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2532 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2533 | fQATrackHighPtThreshold); | |
2534 | fQABckgHisto1RecCuts = new AliFragFuncQATrackHistos("Bckg"+title[1]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2535 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2536 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2537 | fQATrackHighPtThreshold); | |
2538 | fQABckgHisto1Gen = new AliFragFuncQATrackHistos("Bckg"+title[1]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2539 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2540 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2541 | fQATrackHighPtThreshold); | |
2542 | fQABckgHisto2RecCuts = new AliFragFuncQATrackHistos("Bckg"+title[2]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2543 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2544 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2545 | fQATrackHighPtThreshold); | |
2546 | fQABckgHisto2Gen = new AliFragFuncQATrackHistos("Bckg"+title[2]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax, | |
2547 | fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax, | |
2548 | fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax, | |
2549 | fQATrackHighPtThreshold); | |
2550 | } // end: background QA | |
2551 | ||
2552 | if(fFFMode){ | |
2553 | // outside leading jet or 2 jets or more | |
2554 | fFFBckgHisto0RecCuts = new AliFragFuncHistos("Bckg"+title[0]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2555 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2556 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2557 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2558 | fFFBckgHisto0RecLeading = new AliFragFuncHistos("Bckg"+title[0]+"RecLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2559 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2560 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2561 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2562 | fFFBckgHisto0Gen = new AliFragFuncHistos("Bckg"+title[0]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2563 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2564 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2565 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2566 | fFFBckgHisto0GenLeading = new AliFragFuncHistos("Bckg"+title[0]+"GenLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2567 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2568 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2569 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2570 | ||
2571 | fFFBckgHisto1RecCuts = new AliFragFuncHistos("Bckg"+title[1]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2572 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2573 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2574 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2575 | fFFBckgHisto1RecLeading = new AliFragFuncHistos("Bckg"+title[1]+"RecLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2576 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2577 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2578 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2579 | fFFBckgHisto1Gen = new AliFragFuncHistos("Bckg"+title[1]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2580 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2581 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2582 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2583 | fFFBckgHisto1GenLeading = new AliFragFuncHistos("Bckg"+title[1]+"GenLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2584 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2585 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2586 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2587 | ||
2588 | fFFBckgHisto2RecCuts = new AliFragFuncHistos("Bckg"+title[2]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2589 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2590 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2591 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2592 | fFFBckgHisto2RecLeading = new AliFragFuncHistos("Bckg"+title[2]+"RecLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2593 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2594 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2595 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2596 | fFFBckgHisto2Gen = new AliFragFuncHistos("Bckg"+title[2]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2597 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2598 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2599 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2600 | fFFBckgHisto2GenLeading = new AliFragFuncHistos("Bckg"+title[2]+"GenLeading", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax, | |
2601 | fFFNBinsPt, fFFPtMin, fFFPtMax, | |
2602 | fFFNBinsXi, fFFXiMin, fFFXiMax, | |
2603 | fFFNBinsZ , fFFZMin , fFFZMax); | |
2604 | } // end: background FF | |
67e37e80 | 2605 | |
2606 | if(fIJMode){ | |
2607 | fIJBckgHisto0RecCuts = new AliFragFuncIntraJetHistos("Bckg"+title[0]+"RecCuts", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
1da9498b | 2608 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
2609 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2610 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2611 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2612 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2613 | fIJBckgHisto0RecLeading = new AliFragFuncIntraJetHistos("Bckg"+title[0]+"RecLeading", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, |
1da9498b | 2614 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
2615 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2616 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2617 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2618 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2619 | fIJBckgHisto0Gen = new AliFragFuncIntraJetHistos("Bckg"+title[0]+"Gen", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, |
1da9498b | 2620 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
2621 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2622 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2623 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2624 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2625 | fIJBckgHisto0GenLeading = new AliFragFuncIntraJetHistos("Bckg"+title[0]+"GenLeading", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, |
2626 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
1da9498b | 2627 | fIJNBinsZ, fIJZMin, fIJZMax, |
2628 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2629 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2630 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2631 | |
2632 | ||
2633 | fIJBckgHisto1RecCuts = new AliFragFuncIntraJetHistos("Bckg"+title[1]+"RecCuts", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
1da9498b | 2634 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
2635 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2636 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2637 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2638 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2639 | fIJBckgHisto1RecLeading = new AliFragFuncIntraJetHistos("Bckg"+title[1]+"RecLeading", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, |
1da9498b | 2640 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
67e37e80 | 2641 | fIJNBinsZ, fIJZMin, fIJZMax, |
2642 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2643 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2644 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
2645 | fIJBckgHisto1Gen = new AliFragFuncIntraJetHistos("Bckg"+title[1]+"Gen", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
1da9498b | 2646 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
2647 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2648 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2649 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2650 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2651 | fIJBckgHisto1GenLeading = new AliFragFuncIntraJetHistos("Bckg"+title[1]+"GenLeading", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, |
2652 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
2653 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2654 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2655 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2656 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
2657 | ||
2658 | fIJBckgHisto2RecCuts = new AliFragFuncIntraJetHistos("Bckg"+title[2]+"RecCuts", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
1da9498b | 2659 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
2660 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2661 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2662 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2663 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2664 | fIJBckgHisto2RecLeading = new AliFragFuncIntraJetHistos("Bckg"+title[2]+"RecLeading", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, |
1da9498b | 2665 | fIJNBinsPt, fIJPtMin, fIJPtMax, |
2666 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2667 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2668 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2669 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
67e37e80 | 2670 | fIJBckgHisto2Gen = new AliFragFuncIntraJetHistos("Bckg"+title[2]+"Gen", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, |
2671 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
2672 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2673 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2674 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2675 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
2676 | fIJBckgHisto2GenLeading = new AliFragFuncIntraJetHistos("Bckg"+title[2]+"GenLeading", fIJNBinsJetPt, fIJJetPtMin, fIJJetPtMax, | |
2677 | fIJNBinsPt, fIJPtMin, fIJPtMax, | |
2678 | fIJNBinsZ, fIJZMin, fIJZMax, | |
2679 | fIJNBinsCosTheta , fIJCosThetaMin , fIJCosThetaMax, | |
2680 | fIJNBinsTheta , fIJThetaMin , fIJThetaMax, | |
2681 | fIJNBinsJt , fIJJtMin , fIJJtMax); | |
3af23c82 | 2682 | } // end: background intra-jet |
2683 | } // end: background | |
2684 | ||
2685 | if(fPhiCorrMode){ | |
2686 | fPhiCorrHistosJetArea = new AliFragFuncQATrackHistos("JetArea", fPhiCorrNBinsPt, fPhiCorrPtMin, fPhiCorrPtMax, | |
2687 | fPhiCorrNBinsEta, fPhiCorrEtaMin, fPhiCorrEtaMax, | |
2688 | fPhiCorrNBinsPhi, fPhiCorrPhiMin, fPhiCorrPhiMax, | |
2689 | fQATrackHighPtThreshold); | |
2690 | ||
2691 | fPhiCorrHistosTransverseArea = new AliFragFuncQATrackHistos("TransverseArea", fPhiCorrNBinsPt, fPhiCorrPtMin, fPhiCorrPtMax, | |
2692 | fPhiCorrNBinsEta, fPhiCorrEtaMin, fPhiCorrEtaMax, | |
2693 | fPhiCorrNBinsPhi, fPhiCorrPhiMin, fPhiCorrPhiMax, | |
2694 | fQATrackHighPtThreshold); | |
2695 | ||
2696 | fPhiCorrHistosAwayArea = new AliFragFuncQATrackHistos("AwayArea", fPhiCorrNBinsPt, fPhiCorrPtMin, fPhiCorrPtMax, | |
2697 | fPhiCorrNBinsEta, fPhiCorrEtaMin, fPhiCorrEtaMax, | |
2698 | fPhiCorrNBinsPhi, fPhiCorrPhiMin, fPhiCorrPhiMax, | |
2699 | fQATrackHighPtThreshold); | |
2700 | } // end: phi correlation | |
656dc810 | 2701 | |
3af23c82 | 2702 | |
2703 | // ____________ define histograms ____________________ | |
2704 | ||
2705 | if(fQAMode){ | |
2706 | if(fQAMode&1){ // track QA | |
2707 | fQATrackHistosRec->DefineHistos(); | |
2708 | fQATrackHistosRecCuts->DefineHistos(); | |
2709 | fQATrackHistosGen->DefineHistos(); | |
2710 | } | |
656dc810 | 2711 | |
3af23c82 | 2712 | if(fQAMode&2){ // jet QA |
2713 | fQAJetHistosRec->DefineHistos(); | |
2714 | fQAJetHistosRecCuts->DefineHistos(); | |
2715 | fQAJetHistosRecCutsLeading->DefineHistos(); | |
2716 | fQAJetHistosGen->DefineHistos(); | |
2717 | fQAJetHistosGenLeading->DefineHistos(); | |
2718 | if(fEffMode) fQAJetHistosRecEffLeading->DefineHistos(); | |
2719 | } | |
2720 | } | |
656dc810 | 2721 | |
3af23c82 | 2722 | if(fFFMode){ |
2723 | fFFHistosRecCuts->DefineHistos(); | |
2724 | fFFHistosRecLeading->DefineHistos(); | |
2725 | fFFHistosRecLeadingTrack->DefineHistos(); | |
2726 | fFFHistosGen->DefineHistos(); | |
2727 | fFFHistosGenLeading->DefineHistos(); | |
2728 | fFFHistosGenLeadingTrack->DefineHistos(); | |
2729 | } | |
656dc810 | 2730 | |
67e37e80 | 2731 | if(fIJMode){ |
2732 | fIJHistosRecCuts->DefineHistos(); | |
2733 | fIJHistosRecLeading->DefineHistos(); | |
2734 | fIJHistosRecLeadingTrack->DefineHistos(); | |
2735 | fIJHistosGen->DefineHistos(); | |
2736 | fIJHistosGenLeading->DefineHistos(); | |
2737 | fIJHistosGenLeadingTrack->DefineHistos(); | |
2738 | } | |
2739 | ||
3af23c82 | 2740 | if(fDJMode){ |
2741 | if(fDJMode&1){ | |
2742 | fFFDiJetHistosRecCuts->DefineDiJetHistos(); | |
2743 | fFFDiJetHistosRecLeading->DefineDiJetHistos(); | |
2744 | fFFDiJetHistosRecLeadingTrack->DefineDiJetHistos(); | |
2745 | fFFDiJetHistosGen->DefineDiJetHistos(); | |
2746 | fFFDiJetHistosGenLeading->DefineDiJetHistos(); | |
2747 | fFFDiJetHistosGenLeadingTrack->DefineDiJetHistos(); | |
2748 | } | |
2749 | ||
2750 | if(fDJMode&2){ | |
2751 | fQADiJetHistosRecCuts->DefineQADiJetHistos(); | |
2752 | fQADiJetHistosGen->DefineQADiJetHistos(); | |
2753 | } | |
2754 | } // end: di-jet | |
656dc810 | 2755 | |
3af23c82 | 2756 | if(fEffMode){ |
2757 | if(fQAMode&1){ | |
2758 | fQATrackHistosRecEffGen->DefineHistos(); | |
2759 | fQATrackHistosRecEffRec->DefineHistos(); | |
2760 | } | |
2761 | if(fFFMode){ | |
2762 | fFFHistosRecEffGen->DefineHistos(); | |
2763 | fFFHistosRecEffRec->DefineHistos(); | |
2764 | } | |
2765 | } // end: efficiency | |
cb76764e | 2766 | |
1da9498b | 2767 | // Background |
2768 | if(fBckgMode){ | |
3af23c82 | 2769 | if(fFFMode){ |
2770 | fFFBckgHisto0RecCuts->DefineHistos(); | |
2771 | fFFBckgHisto0RecLeading->DefineHistos(); | |
2772 | fFFBckgHisto0Gen->DefineHistos(); | |
2773 | fFFBckgHisto0GenLeading->DefineHistos(); | |
2774 | fFFBckgHisto1RecCuts->DefineHistos(); | |
2775 | fFFBckgHisto1RecLeading->DefineHistos(); | |
2776 | fFFBckgHisto1Gen->DefineHistos(); | |
2777 | fFFBckgHisto1GenLeading->DefineHistos(); | |
2778 | fFFBckgHisto2RecCuts->DefineHistos(); | |
2779 | fFFBckgHisto2RecLeading->DefineHistos(); | |
2780 | fFFBckgHisto2Gen->DefineHistos(); | |
2781 | fFFBckgHisto2GenLeading->DefineHistos(); | |
2782 | } | |
2783 | ||
67e37e80 | 2784 | if(fIJMode){ |
2785 | fIJBckgHisto0RecCuts->DefineHistos(); | |
2786 | fIJBckgHisto0RecLeading->DefineHistos(); | |
2787 | fIJBckgHisto0Gen->DefineHistos(); | |
2788 | fIJBckgHisto0GenLeading->DefineHistos(); | |
2789 | fIJBckgHisto1RecCuts->DefineHistos(); | |
2790 | fIJBckgHisto1RecLeading->DefineHistos(); | |
2791 | fIJBckgHisto1Gen->DefineHistos(); | |
2792 | fIJBckgHisto1GenLeading->DefineHistos(); | |
2793 | fIJBckgHisto2RecCuts->DefineHistos(); | |
2794 | fIJBckgHisto2RecLeading->DefineHistos(); | |
2795 | fIJBckgHisto2Gen->DefineHistos(); | |
2796 | fIJBckgHisto2GenLeading->DefineHistos(); | |
2797 | } | |
2798 | ||
3af23c82 | 2799 | if(fQAMode&1){ |
2800 | fQABckgHisto0RecCuts->DefineHistos(); | |
2801 | fQABckgHisto0Gen->DefineHistos(); | |
2802 | fQABckgHisto1RecCuts->DefineHistos(); | |
2803 | fQABckgHisto1Gen->DefineHistos(); | |
2804 | fQABckgHisto2RecCuts->DefineHistos(); | |
2805 | fQABckgHisto2Gen->DefineHistos(); | |
2806 | } | |
2807 | } // end: background | |
1da9498b | 2808 | |
3af23c82 | 2809 | if(fPhiCorrMode){ |
2810 | fPhiCorrHistosJetArea->DefineHistos(); | |
2811 | fPhiCorrHistosTransverseArea->DefineHistos(); | |
2812 | fPhiCorrHistosAwayArea->DefineHistos(); | |
2813 | } | |
2814 | ||
fb03edbe | 2815 | Bool_t genJets = (fJetTypeGen != kJetsUndef) ? kTRUE : kFALSE; |
2816 | Bool_t genTracks = (fTrackTypeGen != kTrackUndef) ? kTRUE : kFALSE; | |
2817 | Bool_t recJetsEff = (fJetTypeRecEff != kJetsUndef) ? kTRUE : kFALSE; | |
2818 | ||
3af23c82 | 2819 | fCommonHistList->Add(fh1EvtSelection); |
2820 | fCommonHistList->Add(fh1EvtMult); | |
2821 | fCommonHistList->Add(fh1EvtCent); | |
2822 | fCommonHistList->Add(fh1VertexNContributors); | |
2823 | fCommonHistList->Add(fh1VertexZ); | |
2824 | fCommonHistList->Add(fh1nRecJetsCuts); | |
2825 | if(genJets && genTracks){ | |
2826 | fCommonHistList->Add(fh1Xsec); | |
2827 | fCommonHistList->Add(fh1Trials); | |
2828 | fCommonHistList->Add(fh1PtHard); | |
2829 | fCommonHistList->Add(fh1PtHardTrials); | |
2830 | if(genJets) fCommonHistList->Add(fh1nGenJets); | |
2831 | } | |
fb03edbe | 2832 | |
3af23c82 | 2833 | // FF histograms |
2834 | if(fFFMode){ | |
656dc810 | 2835 | fFFHistosRecCuts->AddToOutput(fCommonHistList); |
2836 | fFFHistosRecLeading->AddToOutput(fCommonHistList); | |
2837 | fFFHistosRecLeadingTrack->AddToOutput(fCommonHistList); | |
3af23c82 | 2838 | if(genJets && genTracks){ |
2839 | fCommonHistList->Add(fh1Xsec); | |
2840 | fCommonHistList->Add(fh1Trials); | |
2841 | fCommonHistList->Add(fh1PtHard); | |
2842 | fCommonHistList->Add(fh1PtHardTrials); | |
2843 | if(genJets) fCommonHistList->Add(fh1nGenJets); | |
2844 | ||
2845 | fFFHistosGen->AddToOutput(fCommonHistList); | |
2846 | fFFHistosGenLeading->AddToOutput(fCommonHistList); | |
2847 | fFFHistosGenLeadingTrack->AddToOutput(fCommonHistList); | |
2848 | } | |
2849 | } | |
fb03edbe | 2850 | |
3af23c82 | 2851 | // Background |
2852 | if(fBckgMode){ | |
2853 | if(fFFMode){ | |
67e37e80 | 2854 | fFFBckgHisto0RecCuts->AddToOutput(fCommonHistList); |
2855 | fFFBckgHisto0RecLeading->AddToOutput(fCommonHistList); | |
2856 | fFFBckgHisto1RecCuts->AddToOutput(fCommonHistList); | |
2857 | fFFBckgHisto1RecLeading->AddToOutput(fCommonHistList); | |
2858 | fFFBckgHisto2RecCuts->AddToOutput(fCommonHistList); | |
2859 | fFFBckgHisto2RecLeading->AddToOutput(fCommonHistList); | |
3af23c82 | 2860 | if(genJets && genTracks){ |
2861 | fFFBckgHisto0Gen->AddToOutput(fCommonHistList); | |
2862 | fFFBckgHisto0GenLeading->AddToOutput(fCommonHistList); | |
2863 | fFFBckgHisto1Gen->AddToOutput(fCommonHistList); | |
2864 | fFFBckgHisto1GenLeading->AddToOutput(fCommonHistList); | |
2865 | fFFBckgHisto2Gen->AddToOutput(fCommonHistList); | |
2866 | fFFBckgHisto2GenLeading->AddToOutput(fCommonHistList); | |
2867 | } | |
2868 | } | |
2869 | ||
2870 | if(fQAMode&1){ | |
67e37e80 | 2871 | fQABckgHisto0RecCuts->AddToOutput(fCommonHistList); |
2872 | fQABckgHisto1RecCuts->AddToOutput(fCommonHistList); | |
2873 | fQABckgHisto2RecCuts->AddToOutput(fCommonHistList); | |
3af23c82 | 2874 | if(genJets && genTracks){ |
2875 | fQABckgHisto0Gen->AddToOutput(fCommonHistList); | |
2876 | fQABckgHisto1Gen->AddToOutput(fCommonHistList); | |
2877 | fQABckgHisto2Gen->AddToOutput(fCommonHistList); | |
2878 | } | |
1da9498b | 2879 | } |
2880 | ||
3af23c82 | 2881 | if(fBckgType[0]==kBckgOutLJ || fBckgType[1]==kBckgOutLJ || fBckgType[2]==kBckgOutLJ) |
2882 | fCommonHistList->Add(fh1OutLeadingMult); | |
2883 | if(fBckgType[0]==kBckgPerp || fBckgType[1]==kBckgPerp || fBckgType[2]==kBckgPerp) | |
2884 | fCommonHistList->Add(fh1PerpMult); | |
2885 | if(fBckgType[0]==kBckgASide || fBckgType[1]==kBckgASide || fBckgType[2]==kBckgASide) | |
2886 | fCommonHistList->Add(fh1ASideMult); | |
2887 | if(fBckgType[0]==kBckgASideWindow || fBckgType[1]==kBckgASideWindow || fBckgType[2]==kBckgASideWindow) | |
2888 | fCommonHistList->Add(fh1ASideWindowMult); | |
2889 | if(fBckgType[0]==kBckgPerpWindow || fBckgType[1]==kBckgPerpWindow || fBckgType[2]==kBckgPerpWindow) | |
2890 | fCommonHistList->Add(fh1PerpWindowMult); | |
2891 | if(fBckgType[0]==kBckgOut2J || fBckgType[1]==kBckgOut2J || fBckgType[2]==kBckgOut2J) | |
2892 | fCommonHistList->Add(fh1Out2JetsMult); | |
2893 | if(fBckgType[0]==kBckgOut3J || fBckgType[1]==kBckgOut3J || fBckgType[2]==kBckgOut3J) | |
2894 | fCommonHistList->Add(fh1Out3JetsMult); | |
656dc810 | 2895 | } |
3af23c82 | 2896 | |
2897 | // QA | |
2898 | if(fQAMode){ | |
2899 | if(fQAMode&1){ // track QA | |
2900 | fQATrackHistosRec->AddToOutput(fCommonHistList); | |
2901 | fQATrackHistosRecCuts->AddToOutput(fCommonHistList); | |
2902 | if(genTracks) fQATrackHistosGen->AddToOutput(fCommonHistList); | |
fb03edbe | 2903 | } |
fe343c6b | 2904 | |
3af23c82 | 2905 | if(fQAMode&2){ // jet QA |
2906 | fQAJetHistosRec->AddToOutput(fCommonHistList); | |
2907 | fQAJetHistosRecCuts->AddToOutput(fCommonHistList); | |
2908 | fQAJetHistosRecCutsLeading->AddToOutput(fCommonHistList); | |
2909 | if(recJetsEff && fEffMode) fQAJetHistosRecEffLeading->AddToOutput(fCommonHistList); | |
2910 | if(genJets){ | |
2911 | fQAJetHistosGen->AddToOutput(fCommonHistList); | |
2912 | fQAJetHistosGenLeading->AddToOutput(fCommonHistList); | |
2913 | } | |
67e37e80 | 2914 | } |
656dc810 | 2915 | } |
3af23c82 | 2916 | |
2917 | if(fBckgMode && (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters)) { | |
2918 | fCommonHistList->Add(fh1nRecBckgJetsCuts); | |
2919 | if(genJets) fCommonHistList->Add(fh1nGenBckgJets); | |
656dc810 | 2920 | } |
3af23c82 | 2921 | |
2922 | // phi correlation | |
2923 | if(fPhiCorrMode){ | |
2924 | fPhiCorrHistosJetArea->AddToOutput(fCommonHistList); | |
2925 | fPhiCorrHistosTransverseArea->AddToOutput(fCommonHistList); | |
2926 | fPhiCorrHistosAwayArea->AddToOutput(fCommonHistList); | |
2927 | } | |
2928 | ||
2929 | // intra-jet | |
2930 | if(fIJMode){ | |
2931 | fIJHistosRecCuts->AddToOutput(fCommonHistList); | |
2932 | fIJHistosRecLeading->AddToOutput(fCommonHistList); | |
2933 | fIJHistosRecLeadingTrack->AddToOutput(fCommonHistList); | |
2934 | ||
2935 | // Background | |
2936 | if(fBckgMode){ | |
2937 | fIJBckgHisto0RecCuts->AddToOutput(fCommonHistList); | |
2938 | fIJBckgHisto0RecLeading->AddToOutput(fCommonHistList); | |
2939 | fIJBckgHisto1RecCuts->AddToOutput(fCommonHistList); | |
2940 | fIJBckgHisto1RecLeading->AddToOutput(fCommonHistList); | |
2941 | fIJBckgHisto2RecCuts->AddToOutput(fCommonHistList); | |
2942 | fIJBckgHisto2RecLeading->AddToOutput(fCommonHistList); | |
2943 | } | |
2944 | ||
2945 | if(genJets && genTracks){ | |
2946 | fIJHistosGen->AddToOutput(fCommonHistList); | |
2947 | fIJHistosGenLeading->AddToOutput(fCommonHistList); | |
2948 | fIJHistosGenLeadingTrack->AddToOutput(fCommonHistList); | |
1da9498b | 2949 | |
67e37e80 | 2950 | // Background |
2951 | if(fBckgMode){ | |
3af23c82 | 2952 | fIJBckgHisto0Gen->AddToOutput(fCommonHistList); |
2953 | fIJBckgHisto0GenLeading->AddToOutput(fCommonHistList); | |
2954 | fIJBckgHisto1Gen->AddToOutput(fCommonHistList); | |
2955 | fIJBckgHisto1GenLeading->AddToOutput(fCommonHistList); | |
2956 | fIJBckgHisto2Gen->AddToOutput(fCommonHistList); | |
2957 | fIJBckgHisto2GenLeading->AddToOutput(fCommonHistList); | |
67e37e80 | 2958 | } |
3af23c82 | 2959 | } // end: gen |
2960 | } // end: intra-jet | |
2961 | ||
2962 | if(fDJMode){ | |
2963 | if(fDJMode&1){ | |
2964 | fFFDiJetHistosRecCuts->AddToOutput(fCommonHistList); | |
2965 | fFFDiJetHistosRecLeading->AddToOutput(fCommonHistList); | |
2966 | fFFDiJetHistosRecLeadingTrack->AddToOutput(fCommonHistList); | |
67e37e80 | 2967 | if(genJets && genTracks){ |
3af23c82 | 2968 | fFFDiJetHistosGen->AddToOutput(fCommonHistList); |
fb03edbe | 2969 | fFFDiJetHistosGenLeading->AddToOutput(fCommonHistList); |
2970 | fFFDiJetHistosGenLeadingTrack->AddToOutput(fCommonHistList); | |
3af23c82 | 2971 | } |
2972 | } // end: di-jet | |
2973 | if(fDJMode&2){ | |
2974 | fQADiJetHistosRecCuts->AddToOutput(fCommonHistList); | |
2975 | if(genJets && genTracks){ | |
2976 | fQADiJetHistosGen->AddToOutput(fCommonHistList); | |
2977 | } | |
2978 | } // end: di-jet QA | |
2979 | } // end: di-jet | |
2980 | ||
2981 | if(fEffMode && recJetsEff && genTracks){ | |
2982 | if(fQAMode&1){ | |
cb76764e | 2983 | fQATrackHistosRecEffGen->AddToOutput(fCommonHistList); |
2984 | fQATrackHistosRecEffRec->AddToOutput(fCommonHistList); | |
3af23c82 | 2985 | fCommonHistList->Add(fhnResponseSinglePt); |
2986 | } | |
2987 | if(fFFMode){ | |
cb76764e | 2988 | fFFHistosRecEffGen->AddToOutput(fCommonHistList); |
2989 | fFFHistosRecEffRec->AddToOutput(fCommonHistList); | |
3af23c82 | 2990 | fCommonHistList->Add(fhnResponseJetTrackPt); |
2991 | fCommonHistList->Add(fhnResponseJetZ); | |
2992 | fCommonHistList->Add(fhnResponseJetXi); | |
fb03edbe | 2993 | } |
3af23c82 | 2994 | fCommonHistList->Add(fh1nRecEffJets); |
2995 | fCommonHistList->Add(fh2PtRecVsGenPrim); | |
656dc810 | 2996 | } |
3af23c82 | 2997 | |
656dc810 | 2998 | |
2999 | // =========== Switch on Sumw2 for all histos =========== | |
3000 | for (Int_t i=0; i<fCommonHistList->GetEntries(); ++i){ | |
3001 | TH1 *h1 = dynamic_cast<TH1*>(fCommonHistList->At(i)); | |
3002 | if (h1) h1->Sumw2(); | |
3af23c82 | 3003 | else{ |
3004 | THnSparse *hnSparse = dynamic_cast<THnSparse*>(fCommonHistList->At(i)); | |
3005 | if(hnSparse) hnSparse->Sumw2(); | |
3006 | } | |
656dc810 | 3007 | } |
3008 | ||
3009 | TH1::AddDirectory(oldStatus); | |
3010 | } | |
3011 | ||
3012 | //_______________________________________________ | |
3013 | void AliAnalysisTaskFragmentationFunction::Init() | |
3014 | { | |
3015 | // Initialization | |
3016 | if(fDebug > 1) Printf("AliAnalysisTaskFragmentationFunction::Init()"); | |
3017 | ||
3018 | } | |
3019 | ||
3020 | //_____________________________________________________________ | |
3021 | void AliAnalysisTaskFragmentationFunction::UserExec(Option_t *) | |
3022 | { | |
3023 | // Main loop | |
3024 | // Called for each event | |
3025 | if(fDebug > 1) Printf("AliAnalysisTaskFragmentationFunction::UserExec()"); | |
3026 | ||
3027 | ||
3028 | if(fDebug > 1) Printf("Analysis event #%5d", (Int_t) fEntry); | |
3029 | // Trigger selection | |
67e37e80 | 3030 | |
656dc810 | 3031 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) |
3032 | ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler()); | |
3af23c82 | 3033 | if(!(inputHandler->IsEventSelected() & AliVEvent::kMB)){ |
ac017ff3 | 3034 | if(inputHandler->InheritsFrom("AliESDInputHandler") && fUsePhysicsSelection){ // PhysicsSelection only with ESD input |
3af23c82 | 3035 | fh1EvtSelection->Fill(1.); |
656dc810 | 3036 | if (fDebug > 1 ) Printf(" Trigger Selection: event REJECTED ... "); |
3037 | PostData(1, fCommonHistList); | |
3038 | return; | |
3039 | } | |
3040 | } | |
1da9498b | 3041 | |
656dc810 | 3042 | fESD = dynamic_cast<AliESDEvent*>(InputEvent()); |
3043 | if(!fESD){ | |
3044 | if(fDebug>3) Printf("%s:%d ESDEvent not found in the input", (char*)__FILE__,__LINE__); | |
3045 | } | |
3046 | ||
3047 | fMCEvent = MCEvent(); | |
3048 | if(!fMCEvent){ | |
3049 | if(fDebug>3) Printf("%s:%d MCEvent not found in the input", (char*)__FILE__,__LINE__); | |
3050 | } | |
3051 | ||
3052 | // get AOD event from input/ouput | |
3053 | TObject* handler = AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler(); | |
3054 | if( handler && handler->InheritsFrom("AliAODInputHandler") ) { | |
3055 | fAOD = ((AliAODInputHandler*)handler)->GetEvent(); | |
3056 | if (fDebug > 1) Printf("%s:%d AOD event from input", (char*)__FILE__,__LINE__); | |
3057 | } | |
3058 | else { | |
3059 | handler = AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler(); | |
3060 | if( handler && handler->InheritsFrom("AliAODHandler") ) { | |
3061 | fAOD = ((AliAODHandler*)handler)->GetAOD(); | |
3062 | if (fDebug > 1) Printf("%s:%d AOD event from output", (char*)__FILE__,__LINE__); | |
3063 | } | |
3064 | } | |
3065 | ||
3066 | if(!fAOD){ | |
3067 | Printf("%s:%d AODEvent not found", (char*)__FILE__,__LINE__); | |
3068 | return; | |
3069 | } | |
3070 | ||
3af23c82 | 3071 | // event selection ************************************************** |
3072 | // *** event class *** | |
3073 | Double_t centPercent = -1; | |
3074 | if(fEventClass>0){ | |
3075 | Int_t cl = 0; | |
3076 | if(handler->InheritsFrom("AliAODInputHandler")){ | |
3077 | // since it is not supported by the helper task define own classes | |
3078 | centPercent = fAOD->GetHeader()->GetCentrality(); | |
3079 | cl = 1; | |
3080 | if(centPercent>10) cl = 2; | |
3081 | if(centPercent>30) cl = 3; | |
3082 | if(centPercent>50) cl = 4; | |
3083 | } | |
3084 | else { | |
3085 | cl = AliAnalysisHelperJetTasks::EventClass(); | |
3086 | } | |
3087 | ||
3088 | if(cl!=fEventClass){ | |
3089 | // event not in selected event class, reject event | |
3090 | if (fDebug > 1) Printf("%s:%d event not in selected event class: event REJECTED ...",(char*)__FILE__,__LINE__); | |
3091 | fh1EvtSelection->Fill(2.); | |
3092 | PostData(1, fCommonHistList); | |
3093 | return; | |
3094 | } | |
3095 | } | |
3096 | ||
3097 | // *** vertex cut *** | |
656dc810 | 3098 | AliAODVertex* primVtx = fAOD->GetPrimaryVertex(); |
3099 | Int_t nTracksPrim = primVtx->GetNContributors(); | |
3100 | fh1VertexNContributors->Fill(nTracksPrim); | |
3101 | ||
3102 | if (fDebug > 1) Printf("%s:%d primary vertex selection: %d", (char*)__FILE__,__LINE__,nTracksPrim); | |
3103 | if(!nTracksPrim){ | |
3104 | if (fDebug > 1) Printf("%s:%d primary vertex selection: event REJECTED...",(char*)__FILE__,__LINE__); | |
3af23c82 | 3105 | fh1EvtSelection->Fill(3.); |
656dc810 | 3106 | PostData(1, fCommonHistList); |
3107 | return; | |
3108 | } | |
3af23c82 | 3109 | |
656dc810 | 3110 | fh1VertexZ->Fill(primVtx->GetZ()); |
3111 | ||
3af23c82 | 3112 | if(TMath::Abs(primVtx->GetZ())>fMaxVertexZ){ |
656dc810 | 3113 | if (fDebug > 1) Printf("%s:%d primary vertex z = %f: event REJECTED...",(char*)__FILE__,__LINE__,primVtx->GetZ()); |
3af23c82 | 3114 | fh1EvtSelection->Fill(4.); |
656dc810 | 3115 | PostData(1, fCommonHistList); |
3116 | return; | |
3117 | } | |
3af23c82 | 3118 | |
656dc810 | 3119 | TString primVtxName(primVtx->GetName()); |
3120 | ||
3121 | if(primVtxName.CompareTo("TPCVertex",TString::kIgnoreCase) == 1){ | |
3122 | if (fDebug > 1) Printf("%s:%d primary vertex selection: TPC vertex, event REJECTED...",(char*)__FILE__,__LINE__); | |
3af23c82 | 3123 | fh1EvtSelection->Fill(5.); |
656dc810 | 3124 | PostData(1, fCommonHistList); |
3125 | return; | |
3126 | } | |
3af23c82 | 3127 | |
3128 | if (fDebug > 1) Printf("%s:%d event ACCEPTED ...",(char*)__FILE__,__LINE__); | |
3129 | fh1EvtSelection->Fill(0.); | |
3130 | fh1EvtCent->Fill(centPercent); | |
ac017ff3 | 3131 | |
3132 | ||
3133 | //___ get MC information __________________________________________________________________ | |
3134 | ||
3135 | Double_t ptHard = 0.; | |
3136 | Double_t nTrials = 1; // trials for MC trigger weight for real data | |
3e1c1eee | 3137 | |
3138 | if(fMCEvent){ | |
5fde4a38 | 3139 | AliGenEventHeader* genHeader = fMCEvent->GenEventHeader(); |
3140 | AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader); | |
3141 | AliGenHijingEventHeader* hijingGenHeader = 0x0; | |
3142 | ||
3143 | if(pythiaGenHeader){ | |
3144 | if(fDebug>3) Printf("%s:%d pythiaGenHeader found", (char*)__FILE__,__LINE__); | |
3145 | nTrials = pythiaGenHeader->Trials(); | |
3146 | ptHard = pythiaGenHeader->GetPtHard(); | |
3147 | ||
3148 | fh1PtHard->Fill(ptHard); | |
3149 | fh1PtHardTrials->Fill(ptHard,nTrials); | |
3150 | ||
ac017ff3 | 3151 | |
5fde4a38 | 3152 | } else { // no pythia, hijing? |
c2658535 | 3153 | |
5fde4a38 | 3154 | if(fDebug>3) Printf("%s:%d no pythiaGenHeader found", (char*)__FILE__,__LINE__); |
3155 | ||
3156 | hijingGenHeader = dynamic_cast<AliGenHijingEventHeader*>(genHeader); | |
3157 | if(!hijingGenHeader){ | |
3158 | Printf("%s:%d no pythiaGenHeader or hjingGenHeader found", (char*)__FILE__,__LINE__); | |
3159 | } else { | |
3160 | if(fDebug>3) Printf("%s:%d hijingGenHeader found", (char*)__FILE__,__LINE__); | |
3161 | } | |
3e1c1eee | 3162 | } |
5fde4a38 | 3163 | |
3164 | fh1Trials->Fill("#sum{ntrials}",fAvgTrials); | |
3165 | } | |
656dc810 | 3166 | |
3167 | ||
3168 | //___ fetch jets __________________________________________________________________________ | |
3169 | ||
3170 | Int_t nJ = GetListOfJets(fJetsRec, kJetsRec); | |
3171 | Int_t nRecJets = 0; | |
3172 | if(nJ>=0) nRecJets = fJetsRec->GetEntries(); | |
3173 | if(fDebug>2)Printf("%s:%d Selected Rec jets: %d %d",(char*)__FILE__,__LINE__,nJ,nRecJets); | |
3174 | if(nJ != nRecJets) Printf("%s:%d Mismatch Selected Rec Jets: %d %d",(char*)__FILE__,__LINE__,nJ,nRecJets); | |
3175 | ||
3176 | Int_t nJCuts = GetListOfJets(fJetsRecCuts, kJetsRecAcceptance); | |
3177 | Int_t nRecJetsCuts = 0; | |
3178 | if(nJCuts>=0) nRecJetsCuts = fJetsRecCuts->GetEntries(); | |
3179 | if(fDebug>2)Printf("%s:%d Selected Rec jets after cuts: %d %d",(char*)__FILE__,__LINE__,nJCuts,nRecJetsCuts); | |
3180 | if(nRecJetsCuts != nJCuts) Printf("%s:%d Mismatch selected Rec jets after cuts: %d %d",(char*)__FILE__,__LINE__,nJCuts,nRecJetsCuts); | |
3181 | fh1nRecJetsCuts->Fill(nRecJetsCuts); | |
3182 | ||
3183 | ||
3184 | if(fJetTypeGen==kJetsKine || fJetTypeGen == kJetsKineAcceptance) fJetsGen->SetOwner(kTRUE); // kine aod jets allocated on heap, delete them with TList::Clear() | |
3185 | Int_t nJGen = GetListOfJets(fJetsGen, fJetTypeGen); | |
3186 | Int_t nGenJets = 0; | |
3187 | if(nJGen>=0) nGenJets = fJetsGen->GetEntries(); | |
3188 | if(fDebug>2)Printf("%s:%d Selected Gen jets: %d %d",(char*)__FILE__,__LINE__,nJGen,nGenJets); | |
3189 | if(nJGen != nGenJets) Printf("%s:%d Mismatch selected Gen jets: %d %d",(char*)__FILE__,__LINE__,nJGen,nGenJets); | |
3190 | fh1nGenJets->Fill(nGenJets); | |
3191 | ||
3192 | ||
fe343c6b | 3193 | if(fJetTypeRecEff==kJetsKine || fJetTypeRecEff == kJetsKineAcceptance) fJetsRecEff->SetOwner(kTRUE); // kine aod jets allocated on heap, delete them with TList::Clear() |
3194 | Int_t nJRecEff = GetListOfJets(fJetsRecEff, fJetTypeRecEff); | |
3195 | Int_t nRecEffJets = 0; | |
3196 | if(nJRecEff>=0) nRecEffJets = fJetsRecEff->GetEntries(); | |
3197 | if(fDebug>2)Printf("%s:%d Selected RecEff jets: %d %d",(char*)__FILE__,__LINE__,nJRecEff,nRecEffJets); | |
3198 | if(nJRecEff != nRecEffJets) Printf("%s:%d Mismatch selected RecEff jets: %d %d",(char*)__FILE__,__LINE__,nJRecEff,nRecEffJets); | |
3199 | fh1nRecEffJets->Fill(nRecEffJets); | |
3200 | ||
67e37e80 | 3201 | //____ fetch background jets ___________________________________________________ |
3202 | if(fBckgMode && (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters)){ | |
3af23c82 | 3203 | Int_t nBJ = GetListOfBckgJets(/*fBckgJetsRec, kJetsRec*/); |
67e37e80 | 3204 | Int_t nRecBckgJets = 0; |
3205 | if(nBJ>=0) nRecBckgJets = fBckgJetsRec->GetEntries(); | |
3206 | if(fDebug>2)Printf("%s:%d Selected Rec background jets: %d %d",(char*)__FILE__,__LINE__,nBJ,nRecBckgJets); | |
3207 | if(nBJ != nRecBckgJets) Printf("%s:%d Mismatch Selected Rec background jets: %d %d",(char*)__FILE__,__LINE__,nBJ,nRecBckgJets); | |
3208 | ||
3af23c82 | 3209 | Int_t nBJCuts = GetListOfBckgJets(/*fBckgJetsRecCuts, kJetsRecAcceptance*/); |
67e37e80 | 3210 | Int_t nRecBckgJetsCuts = 0; |
3211 | if(nBJCuts>=0) nRecBckgJetsCuts = fBckgJetsRecCuts->GetEntries(); | |
3212 | if(fDebug>2)Printf("%s:%d Selected Rec background jets after cuts: %d %d",(char*)__FILE__,__LINE__,nJCuts,nRecJetsCuts); | |
3213 | if(nRecBckgJetsCuts != nBJCuts) Printf("%s:%d Mismatch selected Rec background jets after cuts: %d %d",(char*)__FILE__,__LINE__,nBJCuts,nRecBckgJetsCuts); | |
3214 | fh1nRecBckgJetsCuts->Fill(nRecBckgJetsCuts); | |
3215 | ||
3216 | if(fJetTypeGen==kJetsKine || fJetTypeGen == kJetsKineAcceptance) fBckgJetsGen->SetOwner(kTRUE); // kine aod jets allocated on heap, delete them with TList::Clear() | |
3af23c82 | 3217 | Int_t nBJGen = GetListOfBckgJets(/*fBckgJetsGen, fJetTypeGen*/); |
67e37e80 | 3218 | Int_t nGenBckgJets = 0; |
3219 | if(nBJGen>=0) nGenBckgJets = fBckgJetsGen->GetEntries(); | |
3220 | if(fDebug>2)Printf("%s:%d Selected Gen background jets: %d %d",(char*)__FILE__,__LINE__,nBJGen,nGenBckgJets); | |
3221 | if(nBJGen != nGenBckgJets) Printf("%s:%d Mismatch selected Gen background jets: %d %d",(char*)__FILE__,__LINE__,nBJGen,nGenBckgJets); | |
3222 | fh1nGenBckgJets->Fill(nGenBckgJets); | |
3223 | } | |
fe343c6b | 3224 | |
656dc810 | 3225 | //____ fetch particles __________________________________________________________ |
3226 | ||
3227 | Int_t nT = GetListOfTracks(fTracksRec, kTrackAOD); | |
3228 | Int_t nRecPart = 0; | |
3229 | if(nT>=0) nRecPart = fTracksRec->GetEntries(); | |
3230 | if(fDebug>2)Printf("%s:%d Selected Rec tracks: %d %d",(char*)__FILE__,__LINE__,nT,nRecPart); | |
3231 | if(nRecPart != nT) Printf("%s:%d Mismatch selected Rec tracks: %d %d",(char*)__FILE__,__LINE__,nT,nRecPart); | |
3232 | ||
3233 | ||
3234 | Int_t nTCuts = GetListOfTracks(fTracksRecCuts, kTrackAODCuts); | |
3235 | Int_t nRecPartCuts = 0; | |
3236 | if(nTCuts>=0) nRecPartCuts = fTracksRecCuts->GetEntries(); | |
3237 | if(fDebug>2)Printf("%s:%d Selected Rec tracks after cuts: %d %d",(char*)__FILE__,__LINE__,nTCuts,nRecPartCuts); | |
3238 | if(nRecPartCuts != nTCuts) Printf("%s:%d Mismatch selected Rec tracks after cuts: %d %d",(char*)__FILE__,__LINE__,nTCuts,nRecPartCuts); | |
3239 | fh1EvtMult->Fill(nRecPartCuts); | |
3240 | ||
3241 | ||
3af23c82 | 3242 | |
656dc810 | 3243 | Int_t nTGen = GetListOfTracks(fTracksGen,fTrackTypeGen); |
3244 | Int_t nGenPart = 0; | |
3245 | if(nTGen>=0) nGenPart = fTracksGen->GetEntries(); | |
3246 | if(fDebug>2)Printf("%s:%d Selected Gen tracks: %d %d",(char*)__FILE__,__LINE__,nTGen,nGenPart); | |
3247 | if(nGenPart != nTGen) Printf("%s:%d Mismatch selected Gen tracks: %d %d",(char*)__FILE__,__LINE__,nTGen,nGenPart); | |
3248 | ||
3249 | ||
3250 | //____ analysis, fill histos ___________________________________________________ | |
3251 | ||
3af23c82 | 3252 | if(fQAMode){ |
3253 | // loop over tracks | |
3254 | if(fQAMode&1){ | |
3255 | for(Int_t it=0; it<nRecPart; ++it){ | |
3256 | AliVParticle *part = dynamic_cast<AliVParticle*>(fTracksRec->At(it)); | |
3257 | fQATrackHistosRec->FillTrackQA( part->Eta(), TVector2::Phi_0_2pi(part->Phi()), part->Pt()); | |
3258 | } | |
3259 | for(Int_t it=0; it<nRecPartCuts; ++it){ | |
3260 | AliVParticle *part = dynamic_cast<AliVParticle*>(fTracksRecCuts->At(it)); | |
3261 | fQATrackHistosRecCuts->FillTrackQA( part->Eta(), TVector2::Phi_0_2pi(part->Phi()), part->Pt()); | |
3262 | } | |
3263 | for(Int_t it=0; it<nGenPart; ++it){ | |
3264 | AliVParticle *part = dynamic_cast<AliVParticle*>(fTracksGen->At(it)); | |
3265 | fQATrackHistosGen->FillTrackQA( part->Eta(), TVector2::Phi_0_2pi(part->Phi()), part->Pt()); | |
3266 | } | |
3267 | } | |
656dc810 | 3268 | |
3af23c82 | 3269 | // loop over jets |
3270 | ||
3271 | if(fQAMode&2){ | |
3272 | for(Int_t ij=0; ij<nRecJets; ++ij){ | |
3273 | AliAODJet* jet = dynamic_cast<AliAODJet*>(fJetsRec->At(ij)); | |
3274 | fQAJetHistosRec->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt()); | |
3275 | } | |
3276 | } | |
656dc810 | 3277 | } |
656dc810 | 3278 | |
3af23c82 | 3279 | if(fQAMode || fFFMode || fIJMode || fPhiCorrMode){ |
3280 | for(Int_t ij=0; ij<nRecJetsCuts; ++ij){ | |
656dc810 | 3281 | |
3af23c82 | 3282 | AliAODJet* jet = dynamic_cast<AliAODJet*>(fJetsRecCuts->At(ij)); |
3283 | if(fQAMode&2) fQAJetHistosRecCuts->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt()); | |
656dc810 | 3284 | |
3af23c82 | 3285 | if(ij==0){ // leading jet |
656dc810 | 3286 | |
3af23c82 | 3287 | if(fQAMode&2) fQAJetHistosRecCutsLeading->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt() ); |
656dc810 | 3288 | |
3af23c82 | 3289 | TList* jettracklist = new TList(); |
3290 | Double_t sumPt = 0.; | |
3291 | Float_t leadTrackPt = 0.; | |
3292 | TLorentzVector* leadTrackV = new TLorentzVector(); | |
3293 | ||
3294 | if(GetFFRadius()<=0){ | |
3295 | GetJetTracksTrackrefs(jettracklist, jet); | |
3296 | } else { | |
3297 | GetJetTracksPointing(fTracksRecCuts, jettracklist, jet, GetFFRadius(), sumPt); | |
656dc810 | 3298 | } |
3af23c82 | 3299 | |
3300 | for(Int_t it=0; it<jettracklist->GetSize(); ++it){ | |
3301 | ||
3302 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(jettracklist->At(it)); | |
ab851c96 | 3303 | if(!trackVP)continue; |
3af23c82 | 3304 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); |
3305 | ||
3306 | Float_t jetPt = jet->Pt(); | |
3307 | Float_t trackPt = trackV->Pt(); | |
3308 | ||
3309 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
3310 | ||
3311 | if(fFFMode) fFFHistosRecCuts->FillFF( trackPt, jetPt, incrementJetPt); | |
3312 | if(fIJMode) fIJHistosRecCuts->FillIntraJet( trackV, jet->MomentumVector() ); | |
3313 | ||
3314 | if(it==0){ // leading track | |
3315 | leadTrackPt = trackPt; | |
3316 | leadTrackV->SetPxPyPzE(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
3317 | ||
3318 | if(fFFMode) fFFHistosRecLeadingTrack->FillFF( leadTrackPt, jetPt, kTRUE); | |
3319 | if(fIJMode) fIJHistosRecLeadingTrack->FillIntraJet( leadTrackV, jet->MomentumVector() ); | |
3320 | } | |
3321 | if(fFFMode) fFFHistosRecLeading->FillFF( trackPt, leadTrackPt , incrementJetPt); | |
3322 | if(fIJMode) fIJHistosRecLeading->FillIntraJet( trackV, leadTrackV ); | |
3323 | ||
3324 | delete trackV; | |
3325 | } | |
3326 | ||
1da9498b | 3327 | // ff and ij for background study |
3af23c82 | 3328 | if(fBckgMode){ |
3329 | if(fBckgType[0]!=-1) | |
3330 | FillBckgHistos(fBckgType[0], fTracksRecCuts, fJetsRecCuts, jet, leadTrackPt, leadTrackV, | |
3331 | fFFBckgHisto0RecCuts, fFFBckgHisto0RecLeading, | |
3332 | fIJBckgHisto0RecCuts, fIJBckgHisto0RecLeading, | |
3333 | fQABckgHisto0RecCuts); | |
3334 | if(fBckgType[1]!=-1) | |
3335 | FillBckgHistos(fBckgType[1], fTracksRecCuts, fJetsRecCuts, jet, leadTrackPt, leadTrackV, | |
3336 | fFFBckgHisto1RecCuts, fFFBckgHisto1RecLeading, | |
3337 | fIJBckgHisto1RecCuts, fIJBckgHisto1RecLeading, | |
3338 | fQABckgHisto1RecCuts); | |
3339 | if(fBckgType[2]!=-1) | |
3340 | FillBckgHistos(fBckgType[2], fTracksRecCuts, fJetsRecCuts, jet, leadTrackPt, leadTrackV, | |
3341 | fFFBckgHisto2RecCuts, fFFBckgHisto2RecLeading, | |
3342 | fIJBckgHisto2RecCuts, fIJBckgHisto2RecLeading, | |
3343 | fQABckgHisto2RecCuts); | |
3344 | } // end if(fBckgMode) | |
3345 | ||
3346 | delete leadTrackV; | |
3347 | delete jettracklist; | |
656dc810 | 3348 | |
3af23c82 | 3349 | // phi correlation |
3350 | if(fPhiCorrMode){ | |
3351 | for(Int_t it=0; it<nRecPartCuts; ++it){ | |
3352 | AliVParticle *part = dynamic_cast<AliVParticle*>(fTracksRecCuts->At(it)); | |
3353 | ||
3354 | Float_t partEta = part->Eta(); | |
3355 | Float_t partPhi = part->Phi(); | |
3356 | Float_t partPt = part->Pt(); | |
3357 | ||
3358 | fPhiCorrHistosJetArea->FillTrackQA( partEta, | |
3359 | TVector2::Phi_mpi_pi( jet->Phi() - partPhi ), | |
3360 | partPt, | |
3361 | kTRUE); | |
3362 | ||
3363 | fPhiCorrHistosTransverseArea->FillTrackQA( partEta, | |
3364 | TVector2::Phi_mpi_pi( jet->Phi() - partPhi + TMath::Pi()/2), | |
3365 | partPt, | |
3366 | kTRUE); | |
3367 | ||
3368 | fPhiCorrHistosAwayArea->FillTrackQA( partEta, | |
3369 | TVector2::Phi_mpi_pi( jet->Phi() - partPhi + TMath::Pi()), | |
3370 | partPt, | |
3371 | kTRUE); | |
3372 | } | |
3373 | } // end: phi-correlation | |
3374 | ||
3375 | } // end: leading jet | |
3376 | } // end: rec. jets after cuts | |
656dc810 | 3377 | |
3af23c82 | 3378 | // generated jets |
3379 | for(Int_t ij=0; ij<nGenJets; ++ij){ | |
656dc810 | 3380 | |
3af23c82 | 3381 | AliAODJet* jet = dynamic_cast<AliAODJet*>(fJetsGen->At(ij)); |
ab851c96 | 3382 | if(!jet)continue; |
3af23c82 | 3383 | if(fQAMode&2) fQAJetHistosGen->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt()); |
656dc810 | 3384 | |
3af23c82 | 3385 | if(ij==0){ // leading jet |
cb76764e | 3386 | |
3af23c82 | 3387 | if(fQAMode&2) fQAJetHistosGenLeading->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt()); |
cb76764e | 3388 | |
3af23c82 | 3389 | TList* jettracklist = new TList(); |
3390 | Double_t sumPt = 0.; | |
3391 | Float_t leadTrackPt = 0.; | |
3392 | TLorentzVector* leadTrackV = new TLorentzVector(); | |
656dc810 | 3393 | |
3af23c82 | 3394 | if(GetFFRadius()<=0){ |
3395 | GetJetTracksTrackrefs(jettracklist, jet); | |
3396 | } else { | |
3397 | GetJetTracksPointing(fTracksGen, jettracklist, jet, GetFFRadius(), sumPt); | |
656dc810 | 3398 | } |
3af23c82 | 3399 | |
3400 | for(Int_t it=0; it<jettracklist->GetSize(); ++it){ | |
3401 | ||
3402 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(jettracklist->At(it)); | |
3403 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
3404 | ||
3405 | Float_t jetPt = jet->Pt(); | |
3406 | Float_t trackPt = trackV->Pt(); | |
3407 | ||
3408 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
3409 | ||
3410 | if(fFFMode) fFFHistosGen->FillFF( trackPt, jetPt, incrementJetPt ); | |
3411 | if(fIJMode) fIJHistosGen->FillIntraJet( trackV, jet->MomentumVector() ); | |
3412 | ||
3413 | if(it==0){ // leading track | |
3414 | leadTrackPt = trackPt; | |
3415 | leadTrackV->SetPxPyPzE(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
3416 | ||
3417 | if(fFFMode) fFFHistosGenLeadingTrack->FillFF( leadTrackPt, jetPt, kTRUE ); | |
3418 | if(fIJMode) fIJHistosGenLeadingTrack->FillIntraJet( leadTrackV, jet->MomentumVector() ); | |
3419 | } | |
3420 | if(fFFMode) fFFHistosGenLeading->FillFF( trackPt, leadTrackPt, incrementJetPt ); | |
3421 | if(fIJMode) fIJHistosGenLeading->FillIntraJet( trackV, leadTrackV ); | |
3422 | ||
3423 | delete trackV; | |
3424 | } | |
3425 | ||
3426 | delete leadTrackV; | |
3427 | delete jettracklist; | |
656dc810 | 3428 | } |
656dc810 | 3429 | } |
3af23c82 | 3430 | } // end: QA, FF and intra-jet |
656dc810 | 3431 | |
3432 | //_______ DiJet part _____________________________________________________ | |
3af23c82 | 3433 | if(fDJMode){ |
3434 | if (nRecJetsCuts > 1) | |
656dc810 | 3435 | { |
3af23c82 | 3436 | AliAODJet* jet1 = dynamic_cast<AliAODJet*>(fJetsRecCuts->At(0)); |
3437 | AliAODJet* jet2 = dynamic_cast<AliAODJet*>(fJetsRecCuts->At(1)); | |
656dc810 | 3438 | |
3af23c82 | 3439 | // DiJet deltaphi calculation |
3440 | Double_t phi1 = TVector2::Phi_0_2pi(jet1->Phi()); | |
3441 | Double_t phi2 = TVector2::Phi_0_2pi(jet2->Phi()); | |
3442 | Double_t deltaPhi = TMath::Abs(phi1-phi2); | |
3443 | if (deltaPhi > TMath::Pi() && deltaPhi < 2*TMath::Pi()) deltaPhi = 2*TMath::Pi() - deltaPhi; | |
3444 | ||
3445 | // DiJet CDF cut calculation | |
3446 | Double_t et1 = TMath::Abs(jet1->E()*TMath::Sin(jet1->Theta())); | |
3447 | Double_t et2 = TMath::Abs(jet2->E()*TMath::Sin(jet2->Theta())); | |
3448 | Double_t sumEt = et1 + et2; | |
3449 | Double_t normEt1PlusEt2 = TMath::Sqrt(et1*et1+et2*et2+2*et1*et2*TMath::Cos(deltaPhi)); | |
3450 | Double_t ratio = (Double_t)(normEt1PlusEt2/sumEt); | |
3451 | ||
3452 | // DiJet events selection | |
3453 | Bool_t positionCut = 0; | |
3454 | Bool_t positionEnergyCut = 0; | |
3455 | Bool_t cdfCut = 0; | |
3456 | ||
3457 | // Position cut : | |
3458 | if (deltaPhi > fDiJetDeltaPhiCut) positionCut = 1; | |
3459 | // Position-Energy cut : | |
3460 | if ((deltaPhi > fDiJetDeltaPhiCut) && ((jet2->Pt()) >= fDiJetPtFractionCut*(jet1->Pt()))) positionEnergyCut = 1; | |
3461 | // CDF cut : | |
3462 | if (ratio < fDiJetCDFCut) cdfCut = 1; | |
3463 | ||
3464 | Int_t go = 0; | |
3465 | ||
3466 | if (fDiJetCut == 1 && positionCut == 1) go = 1; | |
3467 | if (fDiJetCut == 2 && positionEnergyCut == 1) go = 1; | |
3468 | if (fDiJetCut == 3 && cdfCut == 1) go = 1; | |
3469 | ||
3470 | if (go) | |
656dc810 | 3471 | { |
3af23c82 | 3472 | Double_t deltaEta = TMath::Abs(jet1->Eta()-jet2->Eta()); |
3473 | Double_t deltaPt = TMath::Abs(jet1->Pt()-jet2->Pt()); | |
3474 | Double_t inbal = (jet1->Pt()-jet2->Pt())/(jet1->Pt()+jet2->Pt()); | |
3475 | Double_t meanEt = (Double_t)((et1+et2)/2.); | |
3476 | Double_t invariantMass = (Double_t)InvMass(jet1,jet2); | |
656dc810 | 3477 | |
3af23c82 | 3478 | Double_t jetBin = GetDiJetBin(invariantMass, jet1->Pt(), meanEt, fDiJetKindBins); |
656dc810 | 3479 | |
3af23c82 | 3480 | if (jetBin > 0) |
656dc810 | 3481 | { |
3af23c82 | 3482 | if(fDJMode&2) fQADiJetHistosRecCuts->FillDiJetQA(invariantMass, deltaPhi, deltaEta, deltaPt, inbal, jetBin); |
3483 | ||
3484 | if(fDJMode&1){ | |
3485 | TList* jettracklist1 = new TList(); | |
3486 | Double_t sumPt1 = 0.; | |
3487 | Float_t leadTrackPt1 = 0; | |
3488 | ||
3489 | TList* jettracklist2 = new TList(); | |
3490 | Double_t sumPt2 = 0.; | |
3491 | Float_t leadTrackPt2 = 0; | |
3492 | ||
3493 | if(GetFFRadius()<=0) | |
3494 | { | |
3495 | GetJetTracksTrackrefs(jettracklist1, jet1); | |
3496 | GetJetTracksTrackrefs(jettracklist2, jet2); | |
3497 | } | |
3498 | else | |
3499 | { | |
3500 | GetJetTracksPointing(fTracksRecCuts, jettracklist1, jet1, GetFFRadius(), sumPt1); | |
3501 | GetJetTracksPointing(fTracksRecCuts, jettracklist2, jet2, GetFFRadius(), sumPt2); | |
3502 | } | |
3503 | ||
3504 | Int_t nTracks = jettracklist1->GetSize(); | |
3505 | if (jettracklist1->GetSize() < jettracklist2->GetSize()) nTracks = jettracklist2->GetSize(); | |
3506 | ||
3507 | for(Int_t it=0; it<nTracks; ++it) | |
3508 | { | |
3509 | if (it < jettracklist1->GetSize()) | |
3510 | { | |
ab851c96 | 3511 | AliVParticle *vp = (dynamic_cast<AliVParticle*> (jettracklist1->At(it))); |
3512 | Float_t trackPt1 = (vp?vp->Pt():0); | |
3af23c82 | 3513 | Float_t jetPt1 = jet1->Pt(); |
3514 | ||
3515 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
3516 | ||
3517 | fFFDiJetHistosRecCuts->FillDiJetFF(1, trackPt1, jetPt1, jetBin, incrementJetPt); | |
3518 | fFFDiJetHistosRecCuts->FillDiJetFF(0, trackPt1, jetPt1, jetBin, incrementJetPt); | |
3519 | ||
3520 | if (it == 0) | |
3521 | { | |
3522 | leadTrackPt1 = trackPt1; | |
3523 | ||
3524 | fFFDiJetHistosRecLeadingTrack->FillDiJetFF(1, leadTrackPt1, jetPt1, jetBin, kTRUE); | |
3525 | fFFDiJetHistosRecLeadingTrack->FillDiJetFF(0, leadTrackPt1, jetPt1, jetBin, kTRUE); | |
3526 | } | |
3527 | ||
3528 | fFFDiJetHistosRecLeading->FillDiJetFF(1, trackPt1, leadTrackPt1, jetBin, incrementJetPt); | |
3529 | fFFDiJetHistosRecLeading->FillDiJetFF(0, trackPt1, leadTrackPt1, jetBin, incrementJetPt); | |
3530 | } | |
3531 | ||
3532 | if (it < jettracklist2->GetSize()) | |
3533 | { | |
3534 | Float_t trackPt2 = (dynamic_cast<AliVParticle*>(jettracklist2->At(it)))->Pt(); | |
3535 | Float_t jetPt2 = jet2->Pt(); | |
3536 | ||
3537 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
3538 | ||
3539 | fFFDiJetHistosRecCuts->FillDiJetFF(2, trackPt2, jetPt2, jetBin, incrementJetPt); | |
3540 | fFFDiJetHistosRecCuts->FillDiJetFF(0, trackPt2, jetPt2, jetBin, incrementJetPt); | |
3541 | ||
3542 | if (it == 0) | |
3543 | { | |
3544 | leadTrackPt2 = trackPt2; | |
3545 | ||
3546 | fFFDiJetHistosRecLeadingTrack->FillDiJetFF(2, leadTrackPt2, jetPt2, jetBin, kTRUE); | |
3547 | fFFDiJetHistosRecLeadingTrack->FillDiJetFF(0, leadTrackPt2, jetPt2, jetBin, kTRUE); | |
3548 | } | |
3549 | ||
3550 | fFFDiJetHistosRecLeading->FillDiJetFF(2, trackPt2, leadTrackPt2, jetBin, incrementJetPt); | |
3551 | fFFDiJetHistosRecLeading->FillDiJetFF(0, trackPt2, leadTrackPt2, jetBin, incrementJetPt); | |
3552 | } | |
3553 | } // End loop on tracks | |
3554 | ||
3555 | delete jettracklist1; | |
3556 | delete jettracklist2; | |
3557 | } | |
3558 | } // End if(jetBin > 0) | |
3559 | else { Printf("Jet bins for di-jet studies not set !");} | |
3560 | } // End if(go) | |
3561 | } // End if(nRecJets > 1) | |
3562 | ||
3563 | if (nGenJets > 1) | |
3564 | { | |
3565 | AliAODJet* jet1 = dynamic_cast<AliAODJet*>(fJetsGen->At(0)); | |
3566 | AliAODJet* jet2 = dynamic_cast<AliAODJet*>(fJetsGen->At(1)); | |
ab851c96 | 3567 | if(jet1&&jet2){ |
3af23c82 | 3568 | |
3569 | Double_t deltaPhi = 0; | |
3570 | Double_t phi1 = TVector2::Phi_0_2pi(jet1->Phi()); | |
3571 | Double_t phi2 = TVector2::Phi_0_2pi(jet2->Phi()); | |
3572 | deltaPhi = TMath::Abs(phi1-phi2); | |
3573 | if (deltaPhi > TMath::Pi() && deltaPhi < 2*TMath::Pi()) deltaPhi = 2*TMath::Pi() - deltaPhi; | |
3574 | ||
3575 | Double_t et1 = TMath::Abs(jet1->E()*TMath::Sin(jet1->Theta())); | |
3576 | Double_t et2 = TMath::Abs(jet2->E()*TMath::Sin(jet2->Theta())); | |
3577 | Double_t sumEt = et1 + et2; | |
3578 | Double_t normEt1PlusEt2 = TMath::Sqrt(et1*et1+et2*et2+2*et1*et2*TMath::Cos(deltaPhi)); | |
3579 | Double_t ratio = (Double_t)(normEt1PlusEt2/sumEt); | |
3580 | ||
3581 | // DiJet events selection | |
3582 | Bool_t positionCut = 0; | |
3583 | Bool_t positionEnergyCut = 0; | |
3584 | Bool_t cdfCut = 0; | |
3585 | ||
3586 | // Position cut : | |
3587 | if (deltaPhi > fDiJetDeltaPhiCut) positionCut = 1; | |
3588 | // Position-Energy cut : | |
3589 | if ((deltaPhi > fDiJetDeltaPhiCut) && ((jet2->Pt()) >= fDiJetPtFractionCut*(jet1->Pt()))) positionEnergyCut = 1; | |
3590 | // CDF cut : | |
3591 | if (ratio < fDiJetCDFCut) cdfCut = 1; | |
3592 | ||
3593 | Int_t go = 0; | |
3594 | ||
3595 | if (fDiJetCut == 1 && positionCut == 1) go = 1; | |
3596 | if (fDiJetCut == 2 && positionEnergyCut == 1) go = 1; | |
3597 | if (fDiJetCut == 3 && cdfCut == 1) go = 1; | |
3598 | ||
3599 | if (go) | |
3600 | { | |
3601 | Double_t deltaEta = TMath::Abs(jet1->Eta()-jet2->Eta()); | |
3602 | Double_t deltaPt = TMath::Abs(jet1->Pt()-jet2->Pt()); | |
3603 | Double_t inbal = (jet1->Pt()-jet2->Pt())/(jet1->Pt()+jet2->Pt()); | |
3604 | Double_t meanEt = (Double_t)((et1+et2)/2.); | |
3605 | Double_t invariantMass = (Double_t)InvMass(jet1,jet2); | |
656dc810 | 3606 | |
3af23c82 | 3607 | Double_t jetBin = GetDiJetBin(invariantMass, jet1->Pt(), meanEt, fDiJetKindBins); |
656dc810 | 3608 | |
3af23c82 | 3609 | if(jetBin > 0) |
656dc810 | 3610 | { |
3af23c82 | 3611 | if(fDJMode&2) fQADiJetHistosGen->FillDiJetQA(invariantMass, deltaPhi, deltaEta, deltaPt, inbal, jetBin); |
656dc810 | 3612 | |
3af23c82 | 3613 | if(fDJMode&1){ |
3614 | TList* jettracklist1 = new TList(); | |
3615 | Double_t sumPt1 = 0.; | |
3616 | Float_t leadTrackPt1 = 0.; | |
3617 | ||
3618 | TList* jettracklist2 = new TList(); | |
3619 | Double_t sumPt2 = 0.; | |
3620 | Float_t leadTrackPt2 = 0.; | |
3621 | ||
3622 | if(GetFFRadius()<=0) | |
3623 | { | |
3624 | GetJetTracksTrackrefs(jettracklist1, jet1); | |
3625 | GetJetTracksTrackrefs(jettracklist2, jet2); | |
3626 | } | |
3627 | else | |
3628 | { | |
3629 | GetJetTracksPointing(fTracksGen, jettracklist1, jet1, GetFFRadius(), sumPt1); | |
3630 | GetJetTracksPointing(fTracksGen, jettracklist2, jet2, GetFFRadius(), sumPt2); | |
3631 | } | |
3632 | ||
3633 | Int_t nTracks = jettracklist1->GetSize(); | |
3634 | if (jettracklist1->GetSize() < jettracklist2->GetSize()) nTracks = jettracklist2->GetSize(); | |
3635 | ||
3636 | for(Int_t it=0; it<nTracks; ++it) | |
3637 | { | |
3638 | if (it < jettracklist1->GetSize()) | |
3639 | { | |
3640 | Float_t trackPt1 = (dynamic_cast<AliVParticle*>(jettracklist1->At(it)))->Pt(); | |
3641 | Float_t jetPt1 = jet1->Pt(); | |
3642 | ||
3643 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
3644 | ||
3645 | fFFDiJetHistosGen->FillDiJetFF( 1, trackPt1, jetPt1, jetBin, incrementJetPt); | |
3646 | fFFDiJetHistosGen->FillDiJetFF( 0, trackPt1, jetPt1, jetBin, incrementJetPt); | |
3647 | ||
3648 | if(it==0) | |
3649 | { | |
3650 | leadTrackPt1 = trackPt1; | |
3651 | ||
3652 | fFFDiJetHistosGenLeadingTrack->FillDiJetFF( 1, leadTrackPt1, jetPt1, jetBin, kTRUE); | |
3653 | fFFDiJetHistosGenLeadingTrack->FillDiJetFF( 0, leadTrackPt1, jetPt1, jetBin, kTRUE); | |
3654 | } | |
3655 | ||
3656 | fFFDiJetHistosGenLeading->FillDiJetFF( 1, trackPt1, leadTrackPt1, jetBin, incrementJetPt); | |
3657 | fFFDiJetHistosGenLeading->FillDiJetFF( 0, trackPt1, leadTrackPt1, jetBin, incrementJetPt); | |
3658 | } | |
3659 | ||
3660 | if (it < jettracklist2->GetSize()) | |
3661 | { | |
3662 | Float_t trackPt2 = (dynamic_cast<AliVParticle*>(jettracklist2->At(it)))->Pt(); | |
3663 | Float_t jetPt2 = jet2->Pt(); | |
3664 | ||
3665 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
3666 | ||
3667 | fFFDiJetHistosGen->FillDiJetFF( 2, trackPt2, jetPt2, jetBin, incrementJetPt); | |
3668 | fFFDiJetHistosGen->FillDiJetFF( 0, trackPt2, jetPt2, jetBin, incrementJetPt); | |
3669 | ||
3670 | if (it==0) | |
3671 | { | |
3672 | leadTrackPt2 = trackPt2; | |
3673 | ||
3674 | fFFDiJetHistosGenLeadingTrack->FillDiJetFF( 2, leadTrackPt2, jetPt2, jetBin, kTRUE); | |
3675 | fFFDiJetHistosGenLeadingTrack->FillDiJetFF( 0, leadTrackPt2, jetPt2, jetBin, kTRUE); | |
3676 | } | |
3677 | ||
3678 | fFFDiJetHistosGenLeading->FillDiJetFF( 2, trackPt2, leadTrackPt2, jetBin, incrementJetPt); | |
3679 | fFFDiJetHistosGenLeading->FillDiJetFF( 0, trackPt2, leadTrackPt2, jetBin, incrementJetPt); | |
3680 | } | |
3681 | } // End loop on tracks | |
3682 | ||
3683 | delete jettracklist1; | |
3684 | delete jettracklist2; | |
3685 | } | |
3686 | } // End if(jetBin > 0) | |
3687 | else { Printf("Jet bins for di-jet studies not set !");} | |
3688 | } // End if (go) | |
ab851c96 | 3689 | }// end if jet1 and jet2 |
3af23c82 | 3690 | } // End if(nGenJets > 1) |
3691 | } // end: di-jet | |
656dc810 | 3692 | |
fe343c6b | 3693 | // ____ efficiency _______________________________ |
3694 | ||
3af23c82 | 3695 | if(fEffMode && (fJetTypeRecEff != kJetsUndef)){ |
cb76764e | 3696 | |
3697 | // arrays for generated particles: reconstructed AOD track index, isPrimary flag, are initialized in AssociateGenRec(...) function | |
3698 | TArrayI indexAODTr; | |
3699 | TArrayS isGenPrim; | |
fe343c6b | 3700 | |
cb76764e | 3701 | // array for reconcstructed AOD tracks: generated particle index, initialized in AssociateGenRec(...) function |
3702 | TArrayI indexMCTr; | |
fe343c6b | 3703 | |
cb76764e | 3704 | Int_t nTracksAODMCCharged = GetListOfTracks(fTracksAODMCCharged, kTrackAODMCCharged); |
3705 | if(fDebug>2)Printf("%s:%d selected AODMC tracks: %d ",(char*)__FILE__,__LINE__,nTracksAODMCCharged); | |
fe343c6b | 3706 | |
cb76764e | 3707 | Int_t nTracksRecQualityCuts = GetListOfTracks(fTracksRecQualityCuts, kTrackAODQualityCuts); |
3708 | if(fDebug>2)Printf("%s:%d selected rec tracks quality after cuts, full acceptance/pt : %d ",(char*)__FILE__,__LINE__,nTracksRecQualityCuts); | |
fe343c6b | 3709 | |
cb76764e | 3710 | // associate gen and rec tracks, store indices in TArrays |
3711 | AssociateGenRec(fTracksAODMCCharged,fTracksRecQualityCuts,indexAODTr,indexMCTr,isGenPrim); | |
fe343c6b | 3712 | |
cb76764e | 3713 | // single track eff |
3af23c82 | 3714 | if(fQAMode&1) FillSingleTrackRecEffHisto(fQATrackHistosRecEffGen,fQATrackHistosRecEffRec,fTracksAODMCCharged,indexAODTr,isGenPrim); |
3715 | if(fQAMode&1) FillSingleTrackResponse(fhnResponseSinglePt,fTracksAODMCCharged,fTracksRecQualityCuts,indexAODTr,isGenPrim); | |
3716 | ||
fe343c6b | 3717 | |
cb76764e | 3718 | // jet track eff |
fe343c6b | 3719 | |
cb76764e | 3720 | Double_t sumPtGenLeadingJetRecEff = 0; |
3721 | Double_t sumPtRecLeadingJetRecEff = 0; | |
fe343c6b | 3722 | |
cb76764e | 3723 | for(Int_t ij=0; ij<nRecEffJets; ++ij){ |
3724 | ||
3725 | AliAODJet* jet = dynamic_cast<AliAODJet*>(fJetsRecEff->At(ij)); | |
fe343c6b | 3726 | |
cb76764e | 3727 | if(ij==0){ // leading jet |
3728 | ||
3729 | TList* jettracklistGen = new TList(); | |
3730 | GetJetTracksPointing(fTracksGen, jettracklistGen, jet, GetFFRadius(), sumPtGenLeadingJetRecEff); // for efficiency: gen tracks from pointing with gen/rec jet | |
3731 | ||
3732 | TList* jettracklistRec = new TList(); | |
3733 | GetJetTracksPointing(fTracksRecCuts,jettracklistRec, jet, GetFFRadius(), sumPtRecLeadingJetRecEff); // bin efficiency in jet pt bins using rec tracks | |
3734 | ||
3735 | Double_t jetEta = jet->Eta(); | |
3736 | Double_t jetPhi = TVector2::Phi_0_2pi(jet->Phi()); | |
3737 | ||
3af23c82 | 3738 | if(fQAMode&2) fQAJetHistosRecEffLeading->FillJetQA( jetEta, jetPhi, sumPtGenLeadingJetRecEff ); |
3739 | ||
3740 | if(fFFMode) FillJetTrackRecEffHisto(fFFHistosRecEffGen,fFFHistosRecEffRec,sumPtGenLeadingJetRecEff,sumPtRecLeadingJetRecEff, | |
3741 | jettracklistGen,fTracksAODMCCharged,indexAODTr,isGenPrim,fUseRecEffRecJetPtBins); | |
3742 | ||
3743 | if(fFFMode) FillJetTrackResponse(fhnResponseJetTrackPt,fhnResponseJetZ,fhnResponseJetXi,sumPtGenLeadingJetRecEff,sumPtRecLeadingJetRecEff, | |
3744 | jettracklistGen,fTracksAODMCCharged,fTracksRecQualityCuts,indexAODTr,isGenPrim,fUseRecEffRecJetPtBins); | |
cb76764e | 3745 | |
cb76764e | 3746 | delete jettracklistGen; |
3747 | delete jettracklistRec; | |
3748 | } | |
3749 | } | |
3750 | ||
2d1d1b60 | 3751 | |
cb76764e | 3752 | // bckgr eff: complementary cones |
2d1d1b60 | 3753 | |
cb76764e | 3754 | if(0){ |
3755 | ||
3756 | for(Int_t ij=0; ij<nRecEffJets; ++ij){ | |
3757 | ||
3758 | AliAODJet* jet = dynamic_cast<AliAODJet*>(fJetsRecEff->At(ij)); | |
3759 | ||
3760 | if(ij==0){ // leading jet | |
3761 | ||
3762 | TList* perpjettracklistGen = new TList(); | |
3763 | Double_t sumPtGen = 0.; | |
3764 | ||
3af23c82 | 3765 | GetTracksTiltedwrpJetAxis(TMath::Pi()/2.,fTracksGen, perpjettracklistGen, jet, GetFFBckgRadius() , sumPtGen); // for efficiency: gen tracks perp to gen/rec jet |
cb76764e | 3766 | |
3767 | // here could be your histos !!! | |
3768 | // FillJetTrackRecEffHisto(fFFBckgrPerpHistosRecEffGen,fFFBckgrPerpHistosRecEffRec,sumPtGenLeadingJetRecEff,sumPtRecLeadingJetRecEff,perpjettracklistGen, | |
3769 | // fTracksAODMCCharged,indexAODTr,isGenPrim,fUseRecEffRecJetPtBins); | |
3770 | ||
3771 | delete perpjettracklistGen; | |
3772 | } | |
3773 | } | |
3774 | } | |
2d1d1b60 | 3775 | |
cb76764e | 3776 | // bgr eff: outside N leading jets |
2d1d1b60 | 3777 | |
cb76764e | 3778 | if(0){ |
fe343c6b | 3779 | |
cb76764e | 3780 | Int_t nCases = 1; |
fe343c6b | 3781 | |
cb76764e | 3782 | TList* outjettracklistGen = new TList(); |
3783 | Double_t sumPtGen = 0.; | |
3784 | ||
3af23c82 | 3785 | GetTracksOutOfNJets(nCases, fTracksGen, outjettracklistGen, fJetsRecEff, sumPtGen); // for efficiency: gen tracks outide n gen/rec jets |
cb76764e | 3786 | |
3787 | // here could be your histos !!! | |
3788 | // FillJetTrackRecEffHisto(fFFBckgrOutHistosRecEffGen,fFFBckgrOutHistosRecEffRec,sumPtGenLeadingJetRecEff,sumPtRecLeadingJetRecEff, | |
3789 | // outjettracklistGen,fTracksAODMCCharged,indexAODTr,isGenPrim,fUseRecEffRecJetPtBins); | |
fe343c6b | 3790 | |
cb76764e | 3791 | delete outjettracklistGen; |
fe343c6b | 3792 | } |
cb76764e | 3793 | } |
3794 | ||
fe343c6b | 3795 | //___________________ |
3796 | ||
656dc810 | 3797 | fTracksRec->Clear(); |
3798 | fTracksRecCuts->Clear(); | |
3799 | fTracksGen->Clear(); | |
fe343c6b | 3800 | fTracksAODMCCharged->Clear(); |
3801 | fTracksRecQualityCuts->Clear(); | |
3802 | ||
656dc810 | 3803 | fJetsRec->Clear(); |
3804 | fJetsRecCuts->Clear(); | |
3805 | fJetsGen->Clear(); | |
fe343c6b | 3806 | fJetsRecEff->Clear(); |
656dc810 | 3807 | |
67e37e80 | 3808 | if(fBckgMode && (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters)){ |
3809 | fBckgJetsRec->Clear(); | |
3810 | fBckgJetsRecCuts->Clear(); | |
3811 | fBckgJetsGen->Clear(); | |
3812 | } | |
3813 | ||
656dc810 | 3814 | //Post output data. |
3815 | PostData(1, fCommonHistList); | |
3816 | ||
3817 | } | |
3818 | ||
3819 | //________________________________________________________________________________________ | |
fceb275f | 3820 | Double_t AliAnalysisTaskFragmentationFunction::InvMass(const AliAODJet* jet1, const AliAODJet* jet2) |
656dc810 | 3821 | { |
fceb275f | 3822 | // cald DiJet inv mass |
656dc810 | 3823 | |
3824 | Double_t invMass = 0.; | |
3825 | invMass = TMath::Sqrt(pow(jet1->E()+jet2->E(),2) - pow(jet1->Px()+jet2->Px(),2) - | |
3826 | pow(jet1->Py()+jet2->Py(),2) - pow(jet1->Pz()+jet2->Pz(),2)); | |
3827 | ||
3828 | return invMass; | |
3829 | ||
3830 | } | |
3831 | ||
3832 | //________________________________________________________________________________________ | |
3833 | Double_t AliAnalysisTaskFragmentationFunction::GetDiJetBin(Double_t invMass, Double_t leadingJetPt, Double_t EtMean, Int_t kindBins) | |
3834 | { | |
fceb275f | 3835 | // calc DiJet bin according to kindBins parameter |
3836 | ||
656dc810 | 3837 | Double_t jetBinOk = 0.; |
3838 | Double_t jetBin = 0.; | |
3839 | ||
3840 | Float_t stepInvMass = (fDiJetJetInvMassMax - fDiJetJetInvMassMin)/fDiJetNBinsJetInvMass; | |
3841 | Float_t stepPt = (fDiJetJetPtMax - fDiJetJetPtMin)/fDiJetNBinsJetPt; | |
3842 | ||
3843 | if (kindBins == 1) | |
3844 | { | |
3845 | for(Int_t i=0; i<fDiJetNBinsJetInvMass; ++i) | |
3846 | { | |
656457c9 | 3847 | jetBin = fDiJetJetInvMassMin + i*stepInvMass + stepInvMass/2.; |
656dc810 | 3848 | if(((fDiJetJetInvMassMin+i*stepInvMass) <= invMass) && |
190d081e | 3849 | (fDiJetJetInvMassMin + (i+1)*stepInvMass) > invMass) {jetBinOk = jetBin; break;} |
3850 | else jetBinOk = -1.; | |
656dc810 | 3851 | } |
656dc810 | 3852 | } |
3853 | else if (kindBins == 3) | |
3854 | { | |
3855 | for(Int_t i=0; i<fDiJetNBinsJetPt; ++i) | |
3856 | { | |
656457c9 | 3857 | jetBin = fDiJetJetPtMin + i*stepPt + stepPt/2.; |
656dc810 | 3858 | if(((fDiJetJetPtMin+i*stepPt) <= EtMean) && |
190d081e | 3859 | (fDiJetJetPtMin + (i+1)*stepPt) > EtMean) {jetBinOk = jetBin; break;} |
3860 | else jetBinOk = -1.; | |
656dc810 | 3861 | } |
656dc810 | 3862 | } |
3863 | else if (kindBins == 2) | |
3864 | { | |
3865 | for(Int_t i=0; i<fDiJetNBinsJetPt; ++i) | |
3866 | { | |
656457c9 | 3867 | jetBin = fDiJetJetPtMin + i*stepPt + stepPt/2.; |
656dc810 | 3868 | if(((fDiJetJetPtMin+i*stepPt) <= leadingJetPt) && |
190d081e | 3869 | (fDiJetJetPtMin + (i+1)*stepPt) > leadingJetPt) {jetBinOk = jetBin; break;} |
3870 | else jetBinOk = -1.; | |
656dc810 | 3871 | } |
656dc810 | 3872 | } |
3873 | else {Printf("WARNING: kindBins wrongly set ! Please make sure to call SetKindSlices() and set the kind parameter to 1, 2 or 3.\n");} | |
3874 | ||
3875 | return jetBinOk; | |
3876 | ||
3877 | } | |
3878 | ||
3879 | ||
3880 | //______________________________________________________________ | |
3881 | void AliAnalysisTaskFragmentationFunction::Terminate(Option_t *) | |
3882 | { | |
3883 | // terminated | |
3884 | ||
3885 | if(fDebug > 1) printf("AliAnalysisTaskFragmentationFunction::Terminate() \n"); | |
3886 | } | |
3887 | ||
3888 | //_________________________________________________________________________________ | |
3889 | Int_t AliAnalysisTaskFragmentationFunction::GetListOfTracks(TList *list, Int_t type) | |
3890 | { | |
3891 | // fill list of tracks selected according to type | |
3892 | ||
3893 | if(fDebug > 2) Printf("%s:%d Selecting tracks with %d", (char*)__FILE__,__LINE__,type); | |
3894 | ||
3895 | if(!list){ | |
3896 | if(fDebug>1) Printf("%s:%d no input list", (char*)__FILE__,__LINE__); | |
3897 | return -1; | |
3898 | } | |
3899 | ||
ab851c96 | 3900 | if(!fAOD) return -1; |
3901 | ||
3af23c82 | 3902 | if(!fAOD->GetTracks()) return 0; |
3903 | ||
656dc810 | 3904 | if(type==kTrackUndef) return 0; |
3905 | ||
3906 | Int_t iCount = 0; | |
190d081e | 3907 | if(type==kTrackAODCuts || type==kTrackAODQualityCuts || type==kTrackAOD){ |
656dc810 | 3908 | |
3909 | // all rec. tracks, esd filter mask, eta range | |
ab851c96 | 3910 | |
656dc810 | 3911 | |
3912 | for(Int_t it=0; it<fAOD->GetNumberOfTracks(); ++it){ | |
3913 | AliAODTrack *tr = fAOD->GetTrack(it); | |
3914 | ||
190d081e | 3915 | if(type == kTrackAODCuts || type==kTrackAODQualityCuts ){ |
656dc810 | 3916 | if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask))) continue; |
190d081e | 3917 | if(type == kTrackAODCuts){ |
3918 | if(tr->Eta() < fTrackEtaMin || tr->Eta() > fTrackEtaMax) continue; | |
3919 | if(tr->Phi() < fTrackPhiMin || tr->Phi() > fTrackPhiMax) continue; | |
3920 | if(tr->Pt() < fTrackPtCut) continue; | |
3921 | } | |
656dc810 | 3922 | } |
3923 | list->Add(tr); | |
3924 | iCount++; | |
3925 | } | |
3926 | } | |
3927 | else if (type==kTrackKineAll || type==kTrackKineCharged || type==kTrackKineChargedAcceptance){ | |
3928 | // kine particles, all or rather charged | |
3929 | if(!fMCEvent) return iCount; | |
3930 | ||
3931 | for(Int_t it=0; it<fMCEvent->GetNumberOfTracks(); ++it){ | |
3932 | AliMCParticle* part = (AliMCParticle*) fMCEvent->GetTrack(it); | |
3933 | ||
3934 | if(type == kTrackKineCharged || type == kTrackKineChargedAcceptance){ | |
3935 | if(part->Charge()==0) continue; | |
3936 | ||
3937 | if(type == kTrackKineChargedAcceptance && | |
3938 | ( part->Eta() < fTrackEtaMin | |
3939 | || part->Eta() > fTrackEtaMax | |
3940 | || part->Phi() < fTrackPhiMin | |
3941 | || part->Phi() > fTrackPhiMax | |
3942 | || part->Pt() < fTrackPtCut)) continue; | |
3943 | } | |
3944 | ||
3945 | list->Add(part); | |
3946 | iCount++; | |
3947 | } | |
3948 | } | |
3949 | else if (type==kTrackAODMCCharged || type==kTrackAODMCAll || type==kTrackAODMCChargedAcceptance) { | |
3950 | // MC particles (from AOD), physical primaries, all or rather charged or rather charged within acceptance | |
3951 | if(!fAOD) return -1; | |
3952 | ||
3953 | TClonesArray *tca = dynamic_cast<TClonesArray*>(fAOD->FindListObject(AliAODMCParticle::StdBranchName())); | |
3954 | if(!tca)return iCount; | |
3955 | ||
3956 | for(int it=0; it<tca->GetEntriesFast(); ++it){ | |
3957 | AliAODMCParticle *part = dynamic_cast<AliAODMCParticle*>(tca->At(it)); | |
ab851c96 | 3958 | if(!part)continue; |
656dc810 | 3959 | if(!part->IsPhysicalPrimary())continue; |
3960 | ||
3961 | if (type==kTrackAODMCCharged || type==kTrackAODMCChargedAcceptance){ | |
3962 | if(part->Charge()==0) continue; | |
3963 | if(type==kTrackAODMCChargedAcceptance && | |
3964 | ( part->Eta() > fTrackEtaMax | |
3965 | || part->Eta() < fTrackEtaMin | |
3966 | || part->Phi() > fTrackPhiMax | |
3967 | || part->Phi() < fTrackPhiMin | |
3968 | || part->Pt() < fTrackPtCut)) continue; | |
3969 | } | |
3970 | ||
3971 | list->Add(part); | |
3972 | iCount++; | |
3973 | } | |
3974 | } | |
3975 | ||
3976 | list->Sort(); | |
3977 | return iCount; | |
3978 | ||
3979 | } | |
3980 | // _______________________________________________________________________________ | |
3981 | Int_t AliAnalysisTaskFragmentationFunction::GetListOfJets(TList *list, Int_t type) | |
3982 | { | |
3983 | // fill list of jets selected according to type | |
3af23c82 | 3984 | |
656dc810 | 3985 | if(!list){ |
3986 | if(fDebug>1) Printf("%s:%d no input list", (char*)__FILE__,__LINE__); | |
3987 | return -1; | |
3988 | } | |
3989 | ||
3990 | if(type == kJetsRec || type == kJetsRecAcceptance){ // reconstructed jets | |
3991 | ||
3992 | if(fBranchRecJets.Length()==0){ | |
3993 | Printf("%s:%d no rec jet branch specified", (char*)__FILE__,__LINE__); | |
3994 | if(fDebug>1)fAOD->Print(); | |
3995 | return 0; | |
3996 | } | |
3997 | ||
cb76764e | 3998 | TClonesArray *aodRecJets = 0; |
3af23c82 | 3999 | if(fBranchRecJets.Length()) aodRecJets = dynamic_cast<TClonesArray*>(fAOD->FindListObject(fBranchRecJets.Data())); |
4000 | if(!aodRecJets) aodRecJets = dynamic_cast<TClonesArray*>(fAOD->GetList()->FindObject(fBranchRecJets.Data())); | |
656dc810 | 4001 | |
4002 | if(!aodRecJets){ | |
4003 | if(fBranchRecJets.Length()) Printf("%s:%d no reconstructed jet array with name %s in AOD", (char*)__FILE__,__LINE__,fBranchRecJets.Data()); | |
4004 | ||
4005 | if(fDebug>1)fAOD->Print(); | |
4006 | return 0; | |
4007 | } | |
4008 | ||
3af23c82 | 4009 | // Reorder jet pt and fill new temporary AliAODJet objects |
656dc810 | 4010 | Int_t nRecJets = 0; |
4011 | ||
4012 | for(Int_t ij=0; ij<aodRecJets->GetEntries(); ++ij){ | |
4013 | ||
4014 | AliAODJet *tmp = dynamic_cast<AliAODJet*>(aodRecJets->At(ij)); | |
4015 | if(!tmp) continue; | |
3af23c82 | 4016 | |
656dc810 | 4017 | if( tmp->Pt() < fJetPtCut ) continue; |
4018 | if( type == kJetsRecAcceptance && | |
4019 | ( tmp->Eta() < fJetEtaMin | |
4020 | || tmp->Eta() > fJetEtaMax | |
4021 | || tmp->Phi() < fJetPhiMin | |
4022 | || tmp->Phi() > fJetPhiMax )) continue; | |
656dc810 | 4023 | |
3af23c82 | 4024 | if(!fBranchRecJets.Contains("UA1") && |
4025 | fBranchRecJets.Contains("KT")) { | |
4026 | ||
4027 | AliAODJet *tmpJet = GetAODBckgSubJet(tmp, fBckgSubMethod); | |
4028 | ||
4029 | if(!tmpJet) continue; | |
cb76764e | 4030 | |
3af23c82 | 4031 | list->Add(tmpJet); |
4032 | ||
4033 | nRecJets++; | |
4034 | } | |
4035 | else { | |
4036 | list->Add(tmp); | |
4037 | ||
4038 | nRecJets++; | |
4039 | } | |
4040 | } | |
4041 | ||
4042 | list->Sort(); | |
4043 | ||
656dc810 | 4044 | return nRecJets; |
656dc810 | 4045 | } |
4046 | else if(type == kJetsKine || type == kJetsKineAcceptance){ | |
4047 | ||
4048 | // generated jets | |
4049 | Int_t nGenJets = 0; | |
4050 | ||
4051 | if(!fMCEvent){ | |
4052 | if(fDebug>1) Printf("%s:%d no mcEvent",(char*)__FILE__,__LINE__); | |
4053 | return 0; | |
4054 | } | |
5fde4a38 | 4055 | |
4056 | AliGenEventHeader* genHeader = fMCEvent->GenEventHeader(); | |
4057 | AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader); | |
4058 | AliGenHijingEventHeader* hijingGenHeader = 0x0; | |
4059 | ||
656dc810 | 4060 | if(!pythiaGenHeader){ |
5fde4a38 | 4061 | hijingGenHeader = dynamic_cast<AliGenHijingEventHeader*>(genHeader); |
4062 | ||
4063 | if(!hijingGenHeader){ | |
4064 | Printf("%s:%d no pythiaGenHeader or hijingGenHeader found", (char*)__FILE__,__LINE__); | |
4065 | return 0; | |
4066 | }else{ | |
4067 | TLorentzVector mom[4]; | |
4068 | AliAODJet* jet[4]; | |
4069 | hijingGenHeader->GetJets(mom[0], mom[1], mom[2], mom[3]); | |
4070 | ||
4071 | for(Int_t i=0; i<2; ++i){ | |
4072 | if(!mom[i].Pt()) continue; | |
4073 | jet[i] = new AliAODJet(mom[i]); | |
4074 | ||
4075 | if( type == kJetsKineAcceptance && | |
4076 | ( jet[i]->Eta() < fJetEtaMin | |
4077 | || jet[i]->Eta() > fJetEtaMax | |
4078 | || jet[i]->Phi() < fJetPhiMin | |
4079 | || jet[i]->Phi() > fJetPhiMax )) continue; | |
4080 | ||
4081 | list->Add(jet[i]); | |
4082 | nGenJets++; | |
4083 | } | |
4084 | list->Sort(); | |
4085 | return nGenJets; | |
4086 | } | |
656dc810 | 4087 | } |
4088 | ||
4089 | // fetch the pythia generated jets | |
4090 | for(int ip=0; ip<pythiaGenHeader->NTriggerJets(); ++ip){ | |
4091 | ||
4092 | Float_t p[4]; | |
4093 | AliAODJet *jet = new AliAODJet(); | |
4094 | pythiaGenHeader->TriggerJet(ip, p); | |
4095 | jet->SetPxPyPzE(p[0], p[1], p[2], p[3]); | |
4096 | ||
4097 | if( type == kJetsKineAcceptance && | |
4098 | ( jet->Eta() < fJetEtaMin | |
4099 | || jet->Eta() > fJetEtaMax | |
4100 | || jet->Phi() < fJetPhiMin | |
4101 | || jet->Phi() > fJetPhiMax )) continue; | |
4102 | ||
3af23c82 | 4103 | list->Add(jet); |
4104 | nGenJets++; | |
656dc810 | 4105 | } |
4106 | list->Sort(); | |
4107 | return nGenJets; | |
4108 | } | |
4109 | else if(type == kJetsGen || type == kJetsGenAcceptance ){ | |
4110 | ||
4111 | if(fBranchGenJets.Length()==0){ | |
4112 | if(fDebug>1) Printf("%s:%d no gen jet branch specified", (char*)__FILE__,__LINE__); | |
4113 | return 0; | |
4114 | } | |
4115 | ||
cb76764e | 4116 | TClonesArray *aodGenJets = 0; |
3af23c82 | 4117 | if(fBranchGenJets.Length()) aodGenJets = dynamic_cast<TClonesArray*>(fAOD->FindListObject(fBranchGenJets.Data())); |
4118 | if(!aodGenJets) aodGenJets = dynamic_cast<TClonesArray*>(fAOD->GetList()->FindObject(fBranchGenJets.Data())); | |
656dc810 | 4119 | |
4120 | if(!aodGenJets){ | |
4121 | if(fDebug>0){ | |
4122 | if(fBranchGenJets.Length()) Printf("%s:%d Generated jet branch %s not found",(char*)__FILE__,__LINE__,fBranchGenJets.Data()); | |
4123 | } | |
4124 | if(fDebug>1)fAOD->Print(); | |
4125 | return 0; | |
4126 | } | |
4127 | ||
4128 | Int_t nGenJets = 0; | |
4129 | ||
4130 | for(Int_t ig=0; ig<aodGenJets->GetEntries(); ++ig){ | |
4131 | ||
4132 | AliAODJet *tmp = dynamic_cast<AliAODJet*>(aodGenJets->At(ig)); | |
4133 | if(!tmp) continue; | |
4134 | ||
4135 | if( tmp->Pt() < fJetPtCut ) continue; | |
4136 | if( type == kJetsGenAcceptance && | |
4137 | ( tmp->Eta() < fJetEtaMin | |
4138 | || tmp->Eta() > fJetEtaMax | |
4139 | || tmp->Phi() < fJetPhiMin | |
4140 | || tmp->Phi() > fJetPhiMax )) continue; | |
4141 | ||
3af23c82 | 4142 | list->Add(tmp); |
4143 | nGenJets++; | |
656dc810 | 4144 | } |
4145 | list->Sort(); | |
4146 | return nGenJets; | |
656dc810 | 4147 | } |
4148 | else{ | |
4149 | if(fDebug>0)Printf("%s:%d no such type %d",(char*)__FILE__,__LINE__,type); | |
4150 | return 0; | |
4151 | } | |
4152 | } | |
4153 | ||
67e37e80 | 4154 | // _______________________________________________________________________________ |
3af23c82 | 4155 | Int_t AliAnalysisTaskFragmentationFunction::GetListOfBckgJets(/*TList *list, Int_t type*/) const |
656dc810 | 4156 | { |
3af23c82 | 4157 | // fill list of jets selected according to type |
656dc810 | 4158 | |
3af23c82 | 4159 | // /* |
4160 | // Under construction | |
4161 | // */ | |
67e37e80 | 4162 | |
4163 | return 0; | |
656dc810 | 4164 | |
3af23c82 | 4165 | } |
67e37e80 | 4166 | |
3af23c82 | 4167 | // _________________________________________________________________________________________________________ |
4168 | void AliAnalysisTaskFragmentationFunction::SetProperties(THnSparse* h,const Int_t dim, const char** labels) | |
4169 | { | |
4170 | // Set properties of THnSparse | |
67e37e80 | 4171 | |
3af23c82 | 4172 | for(Int_t i=0; i<dim; i++){ |
4173 | h->GetAxis(i)->SetTitle(labels[i]); | |
4174 | h->GetAxis(i)->SetTitleColor(1); | |
4175 | } | |
4176 | } | |
67e37e80 | 4177 | |
656dc810 | 4178 | // __________________________________________________________________________________________ |
4179 | void AliAnalysisTaskFragmentationFunction::SetProperties(TH1* h,const char* x, const char* y) | |
4180 | { | |
4181 | //Set properties of histos (x and y title) | |
4182 | ||
4183 | h->SetXTitle(x); | |
4184 | h->SetYTitle(y); | |
4185 | h->GetXaxis()->SetTitleColor(1); | |
4186 | h->GetYaxis()->SetTitleColor(1); | |
4187 | } | |
4188 | ||
4189 | // _________________________________________________________________________________________________________ | |
67e37e80 | 4190 | void AliAnalysisTaskFragmentationFunction::SetProperties(TH1* h,const char* x, const char* y, const char* z) |
656dc810 | 4191 | { |
4192 | //Set properties of histos (x,y and z title) | |
4193 | ||
4194 | h->SetXTitle(x); | |
4195 | h->SetYTitle(y); | |
4196 | h->SetZTitle(z); | |
4197 | h->GetXaxis()->SetTitleColor(1); | |
4198 | h->GetYaxis()->SetTitleColor(1); | |
4199 | h->GetZaxis()->SetTitleColor(1); | |
4200 | } | |
4201 | ||
4202 | // ________________________________________________________________________________________________________________________________________________________ | |
fceb275f | 4203 | void AliAnalysisTaskFragmentationFunction::GetJetTracksPointing(TList* inputlist, TList* outputlist, const AliAODJet* jet, const Double_t radius,Double_t& sumPt) |
656dc810 | 4204 | { |
4205 | // fill list of tracks in cone around jet axis | |
4206 | ||
4207 | sumPt = 0; | |
4208 | ||
4209 | Double_t jetMom[3]; | |
4210 | jet->PxPyPz(jetMom); | |
4211 | TVector3 jet3mom(jetMom); | |
4212 | ||
4213 | for (Int_t itrack=0; itrack<inputlist->GetSize(); itrack++){ | |
4214 | ||
4215 | AliVParticle* track = dynamic_cast<AliVParticle*>(inputlist->At(itrack)); | |
ab851c96 | 4216 | if(!track)continue; |
656dc810 | 4217 | Double_t trackMom[3]; |
4218 | track->PxPyPz(trackMom); | |
4219 | TVector3 track3mom(trackMom); | |
4220 | ||
4221 | Double_t dR = jet3mom.DeltaR(track3mom); | |
4222 | ||
4223 | if(dR<radius){ | |
4224 | ||
4225 | outputlist->Add(track); | |
4226 | ||
4227 | sumPt += track->Pt(); | |
4228 | } | |
4229 | } | |
4230 | ||
4231 | outputlist->Sort(); | |
4232 | } | |
4233 | ||
4234 | // ___________________________________________________________________________________________ | |
fceb275f | 4235 | void AliAnalysisTaskFragmentationFunction::GetJetTracksTrackrefs(TList* list, const AliAODJet* jet) |
656dc810 | 4236 | { |
4237 | // list of jet tracks from trackrefs | |
4238 | ||
4239 | Int_t nTracks = jet->GetRefTracks()->GetEntriesFast(); | |
4240 | ||
4241 | for (Int_t itrack=0; itrack<nTracks; itrack++) { | |
4242 | ||
4243 | AliVParticle* track = dynamic_cast<AliVParticle*>(jet->GetRefTracks()->At(itrack)); | |
4244 | if(!track){ | |
4245 | AliError("expected ref track not found "); | |
4246 | continue; | |
4247 | } | |
4248 | ||
4249 | list->Add(track); | |
4250 | } | |
4251 | ||
4252 | list->Sort(); | |
4253 | } | |
fe343c6b | 4254 | |
4255 | // _ ________________________________________________________________________________________________________________________________ | |
4256 | void AliAnalysisTaskFragmentationFunction::AssociateGenRec(TList* tracksAODMCCharged,TList* tracksRec, TArrayI& indexAODTr,TArrayI& indexMCTr,TArrayS& isGenPrim) | |
4257 | { | |
4258 | // associate generated and reconstructed tracks, fill TArrays of list indices | |
4259 | ||
4260 | ||
4261 | Int_t nTracksRec = tracksRec->GetSize(); | |
4262 | Int_t nTracksGen = tracksAODMCCharged->GetSize(); | |
4263 | TClonesArray *tca = dynamic_cast<TClonesArray*>(fAOD->FindListObject(AliAODMCParticle::StdBranchName())); | |
4264 | ||
4265 | if(!nTracksGen) return; | |
4266 | if(!tca) return; | |
4267 | ||
4268 | // set size | |
4269 | indexAODTr.Set(nTracksGen); | |
4270 | indexMCTr.Set(nTracksRec); | |
4271 | isGenPrim.Set(nTracksGen); | |
4272 | ||
4273 | indexAODTr.Reset(-1); | |
4274 | indexMCTr.Reset(-1); | |
4275 | isGenPrim.Reset(0); | |
4276 | ||
4277 | // loop over reconstructed tracks, get generated track | |
4278 | ||
4279 | for(Int_t iRec=0; iRec<nTracksRec; iRec++){ | |
4280 | ||
4281 | AliAODTrack* rectrack = dynamic_cast<AliAODTrack*>(tracksRec->At(iRec)); | |
ab851c96 | 4282 | if(!rectrack)continue; |
289a2293 | 4283 | Int_t label = TMath::Abs(rectrack->GetLabel()); |
fe343c6b | 4284 | |
4285 | // find MC track in our list | |
cb76764e | 4286 | AliAODMCParticle* gentrack = dynamic_cast<AliAODMCParticle*> (tca->At(label)); |
ab851c96 | 4287 | |
fe343c6b | 4288 | Int_t listIndex = -1; |
4289 | if(gentrack) listIndex = tracksAODMCCharged->IndexOf(gentrack); | |
4290 | ||
4291 | if(listIndex>=0){ | |
4292 | ||
4293 | indexAODTr[listIndex] = iRec; | |
4294 | indexMCTr[iRec] = listIndex; | |
4295 | } | |
4296 | } | |
4297 | ||
4298 | ||
4299 | // define primary sample for reconstruction efficiency | |
4300 | ||
4301 | for(Int_t iGen=0; iGen<nTracksGen; iGen++){ | |
4302 | ||
4303 | AliAODMCParticle* gentrack = dynamic_cast<AliAODMCParticle*> (tracksAODMCCharged->At(iGen)); | |
ab851c96 | 4304 | if(!gentrack)continue; |
fe343c6b | 4305 | Int_t pdg = gentrack->GetPdgCode(); |
4306 | ||
4307 | // 211 - pi, 2212 - proton, 321 - Kaon, 11 - electron, 13 - muon | |
4308 | if(TMath::Abs(pdg) == 211 || TMath::Abs(pdg) == 2212 || TMath::Abs(pdg) == 321 || | |
4309 | TMath::Abs(pdg) == 11 || TMath::Abs(pdg) == 13){ | |
4310 | ||
4311 | isGenPrim[iGen] = kTRUE; | |
cb76764e | 4312 | |
4313 | Int_t iRec = indexAODTr[iGen]; // can be -1 if no good reconstructed track | |
4314 | ||
4315 | if(iRec>=0){ | |
4316 | Float_t genPt = gentrack->Pt(); | |
ab851c96 | 4317 | AliAODTrack* vt = dynamic_cast<AliAODTrack*>(tracksRec->At(iRec)); |
4318 | if(vt){ | |
4319 | Float_t recPt = vt->Pt(); | |
4320 | fh2PtRecVsGenPrim->Fill(genPt,recPt); | |
4321 | } | |
cb76764e | 4322 | } |
fe343c6b | 4323 | } |
4324 | } | |
4325 | } | |
4326 | ||
4327 | // _____________________________________________________________________________________________________________________________________________ | |
cb76764e | 4328 | void AliAnalysisTaskFragmentationFunction::FillSingleTrackRecEffHisto(AliFragFuncQATrackHistos* trackQAGen, AliFragFuncQATrackHistos* trackQARec, TList* tracksGen, |
fceb275f | 4329 | const TArrayI& indexAODTr, const TArrayS& isGenPrim){ |
fe343c6b | 4330 | |
cb76764e | 4331 | // fill QA for single track reconstruction efficiency |
fceb275f | 4332 | |
fe343c6b | 4333 | Int_t nTracksGen = tracksGen->GetSize(); |
4334 | ||
4335 | if(!nTracksGen) return; | |
4336 | ||
4337 | for(Int_t iGen=0; iGen<nTracksGen; iGen++){ | |
4338 | ||
4339 | if(isGenPrim[iGen] != 1) continue; // select primaries | |
4340 | ||
4341 | AliAODMCParticle* gentrack = dynamic_cast<AliAODMCParticle*> (tracksGen->At(iGen)); | |
ab851c96 | 4342 | if(gentrack)continue; |
fe343c6b | 4343 | Double_t ptGen = gentrack->Pt(); |
4344 | Double_t etaGen = gentrack->Eta(); | |
4345 | Double_t phiGen = TVector2::Phi_0_2pi(gentrack->Phi()); | |
4346 | ||
4347 | // apply same acc & pt cuts as for FF | |
fe343c6b | 4348 | |
4349 | if(etaGen < fTrackEtaMin || etaGen > fTrackEtaMax) continue; | |
4350 | if(phiGen < fTrackPhiMin || phiGen > fTrackPhiMax) continue; | |
4351 | if(ptGen < fTrackPtCut) continue; | |
4352 | ||
cb76764e | 4353 | trackQAGen->FillTrackQA(etaGen, phiGen, ptGen); |
fe343c6b | 4354 | |
cb76764e | 4355 | Int_t iRec = indexAODTr[iGen]; // can be -1 if no good reconstructed track |
4356 | if(iRec>=0) trackQARec->FillTrackQA(etaGen, phiGen, ptGen); | |
fe343c6b | 4357 | } |
4358 | } | |
4359 | ||
4360 | // ______________________________________________________________________________________________________________________________________________________ | |
cb76764e | 4361 | void AliAnalysisTaskFragmentationFunction::FillJetTrackRecEffHisto(TObject* histGen, TObject* histRec, Double_t jetPtGen, Double_t jetPtRec, TList* jetTrackList, |
3af23c82 | 4362 | const TList* tracksGen, const TArrayI& indexAODTr, const TArrayS& isGenPrim, const Bool_t useRecJetPt) |
fe343c6b | 4363 | { |
cb76764e | 4364 | |
4365 | // fill objects for jet track reconstruction efficiency | |
3af23c82 | 4366 | // arguments histGen/histRec can be of different type: AliFragFuncHistos*, AliFragFuncIntraJetHistos*, ... |
fe343c6b | 4367 | |
4368 | Int_t nTracksJet = jetTrackList->GetSize(); // list with AODMC tracks | |
4369 | ||
4370 | if(!nTracksJet) return; | |
4371 | ||
cb76764e | 4372 | Bool_t incrementJetPtGenFF = kTRUE; // needed in case we fill FFHistos |
4373 | Bool_t incrementJetPtRecFF = kTRUE; // needed in case we fill FFHistos | |
4374 | ||
fe343c6b | 4375 | for(Int_t iTr=0; iTr<nTracksJet; iTr++){ |
4376 | ||
4377 | AliAODMCParticle* gentrack = dynamic_cast<AliAODMCParticle*> (jetTrackList->At(iTr)); | |
ab851c96 | 4378 | if(!gentrack)continue; |
fe343c6b | 4379 | // find jet track in gen tracks list |
4380 | Int_t iGen = tracksGen->IndexOf(gentrack); | |
4381 | ||
4382 | if(iGen<0){ | |
4383 | if(fDebug>0) Printf("%s:%d gen jet track not found ",(char*)__FILE__,__LINE__); | |
4384 | continue; | |
4385 | } | |
4386 | ||
4387 | if(isGenPrim[iGen] != 1) continue; // select primaries | |
4388 | ||
4389 | Double_t ptGen = gentrack->Pt(); | |
4390 | Double_t etaGen = gentrack->Eta(); | |
4391 | Double_t phiGen = TVector2::Phi_0_2pi(gentrack->Phi()); | |
4392 | ||
4393 | // apply same acc & pt cuts as for FF | |
fe343c6b | 4394 | |
4395 | if(etaGen < fTrackEtaMin || etaGen > fTrackEtaMax) continue; | |
4396 | if(phiGen < fTrackPhiMin || phiGen > fTrackPhiMax) continue; | |
4397 | if(ptGen < fTrackPtCut) continue; | |
4398 | ||
2d1d1b60 | 4399 | Double_t z = ptGen / jetPtGen; |
fe343c6b | 4400 | Double_t xi = 0; |
4401 | if(z>0) xi = TMath::Log(1/z); | |
4402 | ||
cb76764e | 4403 | Int_t iRec = indexAODTr[iGen]; // can be -1 if no good reconstructed track |
4404 | Bool_t isRec = (iRec>=0) ? kTRUE : kFALSE; | |
4405 | ||
4406 | if(dynamic_cast<AliFragFuncHistos*>(histGen) && dynamic_cast<AliFragFuncHistos*>(histRec)){ | |
4407 | ||
ab851c96 | 4408 | // after checking can afford normal cast |
4409 | AliFragFuncHistos* effFFhistGen = (AliFragFuncHistos*)(histGen); | |
4410 | AliFragFuncHistos* effFFhistRec = (AliFragFuncHistos*)(histRec); | |
cb76764e | 4411 | |
4412 | if(useRecJetPt) effFFhistGen->FillFF( ptGen, jetPtRec, incrementJetPtGenFF ); | |
4413 | else effFFhistGen->FillFF( ptGen, jetPtGen, incrementJetPtGenFF ); | |
4414 | ||
4415 | incrementJetPtGenFF = kFALSE; | |
fe343c6b | 4416 | |
cb76764e | 4417 | if(isRec){ |
4418 | if(useRecJetPt) effFFhistRec->FillFF( ptGen, jetPtRec, incrementJetPtRecFF ); | |
4419 | else effFFhistRec->FillFF( ptGen, jetPtGen, incrementJetPtRecFF ); | |
4420 | ||
4421 | incrementJetPtRecFF = kFALSE; | |
4422 | } | |
4423 | } | |
4424 | else if(dynamic_cast<AliFragFuncIntraJetHistos*>(histGen) && dynamic_cast<AliFragFuncIntraJetHistos*>(histRec)){ | |
4425 | ||
4426 | // eff for IJ histos ... | |
4427 | ||
4428 | } | |
fe343c6b | 4429 | } |
4430 | } | |
1da9498b | 4431 | |
3af23c82 | 4432 | |
4433 | // _____________________________________________________________________________________________________________________________________________ | |
4434 | void AliAnalysisTaskFragmentationFunction::FillSingleTrackResponse(THnSparse* hnResponse, TList* tracksGen, TList* tracksRec, | |
4435 | const TArrayI& indexAODTr, const TArrayS& isGenPrim) | |
4436 | { | |
4437 | // fill response matrix for single tracks | |
4438 | ||
4439 | ||
4440 | Int_t nTracksGen = tracksGen->GetSize(); | |
4441 | ||
4442 | if(!nTracksGen) return; | |
4443 | ||
4444 | for(Int_t iGen=0; iGen<nTracksGen; iGen++){ | |
4445 | ||
4446 | if(isGenPrim[iGen] != 1) continue; // select primaries | |
4447 | ||
4448 | AliAODMCParticle* gentrack = dynamic_cast<AliAODMCParticle*> (tracksGen->At(iGen)); | |
ab851c96 | 4449 | if(!gentrack)continue; |
3af23c82 | 4450 | Double_t ptGen = gentrack->Pt(); |
4451 | Double_t etaGen = gentrack->Eta(); | |
4452 | Double_t phiGen = TVector2::Phi_0_2pi(gentrack->Phi()); | |
4453 | ||
4454 | // apply same acc & pt cuts as for FF | |
4455 | if(etaGen < fTrackEtaMin || etaGen > fTrackEtaMax) continue; | |
4456 | if(phiGen < fTrackPhiMin || phiGen > fTrackPhiMax) continue; | |
4457 | if(ptGen < fTrackPtCut) continue; | |
4458 | ||
4459 | Int_t iRec = indexAODTr[iGen]; // can be -1 if no good reconstructed track | |
4460 | if(iRec>=0){ | |
4461 | AliAODTrack* rectrack = dynamic_cast<AliAODTrack*>(tracksRec->At(iRec)); | |
ab851c96 | 4462 | if(!rectrack)continue; |
3af23c82 | 4463 | Double_t ptRec = rectrack->Pt(); |
4464 | ||
4465 | Double_t entries[2] = {ptRec,ptGen}; // AliCorrFW convention: gen vs rec | |
4466 | hnResponse->Fill(entries); | |
4467 | } | |
4468 | } | |
4469 | } | |
4470 | ||
4471 | ||
4472 | // ______________________________________________________________________________________________________________________________________________________ | |
4473 | void AliAnalysisTaskFragmentationFunction::FillJetTrackResponse(THnSparse* hnResponsePt, THnSparse* hnResponseZ, THnSparse* hnResponseXi, | |
4474 | Double_t jetPtGen, Double_t jetPtRec, TList* jetTrackList, | |
4475 | const TList* tracksGen, TList* tracksRec, const TArrayI& indexAODTr, const TArrayS& isGenPrim,const Bool_t useRecJetPt) | |
4476 | { | |
4477 | // fill response matrix for tracks in jets | |
4478 | ||
4479 | Int_t nTracksJet = jetTrackList->GetSize(); // list with AODMC tracks | |
4480 | ||
4481 | if(!nTracksJet) return; | |
4482 | ||
4483 | for(Int_t iTr=0; iTr<nTracksJet; iTr++){ | |
4484 | ||
4485 | AliAODMCParticle* gentrack = dynamic_cast<AliAODMCParticle*> (jetTrackList->At(iTr)); | |
ab851c96 | 4486 | if(!gentrack)continue; |
3af23c82 | 4487 | // find jet track in gen tracks list |
4488 | Int_t iGen = tracksGen->IndexOf(gentrack); | |
4489 | ||
4490 | if(iGen<0){ | |
4491 | if(fDebug>0) Printf("%s:%d gen jet track not found ",(char*)__FILE__,__LINE__); | |
4492 | continue; | |
4493 | } | |
4494 | ||
4495 | if(isGenPrim[iGen] != 1) continue; // select primaries | |
4496 | ||
4497 | Double_t ptGen = gentrack->Pt(); | |
4498 | Double_t etaGen = gentrack->Eta(); | |
4499 | Double_t phiGen = TVector2::Phi_0_2pi(gentrack->Phi()); | |
4500 | ||
4501 | // apply same acc & pt cuts as for FF | |
4502 | ||
4503 | if(etaGen < fTrackEtaMin || etaGen > fTrackEtaMax) continue; | |
4504 | if(phiGen < fTrackPhiMin || phiGen > fTrackPhiMax) continue; | |
4505 | if(ptGen < fTrackPtCut) continue; | |
4506 | ||
4507 | Double_t zGen = ptGen / jetPtGen; | |
4508 | Double_t xiGen = 0; | |
4509 | if(zGen>0) xiGen = TMath::Log(1/zGen); | |
4510 | ||
4511 | Int_t iRec = indexAODTr[iGen]; // can be -1 if no good reconstructed track | |
4512 | ||
4513 | if(iRec>=0){ | |
4514 | ||
4515 | AliAODTrack* rectrack = dynamic_cast<AliAODTrack*>(tracksRec->At(iRec)); | |
ab851c96 | 4516 | if(rectrack){ |
4517 | Double_t ptRec = rectrack->Pt(); | |
4518 | ||
4519 | Double_t zRec = ptRec / jetPtGen; | |
4520 | Double_t xiRec = 0; | |
4521 | if(zRec>0) xiRec = TMath::Log(1/zRec); | |
3af23c82 | 4522 | |
ab851c96 | 4523 | Double_t jetPt = useRecJetPt ? jetPtRec : jetPtGen; |
4524 | ||
4525 | Double_t entriesPt[3] = {jetPt,ptRec,ptGen}; // AliCorrFW convention: gen vs rec | |
4526 | Double_t entriesZ[3] = {jetPt,zRec,zGen}; | |
4527 | Double_t entriesXi[3] = {jetPt,xiRec,xiGen}; | |
4528 | ||
4529 | hnResponsePt->Fill(entriesPt); | |
4530 | hnResponseZ->Fill(entriesZ); | |
4531 | hnResponseXi->Fill(entriesXi); | |
4532 | } | |
3af23c82 | 4533 | } |
4534 | } | |
4535 | } | |
4536 | ||
4537 | // _____________________________________________________________________________________________________________________________________________________________________ | |
4538 | void AliAnalysisTaskFragmentationFunction::GetTracksTiltedwrpJetAxis(Float_t alpha, TList* inputlist, TList* outputlist, AliAODJet* jet, Double_t radius,Double_t& sumPt) | |
1da9498b | 4539 | { |
4540 | // List of tracks in cone perpendicular to the jet azimuthal direction | |
4541 | ||
4542 | Double_t jetMom[3]; | |
4543 | jet->PxPyPz(jetMom); | |
67e37e80 | 4544 | |
1da9498b | 4545 | TVector3 jet3mom(jetMom); |
4546 | // Rotate phi and keep eta unchanged | |
3af23c82 | 4547 | Double_t etaTilted = jet3mom.Eta(); |
4548 | Double_t phiTilted = TVector2::Phi_0_2pi(jet3mom.Phi()) + alpha; | |
4549 | if(phiTilted > 2*TMath::Pi()) phiTilted = phiTilted - 2*TMath::Pi(); | |
1da9498b | 4550 | |
4551 | for (Int_t itrack=0; itrack<inputlist->GetSize(); itrack++){ | |
4552 | ||
4553 | AliVParticle* track = dynamic_cast<AliVParticle*>(inputlist->At(itrack)); | |
ab851c96 | 4554 | if(!track)continue; |
1da9498b | 4555 | Double_t trackMom[3]; |
4556 | track->PxPyPz(trackMom); | |
4557 | TVector3 track3mom(trackMom); | |
4558 | ||
3af23c82 | 4559 | Double_t deta = track3mom.Eta() - etaTilted; |
4560 | Double_t dphi = TMath::Abs(track3mom.Phi() - phiTilted); | |
4561 | if (dphi > TMath::Pi()) dphi = 2. * TMath::Pi() - dphi; | |
4562 | Double_t dR = TMath::Sqrt(deta * deta + dphi * dphi); | |
4563 | ||
1da9498b | 4564 | if(dR<=radius){ |
4565 | outputlist->Add(track); | |
4566 | sumPt += track->Pt(); | |
4567 | } | |
4568 | } | |
4569 | ||
4570 | } | |
4571 | ||
4572 | // ________________________________________________________________________________________________________________________________________________________ | |
3af23c82 | 4573 | void AliAnalysisTaskFragmentationFunction::GetTracksTiltedwrpJetAxisWindow(Float_t alpha, TList* inputlist, TList* outputlist, AliAODJet* jet, Double_t radius,Double_t& sumPt,Double_t &normFactor) |
4574 | { | |
4575 | // List of tracks in cone perpendicular to the jet azimuthal direction | |
4576 | ||
4577 | Double_t jetMom[3]; | |
4578 | jet->PxPyPz(jetMom); | |
4579 | ||
4580 | TVector3 jet3mom(jetMom); | |
4581 | // Rotate phi and keep eta unchanged | |
4582 | Double_t etaTilted = jet3mom.Eta(); | |
4583 | Double_t phiTilted = TVector2::Phi_0_2pi(jet3mom.Phi()) + alpha; | |
4584 | if(phiTilted > 2*TMath::Pi()) phiTilted = phiTilted - 2*TMath::Pi(); | |
4585 | ||
4586 | for (Int_t itrack=0; itrack<inputlist->GetSize(); itrack++) | |
4587 | { | |
ab851c96 | 4588 | |
3af23c82 | 4589 | AliVParticle* track = dynamic_cast<AliVParticle*>(inputlist->At(itrack)); |
ab851c96 | 4590 | if(!track)continue; |
3af23c82 | 4591 | Float_t trackEta = track->Eta(); |
4592 | Float_t trackPhi = track->Phi(); | |
4593 | ||
4594 | if( ( phiTilted-radius >= 0 ) || ( phiTilted+radius <= 2*TMath::Pi())) | |
4595 | { | |
4596 | if((trackPhi<=phiTilted+radius) && | |
4597 | (trackPhi>=phiTilted-radius) && | |
4598 | (trackEta<=fTrackEtaMax)&&(trackEta>=-fTrackEtaMin)) // 0.9 and - 0.9 | |
4599 | { | |
4600 | outputlist->Add(track); | |
4601 | sumPt += track->Pt(); | |
4602 | } | |
4603 | } | |
4604 | else if( phiTilted-radius < 0 ) | |
4605 | { | |
4606 | if((( trackPhi < phiTilted+radius ) || | |
4607 | ( trackPhi > 2*TMath::Pi()-(radius-phiTilted) )) && | |
4608 | (( trackEta <= fTrackEtaMax ) && ( trackEta >= fTrackEtaMin ))) | |
4609 | { | |
4610 | outputlist->Add(track); | |
4611 | sumPt += track->Pt(); | |
4612 | } | |
4613 | } | |
4614 | else if( phiTilted+radius > 2*TMath::Pi() ) | |
4615 | { | |
4616 | if((( trackPhi > phiTilted-radius ) || | |
4617 | ( trackPhi > radius-2*TMath::Pi()-phiTilted )) && | |
4618 | (( trackEta <= fTrackEtaMax ) && ( trackEta >= fTrackEtaMin ))) | |
4619 | { | |
4620 | outputlist->Add(track); | |
4621 | sumPt += track->Pt(); | |
4622 | } | |
4623 | } | |
4624 | } | |
4625 | ||
4626 | // Jet area - Temporarily added should be modified with the proper jet area value | |
4627 | Float_t areaJet = CalcJetArea(etaTilted,radius); | |
4628 | Float_t areaTilted = 2*radius*(fTrackEtaMax-fTrackEtaMin); | |
4629 | ||
4630 | normFactor = (Float_t) 1. / (areaJet / areaTilted); | |
4631 | ||
4632 | } | |
4633 | ||
4634 | ||
4635 | // ________________________________________________________________________________________________________________________________________________________ | |
4636 | void AliAnalysisTaskFragmentationFunction::GetTracksOutOfNJets(Int_t nCases, TList* inputlist, TList* outputlist, TList* jetlist, Double_t& sumPt) | |
1da9498b | 4637 | { |
4638 | // List of tracks outside cone around N jet axis | |
4639 | // Particles taken randomly | |
4640 | ||
4641 | sumPt = 0; | |
4642 | // Int_t nj = jetlist->GetSize(); | |
4643 | Float_t rc = GetFFRadius(); | |
4644 | Float_t rcl = GetFFBckgRadius(); | |
4645 | ||
4646 | // Estimate jet and background areas | |
4647 | Float_t* areaJet = new Float_t[nCases]; | |
ab851c96 | 4648 | memset(areaJet, 0, sizeof(Float_t) * nCases); |
1da9498b | 4649 | Float_t* areaJetLarge = new Float_t[nCases]; |
ab851c96 | 4650 | memset(areaJetLarge, 0, sizeof(Float_t) * nCases); |
1da9498b | 4651 | Float_t areaFull = (fTrackEtaMax-fTrackEtaMin)*(fTrackPhiMax-fTrackPhiMin); |
4652 | Float_t areaOut = areaFull; | |
4653 | ||
4654 | //estimate jets and background areas | |
4655 | Int_t nOut = 0; | |
4656 | Int_t ijet = 0; | |
4657 | TList* templist = new TList(); | |
4658 | TClonesArray *vect3Jet = new TClonesArray("TVector3",nCases); | |
4659 | ||
4660 | for(Int_t ij=0; ij<nCases; ++ij) | |
4661 | { | |
4662 | // Get jet information | |
4663 | AliAODJet* jet = dynamic_cast<AliAODJet*>(jetlist->At(ij)); | |
ab851c96 | 4664 | if(!jet)continue; |
1da9498b | 4665 | TVector3 jet3mom; |
4666 | jet3mom.SetPtEtaPhi(jet->Pt(),jet->Eta(),jet->Phi()); | |
4667 | new((*vect3Jet)[ijet]) TVector3((TVector3)jet3mom); | |
4668 | Float_t etaJet = (Float_t)((TVector3*) vect3Jet->At(ij))->Eta(); | |
4669 | ||
4670 | // Jet area | |
4671 | areaJet[ij] = CalcJetArea(etaJet,rc); | |
4672 | ||
4673 | // Area jet larger angle | |
4674 | areaJetLarge[ij] = CalcJetArea(etaJet,rcl); | |
4675 | ||
4676 | // Outside jet area | |
4677 | areaOut = areaOut - areaJetLarge[ij]; | |
4678 | ijet++; | |
4679 | } | |
4680 | ||
4681 | // List of all tracks outside jet areas | |
4682 | for (Int_t itrack=0; itrack<inputlist->GetSize(); itrack++){ | |
4683 | ||
4684 | AliVParticle* track = dynamic_cast<AliVParticle*>(inputlist->At(itrack)); | |
ab851c96 | 4685 | if(!track)continue; |
1da9498b | 4686 | Double_t trackMom[3]; |
4687 | track->PxPyPz(trackMom); | |
4688 | TVector3 track3mom(trackMom); | |
4689 | ||
4690 | Double_t *dR = new Double_t[nCases]; | |
4691 | for(Int_t ij=0; ij<nCases; ij++) | |
4692 | dR[ij] = (Double_t)((TVector3*) vect3Jet->At(ij))->DeltaR(track3mom); | |
4693 | ||
4694 | if((nCases==1 && (dR[0]>rcl)) || | |
4695 | (nCases==2 && (dR[0]>rcl && dR[1]>rcl)) || | |
4696 | (nCases==3 && (dR[0]>rcl && dR[1]>rcl && dR[2]>rcl))) | |
4697 | { | |
4698 | templist->Add(track); | |
4699 | nOut++; | |
4700 | } | |
4701 | delete [] dR; | |
4702 | } | |
4703 | ||
67e37e80 | 4704 | // Take tracks randomly |
4705 | Int_t nScaled = (Int_t) (nOut * areaJet[0] / areaOut + 0.5); | |
4706 | TArrayI* ar = new TArrayI(nOut); | |
1da9498b | 4707 | |
67e37e80 | 4708 | for(Int_t init=0; init<nOut; init++) |
4709 | (*ar)[init] = init; | |
1da9498b | 4710 | |
67e37e80 | 4711 | Int_t *randIndex = new Int_t[nScaled]; |
4712 | for(Int_t init2=0; init2<nScaled; init2++) | |
4713 | randIndex[init2] = -1; | |
1da9498b | 4714 | |
67e37e80 | 4715 | // Select nScaled different random numbers in nOut |
4716 | for(Int_t i=0; i<nScaled; i++) | |
1da9498b | 4717 | { |
67e37e80 | 4718 | Int_t* tmpArr = new Int_t[nOut-i]; |
4719 | Int_t temp = fRandom->Integer(nOut-i); | |
4720 | for(Int_t ind = 0; ind< ar->GetSize()-1; ind++) | |
1da9498b | 4721 | { |
67e37e80 | 4722 | if(ind<temp) tmpArr[ind] = (*ar)[ind]; |
4723 | else tmpArr[ind] = (*ar)[ind+1]; | |
1da9498b | 4724 | } |
67e37e80 | 4725 | randIndex[i] = (*ar)[temp]; |
1da9498b | 4726 | |
67e37e80 | 4727 | ar->Set(nOut-i-1,tmpArr); |
4728 | ||
4729 | delete [] tmpArr; | |
4730 | ||
4731 | } | |
4732 | ||
4733 | for(Int_t ipart=0; ipart<nScaled; ipart++) | |
4734 | { | |
4735 | AliVParticle* track = dynamic_cast<AliVParticle*>(templist->At(randIndex[ipart])); | |
4736 | outputlist->Add(track); | |
4737 | sumPt += track->Pt(); | |
4738 | } | |
1da9498b | 4739 | |
4740 | outputlist->Sort(); | |
4741 | ||
1da9498b | 4742 | delete vect3Jet; |
4743 | delete templist; | |
4744 | delete [] areaJetLarge; | |
4745 | delete [] areaJet; | |
67e37e80 | 4746 | delete ar; |
4747 | delete [] randIndex; | |
1da9498b | 4748 | |
4749 | } | |
4750 | ||
4751 | // ________________________________________________________________________________________________________________________________________________________ | |
3af23c82 | 4752 | void AliAnalysisTaskFragmentationFunction::GetTracksOutOfNJetsStat(Int_t nCases, TList* inputlist, TList* outputlist, TList* jetlist, Double_t& sumPt, Double_t &normFactor) |
1da9498b | 4753 | { |
4754 | // List of tracks outside cone around N jet axis | |
4755 | // All particles taken + final scaling factor | |
4756 | ||
4757 | sumPt = 0; | |
4758 | Float_t rc = GetFFRadius(); | |
4759 | Float_t rcl = GetFFBckgRadius(); | |
4760 | ||
4761 | // Estimate jet and background areas | |
4762 | Float_t* areaJet = new Float_t[nCases]; | |
4763 | Float_t* areaJetLarge = new Float_t[nCases]; | |
4764 | Float_t areaFull = (fTrackEtaMax-fTrackEtaMin)*(fTrackPhiMax-fTrackPhiMin); | |
4765 | Float_t areaOut = areaFull; | |
4766 | ||
4767 | //estimate jets and background areas | |
4768 | Int_t nOut = 0; | |
4769 | Int_t ijet = 0; | |
4770 | TClonesArray *vect3Jet = new TClonesArray("TVector3",nCases); | |
4771 | ||
4772 | for(Int_t ij=0; ij<nCases; ++ij) | |
4773 | { | |
4774 | // Get jet information | |
4775 | AliAODJet* jet = dynamic_cast<AliAODJet*>(jetlist->At(ij)); | |
ab851c96 | 4776 | if(!jet)continue; |
1da9498b | 4777 | TVector3 jet3mom; |
4778 | jet3mom.SetPtEtaPhi(jet->Pt(),jet->Eta(),jet->Phi()); | |
4779 | new((*vect3Jet)[ijet]) TVector3((TVector3)jet3mom); | |
4780 | Float_t etaJet = (Float_t)((TVector3*) vect3Jet->At(ij))->Eta(); | |
4781 | ||
4782 | // Jet area | |
4783 | areaJet[ij] = CalcJetArea(etaJet,rc); | |
4784 | ||
4785 | // Area jet larger angle | |
4786 | areaJetLarge[ij] = CalcJetArea(etaJet,rcl); | |
4787 | ||
4788 | // Outside jets area | |
4789 | areaOut = areaOut - areaJetLarge[ij]; | |
4790 | ijet++; | |
4791 | } | |
4792 | ||
4793 | for (Int_t itrack=0; itrack<inputlist->GetSize(); itrack++){ | |
4794 | ||
4795 | AliVParticle* track = dynamic_cast<AliVParticle*>(inputlist->At(itrack)); | |
ab851c96 | 4796 | if(!track)continue; |
1da9498b | 4797 | Double_t trackMom[3]; |
4798 | track->PxPyPz(trackMom); | |
4799 | TVector3 track3mom(trackMom); | |
4800 | ||
4801 | Double_t *dR = new Double_t[nCases]; | |
4802 | for(Int_t ij=0; ij<nCases; ij++) | |
4803 | dR[ij] = (Double_t)((TVector3*) vect3Jet->At(ij))->DeltaR(track3mom); | |
4804 | ||
4805 | if((nCases==0) || | |
4806 | (nCases==1 && (dR[0]>rcl)) || | |
4807 | (nCases==2 && (dR[0]>rcl && dR[1]>rcl)) || | |
4808 | (nCases==3 && (dR[0]>rcl && dR[1]>rcl && dR[2]>rcl))) | |
4809 | { | |
4810 | outputlist->Add(track); | |
4811 | sumPt += track->Pt(); | |
4812 | nOut++; | |
4813 | } | |
4814 | delete [] dR; | |
4815 | } | |
4816 | ||
4817 | if(nCases==0) areaJet[0] = TMath::Pi()*rc*rc; | |
4818 | normFactor = (Float_t) 1./(areaJet[0] / areaOut); | |
4819 | ||
4820 | outputlist->Sort(); | |
4821 | ||
4822 | delete vect3Jet; | |
4823 | delete [] areaJetLarge; | |
4824 | delete [] areaJet; | |
4825 | ||
4826 | } | |
4827 | ||
4828 | // ______________________________________________________________________________________________________________________________________________________ | |
3af23c82 | 4829 | Float_t AliAnalysisTaskFragmentationFunction::CalcJetArea(const Float_t etaJet, const Float_t rc) const |
1da9498b | 4830 | { |
3af23c82 | 4831 | // calculate area of jet with eta etaJet and radius rc |
1da9498b | 4832 | |
4833 | Float_t detamax = etaJet + rc; | |
4834 | Float_t detamin = etaJet - rc; | |
4835 | Float_t accmax = 0.0; Float_t accmin = 0.0; | |
4836 | if(detamax > fTrackEtaMax){ // sector outside etamax | |
4837 | Float_t h = fTrackEtaMax - etaJet; | |
4838 | accmax = rc*rc*TMath::ACos(h/rc) - h*TMath::Sqrt(rc*rc - h*h); | |
4839 | } | |
4840 | if(detamin < fTrackEtaMin){ // sector outside etamin | |
4841 | Float_t h = fTrackEtaMax + etaJet; | |
4842 | accmin = rc*rc*TMath::ACos(h/rc) - h*TMath::Sqrt(rc*rc - h*h); | |
4843 | } | |
4844 | Float_t areaJet = rc*rc*TMath::Pi() - accmax - accmin; | |
4845 | ||
4846 | return areaJet; | |
4847 | ||
4848 | } | |
67e37e80 | 4849 | |
4850 | // ______________________________________________________________________________________________________________________________________________________ | |
4851 | void AliAnalysisTaskFragmentationFunction::FillBckgHistos(Int_t type, TList* inputtracklist, TList* inputjetlist, AliAODJet* jet, Float_t leadTrackPt, TLorentzVector* leadTrackV, | |
4852 | AliFragFuncHistos* ffbckghistocuts, AliFragFuncHistos* ffbckghistoleading, | |
4853 | AliFragFuncIntraJetHistos* ijbckghistocuts, AliFragFuncIntraJetHistos* ijbckghistoleading, | |
4854 | AliFragFuncQATrackHistos* qabckghistocuts){ | |
4855 | ||
4856 | // List of tracks outside jets for background study | |
4857 | TList* tracklistout2jets = new TList(); | |
4858 | TList* tracklistout3jets = new TList(); | |
4859 | TList* tracklistout2jetsStat = new TList(); | |
4860 | TList* tracklistout3jetsStat = new TList(); | |
4861 | Double_t sumPtOut2Jets = 0.; | |
4862 | Double_t sumPtOut3Jets = 0.; | |
4863 | Double_t sumPtOut2JetsStat = 0.; | |
4864 | Double_t sumPtOut3JetsStat = 0.; | |
4865 | Double_t normFactor2Jets = 0.; | |
4866 | Double_t normFactor3Jets = 0.; | |
4867 | ||
4868 | Int_t nRecJetsCuts = fJetsRecCuts->GetEntries(); | |
4869 | ||
4870 | if(nRecJetsCuts>1) { | |
3af23c82 | 4871 | GetTracksOutOfNJets(2,inputtracklist, tracklistout2jets, inputjetlist, sumPtOut2Jets); |
4872 | GetTracksOutOfNJetsStat(2,inputtracklist, tracklistout2jetsStat, inputjetlist,sumPtOut2JetsStat, normFactor2Jets); | |
4873 | ||
67e37e80 | 4874 | } |
4875 | if(nRecJetsCuts>2) { | |
3af23c82 | 4876 | GetTracksOutOfNJets(3,inputtracklist, tracklistout3jets, inputjetlist, sumPtOut3Jets); |
4877 | GetTracksOutOfNJetsStat(3,inputtracklist, tracklistout3jetsStat, inputjetlist, sumPtOut3JetsStat, normFactor3Jets); | |
67e37e80 | 4878 | } |
4879 | ||
4880 | if(type==kBckgOutLJ || type==kBckgOutAJ) | |
4881 | { | |
4882 | TList* tracklistoutleading = new TList(); | |
4883 | Double_t sumPtOutLeading = 0.; | |
3af23c82 | 4884 | GetTracksOutOfNJets(1,inputtracklist, tracklistoutleading, inputjetlist, sumPtOutLeading); |
67e37e80 | 4885 | if(type==kBckgOutLJ) fh1OutLeadingMult->Fill(tracklistoutleading->GetSize()); |
4886 | ||
4887 | for(Int_t it=0; it<tracklistoutleading->GetSize(); ++it){ | |
4888 | ||
4889 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistoutleading->At(it)); | |
4890 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
4891 | ||
4892 | Float_t jetPt = jet->Pt(); | |
4893 | Float_t trackPt = trackV->Pt(); | |
4894 | ||
4895 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
4896 | ||
4897 | if(type==kBckgOutLJ) | |
4898 | { | |
3af23c82 | 4899 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt); |
67e37e80 | 4900 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector() ); |
4901 | ||
3af23c82 | 4902 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt); |
67e37e80 | 4903 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV ); |
4904 | ||
4905 | // Fill track QA for background | |
3af23c82 | 4906 | if(fQAMode&1) qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt); |
67e37e80 | 4907 | } |
4908 | ||
4909 | // All cases included | |
4910 | if(nRecJetsCuts==1 && type==kBckgOutAJ) | |
4911 | { | |
3af23c82 | 4912 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt ); |
67e37e80 | 4913 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector() ); |
4914 | ||
3af23c82 | 4915 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt ); |
67e37e80 | 4916 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV ); |
4917 | } | |
4918 | delete trackV; | |
4919 | } | |
4920 | delete tracklistoutleading; | |
4921 | } | |
4922 | if(type==kBckgOutLJStat || type==kBckgOutAJStat) | |
4923 | { | |
4924 | TList* tracklistoutleadingStat = new TList(); | |
4925 | Double_t sumPtOutLeadingStat = 0.; | |
4926 | Double_t normFactorLeading = 0.; | |
4927 | ||
3af23c82 | 4928 | GetTracksOutOfNJetsStat(1,inputtracklist, tracklistoutleadingStat, inputjetlist, sumPtOutLeadingStat, normFactorLeading); |
67e37e80 | 4929 | |
4930 | for(Int_t it=0; it<tracklistoutleadingStat->GetSize(); ++it){ | |
4931 | ||
4932 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistoutleadingStat->At(it)); | |
4933 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
4934 | ||
4935 | Float_t jetPt = jet->Pt(); | |
4936 | Float_t trackPt = trackV->Pt(); | |
4937 | ||
4938 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
4939 | ||
4940 | // Stat plots | |
4941 | if(type==kBckgOutLJStat) | |
4942 | { | |
3af23c82 | 4943 | if(fFFMode)ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt, normFactorLeading); |
67e37e80 | 4944 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector(), normFactorLeading); |
4945 | ||
3af23c82 | 4946 | if(fFFMode)ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt, normFactorLeading); |
67e37e80 | 4947 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactorLeading); |
4948 | ||
4949 | // Fill track QA for background | |
3af23c82 | 4950 | //if(fQAMode&1) qabckghistocuts->FillTrackQA( trackEta, TVector2::Phi_0_2pi(trackPhi), trackPt); |
67e37e80 | 4951 | } |
4952 | ||
4953 | // All cases included | |
4954 | if(nRecJetsCuts==1 && type==kBckgOutAJStat) | |
4955 | { | |
3af23c82 | 4956 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt, normFactorLeading); |
67e37e80 | 4957 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector(), normFactorLeading ); |
4958 | ||
3af23c82 | 4959 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt, normFactorLeading); |
67e37e80 | 4960 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactorLeading ); |
4961 | } | |
4962 | delete trackV; | |
4963 | } | |
4964 | delete tracklistoutleadingStat; | |
4965 | } | |
4966 | ||
4967 | if(type==kBckgPerp) | |
4968 | { | |
4969 | Double_t sumPtPerp = 0.; | |
4970 | TList* tracklistperp = new TList(); | |
3af23c82 | 4971 | GetTracksTiltedwrpJetAxis(TMath::Pi()/2., inputtracklist,tracklistperp,jet,GetFFRadius(),sumPtPerp); |
67e37e80 | 4972 | fh1PerpMult->Fill(tracklistperp->GetSize()); |
4973 | ||
4974 | for(Int_t it=0; it<tracklistperp->GetSize(); ++it){ | |
4975 | ||
4976 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistperp->At(it)); | |
ab851c96 | 4977 | if(!trackVP)continue; |
67e37e80 | 4978 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); |
4979 | ||
4980 | Float_t jetPt = jet->Pt(); | |
4981 | Float_t trackPt = trackV->Pt(); | |
4982 | ||
4983 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
4984 | ||
3af23c82 | 4985 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt ); |
67e37e80 | 4986 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector() ); |
4987 | ||
3af23c82 | 4988 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt ); |
67e37e80 | 4989 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV ); |
4990 | ||
4991 | // Fill track QA for background | |
3af23c82 | 4992 | if(fQAMode&1) qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt); |
67e37e80 | 4993 | |
4994 | delete trackV; | |
4995 | } | |
4996 | delete tracklistperp; | |
4997 | } | |
4998 | ||
3af23c82 | 4999 | if(type==kBckgASide) |
5000 | { | |
5001 | Double_t sumPtASide = 0.; | |
5002 | TList* tracklistaside = new TList(); | |
5003 | GetTracksTiltedwrpJetAxis(TMath::Pi(),inputtracklist,tracklistaside,jet,GetFFRadius(),sumPtASide); | |
5004 | fh1ASideMult->Fill(tracklistaside->GetSize()); | |
5005 | ||
5006 | for(Int_t it=0; it<tracklistaside->GetSize(); ++it){ | |
5007 | ||
5008 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistaside->At(it)); | |
5009 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
5010 | ||
5011 | Float_t jetPt = jet->Pt(); | |
5012 | Float_t trackPt = trackV->Pt(); | |
5013 | ||
5014 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
5015 | ||
5016 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt ); | |
5017 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector() ); | |
5018 | ||
5019 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt ); | |
5020 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV ); | |
5021 | ||
5022 | // Fill track QA for background | |
5023 | if(fQAMode&1) qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt); | |
5024 | ||
5025 | delete trackV; | |
5026 | } | |
5027 | delete tracklistaside; | |
5028 | } | |
5029 | ||
5030 | if(type==kBckgASideWindow) | |
5031 | { | |
5032 | Double_t normFactorASide = 0.; | |
5033 | Double_t sumPtASideW = 0.; | |
5034 | TList* tracklistasidew = new TList(); | |
5035 | GetTracksTiltedwrpJetAxisWindow(TMath::Pi(),inputtracklist,tracklistasidew,jet,GetFFRadius(),sumPtASideW,normFactorASide); | |
5036 | fh1ASideWindowMult->Fill(tracklistasidew->GetSize()); | |
5037 | ||
5038 | for(Int_t it=0; it<tracklistasidew->GetSize(); ++it){ | |
5039 | ||
5040 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistasidew->At(it)); | |
5041 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
5042 | ||
5043 | Float_t jetPt = jet->Pt(); | |
5044 | Float_t trackPt = trackV->Pt(); | |
5045 | ||
5046 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
5047 | ||
5048 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt, normFactorASide); | |
5049 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector(), normFactorASide); | |
5050 | ||
5051 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt, normFactorASide ); | |
5052 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactorASide ); | |
5053 | ||
5054 | // Fill track QA for background | |
5055 | if(fQAMode&1) qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt, kFALSE, normFactorASide); | |
5056 | ||
5057 | delete trackV; | |
5058 | } | |
5059 | delete tracklistasidew; | |
5060 | } | |
5061 | ||
5062 | if(type==kBckgPerpWindow) | |
5063 | { | |
5064 | Double_t normFactorPerp = 0.; | |
5065 | Double_t sumPtPerpW = 0.; | |
5066 | TList* tracklistperpw = new TList(); | |
5067 | GetTracksTiltedwrpJetAxisWindow(TMath::Pi()/2.,inputtracklist,tracklistperpw,jet,GetFFRadius(),sumPtPerpW,normFactorPerp); | |
5068 | fh1PerpWindowMult->Fill(tracklistperpw->GetSize()); | |
5069 | ||
5070 | for(Int_t it=0; it<tracklistperpw->GetSize(); ++it){ | |
5071 | ||
5072 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistperpw->At(it)); | |
5073 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
5074 | ||
5075 | Float_t jetPt = jet->Pt(); | |
5076 | Float_t trackPt = trackV->Pt(); | |
5077 | ||
5078 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
5079 | ||
5080 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt, normFactorPerp); | |
5081 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector(), normFactorPerp); | |
5082 | ||
5083 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt, normFactorPerp ); | |
5084 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactorPerp ); | |
5085 | ||
5086 | // Fill track QA for background | |
5087 | if(fQAMode&1) qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt, kFALSE, normFactorPerp); | |
5088 | ||
5089 | delete trackV; | |
5090 | } | |
5091 | delete tracklistperpw; | |
5092 | } | |
5093 | ||
5094 | ||
67e37e80 | 5095 | if(type==kBckgOut2J || type==kBckgOutAJ) |
5096 | { | |
5097 | if(type==kBckgOut2J) fh1Out2JetsMult->Fill(tracklistout2jets->GetSize()); | |
5098 | for(Int_t it=0; it<tracklistout2jets->GetSize(); ++it){ | |
5099 | ||
5100 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistout2jets->At(it)); | |
5101 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
5102 | ||
5103 | Float_t jetPt = jet->Pt(); | |
5104 | Float_t trackPt = trackV->Pt(); | |
5105 | ||
5106 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
5107 | ||
5108 | if(type==kBckgOut2J) | |
5109 | { | |
3af23c82 | 5110 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt ); |
67e37e80 | 5111 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector() ); |
5112 | ||
3af23c82 | 5113 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt ); |
67e37e80 | 5114 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV ); |
5115 | ||
3af23c82 | 5116 | if(fQAMode&1) qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt); |
67e37e80 | 5117 | } |
5118 | ||
5119 | // All cases included | |
5120 | if(nRecJetsCuts==2 && type==kBckgOutAJ) | |
5121 | { | |
3af23c82 | 5122 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt ); |
67e37e80 | 5123 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector() ); |
5124 | ||
3af23c82 | 5125 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt ); |
67e37e80 | 5126 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV ); |
5127 | } | |
5128 | delete trackV; | |
5129 | } | |
5130 | } | |
5131 | ||
5132 | if(type==kBckgOut2JStat || type==kBckgOutAJStat) | |
5133 | { | |
5134 | for(Int_t it=0; it<tracklistout2jetsStat->GetSize(); ++it){ | |
5135 | ||
5136 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistout2jetsStat->At(it)); | |
5137 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
5138 | ||
5139 | Float_t jetPt = jet->Pt(); | |
5140 | Float_t trackPt = trackV->Pt(); | |
5141 | ||
5142 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
5143 | ||
5144 | if(type==kBckgOut2JStat) | |
5145 | { | |
3af23c82 | 5146 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt, normFactor2Jets); |
67e37e80 | 5147 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector(), normFactor2Jets ); |
5148 | ||
3af23c82 | 5149 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt, normFactor2Jets); |
67e37e80 | 5150 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactor2Jets ); |
5151 | ||
3af23c82 | 5152 | //if(fQAMode&1) qabckghistocuts->FillTrackQA( trackEta, TVector2::Phi_0_2pi(trackPhi), trackPt); |
67e37e80 | 5153 | } |
5154 | ||
5155 | // All cases included | |
5156 | if(nRecJetsCuts==2 && type==kBckgOutAJStat) | |
5157 | { | |
3af23c82 | 5158 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt, normFactor2Jets); |
67e37e80 | 5159 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector(), normFactor2Jets ); |
5160 | ||
3af23c82 | 5161 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt, normFactor2Jets); |
67e37e80 | 5162 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactor2Jets ); |
5163 | } | |
5164 | delete trackV; | |
5165 | } | |
5166 | } | |
5167 | ||
5168 | if(type==kBckgOut3J || type==kBckgOutAJ) | |
5169 | { | |
5170 | if(type==kBckgOut3J) fh1Out3JetsMult->Fill(tracklistout3jets->GetSize()); | |
5171 | ||
5172 | for(Int_t it=0; it<tracklistout3jets->GetSize(); ++it){ | |
5173 | ||
5174 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistout3jets->At(it)); | |
5175 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
5176 | ||
5177 | Float_t jetPt = jet->Pt(); | |
5178 | Float_t trackPt = trackV->Pt(); | |
5179 | ||
5180 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
5181 | ||
5182 | if(type==kBckgOut3J) | |
5183 | { | |
5184 | ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt ); | |
5185 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector() ); | |
5186 | ||
5187 | ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt ); | |
5188 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV ); | |
5189 | ||
5190 | qabckghistocuts->FillTrackQA( trackV->Eta(), TVector2::Phi_0_2pi(trackV->Phi()), trackPt); | |
5191 | } | |
5192 | ||
5193 | // All cases included | |
5194 | if(nRecJetsCuts==3 && type==kBckgOutAJ) | |
5195 | { | |
5196 | ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt ); | |
5197 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector() ); | |
5198 | ||
5199 | ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt ); | |
5200 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV ); | |
5201 | } | |
5202 | delete trackV; | |
5203 | } | |
5204 | } | |
5205 | ||
5206 | if(type==kBckgOut3JStat || type==kBckgOutAJStat) | |
5207 | { | |
5208 | for(Int_t it=0; it<tracklistout3jetsStat->GetSize(); ++it){ | |
5209 | ||
5210 | AliVParticle* trackVP = dynamic_cast<AliVParticle*>(tracklistout3jetsStat->At(it)); | |
5211 | TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P()); | |
5212 | ||
5213 | Float_t jetPt = jet->Pt(); | |
5214 | Float_t trackPt = trackV->Pt(); | |
5215 | ||
5216 | Bool_t incrementJetPt = (it==0) ? kTRUE : kFALSE; | |
5217 | ||
5218 | if(type==kBckgOut3JStat) | |
5219 | { | |
3af23c82 | 5220 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt,normFactor3Jets); |
67e37e80 | 5221 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector(), normFactor3Jets); |
5222 | ||
3af23c82 | 5223 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt,normFactor3Jets); |
67e37e80 | 5224 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV, normFactor3Jets); |
5225 | ||
3af23c82 | 5226 | //if(fQAMode&1) qabckghistocuts->FillTrackQA( trackEta, TVector2::Phi_0_2pi(trackPhi), trackPt); |
67e37e80 | 5227 | } |
5228 | ||
5229 | // All cases included | |
5230 | if(nRecJetsCuts==3 && type==kBckgOutAJStat) | |
5231 | { | |
3af23c82 | 5232 | if(fFFMode) ffbckghistocuts->FillFF( trackPt, jetPt, incrementJetPt, normFactor3Jets ); |
67e37e80 | 5233 | if(fIJMode) ijbckghistocuts->FillIntraJet( trackV, jet->MomentumVector(), normFactor3Jets); |
5234 | ||
3af23c82 | 5235 | if(fFFMode) ffbckghistoleading->FillFF( trackPt, leadTrackPt , incrementJetPt, normFactor3Jets ); |
67e37e80 | 5236 | if(fIJMode) ijbckghistoleading->FillIntraJet( trackV, leadTrackV,normFactor3Jets ); |
5237 | } | |
5238 | delete trackV; | |
5239 | } | |
5240 | } | |
5241 | ||
5242 | if(type==kBckgClusters) | |
5243 | { | |
5244 | // To be implemented | |
5245 | } | |
5246 | ||
5247 | delete tracklistout2jets; | |
5248 | delete tracklistout3jets; | |
5249 | delete tracklistout2jetsStat; | |
5250 | delete tracklistout3jetsStat; | |
5251 | ||
5252 | } | |
3af23c82 | 5253 | |
5254 | // ______________________________________________________________________________________________________________________________________________________ | |
5255 | AliAODJet* AliAnalysisTaskFragmentationFunction::GetAODBckgSubJet(AliAODJet* jet, Int_t method) | |
5256 | { | |
5257 | // correct jet pt for (mean bgr energy density) x (jet area) | |
5258 | ||
5259 | static AliAODJetEventBackground* externalBackground = (AliAODJetEventBackground*)(fAOD->FindListObject(fBranchRecBackJets.Data())); | |
5260 | ||
5261 | if(!externalBackground){ | |
5262 | if(fDebug>0)Printf("%s:%d no such background branch %s",(char*)__FILE__,__LINE__,fBranchRecBackJets.Data()); | |
5263 | return 0; | |
5264 | } | |
5265 | ||
5266 | Float_t rho = externalBackground->GetBackground(method); | |
5267 | ||
5268 | // Calculate background and subtract it from jet pt | |
5269 | Float_t ptBack = rho*jet->EffectiveAreaCharged(); | |
5270 | Float_t ptSub = jet->Pt()-ptBack; | |
5271 | ||
5272 | // Get px, py, pz from eta, phi, pt | |
5273 | TLorentzVector vecSub; | |
5274 | AliAODJet *tmpJet = 0; | |
5275 | if(ptSub>=0){ | |
5276 | vecSub.SetPtEtaPhiM(ptSub,jet->Eta(),jet->Phi(),0.); | |
5277 | tmpJet = new AliAODJet(vecSub.Px(),vecSub.Py(),vecSub.Pz(),vecSub.P()); | |
5278 | } | |
5279 | ||
5280 | return tmpJet; | |
5281 | ||
5282 | } | |
5283 | ||
5284 |