ATLAS Offline Software
Threshold.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef RingerSelectorTools_tools_onnx_Threshold_h
6 #define RingerSelectorTools_tools_onnx_Threshold_h
7 
8 #include <algorithm>
9 
10 namespace Ringer{
11 
12  namespace onnx{
13 
14  class Threshold{
15 
16  public:
17 
19  Threshold( float etmin , float etmax, float etamin, float etamax, float slope, float offset, float maxavgmu ) ;
21  ~Threshold() = default;
22 
24  float etMin() const { return m_etmin; };
26  float etaMin() const { return m_etamin; };
28  float etMax() const { return m_etmax; };
30  float etaMax() const { return m_etamax; };
31  /* Is pass with pileup linear correction */
32  bool accept( float discriminant, float avgmu ) const;
33 
34  private:
35 
37 
39 
40  };
41 
42  //==============================================================================
43  inline bool Threshold::accept( float value, float avgmu) const
44  {
45  avgmu = std::min(avgmu, m_maxavgmu);
46  return value >= (m_slope*avgmu + m_offset);
47  }
48 
49 
50  } // namespace onnx
51 } //namespace Ringer
52 
53 
54 #endif
Ringer::onnx::Threshold::m_offset
float m_offset
Definition: Threshold.h:38
athena.value
value
Definition: athena.py:124
Ringer::onnx::Threshold::m_maxavgmu
float m_maxavgmu
Definition: Threshold.h:38
Ringer::onnx::Threshold::Threshold
Threshold(float etmin, float etmax, float etamin, float etamax, float slope, float offset, float maxavgmu)
Constructor.
Definition: Threshold.cxx:11
Ringer::onnx::Threshold::etMax
float etMax() const
Get the high et edge.
Definition: Threshold.h:28
Ringer::onnx::Threshold::accept
bool accept(float discriminant, float avgmu) const
Definition: Threshold.h:43
Ringer::onnx::Threshold::~Threshold
~Threshold()=default
Destructor.
Ringer::onnx::Threshold::m_etamin
float m_etamin
Definition: Threshold.h:36
Ringer::onnx::Threshold::m_etmax
float m_etmax
Definition: Threshold.h:36
Ringer::onnx::Threshold::etMin
float etMin() const
Get the lower et edge.
Definition: Threshold.h:24
Ringer::onnx::Threshold
Definition: Threshold.h:14
min
#define min(a, b)
Definition: cfImp.cxx:40
TauJetParameters::discriminant
@ discriminant
Definition: TauJetParameters.h:166
Ringer::onnx::Threshold::m_slope
float m_slope
Definition: Threshold.h:38
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
LArCellBinning.etamin
etamin
Definition: LArCellBinning.py:137
Ringer::onnx::Threshold::etaMax
float etaMax() const
Get the high eta edge.
Definition: Threshold.h:30
Ringer::onnx::Threshold::etaMin
float etaMin() const
Get the lower eta edge.
Definition: Threshold.h:26
Ringer::onnx::Threshold::m_etmin
float m_etmin
Definition: Threshold.h:36
Ringer::onnx::Threshold::m_etamax
float m_etamax
Definition: Threshold.h:36
Ringer
Namespace dedicated for Ringer utilities.
Definition: CaloRingsDefs.h:9