AliPhysics  master (3d17d9d)
AliAnalysisTaskEmcalJetEnergySpectrum.cxx
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (C) 2017, Copyright Holders of the ALICE Collaboration *
3  * All rights reserved. *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions are met: *
7  * * Redistributions of source code must retain the above copyright *
8  * notice, this list of conditions and the following disclaimer. *
9  * * Redistributions in binary form must reproduce the above copyright *
10  * notice, this list of conditions and the following disclaimer in the *
11  * documentation and/or other materials provided with the distribution. *
12  * * Neither the name of the <organization> nor the *
13  * names of its contributors may be used to endorse or promote products *
14  * derived from this software without specific prior written permission. *
15  * *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
19  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
26  ************************************************************************************/
27 #include <algorithm>
28 #include <array>
29 #include <sstream>
30 #include <string>
31 #include <vector>
32 
33 #include <THistManager.h>
34 #include <TLinearBinning.h>
35 #include <TVariableBinning.h>
36 
37 #include "AliAODInputHandler.h"
38 #include "AliAnalysisManager.h"
42 #include "AliEmcalJet.h"
45 #include "AliEventCuts.h"
46 #include "AliInputEventHandler.h"
47 #include "AliJetContainer.h"
48 #include "AliLog.h"
49 #include "AliMultSelection.h"
50 #include "AliVEvent.h"
51 
53 
54 using namespace PWGJE::EMCALJetTasks;
55 
58  fHistos(nullptr),
59  fIsMC(false),
60  fFillHSparse(false),
61  fTriggerSelectionBits(AliVEvent::kAny),
62  fTriggerSelectionString(""),
63  fRequireSubsetMB(false),
64  fMinBiasTrigger(AliVEvent::kAny),
65  fNameTriggerDecisionContainer("EmcalTriggerDecision"),
66  fUseTriggerSelectionForData(false),
67  fUseDownscaleWeight(false),
68  fNameJetContainer("datajets"),
69  fRequestTriggerClusters(true),
70  fRequestCentrality(false),
71  fUseAliEventCuts(false),
72  fUseSumw2(false),
73  fUseMuonCalo(false),
74  fScaleShift(0.),
75  fCentralityEstimator("V0M"),
76  fUserPtBinning()
77 {
78  SetUseAliAnaUtils(true);
79 }
80 
82  AliAnalysisTaskEmcalJet(name.data(), true),
84  fIsMC(false),
85  fFillHSparse(false),
86  fTriggerSelectionBits(AliVEvent::kAny),
88  fRequireSubsetMB(false),
89  fMinBiasTrigger(AliVEvent::kAny),
90  fNameTriggerDecisionContainer("EmcalTriggerDecision"),
92  fUseDownscaleWeight(false),
93  fNameJetContainer("datajets"),
95  fRequestCentrality(false),
96  fUseAliEventCuts(false),
97  fUseSumw2(false),
98  fUseMuonCalo(false),
99  fScaleShift(0.),
100  fCentralityEstimator("V0M"),
102 {
103  SetUseAliAnaUtils(true);
104 }
105 
107  if(fHistos) delete fHistos;
108 }
109 
112 
113  if(!fUserPtBinning.GetSize()) {
114  // binning not set. apply default binning
115  AliInfoStream() << "Using default pt binning";
116  fUserPtBinning.Set(301);
117  double current(0.);
118  for(int istep = 0; istep < 301; istep++) {
119  fUserPtBinning[istep] = current;
120  current += 1;
121  }
122  }
123 
124  fHistos = new THistManager(Form("Histos_%s", GetName()));
125  fHistos->CreateTH1("hEventCounter", "Event counter histogram", 1, 0.5, 1.5);
126  fHistos->CreateTH1("hEventCounterAbs", "Event counter histogram absolute", 1, 0.5, 1.5);
127  fHistos->CreateTH1("hEventCentrality", "Event centrality", 100., 0., 100.);
128  fHistos->CreateTH1("hEventCentralityAbs", "Event centrality absolute", 100., 0., 100.);
129  fHistos->CreateTH1("hClusterCounter", "Event counter histogram", kTrgClusterN, -0.5, kTrgClusterN - 0.5);
130  fHistos->CreateTH1("hClusterCounterAbs", "Event counter histogram absolute", kTrgClusterN, -0.5, kTrgClusterN - 0.5);
131  fHistos->CreateTH2("hJetSpectrum", "Jet pt spectrum", kTrgClusterN, -0.5, kTrgClusterN - 0.5, 350., 0., 350., "s");
132  fHistos->CreateTH2("hJetSpectrumMax", "Max jet pt spectrum", kTrgClusterN, -0.5, kTrgClusterN - 0.5, 350., 0., 350., "s");
133  if(fFillHSparse) {
134  TLinearBinning centralitybinning(100, 0., 100.), etabinning(100, -1., 1.), phibinning(100., 0., 7.), nefbinning(100, 0., 1.), trgclusterbinning(kTrgClusterN, -0.5, kTrgClusterN -0.5);
135  TVariableBinning jetptbinning(fUserPtBinning);
136  const TBinning *binnings[6] = {&centralitybinning, &jetptbinning, &etabinning, &phibinning, &nefbinning, &trgclusterbinning};
137  fHistos->CreateTHnSparse("hJetTHnSparse", "jet thnsparse", 6, binnings, fUseSumw2 ? "s" : "");
138  fHistos->CreateTHnSparse("hMaxJetTHnSparse", "jet thnsparse", 6, binnings, fUseSumw2 ? "s" : "");
139  }
140 
141  // A bit of QA stuff
142  fHistos->CreateTH2("hQANEFPt", "Neutral energy fraction; p_{t} (GeV/c); NEF", 350, 0., 350., 100, 0., 1.);
143  fHistos->CreateTH2("hQAZchPt", "z_{ch,max}; p_{t} (GeV/c); z_{ch,max}", 350, 0., 350., 100, 0., 1.);
144  fHistos->CreateTH2("hQAZnePt", "z_{ne,max}; p_{t} (GeV/c); z_{ne,max}", 350, 0., 350., 100, 0., 1.);
145  fHistos->CreateTH2("hQANChPt", "Number of charged constituents; p_{t} (GeV/c); N_{ch}", 350, 0., 350., 100, 0., 100.);
146  fHistos->CreateTH2("hQANnePt", "Number of neutral constituents; p_{t} (GeV/c); N_{ne}", 350, 0., 350., 100, 0., 100.);
147  fHistos->CreateTH2("hQAConstPtCh", "p_{t} of charged constituents; p_{t,j} (GeV/c); p_{t,ch} (GeV/c)", 350, 0., 350., 350., 0., 350.);
148  fHistos->CreateTH2("hQAConstPtNe", "p_{t} of neutral constituents; p_{t,j} (GeV/c); p_{t,ne} (GeV/c)", 350, 0., 350., 350., 0., 350.);
149  fHistos->CreateTH2("hQAConstPtChMax", "p_{t} of max charged constituents; p_{t,j} (GeV/c); p_{t,ch} (GeV/c", 350, 0., 350., 350., 0., 350.);
150  fHistos->CreateTH2("hQAConstPtNeMax", "p_{t} of max neutral constituents; p_{t,j} (GeV/c); p_{t,ne} (GeV/c)", 350, 0., 350., 350., 0., 350.);
151  fHistos->CreateTH2("hQAEtaPhi", "eta-phi histogram for selected jets; #eta; #phi", 100, -1., 1., 100, 0., 7.);
152  fHistos->CreateTH2("hQAEtaPhiConstCh", "eta-phi histogram for selected jets; #eta; #phi", 100, -1., 1., 100, 0., 7.);
153  fHistos->CreateTH2("hQAEtaPhiConstNe", "eta-phi histogram for selected jets; #eta; #phi", 100, -1., 1., 100, 0., 7.);
154 
155  for(auto h : *fHistos->GetListOfHistograms()) fOutput->Add(h);
156  PostData(1, fOutput);
157 }
158 
160  if(!fMCRejectFilter) return true;
161  if(!(fIsPythia || fIsHerwig)) return true; // Only relevant for pt-hard production
162  AliDebugStream(1) << "Using custom MC outlier rejection" << std::endl;
163  auto partjets = GetJetContainer("partjets");
164  if(!partjets) return true;
165 
166  // Check whether there is at least one particle level jet with pt above n * event pt-hard
167  auto jetiter = partjets->accepted();
168  auto max = std::max_element(jetiter.begin(), jetiter.end(), [](const AliEmcalJet *lhs, const AliEmcalJet *rhs ) { return lhs->Pt() < rhs->Pt(); });
169  if(max != jetiter.end()) {
170  // At least one jet found with pt > n * pt-hard
171  AliDebugStream(1) << "Found max jet with pt " << (*max)->Pt() << " GeV/c" << std::endl;
172  if((*max)->Pt() > fPtHardAndJetPtFactor * fPtHard) return false;
173  }
174  return true;
175 }
176 
178  auto datajets = this->GetJetContainer(fNameJetContainer);
179  auto clusters = this->GetClusterContainer(0);
180  auto tracks = this->GetTrackContainer(0);
181  if(!datajets) {
182  AliErrorStream() << "Jet container " << fNameJetContainer << " not found" << std::endl;
183  return false;
184  }
185 
186  double eventCentrality = 99; // without centrality put everything in the peripheral bin
187  if(fRequestCentrality){
188  AliMultSelection *mult = dynamic_cast<AliMultSelection *>(InputEvent()->FindListObject("MultSelection"));
189  if(!mult){
190  AliErrorStream() << GetName() << ": Centrality selection enabled but no centrality estimator found" << std::endl;
191  return false;
192  }
193  if(mult->IsEventSelected()) return false;
194  eventCentrality = mult->GetEstimator(fCentralityEstimator)->GetPercentile();
195  AliDebugStream(1) << GetName() << ": Centrality " << eventCentrality << std::endl;
196  } else {
197  AliDebugStream(1) << GetName() << ": No centrality selection applied" << std::endl;
198  }
199 
200 
201  auto trgclusters = GetTriggerClustersANY();
202  if(!fIsMC && fRequestTriggerClusters) trgclusters = GetTriggerClusterIndices(fInputEvent->GetFiredTriggerClasses().Data());
203  Double_t weight = 1.;
204  if(fUseDownscaleWeight) {
206  }
207  fHistos->FillTH1("hEventCounterAbs", 1.);
208  fHistos->FillTH1("hEventCounter", weight);
209  fHistos->FillTH1("hEventCentralityAbs", eventCentrality);
210  fHistos->FillTH1("hEventCentrality", eventCentrality, weight);
211  AliEmcalJet *maxjet(nullptr);
212  for(auto t : trgclusters) {
213  fHistos->FillTH1("hClusterCounterAbs", t);
214  fHistos->FillTH1("hClusterCounter", t, weight);
215  }
216  for(auto j : datajets->accepted()){
217  if(!maxjet || (j->E() > maxjet->E())) maxjet = j;
218  Double_t ptjet = j->Pt();
219  if(TMath::Abs(fScaleShift) > DBL_EPSILON){
220  // Apply artificial (fixed) shift of the jet energy scale to det. level jets
221  ptjet += fScaleShift * ptjet;
222  }
223  double datapoint[6] = {eventCentrality, ptjet, j->Eta(), TVector2::Phi_0_2pi(j->Phi()), j->NEF(), 0.};
224  for(auto t : trgclusters){
225  fHistos->FillTH2("hJetSpectrum", static_cast<double>(t), ptjet, weight);
226  if(fFillHSparse) {
227  datapoint[5] = static_cast<double>(t);
228  fHistos->FillTHnSparse("hJetTHnSparse", datapoint, weight);
229  }
230  }
231 
232  // Fill QA plots - trigger cluster independent
233  // Those plots have been in before (as part of the THnSparse) but were
234  // removed in order to reduce the memory consumption.
235  fHistos->FillTH2("hQANEFPt", ptjet, j->NEF(), weight);
236  fHistos->FillTH2("hQAEtaPhi", j->Eta(), j->Phi(), weight);
237  if(clusters){
238  auto leadcluster = j->GetLeadingCluster(clusters->GetArray());
239  if(leadcluster) {
240  TLorentzVector ptvec;
241  leadcluster->GetMomentum(ptvec, fVertex, (AliVCluster::VCluUserDefEnergy_t)clusters->GetDefaultClusterEnergy());
242  fHistos->FillTH2("hQAZnePt", ptjet, j->GetZ(ptvec.Px(), ptvec.Py(), ptvec.Pz()), weight);
243  fHistos->FillTH2("hQAConstPtNeMax", ptjet, ptvec.Pt(), weight);
244  } else {
245  fHistos->FillTH2("hQAZnePt", ptjet, 0., weight);
246  fHistos->FillTH2("hQAConstPtNeMax", ptjet, 0., weight);
247  }
248  for(auto ine = 0; ine < j->GetNumberOfClusters(); ine++){
249  auto cluster = j->Cluster(ine);
250  TLorentzVector ptvec;
251  cluster->GetMomentum(ptvec, fVertex,(AliVCluster::VCluUserDefEnergy_t)clusters->GetDefaultClusterEnergy());
252  fHistos->FillTH2("hQAConstPtNe", ptjet, ptvec.Pt(), weight);
253  fHistos->FillTH2("hQAEtaPhiConstNe", ptvec.Eta(), TVector2::Phi_0_2pi(ptvec.Phi()));
254  }
255  }
256  if(tracks){
257  auto leadingtrack = j->GetLeadingTrack(tracks->GetArray());
258  if(leadingtrack) {
259  fHistos->FillTH2("hQAZchPt", ptjet, j->GetZ(leadingtrack->Px(), leadingtrack->Py(), leadingtrack->Pz()), weight);
260  fHistos->FillTH2("hQAConstPtChMax", ptjet, leadingtrack->Pt(), weight);
261  } else {
262  fHistos->FillTH2("hQAZchPt", ptjet, 0., weight);
263  fHistos->FillTH2("hQAConstPtChMax", ptjet, 0., weight);
264  }
265  for(int ich = 0; ich < j->GetNumberOfTracks(); ich++){
266  auto track = j->Track(ich);
267  fHistos->FillTH2("hQAConstPtCh", ptjet, track->Pt(), weight);
268  fHistos->FillTH2("hQAEtaPhiConstCh", track->Eta(), TVector2::Phi_0_2pi(track->Phi()), weight);
269  }
270  }
271  fHistos->FillTH2("hQANChPt", ptjet, j->GetNumberOfTracks(), weight);
272  fHistos->FillTH2("hQANnePt", ptjet, j->GetNumberOfClusters(), weight);
273  }
274 
275  double maxdata[6];
276  memset(maxdata, 0., sizeof(double) * 5);
277  maxdata[0] = eventCentrality;
278  if(maxjet){
279  maxdata[1] = maxjet->Pt();
280  if(TMath::Abs(fScaleShift) > DBL_EPSILON) {
281  maxdata[1] += fScaleShift * maxdata[1];
282  }
283  maxdata[2] = maxjet->Eta();
284  maxdata[3] = maxjet->Phi();
285  maxdata[4] = maxjet->NEF();
286  }
287  for(auto t : trgclusters){
288  fHistos->FillTH2("hJetSpectrumMax", t, maxdata[1], weight);
289  if(fFillHSparse){
290  maxdata[5] = static_cast<double>(t);
291  fHistos->FillTHnSparse("hMaxJetTHnSparse", maxdata, weight);
292  }
293  }
294  return true;
295 }
296 
298  if(fUseDownscaleWeight) {
299  auto downscalehandler = PWG::EMCAL::AliEmcalDownscaleFactorsOCDB::Instance();
300  if(downscalehandler->GetCurrentRun() != newrun){
301  downscalehandler->SetRun(newrun);
302  }
303  }
304 }
305 
307  if(!fIsMC){
308  // Pure data - do EMCAL trigger selection from selection string
309  UInt_t triggerbits = fTriggerSelectionBits;
310  if(fUseMuonCalo) fTriggerSelectionBits = AliVEvent::kMuonCalo; // in case of the muon-calo / calo(fast) cluster all data is in the
311  if(!(fInputHandler->IsEventSelected() & triggerbits)) return false;
312  if(fTriggerSelectionString.Length()) {
313  if(!fInputEvent->GetFiredTriggerClasses().Contains(fTriggerSelectionString)) return false;
314  if(fRequireSubsetMB && !(fInputHandler->IsEventSelected() & fMinBiasTrigger)) return false; // Require EMCAL trigger to be subset of the min. bias trigger (for efficiency studies)
315  if((fTriggerSelectionString.Contains("EJ") || fTriggerSelectionString.Contains("EG") || fTriggerSelectionString.Contains("DJ") || fTriggerSelectionString.Contains("DG")) && fUseTriggerSelectionForData) {
316  auto trgselresult = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer *>(fInputEvent->FindListObject(fNameTriggerDecisionContainer));
317  AliDebugStream(1) << "Found trigger decision object: " << (trgselresult ? "yes" : "no") << std::endl;
318  if(!trgselresult){
319  AliErrorStream() << "Trigger decision container with name " << fNameTriggerDecisionContainer << " not found in event - not possible to select EMCAL triggers" << std::endl;
320  return false;
321  }
322  if(!trgselresult->IsEventSelected(fTriggerSelectionString)) return false;
323  }
324  }
325  } else {
326  if(!(fInputHandler->IsEventSelected() & AliVEvent::kINT7)) return false;
328  // Simulation - do EMCAL trigger selection from trigger selection object
329  auto mctrigger = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer *>(fInputEvent->FindListObject(fNameTriggerDecisionContainer));
330  AliDebugStream(1) << "Found trigger decision object: " << (mctrigger ? "yes" : "no") << std::endl;
331  if(!mctrigger){
332  AliErrorStream() << "Trigger decision container with name " << fNameTriggerDecisionContainer << " not found in event - not possible to select EMCAL triggers" << std::endl;
333  return false;
334  }
335  if(!mctrigger->IsEventSelected(fTriggerSelectionString)) return false;
336  }
337  }
338  return true;
339 }
340 
342  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
343  if(!mgr) {
344  std::cerr << "Analysis manager not initialized" << std::endl;
345  return nullptr;
346  }
347 
348  Bool_t isAOD(kFALSE);
349  AliInputEventHandler *inputhandler = static_cast<AliInputEventHandler *>(mgr->GetInputEventHandler());
350  if(inputhandler) {
351  if(inputhandler->IsA() == AliAODInputHandler::Class()){
352  std::cout << "Analysing AOD events\n";
353  isAOD = kTRUE;
354  } else {
355  std::cout << "Analysing ESD events\n";
356  }
357  }
358 
359  std::string jettypestring;
361  switch(jettype){
362  case AliJetContainer::kChargedJet: jettypestring = "ChargedJets"; acctype = AliJetContainer::kTPCfid; break;
363  case AliJetContainer::kFullJet: jettypestring = "FullJets"; acctype = AliJetContainer::kEMCALfid; break;
364  case AliJetContainer::kNeutralJet: jettypestring = "NeutralJets"; acctype = AliJetContainer::kEMCALfid; break;
366  };
367 
368  std::stringstream tag, outfilename;
369  tag << jettypestring << "_R" << std::setw(2) << std::setfill('0') << int(radius * 10.) << "_" << trigger;
370  if(suffix.length()) {
371  tag << "_" << suffix;
372  }
373  auto task = new AliAnalysisTaskEmcalJetEnergySpectrum(Form("JetEnergySpectrum_%s", tag.str().data()));
374  task->SetIsMC(isMC);
375  mgr->AddTask(task);
376 
377  auto contains = [](EMCAL_STRINGVIEW str, EMCAL_STRINGVIEW test) {
378  return str.find(test) != std::string::npos;
379  };
380 
381  std::string trgstr(trigger);
382  if(contains(trgstr, "INT7")) task->SetTriggerSelection(AliVEvent::kINT7, "INT7");
383  else if(contains(trgstr, "EJ1")) task->SetTriggerSelection(AliVEvent::kEMCEJE, "EJ1");
384  else if(contains(trgstr, "EJ2")) task->SetTriggerSelection(AliVEvent::kEMCEJE, "EJ2");
385  else if(contains(trgstr, "EG1")) task->SetTriggerSelection(AliVEvent::kEMCEGA, "EG1");
386  else if(contains(trgstr, "EG2")) task->SetTriggerSelection(AliVEvent::kEMCEGA, "EG2");
387 
388  // Connect particle and cluster container
389  AliTrackContainer *tracks(nullptr);
390  AliClusterContainer *clusters(nullptr);
391  if(jettype == AliJetContainer::kChargedJet || jettype == AliJetContainer::kFullJet) {
393  tracks->SetMinPt(0.15);
394  }
395  if(jettype == AliJetContainer::kNeutralJet || jettype == AliJetContainer::kFullJet){
396  clusters = task->AddClusterContainer(EMCalTriggerPtAnalysis::AliEmcalAnalysisFactory::ClusterContainerNameFactory(isAOD));
397  clusters->SetDefaultClusterEnergy(energydef);
398  clusters->SetClusUserDefEnergyCut(energydef, 0.3);
399  }
400 
401 
402  // Create proper jet container
403  auto jetcont = task->AddJetContainer(jettype, AliJetContainer::antikt_algorithm, recoscheme, radius, acctype, tracks, clusters);
404  jetcont->SetName("datajets");
405  task->SetNameJetContainer("datajets");
406  std::cout << "Adding jet container with underlying array:" << jetcont->GetArrayName() << std::endl;
407 
408  if(isMC){
409  // Create also particle and particle level jet container for outlier rejection
410  TString partcontname = namepartcont;
411  if(partcontname == "usedefault") partcontname = "mcparticles";
412  auto partcont = task->AddMCParticleContainer(partcontname.Data());
413  partcont->SetMinPt(0.);
414 
415  //AliJetContainer::EJetType_t mcjettype = (jettype == AliJetContainer::kNeutralJet) ? AliJetContainer::kFullJet : jettype;
417  auto pjcont = task->AddJetContainer(mcjettype, AliJetContainer::antikt_algorithm, recoscheme, radius, AliJetContainer::kTPCfid, partcont, nullptr);
418  pjcont->SetName("partjets");
419  pjcont->SetMinPt(0);
420  pjcont->SetMaxTrackPt(1000.);
421  }
422 
423  // Link input and output container
424  outfilename << mgr->GetCommonFileName() << ":JetSpectrum_" << tag.str().data();
425  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
426  mgr->ConnectOutput(task, 1, mgr->CreateContainer(Form("JetSpectrum_%s", tag.str().data()), TList::Class(), AliAnalysisManager::kOutputContainer, outfilename.str().data()));
427 
428  return task;
429 }
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Bool_t fIsPythia
trigger, if it is a PYTHIA production
double Double_t
Definition: External.C:58
Class creating a variable binning, used in the histogram manager.
Class creating a linear binning, used in the histogram manager.
AliJetContainer * GetJetContainer(Int_t i=0) const
Double_t Eta() const
Definition: AliEmcalJet.h:121
virtual bool Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
Double_t Phi() const
Definition: AliEmcalJet.h:117
Container with name, TClonesArray and cuts for particles.
void SetUseAliAnaUtils(Bool_t b, Bool_t bRejPilup=kTRUE)
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
static AliEmcalDownscaleFactorsOCDB * Instance()
void SetMinPt(Double_t min)
Double_t GetDownscaleFactorForTriggerClass(const TString &trigger) const
Double_t E() const
Definition: AliEmcalJet.h:119
Interface for binnings used by the histogram handler.
Definition: TBinning.h:23
virtual void RunChanged(Int_t newrun)
Process tasks relevant when a file with a different run number is processed.
void SetClusUserDefEnergyCut(Int_t t, Double_t cut)
std::string MatchTrigger(EMCAL_STRINGVIEW striggerstring, EMCAL_STRINGVIEW triggerselectionstring, bool useMuonCalo=false) const
std::vector< TriggerCluster_t > GetTriggerClusterIndices(EMCAL_STRINGVIEW triggerstring) const
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
Bool_t fUseSumw2
Switch for sumw2 option in THnSparse (should not be used when a downscale weight is applied) ...
Bool_t fUseTriggerSelectionForData
Use trigger selection on data (require trigger patch in addition to trigger selection string) ...
Bool_t fIsHerwig
trigger, if it is a HERWIG production
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
Float_t fPtHardAndJetPtFactor
Factor between ptHard and jet pT to reject/accept event.
Bool_t fMCRejectFilter
enable the filtering of events by tail rejection
TPC fiducial acceptance (each eta edge narrowed by jet R)
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
Double_t Pt() const
Definition: AliEmcalJet.h:109
Bool_t isMC
Float_t fPtHard
!event -hard
Bool_t fRequireSubsetMB
Require for triggers to be a subset of Min. Bias (for efficiency studies)
AliEmcalList * fOutput
!output list
Double_t fVertex[3]
!event vertex
AliTrackContainer * GetTrackContainer(Int_t i=0) const
Bool_t fUseMuonCalo
Use events from the (muon)-calo-(fast) cluster.
#define EMCAL_STRINGVIEW
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Container class for histograms.
Definition: THistManager.h:99
void test(int runnumber=195345)
void UserCreateOutputObjects()
Main initialization function on the worker.
bool Bool_t
Definition: External.C:53
virtual Bool_t CheckMCOutliers()
Filter the mc tails in pt-hard distributions.
Double_t NEF() const
Definition: AliEmcalJet.h:148
void SetDefaultClusterEnergy(Int_t d)
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Create a new THnSparse within the container.
Container structure for EMCAL clusters.
static AliAnalysisTaskEmcalJetEnergySpectrum * AddTaskJetEnergySpectrum(Bool_t isMC, AliJetContainer::EJetType_t jettype, AliJetContainer::ERecoScheme_t recoscheme, AliVCluster::VCluUserDefEnergy_t energydef, double radius, EMCAL_STRINGVIEW namepartcont, EMCAL_STRINGVIEW trigger, EMCAL_STRINGVIEW suffix="")
ULong_t fMinBiasTrigger
Min bias trigger for trigger subset (for efficiency studies)
static TString ClusterContainerNameFactory(Bool_t isAOD)
Get name of the default cluster container.
static TString TrackContainerNameFactory(Bool_t isAOD)
Get name of the default track container.