 |
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include <TObjString.h>
59 return StatusCode::SUCCESS;
65 const bool removeTRTConvBarrelDefault =
false;
68 std::unique_ptr<TFile>
f(TFile::Open(mva_filename.c_str()));
69 if (!
f ||
f->IsZombie()) {
74 TObjString* conversionDefinitionObj =
nullptr;
75 f->GetObject(
"conversionDefinition", conversionDefinitionObj);
76 if (conversionDefinitionObj) {
88 ATH_MSG_ERROR(
"Could not determine if TRT converted photons should be removed in the barrel");
89 return StatusCode::FAILURE;
91 return StatusCode::SUCCESS;
111 ATH_MSG_DEBUG(
"calling egammaMVASvc::getEnergy with cluster and eg");
119 ATH_MSG_FATAL(
"Trying to calibrate an electron, but disabled");
120 return StatusCode::FAILURE;
126 ATH_MSG_FATAL(
"Trying to calibrate a forward electron, but disabled");
127 return StatusCode::FAILURE;
136 ATH_MSG_FATAL(
"Trying to calibrate a converted photon, but disabled");
137 return StatusCode::FAILURE;
143 ATH_MSG_FATAL(
"Trying to calibrate an unconverted photon, but disabled");
144 return StatusCode::FAILURE;
149 return StatusCode::FAILURE;
152 ATH_MSG_DEBUG(
"Calculated MVA calibrated energy = " << mvaE );
153 return StatusCode::SUCCESS;
162 ATH_MSG_DEBUG(
"calling egammaMVASvc::getEnergy with cluster and egType (" << egType <<
")");
170 ATH_MSG_FATAL(
"Trying to calibrate an electron, but disabled");
171 return StatusCode::FAILURE;
178 ATH_MSG_FATAL(
"Trying to calibrate a forward electron, but disabled");
179 return StatusCode::FAILURE;
188 ATH_MSG_FATAL(
"Trying to calibrate an unconverted photon, but disabled");
189 return StatusCode::FAILURE;
193 ATH_MSG_FATAL(
"Egamma object " << egType <<
" is of unsupported type");
194 return StatusCode::FAILURE;
197 ATH_MSG_DEBUG(
"Calculated MVA calibrated energy = " << mvaE );
198 return StatusCode::SUCCESS;
214 ATH_MSG_DEBUG(
"MVA energy (" << mvaE <<
") < particle mass ("
215 <<
eg.m() <<
"), setting e = cluster energy (" << cluster.
e() <<
")");
218 return StatusCode::SUCCESS;
234 ATH_MSG_DEBUG(
"MVA energy (" << mvaE <<
") < 0, setting e = cluster energy ("
235 << cluster.
e() <<
")");
238 return StatusCode::SUCCESS;
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_folder
Gaudi::Property< int > m_removeTRTConvBarrel
StatusCode getEnergy(const xAOD::CaloCluster &cluster, const xAOD::Egamma &eg, double &mvaE, const egammaMVACalib::GlobalEventInfo &gei=egammaMVACalib::GlobalEventInfo()) const override final
Compute the calibrated energy.
ToolHandle< IegammaMVACalibTool > m_mvaFwdElectron
MVA tool for forward electron.
StatusCode resolve_flags()
Gaudi::Property< float > m_maxConvR
ToolHandle< IegammaMVACalibTool > m_mvaElectron
MVA tool for electron.
Description of a calorimeter cluster.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
::StatusCode StatusCode
StatusCode definition for legacy code.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
bool isFwdElectron(const xAOD::Egamma *eg)
is the object a Fwd electron
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
void setCalE(flt_t)
Set Energy for signal state CALIBRATED.
bool isConvCalib(const xAOD::Photon &ph) const
Decide if the photon is converted or not.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
A structure holding some global event information.
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
StatusCode execute(xAOD::CaloCluster &cluster, const xAOD::Egamma &eg, const egammaMVACalib::GlobalEventInfo &gei=egammaMVACalib::GlobalEventInfo()) const override final
Main execute.
ToolHandle< IegammaMVACalibTool > m_mvaUnconvertedPhoton
MVA tool for unconverted photon.
virtual double e() const
The total energy of the particle.
ToolHandle< IegammaMVACalibTool > m_mvaConvertedPhoton
MVA tool for converted photon.