AliPhysics  d497547 (d497547)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalJetCDF.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 #include <cmath>
17 
18 #include <TClonesArray.h>
19 #include <TH1D.h>
20 #include <TH2D.h>
21 #include <TArrayD.h>
22 #include <TString.h>
23 
24 #include <AliVCluster.h>
25 #include <AliVParticle.h>
26 #include <AliLog.h>
27 
28 #include "AliTLorentzVector.h"
29 #include "AliEmcalJet.h"
30 #include "AliRhoParameter.h"
31 #include "AliJetContainer.h"
32 #include "AliParticleContainer.h"
33 #include "AliClusterContainer.h"
34 #include "AliAnalysisManager.h"
35 #include "AliVEventHandler.h"
36 #include "AliAnalysisDataContainer.h"
37 
38 #include "AliEmcalList.h"
39 
41 
43 ClassImp ( AliAnalysisTaskEmcalJetCDF );
45 
51  fHistManager()
52 {}
53 
60  AliAnalysisTaskEmcalJet ( name, kTRUE ),
61  fHistManager(name)
62  {
63  // Standard constructor.
64  SetMakeGeneralHistograms ( kTRUE );
65  }
66 
69 
78  {
79  return kTRUE;
80  }
81 
82 //________________________________________________________________________
84  {
85  TH1::SetDefaultSumw2(kTRUE);
86  TH2::SetDefaultSumw2(kTRUE);
87 
88  namespace CDF = NS_AliAnalysisTaskEmcalJetCDF;
89  TString histname = "", groupname = "", fullgroupname = "";
90 
91  AliJetContainer* jetCont = NULL;
92  TIter next(&fJetCollArray);
93  while ( (jetCont = static_cast<AliJetContainer*>(next())) )
94  {
95  groupname = jetCont->GetName();
96 
97  Double_t jet_pt_min = jetCont->GetMinPt();
98  Double_t jet_pt_max = jetCont->GetMaxPt();
99 
100  TString jetstrmin = TString::Itoa((Int_t)jet_pt_min,10);
101  TString jetstrmax = TString::Itoa((Int_t)jet_pt_max,10);
102 
103  // add to groupname the min,max pt cuts of jets in the container
104  groupname = groupname + "_" + "ptbin" + "_" + jetstrmin + "_" + jetstrmax;
105 
106 //######################################################################################################
107 // Get histo pointers from Hist Manager
108  histname = TString::Format("%s/histo1_%d", groupname.Data(), fCentBin);
109  TH1D* fH1 = (TH1D*)GetHistogram(histname.Data());
110 
111  histname = TString::Format("%s/histo2_%d", groupname.Data(), fCentBin);
112  TH1D* fH2 = (TH1D*)GetHistogram(histname.Data());
113 
114  histname = TString::Format("%s/histo3_%d", groupname.Data(), fCentBin);
115  TH1D* fH3 = (TH1D*)GetHistogram(histname.Data());
116 
117  histname = TString::Format("%s/histo4_%d", groupname.Data(), fCentBin);
118  TH1D* fH4 = (TH1D*)GetHistogram(histname.Data());
119 
120  histname = TString::Format("%s/histo4c_%d", groupname.Data(), fCentBin);
121  TH1D* fH4c = (TH1D*)GetHistogram(histname.Data());
122 
123  histname = TString::Format("%s/histo5_%d", groupname.Data(), fCentBin);
124  TH1D* fH5 = (TH1D*)GetHistogram(histname.Data());
125 
126  histname = TString::Format("%s/histo6_%d", groupname.Data(), fCentBin);
127  TH1D* fH6 = (TH1D*)GetHistogram(histname.Data());
128 
129  histname = TString::Format("%s/histo6c_%d", groupname.Data(), fCentBin);
130  TH1D* fH6c = (TH1D*)GetHistogram(histname.Data());
131 
132  histname = TString::Format("%s/histo7_%d", groupname.Data(), fCentBin);
133  TH2D* fH7 = (TH2D*)GetHistogram(histname.Data());
134 
135  histname = TString::Format("%s/histo7all_%d", groupname.Data(), fCentBin);
136  TH2D* fH7all = (TH2D*)GetHistogram(histname.Data());
137 //######################################################################################################
138  histname = TString::Format("%s/histo8_%d", groupname.Data(), fCentBin);
139  TH1D* fH8 = (TH1D*)GetHistogram(histname.Data());
140 
141  histname = TString::Format("%s/histo8_all_%d", groupname.Data(), fCentBin);
142  TH1D* fH8_all = (TH1D*)GetHistogram(histname.Data());
143 
144  histname = TString::Format("%s/histo8_p_%d", groupname.Data(), fCentBin);
145  TH1D* fH8_p = (TH1D*)GetHistogram(histname.Data());
146 
147  histname = TString::Format("%s/histo8_all_p_%d", groupname.Data(), fCentBin);
148  TH1D* fH8_all_p = (TH1D*)GetHistogram(histname.Data());
149 
150  histname = TString::Format("%s/histo8_pt_%d", groupname.Data(), fCentBin);
151  TH1D* fH8_pt = (TH1D*)GetHistogram(histname.Data());
152 
153  histname = TString::Format("%s/histo8_all_pt_%d", groupname.Data(), fCentBin);
154  TH1D* fH8_all_pt = (TH1D*)GetHistogram(histname.Data());
155 
156  histname = TString::Format("%s/histo8xi_%d", groupname.Data(), fCentBin);
157  TH1D* fH8xi = (TH1D*)GetHistogram(histname.Data());
158 
159  histname = TString::Format("%s/histo8xi_all_%d", groupname.Data(), fCentBin);
160  TH1D* fH8xi_all = (TH1D*)GetHistogram(histname.Data());
161 
162  histname = TString::Format("%s/histo8xi_p_%d", groupname.Data(), fCentBin);
163  TH1D* fH8xi_p = (TH1D*)GetHistogram(histname.Data());
164 
165  histname = TString::Format("%s/histo8xi_all_p_%d", groupname.Data(), fCentBin);
166  TH1D* fH8xi_all_p = (TH1D*)GetHistogram(histname.Data());
167 
168  histname = TString::Format("%s/histo8xi_pt_%d", groupname.Data(), fCentBin);
169  TH1D* fH8xi_pt = (TH1D*)GetHistogram(histname.Data());
170 
171  histname = TString::Format("%s/histo8xi_all_pt_%d", groupname.Data(), fCentBin);
172  TH1D* fH8xi_all_pt = (TH1D*)GetHistogram(histname.Data());
173 //######################################################################################################
174 
175  histname = TString::Format("%s/histo15_%d", groupname.Data(), fCentBin);
176  TH2D* fH15 = (TH2D*)GetHistogram(histname.Data());
177 
178  histname = TString::Format("%s/histo15_n70_%d", groupname.Data(), fCentBin);
179  TH2D* fH15_n70 = (TH2D*)GetHistogram(histname.Data());
180 
181  histname = TString::Format("%s/histo15_n75_%d", groupname.Data(), fCentBin);
182  TH2D* fH15_n75 = (TH2D*)GetHistogram(histname.Data());
183 
184  histname = TString::Format("%s/histo15_n80_%d", groupname.Data(), fCentBin);
185  TH2D* fH15_n80 = (TH2D*)GetHistogram(histname.Data());
186 
187  histname = TString::Format("%s/histo15_n85_%d", groupname.Data(), fCentBin);
188  TH2D* fH15_n85 = (TH2D*)GetHistogram(histname.Data());
189 
190  histname = TString::Format("%s/histo15_n90_%d", groupname.Data(), fCentBin);
191  TH2D* fH15_n90 = (TH2D*)GetHistogram(histname.Data());
192 
193  histname = TString::Format("%s/histo15_pt70_%d", groupname.Data(), fCentBin);
194  TH2D* fH15_pt70 = (TH2D*)GetHistogram(histname.Data());
195 
196  histname = TString::Format("%s/histo15_pt75_%d", groupname.Data(), fCentBin);
197  TH2D* fH15_pt75 = (TH2D*)GetHistogram(histname.Data());
198 
199  histname = TString::Format("%s/histo15_pt80_%d", groupname.Data(), fCentBin);
200  TH2D* fH15_pt80 = (TH2D*)GetHistogram(histname.Data());
201 
202  histname = TString::Format("%s/histo15_pt85_%d", groupname.Data(), fCentBin);
203  TH2D* fH15_pt85 = (TH2D*)GetHistogram(histname.Data());
204 
205  histname = TString::Format("%s/histo15_pt90_%d", groupname.Data(), fCentBin);
206  TH2D* fH15_pt90 = (TH2D*)GetHistogram(histname.Data());
207 
208  histname = TString::Format("%s/histo15all_%d", groupname.Data(), fCentBin);
209  TH2D* fH15all = (TH2D*)GetHistogram(histname.Data());
210 
211  histname = TString::Format("%s/histo15all_n70_%d", groupname.Data(), fCentBin);
212  TH2D* fH15all_n70 = (TH2D*)GetHistogram(histname.Data());
213 
214  histname = TString::Format("%s/histo15all_n75_%d", groupname.Data(), fCentBin);
215  TH2D* fH15all_n75 = (TH2D*)GetHistogram(histname.Data());
216 
217  histname = TString::Format("%s/histo15all_n80_%d", groupname.Data(), fCentBin);
218  TH2D* fH15all_n80 = (TH2D*)GetHistogram(histname.Data());
219 
220  histname = TString::Format("%s/histo15all_n85_%d", groupname.Data(), fCentBin);
221  TH2D* fH15all_n85 = (TH2D*)GetHistogram(histname.Data());
222 
223  histname = TString::Format("%s/histo15all_n90_%d", groupname.Data(), fCentBin);
224  TH2D* fH15all_n90 = (TH2D*)GetHistogram(histname.Data());
225 
226  histname = TString::Format("%s/histo15all_pt70_%d", groupname.Data(), fCentBin);
227  TH2D* fH15all_pt70 = (TH2D*)GetHistogram(histname.Data());
228 
229  histname = TString::Format("%s/histo15all_pt75_%d", groupname.Data(), fCentBin);
230  TH2D* fH15all_pt75 = (TH2D*)GetHistogram(histname.Data());
231 
232  histname = TString::Format("%s/histo15all_pt80_%d", groupname.Data(), fCentBin);
233  TH2D* fH15all_pt80 = (TH2D*)GetHistogram(histname.Data());
234 
235  histname = TString::Format("%s/histo15all_pt85_%d", groupname.Data(), fCentBin);
236  TH2D* fH15all_pt85 = (TH2D*)GetHistogram(histname.Data());
237 
238  histname = TString::Format("%s/histo15all_pt90_%d", groupname.Data(), fCentBin);
239  TH2D* fH15all_pt90 = (TH2D*)GetHistogram(histname.Data());
240 //######################################################################################################
241 
242  histname = TString::Format("%s/histo20_%d", groupname.Data(), fCentBin);
243  TH1D* fH20 = (TH1D*)GetHistogram(histname.Data());
244 
245  histname = TString::Format("%s/histo20_n70_%d", groupname.Data(), fCentBin);
246  TH1D* fH20_n70 = (TH1D*)GetHistogram(histname.Data());
247 
248  histname = TString::Format("%s/histo20_n75_%d", groupname.Data(), fCentBin);
249  TH1D* fH20_n75 = (TH1D*)GetHistogram(histname.Data());
250 
251  histname = TString::Format("%s/histo20_n80_%d", groupname.Data(), fCentBin);
252  TH1D* fH20_n80 = (TH1D*)GetHistogram(histname.Data());
253 
254  histname = TString::Format("%s/histo20_n85_%d", groupname.Data(), fCentBin);
255  TH1D* fH20_n85 = (TH1D*)GetHistogram(histname.Data());
256 
257  histname = TString::Format("%s/histo20_n90_%d", groupname.Data(), fCentBin);
258  TH1D* fH20_n90 = (TH1D*)GetHistogram(histname.Data());
259 
260  histname = TString::Format("%s/histo20_pt70_%d", groupname.Data(), fCentBin);
261  TH1D* fH20_pt70 = (TH1D*)GetHistogram(histname.Data());
262 
263  histname = TString::Format("%s/histo20_pt75_%d", groupname.Data(), fCentBin);
264  TH1D* fH20_pt75 = (TH1D*)GetHistogram(histname.Data());
265 
266  histname = TString::Format("%s/histo20_pt80_%d", groupname.Data(), fCentBin);
267  TH1D* fH20_pt80 = (TH1D*)GetHistogram(histname.Data());
268 
269  histname = TString::Format("%s/histo20_pt85_%d", groupname.Data(), fCentBin);
270  TH1D* fH20_pt85 = (TH1D*)GetHistogram(histname.Data());
271 
272  histname = TString::Format("%s/histo20_pt90_%d", groupname.Data(), fCentBin);
273  TH1D* fH20_pt90 = (TH1D*)GetHistogram(histname.Data());
274 
275  histname = TString::Format("%s/histo20all_%d", groupname.Data(), fCentBin);
276  TH1D* fH20all = (TH1D*)GetHistogram(histname.Data());
277 
278  histname = TString::Format("%s/histo20all_n70_%d", groupname.Data(), fCentBin);
279  TH1D* fH20all_n70 = (TH1D*)GetHistogram(histname.Data());
280 
281  histname = TString::Format("%s/histo20all_n75_%d", groupname.Data(), fCentBin);
282  TH1D* fH20all_n75 = (TH1D*)GetHistogram(histname.Data());
283 
284  histname = TString::Format("%s/histo20all_n80_%d", groupname.Data(), fCentBin);
285  TH1D* fH20all_n80 = (TH1D*)GetHistogram(histname.Data());
286 
287  histname = TString::Format("%s/histo20all_n85_%d", groupname.Data(), fCentBin);
288  TH1D* fH20all_n85 = (TH1D*)GetHistogram(histname.Data());
289 
290  histname = TString::Format("%s/histo20all_n90_%d", groupname.Data(), fCentBin);
291  TH1D* fH20all_n90 = (TH1D*)GetHistogram(histname.Data());
292 
293  histname = TString::Format("%s/histo20all_pt70_%d", groupname.Data(), fCentBin);
294  TH1D* fH20all_pt70 = (TH1D*)GetHistogram(histname.Data());
295 
296  histname = TString::Format("%s/histo20all_pt75_%d", groupname.Data(), fCentBin);
297  TH1D* fH20all_pt75 = (TH1D*)GetHistogram(histname.Data());
298 
299  histname = TString::Format("%s/histo20all_pt80_%d", groupname.Data(), fCentBin);
300  TH1D* fH20all_pt80 = (TH1D*)GetHistogram(histname.Data());
301 
302  histname = TString::Format("%s/histo20all_pt85_%d", groupname.Data(), fCentBin);
303  TH1D* fH20all_pt85 = (TH1D*)GetHistogram(histname.Data());
304 
305  histname = TString::Format("%s/histo20all_pt90_%d", groupname.Data(), fCentBin);
306  TH1D* fH20all_pt90 = (TH1D*)GetHistogram(histname.Data());
307 //######################################################################################################
308 
309  histname = TString::Format("%s/histo_g_%d", groupname.Data(), fCentBin);
310  TH1D* fHg = (TH1D*)GetHistogram(histname.Data());
311 
312  histname = TString::Format("%s/histo_g_n70_%d", groupname.Data(), fCentBin);
313  TH1D* fHg_n70 = (TH1D*)GetHistogram(histname.Data());
314 
315  histname = TString::Format("%s/histo_g_n75_%d", groupname.Data(), fCentBin);
316  TH1D* fHg_n75 = (TH1D*)GetHistogram(histname.Data());
317 
318  histname = TString::Format("%s/histo_g_n80_%d", groupname.Data(), fCentBin);
319  TH1D* fHg_n80 = (TH1D*)GetHistogram(histname.Data());
320 
321  histname = TString::Format("%s/histo_g_n85_%d", groupname.Data(), fCentBin);
322  TH1D* fHg_n85 = (TH1D*)GetHistogram(histname.Data());
323 
324  histname = TString::Format("%s/histo_g_n90_%d", groupname.Data(), fCentBin);
325  TH1D* fHg_n90 = (TH1D*)GetHistogram(histname.Data());
326 
327  histname = TString::Format("%s/histo_g_pt70_%d", groupname.Data(), fCentBin);
328  TH1D* fHg_pt70 = (TH1D*)GetHistogram(histname.Data());
329 
330  histname = TString::Format("%s/histo_g_pt75_%d", groupname.Data(), fCentBin);
331  TH1D* fHg_pt75 = (TH1D*)GetHistogram(histname.Data());
332 
333  histname = TString::Format("%s/histo_g_pt80_%d", groupname.Data(), fCentBin);
334  TH1D* fHg_pt80 = (TH1D*)GetHistogram(histname.Data());
335 
336  histname = TString::Format("%s/histo_g_pt85_%d", groupname.Data(), fCentBin);
337  TH1D* fHg_pt85 = (TH1D*)GetHistogram(histname.Data());
338 
339  histname = TString::Format("%s/histo_g_pt90_%d", groupname.Data(), fCentBin);
340  TH1D* fHg_pt90 = (TH1D*)GetHistogram(histname.Data());
341 //######################################################################################################
342 
343  histname = TString::Format("%s/histo_ptd_%d", groupname.Data(), fCentBin);
344  TH1D* fHptd = (TH1D*)GetHistogram(histname.Data());
345 
346  histname = TString::Format("%s/histo_ptd_n70_%d", groupname.Data(), fCentBin);
347  TH1D* fHptd_n70 = (TH1D*)GetHistogram(histname.Data());
348 
349  histname = TString::Format("%s/histo_ptd_n75_%d", groupname.Data(), fCentBin);
350  TH1D* fHptd_n75 = (TH1D*)GetHistogram(histname.Data());
351 
352  histname = TString::Format("%s/histo_ptd_n80_%d", groupname.Data(), fCentBin);
353  TH1D* fHptd_n80 = (TH1D*)GetHistogram(histname.Data());
354 
355  histname = TString::Format("%s/histo_ptd_n85_%d", groupname.Data(), fCentBin);
356  TH1D* fHptd_n85 = (TH1D*)GetHistogram(histname.Data());
357 
358  histname = TString::Format("%s/histo_ptd_n90_%d", groupname.Data(), fCentBin);
359  TH1D* fHptd_n90 = (TH1D*)GetHistogram(histname.Data());
360 
361  histname = TString::Format("%s/histo_ptd_pt70_%d", groupname.Data(), fCentBin);
362  TH1D* fHptd_pt70 = (TH1D*)GetHistogram(histname.Data());
363 
364  histname = TString::Format("%s/histo_ptd_pt75_%d", groupname.Data(), fCentBin);
365  TH1D* fHptd_pt75 = (TH1D*)GetHistogram(histname.Data());
366 
367  histname = TString::Format("%s/histo_ptd_pt80_%d", groupname.Data(), fCentBin);
368  TH1D* fHptd_pt80 = (TH1D*)GetHistogram(histname.Data());
369 
370  histname = TString::Format("%s/histo_ptd_pt85_%d", groupname.Data(), fCentBin);
371  TH1D* fHptd_pt85 = (TH1D*)GetHistogram(histname.Data());
372 
373  histname = TString::Format("%s/histo_ptd_pt90_%d", groupname.Data(), fCentBin);
374  TH1D* fHptd_pt90 = (TH1D*)GetHistogram(histname.Data());
375 //######################################################################################################
376 
377  histname = TString::Format("%s/histo_Rjt_%d", groupname.Data(), fCentBin);
378  TH2D* fH_Rjt = (TH2D*)GetHistogram(histname.Data());
379 
380  histname = TString::Format("%s/histo_Rjt_n70_%d", groupname.Data(), fCentBin);
381  TH2D* fH_Rjt_n70 = (TH2D*)GetHistogram(histname.Data());
382 
383  histname = TString::Format("%s/histo_Rjt_n75_%d", groupname.Data(), fCentBin);
384  TH2D* fH_Rjt_n75 = (TH2D*)GetHistogram(histname.Data());
385 
386  histname = TString::Format("%s/histo_Rjt_n80_%d", groupname.Data(), fCentBin);
387  TH2D* fH_Rjt_n80 = (TH2D*)GetHistogram(histname.Data());
388 
389  histname = TString::Format("%s/histo_Rjt_n85_%d", groupname.Data(), fCentBin);
390  TH2D* fH_Rjt_n85 = (TH2D*)GetHistogram(histname.Data());
391 
392  histname = TString::Format("%s/histo_Rjt_n90_%d", groupname.Data(), fCentBin);
393  TH2D* fH_Rjt_n90 = (TH2D*)GetHistogram(histname.Data());
394 
395  histname = TString::Format("%s/histo_Rjt_pt70_%d", groupname.Data(), fCentBin);
396  TH2D* fH_Rjt_pt70 = (TH2D*)GetHistogram(histname.Data());
397 
398  histname = TString::Format("%s/histo_Rjt_pt75_%d", groupname.Data(), fCentBin);
399  TH2D* fH_Rjt_pt75 = (TH2D*)GetHistogram(histname.Data());
400 
401  histname = TString::Format("%s/histo_Rjt_pt80_%d", groupname.Data(), fCentBin);
402  TH2D* fH_Rjt_pt80 = (TH2D*)GetHistogram(histname.Data());
403 
404  histname = TString::Format("%s/histo_Rjt_pt85_%d", groupname.Data(), fCentBin);
405  TH2D* fH_Rjt_pt85 = (TH2D*)GetHistogram(histname.Data());
406 
407  histname = TString::Format("%s/histo_Rjt_pt90_%d", groupname.Data(), fCentBin);
408  TH2D* fH_Rjt_pt90 = (TH2D*)GetHistogram(histname.Data());
409 //######################################################################################################
410 
411  histname = TString::Format("%s/histo_jt_%d", groupname.Data(), fCentBin);
412  TH1D* fH_jt = (TH1D*)GetHistogram(histname.Data());
413 
414  histname = TString::Format("%s/histo_jt_n70_%d", groupname.Data(), fCentBin);
415  TH1D* fH_jt_n70 = (TH1D*)GetHistogram(histname.Data());
416 
417  histname = TString::Format("%s/histo_jt_n75_%d", groupname.Data(), fCentBin);
418  TH1D* fH_jt_n75 = (TH1D*)GetHistogram(histname.Data());
419 
420  histname = TString::Format("%s/histo_jt_n80_%d", groupname.Data(), fCentBin);
421  TH1D* fH_jt_n80 = (TH1D*)GetHistogram(histname.Data());
422 
423  histname = TString::Format("%s/histo_jt_n85_%d", groupname.Data(), fCentBin);
424  TH1D* fH_jt_n85 = (TH1D*)GetHistogram(histname.Data());
425 
426  histname = TString::Format("%s/histo_jt_n90_%d", groupname.Data(), fCentBin);
427  TH1D* fH_jt_n90 = (TH1D*)GetHistogram(histname.Data());
428 
429  histname = TString::Format("%s/histo_jt_pt70_%d", groupname.Data(), fCentBin);
430  TH1D* fH_jt_pt70 = (TH1D*)GetHistogram(histname.Data());
431 
432  histname = TString::Format("%s/histo_jt_pt75_%d", groupname.Data(), fCentBin);
433  TH1D* fH_jt_pt75 = (TH1D*)GetHistogram(histname.Data());
434 
435  histname = TString::Format("%s/histo_jt_pt80_%d", groupname.Data(), fCentBin);
436  TH1D* fH_jt_pt80 = (TH1D*)GetHistogram(histname.Data());
437 
438  histname = TString::Format("%s/histo_jt_pt85_%d", groupname.Data(), fCentBin);
439  TH1D* fH_jt_pt85 = (TH1D*)GetHistogram(histname.Data());
440 
441  histname = TString::Format("%s/histo_jt_pt90_%d", groupname.Data(), fCentBin);
442  TH1D* fH_jt_pt90 = (TH1D*)GetHistogram(histname.Data());
443 
444 
445 //######################################################################################################
446 
447  // Number of Jets found in event - accepted cuts applied by JetContainer
448  Int_t fNJets_accepted = jetCont->GetNJets();
449 
450  // get particles connected to jets
451  AliParticleContainer* fTracksCont = jetCont->GetParticleContainer();
452  if (!fTracksCont) { std::cout << "********* JET CONTAINER WITHOUT TRACKS CONTAINER *********" << std::endl; continue; }
453  TClonesArray* fTracksContArray = fTracksCont->GetArray();
454 
455  // Multiplicity in event - accepted tracks in tracks container
456  Int_t fNaccPart = fTracksCont->GetNAcceptedParticles();
457 
458  // get clusters connected to jets
459  AliClusterContainer* fCaloClustersCont = jetCont->GetClusterContainer();
460  // accepted clusters in cluster container
461  Int_t fNaccClus = -1;
462  if (fCaloClustersCont) { fNaccClus = fCaloClustersCont->GetNAcceptedClusters(); }
463 
464  // protection
465  if ( ( fNJets_accepted < 1 ) || ( fNaccPart < 1 ) )
466  {
467  if ( fDebug > 1 ) { std::cout << "accepted (fNJets || fNPart) == 0" << std::endl; }
468  return kFALSE;
469  }
470 
471  if ( fDebug > 1 )
472  { std::cout << "fNJets = " << fNJets_accepted << " ; fNPart = " << fNaccPart << std::endl; }
473 
474  AliVParticle* track = NULL;
475  AliEmcalJet* jet = NULL;
476 
477  fH5->Fill ( fNJets_accepted ); // Distribution of jets in events;
478 
479  UShort_t counter_part = 0; Double_t counter_pt = 0.; // counter for npart and pt recording
480 
481  UShort_t jet_n90 = -99 ; Double_t jet_pt90 = -99.99 ;
482  UShort_t jet_n85 = -99 ; Double_t jet_pt85 = -99.99 ;
483  UShort_t jet_n80 = -99 ; Double_t jet_pt80 = -99.99 ;
484  UShort_t jet_n75 = -99 ; Double_t jet_pt75 = -99.99 ;
485  UShort_t jet_n70 = -99 ; Double_t jet_pt70 = -99.99 ;
486 
487  // variables used to compute g and ptD
488  Double_t g_tot = 0.; Double_t sum_part_pt_tot = 0.; Double_t sum_part_pt2_tot = 0.;
489  Double_t g_n90 = 0.; Double_t sum_part_pt_n90 = 0.; Double_t sum_part_pt2_n90 = 0.;
490  Double_t g_n85 = 0.; Double_t sum_part_pt_n85 = 0.; Double_t sum_part_pt2_n85 = 0.;
491  Double_t g_n80 = 0.; Double_t sum_part_pt_n80 = 0.; Double_t sum_part_pt2_n80 = 0.;
492  Double_t g_n75 = 0.; Double_t sum_part_pt_n75 = 0.; Double_t sum_part_pt2_n75 = 0.;
493  Double_t g_n70 = 0.; Double_t sum_part_pt_n70 = 0.; Double_t sum_part_pt2_n70 = 0.;
494  Double_t g_pt90 = 0.; Double_t sum_part_pt_pt90 = 0.; Double_t sum_part_pt2_pt90 = 0.;
495  Double_t g_pt85 = 0.; Double_t sum_part_pt_pt85 = 0.; Double_t sum_part_pt2_pt85 = 0.;
496  Double_t g_pt80 = 0.; Double_t sum_part_pt_pt80 = 0.; Double_t sum_part_pt2_pt80 = 0.;
497  Double_t g_pt75 = 0.; Double_t sum_part_pt_pt75 = 0.; Double_t sum_part_pt2_pt75 = 0.;
498  Double_t g_pt70 = 0.; Double_t sum_part_pt_pt70 = 0.; Double_t sum_part_pt2_pt70 = 0.;
499 
500 
501  // **************************************************************
502  // LEADING JETS
503  // **************************************************************
504  AliEmcalJet* jet1 = jetCont->GetLeadingJet(); // internaly checked for AcceptedJet
505 
506  if ( fDebug > 1 )
507  {
508  if (jet1)
509  { std::cout << "+++++++++++++++++>>>>>>>>> Leading jet found" << std::endl; jet1->Print(); }
510  else
511  { Printf ( "Jet1 not found (did not survive cuts?)\n" ); }
512  }
513 
514  if (jet1)
515  {
516  //vector of sorted indexes of particles in leading jet
517  std::vector< int > jet1_sorted_idxvec;
518 
519  // jet1 : Sorting by p_T jet constituents
520  jet1_sorted_idxvec = jet1->GetPtSortedTrackConstituentIndexes ( fTracksContArray );
521 
522  Int_t track_idx = -999; // index variable for tracks
523  Double_t jet1_pt = jet1->Pt();
524  UShort_t jet1_npart = jet1->GetNumberOfTracks();
525  UShort_t jet1_nconst = jet1->GetNumberOfConstituents();
526 
527  UShort_t jet1_n90 = ( UShort_t ) ( 0.9 * jet1_npart );
528  Double_t jet1_pt90 = 0.9 * jet1_pt;
529 
530  UShort_t jet1_n85 = ( UShort_t ) ( 0.85 * jet1_npart );
531  Double_t jet1_pt85 = 0.85 * jet1_pt;
532 
533  UShort_t jet1_n80 = ( UShort_t ) ( 0.8 * jet1_npart );
534  Double_t jet1_pt80 = 0.8 * jet1_pt;
535 
536  UShort_t jet1_n75 = ( UShort_t ) ( 0.75 * jet1_npart );
537  Double_t jet1_pt75 = 0.75 * jet1_pt;
538 
539  UShort_t jet1_n70 = ( UShort_t ) ( 0.7 * jet1_npart );
540  Double_t jet1_pt70 = 0.7 * jet1_pt;
541 
542  fH6->Fill ( jet1_npart ); // Multiplicity of jet1 - charged tracks
543  fH6c->Fill ( jet1_nconst ); // Multiplicity of jet1 - all constituents
544  fH7->Fill ( jet1_pt, jet1_nconst ); // N(jet) vs P_{T}(jet1)
545 
546  counter_part = 0; counter_pt = 0.; // reset counters
547 
548  //___________________________________________________________________________
549  // parsing tracks of jet1 (leading jet) in decreasing order of Pt
550 
551  for (std::size_t i = 0; i < jet1_npart; i++ )
552  {
553  track_idx = jet1_sorted_idxvec.at (i);
554  //track = dynamic_cast<AliVParticle*>(fTracksContArray->At( track_idx ));
555  track = jet1->TrackAt ( track_idx, fTracksContArray );
556  if (!track) { std::cout << "Parsing tracks of jet1 :: track not defined but it should!!!" << std::endl; continue; }
557 
558  Double_t dpart = jet1->DeltaR ( track );
559  Double_t track_pt = track->Pt();
560 
561  fH8->Fill ( jet1->GetZ ( track ) ); // Momentum distribution for leading jet (FF)
562  fH8xi->Fill ( jet1->GetXi ( track ) ); // Momentum distribution for leading jet (FF) xi
563 
564  Double_t z_p = CDF::Z_ptot(jet1, track);
565  fH8_p->Fill ( z_p ); // Momentum distribution for jets (FF)
566  fH8xi_p->Fill ( CDF::Xi (z_p) ); // Momentum distribution for jets (FF) xi
567 
568  Double_t z_pt = CDF::Z_pt(jet1, track);
569  fH8_pt->Fill ( z_pt ); // Momentum distribution for jets (FF)
570  fH8xi_pt->Fill ( CDF::Xi (z_pt) ); // Momentum distribution for jets (FF) xi
571 
572  fH15->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1
573  fH20->Fill ( dpart ); // Distribution of R in leading jet
574 
575  // fill histograms for 70% of particles with highest pt
576  if ( counter_part <= jet1_n70 )
577  {
578  fH15_n70->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
579  fH20_n70->Fill ( dpart ); // Distribution of R in leading jet
580  }
581  // fill histograms for 75% of particles with highest pt
582  if ( counter_part <= jet1_n75 )
583  {
584  fH15_n75->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
585  fH20_n75->Fill ( dpart ); // Distribution of R in leading jet
586  }
587  // fill histograms for 80% of particles with highest pt
588  if ( counter_part <= jet1_n80 )
589  {
590  fH15_n80->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
591  fH20_n80->Fill ( dpart ); // Distribution of R in leading jet
592  }
593  // fill histograms for 85% of particles with highest pt
594  if ( counter_part <= jet1_n85 )
595  {
596  fH15_n85->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
597  fH20_n85->Fill ( dpart ); // Distribution of R in leading jet
598  }
599  // fill histograms for 90% of particles with highest pt
600  if ( counter_part <= jet1_n90 )
601  {
602  fH15_n90->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
603  fH20_n90->Fill ( dpart ); // Distribution of R in leading jet
604  }
605 
606  // fill histograms for particles that have first 70% of pt
607  if ( counter_pt <= jet1_pt70 )
608  {
609  fH15_pt70->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
610  fH20_pt70->Fill ( dpart ); // Distribution of R in leading jet
611  }
612  // fill histograms for particles that have first 75% of pt
613  if ( counter_pt <= jet1_pt75 )
614  {
615  fH15_pt75->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
616  fH20_pt75->Fill ( dpart ); // Distribution of R in leading jet
617  }
618  // fill histograms for particles that have first 80% of pt
619  if ( counter_pt <= jet1_pt80 )
620  {
621  fH15_pt80->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
622  fH20_pt80->Fill ( dpart ); // Distribution of R in leading jet
623  }
624  // fill histograms for particles that have first 80% of pt
625  if ( counter_pt <= jet1_pt85 )
626  {
627  fH15_pt85->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
628  fH20_pt85->Fill ( dpart ); // Distribution of R in leading jet
629  }
630  // fill histograms for particles that have first 80% of pt
631  if ( counter_pt <= jet1_pt90 )
632  {
633  fH15_pt90->Fill ( dpart, track_pt, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
634  fH20_pt90->Fill ( dpart ); // Distribution of R in leading jet
635  }
636 
637  ++counter_part; counter_pt += track_pt;
638  } // end of loop over jet1 tracks
639  jet1_sorted_idxvec.clear();
640  } // end of jet1 (leading jet) processing
641 
642 
643  track = NULL; jet1 = NULL;
644  // **************************************************************
645  // ALL JETS
646  // **************************************************************
647  Double_t jet_pt = 0. ; UShort_t jet_npart = 0; UShort_t jet_nconst = 0;
648 
649  // vector of sorted indexes of particles in jet
650  std::vector< int > jet_sorted_idxvec ;
651 
652  // loop over all jets
653  for( auto jet : jetCont->accepted())
654  {
655  if (!jet) { continue; }
656  Int_t track_idx = -999; // index variable for tracks
657  jet_pt = 0. ; jet_npart = 0; jet_nconst = 0;
658  counter_part = 0; counter_pt = 0.; // reset counters
659 
660  // jet : Sorting by p_T jet constituents
661  jet_sorted_idxvec.clear();
662  jet_sorted_idxvec = jet->GetPtSortedTrackConstituentIndexes ( fTracksContArray );
663 
664  jet_pt = jet->Pt();
665  jet_npart = jet->GetNumberOfTracks();
666  jet_nconst = jet->GetNumberOfConstituents();
667 
668  // variables for g and pdt computations
669  g_tot = 0.; sum_part_pt_tot = 0.; sum_part_pt2_tot = 0.;
670  g_n90 = 0.; sum_part_pt_n90 = 0.; sum_part_pt2_n90 = 0.;
671  g_n85 = 0.; sum_part_pt_n85 = 0.; sum_part_pt2_n85 = 0.;
672  g_n80 = 0.; sum_part_pt_n80 = 0.; sum_part_pt2_n80 = 0.;
673  g_n75 = 0.; sum_part_pt_n75 = 0.; sum_part_pt2_n75 = 0.;
674  g_n70 = 0.; sum_part_pt_n70 = 0.; sum_part_pt2_n70 = 0.;
675  g_pt90 = 0.; sum_part_pt_pt90 = 0.; sum_part_pt2_pt90 = 0.;
676  g_pt85 = 0.; sum_part_pt_pt85 = 0.; sum_part_pt2_pt85 = 0.;
677  g_pt80 = 0.; sum_part_pt_pt80 = 0.; sum_part_pt2_pt80 = 0.;
678  g_pt75 = 0.; sum_part_pt_pt75 = 0.; sum_part_pt2_pt75 = 0.;
679  g_pt70 = 0.; sum_part_pt_pt70 = 0.; sum_part_pt2_pt70 = 0.;
680 
681  // sentinels for the pt tail cuts
682  jet_n90 = ( UShort_t ) ( 0.9 * jet_npart );
683  jet_pt90 = 0.9 * jet_pt;
684 
685  jet_n85 = ( UShort_t ) ( 0.85 * jet_npart );
686  jet_pt85 = 0.85 * jet_pt;
687 
688  jet_n80 = ( UShort_t ) ( 0.8 * jet_npart );
689  jet_pt80 = 0.8 * jet_pt;
690 
691  jet_n75 = ( UShort_t ) ( 0.75 * jet_npart );
692  jet_pt75 = 0.75 * jet_pt;
693 
694  jet_n70 = ( UShort_t ) ( 0.7 * jet_npart );
695  jet_pt70 = 0.7 * jet_pt;
696 
697  fH1->Fill ( jet_pt ); // Pt distribution of jets
698  fH2->Fill ( jet->Eta() ); // Eta distribution of jets
699  fH3->Fill ( jet->Phi() ); // Phi distribution of jets
700  fH4->Fill ( jet_npart ); // Multiplicity of jets
701  fH4c->Fill ( jet_nconst ); // Multiplicity of jets - all constituents
702  fH7all->Fill ( jet_pt, jet_nconst ); // N(jet) vs P_{T} - all jets
703 
704  // parsing all jet tracks
705  for (std::size_t i = 0; i < jet_npart; i++ )
706  {
707  track_idx = jet_sorted_idxvec.at (i);
708  //track = dynamic_cast<AliVParticle*>(fTracksContArray->At( track_idx ));
709  track = jet->TrackAt ( track_idx, fTracksContArray );
710  if (!track) { std::cout << "Parsing tracks of jets :: track not defined but it should!!!" << std::endl; continue; }
711 
712  Double_t dpart = jet->DeltaR ( track );
713  Double_t track_pt = track->Pt();
714  Double_t jt = CDF::Perp (*track, *jet);
715 
716  fH8_all->Fill ( jet->GetZ ( track ) ); // Momentum distribution for jets (FF)
717  fH8xi_all->Fill ( jet->GetXi ( track ) ); // Momentum distribution for jets (FF) xi
718 
719  Double_t z_p = CDF::Z_ptot(jet,track);
720  fH8_all_p->Fill ( z_p ); // Momentum distribution for jets (FF)
721  fH8xi_all_p->Fill ( CDF::Xi (z_p) ); // Momentum distribution for jets (FF) xi
722 
723  Double_t z_pt = CDF::Z_pt(jet,track);
724  fH8_all_pt->Fill ( z_pt ); // Momentum distribution for jets (FF)
725  fH8xi_all_pt->Fill ( CDF::Xi (z_pt) ); // Momentum distribution for jets (FF) xi
726 
727  fH15all->Fill ( dpart, track_pt, track_pt ); // p_{T} track vs the Distance R from jet
728  fH20all->Fill ( dpart ); // Distribution of R in leading jet
729 
730  fH_Rjt->Fill ( dpart, jt, jt ); // jt track vs dR weighted with jt
731  fH_jt->Fill ( jt ); // jt track vs dR
732 
733  // computing components for g and ptD in the jet tracks loop
734  g_tot += (track_pt * dpart)/jet_pt;
735  sum_part_pt_tot += track_pt;
736  sum_part_pt2_tot += TMath::Power( track_pt, 2 );
737 
738  //#############################################################################################
739  if ( counter_part <= jet_n90 )
740  {
741  fH15all_n90->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
742  fH20all_n90->Fill ( dpart );
743  fH_Rjt_n90->Fill ( dpart, jt, jt );
744  fH_jt_n90->Fill ( jt ); // jt track vs dR
745 
746  // computing components for g and ptD in the jet tracks loop
747  g_n90 += (track_pt * dpart)/jet_pt;
748  sum_part_pt_n90 += track_pt;
749  sum_part_pt2_n90 += TMath::Power( track_pt, 2 );
750  }
751 
752  if ( counter_pt <= jet_pt90 )
753  {
754  fH15all_pt90->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
755  fH20all_pt90->Fill ( dpart );
756  fH_Rjt_pt90->Fill ( dpart, jt, jt );
757  fH_jt_pt90->Fill ( jt ); // jt track vs dR
758 
759  // computing components for g and ptD in the jet tracks loop
760  g_pt90 += (track_pt * dpart)/jet_pt;
761  sum_part_pt_pt90 += track_pt;
762  sum_part_pt2_pt90 += TMath::Power( track_pt, 2 );
763  }
764 
765  //#############################################################################################
766  if ( counter_part <= jet_n85 )
767  {
768  fH15all_n85->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
769  fH20all_n85->Fill ( dpart );
770  fH_Rjt_n85->Fill ( dpart, jt, jt );
771  fH_jt_n85->Fill ( jt ); // jt track vs dR
772 
773  // computing components for g and ptD in the jet tracks loop
774  g_n85 += (track_pt * dpart)/jet_pt;
775  sum_part_pt_n85 += track_pt;
776  sum_part_pt2_n85 += TMath::Power( track_pt, 2 );
777  }
778 
779  if ( counter_pt <= jet_pt85 )
780  {
781  fH15all_pt85->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
782  fH20all_pt85->Fill ( dpart );
783  fH_Rjt_pt85->Fill ( dpart, jt, jt );
784  fH_jt_pt85->Fill ( jt ); // jt track vs dR
785 
786  // computing components for g and ptD in the jet tracks loop
787  g_pt85 += (track_pt * dpart)/jet_pt;
788  sum_part_pt_pt85 += track_pt;
789  sum_part_pt2_pt85 += TMath::Power( track_pt, 2 );
790  }
791 
792  //#############################################################################################
793  if ( counter_part <= jet_n80 )
794  {
795  fH15all_n80->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
796  fH20all_n80->Fill ( dpart );
797  fH_Rjt_n80->Fill ( dpart, jt, jt );
798  fH_jt_n80->Fill ( jt ); // jt track vs dR
799 
800  // computing components for g and ptD in the jet tracks loop
801  g_n80 += (track_pt * dpart)/jet_pt;
802  sum_part_pt_n80 += track_pt;
803  sum_part_pt2_n80 += TMath::Power( track_pt, 2 );
804  }
805 
806  if ( counter_pt <= jet_pt80 )
807  {
808  fH15all_pt80->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
809  fH20all_pt80->Fill ( dpart );
810  fH_Rjt_pt80->Fill ( dpart, jt, jt );
811  fH_jt_pt80->Fill ( jt ); // jt track vs dR
812 
813  // computing components for g and ptD in the jet tracks loop
814  g_pt80 += (track_pt * dpart)/jet_pt;
815  sum_part_pt_pt80 += track_pt;
816  sum_part_pt2_pt80 += TMath::Power( track_pt, 2 );
817  }
818 
819  //#############################################################################################
820  if ( counter_part <= jet_n75 )
821  {
822  fH15all_n75->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
823  fH20all_n75->Fill ( dpart );
824  fH_Rjt_n75->Fill ( dpart, jt, jt );
825  fH_jt_n75->Fill ( jt ); // jt track vs dR
826 
827  // computing components for g and ptD in the jet tracks loop
828  g_n75 += (track_pt * dpart)/jet_pt;
829  sum_part_pt_n75 += track_pt;
830  sum_part_pt2_n75 += TMath::Power( track_pt, 2 );
831  }
832 
833  if ( counter_pt <= jet_pt75 )
834  {
835  fH15all_pt75->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
836  fH20all_pt75->Fill ( dpart );
837  fH_Rjt_pt75->Fill ( dpart, jt, jt );
838  fH_jt_pt75->Fill ( jt ); // jt track vs dR
839 
840  // computing components for g and ptD in the jet tracks loop
841  g_pt75 += (track_pt * dpart)/jet_pt;
842  sum_part_pt_pt75 += track_pt;
843  sum_part_pt2_pt75 += TMath::Power( track_pt, 2 );
844  }
845 
846  //#############################################################################################
847  if ( counter_part <= jet_n70 )
848  {
849  fH15all_n70->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
850  fH20all_n70->Fill ( dpart );
851  fH_Rjt_n70->Fill ( dpart, jt, jt );
852  fH_jt_n70->Fill ( jt ); // jt track vs dR
853 
854  // computing components for g and ptD in the jet tracks loop
855  g_n70 += (track_pt * dpart)/jet_pt;
856  sum_part_pt_n70 += track_pt;
857  sum_part_pt2_n70 += TMath::Power( track_pt, 2 );
858  }
859 
860  if ( counter_pt <= jet_pt70 )
861  {
862  fH15all_pt70->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
863  fH20all_pt70->Fill ( dpart );
864  fH_Rjt_pt70->Fill ( dpart, jt, jt );
865  fH_jt_pt70->Fill ( jt ); // jt track vs dR
866 
867  // computing components for g and ptD in the jet tracks loop
868  g_pt70 += (track_pt * dpart)/jet_pt;
869  sum_part_pt_pt70 += track_pt;
870  sum_part_pt2_pt70 += TMath::Power( track_pt, 2 );
871  }
872  ++counter_part; counter_pt += track_pt;
873  } // end of loop over jet tracks
874 
875  fHg->Fill ( g_tot );
876  fHg_n70->Fill ( g_n70 ); fHg_pt70->Fill ( g_pt70 );
877  fHg_n75->Fill ( g_n75 ); fHg_pt75->Fill ( g_pt75 );
878  fHg_n80->Fill ( g_n80 ); fHg_pt80->Fill ( g_pt80 );
879  fHg_n85->Fill ( g_n85 ); fHg_pt85->Fill ( g_pt85 );
880  fHg_n90->Fill ( g_n90 ); fHg_pt90->Fill ( g_pt90 );
881 
882  fHptd->Fill( TMath::Sqrt(sum_part_pt2_tot)/sum_part_pt_tot );
883 
884  fHptd_n70->Fill( TMath::Sqrt(sum_part_pt2_n70)/sum_part_pt_n70 );
885  fHptd_n75->Fill( TMath::Sqrt(sum_part_pt2_n75)/sum_part_pt_n75 );
886  fHptd_n80->Fill( TMath::Sqrt(sum_part_pt2_n80)/sum_part_pt_n80 );
887  fHptd_n85->Fill( TMath::Sqrt(sum_part_pt2_n85)/sum_part_pt_n85 );
888  fHptd_n90->Fill( TMath::Sqrt(sum_part_pt2_n90)/sum_part_pt_n90 );
889 
890  fHptd_pt70->Fill( TMath::Sqrt(sum_part_pt2_pt70)/sum_part_pt_pt70 );
891  fHptd_pt75->Fill( TMath::Sqrt(sum_part_pt2_pt75)/sum_part_pt_pt75 );
892  fHptd_pt80->Fill( TMath::Sqrt(sum_part_pt2_pt80)/sum_part_pt_pt80 );
893  fHptd_pt85->Fill( TMath::Sqrt(sum_part_pt2_pt85)/sum_part_pt_pt85 );
894  fHptd_pt90->Fill( TMath::Sqrt(sum_part_pt2_pt90)/sum_part_pt_pt90 );
895 
896  }
897  // end of loopt over all jets
898 
899  jet = NULL; track = NULL;
900  }
901  // end of loop over jet container collection
902 
903  // post data at every processing
904  PostData ( 1, fOutput ); // Post data for ALL output slots > 0 here.
905  return kTRUE;
906  }
907 
908 //________________________________________________________________________
910  {
911  // Create user output.
913 
914  TString histname = "", histtitle = "", groupname = "", fullgroupname = "";
915  AliJetContainer* jetCont = 0;
916  TIter next(&fJetCollArray);
917  while ((jetCont = static_cast<AliJetContainer*>(next())))
918  {
919  groupname = jetCont->GetName();
920 
921  Double_t jet_pt_min = jetCont->GetMinPt();
922  Double_t jet_pt_max = jetCont->GetMaxPt();
923 
924  TString jetstrmin = TString::Itoa((Int_t)jet_pt_min,10);
925  TString jetstrmax = TString::Itoa((Int_t)jet_pt_max,10);
926 
927  // add to groupname the min,max pt cuts of jets in the container
928  groupname = groupname + "_" + "ptbin" + "_" + jetstrmin + "_" + jetstrmax;
929 
930  fHistManager.CreateHistoGroup(groupname);
931  for (Int_t cent = 0; cent < fNcentBins; cent++)
932  {
933  //=====================================================================================
934  Int_t h1_nbin = 300; Double_t h1_binwidth = 1; Double_t h1_low = 0;
935  Double_t h1_high = h1_low + h1_binwidth * h1_nbin; // 1GeV/bin
936  histname = TString::Format("%s/histo1_%d", groupname.Data(), cent);
937  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/#it{c}) (accepted);Jets", histname.Data()); // Pt distro of jets
938  fHistManager.CreateTH1(histname, histtitle, h1_nbin, h1_low, h1_high);
939 
940  //=====================================================================================
941  Int_t h2_nbin = 200; Double_t h2_binwidth = 0.01; Double_t h2_low = -1;
942  Double_t h2_high = h2_low + h2_binwidth * h2_nbin;
943  histname = TString::Format("%s/histo2_%d", groupname.Data(), cent);
944  histtitle = TString::Format("%s;#it{#eta}_{jet};Jets", histname.Data()); // Eta distro of jets
945  fHistManager.CreateTH1(histname, histtitle, h2_nbin, h2_low, h2_high); // 1 unit of rapidity / 100 bin
946 
947  //=====================================================================================
948  Int_t h3_nbin = 126; Double_t h3_binwidth = 0.05; Double_t h3_low = 0.;
949  Double_t h3_high = h3_low + h3_binwidth * h3_nbin;
950  histname = TString::Format("%s/histo3_%d", groupname.Data(), cent);
951  histtitle = TString::Format("%s;#it{#phi}_{jet};Jets", histname.Data()); // Phi distro of jets
952  fHistManager.CreateTH1(histname, histtitle, h3_nbin, h3_low, h3_high);
953 
954  //=====================================================================================
955  Int_t h4_nbin = 100; Double_t h4_binwidth = 1; Double_t h4_low = 0;
956  Double_t h4_high = h4_low + h4_binwidth * h4_nbin; // 1 unit of multiplicity /bin
957  histname = TString::Format("%s/histo4_%d", groupname.Data(), cent);
958  histtitle = TString::Format("%s;N_{tracks}(jet);Jets", histname.Data()); // Multiplicity of all jets; chg tracks
959  fHistManager.CreateTH1(histname, histtitle, h4_nbin, h4_low, h4_high);
960 
961  histname = TString::Format("%s/histo4c_%d", groupname.Data(), cent);
962  histtitle = TString::Format("%s;N_{tracks}(jet);Jets", histname.Data());
963  fHistManager.CreateTH1(histname, histtitle, h4_nbin, h4_low, h4_high); // Multiplicity of all jets; all tracks
964 
965  histname = TString::Format("%s/histo6_%d", groupname.Data(), cent);
966  histtitle = TString::Format("%s;N_{tracks}(jet1);Jets", histname.Data()); // Multiplicity of jet1; chg tracks
967  fHistManager.CreateTH1(histname, histtitle, h4_nbin, h4_low, h4_high);
968 
969  histname = TString::Format("%s/histo6c_%d", groupname.Data(), cent);
970  histtitle = TString::Format("%s;N_{tracks}(jet1);Jets", histname.Data()); // Multiplicity of jet1; all tracks
971  fHistManager.CreateTH1(histname, histtitle, h4_nbin, h4_low, h4_high);
972  //#####################################
973 
974  //=====================================================================================
975  Int_t h5_nbin = 100; Double_t h5_binwidth = 1; Double_t h5_low = 0;
976  Double_t h5_high = h5_low + h5_binwidth * h5_nbin;
977  histname = TString::Format("%s/histo5_%d", groupname.Data(), cent);
978  histtitle = TString::Format("%s;N_{jets};Events", histname.Data()); // Distribution of jets in events
979  fHistManager.CreateTH1(histname, histtitle, h5_nbin, h5_low, h5_high);
980 
981  //=====================================================================================
982  Int_t h7_xnbin = 300; Double_t h7_xbinwidth = 1; Double_t h7_xlow = 0;
983  Double_t h7_xhigh = h7_xlow + h7_xbinwidth * h7_xnbin;
984  Int_t h7_ynbin = 100; Double_t h7_ybinwidth = 1; Double_t h7_ylow = 0;
985  Double_t h7_yhigh = h7_ylow + h7_ybinwidth * h7_ynbin;
986 
987  histname = TString::Format("%s/histo7_%d", groupname.Data(), cent);
988  histtitle = TString::Format("%s;#it{p}_{T,jet1} (GeV/c);N_{tracks}(jet1)", histname.Data()); // N vs pt jet1
989  fHistManager.CreateTH2(histname, histtitle, h7_xnbin, h7_xlow, h7_xhigh, h7_ynbin, h7_ylow, h7_yhigh);
990 
991  histname = TString::Format("%s/histo7all_%d", groupname.Data(), cent);
992  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/c);N_{tracks}(jets)", histname.Data()); // N vs pt all jets
993  fHistManager.CreateTH2(histname, histtitle, h7_xnbin, h7_xlow, h7_xhigh, h7_ynbin, h7_ylow, h7_yhigh);
994  //#####################################
995 
996  //=====================================================================================
997  Int_t h8_nbin = 101; Double_t h8_binwidth = 0.01; Double_t h8_low = 0;
998  Double_t h8_high = h8_low + h8_binwidth * h8_nbin;
999 
1000  // Standard implementation of Z
1001  histname = TString::Format("%s/histo8_%d", groupname.Data(), cent);
1002  histtitle = TString::Format("%s - jet1;z;F(Z) = 1/N_{jet1} dN/dz", histname.Data()); // scalar z ; jet1
1003  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
1004 
1005  histname = TString::Format("%s/histo8_all_%d", groupname.Data(), cent);
1006  histtitle = TString::Format("%s - all jets;z;F(Z) = 1/N_{jets} dN/dz", histname.Data()); // scalar z ; all jets
1007  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
1008 
1009  //########################################################
1010  // P_tot implementation of Z
1011  histname = TString::Format("%s/histo8_p_%d", groupname.Data(), cent);
1012  histtitle = TString::Format("%s - jet1 P_tot;z = p_{track}/p_{jet1};F(Z) = 1/N_{jet1} dN/dz", histname.Data());
1013  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
1014 
1015  histname = TString::Format("%s/histo8_all_p_%d", groupname.Data(), cent);
1016  histtitle = TString::Format("%s - all jets P_tot;z = p_{track}/p_{jet};F(Z) = 1/N_{jets} dN/dz", histname.Data());
1017  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
1018 
1019  //########################################################
1020  // Pt implementation of Z
1021  histname = TString::Format("%s/histo8_pt_%d", groupname.Data(), cent);
1022  histtitle = TString::Format("%s - jet1 Pt;z = p_{T,track}/p_{T,jet1};F(Z) = 1/N_{jet1} dN/dz", histname.Data());
1023  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
1024 
1025  histname = TString::Format("%s/histo8_all_pt_%d", groupname.Data(), cent);
1026  histtitle = TString::Format("%s - all jets Pt;z = p_{T,track}/p_{T,jet1};F(Z) = 1/N_{jets} dN/dz", histname.Data());
1027  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
1028  //########################################################
1029 
1030  //=====================================================================================
1031  Int_t h8xi_nbin = 140; Double_t h8xi_binwidth = 0.05; Double_t h8xi_low = 0;
1032  Double_t h8xi_high = h8xi_low + h8xi_binwidth * h8xi_nbin;
1033  histname = TString::Format("%s/histo8xi_%d", groupname.Data(), cent);
1034  histtitle = TString::Format("%s - jet1;#xi = ln(1/z);D(#xi) = 1/N_{jet1} dN/d#xi", histname.Data());
1035  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
1036 
1037  histname = TString::Format("%s/histo8xi_all_%d", groupname.Data(), cent);
1038  histtitle = TString::Format("%s - all jets;#xi = ln(1/z);D(#xi) = 1/N_{jets} dN/d#xi", histname.Data());
1039  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
1040 
1041  //########################################################
1042  histname = TString::Format("%s/histo8xi_p_%d", groupname.Data(), cent);
1043  histtitle = TString::Format("%s - jet1 P_tot;#xi = ln(1/z);D(#xi) = 1/N_{jet1} dN/d#xi", histname.Data());
1044  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
1045 
1046  histname = TString::Format("%s/histo8xi_all_p_%d", groupname.Data(), cent);
1047  histtitle = TString::Format("%s - all jets P_tot;#xi = ln(1/z);D(#xi) = 1/N_{jets} dN/d#xi", histname.Data());
1048  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
1049 
1050  //########################################################
1051  histname = TString::Format("%s/histo8xi_pt_%d", groupname.Data(), cent);
1052  histtitle = TString::Format("%s - jet1 Pt;#xi = ln(1/z);D(#xi) = 1/N_{jet1} dN/d#xi", histname.Data());
1053  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
1054 
1055  histname = TString::Format("%s/histo8xi_all_pt_%d", groupname.Data(), cent);
1056  histtitle = TString::Format("%s - all jets Pt;#xi = ln(1/z);D(#xi) = 1/N_{jets} dN/d#xi", histname.Data());
1057  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
1058  //########################################################
1059 
1060  //=====================================================================================
1061  Int_t h15_xnbin = 60; Double_t h15_xbinwidth = 0.01; Double_t h15_xlow = 0.;
1062  Double_t h15_xhigh = h15_xlow + h15_xbinwidth * h15_xnbin;
1063  Int_t h15_ynbin = 400; Double_t h15_ybinwidth = 1.; Double_t h15_ylow = 0.;
1064  Double_t h15_yhigh = h15_ylow + h15_ybinwidth * h15_ynbin;
1065 
1066  //########################################################
1067  histname = TString::Format("%s/histo15_%d", groupname.Data(), cent);
1068  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1069  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1070 
1071  //########################################################
1072  histname = TString::Format("%s/histo15_n70_%d", groupname.Data(), cent);
1073  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1074  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1075 
1076  histname = TString::Format("%s/histo15_n75_%d", groupname.Data(), cent);
1077  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1078  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1079 
1080  histname = TString::Format("%s/histo15_n80_%d", groupname.Data(), cent);
1081  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1082  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1083 
1084  histname = TString::Format("%s/histo15_n85_%d", groupname.Data(), cent);
1085  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1086  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1087 
1088  histname = TString::Format("%s/histo15_n90_%d", groupname.Data(), cent);
1089  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1090  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1091 
1092  //########################################################
1093  histname = TString::Format("%s/histo15_pt70_%d", groupname.Data(), cent);
1094  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1095  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1096 
1097  histname = TString::Format("%s/histo15_pt75_%d", groupname.Data(), cent);
1098  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1099  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1100 
1101  histname = TString::Format("%s/histo15_pt80_%d", groupname.Data(), cent);
1102  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1103  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1104 
1105  histname = TString::Format("%s/histo15_pt85_%d", groupname.Data(), cent);
1106  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1107  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1108 
1109  histname = TString::Format("%s/histo15_pt90_%d", groupname.Data(), cent);
1110  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1111  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1112  //########################################################
1113 
1114  //########################################################
1115  histname = TString::Format("%s/histo15all_%d", groupname.Data(), cent);
1116  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1117  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1118 
1119  //########################################################
1120  histname = TString::Format("%s/histo15all_n70_%d", groupname.Data(), cent);
1121  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1122  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1123 
1124  histname = TString::Format("%s/histo15all_n75_%d", groupname.Data(), cent);
1125  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1126  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1127 
1128  histname = TString::Format("%s/histo15all_n80_%d", groupname.Data(), cent);
1129  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1130  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1131 
1132  histname = TString::Format("%s/histo15all_n85_%d", groupname.Data(), cent);
1133  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1134  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1135 
1136  histname = TString::Format("%s/histo15all_n90_%d", groupname.Data(), cent);
1137  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1138  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1139 
1140  //########################################################
1141  histname = TString::Format("%s/histo15all_pt70_%d", groupname.Data(), cent);
1142  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1143  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1144 
1145  histname = TString::Format("%s/histo15all_pt75_%d", groupname.Data(), cent);
1146  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1147  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1148 
1149  histname = TString::Format("%s/histo15all_pt80_%d", groupname.Data(), cent);
1150  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1151  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1152 
1153  histname = TString::Format("%s/histo15all_pt85_%d", groupname.Data(), cent);
1154  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1155  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1156 
1157  histname = TString::Format("%s/histo15all_pt90_%d", groupname.Data(), cent);
1158  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // p_T track vs dR
1159  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1160  //########################################################
1161 
1162  //=====================================================================================
1163  Int_t h20_nbin = 60; Double_t h20_binwidth = 0.01; Double_t h20_low = 0.;
1164  Double_t h20_high = h20_low + h20_binwidth * h20_nbin;
1165 
1166  //########################################################
1167  histname = TString::Format("%s/histo20_%d", groupname.Data(), cent);
1168  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1169  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1170 
1171  //########################################################
1172  histname = TString::Format("%s/histo20_n70_%d", groupname.Data(), cent);
1173  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1174  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1175 
1176  histname = TString::Format("%s/histo20_n75_%d", groupname.Data(), cent);
1177  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1178  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1179 
1180  histname = TString::Format("%s/histo20_n80_%d", groupname.Data(), cent);
1181  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1182  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1183 
1184  histname = TString::Format("%s/histo20_n85_%d", groupname.Data(), cent);
1185  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1186  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1187 
1188  histname = TString::Format("%s/histo20_n90_%d", groupname.Data(), cent);
1189  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1190  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1191  //########################################################
1192 
1193  //########################################################
1194  histname = TString::Format("%s/histo20_pt70_%d", groupname.Data(), cent);
1195  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1196  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1197 
1198  histname = TString::Format("%s/histo20_pt75_%d", groupname.Data(), cent);
1199  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1200  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1201 
1202  histname = TString::Format("%s/histo20_pt80_%d", groupname.Data(), cent);
1203  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1204  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1205 
1206  histname = TString::Format("%s/histo20_pt85_%d", groupname.Data(), cent);
1207  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1208  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1209 
1210  histname = TString::Format("%s/histo20_pt90_%d", groupname.Data(), cent);
1211  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1212  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1213  //########################################################
1214 
1215  //########################################################
1216  histname = TString::Format("%s/histo20all_%d", groupname.Data(), cent);
1217  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1218  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1219 
1220  //########################################################
1221  histname = TString::Format("%s/histo20all_n70_%d", groupname.Data(), cent);
1222  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1223  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1224 
1225  histname = TString::Format("%s/histo20all_n75_%d", groupname.Data(), cent);
1226  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1227  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1228 
1229  histname = TString::Format("%s/histo20all_n80_%d", groupname.Data(), cent);
1230  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1231  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1232 
1233  histname = TString::Format("%s/histo20all_n85_%d", groupname.Data(), cent);
1234  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1235  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1236 
1237  histname = TString::Format("%s/histo20all_n90_%d", groupname.Data(), cent);
1238  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1239  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1240  //########################################################
1241 
1242  //########################################################
1243  histname = TString::Format("%s/histo20all_pt70_%d", groupname.Data(), cent);
1244  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1245  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1246 
1247  histname = TString::Format("%s/histo20all_pt75_%d", groupname.Data(), cent);
1248  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1249  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1250 
1251  histname = TString::Format("%s/histo20all_pt80_%d", groupname.Data(), cent);
1252  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1253  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1254 
1255  histname = TString::Format("%s/histo20all_pt85_%d", groupname.Data(), cent);
1256  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1257  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1258 
1259  histname = TString::Format("%s/histo20all_pt90_%d", groupname.Data(), cent);
1260  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1261  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1262  //########################################################
1263 
1264  //=====================================================================================
1265  // Distribution of girth (radial girth) g = sum_jet_parts ( r_i * ( pt_i/pt_jet ) )
1266  Int_t hg_nbin = 50; Double_t hg_binwidth = 0.01; Double_t hg_low = 0.;
1267  Double_t hg_high = hg_low + hg_binwidth * hg_nbin;
1268 
1269  //########################################################
1270  histname = TString::Format("%s/histo_g_%d", groupname.Data(), cent);
1271  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1272  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1273  //########################################################
1274 
1275  //########################################################
1276  histname = TString::Format("%s/histo_g_n70_%d", groupname.Data(), cent);
1277  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1278  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1279 
1280  histname = TString::Format("%s/histo_g_n75_%d", groupname.Data(), cent);
1281  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1282  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1283 
1284  histname = TString::Format("%s/histo_g_n80_%d", groupname.Data(), cent);
1285  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1286  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1287 
1288  histname = TString::Format("%s/histo_g_n85_%d", groupname.Data(), cent);
1289  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1290  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1291 
1292  histname = TString::Format("%s/histo_g_n90_%d", groupname.Data(), cent);
1293  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1294  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1295  //########################################################
1296 
1297  //########################################################
1298  histname = TString::Format("%s/histo_g_pt70_%d", groupname.Data(), cent);
1299  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1300  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1301 
1302  histname = TString::Format("%s/histo_g_pt75_%d", groupname.Data(), cent);
1303  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1304  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1305 
1306  histname = TString::Format("%s/histo_g_pt80_%d", groupname.Data(), cent);
1307  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1308  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1309 
1310  histname = TString::Format("%s/histo_g_pt85_%d", groupname.Data(), cent);
1311  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1312  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1313 
1314  histname = TString::Format("%s/histo_g_pt90_%d", groupname.Data(), cent);
1315  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1316  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1317  //########################################################
1318 
1319  //=====================================================================================
1320  // Distribution of dispersion d pt_D = sqrt ( sum (pt_i^2) )/sum (pt_i)
1321  Int_t hptd_nbin = 40; Double_t hptd_binwidth = 0.05; Double_t hptd_low = 0.;
1322  Double_t hptd_high = hptd_low + hptd_binwidth * hptd_nbin;
1323 
1324  //########################################################
1325  histname = TString::Format("%s/histo_ptd_%d", groupname.Data(), cent);
1326  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1327  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1328  //########################################################
1329 
1330  //########################################################
1331  histname = TString::Format("%s/histo_ptd_n70_%d", groupname.Data(), cent);
1332  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1333  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1334 
1335  histname = TString::Format("%s/histo_ptd_n75_%d", groupname.Data(), cent);
1336  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1337  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1338 
1339  histname = TString::Format("%s/histo_ptd_n80_%d", groupname.Data(), cent);
1340  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1341  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1342 
1343  histname = TString::Format("%s/histo_ptd_n85_%d", groupname.Data(), cent);
1344  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1345  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1346 
1347  histname = TString::Format("%s/histo_ptd_n90_%d", groupname.Data(), cent);
1348  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1349  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1350  //########################################################
1351 
1352  //########################################################
1353  histname = TString::Format("%s/histo_ptd_pt70_%d", groupname.Data(), cent);
1354  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1355  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1356 
1357  histname = TString::Format("%s/histo_ptd_pt75_%d", groupname.Data(), cent);
1358  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1359  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1360 
1361  histname = TString::Format("%s/histo_ptd_pt80_%d", groupname.Data(), cent);
1362  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1363  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1364 
1365  histname = TString::Format("%s/histo_ptd_pt85_%d", groupname.Data(), cent);
1366  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1367  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1368 
1369  histname = TString::Format("%s/histo_ptd_pt90_%d", groupname.Data(), cent);
1370  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1371  fHistManager.CreateTH1(histname, histtitle, hptd_nbin, hptd_low, hptd_high);
1372  //########################################################
1373 
1374  //=====================================================================================
1375  Int_t h_Rjt_xnbin = 60; Double_t h_Rjt_xbinwidth = 0.01; Double_t h_Rjt_xlow = 0.;
1376  Double_t h_Rjt_xhigh = h_Rjt_xlow + h_Rjt_xbinwidth * h_Rjt_xnbin;
1377  Int_t h_Rjt_ynbin = 500; Double_t h_Rjt_ybinwidth = 0.01; Double_t h_Rjt_ylow = 0.;
1378  Double_t h_Rjt_yhigh = h_Rjt_ylow + h_Rjt_ybinwidth * h_Rjt_ynbin;
1379 
1380  //########################################################
1381  histname = TString::Format("%s/histo_Rjt_%d", groupname.Data(), cent);
1382  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1383  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1384 
1385  //########################################################
1386  histname = TString::Format("%s/histo_Rjt_n70_%d", groupname.Data(), cent);
1387  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1388  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1389 
1390  histname = TString::Format("%s/histo_Rjt_n75_%d", groupname.Data(), cent);
1391  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1392  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1393 
1394  histname = TString::Format("%s/histo_Rjt_n80_%d", groupname.Data(), cent);
1395  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1396  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1397 
1398  histname = TString::Format("%s/histo_Rjt_n85_%d", groupname.Data(), cent);
1399  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1400  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1401 
1402  histname = TString::Format("%s/histo_Rjt_n90_%d", groupname.Data(), cent);
1403  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1404  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1405 
1406  //########################################################
1407  histname = TString::Format("%s/histo_Rjt_pt70_%d", groupname.Data(), cent);
1408  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1409  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1410 
1411  histname = TString::Format("%s/histo_Rjt_pt75_%d", groupname.Data(), cent);
1412  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1413  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1414 
1415  histname = TString::Format("%s/histo_Rjt_pt80_%d", groupname.Data(), cent);
1416  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1417  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1418 
1419  histname = TString::Format("%s/histo_Rjt_pt85_%d", groupname.Data(), cent);
1420  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1421  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1422 
1423  histname = TString::Format("%s/histo_Rjt_pt90_%d", groupname.Data(), cent);
1424  histtitle = TString::Format("%s ;dR;j_{T} (GeV/c);", histname.Data()); // j_T track vs dR
1425  fHistManager.CreateTH2(histname, histtitle, h_Rjt_xnbin, h_Rjt_xlow, h_Rjt_xhigh, h_Rjt_ynbin, h_Rjt_ylow, h_Rjt_yhigh);
1426  //########################################################
1427 
1428  //=====================================================================================
1429  Int_t h_jt_xnbin = 500; Double_t h_jt_xbinwidth = 0.01; Double_t h_jt_xlow = 0.;
1430  Double_t h_jt_xhigh = h_jt_xlow + h_jt_xbinwidth * h_jt_xnbin;
1431 
1432  //########################################################
1433  histname = TString::Format("%s/histo_jt_%d", groupname.Data(), cent);
1434  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1435  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1436 
1437  //########################################################
1438  histname = TString::Format("%s/histo_jt_n70_%d", groupname.Data(), cent);
1439  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1440  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1441 
1442  histname = TString::Format("%s/histo_jt_n75_%d", groupname.Data(), cent);
1443  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1444  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1445 
1446  histname = TString::Format("%s/histo_jt_n80_%d", groupname.Data(), cent);
1447  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1448  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1449 
1450  histname = TString::Format("%s/histo_jt_n85_%d", groupname.Data(), cent);
1451  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1452  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1453 
1454  histname = TString::Format("%s/histo_jt_n90_%d", groupname.Data(), cent);
1455  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1456  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1457 
1458  //########################################################
1459  histname = TString::Format("%s/histo_jt_pt70_%d", groupname.Data(), cent);
1460  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1461  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1462 
1463  histname = TString::Format("%s/histo_jt_pt75_%d", groupname.Data(), cent);
1464  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1465  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1466 
1467  histname = TString::Format("%s/histo_jt_pt80_%d", groupname.Data(), cent);
1468  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1469  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1470 
1471  histname = TString::Format("%s/histo_jt_pt85_%d", groupname.Data(), cent);
1472  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1473  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1474 
1475  histname = TString::Format("%s/histo_jt_pt90_%d", groupname.Data(), cent);
1476  histtitle = TString::Format("%s ;j_{T} (GeV/c);1/N_{jets} dN/dj_{T};", histname.Data()); // j_T track vs dR
1477  fHistManager.CreateTH1(histname, histtitle, h_jt_xnbin, h_jt_xlow, h_jt_xhigh);
1478  //########################################################
1479 
1480  }
1481  //end of loop over fNcentBins
1482  }
1483  // end of loop over jet containers
1484 
1485  // =========== Switch on Sumw2 for all histos ===========
1486  TH1::SetDefaultSumw2(kTRUE);
1487  TH2::SetDefaultSumw2(kTRUE);
1488 
1489  // add all fHistManager content to fOutput
1490  TIter nexthist(fHistManager.GetListOfHistograms());
1491  TObject* obj = NULL;
1492  while ((obj = nexthist())) { fOutput->Add(obj); }
1493 
1494  PostData ( 1, fOutput ); // Post data for ALL output slots > 0 here.
1495  }
1496 
1502  {
1504  }
1505 
1510  {
1511  }
1512 
1513 //________________________________________________________________________
1515 {
1516  return fHistManager.FindObject(histName);
1517 }
1518 
1519 //########################################################################
1520 // Namespace AliAnalysisTaskEmcalJetCDF
1521 //########################################################################
1522 
1523 //__________________________________________________________________________________________________
1524 std::vector<Int_t> NS_AliAnalysisTaskEmcalJetCDF::SortTracksPt ( AliVEvent* event )
1525  {
1526  // Sorting by p_T (decreasing) event tracks
1527  Int_t entries = event->GetNumberOfTracks();
1528 
1529  // Create vector for Pt sorting
1530  std::vector<ptidx_pair> pair_list;
1531  pair_list.reserve ( entries );
1532 
1533  for ( Int_t i_entry = 0; i_entry < entries; i_entry++ )
1534  {
1535  AliVParticle* track = event->GetTrack ( i_entry );
1536  if ( !track ) { std::cout << Form ("Unable to find track %d in collection %s", i_entry, event->GetName()) << std::endl ; continue; }
1537 
1538  pair_list.push_back ( std::make_pair ( track->Pt(), i_entry ) );
1539  }
1540 
1541  std::stable_sort ( pair_list.begin(), pair_list.end(), sort_descend() );
1542 
1543  // return an vector of indexes of constituents (sorted descending by pt)
1544  std::vector<Int_t> index_sorted_list;
1545  index_sorted_list.reserve ( entries );
1546 
1547  // populating the return object with indexes of sorted tracks
1548  for (auto it : pair_list) { index_sorted_list.push_back(it.second); }
1549 
1550  return index_sorted_list;
1551  }
1552 
1553 //__________________________________________________________________________________________________
1555  {
1556  // Sorting by p_T (decreasing) event tracks
1557  Int_t entries = trackscont->GetNEntries();
1558 
1559  // Create vector for Pt sorting
1560  std::vector<ptidx_pair> pair_list;
1561  pair_list.reserve ( entries );
1562 
1563  UInt_t i_entry = 0;
1564  AliParticleContainer* partCont = 0;
1565  for(auto part : partCont->all()) {
1566  if (!part) {continue;}
1567  pair_list.push_back ( std::make_pair ( part->Pt(), i_entry++ ) );
1568  }
1569 
1570  std::stable_sort ( pair_list.begin(), pair_list.end(), sort_descend() );
1571 
1572  // return an vector of indexes of constituents (sorted descending by pt)
1573  std::vector<Int_t> index_sorted_list;
1574  index_sorted_list.reserve ( i_entry );
1575 
1576  // populating the return object with indexes of sorted tracks
1577  for (auto it : pair_list) { index_sorted_list.push_back(it.second); }
1578 
1579  return index_sorted_list;
1580  }
1581 
1582 
1589 AliAnalysisTaskEmcalJetCDF* NS_AliAnalysisTaskEmcalJetCDF::AddTaskEmcalJetCDF ( const char* ntracks, const char* nclusters, const char* ncells, const char* tag)
1590  {
1591  // Get the pointer to the existing analysis manager via the static access method.
1592  //==============================================================================
1593  AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
1594  if ( !mgr ) { ::Error ( "AddTaskEmcalJetCDF", "No analysis manager to connect to." ); return NULL; }
1595 
1596  // Check the analysis type using the event handlers connected to the analysis manager.
1597  //==============================================================================
1598  AliVEventHandler* handler = mgr->GetInputEventHandler();
1599  if (!handler) { ::Error ( "AddTaskEmcalJetCDF", "This task requires an input event handler" ); return NULL; }
1600 
1601  enum EDataType_t { kUnknown, kESD, kAOD }; EDataType_t dataType = kUnknown;
1602 
1603  if (handler->InheritsFrom("AliESDInputHandler")) { dataType = kESD; }
1604  else
1605  if (handler->InheritsFrom("AliAODInputHandler")) { dataType = kAOD; }
1606 
1607  //-------------------------------------------------------
1608  // Init the task and do settings
1609  //-------------------------------------------------------
1610  TString suffix ( tag );
1611  TString tracks ( ntracks );
1612  TString clusters ( nclusters );
1613  TString cells ( ncells );
1614 
1615  if ( tracks.EqualTo("usedefault") )
1616  {
1617  if ( dataType == kESD ) { tracks = "Tracks"; }
1618  else
1619  if ( dataType == kAOD ) { tracks = "tracks"; }
1620  else
1621  { tracks = ""; }
1622  }
1623 
1624  if ( clusters.EqualTo("usedefault") )
1625  {
1626  if ( dataType == kESD ) { clusters = "CaloClusters"; }
1627  else
1628  if ( dataType == kAOD ) { clusters = "caloClusters"; }
1629  else
1630  { clusters = ""; }
1631  }
1632 
1633  if ( cells.EqualTo("usedefault") )
1634  {
1635  if (dataType == kESD) { cells = "EMCALCells"; }
1636  else
1637  if (dataType == kAOD) { cells = "emcalCells"; }
1638  else
1639  { cells = ""; }
1640  }
1641 
1642  TString name("JetCDF");
1643  if (!tracks.IsNull()) { name += "_" + tracks; }
1644  if (!clusters.IsNull()) { name += "_" + clusters; }
1645  if (!cells.IsNull()) { name += "_" + cells; }
1646  if (!suffix.IsNull()) { name += "_" + suffix; }
1647 
1648  AliAnalysisTaskEmcalJetCDF* cdfTask = new AliAnalysisTaskEmcalJetCDF ( name.Data() );
1649  cdfTask->SetVzRange(-10,10);
1650  cdfTask->SetCaloCellsName(cells.Data());
1651 
1652  if ( tracks.EqualTo("mcparticles") ) {
1653  // AliMCParticleContainer* mcpartCont =
1654  cdfTask->AddMCParticleContainer ( tracks.Data() );
1655  }
1656  else
1657  if ( tracks.EqualTo("tracks") || tracks.EqualTo("Tracks") ) {
1658  // AliTrackContainer* trackCont =
1659  cdfTask->AddTrackContainer( tracks.Data() );
1660  }
1661  else
1662  if ( !tracks.IsNull())
1663  { cdfTask->AddParticleContainer(tracks.Data()); }
1664 
1665  cdfTask->AddClusterContainer(clusters.Data());
1666 
1667  //-------------------------------------------------------
1668  // Final settings, pass to manager and set the containers
1669  //-------------------------------------------------------
1670  mgr->AddTask ( cdfTask );
1671 
1672  // Create containers for input/output
1673  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
1674 
1675  TString contname = name + "_histos";
1676  TString outfile (Form("%s", AliAnalysisManager::GetCommonFileName()));
1677  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer ( contname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, outfile.Data() );
1678 
1679  mgr->ConnectInput ( cdfTask, 0, cinput1 );
1680  mgr->ConnectOutput ( cdfTask, 1, coutput1 );
1681 
1682  return cdfTask;
1683  }
1684 
1694  void NS_AliAnalysisTaskEmcalJetCDF::jetContSetParams ( AliJetContainer* jetCont, Float_t jetptmin, Float_t jetptmax, Float_t jetareacutperc, Int_t leadhadtype, Int_t nLeadJets, Float_t mintrackpt, Float_t maxtrackpt)
1695  {
1696  if (!jetCont) { return; }
1697  jetCont->SetJetPtCut ( jetptmin );
1698  jetCont->SetJetPtCutMax ( jetptmax );
1699  jetCont->SetPercAreaCut ( jetareacutperc );
1700  jetCont->SetLeadingHadronType ( leadhadtype ); // 0 = charged, 1 = neutral, 2 = both
1701  jetCont->SetNLeadingJets(nLeadJets);
1702  jetCont->SetMinTrackPt(mintrackpt);
1703  jetCont->SetMaxTrackPt(maxtrackpt);
1704  }
1705 
1706 
1707 // kate: indent-mode none; indent-width 2; replace-tabs on;
1708 
THistManager fHistManager
Histogram manager.
THashList * CreateHistoGroup(const char *groupname)
Create a new group of histograms within a parent group.
double Double_t
Definition: External.C:58
Double_t GetXi(const AliVParticle *trk) const
Double_t Eta() const
Definition: AliEmcalJet.h:114
const AliParticleIterableContainer all() const
void SetLeadingHadronType(Int_t t)
Double_t Phi() const
Definition: AliEmcalJet.h:110
Declaration of class AliTLorentzVector.
AliClusterContainer * GetClusterContainer() const
Int_t fCentBin
!event centrality bin
std::vector< Int_t > SortTracksPt(AliVEvent *event)
void SetPercAreaCut(Float_t p)
void SetVzRange(Double_t min, Double_t max)
void jetContSetParams(AliJetContainer *jetCont, Float_t jetptmin=1., Float_t jetptmax=500., Float_t jetareacutperc=0., Int_t leadhadtype=2, Int_t nLeadJets=1, Float_t mintrackpt=0.15, Float_t maxtrackpt=1000.)
AliClusterContainer * AddClusterContainer(const char *n)
Create new cluster container and attach it to the task.
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:133
Container for particles within the EMCAL framework.
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:153
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:132
std::ostream & Print(std::ostream &in) const
AliParticleContainer * GetParticleContainer() const
AliEmcalJet * GetLeadingJet(const char *opt="")
void SetMinTrackPt(Float_t b)
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
TObject * FindObject(const char *name) const
Find an object inside the container.
int Int_t
Definition: External.C:63
void SetJetPtCut(Float_t cut)
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
float Float_t
Definition: External.C:68
void SetNLeadingJets(Int_t t)
TObject * GetHistogram(const char *histName)
Int_t GetNJets() const
AliParticleContainer * AddParticleContainer(const char *n)
Create new particle container and attach it to the task.
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
Double_t Z_pt(const AliEmcalJet *jet, const AliVParticle *trk)
Definition: External.C:228
Int_t fNcentBins
how many centrality bins
Definition: External.C:212
AliAnalysisTaskEmcalJetCDF * AddTaskEmcalJetCDF(const char *ntracks="usedefault", const char *nclusters="usedefault", const char *ncells="usedefault", const char *tag="CDF")
Int_t GetNAcceptedClusters() const
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz) const
TObjArray fJetCollArray
jet collection array
Double_t DeltaR(const AliVParticle *part) const
Double_t Perp(const AliVParticle &trk1, const AliVParticle &trk2)
Double_t Pt() const
Definition: AliEmcalJet.h:102
AliEmcalList * fOutput
!output list
virtual ~AliAnalysisTaskEmcalJetCDF()
Destructor.
AliTrackContainer * AddTrackContainer(const char *n)
Create new track container and attach it to the task.
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
unsigned short UShort_t
Definition: External.C:28
functional for sorting pair by first element - descending
const char Option_t
Definition: External.C:48
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Declaration of class AliAnalysisTaskEmcalJetCDF.
void SetCaloCellsName(const char *n)
Int_t GetNAcceptedParticles() const
void SetMaxTrackPt(Float_t b)
Container structure for EMCAL clusters.
Double_t Z_ptot(const AliEmcalJet *jet, const AliVParticle *trk)
Container for jet within the EMCAL jet framework.
void SetJetPtCutMax(Float_t cut)
std::vector< int > GetPtSortedTrackConstituentIndexes(TClonesArray *tracks) const
Analysis of jet shapes and FF of all jets and leading jets.