![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <egammaMVASvc.h>
|
| egammaMVASvc (const std::string &name, ISvcLocator *svc) |
|
virtual | ~egammaMVASvc () override |
|
virtual StatusCode | initialize () override |
| set up/tear down functions More...
|
|
StatusCode | getEnergy (const xAOD::CaloCluster &cluster, const xAOD::Egamma &eg, double &mvaE) const override final |
| Compute the calibrated energy. More...
|
|
StatusCode | getEnergy (const xAOD::CaloCluster &cluster, const xAOD::EgammaParameters::EgammaType egType, double &mvaE) 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 override final |
| Main execute. More...
|
|
StatusCode | execute (xAOD::CaloCluster &cluster, const xAOD::EgammaParameters::EgammaType egType) const override final |
| Calibrate the cluster, when the full egamma object is not available. More...
|
|
virtual void | print () const |
| Print the state of the service. More...
|
|
template<typename T > |
void | declareServiceInterface () |
| add the given interface to the list of interfaces More...
|
|
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvi) |
| query interface for gaudi More...
|
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
| DeclareInterfaceID (IegammaMVASvc, 1, 0) |
|
Definition at line 19 of file egammaMVASvc.h.
◆ egammaMVASvc()
egammaMVASvc::egammaMVASvc |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
Definition at line 14 of file egammaMVASvc.cxx.
17 declareServiceInterface<IegammaMVASvc>();
◆ ~egammaMVASvc()
virtual egammaMVASvc::~egammaMVASvc |
( |
| ) |
|
|
inlineoverridevirtual |
◆ DeclareInterfaceID()
◆ declareServiceInterface()
template<typename T >
void asg::AsgService::declareServiceInterface |
|
inherited |
add the given interface to the list of interfaces
Definition at line 76 of file AsgService.h.
78 #ifndef XAOD_STANDALONE
◆ 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
Implements IegammaMVASvc.
Definition at line 140 of file egammaMVASvc.cxx.
151 ATH_MSG_DEBUG(
"MVA energy (" << mvaE <<
") < particle mass ("
152 <<
eg.m() <<
"), setting e = cluster energy (" << cluster.
e() <<
")");
155 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.
Implements IegammaMVASvc.
Definition at line 158 of file egammaMVASvc.cxx.
170 ATH_MSG_DEBUG(
"MVA energy (" << mvaE <<
") < 0, setting e = cluster energy ("
171 << cluster.
e() <<
")");
174 return StatusCode::SUCCESS;
◆ finalize()
StatusCode asg::AsgService::finalize |
( |
| ) |
|
|
virtualinherited |
◆ getEnergy() [1/2]
Compute the calibrated energy.
Implements IegammaMVASvc.
Definition at line 51 of file egammaMVASvc.cxx.
56 ATH_MSG_DEBUG(
"calling egammaMVASvc::getEnergy with cluster and eg");
64 ATH_MSG_FATAL(
"Trying to calibrate an electron, but disabled");
65 return StatusCode::FAILURE;
76 const bool isTRTEndcap = std::abs(ph->
eta()) > 0.8;
77 isConvCalib = isConvCalib && (isTRTEndcap || !isTRTConv);
83 ATH_MSG_FATAL(
"Trying to calibrate a converted photon, but disabled");
84 return StatusCode::FAILURE;
90 ATH_MSG_FATAL(
"Trying to calibrate an unconverted photon, but disabled");
91 return StatusCode::FAILURE;
96 return StatusCode::FAILURE;
99 ATH_MSG_DEBUG(
"Calculated MVA calibrated energy = " << mvaE );
100 return StatusCode::SUCCESS;
◆ getEnergy() [2/2]
Compute the calibrated energy when the full egamma object is not available.
Implements IegammaMVASvc.
Definition at line 103 of file egammaMVASvc.cxx.
108 ATH_MSG_DEBUG(
"calling egammaMVASvc::getEnergy with cluster and egType (" << egType <<
")");
116 ATH_MSG_FATAL(
"Trying to calibrate an electron, but disabled");
117 return StatusCode::FAILURE;
126 ATH_MSG_FATAL(
"Trying to calibrate an unconverted photon, but disabled");
127 return StatusCode::FAILURE;
132 return StatusCode::FAILURE;
135 ATH_MSG_DEBUG(
"Calculated MVA calibrated energy = " << mvaE );
136 return StatusCode::SUCCESS;
◆ initialize()
StatusCode egammaMVASvc::initialize |
( |
| ) |
|
|
overridevirtual |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ print()
void asg::AsgService::print |
( |
| ) |
const |
|
virtualinherited |
◆ queryInterface()
StatusCode asg::AsgService::queryInterface |
( |
const InterfaceID & |
riid, |
|
|
void ** |
ppvi |
|
) |
| |
|
virtualinherited |
query interface for gaudi
Definition at line 57 of file AsgService.cxx.
62 if (riid == interface.first())
64 *ppvi = interface.second (
this);
66 return StatusCode::SUCCESS;
69 return AsgServiceBase::queryInterface (riid, ppvi);
◆ m_interfaces
std::vector<std::pair<const InterfaceID& (*)(),void *(*)(AsgService*)> > asg::AsgService::m_interfaces |
|
privateinherited |
list of interfaces we have
Definition at line 68 of file AsgService.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 67 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 64 of file egammaMVASvc.h.
◆ m_mvaElectron
Initial value:{this,
"ElectronTool", "", "Tool to handle MVA trees for electrons"}
MVA tool for electron.
Definition at line 56 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 60 of file egammaMVASvc.h.
◆ m_removeTRTConvBarrel
Gaudi::Property<bool> egammaMVASvc::m_removeTRTConvBarrel |
|
private |
Initial value:{this,
"RemoveTRTConvBarrel", false,
"Remove TRT converted photons in the barrel"}
Definition at line 71 of file egammaMVASvc.h.
The documentation for this class was generated from the following files:
std::vector< std::pair< const InterfaceID &(*)(), void *(*)(AsgService *)> > m_interfaces
list of interfaces we have
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
Base class for the dual-use service implementation classes.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
AthROOTErrorHandlerSvc * svc
@ singleTRT
one track only, no Si hits (TRT only)
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 isPhoton(const xAOD::Egamma *eg)
is the object a photon
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
@ doubleTRT
two tracks, none with Si hits (TRT only)
Gaudi::Property< bool > m_removeTRTConvBarrel
AsgService(const std::string &name, ISvcLocator *pSvcLocator)
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.