ATLAS Offline Software
Loading...
Searching...
No Matches
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
10namespace 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
Threshold
bool accept(float discriminant, float avgmu) const
Definition Threshold.h:43
~Threshold()=default
Destructor.
Threshold(float etmin, float etmax, float etamin, float etamax, float slope, float offset, float maxavgmu)
Constructor.
Definition Threshold.cxx:11
float etaMin() const
Get the lower eta edge.
Definition Threshold.h:26
float etaMax() const
Get the high eta edge.
Definition Threshold.h:30
float etMin() const
Get the lower et edge.
Definition Threshold.h:24
float etMax() const
Get the high et edge.
Definition Threshold.h:28
Namespace dedicated for Ringer utilities.