ATLAS Offline Software
eflowEEtaBinBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef _INC_BASE_INTERPOLATED_E_ETA_BIN_SYSTEM_
7 #define _INC_BASE_INTERPOLATED_E_ETA_BIN_SYSTEM_
8 
9 /********************************************************************
10 
11 NAME: eflowEEtaBinBase.h
12 PACKAGE: offline/Reconstruction/eflowRec
13 
14 AUTHOR: R Duxfield
15 CREATED: 17th May, 2006
16 
17 ********************************************************************/
18 
19 #include <vector>
20 
21 class eflowParameters;
22 
27  public:
28 
29  eflowEEtaBinBase() = default;
30  virtual ~eflowEEtaBinBase();
31 
32  bool binExists(double e, double eta) const { return (getEBinIndex(e) >= 0 && getEtaBinIndex(eta) >= 0); }
33 
34  static double getErrorReturnValue() {return m_errorReturnValue;}
35 
36  protected:
37 
38  int getNumEBins() const { return m_eBinBounds.size(); }
39  int getNumEtaBins() const { return m_etaBinBounds.size(); }
40 
41  int getEBinIndexLegacy(double e) const;
42  int getEBinIndex(double e) const;
43  int getEtaBinIndex(double eta) const;
44  static int getBinIndex(double x, const std::vector<double>& binBounds) ;
45 
46  static const double m_errorReturnValue;
47 
48  bool m_useAbsEta{true};
49  std::vector<double> m_eBinBounds;
50  std::vector<double> m_etaBinBounds;
51 };
52 #endif
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
eflowEEtaBinBase::m_eBinBounds
std::vector< double > m_eBinBounds
Definition: eflowEEtaBinBase.h:49
eflowEEtaBinBase::~eflowEEtaBinBase
virtual ~eflowEEtaBinBase()
eflowEEtaBinBase::getBinIndex
static int getBinIndex(double x, const std::vector< double > &binBounds)
Definition: eflowEEtaBinBase.cxx:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
x
#define x
eflowEEtaBinBase::getEBinIndexLegacy
int getEBinIndexLegacy(double e) const
Definition: eflowEEtaBinBase.cxx:38
eflowEEtaBinBase::m_useAbsEta
bool m_useAbsEta
Definition: eflowEEtaBinBase.h:48
eflowEEtaBinBase::getEBinIndex
int getEBinIndex(double e) const
Definition: eflowEEtaBinBase.cxx:28
eflowEEtaBinBase
Base class which sets up some of the infrastructure to store the e/p reference values.
Definition: eflowEEtaBinBase.h:26
eflowEEtaBinBase::getEtaBinIndex
int getEtaBinIndex(double eta) const
Definition: eflowEEtaBinBase.cxx:52
eflowParameters
Definition: eflowEEtaBinnedParameters.h:30
eflowEEtaBinBase::getErrorReturnValue
static double getErrorReturnValue()
Definition: eflowEEtaBinBase.h:34
eflowEEtaBinBase::getNumEBins
int getNumEBins() const
Definition: eflowEEtaBinBase.h:38
eflowEEtaBinBase::m_errorReturnValue
static const double m_errorReturnValue
Definition: eflowEEtaBinBase.h:46
eflowEEtaBinBase::eflowEEtaBinBase
eflowEEtaBinBase()=default
eflowEEtaBinBase::binExists
bool binExists(double e, double eta) const
Definition: eflowEEtaBinBase.h:32
eflowEEtaBinBase::m_etaBinBounds
std::vector< double > m_etaBinBounds
Definition: eflowEEtaBinBase.h:50
eflowEEtaBinBase::getNumEtaBins
int getNumEtaBins() const
Definition: eflowEEtaBinBase.h:39