18 #include <AliAnalysisManager.h> 19 #include <AliVEventHandler.h> 20 #include <AliESDEvent.h> 21 #include <AliAODEvent.h> 22 #include <AliEMCALGeometry.h> 23 #include <AliVCaloCells.h> 25 #include <AliCentrality.h> 26 #include "AliMultSelection.h" 44 fUserConfigurationFilename(
""),
45 fDefaultConfigurationFilename(
""),
46 fOrderedComponentsToExecute(),
47 fCorrectionComponents(),
48 fConfigurationInitialized(false),
50 fEventInitialized(false),
51 fRecycleUnusedEmbeddedEventsMode(false),
58 fUseNewCentralityEstimation(kFALSE),
71 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
117 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
122 DefineInput(0, TChain::Class());
123 DefineOutput(1, TList::Class());
152 fNVertCont(task.fNVertCont),
153 fBeamType(task.fBeamType),
154 fForceBeamType(task.fForceBeamType),
155 fNeedEmcalGeom(task.fNeedEmcalGeom),
157 fParticleCollArray(*(static_cast<TObjArray *>(task.fParticleCollArray.Clone()))),
158 fClusterCollArray(*(static_cast<TObjArray *>(task.fClusterCollArray.Clone()))),
159 fOutput(task.fOutput)
162 std::copy(std::begin(task.fVertex), std::end(task.fVertex), std::begin(fVertex));
165 for (
auto cellCont : task.fCellCollArray)
241 AliVEventHandler *evhand = mgr->GetInputEventHandler();
243 if (evhand->InheritsFrom(
"AliESDInputHandler")) {
251 AliError(
"Event handler not found!");
255 AliError(
"Analysis manager not found!");
259 std::string tempName = GetName();
260 std::size_t foundSuffix = tempName.find(
"_");
261 if (foundSuffix != std::string::npos) {
263 fSuffix = tempName.substr(foundSuffix + 1).c_str();
267 AliInfoStream() <<
"Initializing correction task with suffix \"" <<
fSuffix <<
"\"" << std::endl;
275 AliFatal(
"YAML configuration must be initialized before running (ie. in the run macro or wagon)!");
303 if (removeDummyTask ==
true) {
309 std::cout << GetName() <<
" Settings:\n" << *
this;
321 AliErrorStream() <<
"No analysis manager to connect to.\n";
326 std::string dummyTaskName = GetName();
327 dummyTaskName +=
"_dummyTask";
332 AliErrorStream() <<
"Could not remove dummy task \"" << dummyTaskName <<
"\" from analysis manager! Was it added?\n";
335 tasks->Remove(dummyTask);
336 AliDebugStream(1) <<
"Removed dummy task named \"" << dummyTaskName <<
"\".\n";
339 AliErrorStream() <<
"Could not retrieve tasks from the analysis manager.\n";
364 if (returnValue >= 0) {
368 AliInfoStream() <<
"User file at \"" <<
fUserConfigurationFilename <<
"\" does not exist! All settings will be from the default file!\n";
373 if (returnValue >= 0) {
399 std::vector <std::string> executionOrder;
405 std::set <std::string> possibleComponents;
408 possibleComponents.insert(node.first.as<std::string>());
412 possibleComponents.insert(node.first.as<std::string>());
416 std::string expectedComponentName =
"";
417 bool foundSuffixComponent =
false;
418 bool foundComponent =
false;
419 bool componentEnabled =
true;
422 for (
auto & execName : executionOrder)
425 expectedComponentName = TString::Format(
"%s_%s", execName.c_str(),
fSuffix.c_str()).
Data();
426 foundComponent =
false;
427 componentEnabled =
false;
435 if (componentEnabled ==
true) {
436 foundSuffixComponent =
true;
437 correctionComponents.push_back(expectedComponentName);
440 AliInfo(TString::Format(
"Component %s is disabled and will not be run!", expectedComponentName.c_str()));
448 expectedComponentName = execName;
453 if (componentEnabled ==
true) {
454 if (foundSuffixComponent ==
true) {
455 AliFatal(TString::Format(
"Found earlier component %s with suffix \"%s\", but could not found component %s with that same suffix!", correctionComponents.back().c_str(),
fSuffix.c_str(), expectedComponentName.c_str()));
459 correctionComponents.push_back(expectedComponentName);
463 AliInfo(TString::Format(
"Component %s is disabled and will not be run!", expectedComponentName.c_str()));
469 AliDebug(2,
"Found EMCal Correction Components: ");
470 for (
auto & component : correctionComponents)
472 component =
"AliEmcalCorrection" + component;
473 AliDebug(2, TString::Format(
"%s", component.c_str()) );
492 std::set <std::string> userPropertyNames;
493 std::set <std::string> defaultPropertyNames;
495 bool foundMatch =
false;
496 std::string tempComponentName =
"";
502 userPropertyNames.clear();
503 defaultPropertyNames.clear();
505 std::string prefix =
"AliEmcalCorrection";
506 tempComponentName = componentName.substr(componentName.find(prefix) + prefix.length());
508 AliDebugStream(2) <<
"Checking component " << componentName <<
" for unmatched user settings" << std::endl;
518 if (tempComponentName.find(
"_") != std::string::npos) {
520 GetPropertyNamesFromNode(
"user", tempComponentName.substr(0, tempComponentName.find(
"_")), userPropertyNames,
false);
523 GetPropertyNamesFromNode(
"default", tempComponentName.substr(0, tempComponentName.find(
"_")), defaultPropertyNames,
true);
527 for (
auto userPropertyName : userPropertyNames)
529 AliDebugStream(2) <<
"Checking property " << userPropertyName << std::endl;
531 for (
auto defaultPropertyName : defaultPropertyNames)
533 if (userPropertyName == defaultPropertyName) {
534 AliDebugStream(2) <<
"Found match of " << userPropertyName <<
" with " << defaultPropertyName << std::endl;
538 if (foundMatch ==
false) {
539 AliFatal(TString::Format(
"Property \"%s:%s\" defined in the user configuration file cannot be found in the default configuration file! Check the spelling in your user file!", tempComponentName.c_str(), userPropertyName.c_str()));
557 std::string noPrefixComponentName = componentName.substr(0, componentName.find(
"_" +
fSuffix));
561 AliFatal(TString::Format(
"Failed to create requested component %s!", componentName.c_str()));
565 component->SetName(componentName.c_str());
566 component->SetTitle(componentName.c_str());
582 if (component && initialized)
584 AliInfo(TString::Format(
"Successfully added correction task: %s", componentName.c_str()));
610 std::set <std::string> requestedContainers;
611 std::vector <std::string> componentRequest;
614 componentRequest.clear();
616 std::string selectionName =
"AliEmcalCorrection";
618 fYAMLConfig.
GetProperty(std::vector<std::string>{componentName.substr(componentName.find(selectionName) + selectionName.length()), inputObjectName +
"Names"}, componentRequest,
false);
619 for (
auto & req : componentRequest )
621 AliDebugStream(3) <<
"Component " << componentName <<
" requested container name " << req << std::endl;
622 requestedContainers.insert(req);
626 AliDebugStream(2) << inputObjectName <<
" Containers requested by components: " << std::endl;
627 for (
auto & str : requestedContainers) {
628 AliDebugStream(2) <<
"\t" << str << std::endl;;
632 AliDebug(2, TString::Format(
"Setting up requested containers!"));
648 inputObjectName = inputObjectName +
"Names";
650 std::vector <std::string> inputObjects;
653 fYAMLConfig.
GetProperty(std::vector<std::string>{component->GetName(), inputObjectName.c_str()}, inputObjects,
false);
658 for (
auto const & str : inputObjects)
664 AliDebugStream(2) <<
"Adding cluster container " << str <<
" of array " << cont->GetArrayName() <<
" to component " << component->GetName() << std::endl;
666 if (checkObjectExists && !cont) {
667 AliError(TString::Format(
"%s: Unable to retrieve input object \"%s\" because it is null. Please check your configuration!", GetName(), str.c_str()));
672 if (!(cont->GetIsEmbedding())) {
679 AliDebugStream(2) <<
"Adding particle container " << str <<
" of array " << cont->GetArrayName() <<
" to component " << component->GetName() << std::endl;
681 if (checkObjectExists && !cont) {
682 AliFatal(TString::Format(
"%s: Unable to retrieve input object \"%s\" because it is null. Please check your configuration!", GetName(), str.c_str()));
687 if (!(cont->GetIsEmbedding())) {
694 if (inputObjects.size() > 1) {
695 AliFatal(TString::Format(
"Component %s requested more than one cell branch, but this is not supported! Check the configuration!", component->GetName()));
700 AliDebugStream(2) <<
"Adding calo cells \"" << cellCont->
GetName() <<
"\" of branch name \"" << cellCont->
GetBranchName() <<
"\" to component " << component->GetName() << std::endl;
709 if (checkObjectExists && !(cellCont->
GetCells())) {
710 AliFatal(TString::Format(
"%s: Unable to retrieve cells \"%s\" in input object \"%s\" because the cells are null. Please check your configuration!", GetName(), cellCont->
GetBranchName().c_str(), str.c_str()));
721 AliDebugStream(3) <<
"Component GetNumberOfCells(): " << component->
GetCaloCells()->GetNumberOfCells() << std::endl;
741 for(
auto & containerName : requestedContainers)
750 AliDebug(2, TString::Format(
"Processing container %s of inputType %d", containerName.c_str(), inputObjectType));
775 cellObj->
SetName(containerName);
778 std::string tempString =
"";
780 if (tempString ==
"usedefault") {
786 bool tempBool =
false;
812 AliDebugStream(2) <<
"Adding container" << std::endl;
813 AliEmcalContainer * cont =
AddContainer(inputObjectType, containerName);
814 AliDebugStream(2) <<
"Added container" << std::endl;
843 std::string tempString =
"";
845 bool tempBool =
false;
851 AliDebugStream(2) << cont->GetName() <<
": Setting minPt of " << tempDouble << std::endl;
852 cont->SetMinPt(tempDouble);
857 AliDebugStream(2) << cont->GetName() <<
": Setting minE of " << tempDouble << std::endl;
858 cont->SetMinE(tempDouble);
867 AliDebugStream(2) << cont->GetName() <<
": Setting eta limits of " << tempDouble <<
" to " << tempDouble2 << std::endl;
868 cont->SetEtaLimits(tempDouble, tempDouble2);
878 AliDebugStream(2) << cont->GetName() <<
": Setting phi limits of " << tempDouble <<
" to " << tempDouble2 << std::endl;
879 cont->SetPhiLimits(tempDouble, tempDouble2);
885 AliDebugStream(2) << cont->GetName() <<
": Setting embedding to " << (tempBool ?
"enabled" :
"disabled") << std::endl;
886 cont->SetIsEmbedding(tempBool);
891 if (clusterContainer) {
903 result =
fYAMLConfig.
GetProperty(inputObjectPropertiesPath,
"clusNonLinCorrEnergyCut", tempDouble,
false);
905 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting clusNonLinCorrEnergyCut of " << tempDouble << std::endl;
912 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting clusHadCorrEnergyCut of " << tempDouble << std::endl;
919 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting Include PHOS to " << (tempBool ?
"enabled" :
"disabled") << std::endl;
926 if (trackContainer) {
929 std::vector <UInt_t> filterBitsVector;
933 for (
int filterBit : filterBitsVector) {
934 filterBits += filterBit;
936 AliDebugStream(2) << trackContainer->GetName() <<
": Setting filterBits of " << filterBits << std::endl;
945 AliDebugStream(2) << trackContainer->GetName() <<
": Setting trackFilterType of " << trackFilterType <<
" (" << tempString <<
")\n";
953 AliDebugStream(2) << trackContainer->GetName() <<
": Setting track cuts period to " << tempString << std::endl;
977 std::string containerBranch =
"";
979 AliFatal(
"Must specify type of container when requesting branch.");
994 if (containerBranch ==
"usedefault") {
999 AliEmcalContainer * cont = 0;
1007 if (containerBranch ==
"mcparticles") {
1015 cont->SetName(containerName.c_str());
1033 AliFatal(
"YAML configuration must be initialized before running (ie. the AddTask, run macro or wagon)!");
1068 component->UserCreateOutputObjects();
1070 if (component->GetOutputList() != 0)
1077 t->SetName(component->GetName());
1080 TIter next(component->GetOutputList());
1081 while (
TObject *obj = next()){
1085 AliDebug(1, TString::Format(
"Added output list from task %s to output.", component->GetName()));
1099 if (embeddingHelper && embeddingHelper->EmbeddedEventUsed() ==
false) {
1100 AliDebugStream(4) <<
"Embedding helper rejected the internal event. Skipping this event.\n";
1134 if (!InputEvent()) {
1135 AliError(
"Could not retrieve event! Returning!");
1140 if (dynamic_cast<AliAODEvent*>(InputEvent())) {
1141 AliWarning(
"=============================================================");
1142 AliWarning(
"=== Running on AOD is not equivalent to running on ESD! ===");
1143 AliWarning(
"=============================================================");
1147 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->
GetRunNumber());
1149 AliFatal(
"Can not get EMCal geometry instance. If you do not need the EMCal geometry, disable it by setting task->SetNeedEmcalGeometry(kFALSE).");
1179 std::cout <<
"=== NOTE: Additional EMCal Corrections configuration information can be found when the Analysis Manager is configured. For a run macro, see above, while for a LEGO train, see the generation.log ===\n";
1195 component->SetEMCALGeometry(
fGeom);
1202 component->SetInputEvent(InputEvent());
1203 component->SetMCEvent(MCEvent());
1206 component->ExecOnce();
1210 if (!(component->GetCaloCells())) {
1211 AliDebugStream(2) <<
"Re-initializing cells for component " << component->GetName() << std::endl;
1228 const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1238 AliMultSelection *MultSelection =
static_cast<AliMultSelection*
>(InputEvent()->FindListObject(
"MultSelection"));
1239 if (MultSelection) {
1240 fCent = MultSelection->GetMultiplicityPercentile(
fCentEst.Data());
1243 AliWarning(
"Could not retrieve centrality information! Assuming 99");
1247 AliCentrality *aliCent = InputEvent()->GetCentrality();
1252 AliWarning(
"Could not retrieve centrality information! Assuming 99");
1262 AliWarning(Form(
"Negative centrality: %f. Assuming 99",
fCent));
1271 else if (
fCent > 90) {
1276 AliWarning(Form(
"Negative centrality: %f. Assuming 99",
fCent));
1289 AliWarning(Form(
"fCentBin too large: cent = %f fCentBin = %d. Assuming 99",
fCent,
fCentBin));
1299 AliEmcalContainer* cont = 0;
1302 while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->NextEvent(InputEvent());
1305 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) cont->NextEvent(InputEvent());
1319 component->SetInputEvent(InputEvent());
1320 component->SetMCEvent(MCEvent());
1321 component->SetCentralityBin(
fCentBin);
1322 component->SetCentrality(
fCent);
1323 component->SetVertex(
fVertex);
1341 component->UserNotify();
1355 std::string configurationName = userConfig ?
"user" :
"default";
1358 if (configPair.second.IsNull() ==
true) {
1359 AliWarning(TString::Format(
"%s configuration is empty!", configPair.first.c_str()));
1361 in << configPair.second;
1364 in <<
"Configuration \"" << configurationName <<
"\" does not exist!\n";
1395 std::string tempConfigName =
"tempConfig";
1415 AliDebugStream(2) <<
"Retrieving cells object " << cellContainer->
GetName() << std::endl;
1419 cellContainer->
SetCells(dynamic_cast<AliVCaloCells *>(event->FindListObject(cellContainer->
GetBranchName().c_str())));
1435 TClonesArray * array =
dynamic_cast<TClonesArray *
>(
event->FindListObject(cont->GetArrayName()));
1437 AliWarning(TString::Format(
"Container %s requested branch %s, but it does not exist! Creating it for you! Please check that this is the proper action!", cont->GetName(), cont->GetArrayName().Data()));
1439 array->SetName(cont->GetArrayName());
1440 event->AddObject(array);
1454 std::string inputObjectName =
"";
1456 inputObjectName =
"clusterContainers";
1459 inputObjectName =
"trackContainers";
1462 inputObjectName =
"cells";
1465 AliFatal(TString::Format(
"Unrecognized input object type %d", inputObjectType));
1468 return inputObjectName;
1484 bool foundComponent =
false;
1485 for (
auto & possibleComponent : possibleComponents)
1487 if (possibleComponent == name) {
1488 foundComponent =
true;
1493 return foundComponent;
1509 const AliESDRun *run = esd->GetESDRun();
1510 TString beamType = run->GetBeamType();
1511 if (beamType ==
"p-p")
1513 else if (beamType ==
"A-A")
1515 else if (beamType ==
"p-A")
1520 Int_t runNumber = InputEvent()->GetRunNumber();
1522 if ((runNumber >= 136833 && runNumber <= 139517) ||
1523 (runNumber >= 167693 && runNumber <= 170593) ||
1524 (runNumber >= 244824 && runNumber <= 246994)) {
1526 }
else if ((runNumber >= 188356 && runNumber <= 188366) ||
1527 (runNumber >= 195164 && runNumber <= 197388) ||
1528 (runNumber >= 265015 && runNumber <= 267166)) {
1542 stream <<
"Cells info: " << std::endl;
1544 stream <<
"\tName: " << cellInfo->GetName() <<
"\tBranch: " << cellInfo->GetBranchName() <<
"\tIsEmbedding: " << std::boolalpha << cellInfo->GetIsEmbedding() << std::endl;
1549 AliEmcalContainer * cont = 0;
1551 cont =
static_cast<AliEmcalContainer *
>(containerInfo);
1552 stream <<
"\tName: " << cont->GetName() <<
"\tBranch: " << cont->GetArrayName() <<
"\tTitle: " << cont->GetTitle() <<
"\tIsEmbedding: " << std::boolalpha << cont->GetIsEmbedding() << std::endl;
1556 AliErrorStream() <<
"Unrecognized input object type " << inputObjectType << std::endl;
1575 bool retrievedPropertyNames =
false;
1577 AliDebugStream(3) <<
"Looking for nodes in component \"" << componentName <<
"\" in the \"" << configurationName <<
"\" configuration\n";
1579 if (configPair.second[componentName])
1581 for (
auto propertyName : configPair.second[componentName])
1583 AliDebugStream(4) <<
"Node property name " << propertyName.first.as<std::string>() <<
"\n";
1584 propertyNames.insert(propertyName.first.as<std::string>());
1586 retrievedPropertyNames =
true;
1590 if (retrievedPropertyNames ==
false && nodeRequired) {
1591 std::stringstream message;
1592 message <<
"Failed to retrieve required property \"" 1593 << componentName <<
"\" from the \"" << configurationName <<
"\" configuration!" << std::endl;
1594 AliFatal(message.str().c_str());
1611 if (name == component->GetName()) {
1612 returnComponent = component;
1616 return returnComponent;
1630 if (cellContainer->GetName() == cellsContainerName) {
1631 return cellContainer;
1645 ::Error(
"AddTaskEmcalCorrectionTask",
"No analysis manager to connect to.");
1651 AliVEventHandler* handler = mgr->GetInputEventHandler();
1654 ::Error(
"AddTaskEmcalCorrectionTask",
"This task requires an input event handler");
1658 TString name =
"AliEmcalCorrectionTask";
1660 name += TString::Format(
"_%s", suffix.Data());
1664 if (mgrTask)
return mgrTask;
1673 mgr->AddTask(correctionTask);
1676 AliAnalysisDataContainer* cInput = mgr->GetCommonInputContainer();
1678 TString outputContainerName(name);
1679 outputContainerName +=
"_histos";
1681 AliAnalysisDataContainer * cOutput = mgr->CreateContainer(outputContainerName.Data(),
1683 AliAnalysisManager::kOutputContainer,
1684 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
1686 mgr->ConnectInput(correctionTask, 0, cInput);
1687 mgr->ConnectOutput(correctionTask, 1, cOutput);
1691 return correctionTask;
1701 ::Error(
"ConfigureEmcalCorrectionTaskOnLEGOTrain",
"No analysis manager to connect to.");
1707 const std::string taskName =
"AliEmcalCorrectionTask";
1708 std::string foundTaskName =
"";
1709 bool taskFound =
false;
1710 std::vector<std::string> namesToSearch = {taskName};
1719 std::string suffixName = taskName;
1721 suffixName += suffix.Data();
1722 namesToSearch.insert(namesToSearch.begin(), suffixName);
1726 for (
auto name : namesToSearch)
1729 if (correctionTask !=
nullptr) {
1731 foundTaskName = name;
1737 if (taskFound ==
false) {
1738 AliFatalClassF(
"Could not find correction task, checking for both the suffix \"%s\" and the main task. Did you remember to create it?", suffix.Data());
1741 AliInfoClassStream() <<
"Found correction task named \"" << foundTaskName <<
"\" to configure.\n";
1745 std::string dummyTaskName = foundTaskName +
"_dummyTask";
1748 return correctionTask;
1758 std::stringstream tempSS;
1761 tempSS <<
"Correction components:\n";
1763 tempSS <<
"\t" << component <<
"\n";
1766 tempSS <<
"\nInput objects:\n";
1771 if (includeYAMLConfigurationInfo ==
true) {
1772 tempSS <<
"\nUser Configuration:\n";
1774 tempSS <<
"\n\nDefault Configuration:\n";
1779 return tempSS.str();
1802 std::ostream & result = myTask.
Print(in);
1814 std::string temp(opt);
1815 bool includeYAMLConfig =
false;
1816 if (temp ==
"YAML") {
1817 includeYAMLConfig =
true;
1819 Printf(
"%s",
toString(includeYAMLConfig).c_str());
void AdoptClusterContainer(AliClusterContainer *cont)
Int_t fNcentBins
how many centrality bins
void SetBranchName(std::string branchName)
Set the name of the cells branch (NOT the same as the name!)
std::string fSuffix
Suffix of the Correction Task (used to select specialized components)
void PrintRequestedContainersInformation(AliEmcalContainerUtils::InputObject_t inputObjectType, std::ostream &stream) const
Steering task for the EMCal correction framework.
AliEMCALGeometry * fGeom
! Emcal geometry
static const AliVEvent * GetEvent(const AliVEvent *inputEvent, bool isEmbedding=false)
void SetTrackCutsPeriod(const char *period)
static AliEmcalCorrectionTask * ConfigureEmcalCorrectionTaskOnLEGOTrain(TString suffix)
std::string GetName() const
Get the name of the cells object (NOT the same as the branch!)
void InitializeConfiguration()
void SetArray(const AliVEvent *event)
void SetupContainer(const AliEmcalContainerUtils::InputObject_t inputObjectType, const std::string containerName)
AliVCaloCells * GetCaloCells() const
std::vector< std::string > fOrderedComponentsToExecute
Ordered set of components to execute.
bool WriteConfigurationFile(std::string filename, bool userConfig=false) const
bool CheckPossibleNamesForComponentName(std::string &name, std::set< std::string > &possibleComponents)
std::vector< AliEmcalCorrectionComponent * > fCorrectionComponents
Contains the correction components.
Container with name, TClonesArray and cuts for particles.
std::string GetInputFieldNameFromInputObjectType(AliEmcalContainerUtils::InputObject_t inputObjectType)
void AdoptClusterContainer(AliClusterContainer *cont)
void UserExec(Option_t *option)
AliEmcalCorrectionTask & operator=(AliEmcalCorrectionTask other)
void UserCreateOutputObjectsComponents()
Double_t fMaxCent
max centrality for event selection
Double_t fVertex[3]
! Event vertex
Declaration of class AliAnalysisTaskEmcalEmbeddingHelper.
AliEmcalContainer * AddContainer(const AliEmcalContainerUtils::InputObject_t contType, const std::string containerName)
void DetermineComponentsToExecute(std::vector< std::string > &componentsToExecute)
TList * fOutput
! Output for histograms
bool CompareToStoredConfiguration(std::string filename, bool userConfig=false)
Wrapper around cells objects for the EMCal Correction Task.
bool fConfigurationInitialized
True if the YAML configuration files are initialized.
void SetUsingInputEvent(bool b=true)
void CheckForContainerArray(AliEmcalContainer *cont, AliEmcalContainerUtils::InputObject_t objectType)
AliParticleContainer * GetParticleContainer(Int_t i=0) const
friend void swap(AliEmcalCorrectionTask &first, AliEmcalCorrectionTask &second)
Container for particles within the EMCAL framework.
void SetupCellsInfo(std::string containerName)
PWG::Tools::AliYAMLConfiguration fYAMLConfig
Handles configuration from YAML.
AliVCaloCells * GetCells() const
Pointer to the actual CaloCells object.
bool fEventInitialized
If the event is initialized properly.
TString fCentEst
name of V0 centrality estimator
void SetAODFilterBits(UInt_t bits)
void SetYAMLConfiguration(PWG::Tools::AliYAMLConfiguration config)
Set YAML Configuration.
std::string fUserConfigurationFilename
! User YAML configruation filename
void GetPropertyNamesFromNode(const std::string configurationName, const std::string componentName, std::set< std::string > &propertyNames, const bool nodeRequired)
InputObject_t
Type of input object to be created
AliClusterContainer * GetClusterContainer(Int_t i=0) const
void SetClusNonLinCorrEnergyCut(Double_t cut)
static AliEmcalCorrectionTask * AddTaskEmcalCorrectionTask(TString suffix="")
void SetCells(AliVCaloCells *cells)
Sets the Pointer to the actual CaloCells object.
Double_t fCent
! Event centrality
void ExecOnceComponents()
void CreateInputObjects(AliEmcalContainerUtils::InputObject_t inputObjectType)
Base class for correction components in the EMCal correction framework.
BeamType
Switch for the beam type.
void AdoptParticleContainer(AliParticleContainer *cont)
void InitializeComponents()
void SetIncludePHOS(Bool_t b)
friend std::ostream & operator<<(std::ostream &in, const AliEmcalCorrectionTask &myTask)
Bool_t fNeedEmcalGeom
whether or not the task needs the emcal geometry
void CheckForUnmatchedUserSettings()
std::string GetBranchName() const
Get the name of the cells branch (NOT the same as the name!)
static const std::map< std::string, AliEmcalTrackSelection::ETrackFilterType_t > fgkTrackFilterTypeMap
Relates string to the track filter enumeration for YAML configuration.
void SetCellsObjectInCellContainerBasedOnProperties(AliEmcalCorrectionCellContainer *cellContainer)
Bool_t fUseNewCentralityEstimation
Use new centrality estimation (for 2015 data)
bool GetIsEmbedding() const
True if the cells are located in the event that is being embedded.
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
AliEmcalCorrectionCellContainer * GetCellContainer(const std::string &cellsContainerName) const
BeamType GetBeamType() const
std::string fDefaultConfigurationFilename
! Default YAML configuration filename
void UserCreateOutputObjects()
TObjArray fParticleCollArray
Particle/track collection array.
TObjArray fClusterCollArray
Cluster collection array.
void RemoveDummyTask() const
virtual Bool_t Initialize()
bool fRecycleUnusedEmbeddedEventsMode
Allows the recycling of embedded events which fail internal event selection. See the embedding helper...
virtual ~AliEmcalCorrectionTask()
ETrackFilterType_t
Pre-defined track filters.
void AdoptParticleContainer(AliParticleContainer *cont)
void SetIsESD(Bool_t isESD)
AliEmcalCorrectionComponent * GetCorrectionComponent(const std::string &name) const
void SetIsEmbedding(bool isEmbedded)
Set to true if the cells are located in the event that is being embedded.
void SetCaloCells(AliVCaloCells *cells)
BeamType fBeamType
! Event beam type
static std::string DetermineUseDefaultName(InputObject_t objType)
void SetArray(const AliVEvent *event)
Int_t GetRunNumber(TString)
void SetTrackFilterType(ETrackFilterType_t f)
std::string toString(bool includeYAMLConfigurationInfo=false) const
std::ostream & PrintConfiguration(std::ostream &in, bool userConfig=false) const
void Print(Option_t *opt="") const
Int_t fNVertCont
! Event vertex number of contributors
static AliEmcalCorrectionComponent * createInstance(std::string const &s)
Creates an instance of an object based on the name if the name is registered in the map...
void SetName(std::string name)
Set the name of the cells object (NOT the same as the branch!)
Int_t fCentBin
! Event centrality bin
void SetupContainersFromInputNodes(AliEmcalContainerUtils::InputObject_t inputObjectType, std::set< std::string > &requestedContainers)
Double_t fMinCent
min centrality for event selection
std::vector< AliEmcalCorrectionCellContainer * > fCellCollArray
Cells collection array.
Bool_t RetrieveEventObjects()
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
void AddContainersToComponent(AliEmcalCorrectionComponent *component, AliEmcalContainerUtils::InputObject_t inputObjectType, bool checkObjectExists=false)
void Initialize(bool removeDummyTask=false)
TList * OpenFile(const char *fname)
void SetClusHadCorrEnergyCut(Double_t cut)
void swap(AliEmcalCorrectionTask &first, AliEmcalCorrectionTask &second)
static const AliAnalysisTaskEmcalEmbeddingHelper * GetInstance()
BeamType fForceBeamType
forced beam type