AliPhysics  9b6b435 (9b6b435)
AliAnalysisTaskEmcalJetHPerformance.cxx
Go to the documentation of this file.
1 
6 
7 #include <map>
8 #include <vector>
9 #include <iostream>
10 
11 #include <TObject.h>
12 #include <TCollection.h>
13 #include <TAxis.h>
14 #include <THnSparse.h>
15 
16 #include <AliAnalysisManager.h>
17 #include <AliLog.h>
18 
19 #include "yaml-cpp/yaml.h"
21 #include "AliTrackContainer.h"
22 #include "AliClusterContainer.h"
23 #include "AliEmcalContainerUtils.h"
24 #include "AliJetContainer.h"
25 #include "AliEmcalJet.h"
26 
28 
30 
31 namespace PWGJE {
32 namespace EMCALJetTasks {
33 
38  AliAnalysisTaskEmcalJet("AliAnalysisTaskEmcalJetHPerformance", kFALSE),
39  fYAMLConfig(),
40  fConfigurationInitialized(false),
41  fHistManager(),
42  fEmbeddingQA(),
43  fCreateQAHists(false),
44  fCreateResponseMatrix(false),
45  fEmbeddedCellsName("emcalCells"),
46  fResponseMatrixFillMap(),
47  fResponseFromThreeJetCollections(true),
48  fMinFractionShared(0.),
49  fLeadingHadronBiasType(AliAnalysisTaskEmcalJetHUtils::kCharged)
50 {
51 }
52 
57  AliAnalysisTaskEmcalJet(name, kTRUE),
58  fYAMLConfig(),
60  fHistManager(name),
61  fEmbeddingQA(),
62  fCreateQAHists(false),
63  fCreateResponseMatrix(false),
64  fEmbeddedCellsName("emcalCells"),
69 {
70  // Ensure that additional general histograms are created
72 }
73 
78  fYAMLConfig(other.fYAMLConfig),
80  fHistManager(other.fHistManager.GetName()),
81  //fEmbeddingQA(other.fEmbeddingQA), // Cannot use because the THistManager (which is in the class) copy constructor is private.
89 {
90  TIter next(other.fHistManager.GetListOfHistograms());
91  TObject* obj = 0;
92  while ((obj = next())) {
93  fHistManager.SetObject(obj, obj->GetName());
94  }
95 }
96 
102 {
103  swap(*this, other);
104  return *this;
105 }
106 
111 {
112  // Base class options
113  // Recycle unused embedded events
114  fYAMLConfig.GetProperty("recycleUnusedEmbeddedEventsMode", fRecycleUnusedEmbeddedEventsMode, false);
115  // Task physics (trigger) selection.
116  std::vector<std::string> physicsSelection;
117  bool res = fYAMLConfig.GetProperty(std::vector<std::string>({"eventCuts", "physicsSelection"}), physicsSelection, false);
118  if (res) {
119  fOfflineTriggerMask = AliEmcalContainerUtils::DeterminePhysicsSelectionFromYAML(physicsSelection);
120  }
121 
122  // Same ordering as in the constructor (for consistency)
123  std::string baseName = "enable";
124  // These are disabled by default.
125  fYAMLConfig.GetProperty({baseName, "QAHists"}, fCreateQAHists, false);
126  fYAMLConfig.GetProperty({baseName, "responseMatrix"}, fCreateResponseMatrix, false);
127 
128  // Event cuts
129  baseName = "eventCuts";
130  // If event cuts are enabled (which they exceptionally are by default), then we want to configure them here.
131  // If the event cuts are explicitly disabled, then we invert that value to enable the AliAnylsisTaskEmcal
132  // builtin event selection.
133  bool tempBool;
134  fYAMLConfig.GetProperty({baseName, "enabled"}, tempBool, false);
135  fUseBuiltinEventSelection = !tempBool;
136  if (fUseBuiltinEventSelection == false) {
137  // Need to include the namespace so that AliDebug will work properly...
138  std::string taskName = "PWGJE::EMCALJetTasks::";
139  taskName += GetName();
140  AliAnalysisTaskEmcalJetHUtils::ConfigureEventCuts(fAliEventCuts, fYAMLConfig, fOfflineTriggerMask, baseName, taskName);
141  }
142 
143  // General task options
144  baseName = "general";
145  fYAMLConfig.GetProperty({baseName, "nCentBins"}, fNcentBins, false);
146 
147  // QA options
148  baseName = "QA";
149  // Defaults to "emcalCells" if not set.
150  fYAMLConfig.GetProperty({baseName, "embeddedCellsName"}, fEmbeddedCellsName, false);
151 
152  // Response matrix properties
153  baseName = "responseMatrix";
154  fYAMLConfig.GetProperty({baseName, "useThreeJetCollections"}, fResponseFromThreeJetCollections, false);
155  fYAMLConfig.GetProperty({baseName, "minFractionSharedPt"}, fMinFractionShared, false);
156  std::string hadronBiasStr = "";
157  baseName = "jets";
158  res = fYAMLConfig.GetProperty({baseName, "leadingHadronBiasType"}, hadronBiasStr, false);
159  // Only attempt to set the property if it is retrieved successfully
160  if (res) {
162  }
163 }
164 
169 {
170  std::string baseName = "jets";
171  std::vector <std::string> jetNames = {"hybridLevelJets", "detLevelJets", "partLevelJets", "analysisJets"};
172  for (const auto & jetName : jetNames) {
173  // Retrieve the node just to see if it is exists. If so, then we can proceed
174  YAML::Node node;
175  bool res = fYAMLConfig.GetProperty(std::vector<std::string>({baseName, jetName}), node, false);
176  if (res) {
177  // Retrieve jet container properties
178  std::string collectionName = "", acceptance = "";
179  double R = -1;
180  fYAMLConfig.GetProperty({baseName, jetName, "collection"}, collectionName, true);
181  fYAMLConfig.GetProperty({baseName, jetName, "acceptance"}, acceptance, true);
182  fYAMLConfig.GetProperty({baseName, jetName, "R"}, R, true);
183 
184  // Create jet container and set the name
185  AliDebugStream(1) << "Creating jet from jet collection name " << collectionName << " with acceptance " << acceptance << " and R=" << R << "\n";
186  AliJetContainer * jetCont = AddJetContainer(collectionName.c_str(), acceptance.c_str(), R);
187  jetCont->SetName(jetName.c_str());
188 
189  // Leading hadron type
190  int leadingHadronType = -1;
191  bool res = fYAMLConfig.GetProperty({baseName, jetName, "leadingHadronType"}, leadingHadronType, false);
192  if (res) {
193  AliDebugStream(1) << "Setting leading hadron type of " << leadingHadronType << " for jet cont " << jetName << "\n";
194  jetCont->SetLeadingHadronType(leadingHadronType);
195  }
196  }
197  else {
198  AliInfoStream() << "Unable to find definition of jet container corresponding to \"" << jetName << "\"\n";
199  }
200  }
201 }
202 
207 {
209 
210  // Ensure that we have at least one configuration in the YAML config.
211  if (fYAMLConfig.DoesConfigurationExist(0) == false) {
212  // No configurations exist. Return immediately.
214  }
215 
216  // Always initialize for streaming purposes
218 
219  // Setup task based on the properties defined in the YAML config
220  AliDebugStream(2) << "Configuring task from the YAML configuration.\n";
223  AliDebugStream(2) << "Finished configuring via the YAML configuration.\n";
224 
225  // Print the results of the initialization
226  // Print outside of the ALICE Log system to ensure that it is always available!
227  std::cout << *this;
228 
231 }
232 
237 {
238  // First call the base class
240 
241  // Check that the task was initialized
243  AliFatal("Task was not initialized. Please ensure that Initialize() was called!");
244  }
245  // Reinitialize the YAML configuration
247 
248  // Create histograms
249  if (fCreateQAHists) {
250  SetupQAHists();
251  }
252  if (fCreateResponseMatrix) {
254  }
255 
256  // Store hist manager output in the output list
257  TIter next(fHistManager.GetListOfHistograms());
258  TObject* obj = 0;
259  while ((obj = next())) {
260  fOutput->Add(obj);
261  }
262 
263  // Initialize
265  if (embeddingHelper) {
266  bool res = fEmbeddingQA.Initialize();
267  if (res) {
269  }
270  }
271 
272  // Post the data when finished
273  PostData(1, fOutput);
274 }
275 
280 {
281  // Cell level QA
282  auto embeddingInstance = AliAnalysisTaskEmcalEmbeddingHelper::GetInstance();
283  if (embeddingInstance) {
284  std::string name = "QA/embedding/cells/fHistCellTime";
285  std::string title = name + ";E_{time} (s);counts";
286  fHistManager.CreateTH1(name.c_str(), title.c_str(), 1000, -10e-6, 10e-6);
287  }
288 
289  // Clusters
290  AliEmcalContainer* cont = 0;
291  TIter nextClusColl(&fClusterCollArray);
292  while ((cont = static_cast<AliClusterContainer*>(nextClusColl()))) {
293  // Cluster time vs energy
294  std::string name = "QA/%s/fHistClusterEnergyVsTime";
295  std::string title = name + ";E_{cluster} (GeV);t_{cluster} (s)";
296  fHistManager.CreateTH2(TString::Format(name.c_str(), cont->GetName()), TString::Format(title.c_str(), cont->GetName()), 1000, 0, 100, 300, -300e-9, 300e-9);
297  }
298 
299  // Jets
300  TIter nextJetColl(&fJetCollArray);
301  while ((cont = static_cast<AliJetContainer*>(nextJetColl()))) {
302  // Jet pT
303  std::string name = "QA/%s/fHistJetPt";
304  std::string title = name + ";p_{T} (GeV)";
305  fHistManager.CreateTH1(TString::Format(name.c_str(), cont->GetName()), TString::Format(title.c_str(), cont->GetName()), 500, 0, 250);
306  }
307 }
308 
313 {
314  // Main response matrix THnSparse
315  std::string name = "response/fHistResponseMatrix";
316  std::string title = name;
317 
318  // Retrieve binning from the YAML configuration
319  std::vector<TAxis *> binning;
320  // This structure is designed to preserve the order of the axis in the YAML by using a YAML sequence (decoded into
321  // a vector), while defining a pair of the axis name and axis limts. Using this structure avoids the need to create
322  // a new object and conversion to retrieve the data
323  std::vector<std::pair<std::string, std::vector<double>>> sparseAxes;
324  std::string baseName = "responseMatrix";
325  fYAMLConfig.GetProperty({baseName, "axes"}, sparseAxes, true);
326  for (auto axis : sparseAxes) {
327  auto axisLimits = axis.second;
328  AliDebugStream(3) << "Creating axis " << axis.first << " with nBins " << axisLimits.at(0) << ", min: " << axisLimits.at(1) << ", max: " << axisLimits.at(2) << "\n";
329  binning.emplace_back(new TAxis(axisLimits.at(0), axisLimits.at(1), axisLimits.at(2)));
330  }
331 
332  // "s" ensures that Sumw2() is called
333  // The explicit const_cast is required
334  THnSparse * hist = fHistManager.CreateTHnSparse(name.c_str(), title.c_str(), binning.size(), const_cast<const TAxis **>(binning.data()), "s");
335  // Set the axis titles
336  int axisNumber = 0;
337  for (auto axis = sparseAxes.begin(); axis != sparseAxes.end(); axis++) {
338  AliDebugStream(5) << "ResponseMatrix: Add axis " << axis->first << " to sparse\n";
339  hist->GetAxis(axisNumber)->SetTitle(axis->first.c_str());
340  axisNumber++;
341  }
342 
343  // Define mapping from value name to value (including jet information)
344  for (unsigned int iJet = 1; iJet < 3; iJet++)
345  {
346  // pt
347  // ex: p_{T,1}
348  fResponseMatrixFillMap.insert(std::make_pair(std::string("p_{T,") + std::to_string(iJet) + "}", std::make_pair(iJet, &ResponseMatrixFillWrapper::fPt)));
349  // Area
350  // ex: A_{jet,1}
351  fResponseMatrixFillMap.insert(std::make_pair(std::string("A_{jet,") + std::to_string(iJet) + "}", std::make_pair(iJet, &ResponseMatrixFillWrapper::fArea)));
352  // EP angle
353  // ex: #theta_{jet,1}^{EP}
354  fResponseMatrixFillMap.insert(std::make_pair(std::string("#theta_{jet,") + std::to_string(iJet) + "}^{EP}", std::make_pair(iJet, &ResponseMatrixFillWrapper::fRelativeEPAngle)));
355  // Leading hadron
356  // ex: p_{T,particle,1}^{leading} (GeV/c)
357  fResponseMatrixFillMap.insert(std::make_pair(std::string("p_{T,particle,") + std::to_string(iJet) + "}^{leading} (GeV/c)", std::make_pair(iJet, &ResponseMatrixFillWrapper::fLeadingHadronPt)));
358  }
359  // Distance from one jet to another
360  fResponseMatrixFillMap.insert(std::make_pair("distance", std::make_pair(1, &ResponseMatrixFillWrapper::fDistance)) );
361  // Centrality
362  fResponseMatrixFillMap.insert(std::make_pair("centrality", std::make_pair(1, &ResponseMatrixFillWrapper::fCentrality)) );
363 
364  // Shared momentum fraction
365  name = "fHistFractionSharedPt";
366  title = "Fraction of p_{T} shared between matched jets";
367  // Need to include the bin from 1-1.01 to ensure that jets which shared all of their momentum
368  // due not end up in the overflow bin!
369  fHistManager.CreateTH1(name.c_str(), title.c_str(), 101, 0, 1.01);
370 }
371 
376 {
377  // Only fill the embedding qa plots if:
378  // - We are using the embedding helper
379  // - The class has been initialized
380  if (fEmbeddingQA.IsInitialized()) {
382  }
383 
384  if (fCreateQAHists) {
385  QAHists();
386  }
387  if (fCreateResponseMatrix) {
388  ResponseMatrix();
389  }
390 
391  return kTRUE;
392 }
393 
398 {
399  // No additional processing is necessary
400  // Continue on to filling the histograms
401  FillQAHists();
402 }
403 
408 {
409  // Embedded cells
410  // Need to be retrieved manually since the base class only retrieves the cells in the internal event.
411  auto embeddingInstance = AliAnalysisTaskEmcalEmbeddingHelper::GetInstance();
412  if (embeddingInstance) {
413  auto embeddedCells = dynamic_cast<AliVCaloCells*>(
414  embeddingInstance->GetExternalEvent()->FindListObject(fEmbeddedCellsName.c_str()));
415  if (embeddedCells) {
416  AliDebugStream(4) << "Found embedded cells. N cells:" << embeddedCells->GetNumberOfCells() << "\n";
417  short absId = -1;
418  double eCell = 0;
419  double tCell = 0;
420  double eFrac = 0;
421  int mcLabel = -1;
422 
423  std::string histName = "QA/embedding/cells/fHistCellTime";
424  for (unsigned int iCell = 0; iCell < embeddedCells->GetNumberOfCells(); iCell++) {
425  embeddedCells->GetCell(iCell, absId, eCell, tCell, mcLabel, eFrac);
426 
427  AliDebugStream(5) << "Cell " << iCell << ": absId: " << absId << ", E: " << eCell << ", t: " << tCell
428  << ", mcLabel: " << mcLabel << ", eFrac: " << eFrac << "\n";
429  fHistManager.FillTH1(histName.c_str(), tCell);
430  }
431  }
432  }
433 
434  // Clusters
435  AliClusterContainer* clusCont = 0;
436  TIter nextClusColl(&fClusterCollArray);
437  AliVCluster * cluster = 0;
438  while ((clusCont = static_cast<AliClusterContainer*>(nextClusColl()))) {
439  for (auto clusIter : clusCont->accepted_momentum())
440  {
441  cluster = clusIter.second;
442  // Intentionally plotting against raw energy
443  fHistManager.FillTH2(TString::Format("QA/%s/fHistClusterEnergyVsTime", clusCont->GetName()), cluster->E(), cluster->GetTOF());
444  }
445  }
446 
447  // Jets
448  AliJetContainer * jetCont = 0;
449  TIter nextJetColl(&fJetCollArray);
450  while ((jetCont = static_cast<AliJetContainer*>(nextJetColl()))) {
451  for (auto jet : jetCont->accepted())
452  {
453  fHistManager.FillTH1(TString::Format("QA/%s/fHistJetPt", jetCont->GetName()), jet->Pt());
454  }
455  }
456 }
457 
462 {
463  AliJetContainer * jetsHybrid = GetJetContainer("hybridLevelJets");
464  AliJetContainer * jetsDetLevel = GetJetContainer("detLevelJets");
465  AliJetContainer * jetsPartLevel = GetJetContainer("partLevelJets");
466  if (!jetsHybrid) {
467  AliErrorStream() << "Could not retrieve hybrid jet collection.\n";
468  return;
469  }
470  if (!jetsDetLevel) {
471  AliErrorStream() << "Could not retrieve det level jet collection.\n";
472  return;
473  }
474  if (fResponseFromThreeJetCollections && !jetsPartLevel) {
475  AliErrorStream() << "Could not retrieve part level jet collection.\n";
476  return;
477  }
478 
479  // Handle matching of jets.
480  for (auto jet1 : jetsHybrid->accepted())
481  {
482  // Get jet the det level jet from the hybrid jet
483  AliEmcalJet * jet2 = jet1->ClosestJet();
484  if(!jet2) continue;
485 
486  AliDebugStream(4) << "jet2: " << jet2->toString() << "\n";
487 
488  // Check shared fraction
489  double sharedFraction = jetsHybrid->GetFractionSharedPt(jet1);
490  fHistManager.FillTH1("fHistFractionSharedPt", sharedFraction);
491  if (sharedFraction < fMinFractionShared) {
492  AliDebugStream(4) << "Rejecting jet due to momentum fraction of " << sharedFraction << ", smaller than the minimum.\n";
493  continue;
494  }
495  else {
496  AliDebugStream(4) << "Jet passed momentum fraction cut with value of " << sharedFraction << "\n";
497  }
498 
499  // Apply additional selection to jet 2
500  // TODO: Should we apply acceptance criteria to jet 2 here?
501 
502  // Get MC level jet
503  AliEmcalJet * jetToPass = 0;
505  AliEmcalJet * jet3 = jet2->ClosestJet();
506 
507  // Accept jet 3
508  UInt_t rejectionReason = 0;
509  if (!jetsPartLevel->AcceptJet(jet3, rejectionReason)) {
510  // TODO: Store rejection reasons
511  //fHistRejectionReason2->Fill(jets2->GetRejectionReasonBitPosition(rejectionReason), jet2->Pt());
512  continue;
513  }
514 
515  AliDebugStream(4) << "jet3: " << jet3->toString() << "\n";
516 
517  // Use for the response
518  AliDebugStream(4) << "Using part level jet for response\n";
519  jetToPass = jet3;
520  }
521  else {
522  // Use for the response
523  AliDebugStream(4) << "Using det level jet for response\n";
524  jetToPass = jet2;
525  }
526 
527  // Fill response
528  FillResponseMatrix(jet1, jetToPass);
529  }
530 
531 }
532 
537 {
538  if (!jet1 || !jet2) {
539  AliErrorStream() << "Null jet passed to fill response matrix";
540  }
541 
542  AliDebugStream(3) << "About to create ResponseMatrixFillWrappers\n";
543  AliDebugStream(4) << "jet1: " << jet1->toString() << "\n";
544  AliDebugStream(4) << "jet2: " << jet2->toString() << "\n";
545  // Create map from jetNumber to jet and initialize the objects
546  std::map<unsigned int, ResponseMatrixFillWrapper> jetNumberToJet = {
547  std::make_pair(1, CreateResponseMatrixFillWrapper(jet1)),
548  std::make_pair(2, CreateResponseMatrixFillWrapper(jet2))
549  };
550 
551  // Fill histograms
552  std::string histName = "response/fHistResponseMatrix";
553  std::vector<double> values;
554  THnSparse * response = static_cast<THnSparse*>(fHistManager.FindObject(histName.c_str()));
555  AliDebugStream(3) << "About to fill response matrix values\n";
556  AliDebugStream(4) << "jet1: " << jet1->toString() << "\n";
557  AliDebugStream(4) << "jet2: " << jet2->toString() << "\n";
558  for (unsigned int i = 0; i < response->GetNdimensions(); i++) {
559  std::string title = response->GetAxis(i)->GetTitle();
560 
561  // Retrieve pair of jet and pointer to extract the fill value
562  auto jetPair = fResponseMatrixFillMap.find(title);
563  if (jetPair != fResponseMatrixFillMap.end()) {
564  auto wrapper = jetNumberToJet.at(jetPair->second.first);
565  auto member = jetPair->second.second;
566  AliDebugStream(4) << "Filling value " << wrapper.*member << " into axis " << title << "\n";
567  values.emplace_back(wrapper.*member);
568  }
569  else {
570  AliWarningStream() << "Unable to fill dimension " << title << "!\n";
571  }
572  }
573 
574  fHistManager.FillTHnSparse(histName.c_str(), values.data());
575 }
576 
581 {
583  if (!jet) {
584  AliErrorStream() << "Must pass valid jet to create object.\n";
585  return wrapper;
586  }
587  wrapper.fPt = jet->Pt();
588  wrapper.fArea = jet->Area();
589  wrapper.fPhi = jet->Phi();
590  wrapper.fDistance = jet->ClosestJetDistance();
591  wrapper.fCentrality = fCent;
594 
595  return wrapper;
596 }
597 
604 {
605  // Get the pointer to the existing analysis manager via the static access method.
606  //==============================================================================
607  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
608  if (!mgr)
609  {
610  AliErrorClass("No analysis manager to connect to.");
611  return nullptr;
612  }
613 
614  // Setup task name
615  std::string taskName = "AliAnalysisTaskEmcalJetHPerformance";
616  std::string suffixName(suffix);
617  if (suffixName != "") {
618  taskName += "_";
619  taskName += suffixName;
620  }
621 
622  // Create task and configure as desired.
624  // Set a few general default.
625  task->SetNCentBins(5);
626  // Configuration is via YAML.
627  mgr->AddTask(task);
628 
629  // Create containers for input/output
630  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
631  AliAnalysisDataContainer * outputContainer = mgr->CreateContainer(task->GetName(),
632  TList::Class(),
633  AliAnalysisManager::kOutputContainer,
634  Form("%s", AliAnalysisManager::GetCommonFileName()));
635  mgr->ConnectOutput(task, 1, outputContainer);
636 
637  return task;
638 }
639 
646 {
647  std::stringstream tempSS;
648  tempSS << std::boolalpha;
649  tempSS << "Recycle unused embedded events: " << fRecycleUnusedEmbeddedEventsMode << "\n";
650  tempSS << "Jet collections:\n";
651  TIter next(&fJetCollArray);
652  AliJetContainer * jetCont;
653  while ((jetCont = static_cast<AliJetContainer *>(next()))) {
654  tempSS << "\t" << jetCont->GetName() << ": " << jetCont->GetArrayName() << "\n";
655  }
656  tempSS << "AliEventCuts\n";
657  tempSS << "\tEnabled: " << !fUseBuiltinEventSelection << "\n";
658  tempSS << "QA Hists:\n";
659  tempSS << "\tEnabled: " << fCreateQAHists << "\n";
660  tempSS << "Response matrix:\n";
661  tempSS << "\tEnabled: " << fCreateResponseMatrix << "\n";
662  tempSS << "\tConstruct response from 3 jet collections: " << fResponseFromThreeJetCollections << "\n";
663  tempSS << "\tMin fraction shared pt: " << fMinFractionShared << "\n";
664  tempSS << "\tJet leading hadron bias type: " << fLeadingHadronBiasType << "\n";
665  tempSS << "\tResponse matrix fill map: \n";
666  for (auto el : fResponseMatrixFillMap) {
667  tempSS << "\t\tProperty " << el.first << " applied to jet " << el.second.first << "\n";
668  }
669 
670  return tempSS.str();
671 }
672 
679 std::ostream & AliAnalysisTaskEmcalJetHPerformance::Print(std::ostream & in) const {
680  in << toString();
681  return in;
682 }
683 
691 {
692  Printf("%s", toString().c_str());
693 }
694 
695 } /* namespace EMCALJetTasks */
696 } /* namespace PWGJE */
697 
705 std::ostream & operator<<(std::ostream & in, const PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance & myTask)
706 {
707  std::ostream & result = myTask.Print(in);
708  return result;
709 }
710 
717 {
718  using std::swap;
719 
720  // Same ordering as in the constructors (for consistency)
721  swap(first.fYAMLConfig, second.fYAMLConfig);
723  //swap(first.fHistManager, second.fHistManager); // Skip here, because the THistManager copy constructor is private.
724  //swap(first.fEmbeddingQA, second.fEmbeddingQA); // Skip here, because the THistManager copy constructor is private.
725  swap(first.fCreateQAHists, second.fCreateQAHists);
732 }
Double_t Area() const
Definition: AliEmcalJet.h:130
TObjArray fClusterCollArray
cluster collection array
bool fResponseFromThreeJetCollections
If true, the det level jets in collection 2 are only an intermediate step. They are used to get part ...
const char * title
Definition: MakeQAPdf.C:27
AliEmcalJet * ClosestJet() const
Definition: AliEmcalJet.h:341
AliJetContainer * GetJetContainer(Int_t i=0) const
std::map< std::string, std::pair< int, double ResponseMatrixFillWrapper::* > > fResponseMatrixFillMap
! Map from axis title to pair of (jet number, function to retrieve fill value)
void SetName(const char *n)
Set the name of the class of the objets inside the underlying array.
Double_t ClosestJetDistance() const
Definition: AliEmcalJet.h:342
const AliClusterIterableMomentumContainer accepted_momentum() const
Bool_t fRecycleUnusedEmbeddedEventsMode
Allows the recycling of embedded events which fail internal event selection. See the embedding helper...
void SetLeadingHadronType(Int_t t)
Double_t Phi() const
Definition: AliEmcalJet.h:117
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
double fCentrality
! Centrality of the given jet (an event level property, but useful to here available here) ...
Double_t fEPV0
!event plane V0
Declaration of class AliAnalysisTaskEmcalEmbeddingHelper.
virtual Bool_t AcceptJet(Int_t i, UInt_t &rejectionReason) const
AliJetContainer * AddJetContainer(const char *n, TString defaultCutType, Float_t jetRadius=0.4)
AliAnalysisTaskEmcalJetHPerformance & operator=(AliAnalysisTaskEmcalJetHPerformance other)
bool GetProperty(std::vector< std::string > propertyPath, const std::string &propertyName, T &property, const bool requiredProperty) const
AliEmcalEmbeddingQA fEmbeddingQA
! Embedding QA hists (will only be added if embedding).
void SetObject(TObject *const o, const char *group="/")
Set a new group into the container into the parent group.
ResponseMatrixFillWrapper CreateResponseMatrixFillWrapper(AliEmcalJet *jet) const
PWG::Tools::AliYAMLConfiguration fYAMLConfig
YAML configuration file.
bool fCreateResponseMatrix
If true, create a response matrix with the available jet collections.
Bool_t fUseBuiltinEventSelection
Use builtin event selection of the AliAnalysisTaskEmcal instead of AliEventCuts.
bool DoesConfigurationExist(const int i) const
bool AddQAPlotsToList(TList *list)
std::string fEmbeddedCellsName
Set the embedded cells collection name.
AliAnalysisTaskEmcalJetHUtils::ELeadingHadronBiasType_t fLeadingHadronBiasType
Leading hadron in jet bias type (either charged, neutral, or both)
static void ConfigureEventCuts(AliEventCuts &eventCuts, PWG::Tools::AliYAMLConfiguration &yamlConfig, const UInt_t offlineTriggerMask, const std::string &baseName, const std::string &taskName)
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
bool IsInitialized() const
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.
static UInt_t DeterminePhysicsSelectionFromYAML(const std::vector< std::string > &selections)
TObject * FindObject(const char *name) const
Find an object inside the container.
bool fConfigurationInitialized
True if the task configuration has been successfully initialized.
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
Implementation of task to embed external events.
TString toString() const
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
Int_t fNcentBins
how many centrality bins
Base class for container structures within the EMCAL framework.
Double_t fCent
!event centrality
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
static AliAnalysisTaskEmcalJetHPerformance * AddTaskEmcalJetHPerformance(const char *suffix="")
static double RelativeEPAngle(double jetAngle, double epAngle)
TObjArray fJetCollArray
jet collection array
virtual void SetNCentBins(Int_t n)
static double GetLeadingHadronPt(AliEmcalJet *jet, ELeadingHadronBiasType_t leadingHadronType)
Double_t Pt() const
Definition: AliEmcalJet.h:109
const TString & GetArrayName() const
const char * GetName() const
AliEventCuts fAliEventCuts
Event cuts (run2 defaults)
AliEmcalList * fOutput
!output list
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
Double_t GetFractionSharedPt(const AliEmcalJet *jet, AliParticleContainer *cont2=0x0) const
const char Option_t
Definition: External.C:48
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
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.
void swap(PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &first, PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalJetHPerformance &second)
double fMinFractionShared
Minimum fraction of shared jet pt required for matching a hybrid jet to detector level.
Container for jet within the EMCAL jet framework.
static const std::map< std::string, ELeadingHadronBiasType_t > fgkLeadingHadronBiasMap
! Map from name to leading hadron bias used with the YAML config
friend std::ostream & operator<<(std::ostream &in, const AliAnalysisTaskEmcalJetHPerformance &myTask)
static const AliAnalysisTaskEmcalEmbeddingHelper * GetInstance()