18 #include "AliVEventHandler.h"
19 #include "AliEMCALGeometry.h"
20 #include "AliVCaloCells.h"
21 #include "AliVCluster.h"
23 #include "AliMultSelection.h"
24 #include "AliCentrality.h"
25 #include "AliESDEvent.h"
26 #include "AliAnalysisManager.h"
27 #include "AliAODEvent.h"
38 {
"kNonLinCorr", AliVCluster::kNonLinCorr },
39 {
"kHadCorr", AliVCluster::kHadCorr },
40 {
"kUserDefEnergy1", AliVCluster::kUserDefEnergy1 },
41 {
"kUserDefEnergy2", AliVCluster::kUserDefEnergy2 }
58 fUserConfigurationFilename(
""),
59 fDefaultConfigurationFilename(
""),
60 fOrderedComponentsToExecute(),
61 fCorrectionComponents(),
62 fConfigurationInitialized(false),
64 fEventInitialized(false),
71 fUseNewCentralityEstimation(kFALSE),
76 fNeedEmcalGeom(kTRUE),
84 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
86 fParticleCollArray.SetOwner(kTRUE);
87 fClusterCollArray.SetOwner(kTRUE);
103 fUserConfigurationFilename(
""),
104 fDefaultConfigurationFilename(
""),
105 fOrderedComponentsToExecute(),
106 fCorrectionComponents(),
107 fConfigurationInitialized(false),
109 fEventInitialized(false),
116 fUseNewCentralityEstimation(kFALSE),
121 fNeedEmcalGeom(kTRUE),
123 fParticleCollArray(),
129 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
131 fParticleCollArray.SetOwner(kTRUE);
132 fClusterCollArray.SetOwner(kTRUE);
134 DefineInput(0, TChain::Class());
135 DefineOutput(1, TList::Class());
146 fYAMLConfig(task.fYAMLConfig),
147 fSuffix(task.fSuffix),
148 fUserConfigurationFilename(task.fUserConfigurationFilename),
149 fDefaultConfigurationFilename(task.fDefaultConfigurationFilename),
150 fOrderedComponentsToExecute(task.fOrderedComponentsToExecute),
151 fCorrectionComponents(task.fCorrectionComponents),
152 fConfigurationInitialized(task.fConfigurationInitialized),
154 fEventInitialized(task.fEventInitialized),
156 fCentBin(task.fCentBin),
157 fMinCent(task.fMinCent),
158 fMaxCent(task.fMaxCent),
159 fNcentBins(task.fNcentBins),
160 fCentEst(task.fCentEst),
161 fUseNewCentralityEstimation(task.fUseNewCentralityEstimation),
163 fNVertCont(task.fNVertCont),
164 fBeamType(task.fBeamType),
165 fForceBeamType(task.fForceBeamType),
166 fNeedEmcalGeom(task.fNeedEmcalGeom),
168 fParticleCollArray(*(static_cast<TObjArray *>(task.fParticleCollArray.Clone()))),
169 fClusterCollArray(*(static_cast<TObjArray *>(task.fClusterCollArray.Clone()))),
170 fOutput(task.fOutput)
173 std::copy(std::begin(task.fVertex), std::end(task.fVertex), std::begin(fVertex));
176 for (
auto cellCont : task.fCellCollArray)
251 AliVEventHandler *evhand = mgr->GetInputEventHandler();
253 if (evhand->InheritsFrom(
"AliESDInputHandler")) {
261 AliError(
"Event handler not found!");
265 AliError(
"Analysis manager not found!");
269 std::string tempName = GetName();
270 std::size_t foundSuffix = tempName.find(
"_");
271 if (foundSuffix != std::string::npos) {
273 fSuffix = tempName.substr(foundSuffix + 1).c_str();
277 AliInfoStream() <<
"Initializing correction task with suffix \"" <<
fSuffix <<
"\"" << std::endl;
285 AliFatal(
"YAML configuration must be initialized before running (ie. in the run macro or wagon)!");
309 if (removeDummyTask ==
true) {
315 std::cout << GetName() <<
" Settings:\n" << *
this;
327 AliErrorStream() <<
"No analysis manager to connect to.\n";
332 std::string dummyTaskName = GetName();
333 dummyTaskName +=
"_dummyTask";
338 AliErrorStream() <<
"Could not remove dummy task \"" << dummyTaskName <<
"\" from analysis manager! Was it added?\n";
341 tasks->Remove(dummyTask);
344 AliErrorStream() <<
"Could not retrieve tasks from the analysis manager.\n";
373 AliInfoStream() <<
"User file at \"" <<
fUserConfigurationFilename <<
"\" does not exist! All settings will be from the default file!";
404 std::vector <std::string> executionOrder;
410 std::set <std::string> possibleComponents;
412 possibleComponents.insert(node.first.as<std::string>());
415 possibleComponents.insert(node.first.as<std::string>());
419 std::string expectedComponentName =
"";
420 bool foundSuffixComponent =
false;
421 bool foundComponent =
false;
422 bool componentEnabled =
true;
425 for (
auto & execName : executionOrder)
428 expectedComponentName = TString::Format(
"%s_%s", execName.c_str(),
fSuffix.c_str()).
Data();
429 foundComponent =
false;
430 componentEnabled =
false;
438 if (componentEnabled ==
true) {
439 foundSuffixComponent =
true;
440 correctionComponents.push_back(expectedComponentName);
443 AliInfo(TString::Format(
"Component %s is disabled and will not be run!", expectedComponentName.c_str()));
451 expectedComponentName = execName;
456 if (componentEnabled ==
true) {
457 if (foundSuffixComponent ==
true) {
458 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()));
462 correctionComponents.push_back(expectedComponentName);
466 AliInfo(TString::Format(
"Component %s is disabled and will not be run!", expectedComponentName.c_str()));
472 AliDebug(2,
"Found EMCal Correction Components: ");
473 for (
auto & component : correctionComponents)
475 component =
"AliEmcalCorrection" + component;
476 AliDebug(2, TString::Format(
"%s", component.c_str()) );
495 std::set <std::string> userPropertyNames;
496 std::set <std::string> defaultPropertyNames;
498 bool foundMatch =
false;
499 std::string tempComponentName =
"";
505 userPropertyNames.clear();
506 defaultPropertyNames.clear();
508 std::string prefix =
"AliEmcalCorrection";
509 tempComponentName = componentName.substr(componentName.find(prefix) + prefix.length());
511 AliDebugStream(2) <<
"Checking component " << componentName <<
" for unmatched user settings" << std::endl;
521 if (tempComponentName.find(
"_") != std::string::npos) {
523 GetPropertyNamesFromNode(
"user", tempComponentName.substr(0, tempComponentName.find(
"_")), userPropertyNames,
false);
526 GetPropertyNamesFromNode(
"default", tempComponentName.substr(0, tempComponentName.find(
"_")), defaultPropertyNames,
true);
530 for (
auto userPropertyName : userPropertyNames)
532 AliDebugStream(2) <<
"Checking property " << userPropertyName << std::endl;
534 for (
auto defaultPropertyName : defaultPropertyNames)
536 if (userPropertyName == defaultPropertyName) {
537 AliDebugStream(2) <<
"Found match of " << userPropertyName <<
" with " << defaultPropertyName << std::endl;
541 if (foundMatch ==
false) {
542 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()));
560 std::string noPrefixComponentName = componentName.substr(0, componentName.find(
"_" +
fSuffix));
564 AliFatal(TString::Format(
"Failed to create requested component %s!", componentName.c_str()));
568 component->SetName(componentName.c_str());
569 component->SetTitle(componentName.c_str());
585 if (component && initialized)
587 AliInfo(TString::Format(
"Successfully added correction task: %s", componentName.c_str()));
613 std::set <std::string> requestedContainers;
614 std::vector <std::string> componentRequest;
617 componentRequest.clear();
619 std::string selectionName =
"AliEmcalCorrection";
621 fYAMLConfig.
GetProperty(std::vector<std::string>{componentName.substr(componentName.find(selectionName) + selectionName.length()), inputObjectName +
"Names"}, componentRequest,
false);
622 for (
auto & req : componentRequest )
624 AliDebugStream(3) <<
"Component " << componentName <<
" requested container name " << req << std::endl;
625 requestedContainers.insert(req);
629 AliDebugStream(2) << inputObjectName <<
" Containers requested by components: " << std::endl;
630 for (
auto & str : requestedContainers) {
631 AliDebugStream(2) <<
"\t" << str << std::endl;;
635 AliDebug(2, TString::Format(
"Setting up requested containers!"));
651 inputObjectName = inputObjectName +
"Names";
653 std::vector <std::string> inputObjects;
656 fYAMLConfig.
GetProperty(std::vector<std::string>{component->GetName(), inputObjectName.c_str()}, inputObjects,
false);
661 for (
auto const & str : inputObjects)
667 AliDebugStream(2) <<
"Adding cluster container " << str <<
" of array " << cont->GetArrayName() <<
" to component " << component->GetName() << std::endl;
669 if (checkObjectExists && !cont) {
670 AliError(TString::Format(
"%s: Unable to retrieve input object \"%s\" because it is null. Please check your configuration!", GetName(), str.c_str()));
675 if (!(cont->GetIsEmbedding())) {
682 AliDebugStream(2) <<
"Adding particle container " << str <<
" of array " << cont->GetArrayName() <<
" to component " << component->GetName() << std::endl;
684 if (checkObjectExists && !cont) {
685 AliFatal(TString::Format(
"%s: Unable to retrieve input object \"%s\" because it is null. Please check your configuration!", GetName(), str.c_str()));
690 if (!(cont->GetIsEmbedding())) {
697 if (inputObjects.size() > 1) {
698 AliFatal(TString::Format(
"Component %s requested more than one cell branch, but this is not supported! Check the configuration!", component->GetName()));
703 AliDebugStream(2) <<
"Adding calo cells \"" << cellCont->
GetName() <<
"\" of branch name \"" << cellCont->
GetBranchName() <<
"\" to component " << component->GetName() << std::endl;
712 if (checkObjectExists && !(cellCont->
GetCells())) {
713 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()));
724 AliDebugStream(3) <<
"Component GetNumberOfCells: " << component->
GetCaloCells()->GetNumberOfCells() << std::endl;
744 for(
auto & containerName : requestedContainers)
753 AliDebug(2, TString::Format(
"Processing container %s of inputType %d", containerName.c_str(), inputObjectType));
778 cellObj->
SetName(containerName);
781 std::string tempString =
"";
783 if (tempString ==
"usedefault") {
789 bool tempBool =
false;
815 AliDebugStream(2) <<
"Adding container" << std::endl;
816 AliEmcalContainer * cont =
AddContainer(inputObjectType, containerName);
817 AliDebugStream(2) <<
"Added container" << std::endl;
846 std::string tempString =
"";
848 bool tempBool =
false;
854 AliDebugStream(2) << cont->GetName() <<
": Setting minPt of " << tempDouble << std::endl;
855 cont->SetMinPt(tempDouble);
860 AliDebugStream(2) << cont->GetName() <<
": Setting minE of " << tempDouble << std::endl;
861 cont->SetMinE(tempDouble);
870 AliDebugStream(2) << cont->GetName() <<
": Setting eta limits of " << tempDouble <<
" to " << tempDouble2 << std::endl;
871 cont->SetEtaLimits(tempDouble, tempDouble2);
881 AliDebugStream(2) << cont->GetName() <<
": Setting phi limits of " << tempDouble <<
" to " << tempDouble2 << std::endl;
882 cont->SetPhiLimits(tempDouble, tempDouble2);
888 AliDebugStream(2) << cont->GetName() <<
": Setting embedding to " << (tempBool ?
"enabled" :
"disabled") << std::endl;
889 cont->SetIsEmbedding(tempBool);
894 if (clusterContainer) {
906 result =
fYAMLConfig.
GetProperty(inputObjectPropertiesPath,
"clusNonLinCorrEnergyCut", tempDouble,
false);
908 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting clusNonLinCorrEnergyCut of " << tempDouble << std::endl;
915 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting clusHadCorrEnergyCut of " << tempDouble << std::endl;
922 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting Include PHOS to " << (tempBool ?
"enabled" :
"disabled") << std::endl;
929 if (trackContainer) {
932 std::vector <UInt_t> filterBitsVector;
936 for (
int filterBit : filterBitsVector) {
937 filterBits += filterBit;
939 AliDebugStream(2) << trackContainer->GetName() <<
": Setting filterBits of " << filterBits << std::endl;
948 AliDebugStream(2) << trackContainer->GetName() <<
": Setting trackFilterType of " << trackFilterType << std::endl;
956 AliDebugStream(2) << trackContainer->GetName() <<
": Setting track cuts period to " << tempString << std::endl;
980 std::string containerBranch =
"";
982 AliFatal(
"Must specify type of container when requesting branch.");
997 if (containerBranch ==
"usedefault") {
1002 AliEmcalContainer * cont = 0;
1010 if (containerBranch ==
"mcparticles") {
1018 cont->SetName(containerName.c_str());
1036 AliFatal(
"YAML configuration must be initialized before running (ie. the AddTask, run macro or wagon)!");
1071 component->UserCreateOutputObjects();
1073 if (component->GetOutputList() != 0)
1080 t->SetName(component->GetName());
1083 TIter next(component->GetOutputList());
1084 while (
TObject *obj = next()){
1088 AliDebug(1, TString::Format(
"Added output list from task %s to output.", component->GetName()));
1128 if (!InputEvent()) {
1129 AliError(
"Could not retrieve event! Returning!");
1134 if (dynamic_cast<AliAODEvent*>(InputEvent())) {
1135 AliWarning(
"=============================================================");
1136 AliWarning(
"=== Running on AOD is not equivalent to running on ESD! ===");
1137 AliWarning(
"=============================================================");
1141 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->
GetRunNumber());
1143 AliFatal(
"Can not get EMCal geometry instance. If you do not need the EMCal geometry, disable it by setting task->SetNeedEmcalGeometry(kFALSE).");
1173 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";
1189 component->SetEMCALGeometry(
fGeom);
1196 component->SetInputEvent(InputEvent());
1197 component->SetMCEvent(MCEvent());
1200 component->ExecOnce();
1204 if (!(component->GetCaloCells())) {
1205 AliDebugStream(2) <<
"Re-initializing cells for component " << component->GetName() << std::endl;
1222 const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1232 AliMultSelection *MultSelection =
static_cast<AliMultSelection*
>(InputEvent()->FindListObject(
"MultSelection"));
1233 if (MultSelection) {
1234 fCent = MultSelection->GetMultiplicityPercentile(
fCentEst.Data());
1237 AliWarning(
"Could not retrieve centrality information! Assuming 99");
1241 AliCentrality *aliCent = InputEvent()->GetCentrality();
1246 AliWarning(
"Could not retrieve centrality information! Assuming 99");
1256 AliWarning(Form(
"Negative centrality: %f. Assuming 99",
fCent));
1265 else if (
fCent > 90) {
1270 AliWarning(Form(
"Negative centrality: %f. Assuming 99",
fCent));
1283 AliWarning(Form(
"fCentBin too large: cent = %f fCentBin = %d. Assuming 99",
fCent,
fCentBin));
1293 AliEmcalContainer* cont = 0;
1296 while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->NextEvent(InputEvent());
1299 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) cont->NextEvent(InputEvent());
1313 component->SetInputEvent(InputEvent());
1314 component->SetMCEvent(MCEvent());
1315 component->SetCentralityBin(
fCentBin);
1316 component->SetCentrality(
fCent);
1317 component->SetVertex(
fVertex);
1335 component->UserNotify();
1350 if (configPair.second.IsNull() ==
true) {
1351 AliWarning(TString::Format(
"%s configuration is empty!", configPair.first.c_str()));
1353 in << configPair.second;
1367 bool returnValue =
false;
1372 std::ofstream outFile(filename);
1380 AliError(TString::Format(
"Configuration not properly initialized! Cannot print %s configuration!", userConfig ?
"user" :
"default"));
1386 AliError(
"Please pass a valid filename instead of empty quotes!");
1400 bool returnValue =
false;
1406 YAML::Node passedNode = YAML::LoadFile(filename);
1411 std::stringstream passedNodeSS;
1412 passedNodeSS << passedNode;
1413 std::stringstream comparisonNodeSS;
1414 comparisonNodeSS << configPair.second;
1419 if (passedNodeSS.str() == comparisonNodeSS.str()) {
1423 AliWarningStream() <<
"Passed YAML config:\n" << passedNode <<
"\n\nStored YAML config:\n" << configPair.second <<
"\nPassed config located in file \"" << filename <<
"\" is not the same as the stored " << configPair.first <<
"configuration file! YAML configurations printed above.\n";
1428 AliError(TString::Format(
"Configuration not properly initialized! Cannot compare %s configuration!", userConfig ?
"user" :
"default"));
1433 AliError(
"Please pass a valid filename instead of empty quotes!");
1446 AliDebugStream(2) <<
"Retrieving cells object " << cellContainer->
GetName() << std::endl;
1450 cellContainer->
SetCells(dynamic_cast<AliVCaloCells *>(event->FindListObject(cellContainer->
GetBranchName().c_str())));
1466 TClonesArray * array =
dynamic_cast<TClonesArray *
>(
event->FindListObject(cont->GetArrayName()));
1468 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()));
1470 array->SetName(cont->GetArrayName());
1471 event->AddObject(array);
1485 std::string inputObjectName =
"";
1487 inputObjectName =
"clusterContainers";
1490 inputObjectName =
"trackContainers";
1493 inputObjectName =
"cells";
1496 AliFatal(TString::Format(
"Unrecognized input object type %d", inputObjectType));
1499 return inputObjectName;
1515 bool foundComponent =
false;
1516 for (
auto & possibleComponent : possibleComponents)
1518 if (possibleComponent == name) {
1519 foundComponent =
true;
1524 return foundComponent;
1540 const AliESDRun *run = esd->GetESDRun();
1541 TString beamType = run->GetBeamType();
1542 if (beamType ==
"p-p")
1544 else if (beamType ==
"A-A")
1546 else if (beamType ==
"p-A")
1551 Int_t runNumber = InputEvent()->GetRunNumber();
1553 if ((runNumber >= 136833 && runNumber <= 139517) ||
1554 (runNumber >= 167693 && runNumber <= 170593) ||
1555 (runNumber >= 244824 && runNumber <= 246994)) {
1557 }
else if ((runNumber >= 188356 && runNumber <= 188366) ||
1558 (runNumber >= 195164 && runNumber <= 197388) ||
1559 (runNumber >= 265015 && runNumber <= 267166)) {
1573 stream <<
"Cells info: " << std::endl;
1575 stream <<
"\tName: " << cellInfo->GetName() <<
"\tBranch: " << cellInfo->GetBranchName() <<
"\tIsEmbedding: " << std::boolalpha << cellInfo->GetIsEmbedding() << std::endl;
1580 AliEmcalContainer * cont = 0;
1582 cont =
static_cast<AliEmcalContainer *
>(containerInfo);
1583 stream <<
"\tName: " << cont->GetName() <<
"\tBranch: " << cont->GetArrayName() <<
"\tTitle: " << cont->GetTitle() <<
"\tIsEmbedding: " << std::boolalpha << cont->GetIsEmbedding() << std::endl;
1587 AliErrorStream() <<
"Unrecognized input object type " << inputObjectType << std::endl;
1606 if (configPair.second[componentName])
1608 for (
auto propertyName : configPair.second[componentName])
1610 propertyNames.insert(propertyName.first.as<std::string>());
1615 std::stringstream message;
1616 message <<
"Failed to retrieve required property \""
1617 << componentName <<
"\" from the \"" << configurationName <<
"\" configuration!" << std::endl;
1618 AliFatal(message.str().c_str());
1634 if (cellContainer->GetName() == cellsContainerName) {
1635 return cellContainer;
1649 ::Error(
"AddTaskEmcalCorrectionTask",
"No analysis manager to connect to.");
1655 AliVEventHandler* handler = mgr->GetInputEventHandler();
1658 ::Error(
"AddTaskEmcalCorrectionTask",
"This task requires an input event handler");
1662 TString name =
"AliEmcalCorrectionTask";
1664 name += TString::Format(
"_%s", suffix.Data());
1668 if (mgrTask)
return mgrTask;
1677 mgr->AddTask(correctionTask);
1680 AliAnalysisDataContainer* cInput = mgr->GetCommonInputContainer();
1682 TString outputContainerName(name);
1683 outputContainerName +=
"_histos";
1685 AliAnalysisDataContainer * cOutput = mgr->CreateContainer(outputContainerName.Data(),
1687 AliAnalysisManager::kOutputContainer,
1688 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
1690 mgr->ConnectInput(correctionTask, 0, cInput);
1691 mgr->ConnectOutput(correctionTask, 1, cOutput);
1695 return correctionTask;
1705 ::Error(
"ConfigureEmcalCorrectionTaskOnLEGOTrain",
"No analysis manager to connect to.");
1711 const std::string taskName =
"AliEmcalCorrectionTask";
1712 std::string foundTaskName =
"";
1713 bool taskFound =
false;
1714 std::vector<std::string> namesToSearch = {taskName};
1723 std::string suffixName = taskName;
1725 suffixName += suffix.Data();
1726 namesToSearch.insert(namesToSearch.begin(), suffixName);
1730 for (
auto name : namesToSearch)
1733 if (correctionTask !=
nullptr) {
1735 foundTaskName = name;
1741 if (taskFound ==
false) {
1742 AliFatalClassF(
"Could not find correction task, checking for both the suffix \"%s\" and the main task. Did you remember to create it?", suffix.Data());
1745 AliInfoClassStream() <<
"Found correction task named \"" << foundTaskName <<
"\" to configure.\n";
1749 std::string dummyTaskName = foundTaskName +
"_dummyTask";
1752 return correctionTask;
1762 std::stringstream tempSS;
1765 tempSS <<
"Correction components:\n";
1766 for (
auto component : fOrderedComponentsToExecute) {
1767 tempSS <<
"\t" << component <<
"\n";
1770 tempSS <<
"\nInput objects:\n";
1775 if (includeYAMLConfigurationInfo ==
true) {
1776 tempSS <<
"\nUser Configuration:\n";
1778 tempSS <<
"\n\nDefault Configuration:\n";
1783 return tempSS.str();
1806 std::ostream & result = myTask.
Print(in);
1818 std::string temp(opt);
1819 bool includeYAMLConfig =
false;
1820 if (temp ==
"YAML") {
1821 includeYAMLConfig =
true;
1823 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 std::map< std::string, AliVCluster::VCluUserDefEnergy_t > fgkClusterEnergyTypeMap
Relates string to the cluster energy enumeration for YAML configuration.
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
No filter (all tracks passing)
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)
static std::string DetermineUseDefaultName(InputObject_t objType, bool esdMode, bool returnObjectType=false)
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
AliEmcalContainer * AddContainer(const AliEmcalContainerUtils::InputObject_t contType, const std::string containerName)
void DetermineComponentsToExecute(std::vector< std::string > &componentsToExecute)
TList * fOutput
! Output for histograms
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)
bool CompareToStoredConfiguration(std::string filename, bool userConfig=false) const
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)
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()
bool GetProperty(std::vector< std::string > propertyPath, const std::string &propertyName, T &property, const bool requiredProperty) const
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()
static const std::map< std::string, AliEmcalTrackSelection::ETrackFilterType_t > fgkTrackFilterTypeMap
Relates string to the track filter enumeration for YAML configuration.
std::string GetBranchName() const
Get the name of the cells branch (NOT the same as the name!)
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)
Custom (user-defined) tracks.
AliEmcalCorrectionCellContainer * GetCellContainer(const std::string &cellsContainerName) const
AliYAMLConfiguration fYAMLConfig
Handles configuration from YAML.
BeamType GetBeamType() const
std::string fDefaultConfigurationFilename
! Default YAML configuration filename
void UserCreateOutputObjects()
bool AddConfiguration(std::string configurationFilename, std::string configurationName="")
TObjArray fParticleCollArray
Particle/track collection array.
TObjArray fClusterCollArray
Cluster collection array.
void RemoveDummyTask() const
virtual Bool_t Initialize()
virtual ~AliEmcalCorrectionTask()
ETrackFilterType_t
Pre-defined track filters.
void AdoptParticleContainer(AliParticleContainer *cont)
void SetIsESD(Bool_t isESD)
void SetIsEmbedding(bool isEmbedded)
Set to true if the cells are located in the event that is being embedded.
void SetCaloCells(AliVCaloCells *cells)
const std::pair< std::string, YAML::Node > & GetConfiguration(const int i) const
BeamType fBeamType
! Event beam type
void SetArray(const AliVEvent *event)
Int_t GetRunNumber(TString)
void SetTrackFilterType(ETrackFilterType_t f)
std::string toString(bool includeYAMLConfigurationInfo=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)
void SetYAMLConfiguration(AliYAMLConfiguration config)
Set YAML Configuration.
std::ostream & PrintConfigurationString(std::ostream &in, bool userConfig=false) const
TList * OpenFile(const char *fname)
void SetClusHadCorrEnergyCut(Double_t cut)
void swap(AliEmcalCorrectionTask &first, AliEmcalCorrectionTask &second)
BeamType fForceBeamType
forced beam type