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