AliPhysics  695988a (695988a)
 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 
22 #include <AliVCluster.h>
23 #include <AliVParticle.h>
24 #include <AliLog.h>
25 
26 #include "AliTLorentzVector.h"
27 #include "AliEmcalJet.h"
28 #include "AliRhoParameter.h"
29 #include "AliJetContainer.h"
30 #include "AliParticleContainer.h"
31 #include "AliClusterContainer.h"
32 
33 #include "AliEmcalList.h"
34 
36 
40 
46  fHistManager()
47 {}
48 
55  AliAnalysisTaskEmcalJet ( name, kTRUE ),
56  fHistManager(name)
57  {
58  // Standard constructor.
59  SetMakeGeneralHistograms ( kTRUE );
60  }
61 
64 
73  {
74  return kTRUE;
75  }
76 
77 //________________________________________________________________________
79  {
80  TString histname = "", groupname = "", fullgroupname = "";
81 
82  AliJetContainer* jetCont = NULL;
83  TIter next(&fJetCollArray);
84  while ((jetCont = static_cast<AliJetContainer*>(next())))
85  {
86  if (!jetCont) { continue; }
87  groupname = jetCont->GetName();
88 
89  Double_t jet_pt_min = jetCont->GetMinPt();
90  Double_t jet_pt_max = jetCont->GetMaxPt();
91 
92  TString jetstrmin = TString::Itoa((Int_t)jet_pt_min,10);
93  TString jetstrmax = TString::Itoa((Int_t)jet_pt_max,10);
94 
95  // add to groupname the min,max pt cuts of jets in the container
96  groupname = groupname + "_" + "ptbin" + "_" + jetstrmin + "_" + jetstrmax;
97 
98 //######################################################################################################
99 // Get histo pointers from Hist Manager
100  histname = TString::Format("%s/histo1_%d", groupname.Data(), fCentBin);
101  TH1D* fH1 = (TH1D*)GetHistogram(histname.Data());
102 
103  histname = TString::Format("%s/histo2_%d", groupname.Data(), fCentBin);
104  TH1D* fH2 = (TH1D*)GetHistogram(histname.Data());
105 
106  histname = TString::Format("%s/histo3_%d", groupname.Data(), fCentBin);
107  TH1D* fH3 = (TH1D*)GetHistogram(histname.Data());
108 
109  histname = TString::Format("%s/histo4_%d", groupname.Data(), fCentBin);
110  TH1D* fH4 = (TH1D*)GetHistogram(histname.Data());
111 
112  histname = TString::Format("%s/histo4c_%d", groupname.Data(), fCentBin);
113  TH1D* fH4c = (TH1D*)GetHistogram(histname.Data());
114 
115  histname = TString::Format("%s/histo5_%d", groupname.Data(), fCentBin);
116  TH1D* fH5 = (TH1D*)GetHistogram(histname.Data());
117 
118  histname = TString::Format("%s/histo6_%d", groupname.Data(), fCentBin);
119  TH1D* fH6 = (TH1D*)GetHistogram(histname.Data());
120 
121  histname = TString::Format("%s/histo6c_%d", groupname.Data(), fCentBin);
122  TH1D* fH6c = (TH1D*)GetHistogram(histname.Data());
123 
124  histname = TString::Format("%s/histo7_%d", groupname.Data(), fCentBin);
125  TH2D* fH7 = (TH2D*)GetHistogram(histname.Data());
126 
127  histname = TString::Format("%s/histo7all_%d", groupname.Data(), fCentBin);
128  TH2D* fH7all = (TH2D*)GetHistogram(histname.Data());
129 
130  histname = TString::Format("%s/histo8_%d", groupname.Data(), fCentBin);
131  TH1D* fH8 = (TH1D*)GetHistogram(histname.Data());
132 
133  histname = TString::Format("%s/histo8_all_%d", groupname.Data(), fCentBin);
134  TH1D* fH8_all = (TH1D*)GetHistogram(histname.Data());
135 
136  histname = TString::Format("%s/histo8_p_%d", groupname.Data(), fCentBin);
137  TH1D* fH8_p = (TH1D*)GetHistogram(histname.Data());
138 
139  histname = TString::Format("%s/histo8_all_p_%d", groupname.Data(), fCentBin);
140  TH1D* fH8_all_p = (TH1D*)GetHistogram(histname.Data());
141 
142  histname = TString::Format("%s/histo8_pt_%d", groupname.Data(), fCentBin);
143  TH1D* fH8_pt = (TH1D*)GetHistogram(histname.Data());
144 
145  histname = TString::Format("%s/histo8_all_pt_%d", groupname.Data(), fCentBin);
146  TH1D* fH8_all_pt = (TH1D*)GetHistogram(histname.Data());
147 
148  histname = TString::Format("%s/histo8xi_%d", groupname.Data(), fCentBin);
149  TH1D* fH8xi = (TH1D*)GetHistogram(histname.Data());
150 
151  histname = TString::Format("%s/histo8xi_all_%d", groupname.Data(), fCentBin);
152  TH1D* fH8xi_all = (TH1D*)GetHistogram(histname.Data());
153 
154  histname = TString::Format("%s/histo8xi_p_%d", groupname.Data(), fCentBin);
155  TH1D* fH8xi_p = (TH1D*)GetHistogram(histname.Data());
156 
157  histname = TString::Format("%s/histo8xi_all_p_%d", groupname.Data(), fCentBin);
158  TH1D* fH8xi_all_p = (TH1D*)GetHistogram(histname.Data());
159 
160  histname = TString::Format("%s/histo8xi_pt_%d", groupname.Data(), fCentBin);
161  TH1D* fH8xi_pt = (TH1D*)GetHistogram(histname.Data());
162 
163  histname = TString::Format("%s/histo8xi_all_pt_%d", groupname.Data(), fCentBin);
164  TH1D* fH8xi_all_pt = (TH1D*)GetHistogram(histname.Data());
165 
166  histname = TString::Format("%s/histo15_%d", groupname.Data(), fCentBin);
167  TH2D* fH15 = (TH2D*)GetHistogram(histname.Data());
168 
169  histname = TString::Format("%s/histo15_n70_%d", groupname.Data(), fCentBin);
170  TH2D* fH15_n70 = (TH2D*)GetHistogram(histname.Data());
171 
172  histname = TString::Format("%s/histo15_n75_%d", groupname.Data(), fCentBin);
173  TH2D* fH15_n75 = (TH2D*)GetHistogram(histname.Data());
174 
175  histname = TString::Format("%s/histo15_n80_%d", groupname.Data(), fCentBin);
176  TH2D* fH15_n80 = (TH2D*)GetHistogram(histname.Data());
177 
178  histname = TString::Format("%s/histo15_n85_%d", groupname.Data(), fCentBin);
179  TH2D* fH15_n85 = (TH2D*)GetHistogram(histname.Data());
180 
181  histname = TString::Format("%s/histo15_n90_%d", groupname.Data(), fCentBin);
182  TH2D* fH15_n90 = (TH2D*)GetHistogram(histname.Data());
183 
184  histname = TString::Format("%s/histo15_pt70_%d", groupname.Data(), fCentBin);
185  TH2D* fH15_pt70 = (TH2D*)GetHistogram(histname.Data());
186 
187  histname = TString::Format("%s/histo15_pt75_%d", groupname.Data(), fCentBin);
188  TH2D* fH15_pt75 = (TH2D*)GetHistogram(histname.Data());
189 
190  histname = TString::Format("%s/histo15_pt80_%d", groupname.Data(), fCentBin);
191  TH2D* fH15_pt80 = (TH2D*)GetHistogram(histname.Data());
192 
193  histname = TString::Format("%s/histo15_pt85_%d", groupname.Data(), fCentBin);
194  TH2D* fH15_pt85 = (TH2D*)GetHistogram(histname.Data());
195 
196  histname = TString::Format("%s/histo15_pt90_%d", groupname.Data(), fCentBin);
197  TH2D* fH15_pt90 = (TH2D*)GetHistogram(histname.Data());
198 
199  histname = TString::Format("%s/histo15all_%d", groupname.Data(), fCentBin);
200  TH2D* fH15all = (TH2D*)GetHistogram(histname.Data());
201 
202  histname = TString::Format("%s/histo15all_n70_%d", groupname.Data(), fCentBin);
203  TH2D* fH15all_n70 = (TH2D*)GetHistogram(histname.Data());
204 
205  histname = TString::Format("%s/histo15all_n75_%d", groupname.Data(), fCentBin);
206  TH2D* fH15all_n75 = (TH2D*)GetHistogram(histname.Data());
207 
208  histname = TString::Format("%s/histo15all_n80_%d", groupname.Data(), fCentBin);
209  TH2D* fH15all_n80 = (TH2D*)GetHistogram(histname.Data());
210 
211  histname = TString::Format("%s/histo15all_n85_%d", groupname.Data(), fCentBin);
212  TH2D* fH15all_n85 = (TH2D*)GetHistogram(histname.Data());
213 
214  histname = TString::Format("%s/histo15all_n90_%d", groupname.Data(), fCentBin);
215  TH2D* fH15all_n90 = (TH2D*)GetHistogram(histname.Data());
216 
217  histname = TString::Format("%s/histo15all_pt70_%d", groupname.Data(), fCentBin);
218  TH2D* fH15all_pt70 = (TH2D*)GetHistogram(histname.Data());
219 
220  histname = TString::Format("%s/histo15all_pt75_%d", groupname.Data(), fCentBin);
221  TH2D* fH15all_pt75 = (TH2D*)GetHistogram(histname.Data());
222 
223  histname = TString::Format("%s/histo15all_pt80_%d", groupname.Data(), fCentBin);
224  TH2D* fH15all_pt80 = (TH2D*)GetHistogram(histname.Data());
225 
226  histname = TString::Format("%s/histo15all_pt85_%d", groupname.Data(), fCentBin);
227  TH2D* fH15all_pt85 = (TH2D*)GetHistogram(histname.Data());
228 
229  histname = TString::Format("%s/histo15all_pt90_%d", groupname.Data(), fCentBin);
230  TH2D* fH15all_pt90 = (TH2D*)GetHistogram(histname.Data());
231 
232  histname = TString::Format("%s/histo20_%d", groupname.Data(), fCentBin);
233  TH1D* fH20 = (TH1D*)GetHistogram(histname.Data());
234 
235  histname = TString::Format("%s/histo20_n70_%d", groupname.Data(), fCentBin);
236  TH1D* fH20_n70 = (TH1D*)GetHistogram(histname.Data());
237 
238  histname = TString::Format("%s/histo20_n75_%d", groupname.Data(), fCentBin);
239  TH1D* fH20_n75 = (TH1D*)GetHistogram(histname.Data());
240 
241  histname = TString::Format("%s/histo20_n80_%d", groupname.Data(), fCentBin);
242  TH1D* fH20_n80 = (TH1D*)GetHistogram(histname.Data());
243 
244  histname = TString::Format("%s/histo20_n85_%d", groupname.Data(), fCentBin);
245  TH1D* fH20_n85 = (TH1D*)GetHistogram(histname.Data());
246 
247  histname = TString::Format("%s/histo20_n90_%d", groupname.Data(), fCentBin);
248  TH1D* fH20_n90 = (TH1D*)GetHistogram(histname.Data());
249 
250  histname = TString::Format("%s/histo20_pt70_%d", groupname.Data(), fCentBin);
251  TH1D* fH20_pt70 = (TH1D*)GetHistogram(histname.Data());
252 
253  histname = TString::Format("%s/histo20_pt75_%d", groupname.Data(), fCentBin);
254  TH1D* fH20_pt75 = (TH1D*)GetHistogram(histname.Data());
255 
256  histname = TString::Format("%s/histo20_pt80_%d", groupname.Data(), fCentBin);
257  TH1D* fH20_pt80 = (TH1D*)GetHistogram(histname.Data());
258 
259  histname = TString::Format("%s/histo20_pt85_%d", groupname.Data(), fCentBin);
260  TH1D* fH20_pt85 = (TH1D*)GetHistogram(histname.Data());
261 
262  histname = TString::Format("%s/histo20_pt90_%d", groupname.Data(), fCentBin);
263  TH1D* fH20_pt90 = (TH1D*)GetHistogram(histname.Data());
264 
265  histname = TString::Format("%s/histo20all_%d", groupname.Data(), fCentBin);
266  TH1D* fH20all = (TH1D*)GetHistogram(histname.Data());
267 
268  histname = TString::Format("%s/histo20all_n70_%d", groupname.Data(), fCentBin);
269  TH1D* fH20all_n70 = (TH1D*)GetHistogram(histname.Data());
270 
271  histname = TString::Format("%s/histo20all_n75_%d", groupname.Data(), fCentBin);
272  TH1D* fH20all_n75 = (TH1D*)GetHistogram(histname.Data());
273 
274  histname = TString::Format("%s/histo20all_n80_%d", groupname.Data(), fCentBin);
275  TH1D* fH20all_n80 = (TH1D*)GetHistogram(histname.Data());
276 
277  histname = TString::Format("%s/histo20all_n85_%d", groupname.Data(), fCentBin);
278  TH1D* fH20all_n85 = (TH1D*)GetHistogram(histname.Data());
279 
280  histname = TString::Format("%s/histo20all_n90_%d", groupname.Data(), fCentBin);
281  TH1D* fH20all_n90 = (TH1D*)GetHistogram(histname.Data());
282 
283  histname = TString::Format("%s/histo20all_pt70_%d", groupname.Data(), fCentBin);
284  TH1D* fH20all_pt70 = (TH1D*)GetHistogram(histname.Data());
285 
286  histname = TString::Format("%s/histo20all_pt75_%d", groupname.Data(), fCentBin);
287  TH1D* fH20all_pt75 = (TH1D*)GetHistogram(histname.Data());
288 
289  histname = TString::Format("%s/histo20all_pt80_%d", groupname.Data(), fCentBin);
290  TH1D* fH20all_pt80 = (TH1D*)GetHistogram(histname.Data());
291 
292  histname = TString::Format("%s/histo20all_pt85_%d", groupname.Data(), fCentBin);
293  TH1D* fH20all_pt85 = (TH1D*)GetHistogram(histname.Data());
294 
295  histname = TString::Format("%s/histo20all_pt90_%d", groupname.Data(), fCentBin);
296  TH1D* fH20all_pt90 = (TH1D*)GetHistogram(histname.Data());
297 
298  histname = TString::Format("%s/histo_g_%d", groupname.Data(), fCentBin);
299  TH1D* fHg = (TH1D*)GetHistogram(histname.Data());
300 
301  histname = TString::Format("%s/histo_g_n70%d", groupname.Data(), fCentBin);
302  TH1D* fHg_n70 = (TH1D*)GetHistogram(histname.Data());
303 
304  histname = TString::Format("%s/histo_g_n75%d", groupname.Data(), fCentBin);
305  TH1D* fHg_n75 = (TH1D*)GetHistogram(histname.Data());
306 
307  histname = TString::Format("%s/histo_g_n80%d", groupname.Data(), fCentBin);
308  TH1D* fHg_n80 = (TH1D*)GetHistogram(histname.Data());
309 
310  histname = TString::Format("%s/histo_g_n85%d", groupname.Data(), fCentBin);
311  TH1D* fHg_n85 = (TH1D*)GetHistogram(histname.Data());
312 
313  histname = TString::Format("%s/histo_g_n90%d", groupname.Data(), fCentBin);
314  TH1D* fHg_n90 = (TH1D*)GetHistogram(histname.Data());
315 
316  histname = TString::Format("%s/histo_g_pt70%d", groupname.Data(), fCentBin);
317  TH1D* fHg_pt70 = (TH1D*)GetHistogram(histname.Data());
318 
319  histname = TString::Format("%s/histo_g_pt75%d", groupname.Data(), fCentBin);
320  TH1D* fHg_pt75 = (TH1D*)GetHistogram(histname.Data());
321 
322  histname = TString::Format("%s/histo_g_pt80%d", groupname.Data(), fCentBin);
323  TH1D* fHg_pt80 = (TH1D*)GetHistogram(histname.Data());
324 
325  histname = TString::Format("%s/histo_g_pt85%d", groupname.Data(), fCentBin);
326  TH1D* fHg_pt85 = (TH1D*)GetHistogram(histname.Data());
327 
328  histname = TString::Format("%s/histo_g_pt90%d", groupname.Data(), fCentBin);
329  TH1D* fHg_pt90 = (TH1D*)GetHistogram(histname.Data());
330 
331  histname = TString::Format("%s/histo_ptd_%d", groupname.Data(), fCentBin);
332  TH1D* fHptd = (TH1D*)GetHistogram(histname.Data());
333 
334  histname = TString::Format("%s/histo_ptd_n70_%d", groupname.Data(), fCentBin);
335  TH1D* fHptd_n70 = (TH1D*)GetHistogram(histname.Data());
336 
337  histname = TString::Format("%s/histo_ptd_n75_%d", groupname.Data(), fCentBin);
338  TH1D* fHptd_n75 = (TH1D*)GetHistogram(histname.Data());
339 
340  histname = TString::Format("%s/histo_ptd_n80_%d", groupname.Data(), fCentBin);
341  TH1D* fHptd_n80 = (TH1D*)GetHistogram(histname.Data());
342 
343  histname = TString::Format("%s/histo_ptd_n85_%d", groupname.Data(), fCentBin);
344  TH1D* fHptd_n85 = (TH1D*)GetHistogram(histname.Data());
345 
346  histname = TString::Format("%s/histo_ptd_n90_%d", groupname.Data(), fCentBin);
347  TH1D* fHptd_n90 = (TH1D*)GetHistogram(histname.Data());
348 
349  histname = TString::Format("%s/histo_ptd_pt70_%d", groupname.Data(), fCentBin);
350  TH1D* fHptd_pt70 = (TH1D*)GetHistogram(histname.Data());
351 
352  histname = TString::Format("%s/histo_ptd_pt75_%d", groupname.Data(), fCentBin);
353  TH1D* fHptd_pt75 = (TH1D*)GetHistogram(histname.Data());
354 
355  histname = TString::Format("%s/histo_ptd_pt80_%d", groupname.Data(), fCentBin);
356  TH1D* fHptd_pt80 = (TH1D*)GetHistogram(histname.Data());
357 
358  histname = TString::Format("%s/histo_ptd_pt85_%d", groupname.Data(), fCentBin);
359  TH1D* fHptd_pt85 = (TH1D*)GetHistogram(histname.Data());
360 
361  histname = TString::Format("%s/histo_ptd_pt90_%d", groupname.Data(), fCentBin);
362  TH1D* fHptd_pt90 = (TH1D*)GetHistogram(histname.Data());
363 //######################################################################################################
364 
365  // Number of Jets found in event - accepted cuts applied by JetContainer
366  Int_t fNJets_accepted = jetCont->GetNJets();
367 
368  // get particles connected to jets
369  AliParticleContainer* fTracksCont = jetCont->GetParticleContainer();
370  if (!fTracksCont) { std::cout << "********* JET CONTAINER WITHOUT TRACKS CONTAINER *********" << std::endl; continue; }
371  TClonesArray* fTracksContArray = fTracksCont->GetArray();
372 
373  // Multiplicity in event - accepted tracks in tracks container
374  Int_t fNaccPart = fTracksCont->GetNAcceptedParticles();
375 
376  // get clusters connected to jets
377  AliClusterContainer* fCaloClustersCont = jetCont->GetClusterContainer();
378  // accepted clusters in cluster container
379  Int_t fNaccClus = -1;
380  if (fCaloClustersCont) { fNaccClus = fCaloClustersCont->GetNAcceptedClusters(); }
381 
382  // protection
383  if ( ( fNJets_accepted < 1 ) || ( fNaccPart < 1 ) )
384  {
385  if ( fDebug > 1 ) { std::cout << "accepted (fNJets || fNPart) == 0" << std::endl; }
386  return kFALSE;
387  }
388 
389  if ( fDebug > 1 )
390  { std::cout << "fNJets = " << fNJets_accepted << " ; fNPart = " << fNaccPart << std::endl; }
391 
392  AliVParticle* track = NULL;
393  AliEmcalJet* jet = NULL;
394 
395  fH5->Fill ( fNJets_accepted ); // Distribution of jets in events;
396 
397  UShort_t counter_part = 0; Double_t counter_pt = 0.; // counter for npart and pt recording
398 
399  UShort_t jet_n90 = -99 ; Double_t jet_pt90 = -99.99 ;
400  UShort_t jet_n85 = -99 ; Double_t jet_pt85 = -99.99 ;
401  UShort_t jet_n80 = -99 ; Double_t jet_pt80 = -99.99 ;
402  UShort_t jet_n75 = -99 ; Double_t jet_pt75 = -99.99 ;
403  UShort_t jet_n70 = -99 ; Double_t jet_pt70 = -99.99 ;
404 
405  // variables used to compute g and ptD
406  Double_t g_tot = 0.; Double_t sum_part_pt_tot = 0.; Double_t sum_part_pt2_tot = 0.;
407 
408  Double_t g_n90 = 0.; Double_t sum_part_pt_n90 = 0.; Double_t sum_part_pt2_n90 = 0.;
409  Double_t g_n85 = 0.; Double_t sum_part_pt_n85 = 0.; Double_t sum_part_pt2_n85 = 0.;
410  Double_t g_n80 = 0.; Double_t sum_part_pt_n80 = 0.; Double_t sum_part_pt2_n80 = 0.;
411  Double_t g_n75 = 0.; Double_t sum_part_pt_n75 = 0.; Double_t sum_part_pt2_n75 = 0.;
412  Double_t g_n70 = 0.; Double_t sum_part_pt_n70 = 0.; Double_t sum_part_pt2_n70 = 0.;
413 
414  Double_t g_pt90 = 0.; Double_t sum_part_pt_pt90 = 0.; Double_t sum_part_pt2_pt90 = 0.;
415  Double_t g_pt85 = 0.; Double_t sum_part_pt_pt85 = 0.; Double_t sum_part_pt2_pt85 = 0.;
416  Double_t g_pt80 = 0.; Double_t sum_part_pt_pt80 = 0.; Double_t sum_part_pt2_pt80 = 0.;
417  Double_t g_pt75 = 0.; Double_t sum_part_pt_pt75 = 0.; Double_t sum_part_pt2_pt75 = 0.;
418  Double_t g_pt70 = 0.; Double_t sum_part_pt_pt70 = 0.; Double_t sum_part_pt2_pt70 = 0.;
419 
420 
421  // **************************************************************
422  // LEADING JETS
423  // **************************************************************
424  AliEmcalJet* jet1 = jetCont->GetLeadingJet(); // internaly checked for AcceptedJet
425 
426  if ( fDebug > 1 )
427  {
428  if (jet1)
429  { std::cout << "+++++++++++++++++>>>>>>>>> Leading jet found" << std::endl; jet1->Print(); }
430  else
431  { Printf ( "Jet1 not found (did not survive cuts?)\n" ); }
432  }
433 
434  if (jet1)
435  {
436  //vector of sorted indexes of particles in leading jet
437  std::vector< int > jet1_sorted_idxvec;
438 
439  // jet1 : Sorting by p_T jet constituents
440  jet1_sorted_idxvec = jet1->SortConstituentsPt ( fTracksContArray );
441 
442  Int_t track_idx = -999; // index variable for tracks
443  Double_t jet1_pt = jet1->Pt();
444  UInt_t jet1_npart = jet1->GetNumberOfTracks();
445  UInt_t jet1_nconst = jet1->GetNumberOfConstituents();
446 
447  UShort_t jet1_n90 = ( UShort_t ) ( 0.9 * jet1_npart );
448  Double_t jet1_pt90 = 0.9 * jet1_pt;
449 
450  UShort_t jet1_n85 = ( UShort_t ) ( 0.85 * jet1_npart );
451  Double_t jet1_pt85 = 0.85 * jet1_pt;
452 
453  UShort_t jet1_n80 = ( UShort_t ) ( 0.8 * jet1_npart );
454  Double_t jet1_pt80 = 0.8 * jet1_pt;
455 
456  UShort_t jet1_n75 = ( UShort_t ) ( 0.75 * jet1_npart );
457  Double_t jet1_pt75 = 0.75 * jet1_pt;
458 
459  UShort_t jet1_n70 = ( UShort_t ) ( 0.7 * jet1_npart );
460  Double_t jet1_pt70 = 0.7 * jet1_pt;
461 
462  fH6->Fill ( jet1_npart ); // Multiplicity of jet1 - charged tracks
463  fH6c->Fill ( jet1_nconst ); // Multiplicity of jet1 - all constituents
464  fH7->Fill ( jet1_pt, jet1_nconst ); // N(jet) vs P_{T}(jet1)
465 
466  counter_part = 0; counter_pt = 0.; // reset counters
467 
468  //___________________________________________________________________________
469  // parsing tracks of jet1 (leading jet) in decreasing order of Pt
470 
471  for ( Size_t i = 0; i < jet1_npart; i++ )
472  {
473  track_idx = jet1_sorted_idxvec.at (i);
474  track = jet1->TrackAt ( track_idx, fTracksContArray );
475  if (!track) { std::cout << "Parsing tracks of jet1 :: track not defined but it should!!!" << std::endl; continue; }
476 
477  Double_t dpart = jet1->DeltaR ( track );
478  Double_t track_pt = track->Pt();
479 
480  fH8->Fill ( jet1->GetZ ( track ) ); // Momentum distribution for leading jet (FF)
481  fH8xi->Fill ( jet1->GetXi ( track ) ); // Momentum distribution for leading jet (FF) xi
482 
483  Double_t z_p = Z_ptot(jet1, track);
484  fH8_p->Fill ( z_p ); // Momentum distribution for jets (FF)
485  fH8xi_p->Fill ( Xi (z_p) ); // Momentum distribution for jets (FF) xi
486 
487  Double_t z_pt = Z_pt(jet1, track);
488  fH8_pt->Fill ( z_pt ); // Momentum distribution for jets (FF)
489  fH8xi_pt->Fill ( Xi (z_pt) ); // Momentum distribution for jets (FF) xi
490 
491  fH15->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1
492 
493  fH20->Fill ( dpart ); // Distribution of R in leading jet
494 
495  // fill histograms for 70% of particles with highest pt
496  if ( counter_part <= jet1_n70 )
497  {
498  fH15_n70->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
499  fH20_n70->Fill ( dpart ); // Distribution of R in leading jet
500  }
501  // fill histograms for 75% of particles with highest pt
502  if ( counter_part <= jet1_n75 )
503  {
504  fH15_n75->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
505  fH20_n75->Fill ( dpart ); // Distribution of R in leading jet
506  }
507  // fill histograms for 80% of particles with highest pt
508  if ( counter_part <= jet1_n80 )
509  {
510  fH15_n80->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
511  fH20_n80->Fill ( dpart ); // Distribution of R in leading jet
512  }
513  // fill histograms for 85% of particles with highest pt
514  if ( counter_part <= jet1_n85 )
515  {
516  fH15_n85->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
517  fH20_n85->Fill ( dpart ); // Distribution of R in leading jet
518  }
519  // fill histograms for 90% of particles with highest pt
520  if ( counter_part <= jet1_n90 )
521  {
522  fH15_n90->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of particles
523  fH20_n90->Fill ( dpart ); // Distribution of R in leading jet
524  }
525 
526  // fill histograms for particles that have first 70% of pt
527  if ( counter_pt <= jet1_pt70 )
528  {
529  fH15_pt70->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
530  fH20_pt70->Fill ( dpart ); // Distribution of R in leading jet
531  }
532  // fill histograms for particles that have first 75% of pt
533  if ( counter_pt <= jet1_pt75 )
534  {
535  fH15_pt75->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
536  fH20_pt75->Fill ( dpart ); // Distribution of R in leading jet
537  }
538  // fill histograms for particles that have first 80% of pt
539  if ( counter_pt <= jet1_pt80 )
540  {
541  fH15_pt80->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
542  fH20_pt80->Fill ( dpart ); // Distribution of R in leading jet
543  }
544  // fill histograms for particles that have first 80% of pt
545  if ( counter_pt <= jet1_pt85 )
546  {
547  fH15_pt85->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
548  fH20_pt85->Fill ( dpart ); // Distribution of R in leading jet
549  }
550  // fill histograms for particles that have first 80% of pt
551  if ( counter_pt <= jet1_pt90 )
552  {
553  fH15_pt90->Fill ( dpart, track_pt ); // <p_{T}> track vs the Distance R from Jet1 - 80% of pt
554  fH20_pt90->Fill ( dpart ); // Distribution of R in leading jet
555  }
556 
557  ++counter_part; counter_pt += track_pt;
558  } // end of loop over jet1 tracks
559  jet1_sorted_idxvec.clear();
560  } // end of jet1 (leading jet) processing
561 
562 
563  track = NULL; jet1 = NULL;
564 
565  // post data at every processing
566  PostData ( 1, fOutput ); // Post data for ALL output slots > 0 here.
567 
568  // **************************************************************
569  // ALL JETS
570  // **************************************************************
571  Double_t jet_pt = 0. ; UShort_t jet_npart = 0; UShort_t jet_nconst = 0;
572 
573  // vector of sorted indexes of particles in jet
574  std::vector< int > jet_sorted_idxvec ;
575 
576  // loop over all jets
577  for(auto jet : jetCont->accepted())
578  {
579  if (!jet) continue;
580  Int_t track_idx = -999; // index variable for tracks
581 
582  // jet : Sorting by p_T jet constituents
583  jet_sorted_idxvec = jet->SortConstituentsPt ( fTracksContArray );
584 
585  jet_pt = jet->Pt();
586  jet_npart = jet->GetNumberOfTracks();
587  jet_nconst = jet->GetNumberOfConstituents();
588 
589  g_tot = 0.; sum_part_pt_tot = 0.; sum_part_pt2_tot = 0.;
590 
591  g_n90 = 0.; sum_part_pt_n90 = 0.; sum_part_pt2_n90 = 0.;
592  g_n85 = 0.; sum_part_pt_n85 = 0.; sum_part_pt2_n85 = 0.;
593  g_n80 = 0.; sum_part_pt_n80 = 0.; sum_part_pt2_n80 = 0.;
594  g_n75 = 0.; sum_part_pt_n75 = 0.; sum_part_pt2_n75 = 0.;
595  g_n70 = 0.; sum_part_pt_n70 = 0.; sum_part_pt2_n70 = 0.;
596 
597  g_pt90 = 0.; sum_part_pt_pt90 = 0.; sum_part_pt2_pt90 = 0.;
598  g_pt85 = 0.; sum_part_pt_pt85 = 0.; sum_part_pt2_pt85 = 0.;
599  g_pt80 = 0.; sum_part_pt_pt80 = 0.; sum_part_pt2_pt80 = 0.;
600  g_pt75 = 0.; sum_part_pt_pt75 = 0.; sum_part_pt2_pt75 = 0.;
601  g_pt70 = 0.; sum_part_pt_pt70 = 0.; sum_part_pt2_pt70 = 0.;
602 
603  jet_n90 = ( UShort_t ) ( 0.9 * jet_npart );
604  jet_pt90 = 0.9 * jet_pt;
605 
606  jet_n85 = ( UShort_t ) ( 0.85 * jet_npart );
607  jet_pt85 = 0.85 * jet_pt;
608 
609  jet_n80 = ( UShort_t ) ( 0.8 * jet_npart );
610  jet_pt80 = 0.8 * jet_pt;
611 
612  jet_n75 = ( UShort_t ) ( 0.75 * jet_npart );
613  jet_pt75 = 0.75 * jet_pt;
614 
615  jet_n70 = ( UShort_t ) ( 0.7 * jet_npart );
616  jet_pt70 = 0.7 * jet_pt;
617 
618  fH1->Fill ( jet_pt ); // Pt distribution of jets
619  fH2->Fill ( jet->Eta() ); // Eta distribution of jets
620  fH3->Fill ( jet->Phi() ); // Phi distribution of jets
621  fH4->Fill ( jet_npart ); // Multiplicity of jets
622  fH4c->Fill ( jet_nconst ); // Multiplicity of jets - all constituents
623  fH7all->Fill ( jet_pt, jet_nconst ); // N(jet) vs P_{T} - all jets
624 
625  counter_part = 0; counter_pt = 0.; // reset counters
626 
627  for ( Size_t i = 0; i < jet_npart; i++ )
628  {
629  track_idx = jet_sorted_idxvec.at (i);
630  track = jet->TrackAt ( track_idx, fTracksContArray );
631  if (!track) { std::cout << "Parsing tracks of jets :: track not defined but it should!!!" << std::endl; continue; }
632 
633  Double_t dpart = jet->DeltaR ( track );
634  Double_t track_pt = track->Pt();
635 
636  fH8_all->Fill ( jet->GetZ ( track ) ); // Momentum distribution for jets (FF)
637  fH8xi_all->Fill ( jet->GetXi ( track ) ); // Momentum distribution for jets (FF) xi
638 
639  Double_t z_p = Z_ptot(jet,track);
640  fH8_all_p->Fill ( z_p ); // Momentum distribution for jets (FF)
641  fH8xi_all_p->Fill ( Xi (z_p) ); // Momentum distribution for jets (FF) xi
642 
643  Double_t z_pt = Z_pt(jet,track);
644  fH8_all_pt->Fill ( z_pt ); // Momentum distribution for jets (FF)
645  fH8xi_all_pt->Fill ( Xi (z_pt) ); // Momentum distribution for jets (FF) xi
646 
647  fH15all->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from jet
648  fH20all->Fill ( dpart ); // Distribution of R
649 
650  // computing components for g and ptD in the jet tracks loop
651  g_tot += (track_pt * dpart)/jet_pt;
652  sum_part_pt_tot += track_pt;
653  sum_part_pt2_tot += TMath::Power( track_pt, 2 );
654 
655  //#############################################################################################
656  if ( counter_part <= jet_n90 )
657  {
658  fH15all_n90->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
659  fH20all_n90->Fill ( dpart ); // Distribution of R in leading jet
660 
661  // computing components for g and ptD in the jet tracks loop
662  g_n90 += (track_pt * dpart)/jet_pt;
663  sum_part_pt_n90 += track_pt;
664  sum_part_pt2_n90 += TMath::Power( track_pt, 2 );
665  }
666 
667  if ( counter_pt <= jet_pt90 )
668  {
669  fH15all_pt90->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
670  fH20all_pt90->Fill ( dpart ); // Distribution of R in leading jet
671 
672  // computing components for g and ptD in the jet tracks loop
673  g_pt90 += (track_pt * dpart)/jet_pt;
674  sum_part_pt_pt90 += track_pt;
675  sum_part_pt2_pt90 += TMath::Power( track_pt, 2 );
676  }
677 
678  //#############################################################################################
679  if ( counter_part <= jet_n85 )
680  {
681  fH15all_n85->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
682  fH20all_n85->Fill ( dpart ); // Distribution of R in leading jet
683 
684  // computing components for g and ptD in the jet tracks loop
685  g_n85 += (track_pt * dpart)/jet_pt;
686  sum_part_pt_n85 += track_pt;
687  sum_part_pt2_n85 += TMath::Power( track_pt, 2 );
688  }
689 
690  if ( counter_pt <= jet_pt85 )
691  {
692  fH15all_pt85->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
693  fH20all_pt85->Fill ( dpart ); // Distribution of R in leading jet
694 
695  // computing components for g and ptD in the jet tracks loop
696  g_pt85 += (track_pt * dpart)/jet_pt;
697  sum_part_pt_pt85 += track_pt;
698  sum_part_pt2_pt85 += TMath::Power( track_pt, 2 );
699  }
700 
701  //#############################################################################################
702  if ( counter_part <= jet_n80 )
703  {
704  fH15all_n80->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
705  fH20all_n80->Fill ( dpart ); // Distribution of R in leading jet
706 
707  // computing components for g and ptD in the jet tracks loop
708  g_n80 += (track_pt * dpart)/jet_pt;
709  sum_part_pt_n80 += track_pt;
710  sum_part_pt2_n80 += TMath::Power( track_pt, 2 );
711  }
712 
713  if ( counter_pt <= jet_pt80 )
714  {
715  fH15all_pt80->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
716  fH20all_pt80->Fill ( dpart ); // Distribution of R in leading jet
717 
718  // computing components for g and ptD in the jet tracks loop
719  g_pt80 += (track_pt * dpart)/jet_pt;
720  sum_part_pt_pt80 += track_pt;
721  sum_part_pt2_pt80 += TMath::Power( track_pt, 2 );
722  }
723 
724  //#############################################################################################
725  if ( counter_part <= jet_n75 )
726  {
727  fH15all_n75->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
728  fH20all_n75->Fill ( dpart ); // Distribution of R in leading jet
729 
730  // computing components for g and ptD in the jet tracks loop
731  g_n75 += (track_pt * dpart)/jet_pt;
732  sum_part_pt_n75 += track_pt;
733  sum_part_pt2_n75 += TMath::Power( track_pt, 2 );
734  }
735 
736  if ( counter_pt <= jet_pt75 )
737  {
738  fH15all_pt75->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
739  fH20all_pt75->Fill ( dpart ); // Distribution of R in leading jet
740 
741  // computing components for g and ptD in the jet tracks loop
742  g_pt75 += (track_pt * dpart)/jet_pt;
743  sum_part_pt_pt75 += track_pt;
744  sum_part_pt2_pt75 += TMath::Power( track_pt, 2 );
745  }
746 
747  //#############################################################################################
748  if ( counter_part <= jet_n70 )
749  {
750  fH15all_n70->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of particles
751  fH20all_n70->Fill ( dpart ); // Distribution of R in leading jet
752 
753  // computing components for g and ptD in the jet tracks loop
754  g_n70 += (track_pt * dpart)/jet_pt;
755  sum_part_pt_n70 += track_pt;
756  sum_part_pt2_n70 += TMath::Power( track_pt, 2 );
757  }
758 
759  if ( counter_pt <= jet_pt70 )
760  {
761  fH15all_pt70->Fill ( dpart, track_pt ); // p_{T} track vs the Distance R from Jet - 80% of pt
762  fH20all_pt70->Fill ( dpart ); // Distribution of R in leading jet
763 
764  // computing components for g and ptD in the jet tracks loop
765  g_pt70 += (track_pt * dpart)/jet_pt;
766  sum_part_pt_pt70 += track_pt;
767  sum_part_pt2_pt70 += TMath::Power( track_pt, 2 );
768  }
769  ++counter_part; counter_pt += track_pt;
770  } // end of loop over jet tracks
771 
772  fHg->Fill ( g_tot );
773  fHg_n70->Fill ( g_n70 ); fHg_pt70->Fill ( g_pt70 );
774  fHg_n75->Fill ( g_n75 ); fHg_pt75->Fill ( g_pt75 );
775  fHg_n80->Fill ( g_n80 ); fHg_pt80->Fill ( g_pt80 );
776  fHg_n85->Fill ( g_n85 ); fHg_pt85->Fill ( g_pt85 );
777  fHg_n90->Fill ( g_n90 ); fHg_pt90->Fill ( g_pt90 );
778 
779  fHptd->Fill( TMath::Sqrt(sum_part_pt2_tot)/sum_part_pt_tot );
780 
781  fHptd->Fill( TMath::Sqrt(sum_part_pt2_n70)/sum_part_pt_n70 );
782  fHptd->Fill( TMath::Sqrt(sum_part_pt2_n75)/sum_part_pt_n75 );
783  fHptd->Fill( TMath::Sqrt(sum_part_pt2_n80)/sum_part_pt_n80 );
784  fHptd->Fill( TMath::Sqrt(sum_part_pt2_n85)/sum_part_pt_n85 );
785  fHptd->Fill( TMath::Sqrt(sum_part_pt2_n90)/sum_part_pt_n90 );
786 
787  fHptd->Fill( TMath::Sqrt(sum_part_pt2_pt70)/sum_part_pt_pt70 );
788  fHptd->Fill( TMath::Sqrt(sum_part_pt2_pt75)/sum_part_pt_pt75 );
789  fHptd->Fill( TMath::Sqrt(sum_part_pt2_pt80)/sum_part_pt_pt80 );
790  fHptd->Fill( TMath::Sqrt(sum_part_pt2_pt85)/sum_part_pt_pt85 );
791  fHptd->Fill( TMath::Sqrt(sum_part_pt2_pt90)/sum_part_pt_pt90 );
792 
793 
794  jet_sorted_idxvec.clear();
795 
796 
797  }
798  // end of loopt over all jets
799 
800  jet = NULL; track = NULL;
801 
802  }
803  // end of loop over jet container collection
804 
805  // post data at every processing
806  PostData ( 1, fOutput ); // Post data for ALL output slots > 0 here.
807  return kTRUE;
808  }
809 
810 //________________________________________________________________________
812  {
813  // Create user output.
815 
816  TString histname = "", histtitle = "", groupname = "", fullgroupname = "";
817  AliJetContainer* jetCont = 0;
818  TIter next(&fJetCollArray);
819  while ((jetCont = static_cast<AliJetContainer*>(next())))
820  {
821  groupname = jetCont->GetName();
822 
823  Double_t jet_pt_min = jetCont->GetMinPt();
824  Double_t jet_pt_max = jetCont->GetMaxPt();
825 
826  TString jetstrmin = TString::Itoa((Int_t)jet_pt_min,10);
827  TString jetstrmax = TString::Itoa((Int_t)jet_pt_max,10);
828 
829  // add to groupname the min,max pt cuts of jets in the container
830  groupname = groupname + "_" + "ptbin" + "_" + jetstrmin + "_" + jetstrmax;
831 
832  fHistManager.CreateHistoGroup(groupname);
833  for (Int_t cent = 0; cent < fNcentBins; cent++)
834  {
835  //=====================================================================================
836  Int_t h1_nbin = 200; Double_t h1_binwidth = 1; Double_t h1_low = 0;
837  Double_t h1_high = h1_low + h1_binwidth * h1_nbin; // 1GeV/bin
838  histname = TString::Format("%s/histo1_%d", groupname.Data(), cent);
839  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/#it{c}) (accepted);Jets", histname.Data()); // Pt distro of jets
840  fHistManager.CreateTH1(histname, histtitle, h1_nbin, h1_low, h1_high);
841 
842  //=====================================================================================
843  Int_t h2_nbin = 200; Double_t h2_binwidth = 0.01; Double_t h2_low = -1;
844  Double_t h2_high = h2_low + h2_binwidth * h2_nbin;
845  histname = TString::Format("%s/histo2_%d", groupname.Data(), cent);
846  histtitle = TString::Format("%s;#it{#eta}_{jet};Jets", histname.Data()); // Eta distro of jets
847  fHistManager.CreateTH1(histname, histtitle, h2_nbin, h2_low, h2_high); // 1 unit of rapidity / 100 bin
848 
849  //=====================================================================================
850  Int_t h3_nbin = 126; Double_t h3_binwidth = 0.05; Double_t h3_low = 0.;
851  Double_t h3_high = h3_low + h3_binwidth * h3_nbin;
852  histname = TString::Format("%s/histo3_%d", groupname.Data(), cent);
853  histtitle = TString::Format("%s;#it{#phi}_{jet};Jets", histname.Data()); // Phi distro of jets
854  fHistManager.CreateTH1(histname, histtitle, h3_nbin, h3_low, h3_high);
855 
856  //=====================================================================================
857  Int_t h4_nbin = 100; Double_t h4_binwidth = 1; Double_t h4_low = 0;
858  Double_t h4_high = h4_low + h4_binwidth * h4_nbin; // 1 unit of multiplicity /bin
859  histname = TString::Format("%s/histo4_%d", groupname.Data(), cent);
860  histtitle = TString::Format("%s;N_{tracks}(jet);Jets", histname.Data()); // Multiplicity of all jets; chg tracks
861  fHistManager.CreateTH1(histname, histtitle, h4_nbin, h4_low, h4_high);
862 
863  histname = TString::Format("%s/histo4c_%d", groupname.Data(), cent);
864  histtitle = TString::Format("%s;N_{tracks}(jet);Jets", histname.Data());
865  fHistManager.CreateTH1(histname, histtitle, h4_nbin, h4_low, h4_high); // Multiplicity of all jets; all tracks
866 
867  histname = TString::Format("%s/histo6_%d", groupname.Data(), cent);
868  histtitle = TString::Format("%s;N_{tracks}(jet1);Jets", histname.Data()); // Multiplicity of jet1; chg tracks
869  fHistManager.CreateTH1(histname, histtitle, h4_nbin, h4_low, h4_high);
870 
871  histname = TString::Format("%s/histo6c_%d", groupname.Data(), cent);
872  histtitle = TString::Format("%s;N_{tracks}(jet1);Jets", histname.Data()); // Multiplicity of jet1; all tracks
873  fHistManager.CreateTH1(histname, histtitle, h4_nbin, h4_low, h4_high);
874  //#####################################
875 
876  //=====================================================================================
877  Int_t h5_nbin = 200; Double_t h5_binwidth = 1; Double_t h5_low = 0;
878  Double_t h5_high = h5_low + h5_binwidth * h5_nbin;
879  histname = TString::Format("%s/histo5_%d", groupname.Data(), cent);
880  histtitle = TString::Format("%s;N_{jets};Events", histname.Data()); // Distribution of jets in events
881  fHistManager.CreateTH1(histname, histtitle, h5_nbin, h5_low, h5_high);
882 
883  //=====================================================================================
884  Int_t h7_xnbin = 100; Double_t h7_xbinwidth = 1; Double_t h7_xlow = 0;
885  Double_t h7_xhigh = h7_xlow + h7_xbinwidth * h7_xnbin;
886  Int_t h7_ynbin = 200; Double_t h7_ybinwidth = 1; Double_t h7_ylow = 0;
887  Double_t h7_yhigh = h7_ylow + h7_ybinwidth * h7_ynbin;
888 
889  histname = TString::Format("%s/histo7_%d", groupname.Data(), cent);
890  histtitle = TString::Format("%s;#it{p}_{T,jet1} (GeV/c);N_{tracks}(jet1)", histname.Data()); // N vs pt jet1
891  fHistManager.CreateTH2(histname, histtitle, h7_xnbin, h7_xlow, h7_xhigh, h7_ynbin, h7_ylow, h7_yhigh);
892 
893  histname = TString::Format("%s/histo7all_%d", groupname.Data(), cent);
894  histtitle = TString::Format("%s;#it{p}_{T,jet} (GeV/c);N_{tracks}(jets)", histname.Data()); // N vs pt all jets
895  fHistManager.CreateTH2(histname, histtitle, h7_xnbin, h7_xlow, h7_xhigh, h7_ynbin, h7_ylow, h7_yhigh);
896  //#####################################
897 
898  //=====================================================================================
899  Int_t h8_nbin = 101; Double_t h8_binwidth = 0.01; Double_t h8_low = 0;
900  Double_t h8_high = h8_low + h8_binwidth * h8_nbin;
901 
902  // Standard implementation of Z
903  histname = TString::Format("%s/histo8_%d", groupname.Data(), cent);
904  histtitle = TString::Format("%s - jet1;z;F(Z) = 1/N_{jet1} dN/dz", histname.Data()); // scalar z ; jet1
905  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
906 
907  histname = TString::Format("%s/histo8_all_%d", groupname.Data(), cent);
908  histtitle = TString::Format("%s - all jets;z;F(Z) = 1/N_{jets} dN/dz", histname.Data()); // scalar z ; all jets
909  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
910 
911  //########################################################
912  // P_tot implementation of Z
913  histname = TString::Format("%s/histo8_p_%d", groupname.Data(), cent);
914  histtitle = TString::Format("%s - jet1 P_tot;z = p_{track}/p_{jet1};F(Z) = 1/N_{jet1} dN/dz", histname.Data());
915  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
916 
917  histname = TString::Format("%s/histo8_all_p_%d", groupname.Data(), cent);
918  histtitle = TString::Format("%s - all jets P_tot;z = p_{track}/p_{jet};F(Z) = 1/N_{jets} dN/dz", histname.Data());
919  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
920 
921  //########################################################
922  // Pt implementation of Z
923  histname = TString::Format("%s/histo8_pt_%d", groupname.Data(), cent);
924  histtitle = TString::Format("%s - jet1 Pt;z = p_{T,track}/p_{T,jet1};F(Z) = 1/N_{jet1} dN/dz", histname.Data());
925  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
926 
927  histname = TString::Format("%s/histo8_all_pt_%d", groupname.Data(), cent);
928  histtitle = TString::Format("%s - all jets Pt;z = p_{T,track}/p_{T,jet1};F(Z) = 1/N_{jets} dN/dz", histname.Data());
929  fHistManager.CreateTH1(histname, histtitle, h8_nbin, h8_low, h8_high);
930  //########################################################
931 
932  //=====================================================================================
933  Int_t h8xi_nbin = 300; Double_t h8xi_binwidth = 0.05; Double_t h8xi_low = 0;
934  Double_t h8xi_high = h8xi_low + h8xi_binwidth * h8xi_nbin;
935  histname = TString::Format("%s/histo8xi_%d", groupname.Data(), cent);
936  histtitle = TString::Format("%s - jet1;#xi = ln(1/z);D(#xi) = 1/N_{jet1} dN/d#xi", histname.Data());
937  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
938 
939  histname = TString::Format("%s/histo8xi_all_%d", groupname.Data(), cent);
940  histtitle = TString::Format("%s - all jets;#xi = ln(1/z);D(#xi) = 1/N_{jets} dN/d#xi", histname.Data());
941  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
942 
943  //########################################################
944  histname = TString::Format("%s/histo8xi_p_%d", groupname.Data(), cent);
945  histtitle = TString::Format("%s - jet1 P_tot;#xi = ln(1/z);D(#xi) = 1/N_{jet1} dN/d#xi", histname.Data());
946  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
947 
948  histname = TString::Format("%s/histo8xi_all_p_%d", groupname.Data(), cent);
949  histtitle = TString::Format("%s - all jets P_tot;#xi = ln(1/z);D(#xi) = 1/N_{jets} dN/d#xi", histname.Data());
950  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
951 
952  //########################################################
953  histname = TString::Format("%s/histo8xi_pt_%d", groupname.Data(), cent);
954  histtitle = TString::Format("%s - jet1 Pt;#xi = ln(1/z);D(#xi) = 1/N_{jet1} dN/d#xi", histname.Data());
955  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
956 
957  histname = TString::Format("%s/histo8xi_all_pt_%d", groupname.Data(), cent);
958  histtitle = TString::Format("%s - all jets Pt;#xi = ln(1/z);D(#xi) = 1/N_{jets} dN/d#xi", histname.Data());
959  fHistManager.CreateTH1(histname, histtitle, h8xi_nbin, h8xi_low, h8xi_high);
960  //########################################################
961 
962  //=====================================================================================
963  Int_t h15_xnbin = 100; Double_t h15_xbinwidth = 0.01; Double_t h15_xlow = 0.;
964  Double_t h15_xhigh = h15_xlow + h15_xbinwidth * h15_xnbin;
965  Int_t h15_ynbin = 1000; Double_t h15_ybinwidth = 1.; Double_t h15_ylow = 0.;
966  Double_t h15_yhigh = h15_ylow + h15_ybinwidth * h15_ynbin;
967 
968  //########################################################
969  histname = TString::Format("%s/histo15_%d", groupname.Data(), cent);
970  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
971  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
972 
973  //########################################################
974  histname = TString::Format("%s/histo15_n70_%d", groupname.Data(), cent);
975  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
976  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
977 
978  histname = TString::Format("%s/histo15_n75_%d", groupname.Data(), cent);
979  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
980  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
981 
982  histname = TString::Format("%s/histo15_n80_%d", groupname.Data(), cent);
983  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
984  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
985 
986  histname = TString::Format("%s/histo15_n85_%d", groupname.Data(), cent);
987  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
988  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
989 
990  histname = TString::Format("%s/histo15_n90_%d", groupname.Data(), cent);
991  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
992  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
993 
994  //########################################################
995  histname = TString::Format("%s/histo15_pt70_%d", groupname.Data(), cent);
996  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
997  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
998 
999  histname = TString::Format("%s/histo15_pt75_%d", groupname.Data(), cent);
1000  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1001  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1002 
1003  histname = TString::Format("%s/histo15_pt80_%d", groupname.Data(), cent);
1004  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1005  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1006 
1007  histname = TString::Format("%s/histo15_pt85_%d", groupname.Data(), cent);
1008  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1009  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1010 
1011  histname = TString::Format("%s/histo15_pt90_%d", groupname.Data(), cent);
1012  histtitle = TString::Format("%s - jet1;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1013  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1014  //########################################################
1015 
1016  //########################################################
1017  histname = TString::Format("%s/histo15all_%d", groupname.Data(), cent);
1018  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1019  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1020 
1021  //########################################################
1022  histname = TString::Format("%s/histo15all_n70_%d", groupname.Data(), cent);
1023  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1024  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1025 
1026  histname = TString::Format("%s/histo15all_n75_%d", groupname.Data(), cent);
1027  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1028  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1029 
1030  histname = TString::Format("%s/histo15all_n80_%d", groupname.Data(), cent);
1031  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1032  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1033 
1034  histname = TString::Format("%s/histo15all_n85_%d", groupname.Data(), cent);
1035  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1036  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1037 
1038  histname = TString::Format("%s/histo15all_n90_%d", groupname.Data(), cent);
1039  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1040  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1041 
1042  //########################################################
1043  histname = TString::Format("%s/histo15all_pt70_%d", groupname.Data(), cent);
1044  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1045  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1046 
1047  histname = TString::Format("%s/histo15all_pt75_%d", groupname.Data(), cent);
1048  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1049  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1050 
1051  histname = TString::Format("%s/histo15all_pt80_%d", groupname.Data(), cent);
1052  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1053  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1054 
1055  histname = TString::Format("%s/histo15all_pt85_%d", groupname.Data(), cent);
1056  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1057  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1058 
1059  histname = TString::Format("%s/histo15all_pt90_%d", groupname.Data(), cent);
1060  histtitle = TString::Format("%s - all jets;dR;#it{p}_{T,track} (GeV/c)", histname.Data()); // dR vs p_T track
1061  fHistManager.CreateTH2(histname, histtitle, h15_xnbin, h15_xlow, h15_xhigh, h15_ynbin, h15_ylow, h15_yhigh);
1062  //########################################################
1063 
1064  //=====================================================================================
1065  Int_t h20_nbin = 100; Double_t h20_binwidth = 0.01; Double_t h20_low = 0.;
1066  Double_t h20_high = h20_low + h20_binwidth * h20_nbin;
1067 
1068  //########################################################
1069  histname = TString::Format("%s/histo20_%d", groupname.Data(), cent);
1070  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1071  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1072 
1073  //########################################################
1074  histname = TString::Format("%s/histo20_n70_%d", groupname.Data(), cent);
1075  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1076  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1077 
1078  histname = TString::Format("%s/histo20_n75_%d", groupname.Data(), cent);
1079  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1080  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1081 
1082  histname = TString::Format("%s/histo20_n80_%d", groupname.Data(), cent);
1083  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1084  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1085 
1086  histname = TString::Format("%s/histo20_n85_%d", groupname.Data(), cent);
1087  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1088  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1089 
1090  histname = TString::Format("%s/histo20_n90_%d", groupname.Data(), cent);
1091  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1092  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1093  //########################################################
1094 
1095  //########################################################
1096  histname = TString::Format("%s/histo20_pt70_%d", groupname.Data(), cent);
1097  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1098  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1099 
1100  histname = TString::Format("%s/histo20_pt75_%d", groupname.Data(), cent);
1101  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1102  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1103 
1104  histname = TString::Format("%s/histo20_pt80_%d", groupname.Data(), cent);
1105  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1106  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1107 
1108  histname = TString::Format("%s/histo20_pt85_%d", groupname.Data(), cent);
1109  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1110  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1111 
1112  histname = TString::Format("%s/histo20_pt90_%d", groupname.Data(), cent);
1113  histtitle = TString::Format("%s - jet1;R_{tracks};dN/dR", histname.Data());
1114  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1115  //########################################################
1116 
1117  //########################################################
1118  histname = TString::Format("%s/histo20all_%d", groupname.Data(), cent);
1119  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1120  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1121 
1122  //########################################################
1123  histname = TString::Format("%s/histo20all_n70_%d", groupname.Data(), cent);
1124  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1125  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1126 
1127  histname = TString::Format("%s/histo20all_n75_%d", groupname.Data(), cent);
1128  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1129  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1130 
1131  histname = TString::Format("%s/histo20all_n80_%d", groupname.Data(), cent);
1132  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1133  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1134 
1135  histname = TString::Format("%s/histo20all_n85_%d", groupname.Data(), cent);
1136  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1137  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1138 
1139  histname = TString::Format("%s/histo20all_n90_%d", groupname.Data(), cent);
1140  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1141  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1142  //########################################################
1143 
1144  //########################################################
1145  histname = TString::Format("%s/histo20all_pt70_%d", groupname.Data(), cent);
1146  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1147  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1148 
1149  histname = TString::Format("%s/histo20all_pt75_%d", groupname.Data(), cent);
1150  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1151  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1152 
1153  histname = TString::Format("%s/histo20all_pt80_%d", groupname.Data(), cent);
1154  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1155  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1156 
1157  histname = TString::Format("%s/histo20all_pt85_%d", groupname.Data(), cent);
1158  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1159  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1160 
1161  histname = TString::Format("%s/histo20all_pt90_%d", groupname.Data(), cent);
1162  histtitle = TString::Format("%s - all jets;R_{tracks};dN/dR", histname.Data());
1163  fHistManager.CreateTH1(histname, histtitle, h20_nbin, h20_low, h20_high);
1164  //########################################################
1165 
1166  //=====================================================================================
1167  // Distribution of girth (radial girth) g = sum_jet_parts ( r_i * ( pt_i/pt_jet ) )
1168  Int_t hg_nbin = 100; Double_t hg_binwidth = 0.01; Double_t hg_low = 0.;
1169  Double_t hg_high = hg_low + hg_binwidth * hg_nbin;
1170 
1171  //########################################################
1172  histname = TString::Format("%s/histo_g_%d", groupname.Data(), cent);
1173  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1174  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1175  //########################################################
1176 
1177  //########################################################
1178  histname = TString::Format("%s/histo_g_n70%d", groupname.Data(), cent);
1179  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1180  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1181 
1182  histname = TString::Format("%s/histo_g_n75%d", groupname.Data(), cent);
1183  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1184  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1185 
1186  histname = TString::Format("%s/histo_g_n80%d", groupname.Data(), cent);
1187  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1188  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1189 
1190  histname = TString::Format("%s/histo_g_n85%d", groupname.Data(), cent);
1191  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1192  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1193 
1194  histname = TString::Format("%s/histo_g_n90%d", groupname.Data(), cent);
1195  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1196  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1197  //########################################################
1198 
1199  //########################################################
1200  histname = TString::Format("%s/histo_g_pt70%d", groupname.Data(), cent);
1201  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1202  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1203 
1204  histname = TString::Format("%s/histo_g_pt75%d", groupname.Data(), cent);
1205  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1206  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1207 
1208  histname = TString::Format("%s/histo_g_pt80%d", groupname.Data(), cent);
1209  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1210  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1211 
1212  histname = TString::Format("%s/histo_g_pt85%d", groupname.Data(), cent);
1213  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1214  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1215 
1216  histname = TString::Format("%s/histo_g_pt90%d", groupname.Data(), cent);
1217  histtitle = TString::Format("%s - all jets;g;1/N_{jets} dN/dg", histname.Data());
1218  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1219  //########################################################
1220 
1221  //=====================================================================================
1222  // Distribution of dispersion d pt_D = sqrt ( sum (pt_i^2) )/sum (pt_i)
1223  Int_t hptd_nbin = 100; Double_t hptd_binwidth = 0.01; Double_t hptd_low = 0.;
1224  Double_t hptd_high = hptd_low + hptd_binwidth * hptd_nbin;
1225 
1226  //########################################################
1227  histname = TString::Format("%s/histo_ptd_%d", groupname.Data(), cent);
1228  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1229  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1230  //########################################################
1231 
1232  //########################################################
1233  histname = TString::Format("%s/histo_ptd_n70_%d", groupname.Data(), cent);
1234  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1235  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1236 
1237  histname = TString::Format("%s/histo_ptd_n75_%d", groupname.Data(), cent);
1238  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1239  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1240 
1241  histname = TString::Format("%s/histo_ptd_n80_%d", groupname.Data(), cent);
1242  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1243  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1244 
1245  histname = TString::Format("%s/histo_ptd_n85_%d", groupname.Data(), cent);
1246  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1247  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1248 
1249  histname = TString::Format("%s/histo_ptd_n90_%d", groupname.Data(), cent);
1250  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1251  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1252  //########################################################
1253 
1254  //########################################################
1255  histname = TString::Format("%s/histo_ptd_pt70_%d", groupname.Data(), cent);
1256  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1257  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1258 
1259  histname = TString::Format("%s/histo_ptd_pt75_%d", groupname.Data(), cent);
1260  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1261  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1262 
1263  histname = TString::Format("%s/histo_ptd_pt80_%d", groupname.Data(), cent);
1264  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1265  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1266 
1267  histname = TString::Format("%s/histo_ptd_pt85_%d", groupname.Data(), cent);
1268  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1269  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1270 
1271  histname = TString::Format("%s/histo_ptd_pt90_%d", groupname.Data(), cent);
1272  histtitle = TString::Format("%s - all jets;ptd;1/N_{jets} dN/dp_{T}D", histname.Data());
1273  fHistManager.CreateTH1(histname, histtitle, hg_nbin, hg_low, hg_high);
1274  //########################################################
1275 
1276  }
1277  //end of loop over fNcentBins
1278  }
1279  // end of loop over jet containers
1280 
1281  // =========== Switch on Sumw2 for all histos ===========
1282  for ( Int_t i = 0; i < fOutput->GetEntries(); ++i )
1283  {
1284  TH1 *h1 = dynamic_cast<TH1 *> ( fOutput->At (i) );
1285  if ( h1 ) { h1->Sumw2();continue; }
1286 
1287  TH2 *h2 = dynamic_cast<TH2 *> ( fOutput->At (i) );
1288  if ( h2 ) { h2->Sumw2();continue; }
1289  }
1290 
1291  TIter nexthist(fHistManager.GetListOfHistograms());
1292  TObject* obj = NULL;
1293  while ((obj = nexthist())) { fOutput->Add(obj); }
1294 
1295  PostData ( 1, fOutput ); // Post data for ALL output slots > 0 here.
1296  }
1297 
1298 //________________________________________________________________________
1299 // Double_t AliAnalysisTaskEmcalJetCDF::DeltaR ( const AliVParticle *part1, const AliVParticle *part2 )
1300 // {
1301 // // Helper function to calculate the distance between two jets or a jet and
1302 // // particle
1303 // Double_t dPhi = part1->Phi() - part2->Phi();
1304 // Double_t dEta = part1->Eta() - part2->Eta();
1305 // dPhi = TVector2::Phi_mpi_pi ( dPhi );
1306 //
1307 // return TMath::Sqrt ( dPhi * dPhi + dEta * dEta );
1308 // }
1309 
1310 //__________________________________________________________________________________________________
1311 std::vector<Int_t> AliAnalysisTaskEmcalJetCDF::SortTracksPt ( AliVEvent *event ) const
1312  {
1313  //___________________________________________
1314  // Sorting by p_T (decreasing) event tracks
1315  //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1316  Int_t entries = event->GetNumberOfTracks();
1317 
1318  // Create vector for Pt sorting
1319  std::vector<ptidx_pair> pair_list;
1320  pair_list.reserve ( entries );
1321 
1322  for ( Int_t i_entry = 0; i_entry < entries; i_entry++ )
1323  {
1324  AliVParticle *track = event->GetTrack ( i_entry );
1325 
1326  if ( !track )
1327  {
1328  AliError ( Form ( "Unable to find track %d in collection %s", i_entry, event->GetName() ) );
1329  continue;
1330  }
1331 
1332  pair_list.push_back ( std::make_pair ( track->Pt(), i_entry ) );
1333  }
1334 
1335  std::stable_sort ( pair_list.begin(), pair_list.end(), sort_descend() );
1336 
1337  // return an vector of indexes of constituents (sorted descending by pt)
1338  std::vector<Int_t> index_sorted_list;
1339  index_sorted_list.reserve ( entries );
1340 
1341  for ( std::vector< std::pair <Double_t, Int_t> >::iterator it = pair_list.begin(); it != pair_list.end(); ++it )
1342  {
1343  index_sorted_list.push_back ( ( *it ).second );
1344  } // populating the return object with indexes of sorted tracks
1345 
1346  return index_sorted_list;
1347  }
1348 
1349 //__________________________________________________________________________________________________
1350 std::vector<Int_t> AliAnalysisTaskEmcalJetCDF::SortTracksPt ( AliParticleContainer *trackscont ) const
1351  {
1352  //___________________________________________
1353  // Sorting by p_T (decreasing) event tracks
1354  //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1355  // Create vector for Pt sorting
1356  std::vector<ptidx_pair> pair_list;
1357 
1358  trackscont->ResetCurrentID();
1359  AliVTrack *track = NULL;
1360  UInt_t i_entry = 0;
1361  while( (track = dynamic_cast<AliVTrack*>(trackscont->GetNextAcceptParticle()) ))
1362  {
1363  i_entry++;
1364  pair_list.push_back ( std::make_pair ( track->Pt(), i_entry ) );
1365  }
1366 
1367  std::stable_sort ( pair_list.begin(), pair_list.end(), sort_descend() );
1368 
1369  // return an vector of indexes of constituents (sorted descending by pt)
1370  std::vector<Int_t> index_sorted_list;
1371  index_sorted_list.reserve ( i_entry );
1372 
1373  for ( std::vector< std::pair <Double_t, Int_t> >::iterator it = pair_list.begin(); it != pair_list.end(); ++it )
1374  {
1375  index_sorted_list.push_back ( ( *it ).second );
1376  } // populating the return object with indexes of sorted tracks
1377 
1378  return index_sorted_list;
1379  }
1380 
1381 //________________________________________________________________________
1382 // Bool_t AliAnalysisTaskEmcalJetCDF::IdxInArray ( Int_t index, TArrayI &array )
1383 // {
1384 // for ( Int_t i = 0; i < array.GetSize(); i++ )
1385 // {
1386 // if ( index == array[i] ) { return kTRUE; }
1387 // }
1388 //
1389 // return kFALSE;
1390 // }
1391 
1392 
1398  {
1400  }
1401 
1406  {
1407  }
1408 
1409 //________________________________________________________________________
1410 Double_t AliAnalysisTaskEmcalJetCDF::Z_ptot( const AliEmcalJet* jet, const AliVParticle* trk) const
1411 {
1412  if (trk->P() < 1e-6) return 0.;
1413  return (trk != 0) ? trk->P()/ jet->P() : 0.;
1414 }
1415 
1416 //________________________________________________________________________
1417 Double_t AliAnalysisTaskEmcalJetCDF::Z_pt( const AliEmcalJet* jet, const AliVParticle* trk) const
1418 {
1419  if (trk->P() < 1e-6) return 0.;
1420  return (trk != 0) ? trk->Pt() / jet->Pt() : 0.;
1421 }
1422 
1423 //________________________________________________________________________
1424 TObject* AliAnalysisTaskEmcalJetCDF::GetHistogram ( const char* histName )
1425 {
1426  return fHistManager.FindObject(histName);
1427 }
1428 
1429 
1430 // kate: indent-mode none; indent-width 2; replace-tabs on;
1431 
THistManager fHistManager
Histogram manager.
virtual AliVParticle * GetNextAcceptParticle()
Double_t GetXi(const AliVParticle *trk) const
Double_t Z_pt(const AliEmcalJet *jet, const AliVParticle *trk) const
Double_t Eta() const
Definition: AliEmcalJet.h:88
Double_t Phi() const
Definition: AliEmcalJet.h:84
Declaration of class AliTLorentzVector.
AliClusterContainer * GetClusterContainer() const
Int_t fCentBin
!event centrality bin
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:107
Container for particles within the EMCAL framework.
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:106
std::ostream & Print(std::ostream &in) const
THashList * CreateHistoGroup(const char *groupname, const char *parent="/")
AliParticleContainer * GetParticleContainer() const
AliEmcalJet * GetLeadingJet(const char *opt="")
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
TObject * FindObject(const char *name) const
THashList * GetListOfHistograms() const
Definition: THistManager.h:504
std::vector< int > SortConstituentsPt(TClonesArray *tracks) const
TObject * GetHistogram(const char *histName)
Int_t GetNJets() const
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Int_t fNcentBins
how many centrality bins
Int_t GetNAcceptedClusters() const
Double_t Xi(Double_t z) const
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 Pt() const
Definition: AliEmcalJet.h:76
AliEmcalList * fOutput
!output list
virtual ~AliAnalysisTaskEmcalJetCDF()
Destructor.
Double_t P() const
Definition: AliEmcalJet.h:77
Short_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:127
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
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
const AliJetIterableContainer accepted() const
Declaration of class AliAnalysisTaskEmcalJetCDF.
Int_t GetNAcceptedParticles() const
Double_t Z_ptot(const AliEmcalJet *jet, const AliVParticle *trk) const
Container structure for EMCAL clusters.
functional for sorting pair by first element - descending
Container for jet within the EMCAL jet framework.
Analysis of jet shapes and FF of all jets and leading jets.
std::vector< Int_t > SortTracksPt(AliVEvent *event) const