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