ATLAS Offline Software
egammaMVASvc.h
Go to the documentation of this file.
1 // Dear Emacs, this is -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef EGAMMAMVACALIB_EGAMMAMVASVC_H
8 #define EGAMMAMVACALIB_EGAMMAMVASVC_H
9 
10 #include "xAODEgamma/EgammaEnums.h"
13 // Framework includes
14 #include "AsgServices/AsgService.h"
16 
17 #include "xAODEgamma/PhotonFwd.h"
18 
19 
20 #include <string>
21 
22 
23 class egammaMVASvc : public extends<asg::AsgService, IegammaMVASvc>
24 {
25 public:
26  using extends::extends; // base class constructor
27 
28  virtual ~egammaMVASvc() override {};
29  virtual StatusCode initialize() override;
30 
31 
33  StatusCode getEnergy(const xAOD::CaloCluster& cluster,
34  const xAOD::Egamma& eg,
35  double& mvaE) const override final;
36 
38  StatusCode getEnergy(const xAOD::CaloCluster& cluster,
40  double& mvaE) const override final;
41 
48  const xAOD::Egamma& eg) const override final;
49 
55  const xAOD::EgammaParameters::EgammaType egType) const override final;
56 
57 
58 private:
59 
61  ToolHandle<IegammaMVACalibTool> m_mvaElectron {this,
62  "ElectronTool", "", "Tool to handle MVA trees for electrons"};
63 
65  ToolHandle<IegammaMVACalibTool> m_mvaUnconvertedPhoton {this,
66  "UnconvertedPhotonTool", "", "Tool to handle MVA trees for unconverted photons"};
67 
69  ToolHandle<IegammaMVACalibTool> m_mvaConvertedPhoton {this,
70  "ConvertedPhotonTool", "", "Tool to handle MVA trees for converted photons"};
71 
72  Gaudi::Property<float> m_maxConvR {this,
73  "MaxConvRadius", 800.0,
74  "The maximum conversion radius for a photon to be considered converted"};
75 
76  Gaudi::Property<int> m_removeTRTConvBarrel {this,
77  "RemoveTRTConvBarrel", -1,
78  "Remove TRT converted photons in the barrel: no=0, yes=1, automatic=-1"};
79 
80  Gaudi::Property<std::string> m_folder {this,
81  "folder", "", "folder for weight files"};
82 
83 
87  bool isConvCalib(const xAOD::Photon& ph) const;
88 
90 
91 
92 };
93 
94 #endif
egammaMVASvc
Definition: egammaMVASvc.h:24
IegammaMVACalibTool.h
PropertyWrapper.h
egammaMVASvc::initialize
virtual StatusCode initialize() override
Definition: egammaMVASvc.cxx:18
egammaMVASvc::m_folder
Gaudi::Property< std::string > m_folder
Definition: egammaMVASvc.h:80
egammaMVASvc::m_removeTRTConvBarrel
Gaudi::Property< int > m_removeTRTConvBarrel
Definition: egammaMVASvc.h:76
AsgService.h
ParticleTest.eg
eg
Definition: ParticleTest.py:29
PhotonFwd.h
egammaMVASvc::~egammaMVASvc
virtual ~egammaMVASvc() override
Definition: egammaMVASvc.h:28
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
egammaMVASvc::resolve_flags
StatusCode resolve_flags()
Definition: egammaMVASvc.cxx:54
xAOD::EgammaParameters::EgammaType
EgammaType
Definition: EgammaEnums.h:17
egammaMVASvc::m_maxConvR
Gaudi::Property< float > m_maxConvR
Definition: egammaMVASvc.h:72
egammaMVASvc::m_mvaElectron
ToolHandle< IegammaMVACalibTool > m_mvaElectron
MVA tool for electron.
Definition: egammaMVASvc.h:61
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
IegammaMVASvc.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
egammaMVASvc::getEnergy
StatusCode getEnergy(const xAOD::CaloCluster &cluster, const xAOD::Egamma &eg, double &mvaE) const override final
Compute the calibrated energy.
Definition: egammaMVASvc.cxx:97
egammaMVASvc::isConvCalib
bool isConvCalib(const xAOD::Photon &ph) const
Decide if the photon is converted or not.
Definition: egammaMVASvc.cxx:86
EgammaEnums.h
xAOD::Photon_v1
Definition: Photon_v1.h:37
egammaMVASvc::m_mvaUnconvertedPhoton
ToolHandle< IegammaMVACalibTool > m_mvaUnconvertedPhoton
MVA tool for unconverted photon.
Definition: egammaMVASvc.h:65
egammaMVASvc::execute
StatusCode execute(xAOD::CaloCluster &cluster, const xAOD::Egamma &eg) const override final
Main execute.
Definition: egammaMVASvc.cxx:177
egammaMVASvc::m_mvaConvertedPhoton
ToolHandle< IegammaMVACalibTool > m_mvaConvertedPhoton
MVA tool for converted photon.
Definition: egammaMVASvc.h:69