|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   15 #include <TObjString.h> 
   51   return StatusCode::SUCCESS;
 
   57     const bool removeTRTConvBarrelDefault = 
false;
 
   60       std::unique_ptr<TFile> 
f(TFile::Open(mva_filename.c_str()));
 
   61       if (!
f || 
f->IsZombie()) {
 
   66         TObjString* conversionDefinitionObj = 
nullptr;
 
   67         f->GetObject(
"conversionDefinition", conversionDefinitionObj);
 
   68         if (conversionDefinitionObj) {
 
   80     ATH_MSG_ERROR(
"Could not determine if TRT converted photons should be removed in the barrel");
 
   81     return StatusCode::FAILURE;
 
   83   return StatusCode::SUCCESS;
 
  102   ATH_MSG_DEBUG(
"calling egammaMVASvc::getEnergy with cluster and eg");
 
  110       ATH_MSG_FATAL(
"Trying to calibrate an electron, but disabled");
 
  111       return StatusCode::FAILURE;
 
  120         ATH_MSG_FATAL(
"Trying to calibrate a converted photon, but disabled");
 
  121         return StatusCode::FAILURE;
 
  127         ATH_MSG_FATAL(
"Trying to calibrate an unconverted photon, but disabled");
 
  128         return StatusCode::FAILURE;
 
  133     return StatusCode::FAILURE;
 
  136   ATH_MSG_DEBUG( 
"Calculated MVA calibrated energy = " << mvaE );
 
  137   return StatusCode::SUCCESS;
 
  145   ATH_MSG_DEBUG(
"calling egammaMVASvc::getEnergy with cluster and egType (" << egType <<
")");
 
  153       ATH_MSG_FATAL(
"Trying to calibrate an electron, but disabled");
 
  154       return StatusCode::FAILURE;
 
  163       ATH_MSG_FATAL(
"Trying to calibrate an unconverted photon, but disabled");
 
  164       return StatusCode::FAILURE;
 
  169     return StatusCode::FAILURE;
 
  172   ATH_MSG_DEBUG( 
"Calculated MVA calibrated energy = " << mvaE );
 
  173   return StatusCode::SUCCESS;
 
  188     ATH_MSG_DEBUG(
"MVA energy (" << mvaE << 
") < particle mass (" 
  189                   << 
eg.m() << 
"), setting e = cluster energy (" << cluster.
e() << 
")");
 
  192   return StatusCode::SUCCESS;
 
  207     ATH_MSG_DEBUG(
"MVA energy (" << mvaE << 
") < 0, setting e = cluster energy (" 
  208           << cluster.
e() << 
")");
 
  211   return StatusCode::SUCCESS;
 
  
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_folder
Gaudi::Property< int > m_removeTRTConvBarrel
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)
StatusCode getEnergy(const xAOD::CaloCluster &cluster, const xAOD::Egamma &eg, double &mvaE) const override final
Compute the calibrated energy.
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)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
ToolHandle< IegammaMVACalibTool > m_mvaUnconvertedPhoton
MVA tool for unconverted photon.
StatusCode execute(xAOD::CaloCluster &cluster, const xAOD::Egamma &eg) const override final
Main execute.
virtual double e() const
The total energy of the particle.
ToolHandle< IegammaMVACalibTool > m_mvaConvertedPhoton
MVA tool for converted photon.