15#include <TObjString.h>
59 return StatusCode::SUCCESS;
65 const bool removeTRTConvBarrelDefault =
true;
70 ATH_MSG_WARNING(
"m_removeTRTConvBarrel is set to " <<
m_removeTRTConvBarrel <<
" which is not supported for Transformer which excluded TRT conversion in the model training. Setting it to " << removeTRTConvBarrelDefault);
74 ATH_MSG_DEBUG(
"TRT converted photons in the barrel will be removed for calibration, which is consistent with the training of the Transformer model.");
77 return StatusCode::SUCCESS;
105 ATH_MSG_DEBUG(
"calling egammaTransformerSvc::getEnergy with cluster and eg");
113 ATH_MSG_FATAL(
"Trying to calibrate an electron, but disabled");
114 return StatusCode::FAILURE;
120 ATH_MSG_FATAL(
"Trying to calibrate a forward electron, but disabled");
121 return StatusCode::FAILURE;
130 ATH_MSG_FATAL(
"Trying to calibrate a converted photon, but disabled");
131 return StatusCode::FAILURE;
137 ATH_MSG_FATAL(
"Trying to calibrate an unconverted photon, but disabled");
138 return StatusCode::FAILURE;
143 return StatusCode::FAILURE;
146 ATH_MSG_DEBUG(
"Calculated MVA calibrated energy = " << mvaE );
147 return StatusCode::SUCCESS;
156 ATH_MSG_DEBUG(
"calling egammaTransformerSvc::getEnergy with cluster and egType (" << egType <<
")");
164 ATH_MSG_FATAL(
"Trying to calibrate an electron, but disabled");
165 return StatusCode::FAILURE;
172 ATH_MSG_FATAL(
"Trying to calibrate a forward electron, but disabled");
173 return StatusCode::FAILURE;
182 ATH_MSG_FATAL(
"Trying to calibrate an unconverted photon, but disabled");
183 return StatusCode::FAILURE;
187 ATH_MSG_FATAL(
"Egamma object " << egType <<
" is of unsupported type");
188 return StatusCode::FAILURE;
191 ATH_MSG_DEBUG(
"Calculated MVA calibrated energy = " << mvaE );
192 return StatusCode::SUCCESS;
208 ATH_MSG_DEBUG(
"MVA energy (" << mvaE <<
") < particle mass ("
209 << eg.
m() <<
"), setting e = cluster energy (" << cluster.
e() <<
")");
212 return StatusCode::SUCCESS;
228 ATH_MSG_DEBUG(
"MVA energy (" << mvaE <<
") < 0, setting e = cluster energy ("
229 << cluster.
e() <<
")");
232 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
virtual double e() const
The total energy of the particle.
void setCalE(flt_t)
Set Energy for signal state CALIBRATED.
virtual double m() const =0
The invariant mass of the particle.
bool isFwdElectron(const xAOD::Egamma *eg)
is the object a Fwd electron
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Egamma_v1 Egamma
Definition of the current "egamma version".
Photon_v1 Photon
Definition of the current "egamma version".
A structure holding some global event information.