21 #include "AliVEventHandler.h"
22 #include "AliEMCALGeometry.h"
23 #include "AliVCaloCells.h"
24 #include "AliVCluster.h"
26 #include "AliMultSelection.h"
27 #include "AliCentrality.h"
28 #include "AliESDEvent.h"
29 #include "AliAnalysisManager.h"
30 #include "AliAODEvent.h"
41 {
"kNonLinCorr", AliVCluster::kNonLinCorr },
42 {
"kHadCorr", AliVCluster::kHadCorr },
43 {
"kUserDefEnergy1", AliVCluster::kUserDefEnergy1 },
44 {
"kUserDefEnergy2", AliVCluster::kUserDefEnergy2 }
61 fUserConfigurationFilename(
""),
62 fUserConfigurationString(
""),
63 fDefaultConfiguration(),
64 fDefaultConfigurationFilename(
""),
65 fDefaultConfigurationString(
""),
66 fCorrectionComponents(),
69 fConfigurationInitialized(false),
70 fOrderedComponentsToExecute(),
71 fEventInitialized(false),
78 fUseNewCentralityEstimation(kFALSE),
82 fNeedEmcalGeom(kTRUE),
90 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
92 fParticleCollArray.SetOwner(kTRUE);
93 fClusterCollArray.SetOwner(kTRUE);
108 fUserConfiguration(),
109 fUserConfigurationFilename(
""),
110 fUserConfigurationString(
""),
111 fDefaultConfiguration(),
112 fDefaultConfigurationFilename(
""),
113 fDefaultConfigurationString(
""),
114 fCorrectionComponents(),
117 fConfigurationInitialized(false),
118 fOrderedComponentsToExecute(),
119 fEventInitialized(false),
126 fUseNewCentralityEstimation(kFALSE),
130 fNeedEmcalGeom(kTRUE),
132 fParticleCollArray(),
138 AliDebug(3, Form(
"%s", __PRETTY_FUNCTION__));
140 fParticleCollArray.SetOwner(kTRUE);
141 fClusterCollArray.SetOwner(kTRUE);
143 DefineInput(0, TChain::Class());
144 DefineOutput(1, TList::Class());
155 fUserConfiguration(task.fUserConfiguration),
156 fDefaultConfiguration(task.fDefaultConfiguration),
157 fSuffix(task.fSuffix),
158 fUserConfigurationString(task.fUserConfigurationString),
159 fDefaultConfigurationString(task.fDefaultConfigurationString),
160 fUserConfigurationFilename(task.fUserConfigurationFilename),
161 fDefaultConfigurationFilename(task.fDefaultConfigurationFilename),
162 fOrderedComponentsToExecute(task.fOrderedComponentsToExecute),
163 fCorrectionComponents(task.fCorrectionComponents),
164 fConfigurationInitialized(task.fConfigurationInitialized),
166 fEventInitialized(task.fEventInitialized),
168 fCentBin(task.fCentBin),
169 fMinCent(task.fMinCent),
170 fMaxCent(task.fMaxCent),
171 fNcentBins(task.fNcentBins),
172 fCentEst(task.fCentEst),
173 fUseNewCentralityEstimation(task.fUseNewCentralityEstimation),
175 fNVertCont(task.fNVertCont),
176 fBeamType(task.fBeamType),
177 fForceBeamType(task.fForceBeamType),
178 fNeedEmcalGeom(task.fNeedEmcalGeom),
180 fParticleCollArray(*(static_cast<TObjArray *>(task.fParticleCollArray.Clone()))),
181 fClusterCollArray(*(static_cast<TObjArray *>(task.fClusterCollArray.Clone()))),
182 fOutput(task.fOutput)
185 std::copy(std::begin(task.fVertex), std::end(task.fVertex), std::begin(fVertex));
188 for (
auto cellCont : task.fCellCollArray)
274 AliVEventHandler *evhand = mgr->GetInputEventHandler();
276 if (evhand->InheritsFrom(
"AliESDInputHandler")) {
284 AliError(
"Event handler not found!");
288 AliError(
"Analysis manager not found!");
292 std::string tempName = GetName();
293 std::size_t foundSuffix = tempName.find(
"_");
294 if (foundSuffix != std::string::npos) {
296 fSuffix = tempName.substr(foundSuffix + 1).c_str();
304 AliFatal(
"YAML configuration must be initialized before running (ie. the AddTask, run macro or wagon)!");
330 std::cout << GetName() <<
" Settings:\n" << *
this;
381 AliInfo(TString::Format(
"User file at \"%s\" does not exist! All settings will be from the default file!",
fUserConfigurationFilename.c_str()));
386 std::stringstream tempConfiguration;
389 tempConfiguration.str(
"");
412 std::vector <std::string> executionOrder;
418 std::set <std::string> possibleComponents;
420 possibleComponents.insert(node.first.as<std::string>());
423 possibleComponents.insert(node.first.as<std::string>());
427 std::string expectedComponentName =
"";
428 bool foundSuffixComponent =
false;
429 bool foundComponent =
false;
430 bool componentEnabled =
true;
433 for (
auto & execName : executionOrder)
436 expectedComponentName = TString::Format(
"%s_%s", execName.c_str(),
fSuffix.c_str()).
Data();
437 foundComponent =
false;
438 componentEnabled =
false;
446 if (componentEnabled ==
true) {
447 foundSuffixComponent =
true;
448 correctionComponents.push_back(expectedComponentName);
451 AliInfo(TString::Format(
"Component %s is disabled and will not be run!", expectedComponentName.c_str()));
459 expectedComponentName = execName;
464 if (componentEnabled ==
true) {
465 if (foundSuffixComponent ==
true) {
466 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()));
470 correctionComponents.push_back(expectedComponentName);
474 AliInfo(TString::Format(
"Component %s is disabled and will not be run!", expectedComponentName.c_str()));
480 AliDebug(2,
"Found EMCal Correction Components: ");
481 for (
auto & component : correctionComponents)
483 component =
"AliEmcalCorrection" + component;
484 AliDebug(2, TString::Format(
"%s", component.c_str()) );
503 std::set <std::string> userPropertyNames;
504 std::set <std::string> defaultPropertyNames;
506 bool foundMatch =
false;
507 std::string tempComponentName =
"";
513 userPropertyNames.clear();
514 defaultPropertyNames.clear();
517 tempComponentName = componentName.substr(componentName.find(
"AliEmcalCorrection")+18);
519 AliDebugStream(2) <<
"Checking component " << componentName <<
" for unmatched user settings" << std::endl;
529 if (tempComponentName.find(
"_") != std::string::npos) {
538 for (
auto userPropertyName : userPropertyNames)
540 AliDebugStream(2) <<
"Checking property " << userPropertyName << std::endl;
542 for (
auto defaultPropertyName : defaultPropertyNames)
544 if (userPropertyName == defaultPropertyName) {
545 AliDebugStream(2) <<
"Found match of " << userPropertyName <<
" with " << defaultPropertyName << std::endl;
549 if (foundMatch ==
false) {
550 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()));
568 std::string noPrefixComponentName = componentName.substr(0, componentName.find(
"_" +
fSuffix));
572 AliFatal(TString::Format(
"Failed to create requested component %s!", componentName.c_str()));
576 component->SetName(componentName.c_str());
577 component->SetTitle(componentName.c_str());
596 AliInfo(TString::Format(
"Successfully added correction task: %s", componentName.c_str()));
622 YAML::Node userInputObjectNode;
623 YAML::Node defaultInputObjectNode;
627 AliDebugStream(3) <<
"userInputObjectNode: " << userInputObjectNode << std::endl;
628 AliDebugStream(3) <<
"defaultInputObjectNode: " << defaultInputObjectNode << std::endl;
631 std::set <std::string> requestedContainers;
632 std::vector <std::string> componentRequest;
635 componentRequest.clear();
639 for (
auto & req : componentRequest )
641 AliDebugStream(3) <<
"Component " << componentName <<
" requested container name " << req << std::endl;
642 requestedContainers.insert(req);
646 AliDebugStream(2) << inputObjectName <<
" Containers requested by components: " << std::endl;
647 for (
auto &
str : requestedContainers) {
648 AliDebugStream(2) <<
"\t" <<
str << std::endl;;
652 AliDebug(2, TString::Format(
"Setting up requested containers!"));
667 inputObjectName = inputObjectName +
"Names";
669 std::vector <std::string> inputObjects;
676 for (
auto const &
str : inputObjects)
682 AliDebugStream(2) <<
"Adding cluster container " <<
str <<
" of array " << cont->GetArrayName() <<
" to component " << component->GetName() << std::endl;
685 else if (inputObjectType ==
kTrack)
688 AliDebugStream(2) <<
"Adding particle container " <<
str <<
" of array " << cont->GetArrayName() <<
" to component " << component->GetName() << std::endl;
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()));
701 AliDebugStream(3) <<
"component GetNumberOfCells: " << component->
GetCaloCells()->GetNumberOfCells() << std::endl;
717 for(
auto & containerName : requestedContainers)
726 AliDebug(2, TString::Format(
"Processing container %s of inputType %d", containerName.c_str(), inputObjectType));
728 SetupContainer(inputObjectType, containerName, userInputObjectNode, defaultInputObjectNode);
731 SetupCellsInfo(containerName, userInputObjectNode, defaultInputObjectNode);
751 AliDebugStream(2) <<
"User: " << std::endl << userNode << std::endl <<
"default: " << std::endl << defaultNode << std::endl;
755 cellObj->
SetName(containerName);
757 std::string tempString =
"";
759 if (tempString ==
"usedefault") {
765 bool tempBool =
false;
793 AliDebugStream(2) <<
"Adding container" << std::endl;
794 AliEmcalContainer * cont =
AddContainer(inputObjectType, containerName, userNode, defaultNode);
795 AliDebugStream(2) <<
"Added container" << std::endl;
807 std::string tempString =
"";
809 bool tempBool =
false;
815 AliDebugStream(2) << cont->GetName() <<
": Setting minPt of " << tempDouble << std::endl;
816 cont->SetMinPt(tempDouble);
821 AliDebugStream(2) << cont->GetName() <<
": Setting minE of " << tempDouble << std::endl;
822 cont->SetMinE(tempDouble);
831 AliDebugStream(2) << cont->GetName() <<
": Setting eta limits of " << tempDouble <<
" to " << tempDouble2 << std::endl;
832 cont->SetEtaLimits(tempDouble, tempDouble2);
842 AliDebugStream(2) << cont->GetName() <<
": Setting phi limits of " << tempDouble <<
" to " << tempDouble2 << std::endl;
843 cont->SetPhiLimits(tempDouble, tempDouble2);
856 if (clusterContainer) {
870 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting clusNonLinCorrEnergyCut of " << tempDouble << std::endl;
877 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting clusHadCorrEnergyCut of " << tempDouble << std::endl;
884 AliDebugStream(2) << clusterContainer->GetName() <<
": Setting Include PHOS to " << (tempBool ?
"enabled" :
"disabled") << std::endl;
891 if (trackContainer) {
894 std::vector <UInt_t> filterBitsVector;
898 for (
int filterBit : filterBitsVector) {
899 filterBits += filterBit;
901 AliDebugStream(2) << trackContainer->GetName() <<
": Setting filterBits of " << filterBits << std::endl;
910 AliDebugStream(2) << trackContainer->GetName() <<
": Setting trackFilterType of " << trackFilterType << std::endl;
918 AliDebugStream(2) << trackContainer->GetName() <<
": Setting track cuts period to " << tempString << std::endl;
944 std::string containerBranch =
"";
946 AliFatal(
"Must specify type of container when requesting branch.");
951 AliDebugStream(2) <<
"User Node: " << userNode << std::endl;
952 AliDebugStream(2) <<
"Default Node: " << defaultNode << std::endl;
961 if (containerBranch ==
"usedefault") {
966 AliEmcalContainer * cont = 0;
972 else if (contType ==
kTrack)
974 if (containerBranch ==
"mcparticles") {
982 cont->SetName(containerName.c_str());
1000 AliFatal(
"YAML configuration must be initialized before running (ie. the AddTask, run macro or wagon)!");
1013 AliInfo(
"Reinitializing user configuration from string. Expected if running on grid!");
1018 AliInfo(
"Reinitializing default configuration from string. Expected if running on grid!");
1024 AliDebugStream(4) <<
"(Re)initialized user configuration: " <<
fUserConfiguration << std::endl;
1026 AliDebugStream(4) <<
"(Re)initialized default configuration: " <<
fDefaultConfiguration << std::endl;
1057 component->UserCreateOutputObjects();
1059 if (component->GetOutputList() != 0)
1066 t->SetName(component->GetName());
1069 TIter next(component->GetOutputList());
1070 while (
TObject *obj = next()){
1074 AliDebug(1, TString::Format(
"Added output list from task %s to output.", component->GetName()));
1114 if (!InputEvent()) {
1115 AliError(
"Could not retrieve event! Returning!");
1120 if (dynamic_cast<AliAODEvent*>(InputEvent())) {
1121 AliWarning(
"=============================================================");
1122 AliWarning(
"=== Running on AOD is not equivalent to running on ESD! ===");
1123 AliWarning(
"=============================================================");
1127 fGeom = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->
GetRunNumber());
1129 AliFatal(
"Can not get EMCal geometry instance. If you do not need the EMCal geometry, disable it by setting task->SetNeedEmcalGeometry(kFALSE).");
1138 cont->SetArray(InputEvent());
1145 cont->SetArray(InputEvent());
1159 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";
1175 component->SetEMCALGeometry(
fGeom);
1183 component->ExecOnce();
1198 const AliVVertex *vert = InputEvent()->GetPrimaryVertex();
1208 AliMultSelection *MultSelection =
static_cast<AliMultSelection*
>(InputEvent()->FindListObject(
"MultSelection"));
1209 if (MultSelection) {
1210 fCent = MultSelection->GetMultiplicityPercentile(
fCentEst.Data());
1213 AliWarning(
"Could not retrieve centrality information! Assuming 99");
1217 AliCentrality *aliCent = InputEvent()->GetCentrality();
1222 AliWarning(
"Could not retrieve centrality information! Assuming 99");
1232 AliWarning(Form(
"Negative centrality: %f. Assuming 99",
fCent));
1241 else if (
fCent > 90) {
1246 AliWarning(Form(
"Negative centrality: %f. Assuming 99",
fCent));
1259 AliWarning(Form(
"fCentBin too large: cent = %f fCentBin = %d. Assuming 99",
fCent,
fCentBin));
1269 AliEmcalContainer* cont = 0;
1272 while ((cont = static_cast<AliEmcalContainer*>(nextPartColl()))) cont->NextEvent();
1275 while ((cont = static_cast<AliEmcalContainer*>(nextClusColl()))) cont->NextEvent();
1289 component->SetEvent(InputEvent());
1290 component->SetMCEvent(MCEvent());
1291 component->SetCentralityBin(
fCentBin);
1292 component->SetCentrality(
fCent);
1310 component->UserNotify();
1325 if (stringToWrite ==
"") {
1326 AliWarning(TString::Format(
"%s configuration is empty!", userConfig ?
"User" :
"Default"));
1328 in << stringToWrite;
1342 bool returnValue =
false;
1347 std::ofstream outFile(filename);
1355 AliWarning(TString::Format(
"Configuration not properly initialized! Cannot print %s configuration!", userConfig ?
"user" :
"default"));
1361 AliWarning(
"Please pass a valid filename instead of empty quotes!");
1383 std::string returnValue =
"";
1385 if (esdMode ==
true) {
1386 if (returnObjectType ==
true) {
1387 returnValue =
"AliESDCaloCluster";
1390 returnValue =
"CaloClusters";
1394 if (returnObjectType ==
true) {
1395 returnValue =
"AliAODCaloCluster";
1398 returnValue =
"caloClusters";
1402 else if (objType ==
kTrack) {
1403 if (esdMode ==
true) {
1404 if (returnObjectType ==
true) {
1405 returnValue =
"AliESDtrack";
1408 returnValue =
"Tracks";
1412 if (returnObjectType ==
true) {
1413 returnValue =
"AliAODTrack";
1416 returnValue =
"tracks";
1421 if (esdMode ==
true) {
1422 if (returnObjectType ==
true) {
1423 returnValue =
"AliESDCaloCells";
1426 returnValue =
"EMCALCells";
1430 if (returnObjectType ==
true) {
1431 returnValue =
"AliAODCaloCells";
1434 returnValue =
"emcalCells";
1457 AliVEvent *
event = 0;
1482 std::ifstream inFile(filename);
1483 return inFile.good();
1499 filename =
gSystem->ExpandPathName(filename.c_str());
1502 if(filename.find(
"alien://") != std::string::npos)
1504 AliDebug(2, TString::Format(
"Opening file \"%s\" on the grid!", filename.c_str()));
1507 TGrid::Connect(
"alien://");
1511 std::string localFilename =
gSystem->BaseName(filename.c_str());
1513 if (userFile ==
true) {
1514 localFilename =
"user" + localFilename;
1516 TFile::Cp(filename.c_str(), localFilename.c_str());
1519 filename = localFilename;
1532 AliDebugStream(2) <<
"Retrieving cells object " << cellContainer->
GetName() << std::endl;
1536 cellContainer->
SetCells(dynamic_cast<AliVCaloCells *>(event->FindListObject(cellContainer->
GetBranchName().c_str())));
1552 AliVEvent *
event =
GetEvent(InputEvent());
1554 TClonesArray * array =
dynamic_cast<TClonesArray *
>(
event->FindListObject(cont->GetArrayName()));
1556 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()));
1558 array->SetName(cont->GetArrayName());
1559 event->AddObject(array);
1573 std::string inputObjectName =
"";
1575 inputObjectName =
"clusterContainers";
1577 else if (inputObjectType ==
kTrack) {
1578 inputObjectName =
"trackContainers";
1581 inputObjectName =
"cells";
1584 AliFatal(TString::Format(
"Unrecognized input object type %d", inputObjectType));
1587 return inputObjectName;
1603 bool foundComponent =
false;
1604 for (
auto & possibleComponent : possibleComponents)
1606 if (possibleComponent == name) {
1607 foundComponent =
true;
1612 return foundComponent;
1628 const AliESDRun *run = esd->GetESDRun();
1629 TString beamType = run->GetBeamType();
1630 if (beamType ==
"p-p")
1632 else if (beamType ==
"A-A")
1634 else if (beamType ==
"p-A")
1639 Int_t runNumber = InputEvent()->GetRunNumber();
1641 if ((runNumber >= 136833 && runNumber <= 139517) ||
1642 (runNumber >= 167693 && runNumber <= 170593) ||
1643 (runNumber >= 244824 && runNumber <= 246994)) {
1645 }
else if ((runNumber >= 188356 && runNumber <= 188366) ||
1646 (runNumber >= 195164 && runNumber <= 197388) ||
1647 (runNumber >= 265015 && runNumber <= 267166)) {
1661 stream <<
"Cells info: " << std::endl;
1663 stream <<
"\tName: " << cellInfo->GetName() <<
"\tBranch: " << cellInfo->GetBranchName() <<
"\tIsEmbedding: " << std::boolalpha << cellInfo->GetIsEmbedding() << std::endl;
1666 else if (inputObjectType ==
kCluster || inputObjectType ==
kTrack) {
1667 stream << (inputObjectType ==
kCluster ?
"Cluster" :
"Track") <<
" container info: " << std::endl;
1668 AliEmcalContainer * cont = 0;
1670 cont =
static_cast<AliEmcalContainer *
>(containerInfo);
1671 stream <<
"\tName: " << cont->GetName() <<
"\tBranch: " << cont->GetArrayName() <<
"\tTitle: " << cont->GetTitle() << std::endl;
1677 AliErrorStream() <<
"Unrecognized input object type " << inputObjectType << std::endl;
1696 if (nodeToRetrieveFrom[
"sharedParameters"]) {
1697 inputNode[
"sharedParameters"] = nodeToRetrieveFrom[
"sharedParameters"];
1713 YAML::Node tempNode;
1715 for (
auto propertyName : tempNode)
1717 propertyNames.insert(propertyName.first.as<std::string>());
1730 if (
TString(n).IsNull())
return 0;
1748 if (
TString(n).IsNull())
return 0;
1766 if (
TString(n).IsNull())
return 0;
1784 if (
TString(n).IsNull())
return 0;
1850 if (cellContainer->GetName() == cellsContainerName) {
1851 return cellContainer;
1865 ::Error(
"AddTaskEmcalCorrectionTask",
"No analysis manager to connect to.");
1871 AliVEventHandler* handler = mgr->GetInputEventHandler();
1874 ::Error(
"AddTaskEmcalCorrectionTask",
"This task requires an input event handler");
1878 TString name =
"AliEmcalCorrectionTask";
1880 name += TString::Format(
"_%s", suffix.Data());
1884 if (mgrTask)
return mgrTask;
1893 mgr->AddTask(correctionTask);
1896 AliAnalysisDataContainer* cInput = mgr->GetCommonInputContainer();
1898 TString outputContainerName(name);
1899 outputContainerName +=
"_histos";
1901 AliAnalysisDataContainer * cOutput = mgr->CreateContainer(outputContainerName.Data(),
1903 AliAnalysisManager::kOutputContainer,
1904 Form(
"%s", AliAnalysisManager::GetCommonFileName()));
1906 mgr->ConnectInput(correctionTask, 0, cInput);
1907 mgr->ConnectOutput(correctionTask, 1, cOutput);
1911 return correctionTask;
1921 std::stringstream tempSS;
1924 tempSS <<
"Correction components:\n";
1926 tempSS <<
"\t" << component <<
"\n";
1929 tempSS <<
"\nInput objects:\n";
1934 if (includeYAMLConfigurationInfo ==
true) {
1935 tempSS <<
"\nUser Configuration:\n";
1937 tempSS <<
"\n\nDefault Configuration:\n";
1942 return tempSS.str();
1965 std::ostream & result = myTask.
Print(in);
1977 std::string temp(opt);
1978 bool includeYAMLConfig =
false;
1979 if (temp ==
"YAML") {
1980 includeYAMLConfig =
true;
1982 Printf(
"%s",
toString(includeYAMLConfig).c_str());
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)
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()
AliTrackContainer * AddTrackContainer(const char *n)
void SetClusterContainer(AliClusterContainer *cont)
No filter (all tracks passing)
std::vector< std::string > fOrderedComponentsToExecute
Ordered set of components to execute.
std::string GetInputFieldNameFromInputObjectType(InputObject_t inputObjectType)
bool WriteConfigurationFile(std::string filename, bool userConfig=false) const
AliClusterContainer * GetClusterContainer(Int_t i=0) 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.
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
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.
friend void swap(AliEmcalCorrectionTask &first, AliEmcalCorrectionTask &second)
Container for particles within the EMCAL framework.
AliEmcalContainer * AddContainer(InputObject_t contType, std::string &containerName, YAML::Node &userNode, YAML::Node &defaultNode)
void SetUserConfiguration(YAML::Node &node)
Make copy to ensure that the nodes do not point to each other (?)
void AddContainersToComponent(AliEmcalCorrectionComponent *component, InputObject_t inputObjectType)
void SetParticleContainer(AliParticleContainer *cont)
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 PrintRequestedContainersInformation(InputObject_t inputObjectType, std::ostream &stream) 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()
Base class for correction components in the EMCal correction framework.
BeamType
Switch for the beam type.
AliMCParticleContainer * AddMCParticleContainer(const char *n)
void InitializeComponents()
void SetupContainersFromInputNodes(InputObject_t inputObjectType, YAML::Node &userInputObjectNode, YAML::Node &defaultInputObjectNode, std::set< std::string > &requestedContainers)
void SetIncludePHOS(Bool_t b)
static std::string DetermineUseDefaultName(InputObject_t contType, bool esdMode, bool returnObjectType=false)
void SetupContainer(InputObject_t inputObjectType, std::string containerName, YAML::Node &userNode, YAML::Node &defaultNode)
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.
void CheckForContainerArray(AliEmcalContainer *cont, InputObject_t objectType)
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
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.
static AliVEvent * GetEvent(AliVEvent *inputEvent, bool isEmbedding=false)
virtual Bool_t Initialize()
void SetDefaultConfiguration(YAML::Node &node)
virtual ~AliEmcalCorrectionTask()
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
ETrackFilterType_t
Pre-defined track filters.
AliParticleContainer * GetParticleContainer(Int_t i=0) const
void AdoptParticleContainer(AliParticleContainer *cont)
void SetIsESD(Bool_t isESD)
AliVCaloCells * GetCaloCells()
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
Int_t GetRunNumber(TString)
void SetTrackFilterType(ETrackFilterType_t f)
std::string toString(bool includeYAMLConfigurationInfo=false) const
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
AliClusterContainer * AddClusterContainer(const char *n)
std::vector< AliEmcalCorrectionCellContainer * > fCellCollArray
Cells collection array.
Bool_t RetrieveEventObjects()
AliParticleContainer * AddParticleContainer(const char *n)
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
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
InputObject_t
Type of input object to be created
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
void CreateInputObjects(InputObject_t inputObjectType)