1 // ******************************************
2 // This task computes several jet observables like
3 // the fraction of energy in inner and outer coronnas,
4 // the distance from track to jet axis and a
5 // correlation strength distribution of particles inside jets.
6 // Author: lcunquei@cern.ch
7 // *******************************************
10 /**************************************************************************
11 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
13 * Author: The ALICE Off-line Project. *
14 * Contributors are mentioned in the code where appropriate. *
16 * Permission to use, copy, modify and distribute this software and its *
17 * documentation strictly for non-commercial purposes is hereby granted *
18 * without fee, provided that the above copyright notice appears in all *
19 * copies and that both the copyright notice and this permission notice *
20 * appear in the supporting documentation. The authors make no claims *
21 * about the suitability of this software for any purpose. It is *
22 * provided "as is" without express or implied warranty. *
23 **************************************************************************/
33 #include "THnSparse.h"
38 #include "AliAnalysisTask.h"
39 #include "AliAnalysisManager.h"
41 #include "AliVEvent.h"
42 #include "AliESDEvent.h"
43 #include "AliESDInputHandler.h"
44 #include "AliCentrality.h"
45 #include "AliAnalysisHelperJetTasks.h"
46 #include "AliInputEventHandler.h"
47 #include "AliAODJetEventBackground.h"
48 #include "AliAnalysisTaskFastEmbedding.h"
50 #include "AliAODEvent.h"
51 #include "AliAODHandler.h"
52 #include "AliAODJet.h"
54 #include "AliAnalysisTaskJetCore.h"
56 ClassImp(AliAnalysisTaskJetCore)
58 AliAnalysisTaskJetCore::AliAnalysisTaskJetCore() :
63 fBackgroundBranch(""),
66 fOfflineTrgMask(AliVEvent::kAny),
78 fAngStructCloseTracks(0),
82 fJetTriggerExcludeMask(AliAODJet::kHighTrackPtTriggered),
83 fJetPtFractionMin(0.5),
91 fHistEvtSelection(0x0),
92 fHistJetSelection(0x0),
94 fh2JetCoreMethod1C10(0x0),
95 fh2JetCoreMethod2C10(0x0),
96 fh2JetCoreMethod3C10(0x0),
97 fh2JetCoreMethod1C20(0x0),
98 fh2JetCoreMethod2C20(0x0),
99 fh2JetCoreMethod3C20(0x0),
100 fh2JetCoreMethod1C30(0x0),
101 fh2JetCoreMethod2C30(0x0),
102 fh2JetCoreMethod3C30(0x0),
103 fh2JetCoreMethod1C60(0x0),
104 fh2JetCoreMethod2C60(0x0),
105 fh2JetCoreMethod3C60(0x0),
111 fh2SumPtOutC10b(0x0),
115 fh2SumPtInC10bkg(0x0),
116 fh2SumPtInC20bkg(0x0),
117 fh2SumPtInC30bkg(0x0),
118 fh2SumPtInC60bkg(0x0),
119 fh2SumPtOutC10bkg(0x0),
120 fh2SumPtOutC20bkg(0x0),
121 fh2SumPtOutC30bkg(0x0),
122 fh2SumPtOutC60bkg(0x0),
123 fh2DeltaRC10pt1(0x0),
124 fh2DeltaRC20pt1(0x0),
125 fh2DeltaRC30pt1(0x0),
126 fh2DeltaRC60pt1(0x0),
127 fh2DeltaRC10pt2(0x0),
128 fh2DeltaRC20pt2(0x0),
129 fh2DeltaRC30pt2(0x0),
130 fh2DeltaRC60pt2(0x0),
131 fh2DeltaRC10pt3(0x0),
132 fh2DeltaRC20pt3(0x0),
133 fh2DeltaRC30pt3(0x0),
134 fh2DeltaRC60pt3(0x0),
135 fh2DeltaRC10pt4(0x0),
136 fh2DeltaRC20pt4(0x0),
137 fh2DeltaRC30pt4(0x0),
138 fh2DeltaRC60pt4(0x0),
139 fh2DeltaEtaC10pt1(0x0),
140 fh2DeltaEtaC20pt1(0x0),
141 fh2DeltaEtaC30pt1(0x0),
142 fh2DeltaEtaC60pt1(0x0),
143 fh2DeltaEtaC10pt2(0x0),
144 fh2DeltaEtaC20pt2(0x0),
145 fh2DeltaEtaC30pt2(0x0),
146 fh2DeltaEtaC60pt2(0x0),
147 fh2DeltaEtaC10pt3(0x0),
148 fh2DeltaEtaC20pt3(0x0),
149 fh2DeltaEtaC30pt3(0x0),
150 fh2DeltaEtaC60pt3(0x0),
151 fh2DeltaEtaC10pt4(0x0),
152 fh2DeltaEtaC20pt4(0x0),
153 fh2DeltaEtaC30pt4(0x0),
154 fh2DeltaEtaC60pt4(0x0),
155 fh2DeltaPhiC10pt1(0x0),
156 fh2DeltaPhiC20pt1(0x0),
157 fh2DeltaPhiC30pt1(0x0),
158 fh2DeltaPhiC60pt1(0x0),
159 fh2DeltaPhiC10pt2(0x0),
160 fh2DeltaPhiC20pt2(0x0),
161 fh2DeltaPhiC30pt2(0x0),
162 fh2DeltaPhiC60pt2(0x0),
163 fh2DeltaPhiC10pt3(0x0),
164 fh2DeltaPhiC20pt3(0x0),
165 fh2DeltaPhiC30pt3(0x0),
166 fh2DeltaPhiC60pt3(0x0),
167 fh2DeltaPhiC10pt4(0x0),
168 fh2DeltaPhiC20pt4(0x0),
169 fh2DeltaPhiC30pt4(0x0),
170 fh2DeltaPhiC60pt4(0x0),
171 fh2AngStructpt1C10(0x0),
172 fh2AngStructpt2C10(0x0),
173 fh2AngStructpt3C10(0x0),
174 fh2AngStructpt4C10(0x0),
175 fh2AngStructpt1C20(0x0),
176 fh2AngStructpt2C20(0x0),
177 fh2AngStructpt3C20(0x0),
178 fh2AngStructpt4C20(0x0),
179 fh2AngStructpt1C30(0x0),
180 fh2AngStructpt2C30(0x0),
181 fh2AngStructpt3C30(0x0),
182 fh2AngStructpt4C30(0x0),
183 fh2AngStructpt1C60(0x0),
184 fh2AngStructpt2C60(0x0),
185 fh2AngStructpt3C60(0x0),
186 fh2AngStructpt4C60(0x0)
188 // default Constructor
190 fJetBranchName[0] = "";
191 fJetBranchName[1] = "";
193 fListJets[0] = new TList;
194 fListJets[1] = new TList;
197 AliAnalysisTaskJetCore::AliAnalysisTaskJetCore(const char *name) :
198 AliAnalysisTaskSE(name),
202 fBackgroundBranch(""),
205 fOfflineTrgMask(AliVEvent::kAny),
216 fNInputTracksMax(-1),
217 fAngStructCloseTracks(0),
221 fJetTriggerExcludeMask(AliAODJet::kHighTrackPtTriggered),
222 fJetPtFractionMin(0.5),
230 fHistEvtSelection(0x0),
231 fHistJetSelection(0x0),
232 fh2JetSelection(0x0),
233 fh2JetCoreMethod1C10(0x0),
234 fh2JetCoreMethod2C10(0x0),
235 fh2JetCoreMethod3C10(0x0),
236 fh2JetCoreMethod1C20(0x0),
237 fh2JetCoreMethod2C20(0x0),
238 fh2JetCoreMethod3C20(0x0),
239 fh2JetCoreMethod1C30(0x0),
240 fh2JetCoreMethod2C30(0x0),
241 fh2JetCoreMethod3C30(0x0),
242 fh2JetCoreMethod1C60(0x0),
243 fh2JetCoreMethod2C60(0x0),
244 fh2JetCoreMethod3C60(0x0),
250 fh2SumPtOutC10b(0x0),
254 fh2SumPtInC10bkg(0x0),
255 fh2SumPtInC20bkg(0x0),
256 fh2SumPtInC30bkg(0x0),
257 fh2SumPtInC60bkg(0x0),
258 fh2SumPtOutC10bkg(0x0),
259 fh2SumPtOutC20bkg(0x0),
260 fh2SumPtOutC30bkg(0x0),
261 fh2SumPtOutC60bkg(0x0),
262 fh2DeltaRC10pt1(0x0),
263 fh2DeltaRC20pt1(0x0),
264 fh2DeltaRC30pt1(0x0),
265 fh2DeltaRC60pt1(0x0),
266 fh2DeltaRC10pt2(0x0),
267 fh2DeltaRC20pt2(0x0),
268 fh2DeltaRC30pt2(0x0),
269 fh2DeltaRC60pt2(0x0),
270 fh2DeltaRC10pt3(0x0),
271 fh2DeltaRC20pt3(0x0),
272 fh2DeltaRC30pt3(0x0),
273 fh2DeltaRC60pt3(0x0),
274 fh2DeltaRC10pt4(0x0),
275 fh2DeltaRC20pt4(0x0),
276 fh2DeltaRC30pt4(0x0),
277 fh2DeltaRC60pt4(0x0),
278 fh2DeltaEtaC10pt1(0x0),
279 fh2DeltaEtaC20pt1(0x0),
280 fh2DeltaEtaC30pt1(0x0),
281 fh2DeltaEtaC60pt1(0x0),
282 fh2DeltaEtaC10pt2(0x0),
283 fh2DeltaEtaC20pt2(0x0),
284 fh2DeltaEtaC30pt2(0x0),
285 fh2DeltaEtaC60pt2(0x0),
286 fh2DeltaEtaC10pt3(0x0),
287 fh2DeltaEtaC20pt3(0x0),
288 fh2DeltaEtaC30pt3(0x0),
289 fh2DeltaEtaC60pt3(0x0),
290 fh2DeltaEtaC10pt4(0x0),
291 fh2DeltaEtaC20pt4(0x0),
292 fh2DeltaEtaC30pt4(0x0),
293 fh2DeltaEtaC60pt4(0x0),
294 fh2DeltaPhiC10pt1(0x0),
295 fh2DeltaPhiC20pt1(0x0),
296 fh2DeltaPhiC30pt1(0x0),
297 fh2DeltaPhiC60pt1(0x0),
298 fh2DeltaPhiC10pt2(0x0),
299 fh2DeltaPhiC20pt2(0x0),
300 fh2DeltaPhiC30pt2(0x0),
301 fh2DeltaPhiC60pt2(0x0),
302 fh2DeltaPhiC10pt3(0x0),
303 fh2DeltaPhiC20pt3(0x0),
304 fh2DeltaPhiC30pt3(0x0),
305 fh2DeltaPhiC60pt3(0x0),
306 fh2DeltaPhiC10pt4(0x0),
307 fh2DeltaPhiC20pt4(0x0),
308 fh2DeltaPhiC30pt4(0x0),
309 fh2DeltaPhiC60pt4(0x0),
310 fh2AngStructpt1C10(0x0),
311 fh2AngStructpt2C10(0x0),
312 fh2AngStructpt3C10(0x0),
313 fh2AngStructpt4C10(0x0),
314 fh2AngStructpt1C20(0x0),
315 fh2AngStructpt2C20(0x0),
316 fh2AngStructpt3C20(0x0),
317 fh2AngStructpt4C20(0x0),
318 fh2AngStructpt1C30(0x0),
319 fh2AngStructpt2C30(0x0),
320 fh2AngStructpt3C30(0x0),
321 fh2AngStructpt4C30(0x0),
322 fh2AngStructpt1C60(0x0),
323 fh2AngStructpt2C60(0x0),
324 fh2AngStructpt3C60(0x0),
325 fh2AngStructpt4C60(0x0)
330 fJetBranchName[0] = "";
331 fJetBranchName[1] = "";
333 fListJets[0] = new TList;
334 fListJets[1] = new TList;
336 DefineOutput(1, TList::Class());
339 AliAnalysisTaskJetCore::~AliAnalysisTaskJetCore()
345 void AliAnalysisTaskJetCore::SetBranchNames(const TString &branch1, const TString &branch2)
347 fJetBranchName[0] = branch1;
348 fJetBranchName[1] = branch2;
351 void AliAnalysisTaskJetCore::Init()
354 // check for jet branches
355 if(!strlen(fJetBranchName[0].Data()) || !strlen(fJetBranchName[1].Data())){
356 AliError("Jet branch name not set.");
361 void AliAnalysisTaskJetCore::UserCreateOutputObjects()
366 if(!fOutputList) fOutputList = new TList;
367 fOutputList->SetOwner(kTRUE);
369 Bool_t oldStatus = TH1::AddDirectoryStatus();
370 TH1::AddDirectory(kFALSE);
373 fHistEvtSelection = new TH1I("fHistEvtSelection", "event selection", 6, -0.5, 5.5);
374 fHistEvtSelection->GetXaxis()->SetBinLabel(1,"ACCEPTED");
375 fHistEvtSelection->GetXaxis()->SetBinLabel(2,"events IN");
376 fHistEvtSelection->GetXaxis()->SetBinLabel(3,"event selection (rejected)");
377 fHistEvtSelection->GetXaxis()->SetBinLabel(4,"vertex cut (rejected)");
378 fHistEvtSelection->GetXaxis()->SetBinLabel(5,"centrality (rejected)");
379 fHistEvtSelection->GetXaxis()->SetBinLabel(6,"multiplicity (rejected)");
381 fHistJetSelection = new TH1I("fHistJetSelection", "jet selection", 8, -0.5, 7.5);
382 fHistJetSelection->GetXaxis()->SetBinLabel(1,"ACCEPTED");
383 fHistJetSelection->GetXaxis()->SetBinLabel(2,"probes IN");
384 fHistJetSelection->GetXaxis()->SetBinLabel(3,"no matching jet");
385 fHistJetSelection->GetXaxis()->SetBinLabel(4,"not in list");
386 fHistJetSelection->GetXaxis()->SetBinLabel(5,"fraction cut");
387 fHistJetSelection->GetXaxis()->SetBinLabel(6,"acceptance cut");
388 fHistJetSelection->GetXaxis()->SetBinLabel(7,"p_{T} cut");
389 fHistJetSelection->GetXaxis()->SetBinLabel(8,"trigger exclude mask");
391 fh2JetSelection = new TH2F("fh2JetSelection", "jet selection", 8, -0.5, 7.5,100,0.,200.);
392 fh2JetSelection->GetXaxis()->SetBinLabel(1,"ACCEPTED");
393 fh2JetSelection->GetXaxis()->SetBinLabel(2,"probes IN");
394 fh2JetSelection->GetXaxis()->SetBinLabel(3,"no matching jet");
395 fh2JetSelection->GetXaxis()->SetBinLabel(4,"not in list");
396 fh2JetSelection->GetXaxis()->SetBinLabel(5,"fraction cut");
397 fh2JetSelection->GetXaxis()->SetBinLabel(6,"acceptance cut");
398 fh2JetSelection->GetXaxis()->SetBinLabel(7,"p_{T} cut");
399 fh2JetSelection->GetXaxis()->SetBinLabel(8,"trigger exclude mask");
402 //UInt_t entries = 0; // bit coded, see GetDimParams() below
403 //UInt_t opt = 0; // bit coded, default (0) or high resolution (1)
405 // Int_t bins[5]={10,10,150,150,15};
406 //Double_t xmin[5]={0.,0.,0.,0.,0.};
407 //Double_t xmax[5]={100.,6.5,150.,1.5,1.5};
408 //fhnDeltaRjets = new THnSparseF("fhnDeltaRjets", "fhnDeltaRjets",5,bins,xmin,xmax);
412 fh2JetCoreMethod1C10 = new TH2F("JetCoreMethod1C10","",150, 0., 150.,100, 0., 1.5);
413 fh2JetCoreMethod2C10 = new TH2F("JetCoreMethod2C10","",150, 0., 150.,100, 0., 1.5);
414 fh2JetCoreMethod3C10 = new TH2F("JetCoreMethod3C10","",150, 0., 150.,100, 0., 1.5);
415 fh2JetCoreMethod1C20 = new TH2F("JetCoreMethod1C20","",150, 0., 150.,100, 0., 1.5);
416 fh2JetCoreMethod2C20 = new TH2F("JetCoreMethod2C20","",150, 0., 150.,100, 0., 1.5);
417 fh2JetCoreMethod3C20 = new TH2F("JetCoreMethod3C20","",150, 0., 150.,100, 0., 1.5);
418 fh2JetCoreMethod1C30 = new TH2F("JetCoreMethod1C30","",150, 0., 150.,100, 0., 1.5);
419 fh2JetCoreMethod2C30 = new TH2F("JetCoreMethod2C30","",150, 0., 150.,100, 0., 1.5);
420 fh2JetCoreMethod3C30 = new TH2F("JetCoreMethod3C30","",150, 0., 150.,100, 0., 1.5);
421 fh2JetCoreMethod1C60 = new TH2F("JetCoreMethod1C60","",150, 0., 150.,100, 0., 1.5);
422 fh2JetCoreMethod2C60 = new TH2F("JetCoreMethod2C60","",150, 0., 150.,100, 0., 1.5);
423 fh2JetCoreMethod3C60 = new TH2F("JetCoreMethod3C60","",150, 0., 150.,100, 0., 1.5);
425 fh2SumPtInC10 = new TH2F("PtSumInC10","",150, 0., 150.,5000, 0., 50.);
426 fh2SumPtInC20 = new TH2F("PtSumInC20","",150, 0., 150.,5000, 0., 50.);
427 fh2SumPtInC30 = new TH2F("PtSumInC30","",150, 0., 150.,5000, 0., 50.);
428 fh2SumPtInC60 = new TH2F("PtSumInC60","",150, 0., 150.,5000, 0., 50.);
429 fh2SumPtOutC10 = new TH2F("PtSumOutC10","",150, 0., 150.,5000, 0., 50.);
430 fh2SumPtOutC10b= new TH2F("PtSumOutC10b","",150, 0., 150.,500, 0., 50.);
431 fh2SumPtOutC20 = new TH2F("PtSumOutC20","",150, 0., 150.,5000, 0., 50.);
432 fh2SumPtOutC30 = new TH2F("PtSumOutC30","",150, 0., 150.,5000, 0., 50.);
433 fh2SumPtOutC60 = new TH2F("PtSumOutC60","",150, 0., 150.,5000, 0., 50.);
435 fh2SumPtInC10bkg = new TH2F("PtSumInC10bkg","",150, 0., 150.,5000, 0., 50.);
436 fh2SumPtInC20bkg = new TH2F("PtSumInC20bkg","",150, 0., 150.,5000, 0., 50.);
437 fh2SumPtInC30bkg = new TH2F("PtSumInC30bkg","",150, 0., 150.,5000, 0., 50.);
438 fh2SumPtInC60bkg = new TH2F("PtSumInC60bkg","",150, 0., 150.,5000, 0., 50.);
439 fh2SumPtOutC10bkg = new TH2F("PtSumOutC10bkg","",150, 0., 150.,5000, 0., 50.);
440 fh2SumPtOutC20bkg = new TH2F("PtSumOutC20bkg","",150, 0., 150.,5000, 0., 50.);
441 fh2SumPtOutC30bkg = new TH2F("PtSumOutC30bkg","",150, 0., 150.,5000, 0., 50.);
442 fh2SumPtOutC60bkg = new TH2F("PtSumOutC60bkg","",150, 0., 150.,5000, 0., 50.);
446 fh2DeltaRC10pt1 = new TH2F("DeltaRC10pt1","",150, 0., 150.,100,0.,1.5);
447 fh2DeltaRC20pt1 = new TH2F("DeltaRC20pt1","",150, 0., 150.,100,0.,1.5);
448 fh2DeltaRC30pt1 = new TH2F("DeltaRC30pt1","",150, 0., 150.,100,0.,1.5);
449 fh2DeltaRC60pt1 = new TH2F("DeltaRC60pt1","",150, 0., 150.,100,0.,1.5);
450 fh2DeltaRC10pt2 = new TH2F("DeltaRC10pt2","",150, 0., 150.,100,0.,1.5);
451 fh2DeltaRC20pt2 = new TH2F("DeltaRC20pt2","",150, 0., 150.,100,0.,1.5);
452 fh2DeltaRC30pt2 = new TH2F("DeltaRC30pt2","",150, 0., 150.,100,0.,1.5);
453 fh2DeltaRC60pt2 = new TH2F("DeltaRC60pt2","",150, 0., 150.,100,0.,1.5);
454 fh2DeltaRC10pt3 = new TH2F("DeltaRC10pt3","",150, 0., 150.,100,0.,1.5);
455 fh2DeltaRC20pt3 = new TH2F("DeltaRC20pt3","",150, 0., 150.,100,0.,1.5);
456 fh2DeltaRC30pt3 = new TH2F("DeltaRC30pt3","",150, 0., 150.,100,0.,1.5);
457 fh2DeltaRC60pt3 = new TH2F("DeltaRC60pt3","",150, 0., 150.,100,0.,1.5);
458 fh2DeltaRC10pt4 = new TH2F("DeltaRC10pt4","",150, 0., 150.,100,0.,1.5);
459 fh2DeltaRC20pt4 = new TH2F("DeltaRC20pt4","",150, 0., 150.,100,0.,1.5);
460 fh2DeltaRC30pt4 = new TH2F("DeltaRC30pt4","",150, 0., 150.,100,0.,1.5);
461 fh2DeltaRC60pt4 = new TH2F("DeltaRC60pt4","",150, 0., 150.,100,0.,1.5);
463 fh2DeltaEtaC10pt1 = new TH2F("DeltaEtaC10pt1","",150, 0., 150.,100,-1.5,1.5);
464 fh2DeltaEtaC20pt1 = new TH2F("DeltaEtaC20pt1","",150, 0., 150.,100,-1.5,1.5);
465 fh2DeltaEtaC30pt1 = new TH2F("DeltaEtaC30pt1","",150, 0., 150.,100,-1.5,1.5);
466 fh2DeltaEtaC60pt1 = new TH2F("DeltaEtaC60pt1","",150, 0., 150.,100,-1.5,1.5);
467 fh2DeltaEtaC10pt2 = new TH2F("DeltaEtaC10pt2","",150, 0., 150.,100,-1.5,1.5);
468 fh2DeltaEtaC20pt2 = new TH2F("DeltaEtaC20pt2","",150, 0., 150.,100,-1.5,1.5);
469 fh2DeltaEtaC30pt2 = new TH2F("DeltaEtaC30pt2","",150, 0., 150.,100,-1.5,1.5);
470 fh2DeltaEtaC60pt2 = new TH2F("DeltaEtaC60pt2","",150, 0., 150.,100,-1.5,1.5);
471 fh2DeltaEtaC10pt3 = new TH2F("DeltaEtaC10pt3","",150, 0., 150.,100,-1.5,1.5);
472 fh2DeltaEtaC20pt3 = new TH2F("DeltaEtaC20pt3","",150, 0., 150.,100,-1.5,1.5);
473 fh2DeltaEtaC30pt3 = new TH2F("DeltaEtaC30pt3","",150, 0., 150.,100,-1.5,1.5);
474 fh2DeltaEtaC60pt3 = new TH2F("DeltaEtaC60pt3","",150, 0., 150.,100,-1.5,1.5);
475 fh2DeltaEtaC10pt4 = new TH2F("DeltaEtaC10pt4","",150, 0., 150.,100,-1.5,1.5);
476 fh2DeltaEtaC20pt4 = new TH2F("DeltaEtaC20pt4","",150, 0., 150.,100,-1.5,1.5);
477 fh2DeltaEtaC30pt4 = new TH2F("DeltaEtaC30pt4","",150, 0., 150.,100,-1.5,1.5);
478 fh2DeltaEtaC60pt4 = new TH2F("DeltaEtaC60pt4","",150, 0., 150.,100,-1.5,1.5);
479 fh2DeltaPhiC10pt1 = new TH2F("DeltaPhiC10pt1","",150, 0., 150.,100,-6.5,6.5);
480 fh2DeltaPhiC20pt1 = new TH2F("DeltaPhiC20pt1","",150, 0., 150.,100,-6.5,6.5);
481 fh2DeltaPhiC30pt1 = new TH2F("DeltaPhiC30pt1","",150, 0., 150.,100,-6.5,6.5);
482 fh2DeltaPhiC60pt1 = new TH2F("DeltaPhiC60pt1","",150, 0., 150.,100,-6.5,6.5);
483 fh2DeltaPhiC10pt2 = new TH2F("DeltaPhiC10pt2","",150, 0., 150.,100,-6.5,6.5);
484 fh2DeltaPhiC20pt2 = new TH2F("DeltaPhiC20pt2","",150, 0., 150.,100,-6.5,6.5);
485 fh2DeltaPhiC30pt2 = new TH2F("DeltaPhiC30pt2","",150, 0., 150.,100,-6.5,6.5);
486 fh2DeltaPhiC60pt2 = new TH2F("DeltaPhiC60pt2","",150, 0., 150.,100,-6.5,6.5);
487 fh2DeltaPhiC10pt3 = new TH2F("DeltaPhiC10pt3","",150, 0., 150.,100,-6.5,6.5);
488 fh2DeltaPhiC20pt3 = new TH2F("DeltaPhiC20pt3","",150, 0., 150.,100,-6.5,6.5);
489 fh2DeltaPhiC30pt3 = new TH2F("DeltaPhiC30pt3","",150, 0., 150.,100,-6.5,6.5);
490 fh2DeltaPhiC60pt3 = new TH2F("DeltaPhiC60pt3","",150, 0., 150.,100,-6.5,6.5);
491 fh2DeltaPhiC10pt4 = new TH2F("DeltaPhiC10pt4","",150, 0., 150.,100,-6.5,6.5);
492 fh2DeltaPhiC20pt4 = new TH2F("DeltaPhiC20pt4","",150, 0., 150.,100,-6.5,6.5);
493 fh2DeltaPhiC30pt4 = new TH2F("DeltaPhiC30pt4","",150, 0., 150.,100,-6.5,6.5);
494 fh2DeltaPhiC60pt4 = new TH2F("DeltaPhiC60pt4","",150, 0., 150.,100,-6.5,6.5);
496 fh2AngStructpt1C10 = new TH2F("Ang struct pt1 C10","",15,0.,1.5,150,0.,5.);
497 fh2AngStructpt2C10 = new TH2F("Ang struct pt2 C10","",15,0.,1.5,150,0.,5.);
498 fh2AngStructpt3C10 = new TH2F("Ang struct pt3 C10","",15,0.,1.5,150,0.,5.);
499 fh2AngStructpt4C10 = new TH2F("Ang struct pt4 C10","",15,0.,1.5,150,0.,5.);
500 fh2AngStructpt1C20 = new TH2F("Ang struct pt1 C20","",15,0.,1.5,150,0.,5.);
501 fh2AngStructpt2C20 = new TH2F("Ang struct pt2 C20","",15,0.,1.5,150,0.,5.);
502 fh2AngStructpt3C20 = new TH2F("Ang struct pt3 C20","",15,0.,1.5,150,0.,5.);
503 fh2AngStructpt4C20 = new TH2F("Ang struct pt4 C20","",15,0.,1.5,150,0.,5.);
504 fh2AngStructpt1C30 = new TH2F("Ang struct pt1 C30","",15,0.,1.5,150,0.,5.);
505 fh2AngStructpt2C30 = new TH2F("Ang struct pt2 C30","",15,0.,1.5,150,0.,5.);
506 fh2AngStructpt3C30 = new TH2F("Ang struct pt3 C30","",15,0.,1.5,150,0.,5.);
507 fh2AngStructpt4C30 = new TH2F("Ang struct pt4 C30","",15,0.,1.5,150,0.,5.);
508 fh2AngStructpt1C60 = new TH2F("Ang struct pt1 C60","",15,0.,1.5,150,0.,5.);
509 fh2AngStructpt2C60 = new TH2F("Ang struct pt2 C60","",15,0.,1.5,150,0.,5.);
510 fh2AngStructpt3C60 = new TH2F("Ang struct pt3 C60","",15,0.,1.5,150,0.,5.);
511 fh2AngStructpt4C60 = new TH2F("Ang struct pt4 C60","",15,0.,1.5,150,0.,5.);
513 fOutputList->Add(fHistEvtSelection);
514 fOutputList->Add(fHistJetSelection);
515 fOutputList->Add(fh2JetSelection);
516 fOutputList->Add(fh2JetCoreMethod1C10);
517 fOutputList->Add(fh2JetCoreMethod2C10);
518 fOutputList->Add(fh2JetCoreMethod3C10);
519 fOutputList->Add(fh2JetCoreMethod1C20);
520 fOutputList->Add(fh2JetCoreMethod2C20);
521 fOutputList->Add(fh2JetCoreMethod3C20);
522 fOutputList->Add(fh2JetCoreMethod1C30);
523 fOutputList->Add(fh2JetCoreMethod2C30);
524 fOutputList->Add(fh2JetCoreMethod3C30);
525 fOutputList->Add(fh2JetCoreMethod1C60);
526 fOutputList->Add(fh2JetCoreMethod2C60);
527 fOutputList->Add(fh2JetCoreMethod3C60);
528 fOutputList->Add(fh2SumPtInC10);
529 fOutputList->Add(fh2SumPtInC20);
530 fOutputList->Add(fh2SumPtInC30);
531 fOutputList->Add(fh2SumPtInC60);
532 fOutputList->Add(fh2SumPtOutC10);
533 fOutputList->Add(fh2SumPtOutC10b);
534 fOutputList->Add(fh2SumPtOutC20);
535 fOutputList->Add(fh2SumPtOutC30);
536 fOutputList->Add(fh2SumPtOutC60);
538 fOutputList->Add(fh2SumPtInC10bkg);
539 fOutputList->Add(fh2SumPtInC20bkg);
540 fOutputList->Add(fh2SumPtInC30bkg);
541 fOutputList->Add(fh2SumPtInC60bkg);
542 fOutputList->Add(fh2SumPtOutC10bkg);
543 fOutputList->Add(fh2SumPtOutC20bkg);
544 fOutputList->Add(fh2SumPtOutC30bkg);
545 fOutputList->Add(fh2SumPtOutC60bkg);
546 fOutputList->Add(fh2DeltaRC10pt1);
547 fOutputList->Add(fh2DeltaRC20pt1);
548 fOutputList->Add(fh2DeltaRC30pt1);
549 fOutputList->Add(fh2DeltaRC60pt1);
550 fOutputList->Add(fh2DeltaRC10pt2);
551 fOutputList->Add(fh2DeltaRC20pt2);
552 fOutputList->Add(fh2DeltaRC30pt2);
553 fOutputList->Add(fh2DeltaRC60pt2);
554 fOutputList->Add(fh2DeltaRC10pt3);
555 fOutputList->Add(fh2DeltaRC20pt3);
556 fOutputList->Add(fh2DeltaRC30pt3);
557 fOutputList->Add(fh2DeltaRC60pt3);
558 fOutputList->Add(fh2DeltaRC10pt4);
559 fOutputList->Add(fh2DeltaRC20pt4);
560 fOutputList->Add(fh2DeltaRC30pt4);
561 fOutputList->Add(fh2DeltaRC60pt4);
563 fOutputList->Add(fh2DeltaEtaC10pt1);
564 fOutputList->Add(fh2DeltaEtaC20pt1);
565 fOutputList->Add(fh2DeltaEtaC30pt1);
566 fOutputList->Add(fh2DeltaEtaC60pt1);
567 fOutputList->Add(fh2DeltaEtaC10pt2);
568 fOutputList->Add(fh2DeltaEtaC20pt2);
569 fOutputList->Add(fh2DeltaEtaC30pt2);
570 fOutputList->Add(fh2DeltaEtaC60pt2);
571 fOutputList->Add(fh2DeltaEtaC10pt3);
572 fOutputList->Add(fh2DeltaEtaC20pt3);
573 fOutputList->Add(fh2DeltaEtaC30pt3);
574 fOutputList->Add(fh2DeltaEtaC60pt3);
575 fOutputList->Add(fh2DeltaEtaC10pt4);
576 fOutputList->Add(fh2DeltaEtaC20pt4);
577 fOutputList->Add(fh2DeltaEtaC30pt4);
578 fOutputList->Add(fh2DeltaEtaC60pt4);
579 fOutputList->Add(fh2DeltaPhiC10pt1);
580 fOutputList->Add(fh2DeltaPhiC20pt1);
581 fOutputList->Add(fh2DeltaPhiC30pt1);
582 fOutputList->Add(fh2DeltaPhiC60pt1);
583 fOutputList->Add(fh2DeltaPhiC10pt2);
584 fOutputList->Add(fh2DeltaPhiC20pt2);
585 fOutputList->Add(fh2DeltaPhiC30pt2);
586 fOutputList->Add(fh2DeltaPhiC60pt2);
587 fOutputList->Add(fh2DeltaPhiC10pt3);
588 fOutputList->Add(fh2DeltaPhiC20pt3);
589 fOutputList->Add(fh2DeltaPhiC30pt3);
590 fOutputList->Add(fh2DeltaPhiC60pt3);
591 fOutputList->Add(fh2DeltaPhiC10pt4);
592 fOutputList->Add(fh2DeltaPhiC20pt4);
593 fOutputList->Add(fh2DeltaPhiC30pt4);
594 fOutputList->Add(fh2DeltaPhiC60pt4);
596 fOutputList->Add(fh2AngStructpt1C10);
597 fOutputList->Add(fh2AngStructpt2C10);
598 fOutputList->Add(fh2AngStructpt3C10);
599 fOutputList->Add(fh2AngStructpt4C10);
600 fOutputList->Add(fh2AngStructpt1C20);
601 fOutputList->Add(fh2AngStructpt2C20);
602 fOutputList->Add(fh2AngStructpt3C20);
603 fOutputList->Add(fh2AngStructpt4C20);
604 fOutputList->Add(fh2AngStructpt1C30);
605 fOutputList->Add(fh2AngStructpt2C30);
606 fOutputList->Add(fh2AngStructpt3C30);
607 fOutputList->Add(fh2AngStructpt4C30);
608 fOutputList->Add(fh2AngStructpt1C60);
609 fOutputList->Add(fh2AngStructpt2C60);
610 fOutputList->Add(fh2AngStructpt3C60);
611 fOutputList->Add(fh2AngStructpt4C60);
616 // =========== Switch on Sumw2 for all histos ===========
617 for (Int_t i=0; i<fOutputList->GetEntries(); ++i) {
618 TH1 *h1 = dynamic_cast<TH1*>(fOutputList->At(i));
623 THnSparse *hn = dynamic_cast<THnSparse*>(fOutputList->At(i));
628 TH1::AddDirectory(oldStatus);
630 PostData(1, fOutputList);
633 void AliAnalysisTaskJetCore::UserExec(Option_t *)
637 if(!strlen(fJetBranchName[0].Data()) || !strlen(fJetBranchName[1].Data())){
638 AliError("Jet branch name not set.");
642 fESD=dynamic_cast<AliESDEvent*>(InputEvent());
644 AliError("ESD not available");
645 fAOD = dynamic_cast<AliAODEvent*>(InputEvent());
647 fAOD = dynamic_cast<AliAODEvent*>(AODEvent());
650 if(fNonStdFile.Length()!=0){
651 // case that we have an AOD extension we need can fetch the jets from the extended output
652 AliAODHandler *aodH = dynamic_cast<AliAODHandler*>(AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler());
653 fAODExtension = (aodH?aodH->GetExtension(fNonStdFile.Data()):0);
655 if(fDebug>1)Printf("AODExtension found for %s",fNonStdFile.Data());
662 // -- event selection --
663 fHistEvtSelection->Fill(1); // number of events before event selection
666 AliInputEventHandler* inputHandler = (AliInputEventHandler*)
667 ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
668 if(!(inputHandler->IsEventSelected() & fOfflineTrgMask)){
669 if(fDebug) Printf(" Trigger Selection: event REJECTED ... ");
670 fHistEvtSelection->Fill(2);
671 PostData(1, fOutputList);
676 AliAODVertex* primVtx = fAOD->GetPrimaryVertex();
677 Int_t nTracksPrim = primVtx->GetNContributors();
678 if ((nTracksPrim < fMinContribVtx) ||
679 (primVtx->GetZ() < fVtxZMin) ||
680 (primVtx->GetZ() > fVtxZMax) ){
681 if(fDebug) Printf("%s:%d primary vertex z = %f: event REJECTED...",(char*)__FILE__,__LINE__,primVtx->GetZ());
682 fHistEvtSelection->Fill(3);
683 PostData(1, fOutputList);
687 // event class selection (from jet helper task)
688 Int_t eventClass = AliAnalysisHelperJetTasks::EventClass();
689 if(fDebug) Printf("Event class %d", eventClass);
690 if (eventClass < fEvtClassMin || eventClass > fEvtClassMax){
691 fHistEvtSelection->Fill(4);
692 PostData(1, fOutputList);
696 // centrality selection
697 AliCentrality *cent = 0x0;
698 Float_t centValue = 0.;
699 if(fESD) cent = fESD->GetCentrality();
700 if(cent) centValue = cent->GetCentralityPercentile("V0M");
701 if(fDebug) printf("centrality: %f\n", centValue);
702 if (centValue < fCentMin || centValue > fCentMax){
703 fHistEvtSelection->Fill(4);
704 PostData(1, fOutputList);
709 // multiplicity due to input tracks
710 //Int_t nInputTracks = GetNInputTracks();
711 //if (nInputTracks < fNInputTracksMin || (fNInputTracksMax > -1 && nInputTracks > fNInputTracksMax)){
712 // fHistEvtSelection->Fill(5);
713 // PostData(1, fOutputList);
718 fHistEvtSelection->Fill(0);
720 // -- end event selection --
723 AliAODJetEventBackground* externalBackground = 0;
724 if(fAOD&&!externalBackground&&fBackgroundBranch.Length()){
725 externalBackground = (AliAODJetEventBackground*)(fAOD->FindListObject(fBackgroundBranch.Data()));
726 if(!externalBackground)Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());;
728 if(fAODExtension&&!externalBackground&&fBackgroundBranch.Length()){
729 externalBackground = (AliAODJetEventBackground*)(fAODExtension->GetAOD()->FindListObject(fBackgroundBranch.Data()));
730 if(!externalBackground)Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());;
734 if(externalBackground)rho = externalBackground->GetBackground(0);
738 TClonesArray *aodJets[2];
740 if(fAOD&&!aodJets[0]){
741 aodJets[0] = dynamic_cast<TClonesArray*>(fAOD->FindListObject(fJetBranchName[0].Data())); //
742 aodJets[1] = dynamic_cast<TClonesArray*>(fAOD->FindListObject(fJetBranchName[1].Data())); }
743 if(fAODExtension && !aodJets[0]){
744 aodJets[0] = dynamic_cast<TClonesArray*>(fAODExtension->GetAOD()->FindListObject(fJetBranchName[0].Data())); //
745 aodJets[1] = dynamic_cast<TClonesArray*>(fAODExtension->GetAOD()->FindListObject(fJetBranchName[1].Data())); }
748 Int_t nT = GetListOfTracks(&ParticleList);
749 for (Int_t iJetType = 0; iJetType < 2; iJetType++) {
750 fListJets[iJetType]->Clear();
751 if (!aodJets[iJetType]) continue;
753 if(fDebug) Printf("%s: %d jets",fJetBranchName[iJetType].Data(),aodJets[iJetType]->GetEntriesFast());
755 for (Int_t iJet = 0; iJet < aodJets[iJetType]->GetEntriesFast(); iJet++) {
756 AliAODJet *jet = dynamic_cast<AliAODJet*>((*aodJets[iJetType])[iJet]);
757 if (jet) fListJets[iJetType]->Add(jet);
759 fListJets[iJetType]->Sort();
768 Double_t areasmall=0;
770 Double_t phismall=0.;
772 Double_t up1[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
773 Double_t up2[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
774 Double_t up3[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
775 Double_t up4[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
776 Double_t down1[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
777 Double_t down2[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
778 Double_t down3[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
779 Double_t down4[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
783 for(Int_t i=0; i<fListJets[0]->GetEntries(); ++i){
784 AliAODJet* jetbig = (AliAODJet*)(fListJets[0]->At(i));
785 etabig = jetbig->Eta();
786 phibig = jetbig->Phi();
787 ptbig = jetbig->Pt();
788 if(ptbig==0) continue;
789 areabig = jetbig->EffectiveAreaCharged();
790 Double_t ptcorr=ptbig-rho*areabig;
791 if(ptcorr<=0) continue;
792 if((etabig<fJetEtaMin)||(etabig>fJetEtaMax)) continue;
793 Double_t dismin=100.;
799 Double_t sumPtOut=0.;
800 //compute sum of the pt of the tracks in a concentric cone
801 TRefArray *genTrackList = jetbig->GetRefTracks();
802 Int_t nTracksGenJet = genTrackList->GetEntriesFast();
803 AliAODTrack* genTrack;
804 for(Int_t ir=0; ir<nTracksGenJet; ++ir){
805 genTrack = (AliAODTrack*)(genTrackList->At(ir));
806 Float_t etr=genTrack->Eta();
807 Float_t phir=genTrack->Phi();
808 distr=(etr-etabig)*(etr-etabig)+(phir-phibig)*(phir-phibig);
809 distr=TMath::Sqrt(distr);
810 if(distr<=fRadioFrac){ fracin=fracin+genTrack->Pt();}}
812 if(centValue<10) fh2JetCoreMethod3C10->Fill(ptcorr,fracin/ptbig);
814 if((centValue>20)&&(centValue<40)) fh2JetCoreMethod3C20->Fill(ptcorr,fracin/ptbig);
816 if((centValue>30)&&(centValue<60)) fh2JetCoreMethod3C30->Fill(ptcorr,fracin/ptbig);
818 if(centValue>60) fh2JetCoreMethod3C60->Fill(ptcorr,fracin/ptbig);
823 for(Int_t j=0; j<fListJets[1]->GetEntries(); ++j){
824 AliAODJet* jetsmall = (AliAODJet*)(fListJets[1]->At(j));
825 etasmall = jetsmall->Eta();
826 phismall = jetsmall->Phi();
827 ptsmall = jetsmall->Pt();
828 areasmall = jetsmall->EffectiveAreaCharged();
829 Double_t tmpDeltaR=(phismall-phibig)*(phismall-phibig)+(etasmall-etabig)*(etasmall-etabig);
830 tmpDeltaR=TMath::Sqrt(tmpDeltaR);
831 //Fraction in the jet core
832 if((ptsmall>ptmax)&&(tmpDeltaR<=fRadioFrac)){ptmax=ptsmall;
834 if(tmpDeltaR<=dismin){ dismin=tmpDeltaR;
835 index1=j;}} //en of loop over R=0.2 jets
836 //method1:most concentric jet=core
837 if(dismin<fMinDist){ AliAODJet* jetmethod1 = (AliAODJet*)(fListJets[1]->At(index1));
838 if(centValue<10) fh2JetCoreMethod1C10->Fill(ptcorr,jetmethod1->Pt()/ptbig);
839 if((centValue>20)&&(centValue<40)) fh2JetCoreMethod1C20->Fill(ptcorr,jetmethod1->Pt()/ptbig);
840 if((centValue>30)&&(centValue<60)) fh2JetCoreMethod1C30->Fill(ptcorr,jetmethod1->Pt()/ptbig);
841 if(centValue>60) fh2JetCoreMethod1C60->Fill(ptcorr,jetmethod1->Pt()/ptbig); }
842 //method2:hardest contained jet=core
844 AliAODJet* jetmethod2 = (AliAODJet*)(fListJets[1]->At(index2));
845 if(centValue<10) fh2JetCoreMethod2C10->Fill(ptcorr,jetmethod2->Pt()/ptbig);
846 if((centValue>20)&&(centValue<40)) fh2JetCoreMethod2C20->Fill(ptcorr,jetmethod2->Pt()/ptbig);
847 if((centValue>30)&&(centValue<60)) fh2JetCoreMethod2C30->Fill(ptcorr,jetmethod2->Pt()/ptbig);
848 if(centValue>60) fh2JetCoreMethod2C60->Fill(ptcorr,jetmethod2->Pt()/ptbig); }
850 Double_t R=fRadioFrac*2.;
852 for(int it = 0;it<nT;++it){
854 AliVParticle *part = (AliVParticle*)ParticleList.At(it);
855 Float_t deltaR = jetbig->DeltaR(part);
856 Float_t deltaEta = part->Eta()-etabig;
857 Float_t deltaPhi = part->Phi()-phibig;
858 if((deltaR>=0.4)&&(deltaR<=0.6))sumPtIn=sumPtIn+part->Pt();
859 if((deltaR>=0.8)&&(deltaR<=1.))sumPtOut=sumPtOut+part->Pt();
861 if((ptcorr>=70.)&&(ptcorr<85.)) {fh2DeltaRC10pt1->Fill(part->Pt(),deltaR);
862 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R))fh2DeltaEtaC10pt1->Fill(part->Pt(),deltaEta);
863 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R))fh2DeltaPhiC10pt1->Fill(part->Pt(),deltaPhi);}
864 if((ptcorr>=85.)&&(ptcorr<100.)) {fh2DeltaRC10pt2->Fill(part->Pt(),deltaR);
865 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC10pt2->Fill(part->Pt(),deltaEta);
866 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R)) fh2DeltaPhiC10pt2->Fill(part->Pt(),deltaPhi); }
867 if((ptcorr>=100.)&&(ptcorr<120.)) {fh2DeltaRC10pt3->Fill(part->Pt(),deltaR);
868 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC10pt3->Fill(part->Pt(),deltaEta);
869 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R)) fh2DeltaPhiC10pt3->Fill(part->Pt(),deltaPhi);}
870 if((ptcorr>=120.)&&(ptcorr<140.)) {fh2DeltaRC10pt4->Fill(part->Pt(),deltaR);
871 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC10pt4->Fill(part->Pt(),deltaEta);
872 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R))fh2DeltaPhiC10pt4->Fill(part->Pt(),deltaPhi); }}
874 if((centValue>20.)&&(centValue<40.)){
875 if((ptcorr>=70.)&&(ptcorr<85.)) {fh2DeltaRC20pt1->Fill(part->Pt(),deltaR);
876 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R))fh2DeltaEtaC20pt1->Fill(part->Pt(),deltaEta);
877 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R))fh2DeltaPhiC20pt1->Fill(part->Pt(),deltaPhi);}
878 if((ptcorr>=85.)&&(ptcorr<100.)) {fh2DeltaRC20pt2->Fill(part->Pt(),deltaR);
879 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC20pt2->Fill(part->Pt(),deltaEta);
880 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R)) fh2DeltaPhiC20pt2->Fill(part->Pt(),deltaPhi); }
881 if((ptcorr>=100.)&&(ptcorr<120.)) {fh2DeltaRC20pt3->Fill(part->Pt(),deltaR);
882 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC20pt3->Fill(part->Pt(),deltaEta);
883 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R)) fh2DeltaPhiC20pt3->Fill(part->Pt(),deltaPhi);}
884 if((ptcorr>=120.)&&(ptcorr<140.)) {fh2DeltaRC20pt4->Fill(part->Pt(),deltaR);
885 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC20pt4->Fill(part->Pt(),deltaEta);
886 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R))fh2DeltaPhiC20pt4->Fill(part->Pt(),deltaPhi); }}
888 if((centValue>30.)&&(centValue<60.)){
890 if((ptcorr>=70.)&&(ptcorr<85.)) {fh2DeltaRC30pt1->Fill(part->Pt(),deltaR);
891 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R))fh2DeltaEtaC30pt1->Fill(part->Pt(),deltaEta);
892 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R))fh2DeltaPhiC30pt1->Fill(part->Pt(),deltaPhi);}
893 if((ptcorr>=85.)&&(ptcorr<100.)) {fh2DeltaRC30pt2->Fill(part->Pt(),deltaR);
894 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC30pt2->Fill(part->Pt(),deltaEta);
895 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R)) fh2DeltaPhiC30pt2->Fill(part->Pt(),deltaPhi); }
896 if((ptcorr>=100.)&&(ptcorr<120.)) {fh2DeltaRC30pt3->Fill(part->Pt(),deltaR);
897 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC30pt3->Fill(part->Pt(),deltaEta);
898 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R)) fh2DeltaPhiC30pt3->Fill(part->Pt(),deltaPhi);}
899 if((ptcorr>=120.)&&(ptcorr<140.)) {fh2DeltaRC30pt4->Fill(part->Pt(),deltaR);
900 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC30pt4->Fill(part->Pt(),deltaEta);
901 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R))fh2DeltaPhiC30pt4->Fill(part->Pt(),deltaPhi); }}
905 if((ptcorr>=70.)&&(ptcorr<85.)) {fh2DeltaRC60pt1->Fill(part->Pt(),deltaR);
906 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R))fh2DeltaEtaC60pt1->Fill(part->Pt(),deltaEta);
907 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R))fh2DeltaPhiC60pt1->Fill(part->Pt(),deltaPhi);}
908 if((ptcorr>=85.)&&(ptcorr<100.)) {fh2DeltaRC60pt2->Fill(part->Pt(),deltaR);
909 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC60pt2->Fill(part->Pt(),deltaEta);
910 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R)) fh2DeltaPhiC60pt2->Fill(part->Pt(),deltaPhi); }
911 if((ptcorr>=100.)&&(ptcorr<120.)) {fh2DeltaRC60pt3->Fill(part->Pt(),deltaR);
912 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC60pt3->Fill(part->Pt(),deltaEta);
913 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R)) fh2DeltaPhiC60pt3->Fill(part->Pt(),deltaPhi);}
914 if((ptcorr>=120.)&&(ptcorr<140.)) {fh2DeltaRC60pt4->Fill(part->Pt(),deltaR);
915 if((part->Phi()<=phibig+R)&&(part->Phi()>=phibig-R)) fh2DeltaEtaC60pt4->Fill(part->Pt(),deltaEta);
916 if((part->Eta()<=etabig+R)&&(part->Eta()>=etabig-R))fh2DeltaPhiC60pt4->Fill(part->Pt(),deltaPhi);}}
920 Double_t coronain=rho*TMath::Pi()*(1.-0.8*0.8);
921 Double_t coronaout=rho*TMath::Pi()*(0.6*0.6-0.4*0.4);
923 fh2SumPtInC10bkg->Fill(ptcorr,coronain/ptbig);
924 fh2SumPtOutC10bkg->Fill(ptcorr,coronaout/ptbig);
925 fh2SumPtInC10->Fill(ptcorr,sumPtIn/ptbig);
926 fh2SumPtOutC10->Fill(ptcorr,sumPtOut/ptbig);
927 fh2SumPtOutC10b->Fill(ptcorr,sumPtOut/ptbig);
929 if((centValue>20.)&&(centValue<40.)){
930 fh2SumPtInC20bkg->Fill(ptcorr,coronain/ptbig);
931 fh2SumPtOutC20bkg->Fill(ptcorr,coronaout/ptbig);
932 fh2SumPtInC20->Fill(ptcorr,sumPtIn/ptbig);
933 fh2SumPtOutC20->Fill(ptcorr,sumPtOut/ptbig); }
934 if((centValue>30.)&&(centValue<60.)){
935 fh2SumPtInC30bkg->Fill(ptcorr,coronain/ptbig);
936 fh2SumPtOutC30bkg->Fill(ptcorr,coronaout/ptbig);
937 fh2SumPtInC30->Fill(ptcorr,sumPtIn/ptbig);
938 fh2SumPtOutC30->Fill(ptcorr,sumPtOut/ptbig); }
940 fh2SumPtInC60bkg->Fill(ptcorr,coronain/ptbig);
941 fh2SumPtOutC60bkg->Fill(ptcorr,coronaout/ptbig);
942 fh2SumPtInC60->Fill(ptcorr,sumPtIn/ptbig);
943 fh2SumPtOutC60->Fill(ptcorr,sumPtOut/ptbig);}
945 //////////////////ANGULAR STRUCTURE//////////////////////////////////////
947 //tracks up to R=0.8 distant from the jet axis
948 if(fAngStructCloseTracks==1){
949 TList CloseTrackList;
950 Int_t nn=GetListOfTracksCloseToJet(&CloseTrackList,jetbig);
952 for(Int_t l=0;l<15;l++){
953 Double_t rr=l*0.1+0.1;
954 for(int it = 0;it<nn;++it){
955 AliVParticle *part1 = (AliVParticle*)CloseTrackList.At(it);
956 for(int itu=it+1;itu<CloseTrackList.GetEntries();itu++){
957 AliVParticle *part2 = (AliVParticle*)CloseTrackList.At(itu);
958 Double_t ptm=part1->Pt();
959 Double_t ptn=part2->Pt();
960 Double_t Rnm = (part1->Eta()-part2->Eta())*(part1->Eta()-part2->Eta())+(part1->Phi()-part2->Phi())*(part1->Phi()-part2->Phi());
961 Rnm=TMath::Sqrt(Rnm);
962 Double_t deltag=(1./(TMath::Sqrt(2*TMath::Pi())*difR))*TMath::Exp(-1.*(rr-Rnm)*(rr-Rnm)/(2.*difR*difR));
963 Double_t stepf=0.5*(1.+TMath::Erf((rr-Rnm)/(TMath::Sqrt(2.)*difR)));
964 if((ptcorr<85.) && (ptcorr>=70.)){up1[l]=up1[l]+ptm*ptn*Rnm*Rnm*deltag;
965 down1[l]=down1[l]+ptm*ptn*Rnm*Rnm*stepf;}
966 if((ptcorr<100.) && (ptcorr>=85.)){up2[l]=up2[l]+ptm*ptn*Rnm*Rnm*deltag;
967 down2[l]=down2[l]+ptm*ptn*Rnm*Rnm*stepf;}
968 if((ptcorr<120.) && (ptcorr>=100.)){up3[l]=up3[l]+ptm*ptn*Rnm*Rnm*deltag;
969 down3[l]=down3[l]+ptm*ptn*Rnm*Rnm*stepf;}
970 if((ptcorr<140.) && (ptcorr>=120.)){up4[l]=up4[l]+ptm*ptn*Rnm*Rnm*deltag;
971 down4[l]=down4[l]+ptm*ptn*Rnm*Rnm*stepf;}}}}
974 //only jet constituents
975 if(fAngStructCloseTracks==0){
978 for(Int_t l=0;l<15;l++){
979 Double_t rr=l*0.1+0.1;
984 for(Int_t it=0; it<nTracksGenJet; ++it){
985 part1 = (AliAODTrack*)(genTrackList->At(it));
986 for(Int_t itu=0; itu<nTracksGenJet; ++itu){
987 part2 = (AliAODTrack*)(genTrackList->At(itu));
988 Double_t ptm=part1->Pt();
989 Double_t ptn=part2->Pt();
990 Double_t Rnm = (part1->Eta()-part2->Eta())*(part1->Eta()-part2->Eta())+(part1->Phi()-part2->Phi())*(part1->Phi()-part2->Phi());
991 Rnm=TMath::Sqrt(Rnm);
992 Double_t deltag=(1./(TMath::Sqrt(2*TMath::Pi())*difR))*TMath::Exp(-1.*(rr-Rnm)*(rr-Rnm)/(2.*difR*difR));
993 Double_t stepf=0.5*(1.+TMath::Erf((rr-Rnm)/(TMath::Sqrt(2.)*difR)));
994 if((ptcorr<85.) && (ptcorr>=70.)){up1[l]=up1[l]+ptm*ptn*Rnm*Rnm*deltag;
995 down1[l]=down1[l]+ptm*ptn*Rnm*Rnm*stepf;}
996 if((ptcorr<100.) && (ptcorr>=85.)){up2[l]=up2[l]+ptm*ptn*Rnm*Rnm*deltag;
997 down2[l]=down2[l]+ptm*ptn*Rnm*Rnm*stepf;}
998 if((ptcorr<120.) && (ptcorr>=100.)){up3[l]=up3[l]+ptm*ptn*Rnm*Rnm*deltag;
999 down3[l]=down3[l]+ptm*ptn*Rnm*Rnm*stepf;}
1000 if((ptcorr<140.) && (ptcorr>=120.)){up4[l]=up4[l]+ptm*ptn*Rnm*Rnm*deltag;
1001 down4[l]=down4[l]+ptm*ptn*Rnm*Rnm*stepf;}}}}}
1020 //end loop over R=0.4 jets
1022 for(Int_t l=0;l<15;l++){
1023 Double_t rr=l*0.1+0.1;
1025 if(centValue<10.)fh2AngStructpt1C10->Fill(rr,rr*up1[l]/down1[l]);
1026 if(centValue>20. && centValue<40.) fh2AngStructpt1C20->Fill(rr,rr*up1[l]/down1[l]);
1027 if(centValue>30. && centValue<60.) fh2AngStructpt1C30->Fill(rr,rr*up1[l]/down1[l]);
1028 if(centValue>60.) fh2AngStructpt1C60->Fill(rr,rr*up1[l]/down1[l]);}
1030 if(centValue<10.) fh2AngStructpt2C10->Fill(rr,rr*up2[l]/down2[l]);
1031 if(centValue>20. && centValue<40.) fh2AngStructpt2C20->Fill(rr,rr*up2[l]/down2[l]);
1032 if(centValue>30. && centValue<60.) fh2AngStructpt2C30->Fill(rr,rr*up2[l]/down2[l]);
1033 if(centValue>60.) fh2AngStructpt2C60->Fill(rr,rr*up2[l]/down2[l]);}
1035 if(centValue<10.) fh2AngStructpt3C10->Fill(rr,rr*up3[l]/down3[l]);
1036 if(centValue>20. && centValue<40.) fh2AngStructpt3C20->Fill(rr,rr*up3[l]/down3[l]);
1037 if(centValue>30. && centValue<60.) fh2AngStructpt3C30->Fill(rr,rr*up3[l]/down3[l]);
1038 if(centValue>60.) fh2AngStructpt3C60->Fill(rr,rr*up3[l]/down3[l]);}
1040 if(centValue<10.) fh2AngStructpt4C10->Fill(rr,rr*up4[l]/down4[l]);
1041 if(centValue>20. && centValue<40.) fh2AngStructpt4C20->Fill(rr,rr*up4[l]/down4[l]);
1042 if(centValue>30. && centValue<60.) fh2AngStructpt4C30->Fill(rr,rr*up4[l]/down4[l]);
1043 if(centValue>60.) fh2AngStructpt4C60->Fill(rr,rr*up4[l]/down4[l]);}}
1051 PostData(1, fOutputList);
1054 void AliAnalysisTaskJetCore::Terminate(const Option_t *)
1056 // Draw result to the screen
1057 // Called once at the end of the query
1059 if (!GetOutputData(1))
1073 Int_t AliAnalysisTaskJetCore::GetListOfTracks(TList *list){
1077 Int_t fFilterMask=272;
1078 for(int it = 0;it < fAOD->GetNumberOfTracks();++it){
1079 AliAODTrack *tr = fAOD->GetTrack(it);
1080 if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue;
1081 if(TMath::Abs(tr->Eta())>0.9)continue;
1082 if(tr->Pt()<0.15)continue;
1084 //cout<<fAOD->GetNumberOfTracks()<<" "<<tr->Pt()<<endl;
1093 Int_t AliAnalysisTaskJetCore::GetListOfTracksCloseToJet(TList *list,AliAODJet *jetbig){
1097 Int_t fFilterMask=272;
1098 for(int it = 0;it < fAOD->GetNumberOfTracks();++it){
1099 AliAODTrack *tr = fAOD->GetTrack(it);
1100 if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue;
1101 if(TMath::Abs(tr->Eta())>0.9)continue;
1102 if(tr->Pt()<0.15)continue;
1103 Double_t disR=jetbig->DeltaR(tr);
1104 if(disR>0.8) continue;
1106 //cout<<fAOD->GetNumberOfTracks()<<" "<<tr->Pt()<<endl;
1125 Int_t AliAnalysisTaskJetCore::GetNInputTracks()
1128 Int_t nInputTracks = 0;
1130 TString jbname(fJetBranchName[1]);
1131 //needs complete event, use jets without background subtraction
1132 for(Int_t i=1; i<=3; ++i){
1133 if(jbname.Contains(Form("B%d",i))) jbname.ReplaceAll(Form("B%d",i),"B0");
1135 // use only HI event
1136 if(jbname.Contains("AODextraonly")) jbname.ReplaceAll("AODextraonly","AOD");
1137 if(jbname.Contains("AODextra")) jbname.ReplaceAll("AODextra","AOD");
1139 if(fDebug) Printf("Multiplicity from jet branch %s", jbname.Data());
1140 TClonesArray *tmpAODjets = dynamic_cast<TClonesArray*>(fAOD->FindListObject(jbname.Data()));
1142 Printf("Jet branch %s not found", jbname.Data());
1143 Printf("AliAnalysisTaskJetCore::GetNInputTracks FAILED");
1147 for (Int_t iJet=0; iJet<tmpAODjets->GetEntriesFast(); iJet++){
1148 AliAODJet *jet = dynamic_cast<AliAODJet*>((*tmpAODjets)[iJet]);
1150 TRefArray *trackList = jet->GetRefTracks();
1151 Int_t nTracks = trackList->GetEntriesFast();
1152 nInputTracks += nTracks;
1153 if(fDebug) Printf("#jet%d: %d tracks", iJet, nTracks);
1155 if(fDebug) Printf("---> input tracks: %d", nInputTracks);
1157 return nInputTracks;
1162 Double_t AliAnalysisTaskJetCore::RelativePhi(Double_t mphi,Double_t vphi){
1164 if (vphi < -1*TMath::Pi()) vphi += (2*TMath::Pi());
1165 else if (vphi > TMath::Pi()) vphi -= (2*TMath::Pi());
1166 if (mphi < -1*TMath::Pi()) mphi += (2*TMath::Pi());
1167 else if (mphi > TMath::Pi()) mphi -= (2*TMath::Pi());
1168 double dphi = mphi-vphi;
1169 if (dphi < -1*TMath::Pi()) dphi += (2*TMath::Pi());
1170 else if (dphi > TMath::Pi()) dphi -= (2*TMath::Pi());
1171 return dphi;//dphi in [-Pi, Pi]