Add sigma2 jet shape and fill constituent info. for subtracted jets
[u/mrichter/AliRoot.git] / PWGJE / UserTasks / AliAnalysisTaskIDFragmentationFunction.cxx
CommitLineData
e131b05f 1// *************************************************************************
2// * *
3// * Task for ID Fragmentation Function Analysis *
4// * *
5// *************************************************************************
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"
28#include "TH3F.h"
29#include "TString.h"
30#include "THnSparse.h"
31#include "TProfile.h"
32#include "TFile.h"
33#include "TKey.h"
34#include "TRandom3.h"
35#include "TAxis.h"
36
37#include "AliAODInputHandler.h"
38#include "AliAODHandler.h"
39#include "AliESDEvent.h"
40#include "AliAODMCParticle.h"
41#include "AliAODJet.h"
42#include "AliAODJetEventBackground.h"
43#include "AliGenPythiaEventHeader.h"
44#include "AliGenHijingEventHeader.h"
45#include "AliInputEventHandler.h"
46
47#include "AliAnalysisHelperJetTasks.h"
48#include "AliAnalysisManager.h"
49#include "AliAnalysisTaskSE.h"
a2a9d6d2 50#include "AliAnalysisUtils.h"
e131b05f 51#include "AliVParticle.h"
52#include "AliVEvent.h"
53
54#include "AliAnalysisTaskPID.h"
55#include "AliPIDResponse.h"
56
57#include "AliAnalysisTaskIDFragmentationFunction.h"
58using std::cout;
59using std::endl;
60using std::cerr;
61
62ClassImp(AliAnalysisTaskIDFragmentationFunction)
63
64//____________________________________________________________________________
65AliAnalysisTaskIDFragmentationFunction::AliAnalysisTaskIDFragmentationFunction()
66 : AliAnalysisTaskSE()
67 ,fESD(0)
68 ,fAOD(0)
69 ,fAODJets(0)
70 ,fAODExtension(0)
71 ,fNonStdFile("")
72 ,fBranchRecJets("jets")
73 ,fBranchRecBckgClusters("")
74 ,fBranchGenJets("")
75 ,fBranchEmbeddedJets("")
76 ,fTrackTypeGen(0)
77 ,fJetTypeGen(0)
78 ,fJetTypeRecEff(0)
79 ,fUseAODInputJets(kTRUE)
80 ,fFilterMask(0)
81 ,fUsePhysicsSelection(kTRUE)
82 ,fEvtSelectionMask(0)
83 ,fEventClass(0)
84 ,fMaxVertexZ(10)
85 ,fTrackPtCut(0)
86 ,fTrackEtaMin(0)
87 ,fTrackEtaMax(0)
88 ,fTrackPhiMin(0)
89 ,fTrackPhiMax(0)
90 ,fUseExtraTracks(0)
91 ,fUseExtraTracksBgr(0)
92 ,fCutFractionPtEmbedded(0)
93 ,fUseEmbeddedJetAxis(0)
94 ,fUseEmbeddedJetPt(0)
95 ,fJetPtCut(0)
96 ,fJetEtaMin(0)
97 ,fJetEtaMax(0)
98 ,fJetPhiMin(0)
99 ,fJetPhiMax(0)
100 ,fFFRadius(0)
101 ,fFFMinLTrackPt(-1)
102 ,fFFMaxTrackPt(-1)
103 ,fFFMinnTracks(0)
104 ,fFFBckgRadius(0)
105 ,fBckgMode(0)
106 ,fQAMode(0)
107 ,fFFMode(0)
108 ,fIDFFMode(0)
109 ,fEffMode(0)
110 ,fJSMode(0)
111 ,fAvgTrials(0)
112 ,fTracksRecCuts(0)
113 ,fTracksRecCutsEfficiency(0)
114 ,fTracksGen(0)
115 ,fTracksAODMCCharged(0)
116 ,fTracksAODMCChargedSecNS(0)
117 ,fTracksAODMCChargedSecS(0)
118 ,fTracksRecQualityCuts(0)
119 ,fJetsRec(0)
120 ,fJetsRecCuts(0)
121 ,fJetsGen(0)
122 ,fJetsRecEff(0)
123 ,fJetsEmbedded(0)
124 ,fBckgJetsRec(0)
125 ,fBckgJetsRecCuts(0)
126 ,fBckgJetsGen(0)
127 ,fQATrackHistosRecCuts(0)
128 ,fQATrackHistosGen(0)
129 ,fQAJetHistosRec(0)
130 ,fQAJetHistosRecCuts(0)
131 ,fQAJetHistosRecCutsLeading(0)
132 ,fQAJetHistosGen(0)
133 ,fQAJetHistosGenLeading(0)
134 ,fQAJetHistosRecEffLeading(0)
135 ,fFFHistosRecCuts(0)
136 ,fFFHistosRecCutsInc(0)
137 ,fFFHistosRecLeadingTrack(0)
138 ,fFFHistosGen(0)
139 ,fFFHistosGenInc(0)
140 ,fFFHistosGenLeadingTrack(0)
141 ,fQATrackHighPtThreshold(0)
142 ,fFFNBinsJetPt(0)
143 ,fFFJetPtMin(0)
144 ,fFFJetPtMax(0)
145 ,fFFNBinsPt(0)
146 ,fFFPtMin(0)
147 ,fFFPtMax(0)
148 ,fFFNBinsXi(0)
149 ,fFFXiMin(0)
150 ,fFFXiMax(0)
151 ,fFFNBinsZ(0)
152 ,fFFZMin(0)
153 ,fFFZMax(0)
154 ,fQAJetNBinsPt(0)
155 ,fQAJetPtMin(0)
156 ,fQAJetPtMax(0)
157 ,fQAJetNBinsEta(0)
158 ,fQAJetEtaMin(0)
159 ,fQAJetEtaMax(0)
160 ,fQAJetNBinsPhi(0)
161 ,fQAJetPhiMin(0)
162 ,fQAJetPhiMax(0)
163 ,fQATrackNBinsPt(0)
164 ,fQATrackPtMin(0)
165 ,fQATrackPtMax(0)
166 ,fQATrackNBinsEta(0)
167 ,fQATrackEtaMin(0)
168 ,fQATrackEtaMax(0)
169 ,fQATrackNBinsPhi(0)
170 ,fQATrackPhiMin(0)
171 ,fQATrackPhiMax(0)
172 ,fCommonHistList(0)
173 ,fh1EvtSelection(0)
2b81de61 174 ,fh1VtxSelection(0)
e131b05f 175 ,fh1VertexNContributors(0)
176 ,fh1VertexZ(0)
177 ,fh1EvtMult(0)
178 ,fh1EvtCent(0)
179 ,fh1Xsec(0)
180 ,fh1Trials(0)
181 ,fh1PtHard(0)
182 ,fh1PtHardTrials(0)
183 ,fh1nRecJetsCuts(0)
184 ,fh1nGenJets(0)
185 ,fh1nRecEffJets(0)
186 ,fh1nEmbeddedJets(0)
187 ,fh1nRecBckgJetsCuts(0)
188 ,fh1nGenBckgJets(0)
189 ,fh2PtRecVsGenPrim(0)
190 ,fh2PtRecVsGenSec(0)
265e4931 191 ,fhDCA_XY(0)
192 ,fhDCA_Z(0)
630a4bcd 193 ,fhJetPtRefMultEta5(0)
194 ,fhJetPtRefMultEta8(0)
a2a9d6d2 195 ,fhJetPtMultPercent(0)
e131b05f 196 ,fQATrackHistosRecEffGen(0)
197 ,fQATrackHistosRecEffRec(0)
198 ,fQATrackHistosSecRecNS(0)
199 ,fQATrackHistosSecRecS(0)
200 ,fQATrackHistosSecRecSsc(0)
201 ,fFFHistosRecEffRec(0)
202 ,fFFHistosSecRecNS(0)
203 ,fFFHistosSecRecS(0)
204 ,fFFHistosSecRecSsc(0)
205 // Background
206 ,fh1BckgMult0(0)
207 ,fh1BckgMult1(0)
208 ,fh1BckgMult2(0)
209 ,fh1BckgMult3(0)
210 ,fh1BckgMult4(0)
211 ,fh1FractionPtEmbedded(0)
212 ,fh1IndexEmbedded(0)
213 ,fh2DeltaPtVsJetPtEmbedded(0)
214 ,fh2DeltaPtVsRecJetPtEmbedded(0)
215 ,fh1DeltaREmbedded(0)
216 ,fQABckgHisto0RecCuts(0)
217 ,fQABckgHisto0Gen(0)
218 ,fQABckgHisto1RecCuts(0)
219 ,fQABckgHisto1Gen(0)
220 ,fQABckgHisto2RecCuts(0)
221 ,fQABckgHisto2Gen(0)
222 ,fQABckgHisto3RecCuts(0)
223 ,fQABckgHisto3Gen(0)
224 ,fQABckgHisto4RecCuts(0)
225 ,fQABckgHisto4Gen(0)
226 ,fFFBckgHisto0RecCuts(0)
227 ,fFFBckgHisto0Gen(0)
228 ,fFFBckgHisto1RecCuts(0)
229 ,fFFBckgHisto1Gen(0)
230 ,fFFBckgHisto2RecCuts(0)
231 ,fFFBckgHisto2Gen(0)
232 ,fFFBckgHisto3RecCuts(0)
233 ,fFFBckgHisto3Gen(0)
234 ,fFFBckgHisto4RecCuts(0)
235 ,fFFBckgHisto4Gen(0)
236 ,fFFBckgHisto0RecEffRec(0)
237 ,fFFBckgHisto0SecRecNS(0)
238 ,fFFBckgHisto0SecRecS(0)
239 ,fFFBckgHisto0SecRecSsc(0)
240 // jet shape
241 ,fProNtracksLeadingJet(0)
242 ,fProDelR80pcPt(0)
243 ,fProNtracksLeadingJetGen(0)
244 ,fProDelR80pcPtGen(0)
245 ,fProNtracksLeadingJetBgrPerp2(0)
246 ,fProNtracksLeadingJetRecPrim(0)
247 ,fProDelR80pcPtRecPrim(0)
248 ,fProNtracksLeadingJetRecSecNS(0)
249 ,fProNtracksLeadingJetRecSecS(0)
250 ,fProNtracksLeadingJetRecSecSsc(0)
251
252 ,fRandom(0)
253
c4856fb1 254 ,fOnlyLeadingJets(kFALSE)
255
a2a9d6d2 256 ,fAnaUtils(0)
257
e131b05f 258 // PID framework
259 ,fNumInclusivePIDtasks(0)
260 ,fNumJetPIDtasks(0)
261 ,fNameInclusivePIDtask(0x0)
262 ,fNameJetPIDtask(0x0)
263 ,fInclusivePIDtask(0x0)
264 ,fJetPIDtask(0x0)
265 ,fUseInclusivePIDtask(kFALSE)
266 ,fUseJetPIDtask(kFALSE)
267 ,fIsPP(kFALSE)
268{
269 // default constructor
270 fBckgType[0] = 0;
271 fBckgType[1] = 0;
272 fBckgType[2] = 0;
273 fBckgType[3] = 0;
274 fBckgType[4] = 0;
275
276 for(Int_t ii=0; ii<5; ii++){
277 fProDelRPtSum[ii] = 0;
278 fProDelRPtSumGen[ii] = 0;
279 fProDelRPtSumBgrPerp2[ii] = 0;
280 fProDelRPtSumRecPrim[ii] = 0;
281 fProDelRPtSumRecSecNS[ii] = 0;
282 fProDelRPtSumRecSecS[ii] = 0;
283 fProDelRPtSumRecSecSsc[ii] = 0;
284 }
285
286 for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
287 fIDFFHistosRecCuts[i] = 0x0;
288 fIDFFHistosGen[i] = 0x0;
265e4931 289
290 fhDCA_XY_prim_MCID[i] = 0x0;
291 fhDCA_Z_prim_MCID[i] = 0x0;
292
293 fhDCA_XY_sec_MCID[i] = 0x0;
294 fhDCA_Z_sec_MCID[i] = 0x0;
e131b05f 295 }
296}
297
298//_______________________________________________________________________________________________
299AliAnalysisTaskIDFragmentationFunction::AliAnalysisTaskIDFragmentationFunction(const char *name)
300 : AliAnalysisTaskSE(name)
301 ,fESD(0)
302 ,fAOD(0)
303 ,fAODJets(0)
304 ,fAODExtension(0)
305 ,fNonStdFile("")
306 ,fBranchRecJets("jets")
307 ,fBranchRecBckgClusters("")
308 ,fBranchGenJets("")
309 ,fBranchEmbeddedJets("")
310 ,fTrackTypeGen(0)
311 ,fJetTypeGen(0)
312 ,fJetTypeRecEff(0)
313 ,fUseAODInputJets(kTRUE)
314 ,fFilterMask(0)
315 ,fUsePhysicsSelection(kTRUE)
316 ,fEvtSelectionMask(0)
317 ,fEventClass(0)
318 ,fMaxVertexZ(10)
319 ,fTrackPtCut(0)
320 ,fTrackEtaMin(0)
321 ,fTrackEtaMax(0)
322 ,fTrackPhiMin(0)
323 ,fTrackPhiMax(0)
324 ,fUseExtraTracks(0)
325 ,fUseExtraTracksBgr(0)
326 ,fCutFractionPtEmbedded(0)
327 ,fUseEmbeddedJetAxis(0)
328 ,fUseEmbeddedJetPt(0)
329 ,fJetPtCut(0)
330 ,fJetEtaMin(0)
331 ,fJetEtaMax(0)
332 ,fJetPhiMin(0)
333 ,fJetPhiMax(0)
334 ,fFFRadius(0)
335 ,fFFMinLTrackPt(-1)
336 ,fFFMaxTrackPt(-1)
337 ,fFFMinnTracks(0)
338 ,fFFBckgRadius(0)
339 ,fBckgMode(0)
340 ,fQAMode(0)
341 ,fFFMode(0)
342 ,fIDFFMode(0)
343 ,fEffMode(0)
344 ,fJSMode(0)
345 ,fAvgTrials(0)
346 ,fTracksRecCuts(0)
347 ,fTracksRecCutsEfficiency(0)
348 ,fTracksGen(0)
349 ,fTracksAODMCCharged(0)
350 ,fTracksAODMCChargedSecNS(0)
351 ,fTracksAODMCChargedSecS(0)
352 ,fTracksRecQualityCuts(0)
353 ,fJetsRec(0)
354 ,fJetsRecCuts(0)
355 ,fJetsGen(0)
356 ,fJetsRecEff(0)
357 ,fJetsEmbedded(0)
358 ,fBckgJetsRec(0)
359 ,fBckgJetsRecCuts(0)
360 ,fBckgJetsGen(0)
361 ,fQATrackHistosRecCuts(0)
362 ,fQATrackHistosGen(0)
363 ,fQAJetHistosRec(0)
364 ,fQAJetHistosRecCuts(0)
365 ,fQAJetHistosRecCutsLeading(0)
366 ,fQAJetHistosGen(0)
367 ,fQAJetHistosGenLeading(0)
368 ,fQAJetHistosRecEffLeading(0)
369 ,fFFHistosRecCuts(0)
370 ,fFFHistosRecCutsInc(0)
371 ,fFFHistosRecLeadingTrack(0)
372 ,fFFHistosGen(0)
373 ,fFFHistosGenInc(0)
374 ,fFFHistosGenLeadingTrack(0)
375 ,fQATrackHighPtThreshold(0)
376 ,fFFNBinsJetPt(0)
377 ,fFFJetPtMin(0)
378 ,fFFJetPtMax(0)
379 ,fFFNBinsPt(0)
380 ,fFFPtMin(0)
381 ,fFFPtMax(0)
382 ,fFFNBinsXi(0)
383 ,fFFXiMin(0)
384 ,fFFXiMax(0)
385 ,fFFNBinsZ(0)
386 ,fFFZMin(0)
387 ,fFFZMax(0)
388 ,fQAJetNBinsPt(0)
389 ,fQAJetPtMin(0)
390 ,fQAJetPtMax(0)
391 ,fQAJetNBinsEta(0)
392 ,fQAJetEtaMin(0)
393 ,fQAJetEtaMax(0)
394 ,fQAJetNBinsPhi(0)
395 ,fQAJetPhiMin(0)
396 ,fQAJetPhiMax(0)
397 ,fQATrackNBinsPt(0)
398 ,fQATrackPtMin(0)
399 ,fQATrackPtMax(0)
400 ,fQATrackNBinsEta(0)
401 ,fQATrackEtaMin(0)
402 ,fQATrackEtaMax(0)
403 ,fQATrackNBinsPhi(0)
404 ,fQATrackPhiMin(0)
405 ,fQATrackPhiMax(0)
406 ,fCommonHistList(0)
407 ,fh1EvtSelection(0)
2b81de61 408 ,fh1VtxSelection(0)
e131b05f 409 ,fh1VertexNContributors(0)
410 ,fh1VertexZ(0)
411 ,fh1EvtMult(0)
412 ,fh1EvtCent(0)
413 ,fh1Xsec(0)
414 ,fh1Trials(0)
415 ,fh1PtHard(0)
416 ,fh1PtHardTrials(0)
417 ,fh1nRecJetsCuts(0)
418 ,fh1nGenJets(0)
419 ,fh1nRecEffJets(0)
420 ,fh1nEmbeddedJets(0)
421 ,fh1nRecBckgJetsCuts(0)
422 ,fh1nGenBckgJets(0)
423 ,fh2PtRecVsGenPrim(0)
424 ,fh2PtRecVsGenSec(0)
265e4931 425 ,fhDCA_XY(0)
426 ,fhDCA_Z(0)
630a4bcd 427 ,fhJetPtRefMultEta5(0)
428 ,fhJetPtRefMultEta8(0)
a2a9d6d2 429 ,fhJetPtMultPercent(0)
e131b05f 430 ,fQATrackHistosRecEffGen(0)
431 ,fQATrackHistosRecEffRec(0)
432 ,fQATrackHistosSecRecNS(0)
433 ,fQATrackHistosSecRecS(0)
434 ,fQATrackHistosSecRecSsc(0)
435 ,fFFHistosRecEffRec(0)
436 ,fFFHistosSecRecNS(0)
437 ,fFFHistosSecRecS(0)
438 ,fFFHistosSecRecSsc(0)
439 // Background
440 ,fh1BckgMult0(0)
441 ,fh1BckgMult1(0)
442 ,fh1BckgMult2(0)
443 ,fh1BckgMult3(0)
444 ,fh1BckgMult4(0)
445 ,fh1FractionPtEmbedded(0)
446 ,fh1IndexEmbedded(0)
447 ,fh2DeltaPtVsJetPtEmbedded(0)
448 ,fh2DeltaPtVsRecJetPtEmbedded(0)
449 ,fh1DeltaREmbedded(0)
450 ,fQABckgHisto0RecCuts(0)
451 ,fQABckgHisto0Gen(0)
452 ,fQABckgHisto1RecCuts(0)
453 ,fQABckgHisto1Gen(0)
454 ,fQABckgHisto2RecCuts(0)
455 ,fQABckgHisto2Gen(0)
456 ,fQABckgHisto3RecCuts(0)
457 ,fQABckgHisto3Gen(0)
458 ,fQABckgHisto4RecCuts(0)
459 ,fQABckgHisto4Gen(0)
460 ,fFFBckgHisto0RecCuts(0)
461 ,fFFBckgHisto0Gen(0)
462 ,fFFBckgHisto1RecCuts(0)
463 ,fFFBckgHisto1Gen(0)
464 ,fFFBckgHisto2RecCuts(0)
465 ,fFFBckgHisto2Gen(0)
466 ,fFFBckgHisto3RecCuts(0)
467 ,fFFBckgHisto3Gen(0)
468 ,fFFBckgHisto4RecCuts(0)
469 ,fFFBckgHisto4Gen(0)
470 ,fFFBckgHisto0RecEffRec(0)
471 ,fFFBckgHisto0SecRecNS(0)
472 ,fFFBckgHisto0SecRecS(0)
473 ,fFFBckgHisto0SecRecSsc(0)
474 // jet shape
475 ,fProNtracksLeadingJet(0)
476 ,fProDelR80pcPt(0)
477 ,fProNtracksLeadingJetGen(0)
478 ,fProDelR80pcPtGen(0)
479 ,fProNtracksLeadingJetBgrPerp2(0)
480 ,fProNtracksLeadingJetRecPrim(0)
481 ,fProDelR80pcPtRecPrim(0)
482 ,fProNtracksLeadingJetRecSecNS(0)
483 ,fProNtracksLeadingJetRecSecS(0)
484 ,fProNtracksLeadingJetRecSecSsc(0)
485 ,fRandom(0)
c4856fb1 486 ,fOnlyLeadingJets(kFALSE)
a2a9d6d2 487 ,fAnaUtils(0)
e131b05f 488 // PID framework
489 ,fNumInclusivePIDtasks(0)
490 ,fNumJetPIDtasks(0)
491 ,fNameInclusivePIDtask(0x0)
492 ,fNameJetPIDtask(0x0)
493 ,fInclusivePIDtask(0x0)
494 ,fJetPIDtask(0x0)
495 ,fUseInclusivePIDtask(kFALSE)
496 ,fUseJetPIDtask(kFALSE)
497 ,fIsPP(kFALSE)
498{
499 // constructor
500 fBckgType[0] = 0;
501 fBckgType[1] = 0;
502 fBckgType[2] = 0;
503 fBckgType[3] = 0;
504 fBckgType[4] = 0;
505
506 for(Int_t ii=0; ii<5; ii++){
507 fProDelRPtSum[ii] = 0;
508 fProDelRPtSumGen[ii] = 0;
509 fProDelRPtSumBgrPerp2[ii] = 0;
510 fProDelRPtSumRecPrim[ii] = 0;
511 fProDelRPtSumRecSecNS[ii] = 0;
512 fProDelRPtSumRecSecS[ii] = 0;
513 fProDelRPtSumRecSecSsc[ii] = 0;
514 }
515
516 for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
517 fIDFFHistosRecCuts[i] = 0x0;
518 fIDFFHistosGen[i] = 0x0;
265e4931 519
520 fhDCA_XY_prim_MCID[i] = 0x0;
521 fhDCA_Z_prim_MCID[i] = 0x0;
522
523 fhDCA_XY_sec_MCID[i] = 0x0;
524 fhDCA_Z_sec_MCID[i] = 0x0;
e131b05f 525 }
526
527 DefineOutput(1,TList::Class());
528}
529
530//__________________________________________________________________________________________________________________________
531AliAnalysisTaskIDFragmentationFunction::AliAnalysisTaskIDFragmentationFunction(const AliAnalysisTaskIDFragmentationFunction &copy)
532 : AliAnalysisTaskSE()
533 ,fESD(copy.fESD)
534 ,fAOD(copy.fAOD)
535 ,fAODJets(copy.fAODJets)
536 ,fAODExtension(copy.fAODExtension)
537 ,fNonStdFile(copy.fNonStdFile)
538 ,fBranchRecJets(copy.fBranchRecJets)
539 ,fBranchRecBckgClusters(copy.fBranchRecBckgClusters)
540 ,fBranchGenJets(copy.fBranchGenJets)
541 ,fBranchEmbeddedJets(copy.fBranchEmbeddedJets)
542 ,fTrackTypeGen(copy.fTrackTypeGen)
543 ,fJetTypeGen(copy.fJetTypeGen)
544 ,fJetTypeRecEff(copy.fJetTypeRecEff)
545 ,fUseAODInputJets(copy.fUseAODInputJets)
546 ,fFilterMask(copy.fFilterMask)
547 ,fUsePhysicsSelection(copy.fUsePhysicsSelection)
548 ,fEvtSelectionMask(copy.fEvtSelectionMask)
549 ,fEventClass(copy.fEventClass)
550 ,fMaxVertexZ(copy.fMaxVertexZ)
551 ,fTrackPtCut(copy.fTrackPtCut)
552 ,fTrackEtaMin(copy.fTrackEtaMin)
553 ,fTrackEtaMax(copy.fTrackEtaMax)
554 ,fTrackPhiMin(copy.fTrackPhiMin)
555 ,fTrackPhiMax(copy.fTrackPhiMax)
556 ,fUseExtraTracks(copy.fUseExtraTracks)
557 ,fUseExtraTracksBgr(copy.fUseExtraTracksBgr)
558 ,fCutFractionPtEmbedded(copy.fCutFractionPtEmbedded)
559 ,fUseEmbeddedJetAxis(copy.fUseEmbeddedJetAxis)
560 ,fUseEmbeddedJetPt(copy.fUseEmbeddedJetPt)
561 ,fJetPtCut(copy.fJetPtCut)
562 ,fJetEtaMin(copy.fJetEtaMin)
563 ,fJetEtaMax(copy.fJetEtaMax)
564 ,fJetPhiMin(copy.fJetPhiMin)
565 ,fJetPhiMax(copy.fJetPhiMax)
566 ,fFFRadius(copy.fFFRadius)
567 ,fFFMinLTrackPt(copy.fFFMinLTrackPt)
568 ,fFFMaxTrackPt(copy.fFFMaxTrackPt)
569 ,fFFMinnTracks(copy.fFFMinnTracks)
570 ,fFFBckgRadius(copy.fFFBckgRadius)
571 ,fBckgMode(copy.fBckgMode)
572 ,fQAMode(copy.fQAMode)
573 ,fFFMode(copy.fFFMode)
574 ,fIDFFMode(copy.fIDFFMode)
575 ,fEffMode(copy.fEffMode)
576 ,fJSMode(copy.fJSMode)
577 ,fAvgTrials(copy.fAvgTrials)
578 ,fTracksRecCuts(copy.fTracksRecCuts)
579 ,fTracksRecCutsEfficiency(copy.fTracksRecCutsEfficiency)
580 ,fTracksGen(copy.fTracksGen)
581 ,fTracksAODMCCharged(copy.fTracksAODMCCharged)
582 ,fTracksAODMCChargedSecNS(copy.fTracksAODMCChargedSecNS)
583 ,fTracksAODMCChargedSecS(copy.fTracksAODMCChargedSecS)
584 ,fTracksRecQualityCuts(copy.fTracksRecQualityCuts)
585 ,fJetsRec(copy.fJetsRec)
586 ,fJetsRecCuts(copy.fJetsRecCuts)
587 ,fJetsGen(copy.fJetsGen)
588 ,fJetsRecEff(copy.fJetsRecEff)
589 ,fJetsEmbedded(copy.fJetsEmbedded)
590 ,fBckgJetsRec(copy.fBckgJetsRec)
591 ,fBckgJetsRecCuts(copy.fBckgJetsRecCuts)
592 ,fBckgJetsGen(copy.fBckgJetsGen)
593 ,fQATrackHistosRecCuts(copy.fQATrackHistosRecCuts)
594 ,fQATrackHistosGen(copy.fQATrackHistosGen)
595 ,fQAJetHistosRec(copy.fQAJetHistosRec)
596 ,fQAJetHistosRecCuts(copy.fQAJetHistosRecCuts)
597 ,fQAJetHistosRecCutsLeading(copy.fQAJetHistosRecCutsLeading)
598 ,fQAJetHistosGen(copy.fQAJetHistosGen)
599 ,fQAJetHistosGenLeading(copy.fQAJetHistosGenLeading)
600 ,fQAJetHistosRecEffLeading(copy.fQAJetHistosRecEffLeading)
601 ,fFFHistosRecCuts(copy.fFFHistosRecCuts)
602 ,fFFHistosRecCutsInc(copy.fFFHistosRecCutsInc)
603 ,fFFHistosRecLeadingTrack(copy.fFFHistosRecLeadingTrack)
604 ,fFFHistosGen(copy.fFFHistosGen)
605 ,fFFHistosGenInc(copy.fFFHistosGenInc)
606 ,fFFHistosGenLeadingTrack(copy.fFFHistosGenLeadingTrack)
607 ,fQATrackHighPtThreshold(copy.fQATrackHighPtThreshold)
608 ,fFFNBinsJetPt(copy.fFFNBinsJetPt)
609 ,fFFJetPtMin(copy.fFFJetPtMin)
610 ,fFFJetPtMax(copy.fFFJetPtMax)
611 ,fFFNBinsPt(copy.fFFNBinsPt)
612 ,fFFPtMin(copy.fFFPtMin)
613 ,fFFPtMax(copy.fFFPtMax)
614 ,fFFNBinsXi(copy.fFFNBinsXi)
615 ,fFFXiMin(copy.fFFXiMin)
616 ,fFFXiMax(copy.fFFXiMax)
617 ,fFFNBinsZ(copy.fFFNBinsZ)
618 ,fFFZMin(copy.fFFZMin)
619 ,fFFZMax(copy.fFFZMax)
620 ,fQAJetNBinsPt(copy.fQAJetNBinsPt)
621 ,fQAJetPtMin(copy.fQAJetPtMin)
622 ,fQAJetPtMax(copy.fQAJetPtMax)
623 ,fQAJetNBinsEta(copy.fQAJetNBinsEta)
624 ,fQAJetEtaMin(copy.fQAJetEtaMin)
625 ,fQAJetEtaMax(copy.fQAJetEtaMax)
626 ,fQAJetNBinsPhi(copy.fQAJetNBinsPhi)
627 ,fQAJetPhiMin(copy.fQAJetPhiMin)
628 ,fQAJetPhiMax(copy.fQAJetPhiMax)
629 ,fQATrackNBinsPt(copy.fQATrackNBinsPt)
630 ,fQATrackPtMin(copy.fQATrackPtMin)
631 ,fQATrackPtMax(copy.fQATrackPtMax)
632 ,fQATrackNBinsEta(copy.fQATrackNBinsEta)
633 ,fQATrackEtaMin(copy.fQATrackEtaMin)
634 ,fQATrackEtaMax(copy.fQATrackEtaMax)
635 ,fQATrackNBinsPhi(copy.fQATrackNBinsPhi)
636 ,fQATrackPhiMin(copy.fQATrackPhiMin)
637 ,fQATrackPhiMax(copy.fQATrackPhiMax)
638 ,fCommonHistList(copy.fCommonHistList)
639 ,fh1EvtSelection(copy.fh1EvtSelection)
2b81de61 640 ,fh1VtxSelection(copy.fh1VtxSelection)
e131b05f 641 ,fh1VertexNContributors(copy.fh1VertexNContributors)
642 ,fh1VertexZ(copy.fh1VertexZ)
643 ,fh1EvtMult(copy.fh1EvtMult)
644 ,fh1EvtCent(copy.fh1EvtCent)
645 ,fh1Xsec(copy.fh1Xsec)
646 ,fh1Trials(copy.fh1Trials)
647 ,fh1PtHard(copy.fh1PtHard)
648 ,fh1PtHardTrials(copy.fh1PtHardTrials)
649 ,fh1nRecJetsCuts(copy.fh1nRecJetsCuts)
650 ,fh1nGenJets(copy.fh1nGenJets)
651 ,fh1nRecEffJets(copy.fh1nRecEffJets)
652 ,fh1nEmbeddedJets(copy.fh1nEmbeddedJets)
653 ,fh1nRecBckgJetsCuts(copy.fh1nRecBckgJetsCuts)
654 ,fh1nGenBckgJets(copy.fh1nGenBckgJets)
655 ,fh2PtRecVsGenPrim(copy.fh2PtRecVsGenPrim)
656 ,fh2PtRecVsGenSec(copy.fh2PtRecVsGenSec)
265e4931 657 ,fhDCA_XY(copy.fhDCA_XY)
658 ,fhDCA_Z(copy.fhDCA_Z)
630a4bcd 659 ,fhJetPtRefMultEta5(copy.fhJetPtRefMultEta5)
660 ,fhJetPtRefMultEta8(copy.fhJetPtRefMultEta8)
a2a9d6d2 661 ,fhJetPtMultPercent(copy.fhJetPtMultPercent)
e131b05f 662 ,fQATrackHistosRecEffGen(copy.fQATrackHistosRecEffGen)
663 ,fQATrackHistosRecEffRec(copy.fQATrackHistosRecEffRec)
664 ,fQATrackHistosSecRecNS(copy.fQATrackHistosSecRecNS)
665 ,fQATrackHistosSecRecS(copy.fQATrackHistosSecRecS)
666 ,fQATrackHistosSecRecSsc(copy.fQATrackHistosSecRecSsc)
667 ,fFFHistosRecEffRec(copy.fFFHistosRecEffRec)
668 ,fFFHistosSecRecNS(copy.fFFHistosSecRecNS)
669 ,fFFHistosSecRecS(copy.fFFHistosSecRecS)
670 ,fFFHistosSecRecSsc(copy.fFFHistosSecRecSsc)
671 // Background
672 ,fh1BckgMult0(copy.fh1BckgMult0)
673 ,fh1BckgMult1(copy.fh1BckgMult1)
674 ,fh1BckgMult2(copy.fh1BckgMult2)
675 ,fh1BckgMult3(copy.fh1BckgMult3)
676 ,fh1BckgMult4(copy.fh1BckgMult4)
677 ,fh1FractionPtEmbedded(copy.fh1FractionPtEmbedded)
678 ,fh1IndexEmbedded(copy.fh1IndexEmbedded)
679 ,fh2DeltaPtVsJetPtEmbedded(copy.fh2DeltaPtVsJetPtEmbedded)
680 ,fh2DeltaPtVsRecJetPtEmbedded(copy.fh2DeltaPtVsRecJetPtEmbedded)
681 ,fh1DeltaREmbedded(copy.fh1DeltaREmbedded)
682 ,fQABckgHisto0RecCuts(copy.fQABckgHisto0RecCuts)
683 ,fQABckgHisto0Gen(copy.fQABckgHisto0Gen)
684 ,fQABckgHisto1RecCuts(copy.fQABckgHisto1RecCuts)
685 ,fQABckgHisto1Gen(copy.fQABckgHisto1Gen)
686 ,fQABckgHisto2RecCuts(copy.fQABckgHisto2RecCuts)
687 ,fQABckgHisto2Gen(copy.fQABckgHisto2Gen)
688 ,fQABckgHisto3RecCuts(copy.fQABckgHisto3RecCuts)
689 ,fQABckgHisto3Gen(copy.fQABckgHisto3Gen)
690 ,fQABckgHisto4RecCuts(copy.fQABckgHisto4RecCuts)
691 ,fQABckgHisto4Gen(copy.fQABckgHisto4Gen)
692 ,fFFBckgHisto0RecCuts(copy.fFFBckgHisto0RecCuts)
693 ,fFFBckgHisto0Gen(copy.fFFBckgHisto0Gen)
694 ,fFFBckgHisto1RecCuts(copy.fFFBckgHisto1RecCuts)
695 ,fFFBckgHisto1Gen(copy.fFFBckgHisto1Gen)
696 ,fFFBckgHisto2RecCuts(copy.fFFBckgHisto2RecCuts)
697 ,fFFBckgHisto2Gen(copy.fFFBckgHisto2Gen)
698 ,fFFBckgHisto3RecCuts(copy.fFFBckgHisto3RecCuts)
699 ,fFFBckgHisto3Gen(copy.fFFBckgHisto3Gen)
700 ,fFFBckgHisto4RecCuts(copy.fFFBckgHisto4RecCuts)
701 ,fFFBckgHisto4Gen(copy.fFFBckgHisto4Gen)
702 ,fFFBckgHisto0RecEffRec(copy.fFFBckgHisto0RecEffRec)
703 ,fFFBckgHisto0SecRecNS(copy.fFFBckgHisto0SecRecNS)
704 ,fFFBckgHisto0SecRecS(copy.fFFBckgHisto0SecRecS)
705 ,fFFBckgHisto0SecRecSsc(copy.fFFBckgHisto0SecRecSsc)
706 // jet shape
707 ,fProNtracksLeadingJet(copy.fProNtracksLeadingJet)
708 ,fProDelR80pcPt(copy.fProDelR80pcPt)
709 ,fProNtracksLeadingJetGen(copy.fProNtracksLeadingJetGen)
710 ,fProDelR80pcPtGen(copy.fProDelR80pcPtGen)
711 ,fProNtracksLeadingJetBgrPerp2(copy.fProNtracksLeadingJetBgrPerp2)
712 ,fProNtracksLeadingJetRecPrim(copy.fProNtracksLeadingJetRecPrim)
713 ,fProDelR80pcPtRecPrim(copy.fProDelR80pcPtRecPrim)
714 ,fProNtracksLeadingJetRecSecNS(copy.fProNtracksLeadingJetRecSecNS)
715 ,fProNtracksLeadingJetRecSecS(copy.fProNtracksLeadingJetRecSecS)
716 ,fProNtracksLeadingJetRecSecSsc(copy.fProNtracksLeadingJetRecSecSsc)
717 ,fRandom(copy.fRandom)
c4856fb1 718 ,fOnlyLeadingJets(copy.fOnlyLeadingJets)
a2a9d6d2 719 ,fAnaUtils(copy.fAnaUtils)
e131b05f 720 // PID framework
721 ,fNumInclusivePIDtasks(copy.fNumInclusivePIDtasks)
722 ,fNumJetPIDtasks(copy.fNumJetPIDtasks)
723 ,fNameInclusivePIDtask(0x0)
724 ,fNameJetPIDtask(0x0)
725 ,fInclusivePIDtask(0x0)
726 ,fJetPIDtask(0x0)
727 ,fUseInclusivePIDtask(copy.fUseInclusivePIDtask)
728 ,fUseJetPIDtask(copy.fUseJetPIDtask)
729 ,fIsPP(copy.fIsPP)
730{
731 // copy constructor
732 fBckgType[0] = copy.fBckgType[0];
733 fBckgType[1] = copy.fBckgType[1];
734 fBckgType[2] = copy.fBckgType[2];
735 fBckgType[3] = copy.fBckgType[3];
736 fBckgType[4] = copy.fBckgType[4];
737
738
739 for(Int_t ii=0; ii<5; ii++){
740 fProDelRPtSum[ii] = copy.fProDelRPtSum[ii];
741 fProDelRPtSumGen[ii] = copy.fProDelRPtSumGen[ii];
742 fProDelRPtSumBgrPerp2[ii] = copy.fProDelRPtSumBgrPerp2[ii];
743 fProDelRPtSumRecPrim[ii] = copy.fProDelRPtSumRecPrim[ii];
744 fProDelRPtSumRecSecNS[ii] = copy.fProDelRPtSumRecSecNS[ii];
745 fProDelRPtSumRecSecS[ii] = copy.fProDelRPtSumRecSecS[ii];
746 fProDelRPtSumRecSecSsc[ii] = copy.fProDelRPtSumRecSecSsc[ii];
747 }
748
749 for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
750 fIDFFHistosRecCuts[i] = 0x0;
751 if (copy.fIDFFHistosRecCuts[i])
752 fIDFFHistosRecCuts[i] = copy.fIDFFHistosRecCuts[i];
753
754 fIDFFHistosGen[i] = 0x0;
755 if (copy.fIDFFHistosGen[i])
756 fIDFFHistosGen[i] = copy.fIDFFHistosGen[i];
265e4931 757
758
759 fhDCA_XY_prim_MCID[i] = 0x0;
760 if (copy.fhDCA_XY_prim_MCID[i])
761 fhDCA_XY_prim_MCID[i] = copy.fhDCA_XY_prim_MCID[i];
762
763 fhDCA_Z_prim_MCID[i] = 0x0;
764 if (copy.fhDCA_Z_prim_MCID[i])
765 fhDCA_Z_prim_MCID[i] = copy.fhDCA_Z_prim_MCID[i];
766
767 fhDCA_XY_sec_MCID[i] = 0x0;
768 if (copy.fhDCA_XY_sec_MCID[i])
769 fhDCA_XY_sec_MCID[i] = copy.fhDCA_XY_sec_MCID[i];
770
771 fhDCA_Z_sec_MCID[i] = 0x0;
772 if (copy.fhDCA_Z_sec_MCID[i])
773 fhDCA_Z_sec_MCID[i] = copy.fhDCA_Z_sec_MCID[i];
e131b05f 774 }
775
776 if (fNumInclusivePIDtasks > 0) {
777 fNameInclusivePIDtask = new TString[fNumInclusivePIDtasks];
778 fInclusivePIDtask = new AliAnalysisTaskPID*[fNumInclusivePIDtasks];
779
780 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
781 fNameInclusivePIDtask[i] = "";
782 fInclusivePIDtask[i] = 0x0;
783
784 if (copy.fNameInclusivePIDtask[i])
785 fNameInclusivePIDtask[i] = copy.fNameInclusivePIDtask[i];
786
787 if (copy.fInclusivePIDtask[i])
788 fInclusivePIDtask[i] = copy.fInclusivePIDtask[i];
789 }
790 }
791
792 if (fNumJetPIDtasks > 0) {
793 fNameJetPIDtask = new TString[fNumJetPIDtasks];
794 fJetPIDtask = new AliAnalysisTaskPID*[fNumJetPIDtasks];
795
796 for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
797 fNameJetPIDtask[i] = "";
798 fJetPIDtask[i] = 0x0;
799
800 if (copy.fNameJetPIDtask[i])
801 fNameJetPIDtask[i] = copy.fNameJetPIDtask[i];
802
803 if (copy.fJetPIDtask[i])
804 fJetPIDtask[i] = copy.fJetPIDtask[i];
805 }
806 }
807}
808
809// _________________________________________________________________________________________________________________________________
810AliAnalysisTaskIDFragmentationFunction& AliAnalysisTaskIDFragmentationFunction::operator=(const AliAnalysisTaskIDFragmentationFunction& o)
811{
812 // assignment
813
814 if(this!=&o){
815
816 AliAnalysisTaskSE::operator=(o);
817 fESD = o.fESD;
818 fAOD = o.fAOD;
819 fAODJets = o.fAODJets;
820 fAODExtension = o.fAODExtension;
821 fNonStdFile = o.fNonStdFile;
822 fBranchRecJets = o.fBranchRecJets;
823 fBranchRecBckgClusters = o.fBranchRecBckgClusters;
824 fBranchGenJets = o.fBranchGenJets;
825 fBranchEmbeddedJets = o.fBranchEmbeddedJets;
826 fTrackTypeGen = o.fTrackTypeGen;
827 fJetTypeGen = o.fJetTypeGen;
828 fJetTypeRecEff = o.fJetTypeRecEff;
829 fUseAODInputJets = o.fUseAODInputJets;
830 fFilterMask = o.fFilterMask;
831 fUsePhysicsSelection = o.fUsePhysicsSelection;
832 fEvtSelectionMask = o.fEvtSelectionMask;
833 fEventClass = o.fEventClass;
834 fMaxVertexZ = o.fMaxVertexZ;
835 fTrackPtCut = o.fTrackPtCut;
836 fTrackEtaMin = o.fTrackEtaMin;
837 fTrackEtaMax = o.fTrackEtaMax;
838 fTrackPhiMin = o.fTrackPhiMin;
839 fTrackPhiMax = o.fTrackPhiMax;
840 fUseExtraTracks = o.fUseExtraTracks;
841 fUseExtraTracksBgr = o.fUseExtraTracksBgr;
842 fCutFractionPtEmbedded = o.fCutFractionPtEmbedded;
843 fUseEmbeddedJetAxis = o.fUseEmbeddedJetAxis;
844 fUseEmbeddedJetPt = o.fUseEmbeddedJetPt;
845 fJetPtCut = o.fJetPtCut;
846 fJetEtaMin = o.fJetEtaMin;
847 fJetEtaMax = o.fJetEtaMax;
848 fJetPhiMin = o.fJetPhiMin;
849 fJetPhiMax = o.fJetPhiMin;
850 fFFRadius = o.fFFRadius;
851 fFFMinLTrackPt = o.fFFMinLTrackPt;
852 fFFMaxTrackPt = o.fFFMaxTrackPt;
853 fFFMinnTracks = o.fFFMinnTracks;
854 fFFBckgRadius = o.fFFBckgRadius;
855 fBckgMode = o.fBckgMode;
856 fQAMode = o.fQAMode;
857 fFFMode = o.fFFMode;
858 fIDFFMode = o.fIDFFMode;
859 fEffMode = o.fEffMode;
860 fJSMode = o.fJSMode;
861 fBckgType[0] = o.fBckgType[0];
862 fBckgType[1] = o.fBckgType[1];
863 fBckgType[2] = o.fBckgType[2];
864 fBckgType[3] = o.fBckgType[3];
865 fBckgType[4] = o.fBckgType[4];
866 fAvgTrials = o.fAvgTrials;
867 fTracksRecCuts = o.fTracksRecCuts;
868 fTracksRecCutsEfficiency = o.fTracksRecCutsEfficiency;
869 fTracksGen = o.fTracksGen;
870 fTracksAODMCCharged = o.fTracksAODMCCharged;
871 fTracksAODMCChargedSecNS = o.fTracksAODMCChargedSecNS;
872 fTracksAODMCChargedSecS = o.fTracksAODMCChargedSecS;
873 fTracksRecQualityCuts = o.fTracksRecQualityCuts;
874 fJetsRec = o.fJetsRec;
875 fJetsRecCuts = o.fJetsRecCuts;
876 fJetsGen = o.fJetsGen;
877 fJetsRecEff = o.fJetsRecEff;
878 fJetsEmbedded = o.fJetsEmbedded;
879 fBckgJetsRec = o.fBckgJetsRec;
880 fBckgJetsRecCuts = o.fBckgJetsRecCuts;
881 fBckgJetsGen = o.fBckgJetsGen;
882 fQATrackHistosRecCuts = o.fQATrackHistosRecCuts;
883 fQATrackHistosGen = o.fQATrackHistosGen;
884 fQAJetHistosRec = o.fQAJetHistosRec;
885 fQAJetHistosRecCuts = o.fQAJetHistosRecCuts;
886 fQAJetHistosRecCutsLeading = o.fQAJetHistosRecCutsLeading;
887 fQAJetHistosGen = o.fQAJetHistosGen;
888 fQAJetHistosGenLeading = o.fQAJetHistosGenLeading;
889 fQAJetHistosRecEffLeading = o.fQAJetHistosRecEffLeading;
890 fFFHistosRecCuts = o.fFFHistosRecCuts;
891 fFFHistosRecCutsInc = o.fFFHistosRecCutsInc;
892 fFFHistosRecLeadingTrack = o.fFFHistosRecLeadingTrack;
893 fFFHistosGen = o.fFFHistosGen;
894 fFFHistosGenInc = o.fFFHistosGenInc;
895 fFFHistosGenLeadingTrack = o.fFFHistosGenLeadingTrack;
896 fQATrackHighPtThreshold = o.fQATrackHighPtThreshold;
897 fFFNBinsJetPt = o.fFFNBinsJetPt;
898 fFFJetPtMin = o.fFFJetPtMin;
899 fFFJetPtMax = o.fFFJetPtMax;
900 fFFNBinsPt = o.fFFNBinsPt;
901 fFFPtMin = o.fFFPtMin;
902 fFFPtMax = o.fFFPtMax;
903 fFFNBinsXi = o.fFFNBinsXi;
904 fFFXiMin = o.fFFXiMin;
905 fFFXiMax = o.fFFXiMax;
906 fFFNBinsZ = o.fFFNBinsZ;
907 fFFZMin = o.fFFZMin;
908 fFFZMax = o.fFFZMax;
909 fQAJetNBinsPt = o.fQAJetNBinsPt;
910 fQAJetPtMin = o.fQAJetPtMin;
911 fQAJetPtMax = o.fQAJetPtMax;
912 fQAJetNBinsEta = o.fQAJetNBinsEta;
913 fQAJetEtaMin = o.fQAJetEtaMin;
914 fQAJetEtaMax = o.fQAJetEtaMax;
915 fQAJetNBinsPhi = o.fQAJetNBinsPhi;
916 fQAJetPhiMin = o.fQAJetPhiMin;
917 fQAJetPhiMax = o.fQAJetPhiMax;
918 fQATrackNBinsPt = o.fQATrackNBinsPt;
919 fQATrackPtMin = o.fQATrackPtMin;
920 fQATrackPtMax = o.fQATrackPtMax;
921 fQATrackNBinsEta = o.fQATrackNBinsEta;
922 fQATrackEtaMin = o.fQATrackEtaMin;
923 fQATrackEtaMax = o.fQATrackEtaMax;
924 fQATrackNBinsPhi = o.fQATrackNBinsPhi;
925 fQATrackPhiMin = o.fQATrackPhiMin;
926 fQATrackPhiMax = o.fQATrackPhiMax;
927 fCommonHistList = o.fCommonHistList;
928 fh1EvtSelection = o.fh1EvtSelection;
2b81de61 929 fh1VtxSelection = o.fh1VtxSelection;
e131b05f 930 fh1VertexNContributors = o.fh1VertexNContributors;
931 fh1VertexZ = o.fh1VertexZ;
932 fh1EvtMult = o.fh1EvtMult;
933 fh1EvtCent = o.fh1EvtCent;
934 fh1Xsec = o.fh1Xsec;
935 fh1Trials = o.fh1Trials;
936 fh1PtHard = o.fh1PtHard;
937 fh1PtHardTrials = o.fh1PtHardTrials;
938 fh1nRecJetsCuts = o.fh1nRecJetsCuts;
939 fh1nGenJets = o.fh1nGenJets;
940 fh1nRecEffJets = o.fh1nRecEffJets;
941 fh1nEmbeddedJets = o.fh1nEmbeddedJets;
942 fh2PtRecVsGenPrim = o.fh2PtRecVsGenPrim;
943 fh2PtRecVsGenSec = o.fh2PtRecVsGenSec;
944 fQATrackHistosRecEffGen = o.fQATrackHistosRecEffGen;
945 fQATrackHistosRecEffRec = o.fQATrackHistosRecEffRec;
946 fQATrackHistosSecRecNS = o.fQATrackHistosSecRecNS;
947 fQATrackHistosSecRecS = o.fQATrackHistosSecRecS;
948 fQATrackHistosSecRecSsc = o.fQATrackHistosSecRecSsc;
949 fFFHistosRecEffRec = o.fFFHistosRecEffRec;
950 fFFHistosSecRecNS = o.fFFHistosSecRecNS;
951 fFFHistosSecRecS = o.fFFHistosSecRecS;
952 fFFHistosSecRecSsc = o.fFFHistosSecRecSsc;
953 // Background
954 fh1BckgMult0 = o.fh1BckgMult0;
955 fh1BckgMult1 = o.fh1BckgMult1;
956 fh1BckgMult2 = o.fh1BckgMult2;
957 fh1BckgMult3 = o.fh1BckgMult3;
958 fh1BckgMult4 = o.fh1BckgMult4;
959 fh1FractionPtEmbedded = o.fh1FractionPtEmbedded;
960 fh1IndexEmbedded = o.fh1IndexEmbedded;
961 fh2DeltaPtVsJetPtEmbedded = o.fh2DeltaPtVsJetPtEmbedded;
962 fh2DeltaPtVsRecJetPtEmbedded = o.fh2DeltaPtVsRecJetPtEmbedded;
963 fh1DeltaREmbedded = o.fh1DeltaREmbedded;
265e4931 964 fhDCA_XY = o.fhDCA_XY;
965 fhDCA_Z = o.fhDCA_Z;
630a4bcd 966 fhJetPtRefMultEta5 = o.fhJetPtRefMultEta5;
967 fhJetPtRefMultEta8 = o.fhJetPtRefMultEta8;
a2a9d6d2 968 fhJetPtMultPercent = o.fhJetPtMultPercent;
e131b05f 969 fQABckgHisto0RecCuts = o.fQABckgHisto0RecCuts;
970 fQABckgHisto0Gen = o.fQABckgHisto0Gen;
971 fQABckgHisto1RecCuts = o.fQABckgHisto1RecCuts;
972 fQABckgHisto1Gen = o.fQABckgHisto1Gen;
973 fQABckgHisto2RecCuts = o.fQABckgHisto2RecCuts;
974 fQABckgHisto2Gen = o.fQABckgHisto2Gen;
975 fQABckgHisto3RecCuts = o.fQABckgHisto3RecCuts;
976 fQABckgHisto3Gen = o.fQABckgHisto3Gen;
977 fQABckgHisto4RecCuts = o.fQABckgHisto4RecCuts;
978 fQABckgHisto4Gen = o.fQABckgHisto4Gen;
979 fFFBckgHisto0RecCuts = o.fFFBckgHisto0RecCuts;
980 fFFBckgHisto0Gen = o.fFFBckgHisto0Gen;
981 fFFBckgHisto1RecCuts = o.fFFBckgHisto1RecCuts;
982 fFFBckgHisto1Gen = o.fFFBckgHisto1Gen;
983 fFFBckgHisto2RecCuts = o.fFFBckgHisto2RecCuts;
984 fFFBckgHisto2Gen = o.fFFBckgHisto2Gen;
985 fFFBckgHisto3RecCuts = o.fFFBckgHisto3RecCuts;
986 fFFBckgHisto3Gen = o.fFFBckgHisto3Gen;
987 fFFBckgHisto4RecCuts = o.fFFBckgHisto4RecCuts;
988 fFFBckgHisto4Gen = o.fFFBckgHisto4Gen;
989 fFFBckgHisto0RecEffRec = o.fFFBckgHisto0RecEffRec;
990 fFFBckgHisto0SecRecNS = o.fFFBckgHisto0SecRecNS;
991 fFFBckgHisto0SecRecS = o.fFFBckgHisto0SecRecS;
992 fFFBckgHisto0SecRecSsc = o.fFFBckgHisto0SecRecSsc;
993 fProNtracksLeadingJet = o.fProNtracksLeadingJet;
994 fProDelR80pcPt = o.fProDelR80pcPt;
995 fProNtracksLeadingJetGen = o.fProNtracksLeadingJetGen;
996 fProDelR80pcPtGen = o.fProDelR80pcPtGen;
997 fProNtracksLeadingJetBgrPerp2 = o.fProNtracksLeadingJetBgrPerp2;
998 fProNtracksLeadingJetRecPrim = o.fProNtracksLeadingJetRecPrim;
999 fProDelR80pcPtRecPrim = o.fProDelR80pcPtRecPrim;
1000 fProNtracksLeadingJetRecSecNS = o.fProNtracksLeadingJetRecSecNS;
1001 fProNtracksLeadingJetRecSecS = o.fProNtracksLeadingJetRecSecS;
1002 fProNtracksLeadingJetRecSecSsc = o.fProNtracksLeadingJetRecSecSsc;
1003 fRandom = o.fRandom;
c4856fb1 1004 fOnlyLeadingJets = o.fOnlyLeadingJets;
a2a9d6d2 1005 fAnaUtils = o.fAnaUtils;
e131b05f 1006
1007 // PID framework
1008 fUseInclusivePIDtask = o.fUseInclusivePIDtask;
1009 fUseJetPIDtask = o.fUseJetPIDtask;
1010
1011 fIsPP = o.fIsPP;
1012
1013 for(Int_t ii=0; ii<5; ii++){
1014 fProDelRPtSum[ii] = o.fProDelRPtSum[ii];
1015 fProDelRPtSumGen[ii] = o.fProDelRPtSumGen[ii];
1016 fProDelRPtSumBgrPerp2[ii] = o.fProDelRPtSumBgrPerp2[ii];
1017 fProDelRPtSumRecPrim[ii] = o.fProDelRPtSumRecPrim[ii];
1018 fProDelRPtSumRecSecNS[ii] = o.fProDelRPtSumRecSecNS[ii];
1019 fProDelRPtSumRecSecS[ii] = o.fProDelRPtSumRecSecS[ii];
1020 fProDelRPtSumRecSecSsc[ii] = o.fProDelRPtSumRecSecSsc[ii];
1021 }
1022
1023 for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
1024 fIDFFHistosRecCuts[i] = 0x0;
1025 if (o.fIDFFHistosRecCuts[i])
1026 fIDFFHistosRecCuts[i] = o.fIDFFHistosRecCuts[i];
1027
1028 fIDFFHistosGen[i] = 0x0;
1029 if (o.fIDFFHistosGen[i])
1030 fIDFFHistosGen[i] = o.fIDFFHistosGen[i];
265e4931 1031
1032 fhDCA_XY_prim_MCID[i] = 0x0;
1033 if (o.fhDCA_XY_prim_MCID[i])
1034 fhDCA_XY_prim_MCID[i] = o.fhDCA_XY_prim_MCID[i];
1035
1036 fhDCA_Z_prim_MCID[i] = 0x0;
1037 if (o.fhDCA_Z_prim_MCID[i])
1038 fhDCA_Z_prim_MCID[i] = o.fhDCA_Z_prim_MCID[i];
1039
1040 fhDCA_XY_sec_MCID[i] = 0x0;
1041 if (o.fhDCA_XY_sec_MCID[i])
1042 fhDCA_XY_sec_MCID[i] = o.fhDCA_XY_sec_MCID[i];
1043
1044 fhDCA_Z_sec_MCID[i] = 0x0;
1045 if (o.fhDCA_Z_sec_MCID[i])
1046 fhDCA_Z_sec_MCID[i] = o.fhDCA_Z_sec_MCID[i];
e131b05f 1047 }
1048 }
1049
1050
1051 if (fNumJetPIDtasks > 0) {
1052 delete [] fNameJetPIDtask;
1053 fNameJetPIDtask = 0x0;
1054
1055 delete [] fJetPIDtask;
1056 fJetPIDtask = 0x0;
1057 }
1058
1059 fNumJetPIDtasks = o.fNumJetPIDtasks;
1060
1061
1062 if (fNumInclusivePIDtasks > 0) {
1063 delete [] fNameInclusivePIDtask;
1064 fNameInclusivePIDtask = 0x0;
1065
1066 delete [] fInclusivePIDtask;
1067 fInclusivePIDtask = 0x0;
1068 }
1069
1070 fNumInclusivePIDtasks = o.fNumInclusivePIDtasks;
1071
1072
1073 if (fNumInclusivePIDtasks > 0) {
1074 fNameInclusivePIDtask = new TString[fNumInclusivePIDtasks];
1075 fInclusivePIDtask = new AliAnalysisTaskPID*[fNumInclusivePIDtasks];
1076
1077 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
1078 fNameInclusivePIDtask[i] = "";
1079 fInclusivePIDtask[i] = 0x0;
1080
1081 if (o.fNameInclusivePIDtask[i])
1082 fNameInclusivePIDtask[i] = o.fNameInclusivePIDtask[i];
1083
1084 if (o.fInclusivePIDtask[i])
1085 fInclusivePIDtask[i] = o.fInclusivePIDtask[i];
1086 }
1087 }
1088
1089 if (fNumJetPIDtasks > 0) {
1090 fNameJetPIDtask = new TString[fNumJetPIDtasks];
1091 fJetPIDtask = new AliAnalysisTaskPID*[fNumJetPIDtasks];
1092
1093 for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
1094 fNameJetPIDtask[i] = "";
1095 fJetPIDtask[i] = 0x0;
1096
1097 if (o.fNameJetPIDtask[i])
1098 fNameJetPIDtask[i] = o.fNameJetPIDtask[i];
1099
1100 if (o.fJetPIDtask[i])
1101 fJetPIDtask[i] = o.fJetPIDtask[i];
1102 }
1103 }
1104
1105 return *this;
1106}
1107
1108//___________________________________________________________________________
1109AliAnalysisTaskIDFragmentationFunction::~AliAnalysisTaskIDFragmentationFunction()
1110{
1111 // destructor
1112
1113 if(fTracksRecCuts) delete fTracksRecCuts;
1114 if(fTracksRecCutsEfficiency) delete fTracksRecCutsEfficiency;
1115 if(fTracksGen) delete fTracksGen;
1116 if(fTracksAODMCCharged) delete fTracksAODMCCharged;
1117 if(fTracksAODMCChargedSecNS) delete fTracksAODMCChargedSecNS;
1118 if(fTracksAODMCChargedSecS) delete fTracksAODMCChargedSecS;
1119 if(fTracksRecQualityCuts) delete fTracksRecQualityCuts;
1120 if(fJetsRec) delete fJetsRec;
1121 if(fJetsRecCuts) delete fJetsRecCuts;
1122 if(fJetsGen) delete fJetsGen;
1123 if(fJetsRecEff) delete fJetsRecEff;
1124 if(fJetsEmbedded) delete fJetsEmbedded;
1125
1126 if(fBckgMode &&
1127 (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
1128 fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading ||
1129 fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)){
1130
1131 if(fBckgJetsRec) delete fBckgJetsRec;
1132 if(fBckgJetsRecCuts) delete fBckgJetsRecCuts;
1133 if(fBckgJetsGen) delete fBckgJetsGen;
1134 }
1135 if(fRandom) delete fRandom;
1136
1137 delete [] fNameInclusivePIDtask;
1138 fNameInclusivePIDtask = 0x0;
1139
1140 delete [] fInclusivePIDtask;
1141 fInclusivePIDtask = 0x0;
1142
1143 delete [] fNameJetPIDtask;
1144 fNameJetPIDtask = 0x0;
1145
1146 delete [] fJetPIDtask;
1147 fJetPIDtask = 0x0;
a2a9d6d2 1148
1149 delete fAnaUtils;
1150 fAnaUtils = 0x0;
e131b05f 1151}
1152
1153//______________________________________________________________________________________________________
1154AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos::AliFragFuncHistos(const char* name,
1155 Int_t nJetPt, Float_t jetPtMin, Float_t jetPtMax,
1156 Int_t nPt, Float_t ptMin, Float_t ptMax,
1157 Int_t nXi, Float_t xiMin, Float_t xiMax,
1158 Int_t nZ , Float_t zMin , Float_t zMax)
1159 : TObject()
1160 ,fNBinsJetPt(nJetPt)
1161 ,fJetPtMin(jetPtMin)
1162 ,fJetPtMax(jetPtMax)
1163 ,fNBinsPt(nPt)
1164 ,fPtMin(ptMin)
1165 ,fPtMax(ptMax)
1166 ,fNBinsXi(nXi)
1167 ,fXiMin(xiMin)
1168 ,fXiMax(xiMax)
1169 ,fNBinsZ(nZ)
1170 ,fZMin(zMin)
1171 ,fZMax(zMax)
1172 ,fh2TrackPt(0)
1173 ,fh2Xi(0)
1174 ,fh2Z(0)
1175 ,fh1JetPt(0)
1176 ,fNameFF(name)
1177{
1178 // default constructor
1179
1180}
1181
1182//___________________________________________________________________________
1183AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos::AliFragFuncHistos(const AliFragFuncHistos& copy)
1184 : TObject()
1185 ,fNBinsJetPt(copy.fNBinsJetPt)
1186 ,fJetPtMin(copy.fJetPtMin)
1187 ,fJetPtMax(copy.fJetPtMax)
1188 ,fNBinsPt(copy.fNBinsPt)
1189 ,fPtMin(copy.fPtMin)
1190 ,fPtMax(copy.fPtMax)
1191 ,fNBinsXi(copy.fNBinsXi)
1192 ,fXiMin(copy.fXiMin)
1193 ,fXiMax(copy.fXiMax)
1194 ,fNBinsZ(copy.fNBinsZ)
1195 ,fZMin(copy.fZMin)
1196 ,fZMax(copy.fZMax)
1197 ,fh2TrackPt(copy.fh2TrackPt)
1198 ,fh2Xi(copy.fh2Xi)
1199 ,fh2Z(copy.fh2Z)
1200 ,fh1JetPt(copy.fh1JetPt)
1201 ,fNameFF(copy.fNameFF)
1202{
1203 // copy constructor
1204}
1205
1206//_______________________________________________________________________________________________________________________________________________________________
1207AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos& AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos::operator=(const AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos& o)
1208{
1209 // assignment
1210
1211 if(this!=&o){
1212 TObject::operator=(o);
1213 fNBinsJetPt = o.fNBinsJetPt;
1214 fJetPtMin = o.fJetPtMin;
1215 fJetPtMax = o.fJetPtMax;
1216 fNBinsPt = o.fNBinsPt;
1217 fPtMin = o.fPtMin;
1218 fPtMax = o.fPtMax;
1219 fNBinsXi = o.fNBinsXi;
1220 fXiMin = o.fXiMin;
1221 fXiMax = o.fXiMax;
1222 fNBinsZ = o.fNBinsZ;
1223 fZMin = o.fZMin;
1224 fZMax = o.fZMax;
1225 fh2TrackPt = o.fh2TrackPt;
1226 fh2Xi = o.fh2Xi;
1227 fh2Z = o.fh2Z;
1228 fh1JetPt = o.fh1JetPt;
1229 fNameFF = o.fNameFF;
1230 }
1231
1232 return *this;
1233}
1234
1235//_________________________________________________________
1236AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos::~AliFragFuncHistos()
1237{
1238 // destructor
1239
1240 if(fh1JetPt) delete fh1JetPt;
1241 if(fh2TrackPt) delete fh2TrackPt;
1242 if(fh2Xi) delete fh2Xi;
1243 if(fh2Z) delete fh2Z;
1244}
1245
1246//_________________________________________________________________
1247void AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos::DefineHistos()
1248{
1249 // book FF histos
1250
1251 fh1JetPt = new TH1F(Form("fh1FFJetPt%s", fNameFF.Data()),"",fNBinsJetPt,fJetPtMin,fJetPtMax);
1252 fh2TrackPt = new TH2F(Form("fh2FFTrackPt%s",fNameFF.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax,fNBinsPt, fPtMin, fPtMax);
1253 fh2Z = new TH2F(Form("fh2FFZ%s",fNameFF.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax, fNBinsZ, fZMin, fZMax);
1254 fh2Xi = new TH2F(Form("fh2FFXi%s",fNameFF.Data()),"",fNBinsJetPt, fJetPtMin, fJetPtMax, fNBinsXi, fXiMin, fXiMax);
1255
1256 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh1JetPt, "p_{T} [GeV/c]", "entries");
1257 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh2TrackPt,"jet p_{T} [GeV/c]","p_{T} [GeV/c]","entries");
1258 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh2Xi,"jet p_{T} [GeV/c]","#xi", "entries");
1259 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh2Z,"jet p_{T} [GeV/c]","z","entries");
1260}
1261
1262//_______________________________________________________________________________________________________________
1263void AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos::FillFF(Float_t trackPt, Float_t jetPt, Bool_t incrementJetPt, Float_t norm,
1264 Bool_t scaleStrangeness, Float_t scaleFacStrangeness)
1265{
1266 // fill FF
1267
1268 if(incrementJetPt && norm) fh1JetPt->Fill(jetPt,1/norm);
1269 else if(incrementJetPt) fh1JetPt->Fill(jetPt);
1270
1271 // Added for proper normalization of FF background estimation
1272 // when zero track are found in the background region
1273 if((int)trackPt==-1) return;
1274
1275 if(norm)fh2TrackPt->Fill(jetPt,trackPt,1/norm);
1276 else if(scaleStrangeness) fh2TrackPt->Fill(jetPt,trackPt,scaleFacStrangeness);
1277 else fh2TrackPt->Fill(jetPt,trackPt);
1278
1279 Double_t z = -1., xi = -1.;
1280 AliAnalysisTaskPID::GetJetTrackObservables(trackPt, jetPt, z, xi);
1281
1282
1283 if(norm){
1284 fh2Xi->Fill(jetPt,xi,1/norm);
1285 fh2Z->Fill(jetPt,z,1/norm);
1286 }
1287 else if(scaleStrangeness){
1288 fh2Xi->Fill(jetPt,xi,scaleFacStrangeness);
1289 fh2Z->Fill(jetPt,z,scaleFacStrangeness);
1290 }
1291 else {
1292 fh2Xi->Fill(jetPt,xi);
1293 fh2Z->Fill(jetPt,z);
1294 }
1295}
1296
1297//_________________________________________________________________________________
1298void AliAnalysisTaskIDFragmentationFunction::AliFragFuncHistos::AddToOutput(TList* list) const
1299{
1300 // add histos to list
1301
1302 list->Add(fh1JetPt);
1303
1304 list->Add(fh2TrackPt);
1305 list->Add(fh2Xi);
1306 list->Add(fh2Z);
1307}
1308
1309//_________________________________________________________________________________________________________
1310AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos::AliFragFuncQAJetHistos(const char* name,
1311 Int_t nPt, Float_t ptMin, Float_t ptMax,
1312 Int_t nEta, Float_t etaMin, Float_t etaMax,
1313 Int_t nPhi, Float_t phiMin, Float_t phiMax)
1314 : TObject()
1315 ,fNBinsPt(nPt)
1316 ,fPtMin(ptMin)
1317 ,fPtMax(ptMax)
1318 ,fNBinsEta(nEta)
1319 ,fEtaMin(etaMin)
1320 ,fEtaMax(etaMax)
1321 ,fNBinsPhi(nPhi)
1322 ,fPhiMin(phiMin)
1323 ,fPhiMax(phiMax)
1324 ,fh2EtaPhi(0)
1325 ,fh1Pt(0)
1326 ,fNameQAJ(name)
1327{
1328 // default constructor
1329}
1330
1331//____________________________________________________________________________________
1332AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos::AliFragFuncQAJetHistos(const AliFragFuncQAJetHistos& copy)
1333 : TObject()
1334 ,fNBinsPt(copy.fNBinsPt)
1335 ,fPtMin(copy.fPtMin)
1336 ,fPtMax(copy.fPtMax)
1337 ,fNBinsEta(copy.fNBinsEta)
1338 ,fEtaMin(copy.fEtaMin)
1339 ,fEtaMax(copy.fEtaMax)
1340 ,fNBinsPhi(copy.fNBinsPhi)
1341 ,fPhiMin(copy.fPhiMin)
1342 ,fPhiMax(copy.fPhiMax)
1343 ,fh2EtaPhi(copy.fh2EtaPhi)
1344 ,fh1Pt(copy.fh1Pt)
1345 ,fNameQAJ(copy.fNameQAJ)
1346{
1347 // copy constructor
1348}
1349
1350//________________________________________________________________________________________________________________________________________________________________________
1351AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos& AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos::operator=(const AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos& o)
1352{
1353 // assignment
1354
1355 if(this!=&o){
1356 TObject::operator=(o);
1357 fNBinsPt = o.fNBinsPt;
1358 fPtMin = o.fPtMin;
1359 fPtMax = o.fPtMax;
1360 fNBinsEta = o.fNBinsEta;
1361 fEtaMin = o.fEtaMin;
1362 fEtaMax = o.fEtaMax;
1363 fNBinsPhi = o.fNBinsPhi;
1364 fPhiMin = o.fPhiMin;
1365 fPhiMax = o.fPhiMax;
1366 fh2EtaPhi = o.fh2EtaPhi;
1367 fh1Pt = o.fh1Pt;
1368 fNameQAJ = o.fNameQAJ;
1369 }
1370
1371 return *this;
1372}
1373
1374//______________________________________________________________
1375AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos::~AliFragFuncQAJetHistos()
1376{
1377 // destructor
1378
1379 if(fh2EtaPhi) delete fh2EtaPhi;
1380 if(fh1Pt) delete fh1Pt;
1381}
1382
1383//____________________________________________________________________
1384void AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos::DefineHistos()
1385{
1386 // book jet QA histos
1387
1388 fh2EtaPhi = new TH2F(Form("fh2JetQAEtaPhi%s", fNameQAJ.Data()), Form("%s: #eta - #phi distribution", fNameQAJ.Data()), fNBinsEta, fEtaMin, fEtaMax, fNBinsPhi, fPhiMin, fPhiMax);
1389 fh1Pt = new TH1F(Form("fh1JetQAPt%s", fNameQAJ.Data()), Form("%s: p_{T} distribution", fNameQAJ.Data()), fNBinsPt, fPtMin, fPtMax);
1390
1391 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh2EtaPhi, "#eta", "#phi");
1392 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh1Pt, "p_{T} [GeV/c]", "entries");
1393}
1394
1395//____________________________________________________________________________________________________
1396void AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos::FillJetQA(Float_t eta, Float_t phi, Float_t pt)
1397{
1398 // fill jet QA histos
1399
1400 fh2EtaPhi->Fill( eta, phi);
1401 fh1Pt->Fill( pt );
1402}
1403
1404//____________________________________________________________________________________
1405void AliAnalysisTaskIDFragmentationFunction::AliFragFuncQAJetHistos::AddToOutput(TList* list) const
1406{
1407 // add histos to list
1408
1409 list->Add(fh2EtaPhi);
1410 list->Add(fh1Pt);
1411}
1412
1413//___________________________________________________________________________________________________________
1414AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos::AliFragFuncQATrackHistos(const char* name,
1415 Int_t nPt, Float_t ptMin, Float_t ptMax,
1416 Int_t nEta, Float_t etaMin, Float_t etaMax,
1417 Int_t nPhi, Float_t phiMin, Float_t phiMax,
1418 Float_t ptThresh)
1419 : TObject()
1420 ,fNBinsPt(nPt)
1421 ,fPtMin(ptMin)
1422 ,fPtMax(ptMax)
1423 ,fNBinsEta(nEta)
1424 ,fEtaMin(etaMin)
1425 ,fEtaMax(etaMax)
1426 ,fNBinsPhi(nPhi)
1427 ,fPhiMin(phiMin)
1428 ,fPhiMax(phiMax)
1429 ,fHighPtThreshold(ptThresh)
1430 ,fh2EtaPhi(0)
1431 ,fh1Pt(0)
1432 ,fh2HighPtEtaPhi(0)
1433 ,fh2PhiPt(0)
1434 ,fNameQAT(name)
1435{
1436 // default constructor
1437}
1438
1439//__________________________________________________________________________________________
1440AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos::AliFragFuncQATrackHistos(const AliFragFuncQATrackHistos& copy)
1441 : TObject()
1442 ,fNBinsPt(copy.fNBinsPt)
1443 ,fPtMin(copy.fPtMin)
1444 ,fPtMax(copy.fPtMax)
1445 ,fNBinsEta(copy.fNBinsEta)
1446 ,fEtaMin(copy.fEtaMin)
1447 ,fEtaMax(copy.fEtaMax)
1448 ,fNBinsPhi(copy.fNBinsPhi)
1449 ,fPhiMin(copy.fPhiMin)
1450 ,fPhiMax(copy.fPhiMax)
1451 ,fHighPtThreshold(copy.fHighPtThreshold)
1452 ,fh2EtaPhi(copy.fh2EtaPhi)
1453 ,fh1Pt(copy.fh1Pt)
1454 ,fh2HighPtEtaPhi(copy.fh2HighPtEtaPhi)
1455 ,fh2PhiPt(copy.fh2PhiPt)
1456 ,fNameQAT(copy.fNameQAT)
1457{
1458 // copy constructor
1459}
1460
1461// _____________________________________________________________________________________________________________________________________________________________________________
1462AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos& AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos::operator=(const AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos& o)
1463{
1464 // assignment
1465
1466 if(this!=&o){
1467 TObject::operator=(o);
1468 fNBinsPt = o.fNBinsPt;
1469 fPtMin = o.fPtMin;
1470 fPtMax = o.fPtMax;
1471 fNBinsEta = o.fNBinsEta;
1472 fEtaMin = o.fEtaMin;
1473 fEtaMax = o.fEtaMax;
1474 fNBinsPhi = o.fNBinsPhi;
1475 fPhiMin = o.fPhiMin;
1476 fPhiMax = o.fPhiMax;
1477 fHighPtThreshold = o.fHighPtThreshold;
1478 fh2EtaPhi = o.fh2EtaPhi;
1479 fh1Pt = o.fh1Pt;
1480 fh2HighPtEtaPhi = o.fh2HighPtEtaPhi;
1481 fh2PhiPt = o.fh2PhiPt;
1482 fNameQAT = o.fNameQAT;
1483 }
1484
1485 return *this;
1486}
1487
1488//___________________________________________________________________
1489AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos::~AliFragFuncQATrackHistos()
1490{
1491 // destructor
1492
1493 if(fh2EtaPhi) delete fh2EtaPhi;
1494 if(fh2HighPtEtaPhi) delete fh2HighPtEtaPhi;
1495 if(fh1Pt) delete fh1Pt;
1496 if(fh2PhiPt) delete fh2PhiPt;
1497}
1498
1499//______________________________________________________________________
1500void AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos::DefineHistos()
1501{
1502 // book track QA histos
1503
1504 fh2EtaPhi = new TH2F(Form("fh2TrackQAEtaPhi%s", fNameQAT.Data()), Form("%s: #eta - #phi distribution", fNameQAT.Data()), fNBinsEta, fEtaMin, fEtaMax, fNBinsPhi, fPhiMin, fPhiMax);
1505 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);
1506 fh1Pt = new TH1F(Form("fh1TrackQAPt%s", fNameQAT.Data()), Form("%s: p_{T} distribution", fNameQAT.Data()), fNBinsPt, fPtMin, fPtMax);
1507 fh2PhiPt = new TH2F(Form("fh2TrackQAPhiPt%s", fNameQAT.Data()), Form("%s: #phi - p_{T} distribution", fNameQAT.Data()), fNBinsPhi, fPhiMin, fPhiMax, fNBinsPt, fPtMin, fPtMax);
1508
1509 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh2EtaPhi, "#eta", "#phi");
1510 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh2HighPtEtaPhi, "#eta", "#phi");
1511 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh1Pt, "p_{T} [GeV/c]", "entries");
1512 AliAnalysisTaskIDFragmentationFunction::SetProperties(fh2PhiPt, "#phi", "p_{T} [GeV/c]");
1513}
1514
1515//________________________________________________________________________________________________________
1516void AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos::FillTrackQA(Float_t eta, Float_t phi, Float_t pt, Bool_t weightPt, Float_t norm,
1517 Bool_t scaleStrangeness, Float_t scaleFacStrangeness)
1518{
1519 // fill track QA histos
1520 Float_t weight = 1.;
1521 if(weightPt) weight = pt;
1522 fh2EtaPhi->Fill( eta, phi, weight);
1523 if(scaleStrangeness) fh2EtaPhi->Fill( eta, phi, scaleFacStrangeness);
1524 if(pt > fHighPtThreshold) fh2HighPtEtaPhi->Fill( eta, phi, weight);
1525 if(pt > fHighPtThreshold && scaleStrangeness) fh2HighPtEtaPhi->Fill( eta, phi, weight);
1526 if(norm) fh1Pt->Fill( pt, 1/norm );
1527 else if(scaleStrangeness) fh1Pt->Fill(pt,scaleFacStrangeness);
1528 else fh1Pt->Fill( pt );
1529
1530 if(scaleFacStrangeness) fh2PhiPt->Fill(phi, pt, scaleFacStrangeness);
1531 else fh2PhiPt->Fill(phi, pt);
1532}
1533
1534//______________________________________________________________________________________
1535void AliAnalysisTaskIDFragmentationFunction::AliFragFuncQATrackHistos::AddToOutput(TList* list) const
1536{
1537 // add histos to list
1538
1539 list->Add(fh2EtaPhi);
1540 list->Add(fh2HighPtEtaPhi);
1541 list->Add(fh1Pt);
1542 list->Add(fh2PhiPt);
1543}
1544
1545//_________________________________________________________________________________
1546Bool_t AliAnalysisTaskIDFragmentationFunction::Notify()
1547{
1548 //
1549 // Implemented Notify() to read the cross sections
1550 // and number of trials from pyxsec.root
1551 // (taken from AliAnalysisTaskJetSpectrum2)
1552 //
1553 TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
1554 Float_t xsection = 0;
1555 Float_t ftrials = 1;
1556
1557 fAvgTrials = 1;
1558 if(tree){
1559 TFile *curfile = tree->GetCurrentFile();
1560 if (!curfile) {
1561 Error("Notify","No current file");
1562 return kFALSE;
1563 }
1564
1565 AliAnalysisHelperJetTasks::PythiaInfoFromFile(curfile->GetName(),xsection,ftrials);
1566
1567 if (fUseInclusivePIDtask) {
1568 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++)
1569 fInclusivePIDtask[i]->FillXsec(xsection);
1570 }
1571
1572 if (fUseJetPIDtask) {
1573 for (Int_t i = 0; i < fNumJetPIDtasks; i++)
1574 fJetPIDtask[i]->FillXsec(xsection);
1575 }
1576
1577 if(!fh1Xsec||!fh1Trials){
9e95a906 1578 Printf("%s:%d No Histogram fh1Xsec",(char*)__FILE__,__LINE__);
e131b05f 1579 return kFALSE;
1580 }
1581
1582 fh1Xsec->Fill("<#sigma>",xsection);
1583 // construct a poor man average trials
1584 Float_t nEntries = (Float_t)tree->GetTree()->GetEntries();
1585 if(ftrials>=nEntries && nEntries>0.)fAvgTrials = ftrials/nEntries;
1586 }
1587
1588 // Set seed for backg study
9d7ad2e4 1589 delete fRandom;
e131b05f 1590 fRandom = new TRandom3();
1591 fRandom->SetSeed(0);
1592
1593 return kTRUE;
1594}
1595
1596//__________________________________________________________________
1597void AliAnalysisTaskIDFragmentationFunction::UserCreateOutputObjects()
1598{
1599 // create output objects
1600
1601 if(fDebug > 1) Printf("AliAnalysisTaskIDFragmentationFunction::UserCreateOutputObjects()");
1602
1603 // create list of tracks and jets
1604
1605 fTracksRecCuts = new TList();
1606 fTracksRecCuts->SetOwner(kFALSE);
1607
1608 fTracksRecCutsEfficiency = new TList();
1609 fTracksRecCutsEfficiency->SetOwner(kFALSE);
1610
1611 fTracksGen = new TList();
1612 fTracksGen->SetOwner(kFALSE);
1613
1614 fTracksAODMCCharged = new TList();
1615 fTracksAODMCCharged->SetOwner(kFALSE);
1616
1617 fTracksAODMCChargedSecNS = new TList();
1618 fTracksAODMCChargedSecNS->SetOwner(kFALSE);
1619
1620 fTracksAODMCChargedSecS = new TList();
1621 fTracksAODMCChargedSecS->SetOwner(kFALSE);
1622
1623 fTracksRecQualityCuts = new TList();
1624 fTracksRecQualityCuts->SetOwner(kFALSE);
1625
1626 fJetsRec = new TList();
1627 fJetsRec->SetOwner(kFALSE);
1628
1629 fJetsRecCuts = new TList();
1630 fJetsRecCuts->SetOwner(kFALSE);
1631
1632 fJetsGen = new TList();
1633 fJetsGen->SetOwner(kFALSE);
1634
1635 fJetsRecEff = new TList();
1636 fJetsRecEff->SetOwner(kFALSE);
1637
1638 fJetsEmbedded = new TList();
1639 fJetsEmbedded->SetOwner(kFALSE);
1640
1641
1642 if(fBckgMode &&
1643 (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
1644 fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading ||
1645 fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)){
1646
1647 fBckgJetsRec = new TList();
1648 fBckgJetsRec->SetOwner(kFALSE);
1649
1650 fBckgJetsRecCuts = new TList();
1651 fBckgJetsRecCuts->SetOwner(kFALSE);
1652
1653 fBckgJetsGen = new TList();
1654 fBckgJetsGen->SetOwner(kFALSE);
1655 }
1656
1657 //
1658 // Create histograms / output container
1659 //
1660
1661 OpenFile(1);
1662 fCommonHistList = new TList();
1663 fCommonHistList->SetOwner(kTRUE);
1664
1665 Bool_t oldStatus = TH1::AddDirectoryStatus();
1666 TH1::AddDirectory(kFALSE);
1667
1668
1669 // Histograms
1670 fh1EvtSelection = new TH1F("fh1EvtSelection", "Event Selection", 6, -0.5, 5.5);
1671 fh1EvtSelection->GetXaxis()->SetBinLabel(1,"ACCEPTED");
1672 fh1EvtSelection->GetXaxis()->SetBinLabel(2,"event selection: rejected");
1673 fh1EvtSelection->GetXaxis()->SetBinLabel(3,"event class: rejected");
1674 fh1EvtSelection->GetXaxis()->SetBinLabel(4,"vertex Ncontr: rejected");
1675 fh1EvtSelection->GetXaxis()->SetBinLabel(5,"vertex z: rejected");
1676 fh1EvtSelection->GetXaxis()->SetBinLabel(6,"vertex type: rejected");
1677
2b81de61 1678 fh1VtxSelection = new TH1F("fh1VtxSelection", "Vertex Selection", 10, -1, 9);
1679 fh1VtxSelection->GetXaxis()->SetBinLabel(1,"Undef");
1680 fh1VtxSelection->GetXaxis()->SetBinLabel(2,"Primary");
1681 fh1VtxSelection->GetXaxis()->SetBinLabel(3,"Kink");
1682 fh1VtxSelection->GetXaxis()->SetBinLabel(4,"V0");
1683 fh1VtxSelection->GetXaxis()->SetBinLabel(5,"Cascade");
1684 fh1VtxSelection->GetXaxis()->SetBinLabel(6,"Multi");
1685 fh1VtxSelection->GetXaxis()->SetBinLabel(7,"SPD");
1686 fh1VtxSelection->GetXaxis()->SetBinLabel(8,"PileUpSPD");
1687 fh1VtxSelection->GetXaxis()->SetBinLabel(9,"PileUpTracks");
1688 fh1VtxSelection->GetXaxis()->SetBinLabel(10,"TPC");
1689
e131b05f 1690 fh1VertexNContributors = new TH1F("fh1VertexNContributors", "Vertex N contributors", 2500,-.5, 2499.5);
1691 fh1VertexZ = new TH1F("fh1VertexZ", "Vertex z distribution", 30, -15., 15.);
1692 fh1EvtMult = new TH1F("fh1EvtMult","Event multiplicity, track pT cut > 150 MeV/c, |#eta| < 0.9",120,0.,12000.);
1693 fh1EvtCent = new TH1F("fh1EvtCent","centrality",100,0.,100.);
1694
1695 fh1Xsec = new TProfile("fh1Xsec","xsec from pyxsec.root",1,0,1);
1696 fh1Xsec->GetXaxis()->SetBinLabel(1,"<#sigma>");
1697 fh1Trials = new TH1F("fh1Trials","trials from pyxsec.root",1,0,1);
1698 fh1Trials->GetXaxis()->SetBinLabel(1,"#sum{ntrials}");
1699 fh1PtHard = new TH1F("fh1PtHard","PYTHIA Pt hard;p_{T,hard}",350,-.5,349.5);
1700 fh1PtHardTrials = new TH1F("fh1PtHardTrials","PYTHIA Pt hard weight with trials;p_{T,hard}",350,-.5,349.5);
1701
1702 fh1nRecJetsCuts = new TH1F("fh1nRecJetsCuts","reconstructed jets per event",10,-0.5,9.5);
1703 fh1nGenJets = new TH1F("fh1nGenJets","generated jets per event",10,-0.5,9.5);
1704 fh1nRecEffJets = new TH1F("fh1nRecEffJets","reconstruction effiency: jets per event",10,-0.5,9.5);
1705 fh1nEmbeddedJets = new TH1F("fh1nEmbeddedJets","embedded jets per event",10,-0.5,9.5);
1706
1707 fh2PtRecVsGenPrim = new TH2F("fh2PtRecVsGenPrim","rec vs gen pt",fQATrackNBinsPt,fQATrackPtMin,fQATrackPtMax,fQATrackNBinsPt,fQATrackPtMin,fQATrackPtMax);
1708 fh2PtRecVsGenSec = new TH2F("fh2PtRecVsGenSec","rec vs gen pt",fQATrackNBinsPt,fQATrackPtMin,fQATrackPtMax,fQATrackNBinsPt,fQATrackPtMin,fQATrackPtMax);
1709
1710 // embedding
1711 if(fBranchEmbeddedJets.Length()){
1712 fh1FractionPtEmbedded = new TH1F("fh1FractionPtEmbedded","",200,0,2);
1713 fh1IndexEmbedded = new TH1F("fh1IndexEmbedded","",11,-1,10);
1714 fh2DeltaPtVsJetPtEmbedded = new TH2F("fh2DeltaPtVsJetPtEmbedded","",250,0,250,200,-100,100);
1715 fh2DeltaPtVsRecJetPtEmbedded = new TH2F("fh2DeltaPtVsRecJetPtEmbedded","",250,0,250,200,-100,100);
1716 fh1DeltaREmbedded = new TH1F("fh1DeltaREmbedded","",50,0,0.5);
1717 fh1nEmbeddedJets = new TH1F("fh1nEmbeddedJets","embedded jets per event",10,-0.5,9.5);
1718 }
1719
1720
1721 if(fQAMode){
1722 if(fQAMode&1){ // track QA
1723 fQATrackHistosRecCuts = new AliFragFuncQATrackHistos("RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1724 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1725 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1726 fQATrackHighPtThreshold);
1727 fQATrackHistosGen = new AliFragFuncQATrackHistos("Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1728 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1729 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1730 fQATrackHighPtThreshold);
1731 }
1732
1733 if(fQAMode&2){ // jet QA
1734 fQAJetHistosRec = new AliFragFuncQAJetHistos("Rec", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax,
1735 fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax,
1736 fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax);
1737 fQAJetHistosRecCuts = new AliFragFuncQAJetHistos("RecCuts", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax,
1738 fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax,
1739 fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax);
1740 fQAJetHistosRecCutsLeading = new AliFragFuncQAJetHistos("RecCutsLeading", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax,
1741 fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax,
1742 fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax);
1743 fQAJetHistosGen = new AliFragFuncQAJetHistos("Gen", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax,
1744 fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax,
1745 fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax);
1746 fQAJetHistosGenLeading = new AliFragFuncQAJetHistos("GenLeading", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax,
1747 fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax,
1748 fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax);
1749 if(fEffMode) fQAJetHistosRecEffLeading = new AliFragFuncQAJetHistos("RecEffLeading", fQAJetNBinsPt, fQAJetPtMin, fQAJetPtMax,
1750 fQAJetNBinsEta, fQAJetEtaMin, fQAJetEtaMax,fQAJetNBinsPhi, fQAJetPhiMin, fQAJetPhiMax);
1751 }
1752 } // end: QA
1753
1754 if(fFFMode || fIDFFMode){
1755
1756 fFFHistosRecCuts = new AliFragFuncHistos("RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1757 fFFNBinsPt, fFFPtMin, fFFPtMax,
1758 fFFNBinsXi, fFFXiMin, fFFXiMax,
1759 fFFNBinsZ , fFFZMin , fFFZMax );
1760
1761
1762 fFFHistosRecCutsInc = new AliFragFuncHistos("RecCutsInc", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1763 fFFNBinsPt, fFFPtMin, fFFPtMax,
1764 fFFNBinsXi, fFFXiMin, fFFXiMax,
1765 fFFNBinsZ , fFFZMin , fFFZMax );
1766
1767
1768 fFFHistosRecLeadingTrack = new AliFragFuncHistos("RecLeadingTrack", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1769 fFFNBinsPt, fFFPtMin, fFFPtMax,
1770 fFFNBinsXi, fFFXiMin, fFFXiMax,
1771 fFFNBinsZ , fFFZMin , fFFZMax );
1772
1773 fFFHistosGen = new AliFragFuncHistos("Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1774 fFFNBinsPt, fFFPtMin, fFFPtMax,
1775 fFFNBinsXi, fFFXiMin, fFFXiMax,
1776 fFFNBinsZ , fFFZMin , fFFZMax);
1777
1778 fFFHistosGenInc = new AliFragFuncHistos("GenInc", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1779 fFFNBinsPt, fFFPtMin, fFFPtMax,
1780 fFFNBinsXi, fFFXiMin, fFFXiMax,
1781 fFFNBinsZ , fFFZMin , fFFZMax);
1782
1783 fFFHistosGenLeadingTrack = new AliFragFuncHistos("GenLeadingTrack", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1784 fFFNBinsPt, fFFPtMin, fFFPtMax,
1785 fFFNBinsXi, fFFXiMin, fFFXiMax,
1786 fFFNBinsZ , fFFZMin , fFFZMax);
1787
1788 if (fIDFFMode) {
1789 for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
1790 fIDFFHistosRecCuts[i] = new AliFragFuncHistos(Form("RecCuts_%s", AliPID::ParticleName(i)), fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1791 fFFNBinsPt, fFFPtMin, fFFPtMax,
1792 fFFNBinsXi, fFFXiMin, fFFXiMax,
1793 fFFNBinsZ , fFFZMin , fFFZMax );
1794 fIDFFHistosGen[i] = new AliFragFuncHistos(Form("Gen_%s", AliPID::ParticleName(i)), fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1795 fFFNBinsPt, fFFPtMin, fFFPtMax,
1796 fFFNBinsXi, fFFXiMin, fFFXiMax,
1797 fFFNBinsZ , fFFZMin , fFFZMax );
1798 }
1799 }
1800 } // end: FF
1801
1802 // efficiency
1803
1804 if(fEffMode){
1805 if(fQAMode&1){
1806 fQATrackHistosRecEffGen = new AliFragFuncQATrackHistos("RecEffGen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1807 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1808 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1809 fQATrackHighPtThreshold);
1810
1811 fQATrackHistosRecEffRec = new AliFragFuncQATrackHistos("RecEffRec", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1812 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1813 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1814 fQATrackHighPtThreshold);
1815
1816 fQATrackHistosSecRecNS = new AliFragFuncQATrackHistos("SecRecNS", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1817 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1818 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1819 fQATrackHighPtThreshold);
1820
1821 fQATrackHistosSecRecS = new AliFragFuncQATrackHistos("SecRecS", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1822 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1823 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1824 fQATrackHighPtThreshold);
1825
1826 fQATrackHistosSecRecSsc = new AliFragFuncQATrackHistos("SecRecSsc", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1827 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1828 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1829 fQATrackHighPtThreshold);
1830
1831 }
1832 if(fFFMode){
1833 fFFHistosRecEffRec = new AliFragFuncHistos("RecEffRec", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1834 fFFNBinsPt, fFFPtMin, fFFPtMax,
1835 fFFNBinsXi, fFFXiMin, fFFXiMax,
1836 fFFNBinsZ , fFFZMin , fFFZMax);
1837
1838 fFFHistosSecRecNS = new AliFragFuncHistos("SecRecNS", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1839 fFFNBinsPt, fFFPtMin, fFFPtMax,
1840 fFFNBinsXi, fFFXiMin, fFFXiMax,
1841 fFFNBinsZ , fFFZMin , fFFZMax);
1842
1843 fFFHistosSecRecS = new AliFragFuncHistos("SecRecS", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1844 fFFNBinsPt, fFFPtMin, fFFPtMax,
1845 fFFNBinsXi, fFFXiMin, fFFXiMax,
1846 fFFNBinsZ , fFFZMin , fFFZMax);
1847
1848 fFFHistosSecRecSsc = new AliFragFuncHistos("SecRecSsc", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1849 fFFNBinsPt, fFFPtMin, fFFPtMax,
1850 fFFNBinsXi, fFFXiMin, fFFXiMax,
1851 fFFNBinsZ , fFFZMin , fFFZMax);
1852
1853 }
1854 } // end: efficiency
1855
1856 // Background
1857 if(fBckgMode){
1858 if(fBckgType[0]==kBckgNone){
1859 AliError("no bgr method selected !");
1860 }
1861
1862 TString title[5];
1863 for(Int_t i=0; i<5; i++){
1864 if(fBckgType[i]==kBckgPerp) title[i]="Perp";
1865 else if(fBckgType[i]==kBckgPerp2) title[i]="Perp2";
1866 else if(fBckgType[i]==kBckgPerp2Area) title[i]="Perp2Area";
1867 else if(fBckgType[i]==kBckgPerpWindow) title[i]="PerpW";
1868 else if(fBckgType[i]==kBckgASide) title[i]="ASide";
1869 else if(fBckgType[i]==kBckgASideWindow) title[i]="ASideW";
1870 else if(fBckgType[i]==kBckgOutLJ) title[i]="OutLeadingJet";
1871 else if(fBckgType[i]==kBckgOut2J) title[i]="Out2Jets";
1872 else if(fBckgType[i]==kBckgOut3J) title[i]="Out3Jets";
1873 else if(fBckgType[i]==kBckgOutAJ) title[i]="AllJets";
1874 else if(fBckgType[i]==kBckgOutLJStat) title[i]="OutLeadingJetStat";
1875 else if(fBckgType[i]==kBckgOut2JStat) title[i]="Out2JetsStat";
1876 else if(fBckgType[i]==kBckgOut3JStat) title[i]="Out3JetsStat";
1877 else if(fBckgType[i]==kBckgOutAJStat) title[i]="AllJetsStat";
1878 else if(fBckgType[i]==kBckgClustersOutLeading) title[i]="OutClusters";
1879 else if(fBckgType[i]==kBckgClusters) title[i]="MedianClusters";
1880 else if(fBckgType[i]==kBckgNone) title[i]="";
1881 else printf("Please chose background method number %d!",i);
1882 }
1883
1884
1885 if(fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
1886 fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading ||
1887 fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading){
1888
1889 fh1nRecBckgJetsCuts = new TH1F("fh1nRecBckgJetsCuts","reconstructed background jets per event",10,-0.5,9.5);
1890 fh1nGenBckgJets = new TH1F("fh1nGenBckgJets","generated background jets per event",10,-0.5,9.5);
1891 }
1892
1893
1894 fh1BckgMult0 = new TH1F("fh1BckgMult0","bckg mult "+title[0],500,0,500);
1895 if(fBckgType[1] != kBckgNone) fh1BckgMult1 = new TH1F("fh1BckgMult1","bckg mult "+title[1],500,0,500);
1896 if(fBckgType[2] != kBckgNone) fh1BckgMult2 = new TH1F("fh1BckgMult2","bckg mult "+title[2],500,0,500);
1897 if(fBckgType[3] != kBckgNone) fh1BckgMult3 = new TH1F("fh1BckgMult3","bckg mult "+title[3],500,0,500);
1898 if(fBckgType[4] != kBckgNone) fh1BckgMult4 = new TH1F("fh1BckgMult4","bckg mult "+title[4],500,0,500);
1899
1900
1901 if(fQAMode&1){
1902 fQABckgHisto0RecCuts = new AliFragFuncQATrackHistos("Bckg"+title[0]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1903 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1904 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1905 fQATrackHighPtThreshold);
1906 fQABckgHisto0Gen = new AliFragFuncQATrackHistos("Bckg"+title[0]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1907 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1908 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1909 fQATrackHighPtThreshold);
1910
1911 if(fBckgType[1] != kBckgNone){
1912 fQABckgHisto1RecCuts = new AliFragFuncQATrackHistos("Bckg"+title[1]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1913 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1914 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1915 fQATrackHighPtThreshold);
1916 fQABckgHisto1Gen = new AliFragFuncQATrackHistos("Bckg"+title[1]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1917 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1918 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1919 fQATrackHighPtThreshold);
1920 }
1921 if(fBckgType[2] != kBckgNone){
1922 fQABckgHisto2RecCuts = new AliFragFuncQATrackHistos("Bckg"+title[2]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1923 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1924 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1925 fQATrackHighPtThreshold);
1926 fQABckgHisto2Gen = new AliFragFuncQATrackHistos("Bckg"+title[2]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1927 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1928 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1929 fQATrackHighPtThreshold);
1930 }
1931 if(fBckgType[3] != kBckgNone){
1932 fQABckgHisto3RecCuts = new AliFragFuncQATrackHistos("Bckg"+title[3]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1933 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1934 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1935 fQATrackHighPtThreshold);
1936 fQABckgHisto3Gen = new AliFragFuncQATrackHistos("Bckg"+title[3]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1937 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1938 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1939 fQATrackHighPtThreshold);
1940 }
1941 if(fBckgType[4] != kBckgNone){
1942 fQABckgHisto4RecCuts = new AliFragFuncQATrackHistos("Bckg"+title[4]+"RecCuts", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1943 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1944 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1945 fQATrackHighPtThreshold);
1946 fQABckgHisto4Gen = new AliFragFuncQATrackHistos("Bckg"+title[4]+"Gen", fQATrackNBinsPt, fQATrackPtMin, fQATrackPtMax,
1947 fQATrackNBinsEta, fQATrackEtaMin, fQATrackEtaMax,
1948 fQATrackNBinsPhi, fQATrackPhiMin, fQATrackPhiMax,
1949 fQATrackHighPtThreshold);
1950 }
1951 } // end: background QA
1952
1953 if(fFFMode){
1954 fFFBckgHisto0RecCuts = new AliFragFuncHistos("Bckg"+title[0]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1955 fFFNBinsPt, fFFPtMin, fFFPtMax,
1956 fFFNBinsXi, fFFXiMin, fFFXiMax,
1957 fFFNBinsZ , fFFZMin , fFFZMax);
1958
1959 fFFBckgHisto0Gen = new AliFragFuncHistos("Bckg"+title[0]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1960 fFFNBinsPt, fFFPtMin, fFFPtMax,
1961 fFFNBinsXi, fFFXiMin, fFFXiMax,
1962 fFFNBinsZ , fFFZMin , fFFZMax);
1963
1964 if(fBckgType[1] != kBckgNone){
1965 fFFBckgHisto1RecCuts = new AliFragFuncHistos("Bckg"+title[1]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1966 fFFNBinsPt, fFFPtMin, fFFPtMax,
1967 fFFNBinsXi, fFFXiMin, fFFXiMax,
1968 fFFNBinsZ , fFFZMin , fFFZMax);
1969 fFFBckgHisto1Gen = new AliFragFuncHistos("Bckg"+title[1]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1970 fFFNBinsPt, fFFPtMin, fFFPtMax,
1971 fFFNBinsXi, fFFXiMin, fFFXiMax,
1972 fFFNBinsZ , fFFZMin , fFFZMax);
1973 }
1974 if(fBckgType[2] != kBckgNone){
1975 fFFBckgHisto2RecCuts = new AliFragFuncHistos("Bckg"+title[2]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1976 fFFNBinsPt, fFFPtMin, fFFPtMax,
1977 fFFNBinsXi, fFFXiMin, fFFXiMax,
1978 fFFNBinsZ , fFFZMin , fFFZMax);
1979
1980 fFFBckgHisto2Gen = new AliFragFuncHistos("Bckg"+title[2]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1981 fFFNBinsPt, fFFPtMin, fFFPtMax,
1982 fFFNBinsXi, fFFXiMin, fFFXiMax,
1983 fFFNBinsZ , fFFZMin , fFFZMax);
1984 }
1985 if(fBckgType[3] != kBckgNone){
1986 fFFBckgHisto3RecCuts = new AliFragFuncHistos("Bckg"+title[3]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1987 fFFNBinsPt, fFFPtMin, fFFPtMax,
1988 fFFNBinsXi, fFFXiMin, fFFXiMax,
1989 fFFNBinsZ , fFFZMin , fFFZMax);
1990
1991 fFFBckgHisto3Gen = new AliFragFuncHistos("Bckg"+title[3]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1992 fFFNBinsPt, fFFPtMin, fFFPtMax,
1993 fFFNBinsXi, fFFXiMin, fFFXiMax,
1994 fFFNBinsZ , fFFZMin , fFFZMax);
1995 }
1996 if(fBckgType[4] != kBckgNone){
1997 fFFBckgHisto4RecCuts = new AliFragFuncHistos("Bckg"+title[4]+"RecCuts", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
1998 fFFNBinsPt, fFFPtMin, fFFPtMax,
1999 fFFNBinsXi, fFFXiMin, fFFXiMax,
2000 fFFNBinsZ , fFFZMin , fFFZMax);
2001
2002 fFFBckgHisto4Gen = new AliFragFuncHistos("Bckg"+title[4]+"Gen", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
2003 fFFNBinsPt, fFFPtMin, fFFPtMax,
2004 fFFNBinsXi, fFFXiMin, fFFXiMax,
2005 fFFNBinsZ , fFFZMin , fFFZMax);
2006 }
2007 if(fEffMode){
2008 fFFBckgHisto0RecEffRec = new AliFragFuncHistos("Bckg"+title[0]+"RecEffRec", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
2009 fFFNBinsPt, fFFPtMin, fFFPtMax,
2010 fFFNBinsXi, fFFXiMin, fFFXiMax,
2011 fFFNBinsZ , fFFZMin , fFFZMax);
2012
2013 fFFBckgHisto0SecRecNS = new AliFragFuncHistos("Bckg"+title[0]+"SecRecNS", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
2014 fFFNBinsPt, fFFPtMin, fFFPtMax,
2015 fFFNBinsXi, fFFXiMin, fFFXiMax,
2016 fFFNBinsZ , fFFZMin , fFFZMax);
2017
2018 fFFBckgHisto0SecRecS = new AliFragFuncHistos("Bckg"+title[0]+"SecRecS", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
2019 fFFNBinsPt, fFFPtMin, fFFPtMax,
2020 fFFNBinsXi, fFFXiMin, fFFXiMax,
2021 fFFNBinsZ , fFFZMin , fFFZMax);
2022
2023 fFFBckgHisto0SecRecSsc = new AliFragFuncHistos("Bckg"+title[0]+"SecRecSsc", fFFNBinsJetPt, fFFJetPtMin, fFFJetPtMax,
2024 fFFNBinsPt, fFFPtMin, fFFPtMax,
2025 fFFNBinsXi, fFFXiMin, fFFXiMax,
2026 fFFNBinsZ , fFFZMin , fFFZMax);
2027
2028 }
2029 } // end: background FF
2030
2031
2032 } // end: background
2033
2034
2035 // ____________ define histograms ____________________
2036
2037 if(fQAMode){
2038 if(fQAMode&1){ // track QA
2039 fQATrackHistosRecCuts->DefineHistos();
2040 fQATrackHistosGen->DefineHistos();
2041 }
2042
2043 if(fQAMode&2){ // jet QA
2044 fQAJetHistosRec->DefineHistos();
2045 fQAJetHistosRecCuts->DefineHistos();
2046 fQAJetHistosRecCutsLeading->DefineHistos();
2047 fQAJetHistosGen->DefineHistos();
2048 fQAJetHistosGenLeading->DefineHistos();
2049 if(fEffMode) fQAJetHistosRecEffLeading->DefineHistos();
2050 }
2051 }
2052
2053 if(fFFMode || fIDFFMode){
2054 fFFHistosRecCuts->DefineHistos();
2055 fFFHistosRecCutsInc->DefineHistos();
2056 fFFHistosRecLeadingTrack->DefineHistos();
2057 fFFHistosGen->DefineHistos();
2058 fFFHistosGenInc->DefineHistos();
2059 fFFHistosGenLeadingTrack->DefineHistos();
2060
2061 if (fIDFFMode) {
2062 for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
2063 fIDFFHistosRecCuts[i]->DefineHistos();
2064 fIDFFHistosGen[i]->DefineHistos();
2065 }
2066 }
2067 }
2068
2069 if(fEffMode){
2070 if(fQAMode&1){
2071 fQATrackHistosRecEffGen->DefineHistos();
2072 fQATrackHistosRecEffRec->DefineHistos();
2073 fQATrackHistosSecRecNS->DefineHistos();
2074 fQATrackHistosSecRecS->DefineHistos();
2075 fQATrackHistosSecRecSsc->DefineHistos();
2076 }
2077 if(fFFMode){
2078 fFFHistosRecEffRec->DefineHistos();
2079 fFFHistosSecRecNS->DefineHistos();
2080 fFFHistosSecRecS->DefineHistos();
2081 fFFHistosSecRecSsc->DefineHistos();
2082 }
2083 } // end: efficiency
2084
2085 // Background
2086 if(fBckgMode){
2087 if(fFFMode){
2088 fFFBckgHisto0RecCuts->DefineHistos();
2089 fFFBckgHisto0Gen->DefineHistos();
2090 if(fBckgType[1] != kBckgNone) fFFBckgHisto1RecCuts->DefineHistos();
2091 if(fBckgType[1] != kBckgNone) fFFBckgHisto1Gen->DefineHistos();
2092 if(fBckgType[2] != kBckgNone) fFFBckgHisto2RecCuts->DefineHistos();
2093 if(fBckgType[2] != kBckgNone) fFFBckgHisto2Gen->DefineHistos();
2094 if(fBckgType[3] != kBckgNone) fFFBckgHisto3RecCuts->DefineHistos();
2095 if(fBckgType[3] != kBckgNone) fFFBckgHisto3Gen->DefineHistos();
2096 if(fBckgType[4] != kBckgNone) fFFBckgHisto4RecCuts->DefineHistos();
2097 if(fBckgType[4] != kBckgNone) fFFBckgHisto4Gen->DefineHistos();
2098
2099 if(fEffMode){
2100 fFFBckgHisto0RecEffRec->DefineHistos();
2101 fFFBckgHisto0SecRecNS->DefineHistos();
2102 fFFBckgHisto0SecRecS->DefineHistos();
2103 fFFBckgHisto0SecRecSsc->DefineHistos();
2104 }
2105 }
2106
2107 if(fQAMode&1){
2108 fQABckgHisto0RecCuts->DefineHistos();
2109 fQABckgHisto0Gen->DefineHistos();
2110 if(fBckgType[1] != kBckgNone) fQABckgHisto1RecCuts->DefineHistos();
2111 if(fBckgType[1] != kBckgNone) fQABckgHisto1Gen->DefineHistos();
2112 if(fBckgType[2] != kBckgNone) fQABckgHisto2RecCuts->DefineHistos();
2113 if(fBckgType[2] != kBckgNone) fQABckgHisto2Gen->DefineHistos();
2114 if(fBckgType[3] != kBckgNone) fQABckgHisto3RecCuts->DefineHistos();
2115 if(fBckgType[3] != kBckgNone) fQABckgHisto3Gen->DefineHistos();
2116 if(fBckgType[4] != kBckgNone) fQABckgHisto4RecCuts->DefineHistos();
2117 if(fBckgType[4] != kBckgNone) fQABckgHisto4Gen->DefineHistos();
2118 }
2119 } // end: background
2120
2121
2122 Bool_t genJets = (fJetTypeGen != kJetsUndef) ? kTRUE : kFALSE;
2123 Bool_t genTracks = (fTrackTypeGen != kTrackUndef) ? kTRUE : kFALSE;
2124 Bool_t recJetsEff = (fJetTypeRecEff != kJetsUndef) ? kTRUE : kFALSE;
2125
2126 fCommonHistList->Add(fh1EvtSelection);
2b81de61 2127 fCommonHistList->Add(fh1VtxSelection);
e131b05f 2128 fCommonHistList->Add(fh1EvtMult);
2129 fCommonHistList->Add(fh1EvtCent);
2130 fCommonHistList->Add(fh1VertexNContributors);
2131 fCommonHistList->Add(fh1VertexZ);
2132 fCommonHistList->Add(fh1nRecJetsCuts);
2133 fCommonHistList->Add(fh1Xsec);
2134 fCommonHistList->Add(fh1Trials);
2135 fCommonHistList->Add(fh1PtHard);
2136 fCommonHistList->Add(fh1PtHardTrials);
2137
2138 if(genJets) fCommonHistList->Add(fh1nGenJets);
2139
2140 // FF histograms
2141 if(fFFMode){
2142 fFFHistosRecCuts->AddToOutput(fCommonHistList);
2143 fFFHistosRecCutsInc->AddToOutput(fCommonHistList);
2144 fFFHistosRecLeadingTrack->AddToOutput(fCommonHistList);
2145
2146 if(genJets && genTracks){
2147 fFFHistosGen->AddToOutput(fCommonHistList);
2148 fFFHistosGenInc->AddToOutput(fCommonHistList);
2149 fFFHistosGenLeadingTrack->AddToOutput(fCommonHistList);
2150 }
2151
2152 if (fIDFFMode) {
2153 for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
2154 if(genJets && genTracks)
2155 fIDFFHistosGen[i]->AddToOutput(fCommonHistList);
2156 fIDFFHistosRecCuts[i]->AddToOutput(fCommonHistList);
2157 }
2158 }
2159 }
2160
2161 // Background
2162 if(fBckgMode){
2163 if(fFFMode){
2164 fFFBckgHisto0RecCuts->AddToOutput(fCommonHistList);
2165 if(fBckgType[1] != kBckgNone) fFFBckgHisto1RecCuts->AddToOutput(fCommonHistList);
2166 if(fBckgType[2] != kBckgNone) fFFBckgHisto2RecCuts->AddToOutput(fCommonHistList);
2167 if(fBckgType[3] != kBckgNone) fFFBckgHisto3RecCuts->AddToOutput(fCommonHistList);
2168 if(fBckgType[4] != kBckgNone) fFFBckgHisto4RecCuts->AddToOutput(fCommonHistList);
2169
2170 if(genJets && genTracks){
2171 fFFBckgHisto0Gen->AddToOutput(fCommonHistList);
2172 if(fBckgType[1] != kBckgNone) fFFBckgHisto1Gen->AddToOutput(fCommonHistList);
2173 if(fBckgType[2] != kBckgNone) fFFBckgHisto2Gen->AddToOutput(fCommonHistList);
2174 if(fBckgType[3] != kBckgNone) fFFBckgHisto3Gen->AddToOutput(fCommonHistList);
2175 if(fBckgType[4] != kBckgNone) fFFBckgHisto4Gen->AddToOutput(fCommonHistList);
2176 }
2177
2178 if(fEffMode){
2179 fFFBckgHisto0RecEffRec->AddToOutput(fCommonHistList);
2180 fFFBckgHisto0SecRecNS->AddToOutput(fCommonHistList);
2181 fFFBckgHisto0SecRecS->AddToOutput(fCommonHistList);
2182 fFFBckgHisto0SecRecSsc->AddToOutput(fCommonHistList);
2183 }
2184 }
2185
2186 if(fQAMode&1){
2187 fQABckgHisto0RecCuts->AddToOutput(fCommonHistList);
2188 if(fBckgType[1] != kBckgNone) fQABckgHisto1RecCuts->AddToOutput(fCommonHistList);
2189 if(fBckgType[2] != kBckgNone) fQABckgHisto2RecCuts->AddToOutput(fCommonHistList);
2190 if(fBckgType[3] != kBckgNone) fQABckgHisto3RecCuts->AddToOutput(fCommonHistList);
2191 if(fBckgType[4] != kBckgNone) fQABckgHisto4RecCuts->AddToOutput(fCommonHistList);
2192 if(genJets && genTracks){
2193 fQABckgHisto0Gen->AddToOutput(fCommonHistList);
2194 if(fBckgType[1] != kBckgNone) fQABckgHisto1Gen->AddToOutput(fCommonHistList);
2195 if(fBckgType[2] != kBckgNone) fQABckgHisto2Gen->AddToOutput(fCommonHistList);
2196 if(fBckgType[3] != kBckgNone) fQABckgHisto3Gen->AddToOutput(fCommonHistList);
2197 if(fBckgType[4] != kBckgNone) fQABckgHisto4Gen->AddToOutput(fCommonHistList);
2198 }
2199 }
2200
2201 if(fh1BckgMult0) fCommonHistList->Add(fh1BckgMult0);
2202 if(fBckgType[1] != kBckgNone) fCommonHistList->Add(fh1BckgMult1);
2203 if(fBckgType[2] != kBckgNone) fCommonHistList->Add(fh1BckgMult2);
2204 if(fBckgType[3] != kBckgNone) fCommonHistList->Add(fh1BckgMult3);
2205 if(fBckgType[4] != kBckgNone) fCommonHistList->Add(fh1BckgMult4);
2206 }
2207
2208
2209 if(fBranchEmbeddedJets.Length()){
2210 fCommonHistList->Add(fh1FractionPtEmbedded);
2211 fCommonHistList->Add(fh1IndexEmbedded);
2212 fCommonHistList->Add(fh2DeltaPtVsJetPtEmbedded);
2213 fCommonHistList->Add(fh2DeltaPtVsRecJetPtEmbedded);
2214 fCommonHistList->Add(fh1DeltaREmbedded);
2215 fCommonHistList->Add(fh1nEmbeddedJets);
2216 }
2217
2218
2219 // QA
2220 if(fQAMode){
2221 if(fQAMode&1){ // track QA
2222 fQATrackHistosRecCuts->AddToOutput(fCommonHistList);
2223 if(genTracks) fQATrackHistosGen->AddToOutput(fCommonHistList);
2224 }
2225
2226 if(fQAMode&2){ // jet QA
2227 fQAJetHistosRec->AddToOutput(fCommonHistList);
2228 fQAJetHistosRecCuts->AddToOutput(fCommonHistList);
2229 fQAJetHistosRecCutsLeading->AddToOutput(fCommonHistList);
2230 if(recJetsEff && fEffMode) fQAJetHistosRecEffLeading->AddToOutput(fCommonHistList);
2231 if(genJets){
2232 fQAJetHistosGen->AddToOutput(fCommonHistList);
2233 fQAJetHistosGenLeading->AddToOutput(fCommonHistList);
2234 }
2235 }
2236 }
2237
2238 if(fBckgMode &&
2239 (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
2240 fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading ||
2241 fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)) {
2242 fCommonHistList->Add(fh1nRecBckgJetsCuts);
2243 if(genJets) fCommonHistList->Add(fh1nGenBckgJets);
2244 }
2245
2246
2247 if(fEffMode && recJetsEff && genTracks){
2248 if(fQAMode&1){
2249 fQATrackHistosRecEffGen->AddToOutput(fCommonHistList);
2250 fQATrackHistosRecEffRec->AddToOutput(fCommonHistList);
2251 fQATrackHistosSecRecNS->AddToOutput(fCommonHistList);
2252 fQATrackHistosSecRecS->AddToOutput(fCommonHistList);
2253 fQATrackHistosSecRecSsc->AddToOutput(fCommonHistList);
2254 }
2255 if(fFFMode){
2256 fFFHistosRecEffRec->AddToOutput(fCommonHistList);
2257 fFFHistosSecRecNS->AddToOutput(fCommonHistList);
2258 fFFHistosSecRecS->AddToOutput(fCommonHistList);
2259 fFFHistosSecRecSsc->AddToOutput(fCommonHistList);
2260 }
2261 fCommonHistList->Add(fh1nRecEffJets);
2262 fCommonHistList->Add(fh2PtRecVsGenPrim);
2263 fCommonHistList->Add(fh2PtRecVsGenSec);
2264 }
2265
2266 // jet shape
2267 if(fJSMode){
2268
2269 fProNtracksLeadingJet = new TProfile("AvgNoOfTracksLeadingJet","AvgNoOfTracksLeadingJet",100,0,250,0,50);
2270 fProDelR80pcPt = new TProfile("AvgdelR80pcPt","AvgdelR80pcPt",100,0,250,0,1);
2271
2272 if(genJets && genTracks){
2273 fProNtracksLeadingJetGen = new TProfile("AvgNoOfTracksLeadingJetGen","AvgNoOfTracksLeadingJetGen",100,0,250,0,50);
2274 fProDelR80pcPtGen = new TProfile("AvgdelR80pcPtGen","AvgdelR80pcPtGen",100,0,250,0,1);
2275 }
2276
2277 if(fBckgMode)
2278 fProNtracksLeadingJetBgrPerp2 = new TProfile("AvgNoOfTracksLeadingJetBgrPerp2","AvgNoOfTracksLeadingJetBgrPerp2",100,0,250,0,50);
2279
2280 if(fEffMode){
2281 fProNtracksLeadingJetRecPrim = new TProfile("AvgNoOfTracksLeadingJetRecPrim","AvgNoOfTracksLeadingJetRecPrim",100,0,250,0,50);
2282 fProDelR80pcPtRecPrim = new TProfile("AvgdelR80pcPtRecPrim","AvgdelR80pcPtRecPrim",100,0,250,0,1);
2283 fProNtracksLeadingJetRecSecNS = new TProfile("AvgNoOfTracksLeadingJetRecSecNS","AvgNoOfTracksLeadingJetRecSecNS",100,0,250,0,50);
2284 fProNtracksLeadingJetRecSecS = new TProfile("AvgNoOfTracksLeadingJetRecSecS","AvgNoOfTracksLeadingJetRecSecS",100,0,250,0,50);
2285 fProNtracksLeadingJetRecSecSsc = new TProfile("AvgNoOfTracksLeadingJetRecSecSsc","AvgNoOfTracksLeadingJetRecSecSsc",100,0,250,0,50);
2286 }
2287
2288 TString strTitJS;
2289 for(Int_t ii=0; ii<5; ii++){
2290 if(ii==0)strTitJS = "_JetPt20to30";
2291 if(ii==1)strTitJS = "_JetPt30to40";
2292 if(ii==2)strTitJS = "_JetPt40to60";
2293 if(ii==3)strTitJS = "_JetPt60to80";
2294 if(ii==4)strTitJS = "_JetPt80to100";
2295
2296 fProDelRPtSum[ii] = new TProfile(Form("AvgPtSumDelR%s",strTitJS.Data()),Form("AvgPtSumDelR%s",strTitJS.Data()),50,0,1,0,250);
2297 if(genJets && genTracks)
2298 fProDelRPtSumGen[ii] = new TProfile(Form("AvgPtSumDelRGen%s",strTitJS.Data()),Form("AvgPtSumDelRGen%s",strTitJS.Data()),50,0,1,0,250);
2299 if(fBckgMode)
2300 fProDelRPtSumBgrPerp2[ii] = new TProfile(Form("AvgPtSumDelRBgrPerp2%s",strTitJS.Data()),Form("AvgPtSumDelRBgrPerp2%s",strTitJS.Data()),50,0,1,0,250);
2301 if(fEffMode){
2302 fProDelRPtSumRecPrim[ii] = new TProfile(Form("AvgPtSumDelRRecPrim%s",strTitJS.Data()),Form("AvgPtSumDelRRecPrim%s",strTitJS.Data()),50,0,1,0,250);
2303 fProDelRPtSumRecSecNS[ii] = new TProfile(Form("AvgPtSumDelRRecSecNS%s",strTitJS.Data()),Form("AvgPtSumDelRRecSecNS%s",strTitJS.Data()),50,0,1,0,250);
2304 fProDelRPtSumRecSecS[ii] = new TProfile(Form("AvgPtSumDelRRecSecS%s",strTitJS.Data()),Form("AvgPtSumDelRRecSecS%s",strTitJS.Data()),50,0,1,0,250);
2305 fProDelRPtSumRecSecSsc[ii] = new TProfile(Form("AvgPtSumDelRRecSecSsc%s",strTitJS.Data()),Form("AvgPtSumDelRRecSecSsc%s",strTitJS.Data()),50,0,1,0,250);
2306 }
2307 }
2308
2309 fCommonHistList->Add(fProNtracksLeadingJet);
2310 fCommonHistList->Add(fProDelR80pcPt);
2311 for(int ii=0; ii<5; ii++) fCommonHistList->Add(fProDelRPtSum[ii]);
2312
2313 if(genJets && genTracks){
2314 fCommonHistList->Add(fProNtracksLeadingJetGen);
2315 fCommonHistList->Add(fProDelR80pcPtGen);
2316 for(Int_t ii=0; ii<5; ii++) fCommonHistList->Add(fProDelRPtSumGen[ii]);
2317 }
2318
2319 if(fBckgMode){
2320 fCommonHistList->Add(fProNtracksLeadingJetBgrPerp2);
2321 for(Int_t ii=0; ii<5; ii++) fCommonHistList->Add(fProDelRPtSumBgrPerp2[ii]);
2322 }
2323
2324 if(fEffMode){
2325 fCommonHistList->Add(fProNtracksLeadingJetRecPrim);
2326 fCommonHistList->Add(fProDelR80pcPtRecPrim);
2327 for(Int_t ii=0; ii<5; ii++) fCommonHistList->Add(fProDelRPtSumRecPrim[ii]);
2328
2329 fCommonHistList->Add(fProNtracksLeadingJetRecSecNS);
2330 for(Int_t ii=0; ii<5; ii++) fCommonHistList->Add(fProDelRPtSumRecSecNS[ii]);
2331
2332 fCommonHistList->Add(fProNtracksLeadingJetRecSecS);
2333 for(Int_t ii=0; ii<5; ii++) fCommonHistList->Add(fProDelRPtSumRecSecS[ii]);
2334
2335 fCommonHistList->Add(fProNtracksLeadingJetRecSecSsc);
2336 for(Int_t ii=0; ii<5; ii++) fCommonHistList->Add(fProDelRPtSumRecSecSsc[ii]);
2337 }
2338 }
a2a9d6d2 2339
2340 // Default analysis utils
2341 fAnaUtils = new AliAnalysisUtils();
2342
2343 // Not used yet, but to be save, forward vertex z cut to analysis utils object
2344 fAnaUtils->SetMaxVtxZ(fMaxVertexZ);
e131b05f 2345
e131b05f 2346 // Load PID framework if desired
9e95a906 2347 if(fDebug > 1) Printf("AliAnalysisTaskIDFragmentationFunction::UserCreateOutputObjects() -> Loading PID framework");
e131b05f 2348
2349 fUseJetPIDtask = fIDFFMode || fFFMode;
2350 fUseInclusivePIDtask = fQAMode && (fQAMode&1);
2351
2352 if (fUseJetPIDtask || fUseInclusivePIDtask) {
2353 TObjArray* tasks = AliAnalysisManager::GetAnalysisManager()->GetTasks();
2354 if (!tasks) {
2355 Printf("ERROR loading PID tasks: Failed to retrieve tasks from analysis manager!\n");
2356
2357 fUseJetPIDtask = kFALSE;
2358 fUseInclusivePIDtask = kFALSE;
2359 }
2360
2361 if (fUseJetPIDtask) {
93fb15f0
ML
2362 delete [] fJetPIDtask;
2363 fJetPIDtask = 0x0;
2364
e131b05f 2365 if (fNumJetPIDtasks > 0) {
93fb15f0
ML
2366 fJetPIDtask = new AliAnalysisTaskPID*[fNumJetPIDtasks];
2367
e131b05f 2368 for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
2369 fJetPIDtask[i] = (AliAnalysisTaskPID*)tasks->FindObject(fNameJetPIDtask[i].Data());
2370
2371 if (!fJetPIDtask[i]) {
2372 Printf("ERROR: Failed to load jet pid task!\n");
2373 fUseJetPIDtask = kFALSE;
2374 }
2375 }
2376 }
2377 else {
77324970 2378 Printf("WARNING: zero jet pid tasks!\n");
e131b05f 2379 fUseJetPIDtask = kFALSE;
2380 }
2381 }
2382
2383 if (fUseInclusivePIDtask) {
93fb15f0
ML
2384 delete [] fInclusivePIDtask;
2385 fInclusivePIDtask = 0x0;
2386
e131b05f 2387 if (fNumInclusivePIDtasks > 0) {
93fb15f0
ML
2388 fInclusivePIDtask = new AliAnalysisTaskPID*[fNumInclusivePIDtasks];
2389
e131b05f 2390 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
2391 fInclusivePIDtask[i] = (AliAnalysisTaskPID*)tasks->FindObject(fNameInclusivePIDtask[i].Data());
2392
2393 if (!fInclusivePIDtask[i]) {
2394 Printf("ERROR: Failed to load inclusive pid task!\n");
2395 fUseInclusivePIDtask = kFALSE;
2396 }
2397 }
2398 }
2399 else {
77324970
CKB
2400 Printf("WARNING: zero inclusive pid tasks!\n");
2401 fUseInclusivePIDtask = kFALSE;
e131b05f 2402 }
2403 }
2404 }
265e4931 2405
630a4bcd 2406 const Int_t nRefMultBins = 100;
2407 const Double_t refMultUp = 100.;
2408 const Double_t refMultDown = 0.;
2409
2410 const Int_t nJetPtBins = 20;
2411 const Double_t jetPtUp = 100.;
2412 const Double_t jetPtDown = 0.;
2413
a2a9d6d2 2414 const Int_t nCentBins = 12;
2415 const Double_t binsCentpp[nCentBins+1] = { 0, 0.01, 0.1, 1, 5, 10, 15, 20, 30, 40, 50, 70, 100};
2416
630a4bcd 2417 fhJetPtRefMultEta5 = new TH2F("fhJetPtRefMultEta5",
2418 "Correlation between jet energy and event multiplicity (|#eta| < 0.5);Ref. mult. (|#eta| < 0.5);#it{p}_{T, jet}^{ch} (GeV/#it{c})",
2419 nRefMultBins, refMultDown, refMultUp, nJetPtBins, jetPtDown, jetPtUp);
2420 fhJetPtRefMultEta8 = new TH2F("fhJetPtRefMultEta8",
2421 "Correlation between jet energy and event multiplicity (|#eta| < 0.8);Ref. mult. (|#eta| < 0.8);#it{p}_{T, jet}^{ch} (GeV/#it{c})",
2422 nRefMultBins, refMultDown, refMultUp, nJetPtBins, jetPtDown, jetPtUp);
a2a9d6d2 2423 fhJetPtMultPercent = new TH2F("fhJetPtMultPercent",
2424 "Correlation between jet energy and event multiplicity percentile (V0M);Multiplicity Percentile (V0M);#it{p}_{T, jet}^{ch} (GeV/#it{c})",
2425 nCentBins, binsCentpp, nJetPtBins, jetPtDown, jetPtUp);
630a4bcd 2426 fCommonHistList->Add(fhJetPtRefMultEta5);
2427 fCommonHistList->Add(fhJetPtRefMultEta8);
a2a9d6d2 2428 fCommonHistList->Add(fhJetPtMultPercent);
630a4bcd 2429
265e4931 2430 if (fUseJetPIDtask) {
2431 const Int_t nPtBins = 68;
2432 Double_t binsPt[nPtBins+1] = {0. , 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45,
2433 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95,
2434 1.0, 1.1 , 1.2, 1.3 , 1.4, 1.5 , 1.6, 1.7 , 1.8, 1.9 ,
2435 2.0, 2.2 , 2.4, 2.6 , 2.8, 3.0 , 3.2, 3.4 , 3.6, 3.8 ,
2436 4.0, 4.5 , 5.0, 5.5 , 6.0, 6.5 , 7.0, 8.0 , 9.0, 10.0,
2437 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 18.0, 20.0, 22.0, 24.0,
2438 26.0, 28.0, 30.0, 32.0, 34.0, 36.0, 40.0, 45.0, 50.0 };
2439
2440 const Int_t DCAbins = 320;
2441 const Double_t DCA_Z_max = 3.5;
2442 const Double_t DCA_XY_max = 2.5;
2443
2444 fhDCA_XY = new TH2F("fhDCA_XY", "All rec. tracks;#it{p}_{T} (GeV/#it{c});DCA_{XY}", nPtBins, binsPt, DCAbins, -DCA_XY_max, DCA_XY_max);
2445 fhDCA_Z = new TH2F("fhDCA_Z", "All rec. tracks;#it{p}_{T} (GeV/#it{c});DCA_{Z}", nPtBins, binsPt, DCAbins, -DCA_Z_max, DCA_Z_max);
2446 fCommonHistList->Add(fhDCA_XY);
2447 fCommonHistList->Add(fhDCA_Z);
2448
2449 for (Int_t i = 0; i < AliPID::kSPECIES; i++) {
2450 fhDCA_XY_prim_MCID[i] = new TH2F(Form("fhDCA_XY_prim_MCID_%s", AliPID::ParticleShortName(i)),
2451 Form("Rec. %s (prim.);#it{p}_{T} (GeV/#it{c});DCA_{XY}", AliPID::ParticleLatexName(i)),
2452 nPtBins, binsPt, DCAbins, -DCA_XY_max, DCA_XY_max);
2453 fhDCA_Z_prim_MCID[i] = new TH2F(Form("fhDCA_Z_prim_MCID_%s", AliPID::ParticleShortName(i)),
2454 Form("Rec. %s (prim.);#it{p}_{T} (GeV/#it{c});DCA_{Z}", AliPID::ParticleLatexName(i)),
2455 nPtBins, binsPt, DCAbins, -DCA_Z_max, DCA_Z_max);
2456 fCommonHistList->Add(fhDCA_XY_prim_MCID[i]);
2457 fCommonHistList->Add(fhDCA_Z_prim_MCID[i]);
2458
2459 fhDCA_XY_sec_MCID[i] = new TH2F(Form("fhDCA_XY_sec_MCID_%s", AliPID::ParticleShortName(i)),
2460 Form("Rec. %s (sec.);#it{p}_{T} (GeV/#it{c});DCA_{XY}", AliPID::ParticleLatexName(i)),
2461 nPtBins, binsPt, DCAbins, -DCA_XY_max, DCA_XY_max);
2462 fhDCA_Z_sec_MCID[i] = new TH2F(Form("fhDCA_Z_sec_MCID_%s", AliPID::ParticleShortName(i)),
2463 Form("Rec. %s (sec.);#it{p}_{T} (GeV/#it{c});DCA_{Z}", AliPID::ParticleLatexName(i)),
2464 nPtBins, binsPt, DCAbins, -DCA_Z_max, DCA_Z_max);
2465 fCommonHistList->Add(fhDCA_XY_sec_MCID[i]);
2466 fCommonHistList->Add(fhDCA_Z_sec_MCID[i]);
2467 }
2468 }
2469
2470
2471 // =========== Switch on Sumw2 for all histos ===========
2472 for (Int_t i=0; i<fCommonHistList->GetEntries(); ++i){
2473 TH1 *h1 = dynamic_cast<TH1*>(fCommonHistList->At(i));
2474 if (h1) h1->Sumw2();
2475 else{
2476 THnSparse *hnSparse = dynamic_cast<THnSparse*>(fCommonHistList->At(i));
2477 if(hnSparse) hnSparse->Sumw2();
2478 }
2479 }
2480
2481 TH1::AddDirectory(oldStatus);
e131b05f 2482
9e95a906 2483 if(fDebug > 2) Printf("AliAnalysisTaskIDFragmentationFunction::UserCreateOutputObjects() -> Posting Output");
2484
e131b05f 2485 PostData(1, fCommonHistList);
9e95a906 2486
2487 if(fDebug > 2) Printf("AliAnalysisTaskIDFragmentationFunction::UserCreateOutputObjects() -> Done");
e131b05f 2488}
2489
2490//_______________________________________________
2491void AliAnalysisTaskIDFragmentationFunction::Init()
2492{
2493 // Initialization
2494 if(fDebug > 1) Printf("AliAnalysisTaskIDFragmentationFunction::Init()");
2495
2496}
2497
2498//_____________________________________________________________
2499void AliAnalysisTaskIDFragmentationFunction::UserExec(Option_t *)
2500{
2501 // Main loop
2502 // Called for each event
2503
2504 if(fDebug > 1) Printf("AliAnalysisTaskIDFragmentationFunction::UserExec()");
2505
2506
2507 if(fDebug > 1) Printf("Analysis event #%5d", (Int_t) fEntry);
2508
2509 // Trigger selection
2510 AliInputEventHandler* inputHandler = (AliInputEventHandler*)
2511 ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
2512
2513 if(!(inputHandler->IsEventSelected() & fEvtSelectionMask)){
2514 fh1EvtSelection->Fill(1.);
2515 if (fDebug > 1 ) Printf(" Trigger Selection: event REJECTED ... ");
2516 PostData(1, fCommonHistList);
2517 return;
2518 }
2519
2520 fESD = dynamic_cast<AliESDEvent*>(InputEvent());
2521 if(!fESD){
2522 if(fDebug>3) Printf("%s:%d ESDEvent not found in the input", (char*)__FILE__,__LINE__);
2523 }
2524
2525 fMCEvent = MCEvent();
2526 if(!fMCEvent){
2527 if(fDebug>3) Printf("%s:%d MCEvent not found in the input", (char*)__FILE__,__LINE__);
2528 }
2529
2530 // get AOD event from input/ouput
2531 TObject* handler = AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler();
2532 if( handler && handler->InheritsFrom("AliAODInputHandler") ) {
2533 fAOD = ((AliAODInputHandler*)handler)->GetEvent();
2534 if(fUseAODInputJets) fAODJets = fAOD;
2535 if (fDebug > 1) Printf("%s:%d AOD event from input", (char*)__FILE__,__LINE__);
2536 }
2537 else {
2538 handler = AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler();
2539 if( handler && handler->InheritsFrom("AliAODHandler") ) {
2540 fAOD = ((AliAODHandler*)handler)->GetAOD();
2541 fAODJets = fAOD;
2542 if (fDebug > 1) Printf("%s:%d AOD event from output", (char*)__FILE__,__LINE__);
2543 }
2544 }
2545
2546 if(!fAODJets && !fUseAODInputJets){ // case we have AOD in input & output and want jets from output
2547 TObject* outHandler = AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler();
2548 if( outHandler && outHandler->InheritsFrom("AliAODHandler") ) {
2549 fAODJets = ((AliAODHandler*)outHandler)->GetAOD();
2550 if (fDebug > 1) Printf("%s:%d jets from output AOD", (char*)__FILE__,__LINE__);
2551 }
2552 }
2553
2554 if(fNonStdFile.Length()!=0){
2555 // case we have an AOD extension - fetch the jets from the extended output
2556
2557 AliAODHandler *aodH = dynamic_cast<AliAODHandler*>(AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler());
2558 fAODExtension = (aodH?aodH->GetExtension(fNonStdFile.Data()):0);
2559 if(!fAODExtension){
2560 if(fDebug>1)Printf("AODExtension not found for %s",fNonStdFile.Data());
2561 }
2562 }
2563
2564 if(!fAOD){
2565 Printf("%s:%d AODEvent not found", (char*)__FILE__,__LINE__);
2566 return;
2567 }
2568 if(!fAODJets){
2569 Printf("%s:%d AODEvent with jet branch not found", (char*)__FILE__,__LINE__);
2570 return;
2571 }
2572
2573
2574 // event selection **************************************************
2575 // *** event class ***
2576 AliVEvent* evtForCentDetermination = handler->InheritsFrom("AliAODInputHandler") ? fAOD : InputEvent();
2577
2578 Double_t centPercent = -1;
2579 if(fEventClass>0){
2580 Int_t cl = 0;
2581 if(handler->InheritsFrom("AliAODInputHandler")){
2582 // since it is not supported by the helper task define own classes
2583 centPercent = fAOD->GetHeader()->GetCentrality();
2584 cl = 1;
2585 if(centPercent>10) cl = 2;
2586 if(centPercent>30) cl = 3;
2587 if(centPercent>50) cl = 4;
2588 }
2589 else {
2590 cl = AliAnalysisHelperJetTasks::EventClass();
2591 if(fESD) centPercent = fESD->GetCentrality()->GetCentralityPercentile("V0M"); // retrieve value 'by hand'
2592 }
2593
2594 if(cl!=fEventClass){
2595 // event not in selected event class, reject event
2596 if (fDebug > 1) Printf("%s:%d event not in selected event class: event REJECTED ...",(char*)__FILE__,__LINE__);
2597 fh1EvtSelection->Fill(2.);
2598 PostData(1, fCommonHistList);
2599 return;
2600 }
2601 }
4b4d71d4 2602
630a4bcd 2603 // Retrieve reference multiplicities in |eta|<0.8 and <0.5
2604 const Int_t refMult5 = fAOD->GetHeader()->GetRefMultiplicityComb05();
2605 const Int_t refMult8 = fAOD->GetHeader()->GetRefMultiplicityComb08();
a2a9d6d2 2606 const Double_t centPercentPP = fAnaUtils->GetMultiplicityPercentile(fAOD, "V0M");
630a4bcd 2607
4b4d71d4 2608
2609 // Count events with trigger selection, note: Set centrality percentile fix to -1 for pp for PID framework
2610 if (fUseJetPIDtask) {
2611 for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
2612 fJetPIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSel);
2613 }
2614 }
2615
2616 if (fUseInclusivePIDtask) {
2617 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
2618 fInclusivePIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSel);
2619 }
2620 }
e131b05f 2621
2622 // *** vertex cut ***
2623 AliAODVertex* primVtx = fAOD->GetPrimaryVertex();
2624 if (!primVtx) {
2625 Printf("%s:%d Primary vertex not found", (char*)__FILE__,__LINE__);
2626 return;
2627 }
2628
2629 Int_t nTracksPrim = primVtx->GetNContributors();
2630 fh1VertexNContributors->Fill(nTracksPrim);
2631
2632
2633 if (fDebug > 1) Printf("%s:%d primary vertex selection: %d", (char*)__FILE__,__LINE__,nTracksPrim);
4b4d71d4 2634 if(nTracksPrim <= 0) {
e131b05f 2635 if (fDebug > 1) Printf("%s:%d primary vertex selection: event REJECTED...",(char*)__FILE__,__LINE__);
2636 fh1EvtSelection->Fill(3.);
2637 PostData(1, fCommonHistList);
2638 return;
2639 }
2640
4b4d71d4 2641 TString primVtxName(primVtx->GetName());
2642
2643 if(primVtxName.CompareTo("TPCVertex",TString::kIgnoreCase) == 1){
2644 if (fDebug > 1) Printf("%s:%d primary vertex selection: TPC vertex, event REJECTED...",(char*)__FILE__,__LINE__);
2645 fh1EvtSelection->Fill(5.);
2646 PostData(1, fCommonHistList);
2647 return;
2648 }
2649
2650 // Count events with trigger selection and vtx cut, note: Set centrality percentile fix to -1 for pp for PID framework
2651 if (fUseJetPIDtask) {
2652 for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
2653 fJetPIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCut);
2654 }
2655 }
2656
2657 if (fUseInclusivePIDtask) {
2658 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
2659 fInclusivePIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCut);
2660 }
2661 }
2662
e131b05f 2663 fh1VertexZ->Fill(primVtx->GetZ());
2664
2665 if(TMath::Abs(primVtx->GetZ())>fMaxVertexZ){
2666 if (fDebug > 1) Printf("%s:%d primary vertex z = %f: event REJECTED...",(char*)__FILE__,__LINE__,primVtx->GetZ());
2667 fh1EvtSelection->Fill(4.);
2668 PostData(1, fCommonHistList);
2669 return;
2670 }
2671
4b4d71d4 2672 // Count events with trigger selection and vtx cut, note: Set centrality percentile fix to -1 for pp for PID framework
2673 if (fUseJetPIDtask) {
2674 for (Int_t i = 0; i < fNumJetPIDtasks; i++) {
2675 fJetPIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCutAndZvtxCut);
2676 }
e131b05f 2677 }
4b4d71d4 2678
2679 if (fUseInclusivePIDtask) {
2680 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
2681 fInclusivePIDtask[i]->IncrementEventCounter(fIsPP ? -1. : centPercent, AliAnalysisTaskPID::kTriggerSelAndVtxCutAndZvtxCut);
2682 }
2683 }
2684
e131b05f 2685 if (fDebug > 1) Printf("%s:%d event ACCEPTED ...",(char*)__FILE__,__LINE__);
2686 fh1EvtSelection->Fill(0.);
2b81de61 2687 fh1VtxSelection->Fill(primVtx->GetType());
e131b05f 2688 fh1EvtCent->Fill(centPercent);
2689
2690 // Set centrality percentile fix to -1 for pp to be used for the PID framework
2691 if (fIsPP)
2692 centPercent = -1;
2693
1a8d4484 2694
2695
2696 // Call ConfigureTaskForCurrentEvent of PID tasks to ensure that everything is set up properly for the current event
2697 // (e.g. run/period dependence of max eta variation map)
2698 if (fUseInclusivePIDtask) {
2699 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++)
2700 fInclusivePIDtask[i]->ConfigureTaskForCurrentEvent(fAOD);
2701 }
2702
2703 if (fUseJetPIDtask) {
2704 for (Int_t i = 0; i < fNumJetPIDtasks; i++)
2705 fJetPIDtask[i]->ConfigureTaskForCurrentEvent(fAOD);
2706 }
2707
2708
2709
e131b05f 2710 //___ get MC information __________________________________________________________________
2711
2712 fh1Trials->Fill("#sum{ntrials}",fAvgTrials);
2713
2714 if (fUseInclusivePIDtask) {
2715 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++)
2716 fInclusivePIDtask[i]->FillPythiaTrials(fAvgTrials);
2717 }
2718
2719 if (fUseJetPIDtask) {
2720 for (Int_t i = 0; i < fNumJetPIDtasks; i++)
2721 fJetPIDtask[i]->FillPythiaTrials(fAvgTrials);
2722 }
2723
2724 Double_t ptHard = 0.;
2725 Double_t nTrials = 1; // trials for MC trigger weight for real data
2726
2727 if(fMCEvent){
2728 AliGenEventHeader* genHeader = fMCEvent->GenEventHeader();
2729
2730 if(genHeader){
2731
2732 AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
2733 AliGenHijingEventHeader* hijingGenHeader = 0x0;
2734
2735 if(pythiaGenHeader){
2736 if(fDebug>3) Printf("%s:%d pythiaGenHeader found", (char*)__FILE__,__LINE__);
2737 nTrials = pythiaGenHeader->Trials();
2738 ptHard = pythiaGenHeader->GetPtHard();
2739
2740 fh1PtHard->Fill(ptHard);
2741 fh1PtHardTrials->Fill(ptHard,nTrials);
2742
2743 } else { // no pythia, hijing?
2744
2745 if(fDebug>3) Printf("%s:%d no pythiaGenHeader found", (char*)__FILE__,__LINE__);
2746
2747 hijingGenHeader = dynamic_cast<AliGenHijingEventHeader*>(genHeader);
2748 if(!hijingGenHeader){
2749 Printf("%s:%d no pythiaGenHeader or hjingGenHeader found", (char*)__FILE__,__LINE__);
2750 } else {
2751 if(fDebug>3) Printf("%s:%d hijingGenHeader found", (char*)__FILE__,__LINE__);
2752 }
2753 }
2754
2755 //fh1Trials->Fill("#sum{ntrials}",fAvgTrials);
2756 }
2757 }
2758
2759 //___ fetch jets __________________________________________________________________________
2760
2761 Int_t nJ = GetListOfJets(fJetsRec, kJetsRec);
2762 Int_t nRecJets = 0;
2763 if(nJ>=0) nRecJets = fJetsRec->GetEntries();
2764 if(fDebug>2)Printf("%s:%d Selected Rec jets: %d %d",(char*)__FILE__,__LINE__,nJ,nRecJets);
2765 if(nJ != nRecJets) Printf("%s:%d Mismatch Selected Rec Jets: %d %d",(char*)__FILE__,__LINE__,nJ,nRecJets);
2766
2767 Int_t nJCuts = GetListOfJets(fJetsRecCuts, kJetsRecAcceptance);
2768 Int_t nRecJetsCuts = 0;
2769 if(nJCuts>=0) nRecJetsCuts = fJetsRecCuts->GetEntries();
2770 if(fDebug>2)Printf("%s:%d Selected Rec jets after cuts: %d %d",(char*)__FILE__,__LINE__,nJCuts,nRecJetsCuts);
2771 if(nRecJetsCuts != nJCuts) Printf("%s:%d Mismatch selected Rec jets after cuts: %d %d",(char*)__FILE__,__LINE__,nJCuts,nRecJetsCuts);
2772 fh1nRecJetsCuts->Fill(nRecJetsCuts);
2773
2774 if(fJetTypeGen==kJetsKine || fJetTypeGen == kJetsKineAcceptance) fJetsGen->SetOwner(kTRUE); // kine aod jets allocated on heap, delete them with TList::Clear()
2775
2776 Int_t nJGen = GetListOfJets(fJetsGen, fJetTypeGen);
2777 Int_t nGenJets = 0;
2778 if(nJGen>=0) nGenJets = fJetsGen->GetEntries();
2779 if(fDebug>2)Printf("%s:%d Selected Gen jets: %d %d",(char*)__FILE__,__LINE__,nJGen,nGenJets);
2780
2781 if(nJGen != nGenJets) Printf("%s:%d Mismatch selected Gen jets: %d %d",(char*)__FILE__,__LINE__,nJGen,nGenJets);
2782 fh1nGenJets->Fill(nGenJets);
2783
2784
2785 if(fJetTypeRecEff==kJetsKine || fJetTypeRecEff == kJetsKineAcceptance) fJetsRecEff->SetOwner(kTRUE); // kine aod jets allocated on heap, delete them with TList::Clear()
2786 Int_t nJRecEff = GetListOfJets(fJetsRecEff, fJetTypeRecEff);
2787 Int_t nRecEffJets = 0;
2788 if(nJRecEff>=0) nRecEffJets = fJetsRecEff->GetEntries();
2789 if(fDebug>2)Printf("%s:%d Selected RecEff jets: %d %d",(char*)__FILE__,__LINE__,nJRecEff,nRecEffJets);
2790 if(nJRecEff != nRecEffJets) Printf("%s:%d Mismatch selected RecEff jets: %d %d",(char*)__FILE__,__LINE__,nJRecEff,nRecEffJets);
2791 fh1nRecEffJets->Fill(nRecEffJets);
2792
2793
2794 Int_t nEmbeddedJets = 0;
2795 TArrayI iEmbeddedMatchIndex;
2796 TArrayF fEmbeddedPtFraction;
2797
2798
2799 if(fBranchEmbeddedJets.Length()){
2800 Int_t nJEmbedded = GetListOfJets(fJetsEmbedded, kJetsEmbedded);
2801 if(nJEmbedded>=0) nEmbeddedJets = fJetsEmbedded->GetEntries();
2802 if(fDebug>2)Printf("%s:%d Selected Embedded jets: %d %d",(char*)__FILE__,__LINE__,nJEmbedded,nEmbeddedJets);
2803 if(nJEmbedded != nEmbeddedJets) Printf("%s:%d Mismatch Selected Embedded Jets: %d %d",(char*)__FILE__,__LINE__,nJEmbedded,nEmbeddedJets);
2804 fh1nEmbeddedJets->Fill(nEmbeddedJets);
2805
2806 Float_t maxDist = 0.3;
2807
2808 iEmbeddedMatchIndex.Set(nEmbeddedJets);
2809 fEmbeddedPtFraction.Set(nEmbeddedJets);
2810
2811 iEmbeddedMatchIndex.Reset(-1);
2812 fEmbeddedPtFraction.Reset(0);
2813
2814 AliAnalysisHelperJetTasks::GetJetMatching(fJetsEmbedded, nEmbeddedJets,
2815 fJetsRecCuts, nRecJetsCuts,
2816 iEmbeddedMatchIndex, fEmbeddedPtFraction,
2817 fDebug, maxDist);
2818
2819 }
2820
2821 //____ fetch background clusters ___________________________________________________
2822 if(fBckgMode &&
2823 (fBckgType[0]==kBckgClusters || fBckgType[1]==kBckgClusters || fBckgType[2]==kBckgClusters || fBckgType[3]==kBckgClusters || fBckgType[4]==kBckgClusters ||
2824 fBckgType[0]==kBckgClustersOutLeading || fBckgType[1]==kBckgClustersOutLeading || fBckgType[2]==kBckgClustersOutLeading ||
2825 fBckgType[3]==kBckgClustersOutLeading || fBckgType[4]==kBckgClustersOutLeading)){
2826
2827 Int_t nBJ = GetListOfBckgJets(fBckgJetsRec, kJetsRec);
2828 Int_t nRecBckgJets = 0;
2829 if(nBJ>=0) nRecBckgJets = fBckgJetsRec->GetEntries();
2830 if(fDebug>2)Printf("%s:%d Selected Rec background jets: %d %d",(char*)__FILE__,__LINE__,nBJ,nRecBckgJets);
2831 if(nBJ != nRecBckgJets) Printf("%s:%d Mismatch Selected Rec background jets: %d %d",(char*)__FILE__,__LINE__,nBJ,nRecBckgJets);
2832
2833 Int_t nBJCuts = GetListOfBckgJets(fBckgJetsRecCuts, kJetsRecAcceptance);
2834 Int_t nRecBckgJetsCuts = 0;
2835 if(nBJCuts>=0) nRecBckgJetsCuts = fBckgJetsRecCuts->GetEntries();
2836 if(fDebug>2)Printf("%s:%d Selected Rec background jets after cuts: %d %d",(char*)__FILE__,__LINE__,nJCuts,nRecJetsCuts);
2837 if(nRecBckgJetsCuts != nBJCuts) Printf("%s:%d Mismatch selected Rec background jets after cuts: %d %d",(char*)__FILE__,__LINE__,nBJCuts,nRecBckgJetsCuts);
2838 fh1nRecBckgJetsCuts->Fill(nRecBckgJetsCuts);
2839
2840 if(0){ // protection OB - not yet implemented
2841 if(fJetTypeGen==kJetsKine || fJetTypeGen == kJetsKineAcceptance) fBckgJetsGen->SetOwner(kTRUE); // kine aod jets allocated on heap, delete them with TList::Clear()
2842 Int_t nBJGen = GetListOfBckgJets(fBckgJetsGen, fJetTypeGen);
2843 Int_t nGenBckgJets = 0;
2844 if(nBJGen>=0) nGenBckgJets = fBckgJetsGen->GetEntries();
2845 if(fDebug>2)Printf("%s:%d Selected Gen background jets: %d %d",(char*)__FILE__,__LINE__,nBJGen,nGenBckgJets);
2846 if(nBJGen != nGenBckgJets) Printf("%s:%d Mismatch selected Gen background jets: %d %d",(char*)__FILE__,__LINE__,nBJGen,nGenBckgJets);
2847 fh1nGenBckgJets->Fill(nGenBckgJets);
2848 }
2849 }
2850
2851
2852 //____ fetch particles __________________________________________________________
2853
2854 Int_t nTCuts;
2855 if(fUseExtraTracks == 1) nTCuts = GetListOfTracks(fTracksRecCuts, kTrackAODExtraCuts);
2856 else if(fUseExtraTracks == -1) nTCuts = GetListOfTracks(fTracksRecCuts, kTrackAODExtraonlyCuts);
2857 else nTCuts = GetListOfTracks(fTracksRecCuts, kTrackAODCuts);
2858
2859 Int_t nRecPartCuts = 0;
2860 if(nTCuts>=0) nRecPartCuts = fTracksRecCuts->GetEntries();
2861 if(fDebug>2)Printf("%s:%d Selected Rec tracks after cuts: %d %d",(char*)__FILE__,__LINE__,nTCuts,nRecPartCuts);
2862 if(nRecPartCuts != nTCuts) Printf("%s:%d Mismatch selected Rec tracks after cuts: %d %d",
2863 (char*)__FILE__,__LINE__,nTCuts,nRecPartCuts);
2864 fh1EvtMult->Fill(nRecPartCuts);
2865
2866
2867 Int_t nTGen = GetListOfTracks(fTracksGen,fTrackTypeGen);
2868 Int_t nGenPart = 0;
2869 if(nTGen>=0) nGenPart = fTracksGen->GetEntries();
2870 if(fDebug>2)Printf("%s:%d Selected Gen tracks: %d %d",(char*)__FILE__,__LINE__,nTGen,nGenPart);
2871 if(nGenPart != nTGen) Printf("%s:%d Mismatch selected Gen tracks: %d %d",(char*)__FILE__,__LINE__,nTGen,nGenPart);
2872
2873 // Just cut on filterBit, but take the full acceptance
2874 Int_t nTCutsEfficiency = GetListOfTracks(fTracksRecCutsEfficiency, kTrackAODQualityCuts);
2875 Int_t nRecPartCutsEfficiency = 0;
2876 if(nTCutsEfficiency>=0) nRecPartCutsEfficiency = fTracksRecCutsEfficiency->GetEntries();
2877 if(fDebug>2)Printf("%s:%d Selected Rec tracks efficiency after cuts: %d %d",(char*)__FILE__,__LINE__,
2878 nTCutsEfficiency,nRecPartCutsEfficiency);
2879 if(nRecPartCutsEfficiency != nTCutsEfficiency) Printf("%s:%d Mismatch selected Rec tracks after cuts: %d %d",
2880 (char*)__FILE__,__LINE__,nTCutsEfficiency,nRecPartCutsEfficiency);
2881
2882 AliPIDResponse* pidResponse = 0x0;
856f1166 2883 Bool_t tuneOnDataTPC = kFALSE;
e131b05f 2884 if (fUseJetPIDtask || fUseInclusivePIDtask) {
c4856fb1 2885 if (!inputHandler) {
e131b05f 2886 AliFatal("Input handler needed");
c4856fb1 2887 return;
2888 }
e131b05f 2889 else {
2890 // PID response object
2891 pidResponse = inputHandler->GetPIDResponse();
c4856fb1 2892 if (!pidResponse) {
e131b05f 2893 AliFatal("PIDResponse object was not created");
c4856fb1 2894 return;
2895 }
856f1166 2896 else {
2897 tuneOnDataTPC = pidResponse->IsTunedOnData() &&
2898 ((pidResponse->GetTunedOnDataMask() & AliPIDResponse::kDetTPC) == AliPIDResponse::kDetTPC);
2899 }
e131b05f 2900 }
2901 }
2902
9e95a906 2903 if(fDebug>2)Printf("%s:%d Starting processing...",(char*)__FILE__,__LINE__);
2904
e131b05f 2905 //____ analysis, fill histos ___________________________________________________
2906
2907 if(fQAMode){
2908 // loop over tracks
2909 if(fQAMode&1){
2910 TClonesArray *tca = fUseInclusivePIDtask ? dynamic_cast<TClonesArray*>(fAOD->FindListObject(AliAODMCParticle::StdBranchName())) : 0x0;
2911
2912 // Fill efficiency for generated primaries and also fill histos for generated yields (primaries + all)
2913 // Efficiency, inclusive - particle level
2914 if (fUseInclusivePIDtask && tca) {
2915 for (Int_t it = 0; it < tca->GetEntriesFast(); it++) {
2916 AliAODMCParticle* part = dynamic_cast<AliAODMCParticle*>(tca->At(it));
2917 if (!part)
2918 continue;
2919
2920 // Define clean MC sample with corresponding particle level track cuts:
2921 // - MC-track must be in desired eta range
2922 // - MC-track must be physical primary
2923 // - Species must be one of those in question
2924
2925 if (part->Eta() > fTrackEtaMax || part->Eta() < fTrackEtaMin)
2926 continue;
2927
2928 Int_t mcID = AliAnalysisTaskPID::PDGtoMCID(part->GetPdgCode());
2929
2930 // Following lines are not needed - just keep other species (like casecades) - will end up in overflow bin
2931 // and only affect the efficiencies for all (i.e. not identified) what is desired!
2932 //if (mcID == AliPID::kUnknown)
2933 // continue;
2934
2935 if (!part->IsPhysicalPrimary())
2936 continue;
2937 /*
2938 Int_t iMother = part->GetMother();
2939 if (iMother >= 0)
2940 continue; // Not a physical primary
2941 */
2942
2943 Double_t pT = part->Pt();
2944
2945 // AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3
2946 Double_t chargeMC = part->Charge() / 3.;
2947
2948 if (TMath::Abs(chargeMC) < 0.01)
2949 continue; // Reject neutral particles (only relevant, if mcID is not used)
2950
2942f542 2951 Double_t valuesGenYield[AliAnalysisTaskPID::kGenYieldNumAxes] = { static_cast<Double_t>(mcID), pT, centPercent, -1, -1, -1, -1 };
e131b05f 2952
2953 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
77324970
CKB
2954 if (fInclusivePIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(part->Eta()))) {
2955 valuesGenYield[fInclusivePIDtask[i]->GetIndexOfChargeAxisGenYield()] = chargeMC;
2956 fInclusivePIDtask[i]->FillGeneratedYield(valuesGenYield);
2957 }
e131b05f 2958 }
2959
2942f542 2960 Double_t valuesEff[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), pT, part->Eta(), chargeMC,
e131b05f 2961 centPercent, -1, -1, -1 };// no jet pT etc since inclusive spectrum
2962 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++)
2963 fInclusivePIDtask[i]->FillEfficiencyContainer(valuesEff, AliAnalysisTaskPID::kStepGenWithGenCuts);
2964 }
2965 }
2966
2967 if(fUseInclusivePIDtask){
2968 //Efficiency, inclusive - detector level
2969 for(Int_t it=0; it<nRecPartCutsEfficiency; ++it){
2970 // fill inclusive tracks XXX, they have the same track cuts!
2971 AliAODTrack * inclusiveaod = dynamic_cast<AliAODTrack*>(fTracksRecCutsEfficiency->At(it));
2972 if(inclusiveaod){
856f1166 2973 Double_t dEdxTPC = tuneOnDataTPC ? pidResponse->GetTPCsignalTunedOnData(inclusiveaod)
2974 : inclusiveaod->GetTPCsignal();
e131b05f 2975
2976 if (dEdxTPC <= 0)
2977 continue;
2978
a6852ea8 2979 Bool_t survivedTPCCutMIGeo = AliAnalysisTaskPID::TPCCutMIGeo(inclusiveaod, InputEvent());
493982d9 2980 Bool_t survivedTPCnclCut = AliAnalysisTaskPID::TPCnclCut(inclusiveaod);
a6852ea8 2981
e131b05f 2982 Int_t label = TMath::Abs(inclusiveaod->GetLabel());
2983
2984 // find MC track in our list, if available
2985 AliAODMCParticle* gentrack = tca ? dynamic_cast<AliAODMCParticle*>(tca->At(label)) : 0x0;
2986 Int_t pdg = 0;
2987
2988 if (gentrack)
2989 pdg = gentrack->GetPdgCode();
2990
2991 // For efficiency: Reconstructed track has survived all cuts on the detector level (no cut on eta acceptance)
2992 // and has an associated MC track
2993 // -> Check whether associated MC track belongs to the clean MC sample defined above,
2994 // i.e. survives the particle level track cuts
2995 if (gentrack) {
2996 Int_t mcID = AliAnalysisTaskPID::PDGtoMCID(pdg);
2997
2998 // Following lines are not needed - just keep other species (like casecades) - will end up in overflow bin
2999 // and only affect the efficiencies for all (i.e. not identified) what is desired!
3000 //if (mcID == AliPID::kUnknown)
3001 // continue;
3002
3003 // Fill efficiency for reconstructed primaries
3004 if (!gentrack->IsPhysicalPrimary())
3005 continue;
3006 /*
3007 * Int_t iMother = gentrack->GetMother();
3008 * if (iMother >= 0)
3009 * continue; // Not a physical primary
3010 */
3011
3012 if (gentrack->Eta() > fTrackEtaMax || gentrack->Eta() < fTrackEtaMin)
3013 continue;
3014
3015 // AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3
2942f542 3016 Double_t value[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), gentrack->Pt(), gentrack->Eta(), gentrack->Charge() / 3.,
e131b05f 3017 centPercent,
3018 -1, -1, -1 };// no jet pT etc since inclusive spectrum
a6852ea8 3019 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
493982d9
ML
3020 if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
3021 (survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
3022 (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))
a6852ea8 3023 fInclusivePIDtask[i]->FillEfficiencyContainer(value, AliAnalysisTaskPID::kStepRecWithGenCuts);
3024 }
e131b05f 3025
2942f542 3026 Double_t valueMeas[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), inclusiveaod->Pt(), inclusiveaod->Eta(),
3027 static_cast<Double_t>(inclusiveaod->Charge()), centPercent,
e131b05f 3028 -1, -1, -1 };// no jet pT etc since inclusive spectrum
a6852ea8 3029 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
493982d9
ML
3030 if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
3031 (survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
3032 (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))
a6852ea8 3033 fInclusivePIDtask[i]->FillEfficiencyContainer(valueMeas, AliAnalysisTaskPID::kStepRecWithGenCutsMeasuredObs);
3034 }
e131b05f 3035 }
3036 }
3037 }
3038 }
3039
3040
3041 for(Int_t it=0; it<nRecPartCuts; ++it){
3042 AliVParticle *part = dynamic_cast<AliVParticle*>(fTracksRecCuts->At(it));
3043 if(part)fQATrackHistosRecCuts->FillTrackQA( part->Eta(), TVector2::Phi_0_2pi(part->Phi()), part->Pt() );
3044
3045 // fill inclusive tracks XXX, they have the same track cuts!
3046 AliAODTrack * inclusiveaod = dynamic_cast<AliAODTrack*>(fTracksRecCuts->At(it));
3047 if(inclusiveaod){
3048 if(fUseInclusivePIDtask){
856f1166 3049 Double_t dEdxTPC = tuneOnDataTPC ? pidResponse->GetTPCsignalTunedOnData(inclusiveaod)
3050 : inclusiveaod->GetTPCsignal();
e131b05f 3051
3052 if (dEdxTPC <= 0)
3053 continue;
3054
a6852ea8 3055 Bool_t survivedTPCCutMIGeo = AliAnalysisTaskPID::TPCCutMIGeo(inclusiveaod, InputEvent());
493982d9 3056 Bool_t survivedTPCnclCut = AliAnalysisTaskPID::TPCnclCut(inclusiveaod);
a6852ea8 3057
e131b05f 3058 Int_t label = TMath::Abs(inclusiveaod->GetLabel());
3059
3060 // find MC track in our list, if available
3061 AliAODMCParticle* gentrack = tca ? dynamic_cast<AliAODMCParticle*>(tca->At(label)) : 0x0;
3062 Int_t pdg = 0;
3063
3064 if (gentrack)
3065 pdg = gentrack->GetPdgCode();
3066
a6852ea8 3067 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
493982d9
ML
3068 if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
3069 (survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
77324970
CKB
3070 (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut())) {
3071 if (fInclusivePIDtask[i]->IsInAcceptedEtaRange(TMath::Abs(inclusiveaod->Eta())))
3072 fInclusivePIDtask[i]->ProcessTrack(inclusiveaod, pdg, centPercent, -1); // no jet pT since inclusive spectrum
3073 }
a6852ea8 3074 }
e131b05f 3075
3076 if (gentrack) {
3077 Int_t mcID = AliAnalysisTaskPID::PDGtoMCID(pdg);
2942f542 3078 Double_t valueRecAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), inclusiveaod->Pt(), inclusiveaod->Eta(),
3079 static_cast<Double_t>(inclusiveaod->Charge()), centPercent,
e131b05f 3080 -1, -1, -1 };
a6852ea8 3081 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
493982d9
ML
3082 if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
3083 (survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
3084 (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))
a6852ea8 3085 fInclusivePIDtask[i]->FillEfficiencyContainer(valueRecAllCuts, AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObs);
3086 }
e131b05f 3087
3088 Double_t weight = IsSecondaryWithStrangeMotherMC(gentrack) ? GetMCStrangenessFactorCMS(gentrack) : 1.0;
a6852ea8 3089 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
493982d9
ML
3090 if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
3091 (survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
3092 (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut()))
a6852ea8 3093 fInclusivePIDtask[i]->FillEfficiencyContainer(valueRecAllCuts,
3094 AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObsStrangenessScaled,
3095 weight);
3096 }
9e95a906 3097
e131b05f 3098 if (gentrack->IsPhysicalPrimary()) {
9e95a906 3099 // AliAODMCParticle->Charge() calls TParticlePDG->Charge(), which returns the charge in units of e0 / 3
2942f542 3100 Double_t valueGenAllCuts[AliAnalysisTaskPID::kEffNumAxes] = { static_cast<Double_t>(mcID), gentrack->Pt(), gentrack->Eta(),
9e95a906 3101 gentrack->Charge() / 3., centPercent, -1, -1,
3102 -1 };
3103
e4351829 3104 Double_t valuePtResolution[AliAnalysisTaskPID::kPtResNumAxes] = { -1, gentrack->Pt(), inclusiveaod->Pt(),
3105 gentrack->Charge() / 3., centPercent };
9e95a906 3106
3107 for (Int_t i = 0; i < fNumInclusivePIDtasks; i++) {
493982d9
ML
3108 if ((!fInclusivePIDtask[i]->GetUseTPCCutMIGeo() && !fInclusivePIDtask[i]->GetUseTPCnclCut()) ||
3109 (survivedTPCCutMIGeo && fInclusivePIDtask[i]->GetUseTPCCutMIGeo()) ||
3110 (survivedTPCnclCut && fInclusivePIDtask[i]->GetUseTPCnclCut())) {
a6852ea8 3111 fInclusivePIDtask[i]->FillEfficiencyContainer(valueRecAllCuts,
3112 AliAnalysisTaskPID::kStepRecWithRecCutsMeasuredObsPrimaries);
3113 fInclusivePIDtask[i]->FillEfficiencyContainer(valueGenAllCuts,
3114 AliAnalysisTaskPID::kStepRecWithRecCutsPrimaries);
3115
3116 fInclusivePIDtask[i]->FillPtResolution(mcID, valuePtResolution);
3117 }
9e95a906 3118 }
e131b05f 3119 }
3120 }
3121 }
3122 }
3123 }
3124 for(Int_t it=0; it<nGenPart; ++it){
3125 AliVParticle *part = dynamic_cast<AliVParticle*>(fTracksGen->At(it));
3126 if(part)fQATrackHistosGen->FillTrackQA( part->Eta(), TVector2::Phi_0_2pi(part->Phi()), part->Pt());
3127 }
3128 }
3129
3130 // loop over jets
3131 if(fQAMode&2){
3132 for(Int_t ij=0; ij<nRecJets; ++ij){
3133 AliAODJet* jet = dynamic_cast<AliAODJet*>(fJetsRec->At(ij));
3134 if(jet)fQAJetHistosRec->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt());
3135 }
3136 }
3137 }
3138
3139 if(fQAMode || fFFMode){
3140 // generated jets
3141 for(Int_t ij=0; ij<nGenJets; ++ij){
3142 AliAODJet* jet = dynamic_cast<AliAODJet*>(fJetsGen->At(ij));
3143
3144 if(!jet)continue;
3145
3146 if(fQAMode&2) fQAJetHistosGen->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt());
3147
3148 if(fQAMode&2 && (ij==0)) fQAJetHistosGenLeading->FillJetQA( jet->Eta(), TVector2::Phi_0_2pi(jet->Phi()), jet->Pt() );
3149
c4856fb1 3150 if((ij==0) || !fOnlyLeadingJets){ // leading jets or all jets
e131b05f 3151 TList* jettracklist = new TList();
3152 Double_t sumPt = 0.;
3153 Bool_t isBadJet = kFALSE;
3154
3155 if(GetFFRadius()<=0){
3156 GetJetTracksTrackrefs(jettracklist, jet, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);
3157 } else {
3158 GetJetTracksPointing(fTracksGen, jettracklist, jet, GetFFRadius(), sumPt, GetFFMinLTrackPt(), GetFFMaxTrackPt(), isBadJet);
3159 }
3160
3161 if(GetFFMinNTracks()>0 && jettracklist->GetSize()<=GetFFMinNTracks()) isBadJet = kTRUE;
3162 if(isBadJet) continue;
3163
3164 for(Int_t it=0; it<jettracklist->GetSize(); ++it){
3165
3166 AliVParticle* trackVP = dynamic_cast<AliVParticle*>(jettracklist->At(it));
3167 if(!trackVP)continue;
3168 TLorentzVector* trackV = new TLorentzVector(trackVP->Px(),trackVP->Py(),trackVP->Pz(),trackVP->P());
3169
3170 Float_t jetPt = jet->Pt();
3171 Float_t trackPt = trackV->Pt();