ATLAS Offline Software
AsgRingerSelectorTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 /*
3  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4 */
5 #ifndef RINGERSELECTORTOOLS_ASGRINGERSELECTORTOOL_H
6 #define RINGERSELECTORTOOLS_ASGRINGERSELECTORTOOL_H
7 
8 // STL includes:
9 #include <string>
10 
11 // Athena includes
12 #include "PATCore/AcceptData.h"
13 #include "PATCore/AcceptInfo.h"
14 #include "AsgTools/AsgTool.h"
15 
16 // xAOD includes:
20 
21 
22 namespace Ringer {
23 
25  virtual public IAsgRingerSelectorTool
26  {
27 
28  public:
29 
30  // Use ASG_TOOL macro for 2 interface base classes.
34 
35 
36 
37  AsgRingerSelectorTool(const std::string& name);
38 
40  virtual ~AsgRingerSelectorTool();
41 
43  virtual StatusCode initialize() override;
44 
46  virtual StatusCode finalize() override;
47 
48 
52  virtual const asg::AcceptInfo& getAcceptInfo() const override{ return m_accept; };
53 
54 
58  virtual float predict(const xAOD::TrigRingerRings * ) const override;
59 
63  virtual float predict(const xAOD::TrigRingerRings *, const xAOD::TrigElectron *) const override;
64 
65 
69  virtual asg::AcceptData accept(const xAOD::TrigRingerRings *, float discr, float mu ) const override;
70 
71 
72  virtual asg::AcceptData accept(const xAOD::IParticle *) const override;
73 
74 
75  private:
76 
79 
80  Gaudi::Property<std::vector<std::string>> m_configFiles{this, "ConfigFiles", {}, "Ringer Run3 Calib Path"};
81  ServiceHandle< AthOnnx::IOnnxRuntimeSvc > m_onnxSvc{ this, "ONNXRuntimeSvc", "AthOnnx::OnnxRuntimeSvc", "Name of the service to use" };
82  Gaudi::Property<bool> m_useTansigOutput{this, "UseTansigOutput", {}, "Use tansig output."};
83 
84 };
85 
86 }
87 #endif
xAOD::TrigElectron_v1
Class describing an electron reconstructed in the HLT.
Definition: TrigElectron_v1.h:39
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
Ringer::AsgRingerSelectorTool::m_useTansigOutput
Gaudi::Property< bool > m_useTansigOutput
Definition: AsgRingerSelectorTool.h:82
Ringer::AsgRingerSelectorTool::predict
virtual float predict(const xAOD::TrigRingerRings *) const override
@briel Calculation of model output for fast calorimetry or fast photon step (HLT usage only)
Definition: AsgRingerSelectorTool.cxx:73
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
Ringer::onnx::RingerSelector
Definition: RingerSelector.h:29
RingerSelector.h
IAsgSelectionTool
Definition: IAsgSelectionTool.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Ringer::AsgRingerSelectorTool::m_configFiles
Gaudi::Property< std::vector< std::string > > m_configFiles
Definition: AsgRingerSelectorTool.h:80
Ringer::AsgRingerSelectorTool::accept
virtual asg::AcceptData accept(const xAOD::TrigRingerRings *, float discr, float mu) const override
Accept method.
Definition: AsgRingerSelectorTool.cxx:63
Ringer::AsgRingerSelectorTool::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations.
Definition: AsgRingerSelectorTool.cxx:31
Ringer::AsgRingerSelectorTool::finalize
virtual StatusCode finalize() override
Gaudi Service Interface method implementations.
Definition: AsgRingerSelectorTool.cxx:48
Ringer::AsgRingerSelectorTool::m_accept
asg::AcceptInfo m_accept
Definition: AsgRingerSelectorTool.h:77
Ringer::AsgRingerSelectorTool::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override
Method to get the plain TAccept for the last particle.
Definition: AsgRingerSelectorTool.h:52
asg::AcceptInfo
Definition: AcceptInfo.h:28
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AcceptData.h
Ringer::AsgRingerSelectorTool::m_selector
onnx::RingerSelector m_selector
Definition: AsgRingerSelectorTool.h:78
Ringer::AsgRingerSelectorTool
Definition: AsgRingerSelectorTool.h:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Ringer::AsgRingerSelectorTool::m_onnxSvc
ServiceHandle< AthOnnx::IOnnxRuntimeSvc > m_onnxSvc
Definition: AsgRingerSelectorTool.h:81
xAOD::TrigRingerRings_v2
Definition: TrigRingerRings_v2.h:24
Ringer::IAsgRingerSelectorTool
Definition: IAsgRingerSelectorTool.h:20
IOnnxRuntimeSvc.h
AcceptInfo.h
IAsgRingerSelectorTool.h
AsgTool.h
asg::AcceptData
Definition: AcceptData.h:30
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
Ringer
Namespace dedicated for Ringer utilities.
Definition: CaloRingsDefs.h:9
ServiceHandle< AthOnnx::IOnnxRuntimeSvc >