AliPhysics  8bb951a (8bb951a)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalJetCDFUE.cxx
Go to the documentation of this file.
1 #include <iostream>
2 #include <fstream>
3 #include <vector>
4 #include <algorithm>
5 #include <utility>
6 #include <cmath>
7 
8 #include <Rtypes.h>
9 #include <TMath.h>
10 #include <TMathBase.h>
11 #include <TClonesArray.h>
12 #include <TH1D.h>
13 #include <TH2D.h>
14 #include <TProfile.h>
15 #include <TSeqCollection.h>
16 #include <TCollection.h>
17 #include <TList.h>
18 #include <TLorentzVector.h>
19 #include <TVector2.h>
20 #include <TAttMarker.h>
21 
22 #include <AliVCluster.h>
23 #include <AliAODCaloCluster.h>
24 #include <AliESDCaloCluster.h>
25 #include <AliVTrack.h>
26 #include <AliEmcalJet.h>
27 #include <AliVEvent.h>
28 #include "AliRhoParameter.h"
29 #include "AliLog.h"
30 #include "AliJetContainer.h"
31 #include "AliParticleContainer.h"
32 #include "AliClusterContainer.h"
33 #include "AliPicoTrack.h"
34 #include "AliVEvent.h"
35 #include "AliVParticle.h"
36 #include "AliLog.h"
37 
39 
40 using namespace std;
41 
45 
46 //________________________________________________________________________
48  : AliAnalysisTaskEmcalJet ( "AliAnalysisTaskEmcalJetCDFUE", kTRUE ),
49  fH21 ( NULL ),
50  fH21Toward ( NULL ),
51  fH21Transverse_min ( NULL ),
52  fH21Transverse_max ( NULL ),
53  fH21Away ( NULL ),
54  fH21_bin ( NULL ),
55  fH21Toward_bin ( NULL ),
56  fH21Transverse_min_bin ( NULL ),
57  fH21Transverse_max_bin ( NULL ),
58  fH21Away_bin ( NULL ),
59  fH21_bin_wojet1 ( NULL ),
60  fH21Toward_bin_wojet1 ( NULL ),
61  fH21Transverse_min_bin_wojet1 ( NULL ),
62  fH21Transverse_max_bin_wojet1 ( NULL ),
63  fH21Away_bin_wojet1 ( NULL ),
64  fH22 ( NULL ),
65  fH22Toward ( NULL ),
66  fH22Transverse_min ( NULL ),
67  fH22Transverse_max ( NULL ),
68  fH22Away ( NULL ),
69  fH22_bin ( NULL ),
70  fH22Toward_bin ( NULL ),
71  fH22Transverse_min_bin ( NULL ),
72  fH22Transverse_max_bin ( NULL ),
73  fH22Away_bin ( NULL ),
74  fH22_bin_wojet1 ( NULL ),
75  fH22Toward_bin_wojet1 ( NULL ),
76  fH22Transverse_min_bin_wojet1 ( NULL ),
77  fH22Transverse_max_bin_wojet1 ( NULL ),
78  fH22Away_bin_wojet1 ( NULL ),
79  fH23 ( NULL ),
80  fH23Toward ( NULL ),
81  fH23Transverse_min ( NULL ),
82  fH23Transverse_max ( NULL ),
83  fH23Away ( NULL ),
84  fH40 ( NULL ),
85  fH40toward ( NULL ),
86  fH40away ( NULL ),
87  fH40transmin ( NULL ),
88  fH40transmax ( NULL ),
89  fH40_bin ( NULL ),
90  fH40toward_bin ( NULL ),
91  fH40away_bin ( NULL ),
92  fH40transmin_bin ( NULL ),
93  fH40transmax_bin ( NULL ),
94  fH41 ( NULL ),
95  fH41toward ( NULL ),
96  fH41away ( NULL ),
97  fH41transmin ( NULL ),
98  fH41transmax ( NULL ),
99  fH41_bin ( NULL ),
100  fH41toward_bin ( NULL ),
101  fH41away_bin ( NULL ),
102  fH41transmin_bin ( NULL ),
103  fH41transmax_bin ( NULL ),
104  fJetsCont ( NULL ),
105  fTracksCont ( NULL ),
106  fCaloClustersCont ( NULL ),
107  fTracksContArray ( NULL ),
108  fCaloClustContArray ( NULL ),
109  fJet1 ( NULL ),
110  fNJets_accepted ( 0 ),
111  fNaccPart ( 0 ),
112  fNaccClus ( 0 ),
113  fEvPt ( -99.99 ),
114  fJet1_sorted_idxvec(),
115  fEvent_sorted_idxvec()
116  {
117  // Default constructor.
118  fDebug = AliLog::GetGlobalDebugLevel();
119  // SetMakeGeneralHistograms ( kTRUE );
120  }
121 
122 //________________________________________________________________________
124  : AliAnalysisTaskEmcalJet ( name, kTRUE ),
125  fH21 ( NULL ),
126  fH21Toward ( NULL ),
127  fH21Transverse_min ( NULL ),
128  fH21Transverse_max ( NULL ),
129  fH21Away ( NULL ),
130  fH21_bin ( NULL ),
131  fH21Toward_bin ( NULL ),
132  fH21Transverse_min_bin ( NULL ),
133  fH21Transverse_max_bin ( NULL ),
134  fH21Away_bin ( NULL ),
135  fH22 ( NULL ),
136  fH22Toward ( NULL ),
137  fH22Transverse_min ( NULL ),
138  fH22Transverse_max ( NULL ),
139  fH22Away ( NULL ),
140  fH22_bin ( NULL ),
141  fH22Toward_bin ( NULL ),
142  fH22Transverse_min_bin ( NULL ),
143  fH22Transverse_max_bin ( NULL ),
144  fH22Away_bin ( NULL ),
145  fH23 ( NULL ),
146  fH23Toward ( NULL ),
147  fH23Transverse_min ( NULL ),
148  fH23Transverse_max ( NULL ),
149  fH23Away ( NULL ),
150  fH40 ( NULL ),
151  fH40toward ( NULL ),
152  fH40away ( NULL ),
153  fH40transmin ( NULL ),
154  fH40transmax ( NULL ),
155  fH40_bin ( NULL ),
156  fH40toward_bin ( NULL ),
157  fH40away_bin ( NULL ),
158  fH40transmin_bin ( NULL ),
159  fH40transmax_bin ( NULL ),
160  fH41 ( NULL ),
161  fH41toward ( NULL ),
162  fH41away ( NULL ),
163  fH41transmin ( NULL ),
164  fH41transmax ( NULL ),
165  fH41_bin ( NULL ),
166  fH41toward_bin ( NULL ),
167  fH41away_bin ( NULL ),
168  fH41transmin_bin ( NULL ),
169  fH41transmax_bin ( NULL ),
170  fJetsCont ( NULL ),
171  fTracksCont ( NULL ),
172  fCaloClustersCont ( NULL ),
173  fTracksContArray ( NULL ),
174  fJet1 ( NULL ),
175  fNJets_accepted ( 0 ),
176  fNaccPart ( 0 ),
177  fEvPt ( -99.99 ),
178  fJet1_sorted_idxvec(),
179  fEvent_sorted_idxvec()
180  {
181  // Standard constructor.
182  fDebug = AliLog::GetGlobalDebugLevel();
183  // SetMakeGeneralHistograms ( kTRUE );
184  }
185 
186 //________________________________________________________________________
188  {
189  // Destructor.
190  }
191 
192 //________________________________________________________________________
194  {
195  Int_t idx_jet_container = 0;
196 
197  fJetsCont = GetJetContainer ( idx_jet_container );
199 
200  if ( !fJetsCont )
201  {
202  std::cout << "ERROR :: Jet Container not found!!!" << std::endl;
203  return kFALSE;
204  }
205 
206  // get particles connected to jets
208  if (fTracksCont)
209  {
211  fTracksCont->SetClassName ( "AliVTrack" );
212 
213  // get array of tracks
215 
216  // Multiplicity in event - accepted tracks in tracks container
218  }
219 
220  // get clusters connected to jets
222  if (fCaloClustersCont)
223  {
224  fCaloClustersCont->SetClassName ( "AliVCluster" );
225 
226  // get array of constituents
228 
229  // accepted clusters in cluster container
231  }
232 
233  // Number of Jets found in event - accepted cuts applied by JetContainer
235 
236  // protection
237  if ( ( fNJets_accepted < 1 ) || ( fNaccPart < 1 ) )
238  {
239  if ( fDebug > 1 )
240  {
241  std::cout << "accepted (fNJets || fNPart) == 0" << std::endl;
242  }
243  return kFALSE;
244  }
245 
246  if ( fDebug > 1 )
247  {
248  std::cout << "fNJets = " << fNJets_accepted << " ; fNPart = " << fNaccPart << std::endl;
249  }
250 
251 
252  //___________________________________________
253  // jet1 : Sorting by p_T jet constituents
254  //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
257 
258  //__________________________________________________________________
259  // sorting the EVENT _ACCEPTED_ tracks by pt
261 
262  // Run analysis code here, if needed. It will be executed before FillHistograms().
263  return kTRUE; // If return kFALSE FillHistogram() will NOT be executed.
264  }
265 
266 //________________________________________________________________________
268  {
269  // consts used in analysis
270  Double_t const kPI_3 = TMath::Pi() / 3.;
271  Double_t const k2PI_3 = 2 * kPI_3;
272 
273  Double_t jet1_pt = fJet1->Pt();
274  UInt_t jet1_npart = fJet1->GetNumberOfTracks();
275 
276  AliVParticle *jet1_trklead = fJet1->GetLeadingTrack ( fTracks );
277  Double_t jet1_ptmax = jet1_trklead->Pt();
278 
279  Int_t counter_part = 0;
280  Double_t counter_pt = 0.;
281  Int_t track_idx = -999; // index variable for tracks
282  TArrayI jet1_idx_list ( jet1_npart ); // TArrayI of indexes of tracks from leading jet
283 
284  //___________________________________________________________________________
285  AliVParticle *track = NULL;
286 
287  // reset counter for new usage
288  counter_part = 0;
289  counter_pt = 0.;
290  track_idx = -999;
291 
292  // parsing accepted tracks in EVENT in decreasing order of Pt //
293  for ( Size_t i = 0; i < fNaccPart; i++ ) // replace the index order by the sorted array
294  {
295  track_idx = fEvent_sorted_idxvec.at ( i );
296  track = fTracksCont->GetAcceptParticle ( track_idx );
297 
298  if ( !track )
299  {
300  std::cout << "track not retrieved from fTracksCont" << std::endl;
301  continue;
302  }
303 
304  // pt of the current track
305  Double_t track_pt = track->Pt();
306 
307  // dphi between leading track (max pt track from leading jet) and current track - dphi to (-pi,pi)
308  Double_t dphi_part = TVector2::Phi_mpi_pi ( track->Phi() - jet1_trklead->Phi() );
309 // Double_t dphi_part_absdeg = TMath::RadToDeg() * TMath::Abs ( dphi_part );
310 
311  // dphi between leading jet and current track - dphi to (-pi,pi)
312  Double_t dphi_part_jet1 = TVector2::Phi_mpi_pi ( track->Phi() - fJet1->Phi() );
313 // Double_t dphi_part_jet1_absdeg = TMath::RadToDeg() * TMath::Abs ( dphi_part_jet1 );
314 
315  ++counter_part; // next particle
316  counter_pt += track_pt; // next particle pt
317 
318  fH23->Fill ( track_pt ); // Pt Distribution of particles in event
319 
320  // dphi track to jet1 distribution (total and per toward,away,transverse regions)
321  fH21->Fill ( jet1_pt, counter_part ); // N (in the event - including jet1) vs P_{T}(jet1)
322  fH21_bin->Fill ( jet1_pt ); // N (in the event - including jet1) vs P_{T}(jet1)
323 
324  fH22->Fill ( jet1_pt, counter_pt ); // PT_{sum}(in the event - including jet1) vs P_{T}(jet1)
325  fH22_bin->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - including jet1) vs P_{T}(jet1)
326 
327  if ( ( dphi_part_jet1 > ( -1 ) * kPI_3 ) && ( dphi_part_jet1 < kPI_3 ) )
328  {
329  fH21Toward->Fill ( jet1_pt, counter_part ); // N (in the event - including jet1) vs p_{T}(jet1)
330  fH21Toward_bin->Fill ( jet1_pt ); // N (in the event - including jet1) vs p_{T}(jet1)
331 
332  fH22Toward->Fill ( jet1_pt, counter_pt ); // PT_{sum}(in the event - including jet1) vs p_{T}(jet1)
333  fH22Toward_bin->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - including jet1) vs p_{T}(jet1)
334 
335  fH23Toward->Fill ( track_pt ); // Pt Distribution of particles
336  }
337  else if ( ( dphi_part_jet1 <= ( -1 ) * kPI_3 ) && ( dphi_part_jet1 > ( -1 ) * k2PI_3 ) )
338  {
339  fH21Transverse_min->Fill ( jet1_pt, counter_part ); // N (in the event - including jet1) vs p_{T}(jet1)
340  fH21Transverse_min_bin->Fill ( jet1_pt ); // N (in the event - including jet1) vs p_{T}(jet1)
341 
342  fH22Transverse_min->Fill ( jet1_pt, counter_pt ); // PT_{sum}(in the event - including jet1) vs p_{T}(jet1)
343  fH22Transverse_min_bin->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - including jet1) vs p_{T}(jet1)
344 
345  fH23Transverse_min->Fill ( track_pt ); // Pt Distribution of particles
346  }
347  else if ( ( dphi_part_jet1 >= kPI_3 ) && ( dphi_part_jet1 < k2PI_3 ) )
348  {
349  fH21Transverse_max->Fill ( jet1_pt, counter_part ); // N (in the event - including jet1) vs p_{T}(jet1)
350  fH21Transverse_max_bin->Fill ( jet1_pt ); // N (in the event - including jet1) vs p_{T}(jet1)
351 
352  fH22Transverse_max->Fill ( jet1_pt, counter_pt ); // PT_{sum}(in the event - including jet1) vs p_{T}(jet1)
353  fH22Transverse_max_bin->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - including jet1) vs p_{T}(jet1)
354 
355  fH23Transverse_max->Fill ( track_pt ); // Pt Distribution of particles
356  }
357  else if ( ( dphi_part_jet1 >= k2PI_3 ) || ( dphi_part_jet1 <= ( -1 ) * k2PI_3 ) )
358  {
359  fH21Away->Fill ( jet1_pt, counter_part ); // N (in the event - including jet1) vs P_{T}(jet1)
360  fH21Away_bin->Fill ( jet1_pt ); // N (in the event - including jet1) vs P_{T}(jet1)
361 
362  fH22Away->Fill ( jet1_pt, counter_pt ); // PT_{sum}(in the event - including jet1) vs P_{T}(jet1)
363  fH22Away_bin->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - including jet1) vs P_{T}(jet1)
364 
365  fH23Away->Fill ( track_pt ); // Pt Distribution of particles
366  }
367 
368 
369  // NEW UE histos
370  // dphi track to leading track distribution (total and per toward,away,transverse regions)
371  fH40->Fill ( jet1_ptmax, counter_part ); // total particles fNPart w.r.t PTmax (pt of leading particle from leading jet)
372  fH40_bin->Fill ( jet1_ptmax ); // total particles fNPart w.r.t PTmax (pt of leading particle from leading jet)
373 
374  fH41->Fill ( jet1_ptmax, counter_pt ); // PTsum w.r.t PTmax
375  fH41_bin->Fill ( jet1_ptmax, track_pt ); // PTsum w.r.t PTmax
376  if ( ( dphi_part > ( -1 ) * kPI_3 ) && ( dphi_part < kPI_3 ) )
377  {
378  fH40toward->Fill ( jet1_ptmax, counter_part );
379  fH41toward->Fill ( jet1_ptmax, counter_pt );
380 
381  fH40toward_bin->Fill ( jet1_ptmax );
382  fH41toward_bin->Fill ( jet1_ptmax, track_pt );
383  }
384  else if ( ( dphi_part <= ( -1 ) * kPI_3 ) && ( dphi_part > ( -1 ) * k2PI_3 ) )
385  {
386  fH40transmin->Fill ( jet1_ptmax, counter_part );
387  fH41transmin->Fill ( jet1_ptmax, counter_pt );
388 
389  fH40transmin_bin->Fill ( jet1_ptmax );
390  fH41transmin_bin->Fill ( jet1_ptmax, track_pt );
391  }
392  else if ( ( dphi_part >= kPI_3 ) && ( dphi_part < k2PI_3 ) )
393  {
394  fH40transmax->Fill ( jet1_ptmax, counter_part );
395  fH41transmax->Fill ( jet1_ptmax, counter_pt );
396 
397  fH40transmax_bin->Fill ( jet1_ptmax );
398  fH41transmax_bin->Fill ( jet1_ptmax, track_pt );
399  }
400  else if ( ( dphi_part >= k2PI_3 ) || ( dphi_part <= ( -1 ) * k2PI_3 ) )
401  {
402  fH40away->Fill ( jet1_ptmax, counter_part );
403  fH41away->Fill ( jet1_ptmax, counter_pt );
404 
405  fH40away_bin->Fill ( jet1_ptmax );
406  fH41away_bin->Fill ( jet1_ptmax, track_pt );
407  }
408 
409 
410  // Condition if track is NOT in leading jet
411  if ( !IdxInArray ( track_idx, jet1_idx_list ) )
412  {
413  fH21_bin_wojet1->Fill ( jet1_pt ); // N (in the event - excluding jet1) vs P_{T}(jet1)
414  fH22_bin_wojet1->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - excluding jet1) vs P_{T}(jet1)
415 
416  if ( ( dphi_part_jet1 > ( -1 ) * kPI_3 ) && ( dphi_part_jet1 < kPI_3 ) )
417  {
418  fH21Toward_bin_wojet1->Fill ( jet1_pt ); // N (in the event - excluding jet1) vs P_{T}(jet1)
419  fH22Toward_bin_wojet1->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - excluding jet1) vs P_{T}(jet1)
420  }
421  else if ( ( dphi_part_jet1 <= ( -1 ) * kPI_3 ) && ( dphi_part_jet1 > ( -1 ) * k2PI_3 ) )
422  {
423  fH21Transverse_min_bin_wojet1->Fill ( jet1_pt ); // N (in the event - excluding jet1) vs P_{T}(jet1)
424  fH22Transverse_min_bin_wojet1->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - excluding jet1) vs P_{T}(jet1)
425  }
426  else if ( ( dphi_part_jet1 >= kPI_3 ) && ( dphi_part_jet1 < k2PI_3 ) )
427  {
428  fH21Transverse_max_bin_wojet1->Fill ( jet1_pt ); // N (in the event - excluding jet1) vs P_{T}(jet1)
429  fH22Transverse_max_bin_wojet1->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - excluding jet1) vs P_{T}(jet1)
430  }
431  else if ( ( dphi_part_jet1 >= k2PI_3 ) || ( dphi_part_jet1 <= ( -1 ) * k2PI_3 ) )
432  {
433  fH21Away_bin_wojet1->Fill ( jet1_pt ); // N (in the event - excluding jet1) vs P_{T}(jet1)
434  fH22Away_bin_wojet1->Fill ( jet1_pt, track_pt ); // PT_{sum}(in the event - excluding jet1) vs P_{T}(jet1)
435  }
436  }
437 
438  }
439 
440  track = NULL;
441 
442  // post data at every processing
443  PostData ( 1, fOutput ); // Post data for ALL output slots > 0 here.
444  return kTRUE;
445  }
446 
447 //________________________________________________________________________
449  {
450  // Create user output.
451 
453 
454  // Histograms
455  fOutput->SetOwner ( kTRUE );
456 
457  // Create the list of histograms. Only the list is owned.
458 
459 
460  //____________________________________________________________________________________
461  fH21 = new TProfile ( "histo21", "N(in the event - including jet1) vs P_{T}(jet1)", 200, 0., 200. );
462  fH21->SetStats ( kTRUE );
463  fH21->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
464  fH21->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
465  fH21->GetXaxis()->SetTitleColor ( 1 );
466  fH21->SetMarkerStyle ( kFullCircle );
467  fOutput->Add ( fH21 );
468 
469  fH21Toward =
470  new TProfile ( "histo21_toward", "N(in the event - including jet1) vs P_{T}(jet1) - toward", 200, 0., 200. );
471  fH21Toward->SetStats ( kTRUE );
472  fH21Toward->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
473  fH21Toward->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
474  fH21Toward->GetXaxis()->SetTitleColor ( 1 );
475  fH21Toward->SetMarkerStyle ( kFullCircle );
476  fOutput->Add ( fH21Toward );
477 
478  fH21Transverse_min = new TProfile ( "histo21_transverse_min",
479  "N(in the event - including jet1) vs P_{T}(jet1) - transverse MIN", 200, 0., 200. );
480  fH21Transverse_min->SetStats ( kTRUE );
481  fH21Transverse_min->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
482  fH21Transverse_min->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
483  fH21Transverse_min->GetXaxis()->SetTitleColor ( 1 );
484  fH21Transverse_min->SetMarkerStyle ( kFullCircle );
485  fOutput->Add ( fH21Transverse_min );
486 
487  fH21Transverse_max = new TProfile ( "histo21_transverse_max",
488  "N(in the event - including jet1) vs P_{T}(jet1) - transverse MAX", 200, 0., 200. );
489  fH21Transverse_max->SetStats ( kTRUE );
490  fH21Transverse_max->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
491  fH21Transverse_max->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
492  fH21Transverse_max->GetXaxis()->SetTitleColor ( 1 );
493  fH21Transverse_max->SetMarkerStyle ( kFullCircle );
494  fOutput->Add ( fH21Transverse_max );
495 
496  fH21Away = new TProfile ( "histo21_away", "N(in the event - including jet1) vs P_{T}(jet1) - away", 200, 0., 200. );
497  fH21Away->SetStats ( kTRUE );
498  fH21Away->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
499  fH21Away->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
500  fH21Away->GetXaxis()->SetTitleColor ( 1 );
501  fH21Away->SetMarkerStyle ( kFullCircle );
502  fOutput->Add ( fH21Away );
503 
504  //____________________________________________________________________________________
505  fH21_bin = new TH1D ( "histo21_bin", "N(in the event - including jet1) vs P_{T}(jet1)", 200, 0., 200. );
506  fH21_bin->SetStats ( kTRUE );
507  fH21_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
508  fH21_bin->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
509  fH21_bin->GetXaxis()->SetTitleColor ( 1 );
510  fH21_bin->SetMarkerStyle ( kFullCircle );
511  fOutput->Add ( fH21_bin );
512 
514  new TH1D ( "histo21_toward_bin", "N(in the event - including jet1) vs P_{T}(jet1) - toward", 200, 0., 200. );
515  fH21Toward_bin->SetStats ( kTRUE );
516  fH21Toward_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
517  fH21Toward_bin->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
518  fH21Toward_bin->GetXaxis()->SetTitleColor ( 1 );
519  fH21Toward_bin->SetMarkerStyle ( kFullCircle );
520  fOutput->Add ( fH21Toward_bin );
521 
522  fH21Transverse_min_bin = new TH1D ( "histo21_transverse_min_bin",
523  "N(in the event - including jet1) vs P_{T}(jet1) - transverse MIN", 200, 0., 200. );
524  fH21Transverse_min_bin->SetStats ( kTRUE );
525  fH21Transverse_min_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
526  fH21Transverse_min_bin->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
527  fH21Transverse_min_bin->GetXaxis()->SetTitleColor ( 1 );
528  fH21Transverse_min_bin->SetMarkerStyle ( kFullCircle );
530 
531  fH21Transverse_max_bin = new TH1D ( "histo21_transverse_max_bin",
532  "N(in the event - including jet1) vs P_{T}(jet1) - transverse MAX", 200, 0., 200. );
533  fH21Transverse_max_bin->SetStats ( kTRUE );
534  fH21Transverse_max_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
535  fH21Transverse_max_bin->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
536  fH21Transverse_max_bin->GetXaxis()->SetTitleColor ( 1 );
537  fH21Transverse_max_bin->SetMarkerStyle ( kFullCircle );
539 
540  fH21Away_bin = new TH1D ( "histo21_away_bin", "N(in the event - including jet1) vs P_{T}(jet1) - away", 200, 0., 200. );
541  fH21Away_bin->SetStats ( kTRUE );
542  fH21Away_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
543  fH21Away_bin->GetYaxis()->SetTitle ( "<N(in the event - including jet1)> in 1 GeV/c bin" );
544  fH21Away_bin->GetXaxis()->SetTitleColor ( 1 );
545  fH21Away_bin->SetMarkerStyle ( kFullCircle );
546  fOutput->Add ( fH21Away_bin );
547 
548  //____________________________________________________________________________________
549  fH21_bin_wojet1 = new TH1D ( "histo21_bin_wojet1", "N(in the event - without jet1) vs P_{T}(jet1)", 200, 0., 200. );
550  fH21_bin_wojet1->SetStats ( kTRUE );
551  fH21_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
552  fH21_bin_wojet1->GetYaxis()->SetTitle ( "<N(in the event - without jet1)> in 1 GeV/c bin" );
553  fH21_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
554  fH21_bin_wojet1->SetMarkerStyle ( kFullCircle );
555  fOutput->Add ( fH21_bin_wojet1 );
556 
558  new TH1D ( "histo21_toward_bin_wojet1", "N(in the event - without jet1) vs P_{T}(jet1) - toward", 200, 0., 200. );
559  fH21Toward_bin_wojet1->SetStats ( kTRUE );
560  fH21Toward_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
561  fH21Toward_bin_wojet1->GetYaxis()->SetTitle ( "<N(in the event - without jet1)> in 1 GeV/c bin" );
562  fH21Toward_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
563  fH21Toward_bin_wojet1->SetMarkerStyle ( kFullCircle );
565 
567  new TH1D ( "histo21_transverse_min_bin_wojet1", "N(in the event - without jet1) vs P_{T}(jet1) - transverse MIN", 200,
568  0., 200. );
569  fH21Transverse_min_bin_wojet1->SetStats ( kTRUE );
570  fH21Transverse_min_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
571  fH21Transverse_min_bin_wojet1->GetYaxis()->SetTitle ( "<N(in the event - without jet1)> in 1 GeV/c bin" );
572  fH21Transverse_min_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
573  fH21Transverse_min_bin_wojet1->SetMarkerStyle ( kFullCircle );
575 
577  new TH1D ( "histo21_transverse_max_bin_wojet1", "N(in the event - without jet1) vs P_{T}(jet1) - transverse MAX", 200,
578  0., 200. );
579  fH21Transverse_max_bin_wojet1->SetStats ( kTRUE );
580  fH21Transverse_max_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
581  fH21Transverse_max_bin_wojet1->GetYaxis()->SetTitle ( "<N(in the event - without jet1)> in 1 GeV/c bin" );
582  fH21Transverse_max_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
583  fH21Transverse_max_bin_wojet1->SetMarkerStyle ( kFullCircle );
585 
587  new TH1D ( "histo21_away_bin_wojet1", "N(in the event - without jet1) vs P_{T}(jet1) - away", 200, 0., 200. );
588  fH21Away_bin_wojet1->SetStats ( kTRUE );
589  fH21Away_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
590  fH21Away_bin_wojet1->GetYaxis()->SetTitle ( "<N(in the event - without jet1)> in 1 GeV/c bin" );
591  fH21Away_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
592  fH21Away_bin_wojet1->SetMarkerStyle ( kFullCircle );
593  fOutput->Add ( fH21Away_bin_wojet1 );
594 
595  //__________________________________________________________________
596  fH22 = new TProfile ( "histo22", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1)", 200, 0., 200. );
597  fH22->SetStats ( kTRUE );
598  fH22->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
599  fH22->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
600  fH22->GetXaxis()->SetTitleColor ( 1 );
601  fH22->SetMarkerStyle ( kFullCircle );
602  fOutput->Add ( fH22 );
603 
604  fH22Toward =
605  new TProfile ( "histo22_toward", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - toward", 200, 0., 200. );
606  fH22Toward->SetStats ( kTRUE );
607  fH22Toward->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
608  fH22Toward->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
609  fH22Toward->GetXaxis()->SetTitleColor ( 1 );
610  fH22Toward->SetMarkerStyle ( kFullCircle );
611  fOutput->Add ( fH22Toward );
612 
613  fH22Transverse_min = new TProfile (
614  "histo22_transverse_min", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - transverse MIN", 200, 0., 200. );
615  fH22Transverse_min->SetStats ( kTRUE );
616  fH22Transverse_min->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
617  fH22Transverse_min->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
618  fH22Transverse_min->GetXaxis()->SetTitleColor ( 1 );
619  fH22Transverse_min->SetMarkerStyle ( kFullCircle );
620  fOutput->Add ( fH22Transverse_min );
621 
622  fH22Transverse_max = new TProfile (
623  "histo22_transverse_max", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - transverse MAX", 200, 0., 200. );
624  fH22Transverse_max->SetStats ( kTRUE );
625  fH22Transverse_max->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
626  fH22Transverse_max->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
627  fH22Transverse_max->GetXaxis()->SetTitleColor ( 1 );
628  fH22Transverse_max->SetMarkerStyle ( kFullCircle );
629  fOutput->Add ( fH22Transverse_max );
630 
631  fH22Away =
632  new TProfile ( "histo22_away", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - away", 200, 0., 200. );
633  fH22Away->SetStats ( kTRUE );
634  fH22Away->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
635  fH22Away->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
636  fH22Away->GetXaxis()->SetTitleColor ( 1 );
637  fH22Away->SetMarkerStyle ( kFullCircle );
638  fOutput->Add ( fH22Away );
639 
640  //__________________________________________________________________
641  fH22_bin = new TH1D ( "histo22_bin", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1)", 200, 0., 200. );
642  fH22_bin->SetStats ( kTRUE );
643  fH22_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
644  fH22_bin->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
645  fH22_bin->GetXaxis()->SetTitleColor ( 1 );
646  fH22_bin->SetMarkerStyle ( kFullCircle );
647  fOutput->Add ( fH22_bin );
648 
650  new TH1D ( "histo22_toward_bin", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - toward", 200, 0., 200. );
651  fH22Toward_bin->SetStats ( kTRUE );
652  fH22Toward_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
653  fH22Toward_bin->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
654  fH22Toward_bin->GetXaxis()->SetTitleColor ( 1 );
655  fH22Toward_bin->SetMarkerStyle ( kFullCircle );
656  fOutput->Add ( fH22Toward_bin );
657 
659  new TH1D ( "histo22_transverse_min_bin", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - transverse MIN",
660  200, 0., 200. );
661  fH22Transverse_min_bin->SetStats ( kTRUE );
662  fH22Transverse_min_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
663  fH22Transverse_min_bin->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
664  fH22Transverse_min_bin->GetXaxis()->SetTitleColor ( 1 );
665  fH22Transverse_min_bin->SetMarkerStyle ( kFullCircle );
667 
669  new TH1D ( "histo22_transverse_max_bin", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - transverse MAX",
670  200, 0., 200. );
671  fH22Transverse_max_bin->SetStats ( kTRUE );
672  fH22Transverse_max_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
673  fH22Transverse_max_bin->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
674  fH22Transverse_max_bin->GetXaxis()->SetTitleColor ( 1 );
675  fH22Transverse_max_bin->SetMarkerStyle ( kFullCircle );
677 
678  fH22Away_bin =
679  new TH1D ( "histo22_away_bin", "PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - away", 200, 0., 200. );
680  fH22Away_bin->SetStats ( kTRUE );
681  fH22Away_bin->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
682  fH22Away_bin->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - including jet1)> in 1 GeV/c bin" );
683  fH22Away_bin->GetXaxis()->SetTitleColor ( 1 );
684  fH22Away_bin->SetMarkerStyle ( kFullCircle );
685  fOutput->Add ( fH22Away_bin );
686 
687  //__________________________________________________________________
689  new TH1D ( "histo22_bin_wojet1", "PT_{sum}(in the event - without jet1) vs P_{T}(jet1)", 200, 0., 200. );
690  fH22_bin_wojet1->SetStats ( kTRUE );
691  fH22_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
692  fH22_bin_wojet1->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - without jet1)> in 1 GeV/c bin" );
693  fH22_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
694  fH22_bin_wojet1->SetMarkerStyle ( kFullCircle );
695  fOutput->Add ( fH22_bin_wojet1 );
696 
697  fH22Toward_bin_wojet1 = new TH1D ( "histo22_toward_bin_wojet1",
698  "PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - toward", 200, 0., 200. );
699  fH22Toward_bin_wojet1->SetStats ( kTRUE );
700  fH22Toward_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
701  fH22Toward_bin_wojet1->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - without jet1)> in 1 GeV/c bin" );
702  fH22Toward_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
703  fH22Toward_bin_wojet1->SetMarkerStyle ( kFullCircle );
705 
707  new TH1D ( "histo22_transverse_min_bin_wojet1",
708  "PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - transverse MIN", 200, 0., 200. );
709  fH22Transverse_min_bin_wojet1->SetStats ( kTRUE );
710  fH22Transverse_min_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
711  fH22Transverse_min_bin_wojet1->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - without jet1)> in 1 GeV/c bin" );
712  fH22Transverse_min_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
713  fH22Transverse_min_bin_wojet1->SetMarkerStyle ( kFullCircle );
715 
717  new TH1D ( "histo22_transverse_max_bin_wojet1",
718  "PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - transverse MAX", 200, 0., 200. );
719  fH22Transverse_max_bin_wojet1->SetStats ( kTRUE );
720  fH22Transverse_max_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
721  fH22Transverse_max_bin_wojet1->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - without jet1)> in 1 GeV/c bin" );
722  fH22Transverse_max_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
723  fH22Transverse_max_bin_wojet1->SetMarkerStyle ( kFullCircle );
725 
727  new TH1D ( "histo22_away_bin_wojet1", "PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - away", 200, 0., 200. );
728  fH22Away_bin_wojet1->SetStats ( kTRUE );
729  fH22Away_bin_wojet1->GetXaxis()->SetTitle ( "p_{T}(jet1) (GeV/c)" );
730  fH22Away_bin_wojet1->GetYaxis()->SetTitle ( "<PT_{sum}(in the event - without jet1)> in 1 GeV/c bin" );
731  fH22Away_bin_wojet1->GetXaxis()->SetTitleColor ( 1 );
732  fH22Away_bin_wojet1->SetMarkerStyle ( kFullCircle );
733  fOutput->Add ( fH22Away_bin_wojet1 );
734 
735  //____________________________________________________________________________________
736  fH23 = new TH1D ( "histo23", "Pt Distribution of particles", 1500, 0., 1500. );
737  fH23->SetStats ( kTRUE );
738  fH23->GetXaxis()->SetTitle ( "p_{T} (GeV/c)" );
739  fH23->GetYaxis()->SetTitle ( "dN/dP_{T} (1/GeV/c)" );
740  fH23->GetXaxis()->SetTitleColor ( 1 );
741  fH23->SetMarkerStyle ( kFullCircle );
742  fOutput->Add ( fH23 );
743 
744  fH23Toward = new TH1D ( "histo23_toward", "'Toward' Pt Distribution of particles", 1500, 0., 1500. );
745  fH23Toward->SetStats ( kTRUE );
746  fH23Toward->GetXaxis()->SetTitle ( "p_{T} (GeV/c)" );
747  fH23Toward->GetYaxis()->SetTitle ( "dN/dP_{T} (1/GeV/c)" );
748  fH23Toward->GetXaxis()->SetTitleColor ( 1 );
749  fH23Toward->SetMarkerStyle ( kFullCircle );
750  fOutput->Add ( fH23Toward );
751 
753  new TH1D ( "histo23_transverse_min", "Pt Distribution of particles - Transverse MIN", 1500, 0., 1500. );
754  fH23Transverse_min->SetStats ( kTRUE );
755  fH23Transverse_min->GetXaxis()->SetTitle ( "p_{T} (GeV/c)" );
756  fH23Transverse_min->GetYaxis()->SetTitle ( "dN/dP_{T} (1/GeV/c)" );
757  fH23Transverse_min->GetXaxis()->SetTitleColor ( 1 );
758  fH23Transverse_min->SetMarkerStyle ( kFullCircle );
759  fOutput->Add ( fH23Transverse_min );
760 
762  new TH1D ( "histo23_transverse_max", "Pt Distribution of particles - Transverse MAX", 1500, 0., 1500. );
763  fH23Transverse_max->SetStats ( kTRUE );
764  fH23Transverse_max->GetXaxis()->SetTitle ( "p_{T} (GeV/c)" );
765  fH23Transverse_max->GetYaxis()->SetTitle ( "dN/dP_{T} (1/GeV/c)" );
766  fH23Transverse_max->GetXaxis()->SetTitleColor ( 1 );
767  fH23Transverse_max->SetMarkerStyle ( kFullCircle );
768  fOutput->Add ( fH23Transverse_max );
769 
770  fH23Away = new TH1D ( "histo23_away", "'Away' Pt Distribution of particles", 1500, 0., 1500. );
771  fH23Away->SetStats ( kTRUE );
772  fH23Away->GetXaxis()->SetTitle ( "p_{T} (GeV/c)" );
773  fH23Away->GetYaxis()->SetTitle ( "dN/dP_{T} (1/GeV/c)" );
774  fH23Away->GetXaxis()->SetTitleColor ( 1 );
775  fH23Away->SetMarkerStyle ( kFullCircle );
776  fOutput->Add ( fH23Away );
777 
778  //____________________________________________________________________________________
779  Int_t h40_nbin = 200;
780  Double_t h40_binwidth = 1.;
781  Double_t h40_low = 0.;
782  Double_t h40_high = h40_low + h40_binwidth * h40_nbin;
783  fH40 = new TProfile ( "histo40", "total particles fNPart w.r.t PTmax (pt of leading particle from jet1)", h40_nbin,
784  h40_low, h40_high );
785  fH40->SetStats ( kTRUE );
786  fH40->GetXaxis()->SetTitle ( "PTmax" );
787  fH40->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
788  fH40->GetXaxis()->SetTitleColor ( 1 );
789  fH40->SetMarkerStyle ( kFullCircle );
790  fOutput->Add ( fH40 );
791 
792  fH40toward = new TProfile ( "histo40toward", "total particles fNPart w.r.t PTmax (pt of "
793  "leading particle from jet1) - TOWARD",
794  h40_nbin, h40_low, h40_high );
795  fH40toward->SetStats ( kTRUE );
796  fH40toward->GetXaxis()->SetTitle ( "PTmax" );
797  fH40toward->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
798  fH40toward->GetXaxis()->SetTitleColor ( 1 );
799  fH40toward->SetMarkerStyle ( kFullCircle );
800  fOutput->Add ( fH40toward );
801 
802  fH40away = new TProfile ( "histo40away", "total particles fNPart w.r.t PTmax (pt of "
803  "leading particle from jet1) - AWAY",
804  h40_nbin, h40_low, h40_high );
805  fH40away->SetStats ( kTRUE );
806  fH40away->GetXaxis()->SetTitle ( "PTmax" );
807  fH40away->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
808  fH40away->GetXaxis()->SetTitleColor ( 1 );
809  fH40away->SetMarkerStyle ( kFullCircle );
810  fOutput->Add ( fH40away );
811 
812  fH40transmin = new TProfile ( "histo40transmin", "total particles fNPart w.r.t PTmax (pt of "
813  "leading particle from jet1) - TRANSMIN",
814  h40_nbin, h40_low, h40_high );
815  fH40transmin->SetStats ( kTRUE );
816  fH40transmin->GetXaxis()->SetTitle ( "PTmax" );
817  fH40transmin->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
818  fH40transmin->GetXaxis()->SetTitleColor ( 1 );
819  fH40transmin->SetMarkerStyle ( kFullCircle );
820  fOutput->Add ( fH40transmin );
821 
822  fH40transmax = new TProfile ( "histo40transmax", "total particles fNPart w.r.t PTmax (pt of "
823  "leading particle from jet1) - TRANSMAX",
824  h40_nbin, h40_low, h40_high );
825  fH40transmax->SetStats ( kTRUE );
826  fH40transmax->GetXaxis()->SetTitle ( "PTmax" );
827  fH40transmax->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
828  fH40transmax->GetXaxis()->SetTitleColor ( 1 );
829  fH40transmax->SetMarkerStyle ( kFullCircle );
830  fOutput->Add ( fH40transmax );
831 
832  //____________________________________________________________________________________
833  fH40_bin = new TH1D ( "histo40_bin", "total particles fNPart w.r.t PTmax (pt of leading particle from jet1)", h40_nbin,
834  h40_low, h40_high );
835  fH40_bin->SetStats ( kTRUE );
836  fH40_bin->GetXaxis()->SetTitle ( "PTmax" );
837  fH40_bin->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
838  fH40_bin->GetXaxis()->SetTitleColor ( 1 );
839  fH40_bin->SetMarkerStyle ( kFullCircle );
840  fOutput->Add ( fH40_bin );
841 
842  fH40toward_bin = new TH1D ( "histo40toward_bin", "total particles fNPart w.r.t PTmax (pt of "
843  "leading particle from jet1) - TOWARD",
844  h40_nbin, h40_low, h40_high );
845  fH40toward_bin->SetStats ( kTRUE );
846  fH40toward_bin->GetXaxis()->SetTitle ( "PTmax" );
847  fH40toward_bin->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
848  fH40toward_bin->GetXaxis()->SetTitleColor ( 1 );
849  fH40toward_bin->SetMarkerStyle ( kFullCircle );
850  fOutput->Add ( fH40toward_bin );
851 
852  fH40away_bin = new TH1D ( "histo40away_bin", "total particles fNPart w.r.t PTmax (pt of "
853  "leading particle from jet1) - AWAY",
854  h40_nbin, h40_low, h40_high );
855  fH40away_bin->SetStats ( kTRUE );
856  fH40away_bin->GetXaxis()->SetTitle ( "PTmax" );
857  fH40away_bin->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
858  fH40away_bin->GetXaxis()->SetTitleColor ( 1 );
859  fH40away_bin->SetMarkerStyle ( kFullCircle );
860  fOutput->Add ( fH40away_bin );
861 
862  fH40transmin_bin = new TH1D ( "histo40transmin_bin", "total particles fNPart w.r.t PTmax (pt of "
863  "leading particle from jet1) - TRANSMIN",
864  h40_nbin, h40_low, h40_high );
865  fH40transmin_bin->SetStats ( kTRUE );
866  fH40transmin_bin->GetXaxis()->SetTitle ( "PTmax" );
867  fH40transmin_bin->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
868  fH40transmin_bin->GetXaxis()->SetTitleColor ( 1 );
869  fH40transmin_bin->SetMarkerStyle ( kFullCircle );
870  fOutput->Add ( fH40transmin_bin );
871 
872  fH40transmax_bin = new TH1D ( "histo40transmax_bin", "total particles fNPart w.r.t PTmax (pt of "
873  "leading particle from jet1) - TRANSMAX",
874  h40_nbin, h40_low, h40_high );
875  fH40transmax_bin->SetStats ( kTRUE );
876  fH40transmax_bin->GetXaxis()->SetTitle ( "PTmax" );
877  fH40transmax_bin->GetYaxis()->SetTitle ( "<fNPart> (accepted)" );
878  fH40transmax_bin->GetXaxis()->SetTitleColor ( 1 );
879  fH40transmax_bin->SetMarkerStyle ( kFullCircle );
880  fOutput->Add ( fH40transmax_bin );
881 
882  //____________________________________________________________________________________
883  Int_t h41_nbin = 200;
884  Double_t h41_binwidth = 1.;
885  Double_t h41_low = 0.;
886  Double_t h41_high = h41_low + h41_binwidth * h41_nbin;
887  fH41 = new TProfile ( "histo41", "PTsum w.r.t PTmax (pt of leading particle from jet1)", h41_nbin, h41_low, h41_high );
888  fH41->SetStats ( kTRUE );
889  fH41->GetXaxis()->SetTitle ( "PTmax" );
890  fH41->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
891  fH41->GetXaxis()->SetTitleColor ( 1 );
892  fH41->SetMarkerStyle ( kFullCircle );
893  fOutput->Add ( fH41 );
894 
895  fH41toward = new TProfile ( "histo41toward", "PTsum w.r.t PTmax (pt of leading particle from jet1) - TOWARD", h41_nbin,
896  h41_low, h41_high );
897  fH41toward->SetStats ( kTRUE );
898  fH41toward->GetXaxis()->SetTitle ( "PTmax" );
899  fH41toward->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
900  fH41toward->GetXaxis()->SetTitleColor ( 1 );
901  fH41toward->SetMarkerStyle ( kFullCircle );
902  fOutput->Add ( fH41toward );
903 
904  fH41away = new TProfile ( "histo41away", "PTsum w.r.t PTmax (pt of leading particle from jet1) - AWAY", h41_nbin,
905  h41_low, h41_high );
906  fH41away->SetStats ( kTRUE );
907  fH41away->GetXaxis()->SetTitle ( "PTmax" );
908  fH41away->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
909  fH41away->GetXaxis()->SetTitleColor ( 1 );
910  fH41away->SetMarkerStyle ( kFullCircle );
911  fOutput->Add ( fH41away );
912 
913  fH41transmin = new TProfile ( "histo41transmin", "PTsum w.r.t PTmax (pt of leading particle from jet1) - TRANSMIN",
914  h41_nbin, h41_low, h41_high );
915  fH41transmin->SetStats ( kTRUE );
916  fH41transmin->GetXaxis()->SetTitle ( "PTmax" );
917  fH41transmin->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
918  fH41transmin->GetXaxis()->SetTitleColor ( 1 );
919  fH41transmin->SetMarkerStyle ( kFullCircle );
920  fOutput->Add ( fH41transmin );
921 
922  fH41transmax = new TProfile ( "histo41transmax", "PTsum w.r.t PTmax (pt of leading particle from jet1) - TRANSMAX",
923  h41_nbin, h41_low, h41_high );
924  fH41transmax->SetStats ( kTRUE );
925  fH41transmax->GetXaxis()->SetTitle ( "PTmax" );
926  fH41transmax->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
927  fH41transmax->GetXaxis()->SetTitleColor ( 1 );
928  fH41transmax->SetMarkerStyle ( kFullCircle );
929  fOutput->Add ( fH41transmax );
930 
931  //____________________________________________________________________________________
932  fH41_bin =
933  new TH1D ( "histo41_bin", "PTsum w.r.t PTmax (pt of leading particle from jet1)", h41_nbin, h41_low, h41_high );
934  fH41_bin->SetStats ( kTRUE );
935  fH41_bin->GetXaxis()->SetTitle ( "PTmax" );
936  fH41_bin->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
937  fH41_bin->GetXaxis()->SetTitleColor ( 1 );
938  fH41_bin->SetMarkerStyle ( kFullCircle );
939  fOutput->Add ( fH41_bin );
940 
941  fH41toward_bin = new TH1D ( "histo41toward_bin", "PTsum w.r.t PTmax (pt of leading particle from jet1) - TOWARD",
942  h41_nbin, h41_low, h41_high );
943  fH41toward_bin->SetStats ( kTRUE );
944  fH41toward_bin->GetXaxis()->SetTitle ( "PTmax" );
945  fH41toward_bin->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
946  fH41toward_bin->GetXaxis()->SetTitleColor ( 1 );
947  fH41toward_bin->SetMarkerStyle ( kFullCircle );
948  fOutput->Add ( fH41toward_bin );
949 
950  fH41away_bin = new TH1D ( "histo41away_bin", "PTsum w.r.t PTmax (pt of leading particle from jet1) - AWAY", h41_nbin,
951  h41_low, h41_high );
952  fH41away_bin->SetStats ( kTRUE );
953  fH41away_bin->GetXaxis()->SetTitle ( "PTmax" );
954  fH41away_bin->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
955  fH41away_bin->GetXaxis()->SetTitleColor ( 1 );
956  fH41away_bin->SetMarkerStyle ( kFullCircle );
957  fOutput->Add ( fH41away_bin );
958 
959  fH41transmin_bin = new TH1D ( "histo41transmin_bin", "PTsum w.r.t PTmax (pt of leading particle from jet1) - TRANSMIN",
960  h41_nbin, h41_low, h41_high );
961  fH41transmin_bin->SetStats ( kTRUE );
962  fH41transmin_bin->GetXaxis()->SetTitle ( "PTmax" );
963  fH41transmin_bin->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
964  fH41transmin_bin->GetXaxis()->SetTitleColor ( 1 );
965  fH41transmin_bin->SetMarkerStyle ( kFullCircle );
966  fOutput->Add ( fH41transmin_bin );
967 
968  fH41transmax_bin = new TH1D ( "histo41transmax_bin", "PTsum w.r.t PTmax (pt of leading particle from jet1) - TRANSMAX",
969  h41_nbin, h41_low, h41_high );
970  fH41transmax_bin->SetStats ( kTRUE );
971  fH41transmax_bin->GetXaxis()->SetTitle ( "PTmax" );
972  fH41transmax_bin->GetYaxis()->SetTitle ( "PTsum (GeV/c)" );
973  fH41transmax_bin->GetXaxis()->SetTitleColor ( 1 );
974  fH41transmax_bin->SetMarkerStyle ( kFullCircle );
975  fOutput->Add ( fH41transmax_bin );
976 
977  // =========== Switch on Sumw2 for all histos ===========
978  for ( Int_t i = 0; i < fOutput->GetEntries(); ++i )
979  {
980  TH1 *h1 = dynamic_cast<TH1 *> ( fOutput->At ( i ) );
981 
982  if ( h1 )
983  {
984  h1->Sumw2();
985  continue;
986  }
987 
988  TProfile *hprof1 = dynamic_cast<TProfile *> ( fOutput->At ( i ) );
989 
990  if ( hprof1 )
991  {
992  hprof1->Sumw2();
993  }
994  }
995 
996  PostData ( 1, fOutput ); // Post data for ALL output slots > 0 here.
997  }
998 
999 //________________________________________________________________________
1000 Double_t AliAnalysisTaskEmcalJetCDFUE::DeltaR ( const AliVParticle *part1, const AliVParticle *part2 )
1001  {
1002  // Helper function to calculate the distance between two jets or a jet and
1003  // particle
1004  Double_t dPhi = part1->Phi() - part2->Phi();
1005  Double_t dEta = part1->Eta() - part2->Eta();
1006  dPhi = TVector2::Phi_mpi_pi ( dPhi );
1007 
1008  return TMath::Sqrt ( dPhi * dPhi + dEta * dEta );
1009  }
1010 
1011 //__________________________________________________________________________________________________
1012 std::vector<Int_t> AliAnalysisTaskEmcalJetCDFUE::SortTracksPt ( AliVEvent *event ) const
1013  {
1014  //___________________________________________
1015  // Sorting by p_T (decreasing) event tracks
1016  //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1017  Int_t entries = event->GetNumberOfTracks();
1018 
1019  // Create vector for Pt sorting
1020  std::vector<ptidx_pair> pair_list;
1021  pair_list.reserve ( entries );
1022 
1023  for ( Int_t i_entry = 0; i_entry < entries; i_entry++ )
1024  {
1025  AliVParticle *track = event->GetTrack ( i_entry );
1026 
1027  if ( !track )
1028  {
1029  AliError ( Form ( "Unable to find track %d in collection %s", i_entry, event->GetName() ) );
1030  continue;
1031  }
1032 
1033  pair_list.push_back ( std::make_pair ( track->Pt(), i_entry ) );
1034  }
1035 
1036  std::stable_sort ( pair_list.begin(), pair_list.end(), sort_descend() );
1037 
1038  // return an vector of indexes of constituents (sorted descending by pt)
1039  std::vector<Int_t> index_sorted_list;
1040  index_sorted_list.reserve ( entries );
1041 
1042  for ( std::vector< std::pair <Double_t, Int_t> >::iterator it = pair_list.begin(); it != pair_list.end(); ++it )
1043  {
1044  index_sorted_list.push_back ( ( *it ).second );
1045  } // populating the return object with indexes of sorted tracks
1046 
1047  return index_sorted_list;
1048  }
1049 
1050 //__________________________________________________________________________________________________
1052  {
1053  //___________________________________________
1054  // Sorting by p_T (decreasing) event tracks
1055  //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1056  Int_t entries = trackscont->GetNAcceptedParticles();
1057 
1058  // Create vector for Pt sorting
1059  std::vector<ptidx_pair> pair_list;
1060  pair_list.reserve ( entries );
1061 
1062  trackscont->ResetCurrentID();
1063  for ( Int_t i_entry = 0; i_entry < entries; i_entry++ )
1064  {
1065  AliVParticle *track = trackscont->GetNextAcceptParticle ( );
1066 
1067  if ( !track )
1068  {
1069  AliError ( Form ( "Unable to find accepted track %d in collection %s", i_entry, trackscont->GetName() ) );
1070  continue;
1071  }
1072 
1073  pair_list.push_back ( std::make_pair ( track->Pt(), i_entry ) );
1074  }
1075 
1076  std::stable_sort ( pair_list.begin(), pair_list.end(), sort_descend() );
1077 
1078  // return an vector of indexes of constituents (sorted descending by pt)
1079  std::vector<Int_t> index_sorted_list;
1080  index_sorted_list.reserve ( entries );
1081 
1082  for ( std::vector< std::pair <Double_t, Int_t> >::iterator it = pair_list.begin(); it != pair_list.end(); ++it )
1083  {
1084  index_sorted_list.push_back ( ( *it ).second );
1085  } // populating the return object with indexes of sorted tracks
1086 
1087  return index_sorted_list;
1088  }
1089 
1090 //________________________________________________________________________
1091 Bool_t AliAnalysisTaskEmcalJetCDFUE::IdxInArray ( Int_t index, TArrayI &array )
1092  {
1093  for ( Size_t i = 0; i < array.GetSize(); i++ )
1094  {
1095  if ( index == array[i] ) { return kTRUE; }
1096  }
1097 
1098  return kFALSE;
1099  }
1100 
1101 //________________________________________________________________________
1103  {
1105 
1106  if ( fJetsCont && fJetsCont->GetArray() == 0 ) { fJetsCont = 0; }
1107 
1108  if ( fTracksCont && fTracksCont->GetArray() == 0 ) { fTracksCont = 0; }
1109 
1111  }
1112 
1113 //________________________________________________________________________
1115  {
1116  // Called once at the end of the analysis.
1117  // Update pointers reading them from the output slot
1118  fOutput = dynamic_cast<TList *> ( GetOutputData (0) );
1119  }
1120 
1121 // kate: indent-mode none; indent-width 2; replace-tabs on;
TH1D * fH22_bin_wojet1
! PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - per bin sum - full phi
TProfile * fH40
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - full phi ...
TH1D * fH22Toward_bin_wojet1
! PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - per bin sum - toward
TH1D * fH22Toward_bin
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - per bin sum - toward
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
virtual AliVParticle * GetNextAcceptParticle()
TProfile * fH40toward
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - toward ...
TH1D * fH21Transverse_min_bin
! N(in the event - including jet1) vs P_{T}(jet1) - per bin sum - trans min
std::vector< Int_t > fJet1_sorted_idxvec
vector of sorted indexes of particles in leading jet
TH1D * fH23Away
! 'Away' Pt Distribution of particles
TH1D * fH40transmin_bin
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - per bin sum - trans ...
TProfile * fH41away
! PTsum w.r.t PTmax - away
AliJetContainer * GetJetContainer(Int_t i=0) const
TProfile * fH21Transverse_max
! N(in the event - including jet1) vs P_{T}(jet1) - trans max
TH1D * fH23Transverse_min
! 'Transverse' MIN Pt Distribution of particles
Double_t DeltaR(const AliVParticle *part1, const AliVParticle *part2)
TH1D * fH41_bin
! PTsum w.r.t PTmax - per bin sum - full phi
TProfile * fH21Transverse_min
! N(in the event - including jet1) vs P_{T}(jet1) - trans min
Double_t Phi() const
Definition: AliEmcalJet.h:55
TH1D * fH40transmax_bin
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - per bin sum - trans ...
TProfile * fH40away
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - away ...
TH1D * fH21Transverse_max_bin
! N(in the event - including jet1) vs P_{T}(jet1) - per bin sum - trans max
TProfile * fH41toward
! PTsum w.r.t PTmax - toward
AliClusterContainer * GetClusterContainer() const
TH1D * fH23Transverse_max
! 'Transverse' MAX Pt Distribution of particles
TH1D * fH22Transverse_min_bin_wojet1
! PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - per bin sum - trans min
TList * fOutput
!output list
Container for particles within the EMCAL framework.
Analysis of leading jets distribution of pt and multiplicity.
TH1D * fH23
! Event Pt Distribution of particles
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:83
UInt_t fNJets_accepted
Number of Jets found in event - accepted cuts applied by JetContainer.
TProfile * fH41
! PTsum w.r.t PTmax - full phi
TH1D * fH22Transverse_min_bin
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - per bin sum - trans min ...
AliParticleContainer * GetParticleContainer() const
std::vector< Int_t > fEvent_sorted_idxvec
vector of sorted indexes of accepted tracks in the event
AliVParticle * GetLeadingTrack(TClonesArray *tracks) const
TProfile * fH21
! N(in the event - including jet1) vs P_{T}(jet1) - full phi
TH1D * fH22_bin
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - per bin sum - full phi ...
TH1D * fH40toward_bin
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - per bin sum - toward...
TH1D * fH41away_bin
! PTsum w.r.t PTmax - per bin sum - away
AliParticleContainer * fTracksCont
! Tracks Container
std::vector< int > SortConstituentsPt(TClonesArray *tracks) const
Int_t GetNJets() const
TH1D * fH21Toward_bin
! N(in the event - including jet1) vs P_{T}(jet1) - per bin sum - toward
TProfile * fH22Away
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - away
virtual AliVParticle * GetAcceptParticle(Int_t i=-1) const
Int_t GetNAcceptedClusters() const
TClonesArray * GetArray() const
TH1D * fH22Away_bin
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - away
TProfile * fH22Toward
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - toward
TProfile * fH41transmax
! PTsum w.r.t PTmax - trans max
TProfile * fH40transmin
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - trans min ...
TProfile * fH21Away
! N(in the event - including jet1) vs P_{T}(jet1) - away
void SetClassName(const char *clname)
TProfile * fH22
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - full phi
TH1D * fH21Transverse_min_bin_wojet1
! N(in the event - without jet1) vs P_{T}(jet1) - per bin sum - trans min
TH1D * fH21Toward_bin_wojet1
! N(in the event - without jet1) vs P_{T}(jet1) - per bin sum - toward
Bool_t IdxInArray(Int_t index, TArrayI &array)
functional for sorting pair by first element - descending
Int_t fNaccClus
! Multiplicity in event - accepted clusters in cluster container
Double_t Pt() const
Definition: AliEmcalJet.h:47
TH1D * fH40away_bin
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - per bin sum - away ...
const char * GetName() const
TH1D * fH22Transverse_max_bin_wojet1
! PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - per bin sum - trans max
TProfile * fH22Transverse_min
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - trans min
TProfile * fH41transmin
! PTsum w.r.t PTmax - trans min
TClonesArray * fTracks
!tracks
TProfile * fH40transmax
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - trans max ...
TH1D * fH22Away_bin_wojet1
! PT_{sum}(in the event - without jet1) vs P_{T}(jet1) - per bin sum - away
TH1D * fH21Transverse_max_bin_wojet1
! N(in the event - without jet1) vs P_{T}(jet1) - per bin sum - trans max
TH1D * fH41transmin_bin
! PTsum w.r.t PTmax - per bin sum - trans min
AliJetContainer * fJetsCont
! Jets Container
TH1D * fH41transmax_bin
! PTsum w.r.t PTmax - per bin sum - trans max
TH1D * fH21Away_bin
! N(in the event - including jet1) vs P_{T}(jet1) - per bin sum - away
TH1D * fH40_bin
! total particles fNPart w.r.t PTmax (pt of leading particle from leading jet) - per bin sum - full p...
TH1D * fH21_bin_wojet1
! N(in the event - without jet1) vs P_{T}(jet1) - per bin sum - full phi
TH1D * fH21_bin
! N(in the event - including jet1) vs P_{T}(jet1) - per bin sum - full phi
TH1D * fH23Toward
! 'Toward' Pt Distribution of particles
TH1D * fH22Transverse_max_bin
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - per bin sum - trans max ...
TClonesArray * fTracksContArray
! the array of tracks from the tracks container
TH1D * fH21Away_bin_wojet1
! N(in the event - without jet1) vs P_{T}(jet1) - per bin sum - away
Int_t GetNAcceptedParticles() const
TH1D * fH41toward_bin
! PTsum w.r.t PTmax - per bin sum - toward
TProfile * fH22Transverse_max
! PT_{sum}(in the event - including jet1) vs P_{T}(jet1) - trans max
AliClusterContainer * fCaloClustersCont
! Clusters Container
void ResetCurrentID(Int_t i=-1)
UInt_t fNaccPart
Multiplicity in event - accepted tracks in tracks container.
TClonesArray * fCaloClustContArray
! the array of clusters from the tracks container
TProfile * fH21Toward
! N(in the event - including jet1) vs P_{T}(jet1) - toward
std::vector< Int_t > SortTracksPt(AliVEvent *event) const