 |
ATLAS Offline Software
|
#include <egammaMVASvc.h>
|
| virtual | ~egammaMVASvc () override |
| |
| virtual StatusCode | initialize () override |
| |
| 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. More...
|
| |
| StatusCode | getEnergy (const xAOD::CaloCluster &cluster, const xAOD::EgammaParameters::EgammaType egType, double &mvaE, const egammaMVACalib::GlobalEventInfo &gei=egammaMVACalib::GlobalEventInfo()) const override final |
| | Compute the calibrated energy when the full egamma object is not available. More...
|
| |
| StatusCode | execute (xAOD::CaloCluster &cluster, const xAOD::Egamma &eg, const egammaMVACalib::GlobalEventInfo &gei=egammaMVACalib::GlobalEventInfo()) const override final |
| | Main execute. More...
|
| |
| StatusCode | execute (xAOD::CaloCluster &cluster, const xAOD::EgammaParameters::EgammaType egType, const egammaMVACalib::GlobalEventInfo &gei=egammaMVACalib::GlobalEventInfo()) const override final |
| | Calibrate the cluster, when the full egamma object is not available. More...
|
| |
Definition at line 23 of file egammaMVASvc.h.
◆ ~egammaMVASvc()
| virtual egammaMVASvc::~egammaMVASvc |
( |
| ) |
|
|
inlineoverridevirtual |
◆ execute() [1/2]
Main execute.
We need to calibrate the cluster. Use full egamma object instead of Type As we employ further variables than the ones present in the cluster This method needs to be valid also for reconstruction
Definition at line 202 of file egammaMVASvc.cxx.
214 ATH_MSG_DEBUG(
"MVA energy (" << mvaE <<
") < particle mass ("
215 <<
eg.m() <<
"), setting e = cluster energy (" << cluster.
e() <<
")");
218 return StatusCode::SUCCESS;
◆ execute() [2/2]
Calibrate the cluster, when the full egamma object is not available.
Only variables related to the cluster are used (e.g. no conversion are used here) If the full egamma object use the other version.
Definition at line 221 of file egammaMVASvc.cxx.
234 ATH_MSG_DEBUG(
"MVA energy (" << mvaE <<
") < 0, setting e = cluster energy ("
235 << cluster.
e() <<
")");
238 return StatusCode::SUCCESS;
◆ getEnergy() [1/2]
Compute the calibrated energy.
Definition at line 105 of file egammaMVASvc.cxx.
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;
◆ getEnergy() [2/2]
Compute the calibrated energy when the full egamma object is not available.
Definition at line 156 of file egammaMVASvc.cxx.
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;
◆ initialize()
| StatusCode egammaMVASvc::initialize |
( |
| ) |
|
|
overridevirtual |
◆ isConvCalib()
◆ resolve_flags()
| StatusCode egammaMVASvc::resolve_flags |
( |
| ) |
|
|
private |
Definition at line 62 of file egammaMVASvc.cxx.
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;
◆ m_folder
| Gaudi::Property<std::string> egammaMVASvc::m_folder |
|
private |
Initial value:{this,
"folder", "", "folder for weight files"}
Definition at line 88 of file egammaMVASvc.h.
◆ m_maxConvR
| Gaudi::Property<float> egammaMVASvc::m_maxConvR |
|
private |
Initial value:{this,
"MaxConvRadius", 800.0,
"The maximum conversion radius for a photon to be considered converted"}
Definition at line 80 of file egammaMVASvc.h.
◆ m_mvaConvertedPhoton
Initial value:{this,
"ConvertedPhotonTool", "", "Tool to handle MVA trees for converted photons"}
MVA tool for converted photon.
Definition at line 77 of file egammaMVASvc.h.
◆ m_mvaElectron
Initial value:{this,
"ElectronTool", "", "Tool to handle MVA trees for electrons"}
MVA tool for electron.
Definition at line 65 of file egammaMVASvc.h.
◆ m_mvaFwdElectron
Initial value:{this,
"FwdElectronTool", "", "Tool to handle MVA trees for forward electrons"}
MVA tool for forward electron.
Definition at line 69 of file egammaMVASvc.h.
◆ m_mvaUnconvertedPhoton
Initial value:{this,
"UnconvertedPhotonTool", "", "Tool to handle MVA trees for unconverted photons"}
MVA tool for unconverted photon.
Definition at line 73 of file egammaMVASvc.h.
◆ m_removeTRTConvBarrel
| Gaudi::Property<int> egammaMVASvc::m_removeTRTConvBarrel |
|
private |
Initial value:{this,
"RemoveTRTConvBarrel", -1,
"Remove TRT converted photons in the barrel: no=0, yes=1, automatic=-1"}
Definition at line 84 of file egammaMVASvc.h.
The documentation for this class was generated from the following files:
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.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
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)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
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.