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