34 if (0 != p[1] && 0 != p[3]){
35 x1 = exp(-rMin / p[1]) - exp(-rMax / p[1]);
36 x2 = exp(-rMin / p[3]) - exp(-rMax / p[3]);
39 return (p[0] * p[1] * x1 + p[2] * p[3] * x2) / (rMax - rMin);
46 std::list<eflowCaloENUM> allLayers;
55 std::vector<eflowCaloENUM> orderedLayers;
56 while (!allLayers.empty()) {
57 std::list<eflowCaloENUM>::iterator itLayer = allLayers.begin();
58 std::list<eflowCaloENUM>::iterator itMaxP0Layer = itLayer;
61 for (; itLayer != allLayers.end(); ++itLayer) {
64 itMaxP0Layer = itLayer;
69 orderedLayers.push_back(*itMaxP0Layer);
70 allLayers.erase(itMaxP0Layer);
88 for (
const auto & layer : orderedLayers) {
92 for (
int iRing = 0; iRing < nRings; iRing++) {
94 if (weight == 0 || weight < weightMax) {
109 if (!(bin1 &&
bin2)) {
return false; }
115 bool isFailed = !(meanBin.
getWeightedParameters(bin1->getFirstIntBin(adjustedJ1st),
bin2->getFirstIntBin(adjustedJ1st), weight));
116 if (isFailed) {
return false; }
Scalar eta() const
pseudorapidity method
This defines the eflowCalo enum, which is used to label calorimeter layers in a simplified scheme whi...
static const int nRegions
Inherits from eflowEEtaBinBase.
eflowFirstIntENUM adjustLFI(double e, double eta, eflowFirstIntENUM j1st, bool useLegacyEnergyBinIndexing) const
double getInterpolation(const eflowParameters **bin1, const eflowParameters **bin2, double e, double eta, bool useLegacyEnergyBinIndexing) const
Extends eflowFirstInt to include parameters of the fits to radial shower profiles.
double getShapeParameter(eflowCaloENUM layer, int paramIndex) const
bool getWeightedParameters(const eflowFirstIntParameters *bin1, const eflowFirstIntParameters *bin2, const double w1)
const std::vector< double > & getShapeParameters(eflowCaloENUM layer) const
double fudgeStdDev() const
static std::vector< eflowCaloENUM > orderedLayersByShowerParam(const eflowFirstIntParameters ¶m, unsigned int whichParam=0)
static constexpr double m_weightRange
static double ringMeanRank(const std::vector< double > &p, double rMin, double rMax)
bool getOrdering(const eflowEEtaBinnedParameters *binnedParameters, double e, double eta, eflowFirstIntENUM j1st, bool useLegacyEnergyBinIndexing)
std::vector< double > m_ringThickness
double ringThickness(eflowCaloENUM layer) const
std::map< double, RingId > m_rankMap
void setParameters(const eflowFirstIntParameters ¶m, const std::vector< double > &ringThickness)
static constexpr double m_rMax
eflowRingSubtractionManager()
static double ringThickness(const eflowCaloENUM &layer)
eflowCalo::LAYER eflowCaloENUM
eflowFirstIntRegions::J1STLAYER eflowFirstIntENUM
std::pair< eflowCaloENUM, short > RingId