22 #include "AliVEventHandler.h"
23 #include "AliEMCALGeometry.h"
24 #include "AliVCaloCells.h"
25 #include "AliVCluster.h"
27 #include "AliMultSelection.h"
28 #include "AliCentrality.h"
29 #include "AliESDEvent.h"
30 #include "AliAnalysisManager.h"
31 #include "AliAODEvent.h"
44 {
"kNonLinCorr", AliVCluster::kNonLinCorr },
45 {
"kHadCorr", AliVCluster::kHadCorr },
46 {
"kUserDefEnergy1", AliVCluster::kUserDefEnergy1 },
47 {
"kUserDefEnergy2", AliVCluster::kUserDefEnergy2 }
64 fUserConfigurationFilename(
""),
65 fUserConfigurationString(
""),
66 fDefaultConfiguration(),
67 fDefaultConfigurationFilename(
""),
68 fDefaultConfigurationString(
""),
69 fCorrectionComponents(),
72 fConfigurationInitialized(false),
73 fOrderedComponentsToExecute(),
74 fEventInitialized(false),
81 fUseNewCentralityEstimation(kFALSE),
85 fNeedEmcalGeom(kTRUE),
93 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
95 fParticleCollArray.SetOwner(kTRUE);
96 fClusterCollArray.SetOwner(kTRUE);
111 fUserConfiguration(),
112 fUserConfigurationFilename(
""),
113 fUserConfigurationString(
""),
114 fDefaultConfiguration(),
115 fDefaultConfigurationFilename(
""),
116 fDefaultConfigurationString(
""),
117 fCorrectionComponents(),
120 fConfigurationInitialized(false),
121 fOrderedComponentsToExecute(),
122 fEventInitialized(false),
129 fUseNewCentralityEstimation(kFALSE),
133 fNeedEmcalGeom(kTRUE),
135 fParticleCollArray(),
141 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
143 fParticleCollArray.SetOwner(kTRUE);
144 fClusterCollArray.SetOwner(kTRUE);
146 DefineInput(0, TChain::Class());
147 DefineOutput(1, TList::Class());
158 fUserConfiguration(task.fUserConfiguration),
159 fDefaultConfiguration(task.fDefaultConfiguration),
160 fSuffix(task.fSuffix),
161 fUserConfigurationString(task.fUserConfigurationString),
162 fDefaultConfigurationString(task.fDefaultConfigurationString),
163 fUserConfigurationFilename(task.fUserConfigurationFilename),
164 fDefaultConfigurationFilename(task.fDefaultConfigurationFilename),
165 fOrderedComponentsToExecute(task.fOrderedComponentsToExecute),
166 fCorrectionComponents(task.fCorrectionComponents),
167 fConfigurationInitialized(task.fConfigurationInitialized),
169 fEventInitialized(task.fEventInitialized),
171 fCentBin(task.fCentBin),
172 fMinCent(task.fMinCent),
173 fMaxCent(task.fMaxCent),
174 fNcentBins(task.fNcentBins),
175 fCentEst(task.fCentEst),
176 fUseNewCentralityEstimation(task.fUseNewCentralityEstimation),
178 fNVertCont(task.fNVertCont),
179 fBeamType(task.fBeamType),
180 fForceBeamType(task.fForceBeamType),
181 fNeedEmcalGeom(task.fNeedEmcalGeom),
183 fParticleCollArray(*(static_cast<TObjArray *>(task.fParticleCollArray.Clone()))),
184 fClusterCollArray(*(static_cast<TObjArray *>(task.fClusterCollArray.Clone()))),
185 fOutput(task.fOutput)
188 std::copy(std::begin(task.fVertex), std::end(task.fVertex), std::begin(fVertex));
191 for (
auto cellCont : task.fCellCollArray)
277 AliVEventHandler *evhand = mgr->GetInputEventHandler();
279 if (evhand->InheritsFrom(
"AliESDInputHandler")) {
287 AliError(
"Event handler not found!");
291 AliError(
"Analysis manager not found!");
295 std::string tempName = GetName();
296 std::size_t foundSuffix = tempName.find(
"_");
297 if (foundSuffix != std::string::npos) {
299 fSuffix = tempName.substr(foundSuffix + 1).c_str();
303 AliInfoStream() <<
"Initializing correction task with suffix \"" <<
fSuffix <<
"\"" << std::endl;
311 AliFatal(
"YAML configuration must be initialized before running (ie. in the run macro or wagon)!");
337 std::cout << GetName() <<
" Settings:\n" << *
this;
388 AliInfo(TString::Format(
"User file at \"%s\" does not exist! All settings will be from the default file!",
fUserConfigurationFilename.c_str()));
393 std::stringstream tempConfiguration;
396 tempConfiguration.str(
"");
419 std::vector <std::string> executionOrder;
425 std::set <std::string> possibleComponents;
427 possibleComponents.insert(node.first.as<std::string>());
430 possibleComponents.insert(node.first.as<std::string>());
434 std::string expectedComponentName =
"";
435 bool foundSuffixComponent =
false;
436 bool foundComponent =
false;
437 bool componentEnabled =
true;
440 for (
auto & execName : executionOrder)
443 expectedComponentName = TString::Format(
"%s_%s", execName.c_str(),
fSuffix.c_str()).
Data();
444 foundComponent =
false;
445 componentEnabled =
false;
453 if (componentEnabled ==
true) {
454 foundSuffixComponent =
true;
455 correctionComponents.push_back(expectedComponentName);
458 AliInfo(TString::Format(
"Component %s is disabled and will not be run!", expectedComponentName.c_str()));
466 expectedComponentName = execName;
471 if (componentEnabled ==
true) {
472 if (foundSuffixComponent ==
true) {
473 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()));
477 correctionComponents.push_back(expectedComponentName);
481 AliInfo(TString::Format(
"Component %s is disabled and will not be run!", expectedComponentName.c_str()));
487 AliDebug(2,
"Found EMCal Correction Components: ");
488 for (
auto & component : correctionComponents)
490 component =
"AliEmcalCorrection" + component;
491 AliDebug(2, TString::Format(
"%s", component.c_str()) );
510 std::set <std::string> userPropertyNames;
511 std::set <std::string> defaultPropertyNames;
513 bool foundMatch =
false;
514 std::string tempComponentName =
"";
520 userPropertyNames.clear();
521 defaultPropertyNames.clear();
524 tempComponentName = componentName.substr(componentName.find(
"AliEmcalCorrection")+18);
526 AliDebugStream(2) <<
"Checking component " << componentName <<
" for unmatched user settings" << std::endl;
536 if (tempComponentName.find(
"_") != std::string::npos) {
545 for (
auto userPropertyName : userPropertyNames)
547 AliDebugStream(2) <<
"Checking property " << userPropertyName << std::endl;
549 for (
auto defaultPropertyName : defaultPropertyNames)
551 if (userPropertyName == defaultPropertyName) {
552 AliDebugStream(2) <<
"Found match of " << userPropertyName <<
" with " << defaultPropertyName << std::endl;
556 if (foundMatch ==
false) {
557 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()));
575 std::string noPrefixComponentName = componentName.substr(0, componentName.find(
"_" +
fSuffix));
579 AliFatal(TString::Format(
"Failed to create requested component %s!", componentName.c_str()));
583 component->SetName(componentName.c_str());
584 component->SetTitle(componentName.c_str());
601 if (component && initialized)
603 AliInfo(TString::Format(
"Successfully added correction task: %s", componentName.c_str()));
629 YAML::Node userInputObjectNode;
630 YAML::Node defaultInputObjectNode;
634 AliDebugStream(3) <<
"userInputObjectNode: " << userInputObjectNode << std::endl;
635 AliDebugStream(3) <<
"defaultInputObjectNode: " << defaultInputObjectNode << std::endl;
638 std::set <std::string> requestedContainers;
639 std::vector <std::string> componentRequest;
642 componentRequest.clear();
646 for (
auto & req : componentRequest )
648 AliDebugStream(3) <<
"Component " << componentName <<
" requested container name " << req << std::endl;
649 requestedContainers.insert(req);
653 AliDebugStream(2) << inputObjectName <<
" Containers requested by components: " << std::endl;
654 for (
auto &
str : requestedContainers) {
655 AliDebugStream(2) <<
"\t" <<
str << std::endl;;
659 AliDebug(2, TString::Format(
"Setting up requested containers!"));
675 inputObjectName = inputObjectName +
"Names";
677 std::vector <std::string> inputObjects;
684 for (
auto const &
str : inputObjects)
690 AliDebugStream(2) <<
"Adding cluster container " <<
str <<
" of array " << cont->GetArrayName() <<
" to component " << component->GetName() << std::endl;
692 if (checkObjectExists && !cont) {
693 AliError(TString::Format(
"%s: Unable to retrieve input object \"%s\" because it is null. Please check your configuration!", GetName(),
str.c_str()));
698 if (!(cont->GetIsEmbedding())) {
705 AliDebugStream(2) <<
"Adding particle container " <<
str <<
" of array " << cont->GetArrayName() <<
" to component " << component->GetName() << std::endl;
707 if (checkObjectExists && !cont) {
708 AliFatal(TString::Format(
"%s: Unable to retrieve input object \"%s\" because it is null. Please check your configuration!", GetName(),
str.c_str()));
713 if (!(cont->GetIsEmbedding())) {
720 if (inputObjects.size() > 1) {
721 AliFatal(TString::Format(
"Component %s requested more than one cell branch, but this is not supported! Check the configuration!", component->GetName()));
726 AliDebugStream(2) <<
"Adding calo cells \"" << cellCont->
GetName() <<
"\" of branch name \"" << cellCont->
GetBranchName() <<
"\" to component " << component->GetName() << std::endl;
735 if (checkObjectExists && !(cellCont->
GetCells())) {
736 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()));
747 AliDebugStream(3) <<
"Component GetNumberOfCells: " << component->
GetCaloCells()->GetNumberOfCells() << std::endl;
769 for(
auto & containerName : requestedContainers)
778 AliDebug(2, TString::Format(
"Processing container %s of inputType %d", containerName.c_str(), inputObjectType));
780 SetupContainer(inputObjectType, containerName, userInputObjectNode, defaultInputObjectNode);
783 SetupCellsInfo(containerName, userInputObjectNode, defaultInputObjectNode);
803 AliDebugStream(2) <<
"User: " << std::endl << userNode << std::endl <<
"default: " << std::endl << defaultNode << std::endl;
807 cellObj->
SetName(containerName);
809 std::string tempString =
"";
811 if (tempString ==
"usedefault") {
817 bool tempBool =
false;
845 AliDebugStream(2) <<
"Adding container" << std::endl;
846 AliEmcalContainer * cont =
AddContainer(inputObjectType, containerName, userNode, defaultNode);
847 AliDebugStream(2) <<
"Added container" << std::endl;
859 std::string tempString =
"";
861 bool tempBool =
false;
867 AliDebugStream(2) << cont->GetName() <<
": Setting minPt of " << tempDouble << std::endl;
868 cont->SetMinPt(tempDouble);
873 AliDebugStream(2) << cont->GetName() <<
": Setting minE of " << tempDouble << std::endl;
874 cont->SetMinE(tempDouble);
883 AliDebugStream(2) << cont->GetName() <<
": Setting eta limits of " << tempDouble <<
" to " << tempDouble2 << std::endl;
884 cont->SetEtaLimits(tempDouble, tempDouble2);
894 AliDebugStream(2) << cont->GetName() <<
": Setting phi limits of " << tempDouble <<
" to " << tempDouble2 << std::endl;
895 cont->SetPhiLimits(tempDouble, tempDouble2);
901 AliDebugStream(2) << cont->GetName() <<
": Setting embedding to " << (tempBool ?
"enabled" :
"disabled") << std::endl;
902 cont->SetIsEmbedding(tempBool);
907 if (clusterContainer) {
921 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting clusNonLinCorrEnergyCut of " << tempDouble << std::endl;
928 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting clusHadCorrEnergyCut of " << tempDouble << std::endl;
935 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting Include PHOS to " << (tempBool ?
"enabled" :
"disabled") << std::endl;
942 if (trackContainer) {
945 std::vector <UInt_t> filterBitsVector;
949 for (
int filterBit : filterBitsVector) {
950 filterBits += filterBit;
952 AliDebugStream(2) << trackContainer->GetName() <<
": Setting filterBits of " << filterBits << std::endl;
961 AliDebugStream(2) << trackContainer->GetName() <<
": Setting trackFilterType of " << trackFilterType << std::endl;
969 AliDebugStream(2) << trackContainer->GetName() <<
": Setting track cuts period to " << tempString << std::endl;
995 std::string containerBranch =
"";
997 AliFatal(
"Must specify type of container when requesting branch.");
1002 AliDebugStream(2) <<
"User Node: " << userNode << std::endl;
1003 AliDebugStream(2) <<
"Default Node: " << defaultNode << std::endl;
1012 if (containerBranch ==
"usedefault") {
1017 AliEmcalContainer * cont = 0;
1025 if (containerBranch ==
"mcparticles") {
1033 cont->SetName(containerName.c_str());
1051 AliFatal(
"YAML configuration must be initialized before running (ie. the AddTask, run macro or wagon)!");
1064 AliInfo(
"Reinitializing user configuration from string. Expected if running on grid!");
1069 AliInfo(
"Reinitializing default configuration from string. Expected if running on grid!");
1075 AliDebugStream(4) <<
"(Re)initialized user configuration: " <<
fUserConfiguration << std::endl;
1077 AliDebugStream(4) <<
"(Re)initialized default configuration: " <<
fDefaultConfiguration << std::endl;
1108 component->UserCreateOutputObjects();
1110 if (component->GetOutputList() != 0)
1117 t->SetName(component->GetName());
1120 TIter next(component->GetOutputList());
1121 while (
TObject *obj = next()){
1125 AliDebug(1, TString::Format(
"Added output list from task %s to output.", component->GetName()));
1165 if (!InputEvent()) {
1166 AliError(
"Could not retrieve event! Returning!");
1171 if (dynamic_cast<AliAODEvent*>(InputEvent())) {
1172 AliWarning(
"=============================================================");
1173 AliWarning(
"=== Running on AOD is not equivalent to running on ESD! ===");
1174 AliWarning(
"=============================================================");
1178 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->
GetRunNumber());
1180 AliFatal(
"Can not get EMCal geometry instance. If you do not need the EMCal geometry, disable it by setting task->SetNeedEmcalGeometry(kFALSE).");
1210 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";
1226 component->SetEMCALGeometry(
fGeom);
1233 component->SetInputEvent(InputEvent());
1234 component->SetMCEvent(MCEvent());
1237 component->ExecOnce();
1241 if (!(component->GetCaloCells())) {
1242 AliDebugStream(2) <<
"Re-initializing cells for component " << component->GetName() << std::endl;
1259 const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1269 AliMultSelection *MultSelection =
static_cast<AliMultSelection*
>(InputEvent()->FindListObject(
"MultSelection"));
1270 if (MultSelection) {
1271 fCent = MultSelection->GetMultiplicityPercentile(
fCentEst.Data());
1274 AliWarning(
"Could not retrieve centrality information! Assuming 99");
1278 AliCentrality *aliCent = InputEvent()->GetCentrality();
1283 AliWarning(
"Could not retrieve centrality information! Assuming 99");
1293 AliWarning(Form(
"Negative centrality: %f. Assuming 99",
fCent));
1302 else if (
fCent > 90) {
1307 AliWarning(Form(
"Negative centrality: %f. Assuming 99",
fCent));
1320 AliWarning(Form(
"fCentBin too large: cent = %f fCentBin = %d. Assuming 99",
fCent,
fCentBin));
1330 AliEmcalContainer* cont = 0;
1333 while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->NextEvent();
1336 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) cont->NextEvent();
1350 component->SetInputEvent(InputEvent());
1351 component->SetMCEvent(MCEvent());
1352 component->SetCentralityBin(
fCentBin);
1353 component->SetCentrality(
fCent);
1354 component->SetVertex(
fVertex);
1372 component->UserNotify();
1387 if (stringToWrite ==
"") {
1388 AliWarning(TString::Format(
"%s configuration is empty!", userConfig ?
"User" :
"Default"));
1390 in << stringToWrite;
1404 bool returnValue =
false;
1409 std::ofstream outFile(filename);
1417 AliError(TString::Format(
"Configuration not properly initialized! Cannot print %s configuration!", userConfig ?
"user" :
"default"));
1423 AliError(
"Please pass a valid filename instead of empty quotes!");
1437 bool returnValue =
false;
1443 YAML::Node passedNode = YAML::LoadFile(filename);
1448 std::stringstream passedNodeSS;
1449 passedNodeSS << passedNode;
1457 AliWarningStream() <<
"Passed YAML config:\n" << passedNode <<
"\n\nStored YAML config:\n" << comparisonNode <<
"\nPassed config located in file \"" << filename <<
"\" is not the same as the stored " << (userConfig ?
"user" :
"default") <<
"configuration file! YAML configurations printed above.\n";
1462 AliError(TString::Format(
"Configuration not properly initialized! Cannot compare %s configuration!", userConfig ?
"user" :
"default"));
1468 AliError(
"Please pass a valid filename instead of empty quotes!");
1483 std::ifstream inFile(filename);
1484 return inFile.good();
1500 filename =
gSystem->ExpandPathName(filename.c_str());
1503 if(filename.find(
"alien://") != std::string::npos)
1505 AliDebug(2, TString::Format(
"Opening file \"%s\" on the grid!", filename.c_str()));
1508 TGrid::Connect(
"alien://");
1512 std::string localFilename =
gSystem->BaseName(filename.c_str());
1514 if (userFile ==
true) {
1515 localFilename =
"user." + localFilename;
1519 localFilename =
"." + localFilename;
1520 localFilename = tempUUID.AsString() + localFilename;
1523 TFile::Cp(filename.c_str(), localFilename.c_str());
1526 filename = localFilename;
1539 AliDebugStream(2) <<
"Retrieving cells object " << cellContainer->
GetName() << std::endl;
1543 cellContainer->
SetCells(dynamic_cast<AliVCaloCells *>(event->FindListObject(cellContainer->
GetBranchName().c_str())));
1559 TClonesArray * array =
dynamic_cast<TClonesArray *
>(
event->FindListObject(cont->GetArrayName()));
1561 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()));
1563 array->SetName(cont->GetArrayName());
1564 event->AddObject(array);
1578 std::string inputObjectName =
"";
1580 inputObjectName =
"clusterContainers";
1583 inputObjectName =
"trackContainers";
1586 inputObjectName =
"cells";
1589 AliFatal(TString::Format(
"Unrecognized input object type %d", inputObjectType));
1592 return inputObjectName;
1608 bool foundComponent =
false;
1609 for (
auto & possibleComponent : possibleComponents)
1611 if (possibleComponent == name) {
1612 foundComponent =
true;
1617 return foundComponent;
1633 const AliESDRun *run = esd->GetESDRun();
1634 TString beamType = run->GetBeamType();
1635 if (beamType ==
"p-p")
1637 else if (beamType ==
"A-A")
1639 else if (beamType ==
"p-A")
1644 Int_t runNumber = InputEvent()->GetRunNumber();
1646 if ((runNumber >= 136833 && runNumber <= 139517) ||
1647 (runNumber >= 167693 && runNumber <= 170593) ||
1648 (runNumber >= 244824 && runNumber <= 246994)) {
1650 }
else if ((runNumber >= 188356 && runNumber <= 188366) ||
1651 (runNumber >= 195164 && runNumber <= 197388) ||
1652 (runNumber >= 265015 && runNumber <= 267166)) {
1666 stream <<
"Cells info: " << std::endl;
1668 stream <<
"\tName: " << cellInfo->GetName() <<
"\tBranch: " << cellInfo->GetBranchName() <<
"\tIsEmbedding: " << std::boolalpha << cellInfo->GetIsEmbedding() << std::endl;
1673 AliEmcalContainer * cont = 0;
1675 cont =
static_cast<AliEmcalContainer *
>(containerInfo);
1676 stream <<
"\tName: " << cont->GetName() <<
"\tBranch: " << cont->GetArrayName() <<
"\tTitle: " << cont->GetTitle() <<
"\tIsEmbedding: " << std::boolalpha << cont->GetIsEmbedding() << std::endl;
1680 AliErrorStream() <<
"Unrecognized input object type " << inputObjectType << std::endl;
1699 if (nodeToRetrieveFrom[
"sharedParameters"]) {
1700 inputNode[
"sharedParameters"] = nodeToRetrieveFrom[
"sharedParameters"];
1716 YAML::Node tempNode;
1718 for (
auto propertyName : tempNode)
1720 propertyNames.insert(propertyName.first.as<std::string>());
1735 if (cellContainer->GetName() == cellsContainerName) {
1736 return cellContainer;
1750 ::Error(
"AddTaskEmcalCorrectionTask",
"No analysis manager to connect to.");
1756 AliVEventHandler* handler = mgr->GetInputEventHandler();
1759 ::Error(
"AddTaskEmcalCorrectionTask",
"This task requires an input event handler");
1763 TString name =
"AliEmcalCorrectionTask";
1765 name += TString::Format(
"_%s", suffix.Data());
1769 if (mgrTask)
return mgrTask;
1778 mgr->AddTask(correctionTask);
1781 AliAnalysisDataContainer* cInput = mgr->GetCommonInputContainer();
1783 TString outputContainerName(name);
1784 outputContainerName +=
"_histos";
1786 AliAnalysisDataContainer * cOutput = mgr->CreateContainer(outputContainerName.Data(),
1788 AliAnalysisManager::kOutputContainer,
1789 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
1791 mgr->ConnectInput(correctionTask, 0, cInput);
1792 mgr->ConnectOutput(correctionTask, 1, cOutput);
1796 return correctionTask;
1806 std::stringstream tempSS;
1809 tempSS <<
"Correction components:\n";
1811 tempSS <<
"\t" << component <<
"\n";
1814 tempSS <<
"\nInput objects:\n";
1819 if (includeYAMLConfigurationInfo ==
true) {
1820 tempSS <<
"\nUser Configuration:\n";
1822 tempSS <<
"\n\nDefault Configuration:\n";
1827 return tempSS.str();
1850 std::ostream & result = myTask.
Print(in);
1862 std::string temp(opt);
1863 bool includeYAMLConfig =
false;
1864 if (temp ==
"YAML") {
1865 includeYAMLConfig =
true;
1867 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 components)
void PrintRequestedContainersInformation(AliEmcalContainerUtils::InputObject_t inputObjectType, std::ostream &stream) const
Steering task for the EMCal correction framework.
AliEMCALGeometry * fGeom
! Emcal geometry
return jsonbuilder str().c_str()
static const std::map< std::string, AliVCluster::VCluUserDefEnergy_t > fgkClusterEnergyTypeMap
Relates string to the cluster energy enumeration for YAML configuration.
void SetTrackCutsPeriod(const char *period)
static bool DoesFileExist(const std::string &filename)
std::string GetName() const
Get the name of the cells object (NOT the same as the branch!)
void InitializeConfiguration()
void SetArray(const AliVEvent *event)
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 SetupConfigurationFilePath(std::string &filename, bool userFile=false)
void UserExec(Option_t *option)
AliEmcalCorrectionTask & operator=(AliEmcalCorrectionTask other)
void UserCreateOutputObjectsComponents()
YAML::Node fUserConfiguration
! User YAML Configuration
Double_t fMaxCent
max centrality for event selection
Double_t fVertex[3]
! Event vertex
Declaration of class AliAnalysisTaskEmcalEmbeddingHelper.
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)
AliEmcalContainer * AddContainer(AliEmcalContainerUtils::InputObject_t contType, std::string &containerName, YAML::Node &userNode, YAML::Node &defaultNode)
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.
static AliVEvent * GetEvent(AliVEvent *inputEvent, bool isEmbedding=false)
void SetUserConfiguration(YAML::Node &node)
Make copy to ensure that the nodes do not point to each other (?)
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
InputObject_t
Type of input object to be created
AliClusterContainer * GetClusterContainer(Int_t i=0) const
std::string fDefaultConfigurationString
Store the default YAML configuration as a string so that it can be streamed.
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)
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
BeamType GetBeamType() const
std::string fDefaultConfigurationFilename
! Default YAML configuration filename
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
void UserCreateOutputObjects()
void GetNodeForInputObjects(YAML::Node &inputNode, YAML::Node &nodeToRetrieveFrom, std::string &inputObjectName, bool requiredProperty)
TObjArray fParticleCollArray
Particle/track collection array.
TObjArray fClusterCollArray
Cluster collection array.
virtual Bool_t Initialize()
void SetDefaultConfiguration(YAML::Node &node)
virtual ~AliEmcalCorrectionTask()
ETrackFilterType_t
Pre-defined track filters.
void AdoptParticleContainer(AliParticleContainer *cont)
void SetIsESD(Bool_t isESD)
std::ostream & operator<<(std::ostream &in, const AliEmcalCorrectionTask &myTask)
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
void SetArray(const AliVEvent *event)
Int_t GetRunNumber(TString)
void SetTrackFilterType(ETrackFilterType_t f)
std::string toString(bool includeYAMLConfigurationInfo=false) const
void SetupContainersFromInputNodes(AliEmcalContainerUtils::InputObject_t inputObjectType, YAML::Node &userInputObjectNode, YAML::Node &defaultInputObjectNode, std::set< std::string > &requestedContainers)
YAML::Node fDefaultConfiguration
! Default YAML Configuration
void Print(Option_t *opt="") const
void SetupCellsInfo(std::string containerName, YAML::Node &userNode, YAML::Node &defaultNode)
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
Double_t fMinCent
min centrality for event selection
std::vector< AliEmcalCorrectionCellContainer * > fCellCollArray
Cells collection array.
Bool_t RetrieveEventObjects()
void SetupContainer(AliEmcalContainerUtils::InputObject_t inputObjectType, std::string containerName, YAML::Node &userNode, YAML::Node &defaultNode)
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)
std::string fUserConfigurationString
Store the user YAML configuration as a string so that it can be streamed.
void GetPropertyNamesFromNode(const std::string &componentName, const YAML::Node &node, std::set< std::string > &propertyNames, const bool nodeRequired)
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)
bool GetProperty(std::string propertyName, T &property, bool requiredProperty=true, std::string correctionName="")
Retrieve property.
BeamType fForceBeamType
forced beam type