|
ATLAS Offline Software
|
Go to the documentation of this file.
38 return StatusCode::FAILURE;
44 ATH_MSG_ERROR(
"Config file string is empty. Please provide a config file to the tool.");
45 return StatusCode::FAILURE;
52 env.IgnoreDuplicates(
false);
55 if (
env.Lookup(
"ElectronConfigs"))
59 if (
env.Lookup(
"ConvertedPhotonConfigs"))
63 if (
env.Lookup(
"UnconvertedPhotonConfigs"))
71 ANA_MSG_ERROR(
"You did not provide any config files for the ElectronPhotonVariableCorrectionBase to the ElectronPhotonVariableCorrectionTool.");
72 return StatusCode::FAILURE;
84 return StatusCode::SUCCESS;
99 return StatusCode::SUCCESS;
105 for(
unsigned int confFile_itr = 0; confFile_itr < confFiles.size(); confFile_itr++ )
107 std::string tmp_confFile = confFiles.at(confFile_itr);
109 if (confFiles.at(confFile_itr).empty())
111 ATH_MSG_ERROR(
"Could not locate configuration file " << tmp_confFile);
112 return StatusCode::FAILURE;
116 return StatusCode::SUCCESS;
122 toolHolder.resize(confFiles.size());
124 for(
unsigned int confFile_itr = 0; confFile_itr < confFiles.size(); confFile_itr++ )
132 toolHolder.at(confFile_itr) = std::make_unique<ElectronPhotonVariableCorrectionBase>(
toolname.Data());
133 ANA_CHECK(toolHolder.at(confFile_itr)->setProperty(
"ConfigFile", confFiles.at(confFile_itr)));
134 ANA_CHECK(toolHolder.at(confFile_itr)->setProperty(
"OutputLevel", this->msg().level()));
135 ANA_CHECK(toolHolder.at(confFile_itr)->initialize());
138 return StatusCode::SUCCESS;
144 for (
unsigned int tool_itr = 0; tool_itr < toolHolder.size(); tool_itr++)
155 ATH_MSG_ERROR(
"In conf " << confFiles.at(tool_itr) <<
": The ApplyTo flag does not match with the container type from the conf file.");
156 return StatusCode::FAILURE;
159 return StatusCode::SUCCESS;
174 for (
unsigned int convertedPhotonTool_itr = 0; convertedPhotonTool_itr <
m_convertedPhotonTools.size(); convertedPhotonTool_itr++)
179 ATH_MSG_ERROR(
"Could not apply correction to converted photon object.");
187 for (
unsigned int unconvertedPhotonTool_itr = 0; unconvertedPhotonTool_itr <
m_unconvertedPhotonTools.size(); unconvertedPhotonTool_itr++)
192 ATH_MSG_ERROR(
"Could not apply correction to unconverted photon object.");
204 for (
unsigned int electronTool_itr = 0; electronTool_itr <
m_electronTools.size(); electronTool_itr++)
209 ATH_MSG_ERROR(
"Could not apply correction to electron object.");
223 ATH_MSG_VERBOSE(
"Will correct photon " << &in_photon <<
" of pT, eta = " << in_photon.
pt() <<
" " << in_photon.
eta());
230 ATH_MSG_VERBOSE(
"Will correct electron " << &in_electron <<
" of pT, eta = " << in_electron.
pt() <<
" " << in_electron.
eta());
243 env.ReadFile(confFile.c_str(), kEnvLocal);
245 env.IgnoreDuplicates(
false);
248 if (
env.Lookup(
"Variable"))
250 variableName =
env.GetValue(
"Variable",
"");
254 ATH_MSG_ERROR(
"In conf file " << confFile <<
": Correction variable is empty or not in configuration file.");
255 return StatusCode::FAILURE;
258 return StatusCode::SUCCESS;
std::vector< std::string > HelperString(const std::string &input, TEnv &env)
Electron_v1 Electron
Definition of the current "egamma version".
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
#define ATH_MSG_VERBOSE(x)
@ Error
Some error happened during the object correction.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
::StatusCode StatusCode
StatusCode definition for legacy code.
EGammaObjects
Define the categories of EGamma objects tool can be applied to.
Photon_v1 Photon
Definition of the current "egamma version".
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
@ Ok
The correction was done successfully.
Return value from object correction CP tools.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.