AliPhysics  608b256 (608b256)
AliAnalysisTaskEmcalSoftDropResponse.cxx
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (C) 2019, 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 <iostream>
28 #include <vector>
29 
30 #include <TArrayD.h>
31 #include <TBinning.h>
32 #include <TCustomBinning.h>
33 #include <TH1.h>
34 #include <TH2.h>
35 #include <TLorentzVector.h>
36 #include <TRandom.h>
37 
38 #include <fastjet/ClusterSequence.hh>
39 #include <fastjet/PseudoJet.hh>
40 #include <fastjet/contrib/SoftDrop.hh>
41 #include <fastjet/config.h>
42 #if FASJET_VERSION_NUMBER >= 30302
43 #include <fastjet/tools/Recluster.hh>
44 #else
45 #include <fastjet/contrib/Recluster.hh>
46 #endif
47 
48 #include <RooUnfoldResponse.h>
49 
50 #include <AliAODEvent.h>
51 #include <AliAODInputHandler.h>
52 #include <AliAnalysisManager.h>
54 #include <AliClusterContainer.h>
55 #include <AliEmcalJet.h>
57 #include <AliJetContainer.h>
58 #include <AliMCParticleContainer.h>
59 #include <AliTrackContainer.h>
60 #include <AliVCluster.h>
61 #include <AliVParticle.h>
62 #include <AliVTrack.h>
63 
65 
66 using namespace PWGJE::EMCALJetTasks;
67 
70  fBinningMode(kSDModeINT7),
71  fFractionResponseClosure(0.5),
72  fZcut(0.1),
73  fBeta(0.),
74  fReclusterizer(kCAAlgo),
75  fSampleFraction(1.),
76  fUseChargedConstituents(true),
77  fUseNeutralConstituents(true),
78  fNameMCParticles("mcparticles"),
79  fSampleSplitter(nullptr),
80  fSampleTrimmer(nullptr),
81  fPartLevelPtBinning(nullptr),
82  fDetLevelPtBinning(nullptr),
83  fZgResponse(nullptr),
84  fZgResponseClosure(nullptr),
85  fZgPartLevel(nullptr),
86  fZgDetLevel(nullptr),
87  fZgPartLevelTruncated(nullptr),
88  fZgPartLevelClosureNoResp(nullptr),
89  fZgDetLevelClosureNoResp(nullptr),
90  fZgPartLevelClosureResp(nullptr),
91  fZgDetLevelClosureResp(nullptr)
92 {
93 
94 }
95 
96 AliAnalysisTaskEmcalSoftDropResponse::AliAnalysisTaskEmcalSoftDropResponse(const char *name):
97  AliAnalysisTaskEmcalJet(name, kTRUE),
98  fBinningMode(kSDModeINT7),
99  fFractionResponseClosure(0.5),
100  fZcut(0.1),
101  fBeta(0.),
102  fReclusterizer(kCAAlgo),
103  fSampleFraction(1.),
104  fUseChargedConstituents(true),
105  fUseNeutralConstituents(true),
106  fNameMCParticles("mcparticles"),
107  fSampleSplitter(nullptr),
108  fSampleTrimmer(nullptr),
109  fPartLevelPtBinning(nullptr),
110  fDetLevelPtBinning(nullptr),
111  fZgResponse(nullptr),
112  fZgResponseClosure(nullptr),
113  fZgPartLevel(nullptr),
114  fZgDetLevel(nullptr),
115  fZgPartLevelTruncated(nullptr),
116  fZgPartLevelClosureNoResp(nullptr),
117  fZgDetLevelClosureNoResp(nullptr),
118  fZgPartLevelClosureResp(nullptr),
119  fZgDetLevelClosureResp(nullptr)
120 {
122 }
123 
127  if(fSampleSplitter) delete fSampleSplitter;
128  if(fSampleTrimmer) delete fSampleTrimmer;
129 }
130 
133 
134  fSampleSplitter = new TRandom;
135  if(fSampleFraction < 1.) fSampleTrimmer = new TRandom;
136 
139  auto zgbinning = GetZgBinning();
140  TArrayD binEdgesZg, binEdgesPtPart, binEdgesPtDet;
141  zgbinning->CreateBinEdges(binEdgesZg);
142  fPartLevelPtBinning->CreateBinEdges(binEdgesPtPart);
143  fDetLevelPtBinning->CreateBinEdges(binEdgesPtDet);
144 
145  fZgDetLevel = new TH2D("hZgDetLevel", "Zg response at detector level", binEdgesZg.GetSize() - 1, binEdgesZg.GetArray(), binEdgesPtDet.GetSize() - 1, binEdgesPtDet.GetArray());
146  fZgPartLevel = new TH2D("hZgPartLevel", "Zg response at particle level", binEdgesZg.GetSize() - 1, binEdgesZg.GetArray(), binEdgesPtDet.GetSize() - 1, binEdgesPtDet.GetArray());
147  fZgPartLevelTruncated = new TH2D("hZgPartLevelTruncated", "Zg response at particle level (truncated)", binEdgesZg.GetSize() - 1, binEdgesZg.GetArray(), binEdgesPtDet.GetSize() - 1, binEdgesPtDet.GetArray());
148 
149  // For closure test
150  fZgPartLevelClosureNoResp = new TH2D("hZgPartLevelClosureNoResp", "Zg response at particle level (closure test, jets not used for the response matrix)", binEdgesZg.GetSize() - 1, binEdgesZg.GetArray(), binEdgesPtDet.GetSize() - 1, binEdgesPtDet.GetArray());
151  fZgDetLevelClosureNoResp = new TH2D("hZgDetLevelClosureNoResp", "Zg response at detector level (closure test, jets not used for the response matrix)", binEdgesZg.GetSize() - 1, binEdgesZg.GetArray(), binEdgesPtDet.GetSize() - 1, binEdgesPtDet.GetArray());
152  fZgPartLevelClosureResp = new TH2D("hZgPartLevelClosureResp", "Zg response at particle level (closure test, jets used for the response matrix)", binEdgesZg.GetSize() - 1, binEdgesZg.GetArray(), binEdgesPtDet.GetSize() - 1, binEdgesPtDet.GetArray());
153  fZgDetLevelClosureResp = new TH2D("hZgDetLevelClosureResp", "Zg response at detector level (closure test, jets used for the response matrix)", binEdgesZg.GetSize() - 1, binEdgesZg.GetArray(), binEdgesPtDet.GetSize() - 1, binEdgesPtDet.GetArray());
154 
155  fZgResponse = new RooUnfoldResponse("hZgResponse", "z_{g} response matrix");
156  fZgResponse->Setup(fZgDetLevel, fZgPartLevel);
157  fZgResponseClosure = new RooUnfoldResponse("hZgResponseClosure", "z_{g} response matrix for the closure test");
158  fZgResponseClosure->Setup(fZgDetLevel, fZgPartLevel);
159 
160  fOutput->Add(fZgResponse);
162  fOutput->Add(fZgDetLevel);
163  fOutput->Add(fZgPartLevel);
164  fOutput->Add(fZgPartLevelTruncated);
165  fOutput->Add(fZgPartLevelClosureNoResp);
166  fOutput->Add(fZgDetLevelClosureNoResp);
167  fOutput->Add(fZgPartLevelClosureResp);
168  fOutput->Add(fZgDetLevelClosureResp);
169 
170  PostData(1, fOutput);
171 }
172 
174  if(!fMCRejectFilter) return true;
175  if(!(fIsPythia || fIsHerwig)) return true; // Only relevant for pt-hard production
176  AliDebugStream(1) << "Using custom MC outlier rejection" << std::endl;
177  auto partjets = GetJetContainer("partLevel");
178  if(!partjets) return true;
179 
180  // Check whether there is at least one particle level jet with pt above n * event pt-hard
181  auto jetiter = partjets->accepted();
182  auto max = std::max_element(jetiter.begin(), jetiter.end(), [](const AliEmcalJet *lhs, const AliEmcalJet *rhs ) { return lhs->Pt() < rhs->Pt(); });
183  if(max != jetiter.end()) {
184  // At least one jet found with pt > n * pt-hard
185  AliDebugStream(1) << "Found max jet with pt " << (*max)->Pt() << " GeV/c" << std::endl;
186  if((*max)->Pt() > fPtHardAndJetPtFactor * fPtHard) return false;
187  }
188  return true;
189 }
190 
192  AliJetContainer *partLevelJets = this->GetJetContainer("partLevel"),
193  *detLevelJets = GetJetContainer("detLevel");
197  if(!(partLevelJets || detLevelJets)) {
198  AliErrorStream() << "Either of the jet containers not found" << std::endl;
199  return kFALSE;
200  }
201 
202  if(fSampleFraction < 1.) {
203  if(fSampleTrimmer->Uniform() > fSampleFraction) return false;
204  }
205 
206  // get truncations at detector level
207  auto ptmindet = fZgDetLevel->GetYaxis()->GetBinLowEdge(1),
208  ptmaxdet = fZgDetLevel->GetYaxis()->GetBinUpEdge(fZgDetLevel->GetYaxis()->GetNbins());
209 
210  for(auto detjet : detLevelJets->accepted()){
211  auto partjet = detjet->ClosestJet();
212  if(!partjet) continue;
213 
214  // sample splitting (for closure test)
215  bool closureUseResponse = (fSampleSplitter->Uniform() < fFractionResponseClosure);
216 
217  // Get the softdrop response
218  std::vector<double> softdropDet, softdropPart;
219  try {
220  softdropDet = MakeSoftdrop(*detjet, detLevelJets->GetJetRadius(), tracks, clusters);
221  softdropPart = MakeSoftdrop(*partjet, partLevelJets->GetJetRadius(), particles, nullptr);
222  fZgPartLevel->Fill(softdropPart[0], partjet->Pt());
223  if(detjet->Pt() >= ptmindet && detjet->Pt() <= ptmaxdet) {
224  fZgPartLevelTruncated->Fill(softdropPart[0], partjet->Pt());
225  fZgDetLevel->Fill(softdropDet[0], detjet->Pt());
226  fZgResponse->Fill(softdropDet[0], detjet->Pt(), softdropPart[0], partjet->Pt());
227  if(closureUseResponse) {
228  fZgResponseClosure->Fill(softdropDet[0], detjet->Pt(), softdropPart[0], partjet->Pt());
229  fZgDetLevelClosureResp->Fill(softdropDet[0], detjet->Pt());
230  fZgPartLevelClosureResp->Fill(softdropPart[0], partjet->Pt());
231  } else {
232  fZgDetLevelClosureNoResp->Fill(softdropDet[0], detjet->Pt());
233  fZgPartLevelClosureNoResp->Fill(softdropPart[0], partjet->Pt());
234  }
235  }
236  } catch(...){
237  AliErrorStream() << "Error in softdrop evaluation - jet will be ignored" << std::endl;
238  continue;
239  }
240 
241  }
242  return kTRUE;
243 }
244 
245 std::vector<double> AliAnalysisTaskEmcalSoftDropResponse::MakeSoftdrop(const AliEmcalJet &jet, double jetradius, const AliParticleContainer *tracks, const AliClusterContainer *clusters) const {
246  const int kClusterOffset = 30000; // In order to handle tracks and clusters in the same index space the cluster index needs and offset, large enough so that there is no overlap with track indices
247  std::vector<fastjet::PseudoJet> constituents;
248  bool isMC = dynamic_cast<const AliMCParticleContainer *>(tracks);
249  AliDebugStream(2) << "Make new jet substrucutre for " << (isMC ? "MC" : "data") << " jet: Number of tracks " << jet.GetNumberOfTracks() << ", clusters " << jet.GetNumberOfClusters() << std::endl;
250  if(tracks && (fUseChargedConstituents || isMC)){ // Neutral particles part of particle container in case of MC
251  AliDebugStream(1) << "Jet substructure: Using charged constituents" << std::endl;
252  for(int itrk = 0; itrk < jet.GetNumberOfTracks(); itrk++){
253  auto track = jet.TrackAt(itrk, tracks->GetArray());
254  if(!track->Charge() && !fUseNeutralConstituents) continue; // Reject neutral constituents in case of using only charged consituents
255  if(track->Charge() && !fUseChargedConstituents) continue; // Reject charged constituents in case of using only neutral consituents
256  fastjet::PseudoJet constituentTrack(track->Px(), track->Py(), track->Pz(), track->E());
257  constituentTrack.set_user_index(jet.TrackAt(itrk));
258  constituents.push_back(constituentTrack);
259  }
260  }
261 
262  if(clusters && fUseNeutralConstituents){
263  AliDebugStream(1) << "Jet substructure: Using neutral constituents" << std::endl;
264  for(int icl = 0; icl < jet.GetNumberOfClusters(); icl++) {
265  auto cluster = jet.ClusterAt(icl, clusters->GetArray());
266  TLorentzVector clustervec;
267  cluster->GetMomentum(clustervec, fVertex, (AliVCluster::VCluUserDefEnergy_t)clusters->GetDefaultClusterEnergy());
268  fastjet::PseudoJet constituentCluster(clustervec.Px(), clustervec.Py(), clustervec.Pz(), cluster->GetHadCorrEnergy());
269  constituentCluster.set_user_index(jet.ClusterAt(icl) + kClusterOffset);
270  constituents.push_back(constituentCluster);
271  }
272  }
273 
274  AliDebugStream(3) << "Found " << constituents.size() << " constituents for jet with pt=" << jet.Pt() << " GeV/c" << std::endl;
275  if(!constituents.size()){
276  AliErrorStream() << "Jet has 0 constituents." << std::endl;
277  throw 1;
278  }
279  // Redo jet finding on constituents with a
280  fastjet::JetDefinition jetdef(fastjet::antikt_algorithm, jetradius*2, static_cast<fastjet::RecombinationScheme>(0), fastjet::BestFJ30 );
281  fastjet::ClusterSequence jetfinder(constituents, jetdef);
282  std::vector<fastjet::PseudoJet> outputjets = jetfinder.inclusive_jets(0);
283  auto sdjet = outputjets[0];
284  fastjet::contrib::SoftDrop softdropAlgorithm(fBeta, fZcut);
285  softdropAlgorithm.set_verbose_structure(kTRUE);
286  fastjet::JetAlgorithm reclusterizingAlgorithm;
287  switch(fReclusterizer) {
288  case kCAAlgo: reclusterizingAlgorithm = fastjet::cambridge_aachen_algorithm; break;
289  case kKTAlgo: reclusterizingAlgorithm = fastjet::kt_algorithm; break;
290  case kAKTAlgo: reclusterizingAlgorithm = fastjet::antikt_algorithm; break;
291  };
292 #if FASTJET_VERSION_NUMBER >= 30302
293  fastjet::Recluster reclusterizer(reclusterizingAlgorithm, 1, fastjet::Recluster::keep_only_hardest);
294 #else
295  fastjet::contrib::Recluster reclusterizer(reclusterizingAlgorithm, 1, true);
296 #endif
297  softdropAlgorithm.set_reclustering(kTRUE, &reclusterizer);
298  AliDebugStream(4) << "Jet has " << sdjet.constituents().size() << " constituents" << std::endl;
299  auto groomed = softdropAlgorithm(sdjet);
300  auto softdropstruct = groomed.structure_of<fastjet::contrib::SoftDrop>();
301 
302  std::vector<double> result ={softdropstruct.symmetry(),
303  groomed.m(),
304  softdropstruct.delta_R(),
305  groomed.perp(),
306  softdropstruct.mu(),
307  static_cast<double>(softdropstruct.dropped_count())};
308  return result;
309 }
310 
312  auto binning = new TCustomBinning;
313  binning->SetMinimum(0);
314  switch(fBinningMode) {
315  case kSDModeINT7: {
316  binning->AddStep(20., 20.);
317  binning->AddStep(40., 10.);
318  binning->AddStep(80., 20.);
319  binning->AddStep(120., 40.);
320  binning->AddStep(240., 120.);
321  break;
322  }
323  case kSDModeEJ1: {
324  binning->AddStep(80., 80.);
325  binning->AddStep(140., 10.);
326  binning->AddStep(200., 20.);
327  binning->AddStep(240., 40.);
328  binning->AddStep(400., 160.);
329  break;
330  }
331  case kSDModeEJ2: {
332  binning->AddStep(70., 70.);
333  binning->AddStep(100., 10.);
334  binning->AddStep(140., 20.);
335  binning->AddStep(400., 260.);
336  break;
337  }
338  };
339  return binning;
340 }
341 
343  auto binning = new TCustomBinning;
344  switch(fBinningMode) {
345  case kSDModeINT7: {
346  binning->SetMinimum(20);
347  binning->AddStep(40., 5.);
348  binning->AddStep(60., 10.);
349  binning->AddStep(80., 20.);
350  binning->AddStep(120., 40.);
351  break;
352  }
353  case kSDModeEJ1: {
354  binning->SetMinimum(80.);
355  binning->AddStep(120., 5.);
356  binning->AddStep(160., 10.);
357  binning->AddStep(200., 20.);
358  break;
359  }
360  case kSDModeEJ2: {
361  binning->SetMinimum(70.);
362  binning->AddStep(100., 5.);
363  binning->AddStep(120., 10.);
364  binning->AddStep(140., 20.);
365  break;
366  }
367  };
368  return binning;
369 }
370 
372  auto binning = new TCustomBinning;
373  binning->SetMinimum(0.);
374  binning->AddStep(0.1, 0.1);
375  binning->AddStep(0.5, 0.05);
376  return binning;
377 }
378 
380  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
381 
382  Bool_t isAOD(kFALSE);
383  AliInputEventHandler *inputhandler = static_cast<AliInputEventHandler *>(mgr->GetInputEventHandler());
384  if(inputhandler) {
385  if(inputhandler->IsA() == AliAODInputHandler::Class()){
386  std::cout << "Analysing AOD events\n";
387  isAOD = kTRUE;
388  } else {
389  std::cout << "Analysing ESD events\n";
390  }
391  }
392 
393  std::stringstream taskname;
394  taskname << "SoftdropResponsemaker_R" << std::setw(2) << std::setfill('0') << int(jetradius*10) << trigger;
395  AliAnalysisTaskEmcalSoftDropResponse *responsemaker = new AliAnalysisTaskEmcalSoftDropResponse(taskname.str().data());
396  responsemaker->SelectCollisionCandidates(AliVEvent::kINT7);
397  mgr->AddTask(responsemaker);
398 
399  TString partcontname(namepartcont);
400  if(partcontname == "usedefault") partcontname = "mcparticles";
401  AliParticleContainer *particles = responsemaker->AddMCParticleContainer(partcontname.Data());
402  particles->SetMinPt(0.);
403  responsemaker->SetNameMCParticleContainer(partcontname.Data());
404 
405  AliJetContainer *mcjets = responsemaker->AddJetContainer(
406  jettype,
408  recombinationScheme,
409  jetradius,
411  particles, nullptr);
412  mcjets->SetName("partLevel");
413  mcjets->SetJetPtCut(0.);
414  mcjets->SetMaxTrackPt(1000.);
415 
416  AliTrackContainer *tracks(nullptr);
417  if((jettype == AliJetContainer::kChargedJet) || (jettype == AliJetContainer::kFullJet)){
419  std::cout << "Track container name: " << tracks->GetName() << std::endl;
420  tracks->SetMinPt(0.15);
421  }
422  AliClusterContainer *clusters(nullptr);
423  if((jettype == AliJetContainer::kFullJet) || (jettype == AliJetContainer::kNeutralJet)){
424  std::cout << "Using full or neutral jets ..." << std::endl;
426  std::cout << "Cluster container name: " << clusters->GetName() << std::endl;
427  clusters->SetClusHadCorrEnergyCut(0.3); // 300 MeV E-cut
428  clusters->SetDefaultClusterEnergy(AliVCluster::kHadCorr);
429  } else {
430  std::cout << "Using charged jets ... " << std::endl;
431  }
432 
433  AliJetContainer *datajets = responsemaker->AddJetContainer(
434  jettype,
436  recombinationScheme,
437  jetradius,
439  tracks, clusters);
440  datajets->SetName("detLevel");
441  datajets->SetJetPtCut(0.);
442  datajets->SetMaxTrackPt(1000.);
443 
444  std::string jettypestring;
445  switch(jettype) {
446  case AliJetContainer::kFullJet: jettypestring = "FullJets"; break;
447  case AliJetContainer::kChargedJet: jettypestring = "ChargedJets"; break;
448  case AliJetContainer::kNeutralJet: jettypestring = "NeutralJets"; break;
449  default: jettypestring = "Undef";
450  };
451 
452  EBinningMode_t binmode(kSDModeINT7);
453  std::string triggerstring(trigger);
454  if(triggerstring == "EJ1") binmode = kSDModeEJ1;
455  else if(triggerstring == "EJ2") binmode = kSDModeEJ2;
456  responsemaker->SetBinningMode(binmode);
457 
458  // Connecting containers
459  std::stringstream outputfile, histname;
460  outputfile << mgr->GetCommonFileName() << ":SoftDropResponse_" << jettypestring << "_R" << std::setw(2) << std::setfill('0') << int(jetradius * 10.) << "_" << trigger;
461  histname << "SoftDropResponseHistos_" << jettypestring << "_R" << std::setw(2) << std::setfill('0') << int(jetradius * 10.) << "_" << trigger;
462  mgr->ConnectInput(responsemaker, 0, mgr->GetCommonInputContainer());
463  mgr->ConnectOutput(responsemaker, 1, mgr->CreateContainer(histname.str().data(), AliEmcalList::Class(), AliAnalysisManager::kOutputContainer, outputfile.str().data()));
464 
465  return responsemaker;
466 }
Bool_t fIsPythia
trigger, if it is a PYTHIA production
double Double_t
Definition: External.C:58
TH2 * fZgPartLevelClosureNoResp
! Zg vs. pt at particle level for closure test (jets not used for response)
AliJetContainer * GetJetContainer(Int_t i=0) const
void SetName(const char *n)
Set the name of the class of the objets inside the underlying array.
TH2 * fZgPartLevelClosureResp
! Zg vs. pt at particle level for closure test (jets used for response)
Container with name, TClonesArray and cuts for particles.
Int_t ClusterAt(Int_t idx) const
Definition: AliEmcalJet.h:137
void SetMinPt(Double_t min)
TH2 * fZgDetLevelClosureNoResp
! Zg vs. pt at detector level for closure test (jets not used for response)
AliJetContainer * AddJetContainer(const char *n, TString defaultCutType, Float_t jetRadius=0.4)
virtual void CreateBinEdges(TArrayD &binedges) const =0
TH2 * fZgPartLevelTruncated
! Zg vs. pt at particle level after truncation at
TH2 * fZgDetLevelClosureResp
! Zg vs. pt at detector level for closure test (jets used for response)
Interface for binnings used by the histogram handler.
Definition: TBinning.h:23
AliClusterContainer * AddClusterContainer(const char *n)
Create new cluster container and attach it to the task.
Container for particles within the EMCAL framework.
Int_t GetDefaultClusterEnergy() const
static AliAnalysisTaskEmcalSoftDropResponse * AddTaskEmcalSoftDropResponse(Double_t jetradius, AliJetContainer::EJetType_t jettype, AliJetContainer::ERecoScheme_t recombinationScheme, const char *namepartcont, const char *trigger)
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:160
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:139
Double_t fFractionResponseClosure
Fraction of events used for the response matrix in the closure test.
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
TPC fiducial acceptance (each eta edge narrowed by jet R)
Definition: AliEmcalJet.h:68
virtual Bool_t CheckMCOutliers()
Filter the mc tails in pt-hard distributions.
UShort_t GetNumberOfClusters() const
Definition: AliEmcalJet.h:138
void SetJetPtCut(Float_t cut)
TPC acceptance.
Definition: AliEmcalJet.h:67
Bool_t fIsHerwig
trigger, if it is a HERWIG production
Definition: External.C:228
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
Helper class creating user defined custom binning.
Float_t fPtHardAndJetPtFactor
Factor between ptHard and jet pT to reject/accept event.
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.
TClonesArray * GetArray() const
Bool_t fMCRejectFilter
enable the filtering of events by tail rejection
RooUnfoldResponse * fZgResponseClosure
! RooUnfold response for the closure test
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
Double_t Pt() const
Definition: AliEmcalJet.h:109
const char * GetName() const
Bool_t isMC
Float_t fPtHard
!event -hard
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
Double_t fVertex[3]
!event vertex
AliTrackContainer * AddTrackContainer(const char *n)
Create new track container and attach it to the task.
AliTrackContainer * GetTrackContainer(Int_t i=0) const
void SetMakeGeneralHistograms(Bool_t g)
Enable general histograms.
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Double32_t fSampleFraction
Fraction of statistics used for the analysis.
void UserCreateOutputObjects()
Main initialization function on the worker.
bool Bool_t
Definition: External.C:53
void SetDefaultClusterEnergy(Int_t d)
void SetMaxTrackPt(Float_t b)
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Definition: AliEmcalJet.h:70
Container for jet within the EMCAL jet framework.
std::vector< double > MakeSoftdrop(const AliEmcalJet &jet, double jetradius, const AliParticleContainer *tracks, const AliClusterContainer *clusters) const
void SetClusHadCorrEnergyCut(Double_t cut)
void SetMinimum(Double_t min)
static TString TrackContainerNameFactory(Bool_t isAOD)
Get name of the default track container.
static TString ClusterContainerNameFactory(Bool_t isAOD)
Get name of the default cluster container.