20#include "GaudiKernel/SystemOfUnits.h"
42 for (
int iEBin = 0; iEBin < nEBins; iEBin++) {
43 std::vector<std::unique_ptr<eflowParameters> > tempVector;
44 tempVector.reserve(nEtaBins);
45 for (
int iEtaBin = 0; iEtaBin < nEtaBins; iEtaBin++) {
46 tempVector.push_back(std::make_unique<eflowParameters>());
48 m_bins.push_back(std::move(tempVector));
54 double e,
double eta,
bool useLegacyEnergyBinIndexing)
const {
57 if (useLegacyEnergyBinIndexing) {
65 if (eBin < 0 || etaBin < 0) {
75 *bin1 =
m_bins[eBin][etaBin].get();
88 auto outOfRange = [
this](
int bin)->
bool{
92 if (outOfRange(lowEBin) or outOfRange(highEBin)){
93 throw std::out_of_range(
"Attempt to access element out of range in eflowEEtaBinnedParameters::getInterpolation");
95 *bin1 =
m_bins[lowEBin][etaBin].get();
101 if (lowerEBound < FLT_MIN) lowerEBound = FLT_MIN;
103 weight = log(higherEBound / e) / log(higherEBound / lowerEBound);
114 if (useLegacyEnergyBinIndexing) {
122 if (0 <= eBinIndex && eBinIndex <= 5) {
123 if (fabs(
eta) < 1.5) {
129 if (fabs(
eta) >= 1.6) {
138 if (0 == eBinIndex || 1 == eBinIndex) {
139 if (fabs(
eta) >= 1.0 && fabs(
eta) < 1.1) {
142 else if (fabs(
eta) >= 1.2 && fabs(
eta) < 1.3) {
145 else if (fabs(
eta) >= 1.5 && fabs(
eta) < 1.6) {
149 }
else if (2 == eBinIndex) {
150 if (fabs(
eta) >= 1.5 && fabs(
eta) < 1.6) {
154 }
else if (3 == eBinIndex) {
155 if (fabs(
eta) >= 1.5 && fabs(
eta) < 1.6) {
160 }
else if (4 == eBinIndex || 5 == eBinIndex) {
161 if (fabs(
eta) >= 1.5 && fabs(
eta) < 1.6) {
Scalar eta() const
pseudorapidity method
int getEBinIndexLegacy(double e) const
int getEtaBinIndex(double eta) const
int getEBinIndex(double e) const
std::vector< double > m_etaBinBounds
int getNumEtaBins() const
std::vector< double > m_eBinBounds
eflowFirstIntENUM adjustLFI(double e, double eta, eflowFirstIntENUM j1st, bool useLegacyEnergyBinIndexing) const
std::vector< std::vector< std::unique_ptr< eflowParameters > > > m_bins
void initialise(const std::vector< double > &eBinBounds, const std::vector< double > &etaBinBounds, bool useAbsEta=true)
double getInterpolation(const eflowParameters **bin1, const eflowParameters **bin2, double e, double eta, bool useLegacyEnergyBinIndexing) const
eflowFirstIntRegions::J1STLAYER eflowFirstIntENUM