AliPhysics  a9863a5 (a9863a5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskChargedJetsHadronCF.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: R. Haake. *
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 <TClonesArray.h>
17 #include <TF1.h>
18 #include <TH1F.h>
19 #include <TH2F.h>
20 #include <TH3F.h>
21 #include <THn.h>
22 #include <TTree.h>
23 #include <TList.h>
24 #include <TLorentzVector.h>
25 
26 #include "AliVTrack.h"
27 #include "AliEmcalJet.h"
28 #include "AliRhoParameter.h"
29 #include "AliLog.h"
30 #include "AliJetContainer.h"
31 #include "AliTrackContainer.h"
32 #include "AliPicoTrack.h"
33 #include "AliVParticle.h"
34 #include "TRandom3.h"
36 
38 
42 //________________________________________________________________________
44 {
45 // dummy destructor
46 }
47 
51 //________________________________________________________________________
53 {
54 // dummy destructor
55 }
56 
60 //________________________________________________________________________
63  fJetsCont(0),
64  fTracksCont(0),
65  fJetsTree(0),
66  fJetsTreeBuffer(0),
67  fExtractionPercentage(0),
68  fExtractionMinPt(0),
69  fNumberOfCentralityBins(10),
70  fJetsOutput(),
71  fTracksOutput(),
72  fJetsInput(),
73  fJetParticleArrayName("JetsDPhiBasicParticles"),
74  fTrackParticleArrayName(""),
75  fJetMatchingArrayName(""),
76  fRandom(0),
77  fRejectionFunction(0),
78  fJetOutputMode(0),
79  fMinFakeFactorPercentage(0),
80  fMaxFakeFactorPercentage(0),
81  fEventCriteriumMode(0),
82  fEventCriteriumMinBackground(0),
83  fEventCriteriumMaxBackground(0),
84  fEventCriteriumMinLeadingJetPt(0),
85  fEventCriteriumMinSubleadingJetPt(0),
86  fLeadingJet(),
87  fSubleadingJet(),
88  fAcceptedJets(0),
89  fAcceptedTracks(0)
90 {
91  // Default constructor.
92  SetMakeGeneralHistograms(kTRUE);
93  fRandom = new TRandom3(0);
94 }
95 
96 
97 //________________________________________________________________________
99  AliAnalysisTaskEmcalJet(name, kTRUE),
100  fJetsCont(0),
101  fTracksCont(0),
102  fJetsTree(0),
103  fJetsTreeBuffer(0),
104  fExtractionPercentage(0),
105  fExtractionMinPt(0),
106  fNumberOfCentralityBins(10),
107  fJetsOutput(),
108  fTracksOutput(),
109  fJetsInput(),
110  fJetParticleArrayName("JetsDPhiBasicParticles"),
111  fTrackParticleArrayName(""),
112  fJetMatchingArrayName(""),
113  fRandom(0),
114  fRejectionFunction(0),
115  fJetOutputMode(0),
116  fMinFakeFactorPercentage(0),
117  fMaxFakeFactorPercentage(0),
118  fEventCriteriumMode(0),
119  fEventCriteriumMinBackground(0),
120  fEventCriteriumMaxBackground(0),
121  fEventCriteriumMinLeadingJetPt(0),
122  fEventCriteriumMinSubleadingJetPt(0),
123  fLeadingJet(),
124  fSubleadingJet(),
125  fAcceptedJets(0),
126  fAcceptedTracks(0)
127 {
128  // Constructor
130  fRandom = new TRandom3(0);
131 }
132 
133 //________________________________________________________________________
135 {
136  // Destructor.
137 }
138 
139 //________________________________________________________________________
141 {
143 
144  // ### Basic container settings
146  if(fJetsCont) { //get particles connected to jets
147  fJetsCont->PrintCuts();
149  } else { //no jets, just analysis tracks
151  }
152  if(fTracksCont) fTracksCont->SetClassName("AliVTrack");
153 
154  // ### Create all histograms
155 
156  // Change the event rejection histogram -> Add a custom value
157  fHistEventRejection->GetXaxis()->SetBinLabel(14,"JetCrit");
158 
159  // Track QA plots
160  AddHistogram2D<TH2D>("hTrackPt", "Tracks p_{T} distribution", "", 300, 0., 300., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)", "Centrality", "dN^{Tracks}/dp_{T}");
161  AddHistogram2D<TH2D>("hTrackPhi", "Track angular distribution in #phi", "LEGO2", 180, 0., 2*TMath::Pi(), fNumberOfCentralityBins, 0, 100, "#phi", "Centrality", "dN^{Tracks}/(d#phi)");
162  AddHistogram2D<TH2D>("hTrackEta", "Track angular distribution in #eta", "LEGO2", 100, -2.5, 2.5, fNumberOfCentralityBins, 0, 100, "#eta", "Centrality", "dN^{Tracks}/(d#eta)");
163  AddHistogram2D<TH2D>("hTrackPhiEta", "Track angular distribution #phi/#eta", "COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5, "#phi", "#eta", "dN^{Tracks}/d#phi d#eta");
164 
165  AddHistogram2D<TH2D>("hLeadingTrackPt", "Leading tracks p_{T} distribution", "", 300, 0., 300., fNumberOfCentralityBins, 0, 100, "p_{T} (GeV/c)", "Centrality", "dN^{Tracks}/dp_{T}");
166  AddHistogram2D<TH2D>("hLeadingTrackPhi", "Leading tracks angular distribution in #phi", "LEGO2", 180, 0., 2*TMath::Pi(), fNumberOfCentralityBins, 0, 100, "#phi", "Centrality", "dN^{Tracks}/(d#phi)");
167  AddHistogram2D<TH2D>("hLeadingTrackEta", "Leading tracks angular distribution in #eta", "LEGO2", 100, -2.5, 2.5, fNumberOfCentralityBins, 0, 100, "#eta", "Centrality", "dN^{Tracks}/(d#eta)");
168  AddHistogram2D<TH2D>("hLeadingTrackPhiEta", "Track angular distribution #phi/#eta", "COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5, "#phi", "#eta", "dN^{Tracks}/d#phi d#eta");
169 
170  AddHistogram2D<TH2D>("hTrackEtaPt", "Track angular distribution in #eta vs. p_{T}", "LEGO2", 100, -2.5, 2.5, 300, 0., 300., "#eta", "p_{T} (GeV/c)", "dN^{Tracks}/(d#eta dp_{T})");
171  AddHistogram2D<TH2D>("hTrackPhiPt", "Track angular distribution in #phi vs. p_{T}", "LEGO2", 180, 0, 2*TMath::Pi(), 300, 0., 300., "#phi", "p_{T} (GeV/c)", "dN^{Tracks}/(d#phi dp_{T})");
172 
173 
174  // Jet QA plots
175  AddHistogram2D<TH2D>("hJetPtRaw", "Jets p_{T} distribution (no bgrd. corr.)", "", 300, 0., 300., fNumberOfCentralityBins, 0, 100, "p_{T, jet} (GeV/c)", "Centrality", "dN^{Jets}/dp_{T}");
176  AddHistogram2D<TH2D>("hJetPt", "Jets p_{T} distribution (background subtracted)", "", 400, -100., 300., fNumberOfCentralityBins, 0, 100, "p_{T, jet} (GeV/c)", "Centrality", "dN^{Jets}/dp_{T}");
177  AddHistogram2D<TH2D>("hJetPhi", "Jet angular distribution #phi", "LEGO2", 180, 0., 2*TMath::Pi(), fNumberOfCentralityBins, 0, 100, "#phi", "Centrality", "dN^{Jets}/d#phi");
178  AddHistogram2D<TH2D>("hJetEta", "Jet angular distribution #eta", "LEGO2", 100, -2.5, 2.5, fNumberOfCentralityBins, 0, 100, "#eta","Centrality","dN^{Jets}/d#eta");
179  AddHistogram2D<TH2D>("hJetPhiPt", "Jet angular distribution #phi vs. p_{T}", "LEGO2", 180, 0., 2*TMath::Pi(), 400, -100., 300., "#phi", "p_{T, jet} (GeV/c)", "dN^{Jets}/d#phi dp_{T}");
180  AddHistogram2D<TH2D>("hJetEtaPt", "Jet angular distribution #eta vs. p_{T}", "LEGO2", 100, -2.5, 2.5, 400, -100., 300., "#eta","p_{T, jet} (GeV/c)","dN^{Jets}/d#eta dp_{T}");
181  AddHistogram2D<TH2D>("hJetPhiEta", "Jet angular distribution #phi/#eta", "COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5, "#phi", "#eta", "dN^{Jets}/d#phi d#eta");
182  AddHistogram2D<TH2D>("hJetArea", "Jet area", "LEGO2", 200, 0., 2., fNumberOfCentralityBins, 0, 100, "Jet A", "Centrality", "dN^{Jets}/dA");
183  AddHistogram2D<TH2D>("hJetAreaPt", "Jet area vs. p_{T}", "LEGO2", 200, 0., 2., 400, -100., 300., "Jet A", "p_{T, jet} (GeV/c)", "dN^{Jets}/dA dp_{T}");
184  AddHistogram2D<TH2D>("hJetPtLeadingHadron", "Jet leading hadron p_{T} distribution vs. jet p_{T}", "", 300, 0., 300., 300, 0., 300., "p_{T, jet} (GeV/c)", "p_{T,lead had} (GeV/c)", "dN^{Jets}/dp_{T}dp_{T,had}");
185 
186  AddHistogram2D<TH2D>("hJetConstituentPt_Cent0_100", "Jet constituent p_{T} distribution vs. jet p_T (background subtracted)", "", 400, -100., 300., 300, 0., 300., "p_{T, jet} (GeV/c)", "p_{T, track} (GeV/c)", "dN^{Tracks}/d^{2}p_{T}");
187  AddHistogram2D<TH2D>("hJetConstituentPt_Cent0_10", "Jet constituent p_{T} distribution vs. jet p_T (background subtracted), 0-10 centrality", "", 400, -100., 300., 300, 0., 300., "p_{T, jet} (GeV/c)", "p_{T, track} (GeV/c)", "dN^{Tracks}/d^{2}p_{T}");
188 
189  AddHistogram2D<TH2D>("hJetConstituentCount_Cent0_100", "Jet constituent count vs. jet p_T (background subtracted)", "", 400, -100., 300., 200, 0., 200., "p_{T, jet} (GeV/c)", "Count", "dN^{Jets}/dNdp_{T}");
190  AddHistogram2D<TH2D>("hJetConstituentCount_Cent0_10", "Jet constituent count vs. jet p_T (background subtracted), 0-10 centrality", "", 400, -100., 300., 200, 0., 200., "p_{T, jet} (GeV/c)", "Count", "dN^{Jets}/dNdp_{T}");
191 
192  // Random cone plots
193  AddHistogram2D<TH2D>("hRandomConePt", "Random cone p_{T} distribution", "", 400, -100., 300., fNumberOfCentralityBins, 0, 100, "p_{T, cone} (GeV/c)", "Centrality", "dN^{Tracks}/dp_{T}");
194  AddHistogram2D<TH2D>("hRandomConeRawPt", "Random cone p_{T} distribution (no bgrd. correction)", "", 300, 0., 300., fNumberOfCentralityBins, 0, 100, "p_{T, cone} (GeV/c)", "Centrality", "dN^{Tracks}/dp_{T}");
195 
196  // Leading/subleading, background ...
197 
198  AddHistogram2D<TH2D>("hLeadingJetPtRaw", "Jets p_{T} distribution (no bgrd. corr.)", "", 300, 0., 300., fNumberOfCentralityBins, 0, 100, "p_{T, jet} (GeV/c)", "Centrality", "dN^{Jets}/dp_{T}");
199  AddHistogram2D<TH2D>("hLeadingJetPt", "Jets p_{T} distribution (background subtracted)", "", 400, -100., 300., fNumberOfCentralityBins, 0, 100, "p_{T, jet} (GeV/c)", "Centrality", "dN^{Jets}/dp_{T}");
200  AddHistogram2D<TH2D>("hLeadingJetPhi", "Jet angular distribution #phi", "LEGO2", 180, 0., 2*TMath::Pi(), fNumberOfCentralityBins, 0, 100, "#phi", "Centrality", "dN^{Jets}/d#phi");
201  AddHistogram2D<TH2D>("hLeadingJetEta", "Jet angular distribution #eta", "LEGO2", 100, -2.5, 2.5, fNumberOfCentralityBins, 0, 100, "#eta","Centrality","dN^{Jets}/d#eta");
202  AddHistogram2D<TH2D>("hLeadingJetPhiPt", "Jet angular distribution #phi vs. p_{T}", "LEGO2", 180, 0., 2*TMath::Pi(), 400, -100., 300., "#phi", "p_{T, jet} (GeV/c)", "dN^{Jets}/d#phi dp_{T}");
203  AddHistogram2D<TH2D>("hLeadingJetEtaPt", "Jet angular distribution #eta vs. p_{T}", "LEGO2", 100, -2.5, 2.5, 400, -100., 300., "#eta","p_{T, jet} (GeV/c)","dN^{Jets}/d#eta dp_{T}");
204  AddHistogram2D<TH2D>("hLeadingJetPhiEta", "Jet angular distribution #phi/#eta", "COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5, "#phi", "#eta", "dN^{Jets}/d#phi d#eta");
205  AddHistogram2D<TH2D>("hLeadingJetArea", "Jet area", "LEGO2", 200, 0., 2., fNumberOfCentralityBins, 0, 100, "Jet A", "Centrality", "dN^{Jets}/dA");
206  AddHistogram2D<TH2D>("hLeadingJetAreaPt", "Jet area vs. p_{T}", "LEGO2", 200, 0., 2., 400, -100., 300., "Jet A", "p_{T, jet} (GeV/c)", "dN^{Jets}/dA dp_{T}");
207  AddHistogram2D<TH2D>("hLeadingJetPtLeadingHadron", "Jet leading hadron p_{T} distribution vs. jet p_{T}", "", 300, 0., 300., 300, 0., 300., "p_{T, jet} (GeV/c)", "p_{T,lead had} (GeV/c)", "dN^{Jets}/dp_{T}dp_{T,had}");
208 
209  AddHistogram2D<TH2D>("hSubleadingJetPtRaw", "Jets p_{T} distribution (no bgrd. corr.)", "", 300, 0., 300., fNumberOfCentralityBins, 0, 100, "p_{T, jet} (GeV/c)", "Centrality", "dN^{Jets}/dp_{T}");
210  AddHistogram2D<TH2D>("hSubleadingJetPt", "Jets p_{T} distribution (background subtracted)", "", 400, -100., 300., fNumberOfCentralityBins, 0, 100, "p_{T, jet} (GeV/c)", "Centrality", "dN^{Jets}/dp_{T}");
211  AddHistogram2D<TH2D>("hSubleadingJetPhi", "Jet angular distribution #phi", "LEGO2", 180, 0., 2*TMath::Pi(), fNumberOfCentralityBins, 0, 100, "#phi", "Centrality", "dN^{Jets}/d#phi");
212  AddHistogram2D<TH2D>("hSubleadingJetEta", "Jet angular distribution #eta", "LEGO2", 100, -2.5, 2.5, fNumberOfCentralityBins, 0, 100, "#eta","Centrality","dN^{Jets}/d#eta");
213  AddHistogram2D<TH2D>("hSubleadingJetPhiPt", "Jet angular distribution #phi vs. p_{T}", "LEGO2", 180, 0., 2*TMath::Pi(), 400, -100., 300., "#phi", "p_{T, jet} (GeV/c)", "dN^{Jets}/d#phi dp_{T}");
214  AddHistogram2D<TH2D>("hSubleadingJetEtaPt", "Jet angular distribution #eta vs. p_{T}", "LEGO2", 100, -2.5, 2.5, 400, -100., 300., "#eta","p_{T, jet} (GeV/c)","dN^{Jets}/d#eta dp_{T}");
215  AddHistogram2D<TH2D>("hSubleadingJetPhiEta", "Jet angular distribution #phi/#eta", "COLZ", 180, 0., 2*TMath::Pi(), 100, -2.5, 2.5, "#phi", "#eta", "dN^{Jets}/d#phi d#eta");
216  AddHistogram2D<TH2D>("hSubleadingJetArea", "Jet area", "LEGO2", 200, 0., 2., fNumberOfCentralityBins, 0, 100, "Jet A", "Centrality", "dN^{Jets}/dA");
217  AddHistogram2D<TH2D>("hSubleadingJetAreaPt", "Jet area vs. p_{T}", "LEGO2", 200, 0., 2., 400, -100., 300., "Jet A", "p_{T, jet} (GeV/c)", "dN^{Jets}/dA dp_{T}");
218  AddHistogram2D<TH2D>("hSubleadingJetPtLeadingHadron", "Jet leading hadron p_{T} distribution vs. jet p_{T}", "", 300, 0., 300., 300, 0., 300., "p_{T, jet} (GeV/c)", "p_{T,lead had} (GeV/c)", "dN^{Jets}/dp_{T}dp_{T,had}");
219 
220  AddHistogram2D<TH2D>("hTrackCount", "Number of tracks in acceptance vs. centrality", "LEGO2", 500, 0., 5000., fNumberOfCentralityBins, 0, 100, "N tracks","Centrality", "dN^{Events}/dN^{Tracks}");
221  AddHistogram2D<TH2D>("hJetCount", "Number of jets in acceptance vs. centrality", "LEGO2", 100, 0., 100., fNumberOfCentralityBins, 0, 100, "N Jets","Centrality", "dN^{Events}/dN^{Jets}");
222  AddHistogram2D<TH2D>("hFakeFactor", "Fake factor distribution", "LEGO2", 1000, 0., 100., fNumberOfCentralityBins, 0, 100, "Fake factor","Centrality", "dN^{Jets}/df");
223  AddHistogram2D<TH2D>("hBackgroundPt", "Background p_{T} distribution", "", 150, 0., 150., fNumberOfCentralityBins, 0, 100, "Background p_{T} (GeV/c)", "Centrality", "dN^{Events}/dp_{T}");
224  AddHistogram2D<TH2D>("hBackgroundPtJetPt_Cent0_100", "Background p_{T} distribution vs. jet p_{T}", "", 150, 0., 150., 400, -100., 300., "Background p_{T} (GeV/c)", "Jet p_{T} (GeV/c)", "dN^{Events}/dp_{T}");
225  AddHistogram2D<TH2D>("hBackgroundPtJetPt_Cent0_10", "Background p_{T} distribution vs. jet p_{T}", "", 150, 0., 150., 400, -100., 300., "Background p_{T} (GeV/c)", "Jet p_{T} (GeV/c)", "dN^{Events}/dp_{T}");
226  AddHistogram2D<TH2D>("hBackgroundPtConstCount_Cent0_100", "Background p_{T} distribution vs. const. count", "", 150, 0., 150., 200, 0., 200., "Background p_{T} (GeV/c)", "Count", "dN^{Events}/dp_{T}");
227  AddHistogram2D<TH2D>("hBackgroundPtConstCount_Cent0_10", "Background p_{T} distribution vs. const. count", "", 150, 0., 150., 200, 0., 200., "Background p_{T} (GeV/c)", "Count", "dN^{Events}/dp_{T}");
228 
229  PostData(1, fOutput); // Post data for ALL output slots > 0 here.
230 }
231 
232 
233 //________________________________________________________________________
235 
237 
238  // ### Add the jets as basic correlation particles to the event
239  if (!(fInputEvent->FindListObject(Form("%s", fJetParticleArrayName.Data()))))
240  {
241  fJetsOutput = new TClonesArray("AliPicoTrack");
242  fJetsOutput->SetName(fJetParticleArrayName.Data());
243  fInputEvent->AddObject(fJetsOutput);
244  }
245  else
246  AliError(Form("%s: Object with name %s already in event!", GetName(), Form("%s", fJetParticleArrayName.Data())));
247 
248  // ### Add the tracks as basic correlation particles to the event (optional)
249  if(fTrackParticleArrayName != "")
250  {
251  if (!(fInputEvent->FindListObject(Form("%s", fTrackParticleArrayName.Data()))))
252  {
253  fTracksOutput = new TClonesArray("AliPicoTrack");
254  fTracksOutput->SetName(fTrackParticleArrayName.Data());
255  fInputEvent->AddObject(fTracksOutput);
256  }
257  else
258  AliError(Form("%s: Object with name %s already in event!", GetName(), Form("%s", fTrackParticleArrayName.Data())));
259  }
260 
261  // ### Import generated jets from toymodel for matching (optional)
262  if(fJetMatchingArrayName != "")
263  {
264  fJetsInput = static_cast<TClonesArray*>(InputEvent()->FindListObject(Form("%s", fJetMatchingArrayName.Data())));
265  if(!fJetsInput)
266  AliFatal(Form("Importing jets for matching failed! Array '%s' not found!", fJetMatchingArrayName.Data()));
267  }
268 
269  // ### Jets tree (optional)
271  {
272  fJetsTree = new TTree("ExtractedJets", "ExtractedJets");
273  fJetsTree->Branch("Jets", "AliBasicJet", &fJetsTreeBuffer, 1000);
274  fOutput->Add(fJetsTree);
275  }
276 
277 }
278 
279 //________________________________________________________________________
281 {
282 
283  // In case of special selection criteria, trigger on certain events
284  if(fEventCriteriumMode==0) // "minimum bias"
285  {
286  // do nothing
287  }
288  else if(fEventCriteriumMode==1) // background constraints
289  {
291  {
292  fHistEventRejection->Fill("JetCrit", 1);
293  return kFALSE;
294  }
295  }
296  else if(fEventCriteriumMode==2) // Minimum leading jet pT
297  {
298  if(fLeadingJet)
299  {
301  {
302  fHistEventRejection->Fill("JetCrit", 1);
303  return kFALSE;
304  }
305  }
306  }
307  else if(fEventCriteriumMode==3) // Simple dijet trigger
308  {
310  {
312  {
313  fHistEventRejection->Fill("JetCrit", 1);
314  return kFALSE;
315  }
316  }
317  }
318  return kTRUE;
319 }
320 
321 //________________________________________________________________________
323 {
324  if( (fJetOutputMode==1) || (fJetOutputMode==3) ) // output the leading jet
325  if(jet!=fLeadingJet)
326  return kFALSE;
327 
328  if( (fJetOutputMode==2) || (fJetOutputMode==3) ) // output the subleading jet
329  if(jet!=fSubleadingJet)
330  return kFALSE;
331 
332  // Fake jet rejection (0810.1219)
333 /*
334  if(fFakeFactorCutProfile)
335  {
336  Double_t fakeFactor = CalculateFakeFactor(jet);
337  FillHistogram("hFakeFactor", fakeFactor, fCent);
338  if( (fakeFactor >= fMinFakeFactorPercentage*fFakeFactorCutProfile->GetBinContent(fFakeFactorCutProfile->GetXaxis()->FindBin(fCent))) && (fakeFactor < fMaxFakeFactorPercentage*fFakeFactorCutProfile->GetBinContent(fFakeFactorCutProfile->GetXaxis()->FindBin(fCent))) )
339  return kFALSE;
340  }
341 */
342 
343  // Poor man's fake jet rejection (according to jet const.)
345  {
346  if( jet->GetNumberOfTracks() < fRejectionFunction->Eval(jet->Pt() - fJetsCont->GetRhoVal()*jet->Area()) )
347  return kFALSE;
348  }
349 
350  // Jet matching. Only done if SetJetMatchingArrayName() called
351  Bool_t matchedFound = kFALSE;
352  if(fJetsInput)
353  {
354  // Go through all jets and check if the matching condition is fulfiled by at least one jet
355  Double_t bestMatchDeltaR = 999.;
356  for(Int_t i=0; i<fJetsInput->GetEntries(); i++)
357  {
358  AliEmcalJet* matchJet = static_cast<AliEmcalJet*>(fJetsInput->At(i));
359  Double_t deltaPhi = TMath::Min(TMath::Abs(jet->Phi()-matchJet->Phi()),TMath::TwoPi() - TMath::Abs(jet->Phi()-matchJet->Phi()));
360  Double_t deltaEta = TMath::Abs(jet->Eta() - matchJet->Eta());
361  Double_t deltaR = TMath::Sqrt((deltaPhi*deltaPhi) + (deltaEta*deltaEta));
362 
363  if(deltaR < bestMatchDeltaR)
364  {
365  bestMatchDeltaR = deltaR;
366  }
367  }
368  // Check if a matching jet is found.
369  if(bestMatchDeltaR < 0.9*fJetsCont->GetJetRadius())
370  matchedFound = kTRUE;
371  }
372 
373  if(fJetOutputMode==4) // matching jets only
374  return matchedFound;
375  else if(fJetOutputMode==5) // non-matching jets only
376  return !matchedFound;
377 
378  return kTRUE;
379 }
380 
381 //________________________________________________________________________
383 {
384  // All jets
385  FillHistogram("hJetPtRaw", jet->Pt(), fCent);
386  FillHistogram("hJetPt", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), fCent);
387  FillHistogram("hJetPhi", jet->Phi(), fCent);
388  FillHistogram("hJetEta", jet->Eta(), fCent);
389  FillHistogram("hJetEtaPt", jet->Eta(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
390  FillHistogram("hJetPhiPt", jet->Phi(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
391  FillHistogram("hJetPhiEta", jet->Phi(), jet->Eta());
392  FillHistogram("hJetArea", jet->Area(), fCent);
393  FillHistogram("hJetAreaPt", jet->Area(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
394  FillHistogram("hJetPtLeadingHadron", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), fJetsCont->GetLeadingHadronPt(jet));
395 
396  FillHistogram("hBackgroundPtJetPt_Cent0_100", fJetsCont->GetRhoVal(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
397  if( (fCent >= 0) && (fCent < 10) )
398  FillHistogram("hBackgroundPtJetPt_Cent0_10", fJetsCont->GetRhoVal(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
399 
400  // Leading jet plots
401  if(jet==fLeadingJet)
402  {
403  FillHistogram("hLeadingJetPtRaw", jet->Pt(), fCent);
404  FillHistogram("hLeadingJetPt", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), fCent);
405  FillHistogram("hLeadingJetPhi", jet->Phi(), fCent);
406  FillHistogram("hLeadingJetEta", jet->Eta(), fCent);
407  FillHistogram("hLeadingJetEtaPt", jet->Eta(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
408  FillHistogram("hLeadingJetPhiPt", jet->Phi(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
409  FillHistogram("hLeadingJetPhiEta", jet->Phi(), jet->Eta());
410  FillHistogram("hLeadingJetArea", jet->Area(), fCent);
411  FillHistogram("hLeadingJetAreaPt", jet->Area(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
412  FillHistogram("hLeadingJetPtLeadingHadron", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), fJetsCont->GetLeadingHadronPt(jet));
413  }
414 
415  // Subleading jet plot
416  else if(jet==fSubleadingJet)
417  {
418  FillHistogram("hSubleadingJetPtRaw", jet->Pt(), fCent);
419  FillHistogram("hSubleadingJetPt", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), fCent);
420  FillHistogram("hSubleadingJetPhi", jet->Phi(), fCent);
421  FillHistogram("hSubleadingJetEta", jet->Eta(), fCent);
422  FillHistogram("hSubleadingJetEtaPt", jet->Eta(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
423  FillHistogram("hSubleadingJetPhiPt", jet->Phi(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
424  FillHistogram("hSubleadingJetPhiEta", jet->Phi(), jet->Eta());
425  FillHistogram("hSubleadingJetArea", jet->Area(), fCent);
426  FillHistogram("hSubleadingJetAreaPt", jet->Area(), jet->Pt() - fJetsCont->GetRhoVal()*jet->Area());
427  FillHistogram("hSubleadingJetPtLeadingHadron", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), fJetsCont->GetLeadingHadronPt(jet));
428  }
429 }
430 
431 //________________________________________________________________________
433 {
434  FillHistogram("hTrackPt", track->Pt(), fCent);
435  FillHistogram("hTrackPhi", track->Phi(), fCent);
436  FillHistogram("hTrackEta", track->Eta(), fCent);
437  FillHistogram("hTrackEtaPt", track->Eta(), track->Pt());
438  FillHistogram("hTrackPhiPt", track->Phi(), track->Pt());
439  FillHistogram("hTrackPhiEta", track->Phi(), track->Eta());
440 }
441 
442 //________________________________________________________________________
444 {
445  // Loop over all jet constituents
446  for(Int_t i = 0; i < jet->GetNumberOfTracks(); i++)
447  {
448  AliVParticle* constituent = static_cast<AliVParticle*>(jet->TrackAt(i, fTracksCont->GetArray()));
449  if(!constituent)
450  continue;
451 
452  // Fill jet constituent plots
453  FillHistogram("hJetConstituentPt_Cent0_100", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), constituent->Pt());
454  if( (fCent >= 0) && (fCent < 10) )
455  FillHistogram("hJetConstituentPt_Cent0_10", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), constituent->Pt());
456 
457  }
458 
459  FillHistogram("hJetConstituentCount_Cent0_100", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), jet->GetNumberOfTracks());
460  if( (fCent >= 0) && (fCent < 10) )
461  FillHistogram("hJetConstituentCount_Cent0_10", jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), jet->GetNumberOfTracks());
462 
463  FillHistogram("hBackgroundPtConstCount_Cent0_100", fJetsCont->GetRhoVal(), jet->GetNumberOfTracks());
464  if( (fCent >= 0) && (fCent < 10) )
465  FillHistogram("hBackgroundPtConstCount_Cent0_10", fJetsCont->GetRhoVal(), jet->GetNumberOfTracks());
466 }
467 
468 //________________________________________________________________________
470 {
471  new ((*fJetsOutput)[fAcceptedJets]) AliPicoTrack(jet->Pt() - fJetsCont->GetRhoVal()*jet->Area(), jet->Eta(), jet->Phi(), jet->Charge(), 0, 0);
472  fAcceptedJets++;
473 }
474 
475 //________________________________________________________________________
477 {
478  if(fTrackParticleArrayName != "")
479  {
480  new ((*fTracksOutput)[fAcceptedTracks]) AliPicoTrack(track->Pt(), track->Eta(), track->Phi(), track->Charge(), 0, 0); // only Pt,Eta,Phi are interesting for correlations;
481  fAcceptedTracks++;
482  }
483 }
484 
485 //________________________________________________________________________
487 {
488  // Check pT threshold
489  if( (jet->Pt()-jet->Area()*fJetsCont->GetRhoVal()) < fExtractionMinPt )
490  return;
491 
492  // Discard jets statistically
493  if(fRandom->Rndm() >= fExtractionPercentage)
494  return;
495 
496  Long64_t eventID = InputEvent()->GetHeader()->GetEventIdAsLong();
497  AliBasicJet basicJet(jet->Eta(), jet->Phi(), jet->Pt(), jet->Charge(), fJetsCont->GetJetRadius(), jet->Area(), fJetsCont->GetRhoVal(), eventID, fCent);
498  // Add constituents
499  for(Int_t i = 0; i < jet->GetNumberOfTracks(); i++)
500  {
501  AliVParticle* particle = static_cast<AliVParticle*>(jet->TrackAt(i, fTracksCont->GetArray()));
502  if(!particle) continue;
503  basicJet.AddJetConstituent(particle->Eta(), particle->Phi(), particle->Pt(), particle->Charge());
504  }
505  fJetsTreeBuffer = &basicJet;
506  fJetsTree->Fill();
507 }
508 
509 //________________________________________________________________________
511 {
513 
515  return kFALSE;
516 
517  // ####### Jet loop
518  fAcceptedJets = 0;
520  while(AliEmcalJet *jet = fJetsCont->GetNextAcceptJet())
521  {
522  if(!IsJetSelected(jet))
523  continue;
524 
525  // Jet plots
526  FillHistogramsJets(jet);
528 
529  // Add jet to output array
531  AddJetToTree(jet);
532  AddJetToOutputArray(jet);
533  }
534 
535 
536  // ####### Particle loop
537  // Throw random cone
538  Double_t tmpRandConeEta = fJetsCont->GetJetEtaMin() + fRandom->Rndm()*TMath::Abs(fJetsCont->GetJetEtaMax()-fJetsCont->GetJetEtaMin());
539  Double_t tmpRandConePhi = fRandom->Rndm()*TMath::TwoPi();
540  Double_t tmpRandConePt = 0; // to be determined
541 
542  fAcceptedTracks = 0;
544  Int_t trackcount = 0;
545  while(AliVTrack *track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle()))
546  {
547  // Track plots
548  FillHistogramsTracks(track);
549 
550  if(IsTrackInCone(track, tmpRandConeEta, tmpRandConePhi, fJetsCont->GetJetRadius()))
551  tmpRandConePt += track->Pt();
552 
553  // Add track to output array
554  trackcount++;
555  AddTrackToOutputArray(track);
556  }
557 
558  // ####### Event properties
559  FillHistogram("hRandomConePt", tmpRandConePt - fJetsCont->GetRhoVal()*fJetsCont->GetJetRadius()*fJetsCont->GetJetRadius()*TMath::Pi(), fCent);
560  FillHistogram("hRandomConeRawPt", tmpRandConePt, fCent);
561 
562  FillHistogram("hBackgroundPt", fJetsCont->GetRhoVal(), fCent);
563  FillHistogram("hJetCount", fAcceptedJets, fCent);
564  FillHistogram("hTrackCount", trackcount, fCent);
565  // NOTE: It is possible to use fTracksCont->GetLeadingParticle() since we do not apply additional track cuts
566  AliVTrack* leadTrack = static_cast<AliVTrack*>(fTracksCont->GetLeadingParticle());
567  if(leadTrack)
568  {
569  FillHistogram("hLeadingTrackPt", leadTrack->Pt(), fCent);
570  FillHistogram("hLeadingTrackPhi", leadTrack->Phi(), fCent);
571  FillHistogram("hLeadingTrackEta", leadTrack->Eta(), fCent);
572  FillHistogram("hLeadingTrackPhiEta", leadTrack->Phi(), leadTrack->Eta());
573  }
574 
575  return kTRUE;
576 }
577 
578 //########################################################################
579 // HELPERS
580 //########################################################################
581 
582 
583 //________________________________________________________________________
584 inline Bool_t AliAnalysisTaskChargedJetsHadronCF::IsTrackInCone(AliVParticle* track, Double_t eta, Double_t phi, Double_t radius)
585 {
586  // This is to use a full cone in phi even at the edges of phi (2pi -> 0) (0 -> 2pi)
587  Double_t trackPhi = 0.0;
588  if (track->Phi() > (TMath::TwoPi() - (radius-phi)))
589  trackPhi = track->Phi() - TMath::TwoPi();
590  else if (track->Phi() < (phi+radius - TMath::TwoPi()))
591  trackPhi = track->Phi() + TMath::TwoPi();
592  else
593  trackPhi = track->Phi();
594 
595  if ( TMath::Abs(trackPhi-phi)*TMath::Abs(trackPhi-phi) + TMath::Abs(track->Eta()-eta)*TMath::Abs(track->Eta()-eta) <= radius*radius)
596  return kTRUE;
597 
598  return kFALSE;
599 }
600 
601 
602 //________________________________________________________________________
604 {
605  // Calculate leading + subleading jet
608 }
609 
610 //________________________________________________________________________
612 {
613  Double_t fakeFactor = 0;
614 
615  // Loop over all jet constituents
616  for(Int_t i = 0; i < jet->GetNumberOfTracks(); i++)
617  {
618  AliVParticle* constituent = static_cast<AliVParticle*>(jet->TrackAt(i, fTracksCont->GetArray()));
619 
620  Double_t deltaPhi = TMath::Min(TMath::Abs(jet->Phi()-constituent->Phi()),TMath::TwoPi() - TMath::Abs(jet->Phi()-constituent->Phi()));
621  Double_t deltaR = TMath::Sqrt( (jet->Eta() - constituent->Eta())*(jet->Eta() - constituent->Eta()) + deltaPhi*deltaPhi );
622  fakeFactor += constituent->Pt() * TMath::Sin(deltaR);
623  }
624 
625  return fakeFactor;
626 }
627 
628 //________________________________________________________________________
630 {
631  fEventCriteriumMode = type;
632 
633  if(fEventCriteriumMode==0)
634  AliWarning("Set event criterium to 'default' -- no further selection criterium.");
635  else if(fEventCriteriumMode==1)
636  AliWarning("Set event criterium to 'background' -- select events with certain backgrounds");
637  else if(fEventCriteriumMode==2)
638  AliWarning("Set event criterium to 'simple jet trigger' -- select events with certain minimum leading jet pT (bgrd corr.)");
639  else if(fEventCriteriumMode==3)
640  AliWarning("Set event criterium to 'simple dijet trigger' -- select events with certain minimum leading + subleading jet pT (bgrd corr.)");
641  else
642  {
643  AliFatal("Event criterium not valid.");
644  }
645 }
646 
647 
648 //________________________________________________________________________
650 {
651  // Customized from AliJetContainer::GetLeadingJet()
652  // Get the subleading jet; if opt contains "rho" the sorting is according to pt-A*rho
653 
654  TString option(opt);
655  option.ToLower();
656 
657  AliEmcalJet *jetLeading = fJetsCont->GetLeadingJet(opt);
658  AliEmcalJet *jetSubLeading = 0;
659 
662  Double_t tmpPt = 0;
663 
664  if (option.Contains("rho")) {
665  while ((jet = fJetsCont->GetNextAcceptJet())) {
666  if(jet == jetLeading)
667  continue;
668  else if ( (jet->Pt()-jet->Area()*fJetsCont->GetRhoVal()) > tmpPt )
669  {
670  jetSubLeading = jet;
671  tmpPt = jet->Pt()-jet->Area()*fJetsCont->GetRhoVal();
672  }
673 
674  }
675  }
676  else {
677  while ((jet = fJetsCont->GetNextAcceptJet())) {
678  if(jet == jetLeading)
679  continue;
680  else if ( jet->Pt() > tmpPt )
681  {
682  jetSubLeading = jet;
683  tmpPt = jet->Pt();
684  }
685  }
686  }
687 
688  return jetSubLeading;
689 }
690 
691 //________________________________________________________________________
692 void AliAnalysisTaskChargedJetsHadronCF::BinLogAxis(const THn *h, Int_t axisNumber)
693 {
694  // Method for the correct logarithmic binning of histograms
695  TAxis *axis = h->GetAxis(axisNumber);
696  int bins = axis->GetNbins();
697 
698  Double_t from = axis->GetXmin();
699  Double_t to = axis->GetXmax();
700  Double_t *newBins = new Double_t[bins + 1];
701 
702  newBins[0] = from;
703  Double_t factor = pow(to/from, 1./bins);
704 
705  for (int i = 1; i <= bins; i++) {
706  newBins[i] = factor * newBins[i-1];
707  }
708  axis->Set(bins, newBins);
709  delete [] newBins;
710 }
711 
712 //________________________________________________________________________
713 inline void AliAnalysisTaskChargedJetsHadronCF::FillHistogram(const char * key, Double_t x)
714 {
715  TH1* tmpHist = static_cast<TH1*>(fOutput->FindObject(key));
716  if(!tmpHist)
717  {
718  AliError(Form("Cannot find histogram <%s> ",key)) ;
719  return;
720  }
721 
722  tmpHist->Fill(x);
723 }
724 
725 //________________________________________________________________________
726 inline void AliAnalysisTaskChargedJetsHadronCF::FillHistogram(const char * key, Double_t x, Double_t y)
727 {
728  TH1* tmpHist = static_cast<TH1*>(fOutput->FindObject(key));
729  if(!tmpHist)
730  {
731  AliError(Form("Cannot find histogram <%s> ",key));
732  return;
733  }
734 
735  if (tmpHist->IsA()->GetBaseClass("TH1"))
736  static_cast<TH1*>(tmpHist)->Fill(x,y); // Fill x with y
737  else if (tmpHist->IsA()->GetBaseClass("TH2"))
738  static_cast<TH2*>(tmpHist)->Fill(x,y); // Fill x,y with 1
739 }
740 
741 //________________________________________________________________________
742 inline void AliAnalysisTaskChargedJetsHadronCF::FillHistogram(const char * key, Double_t x, Double_t y, Double_t add)
743 {
744  TH2* tmpHist = static_cast<TH2*>(fOutput->FindObject(key));
745  if(!tmpHist)
746  {
747  AliError(Form("Cannot find histogram <%s> ",key));
748  return;
749  }
750 
751  tmpHist->Fill(x,y,add);
752 }
753 
754 //________________________________________________________________________
755 inline void AliAnalysisTaskChargedJetsHadronCF::FillHistogram3D(const char * key, Double_t x, Double_t y, Double_t z, Double_t add)
756 {
757  TH3* tmpHist = static_cast<TH3*>(fOutput->FindObject(key));
758  if(!tmpHist)
759  {
760  AliError(Form("Cannot find histogram <%s> ",key));
761  return;
762  }
763 
764  if(add)
765  tmpHist->Fill(x,y,z,add);
766  else
767  tmpHist->Fill(x,y,z);
768 }
769 
770 
771 //________________________________________________________________________
772 template <class T> T* AliAnalysisTaskChargedJetsHadronCF::AddHistogram1D(const char* name, const char* title, const char* options, Int_t xBins, Double_t xMin, Double_t xMax, const char* xTitle, const char* yTitle)
773 {
774  T* tmpHist = new T(name, title, xBins, xMin, xMax);
775 
776  tmpHist->GetXaxis()->SetTitle(xTitle);
777  tmpHist->GetYaxis()->SetTitle(yTitle);
778  tmpHist->SetOption(options);
779  tmpHist->SetMarkerStyle(kFullCircle);
780  tmpHist->Sumw2();
781 
782  fOutput->Add(tmpHist);
783 
784  return tmpHist;
785 }
786 
787 //________________________________________________________________________
788 template <class T> T* AliAnalysisTaskChargedJetsHadronCF::AddHistogram2D(const char* name, const char* title, const char* options, Int_t xBins, Double_t xMin, Double_t xMax, Int_t yBins, Double_t yMin, Double_t yMax, const char* xTitle, const char* yTitle, const char* zTitle)
789 {
790  T* tmpHist = new T(name, title, xBins, xMin, xMax, yBins, yMin, yMax);
791  tmpHist->GetXaxis()->SetTitle(xTitle);
792  tmpHist->GetYaxis()->SetTitle(yTitle);
793  tmpHist->GetZaxis()->SetTitle(zTitle);
794  tmpHist->SetOption(options);
795  tmpHist->SetMarkerStyle(kFullCircle);
796  tmpHist->Sumw2();
797 
798  fOutput->Add(tmpHist);
799 
800  return tmpHist;
801 }
802 
803 //________________________________________________________________________
804 template <class T> T* AliAnalysisTaskChargedJetsHadronCF::AddHistogram3D(const char* name, const char* title, const char* options, Int_t xBins, Double_t xMin, Double_t xMax, Int_t yBins, Double_t yMin, Double_t yMax, Int_t zBins, Double_t zMin, Double_t zMax, const char* xTitle, const char* yTitle, const char* zTitle)
805 {
806  T* tmpHist = new T(name, title, xBins, xMin, xMax, yBins, yMin, yMax, zBins, zMin, zMax);
807  tmpHist->GetXaxis()->SetTitle(xTitle);
808  tmpHist->GetYaxis()->SetTitle(yTitle);
809  tmpHist->GetZaxis()->SetTitle(zTitle);
810  tmpHist->SetOption(options);
811  tmpHist->SetMarkerStyle(kFullCircle);
812  tmpHist->Sumw2();
813 
814  fOutput->Add(tmpHist);
815 
816  return tmpHist;
817 }
818 
819 //________________________________________________________________________
821 {
822  // Called once at the end of the analysis.
823 }
824 
Short_t Charge() const
Definition: AliEmcalJet.h:90
Double_t fEventCriteriumMinSubleadingJetPt
Min subleading jet.
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Double_t Area() const
Definition: AliEmcalJet.h:97
Double_t fEventCriteriumMinBackground
Minimum background.
Double_t GetRhoVal() const
Double_t GetJetEtaMin() const
T * AddHistogram1D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis")
const char * title
Definition: MakeQAPdf.C:26
TString fJetMatchingArrayName
Name of array used to match jets.
AliJetContainer * GetJetContainer(Int_t i=0) const
Double_t Eta() const
Definition: AliEmcalJet.h:88
Double_t Phi() const
Definition: AliEmcalJet.h:84
void * fJetsTreeBuffer
! buffer for one jet (that will be saved to the tree)
Container with name, TClonesArray and cuts for particles.
Support task for (charged) jet-hadron correlations.
Double_t GetJetEtaMax() const
void BinLogAxis(const THn *h, Int_t axisNumber)
Int_t fJetOutputMode
mode which jets are written to array (0: all accepted, 1: leading, 2: subleading, 3: leading+subleadi...
TList * fOutput
!output list
Simple class containing basic information for a constituent.
AliEmcalJet * fSubleadingJet
! subleading jet (calculated event-by-event)
Simple class containing basic information for a jet.
void FillHistogram3D(const char *key, Double_t x, Double_t y, Double_t z, Double_t add=0)
Double_t GetJetRadius(Int_t i=0) const
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:106
AliParticleContainer * GetParticleContainer(Int_t i=0) const
AliParticleContainer * GetParticleContainer() const
AliEmcalJet * GetLeadingJet(const char *opt="")
Double_t fEventCriteriumMaxBackground
Maximum background.
TString fJetParticleArrayName
Name of fJetsOutput array.
Double_t GetLeadingHadronPt(const AliEmcalJet *jet) const
T * AddHistogram3D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, Int_t zBins=100, Double_t zMin=0.0, Double_t zMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
Int_t fNumberOfCentralityBins
Number of centrality bins.
virtual AliVParticle * GetLeadingParticle(const char *opt="")
Double_t fExtractionPercentage
percentage that is recorded
Double_t fCent
!event centrality
TClonesArray * GetArray() const
TClonesArray * fJetsOutput
! Array of basic correlation particles attached to the event (jets)
TString fTrackParticleArrayName
Name of fTracksOutput array.
TClonesArray * fTracksOutput
! Array of basic correlation particles attached to the event (tracks)
void SetClassName(const char *clname)
AliEmcalJet * fLeadingJet
! leading jet (calculated event-by-event)
Double_t fExtractionMinPt
minimum pt of recorded jets
AliEmcalJet * GetNextAcceptJet()
TTree * fJetsTree
! Jets that will be saved to a tree (optionally)
Double_t Pt() const
Definition: AliEmcalJet.h:76
Bool_t IsTrackInCone(AliVParticle *track, Double_t eta, Double_t phi, Double_t radius)
void AddJetConstituent(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
Float_t GetJetRadius() const
Short_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:127
TClonesArray * fJetsInput
! Array of generated jets imported into task (toy model)
TH1 * fHistEventRejection
!book keep reasons for rejecting event
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
virtual AliVParticle * GetNextAcceptParticle()
TF1 * fRejectionFunction
Function describing the cut applied to jet const.
Int_t fAcceptedJets
! number accepted jets (calculated event-by-event)
void ResetCurrentID(Int_t i=-1)
T * AddHistogram2D(const char *name="CustomHistogram", const char *title="NO_TITLE", const char *options="", Int_t xBins=100, Double_t xMin=0.0, Double_t xMax=20.0, Int_t yBins=100, Double_t yMin=0.0, Double_t yMax=20.0, const char *xTitle="x axis", const char *yTitle="y axis", const char *zTitle="z axis")
Int_t fAcceptedTracks
! number accepted tracks (calculated event-by-event)