53 const std::string& quantity) {
63 if (quantity ==
"NrObjects") {
90 if (quantity ==
"PT") {
97 = muPtScale->getPtScale()->getScaleMin();
99 = muPtScale->getPtScale()->getScaleMax();
105 = muPtScale->getPtScale()->getValue(iBin);
115 float maxLaxtBinsize = 200;
116 if (lastBinSize >= maxLaxtBinsize) {
122 <<
"\n L1ExtraMuon: PT histogram"
123 <<
"\nm_l1HistLimits.upperBinValue truncated to = "
131 }
else if (quantity ==
"eta" || quantity ==
"phi") {
135 if (quantity ==
"eta") {
137 int histNrBinsHalf = muScales->getGMTEtaScale()->getNBins();
139 = muScales->getGMTEtaScale()->getScaleMin();
141 = muScales->getGMTEtaScale()->getScaleMax();
150 for (
int j = histNrBinsHalf;
j > 0;
j--, iBin++) {
152 * muScales->getGMTEtaScale()->getValue(
j);
154 for (
int j = 0;
j <= histNrBinsHalf;
j++, iBin++) {
156 = muScales->getGMTEtaScale()->getValue(
j);
166 muScales->getPhiScale()->getScaleMin());
168 muScales->getPhiScale()->getScaleMax());
175 muScales->getPhiScale()->getValue(iBin));
191 if (quantity ==
"ET") {
195 std::vector<double> emThresholds = emScale->getThresholds();
210 =
static_cast<float>(emThresholds[iBin]);
218 }
else if (quantity ==
"eta" || quantity ==
"phi") {
223 if (quantity ==
"eta") {
288 if (quantity ==
"ET") {
292 std::vector<double> jetThresholds = jetScale->getThresholds();
307 =
static_cast<float>(jetThresholds[iBin]);
315 }
else if (quantity ==
"eta" || quantity ==
"phi") {
320 if (quantity ==
"eta") {
379 if (quantity ==
"ET") {
384 const double etSumLSB = etMissScale->linearLsb() ;
403 }
else if (quantity ==
"eta" || quantity ==
"phi") {
408 if (quantity ==
"eta") {
441 if (quantity ==
"ET") {
446 const double etSumLSB = etMissScale->linearLsb() ;
465 }
else if (quantity ==
"eta" || quantity ==
"phi") {
474 if (quantity ==
"ET") {
478 double htSumLSB = jetFinderParams->getHtLsbGeV();
497 }
else if (quantity ==
"eta" || quantity ==
"phi") {
505 if (quantity ==
"ET") {
509 const std::vector<double>& htThresholds =
510 htMissScale->getThresholds();
525 =
static_cast<float>(htThresholds[iBin]);
533 }
else if (quantity ==
"eta" || quantity ==
"phi") {
538 if (quantity ==
"eta") {
576 const unsigned int R3BINS = 8;
577 const float R3MIN = -0.5;
578 const float R3MAX = 7.5;
592 = R3MIN + iBin*(R3MAX -
R3MIN)/R3BINS;
605 if (quantity ==
"ET") {
609 const std::vector<double>& hfRingEtThresholds =
610 hfRingEtScale->getThresholds();
625 =
static_cast<float>(hfRingEtThresholds[iBin]);
633 }
else if (quantity ==
"eta" || quantity ==
"phi") {
653 const L1GtObject& l1GtObject,
const std::string& quantity) {
658 LogDebug(
"L1GetHistLimits") <<
"\n Histogram limits for L1GtObject "
659 << l1GtObject <<
" and quantity " << quantity
661 <<
"\n Lower limit of first bin: "
663 <<
"\n Upper limit of last bin: "
671 <<
"\n Warning: inconsistent nrBins and binThresholds size"
673 <<
"\n binThresholds size = " << binThreshSize
674 <<
"\n Please fix the L1GetLimits class.\n\n" << std::endl;
678 for (
int iBin = 0; iBin < binThreshSize; ++iBin) {
679 LogTrace(
"L1GetHistLimits") <<
" Bin " << std::right
680 << std::setw(5) << iBin <<
": "
692 const L1GtObject& l1GtObject,
const std::string& quantity,
693 const double histMinValue,
const double histMaxValue) {
697 bool foundLowerBinValue =
false;
698 bool foundUpperBinValue =
false;
703 foundLowerBinValue =
true;
711 foundUpperBinValue =
true;
716 if (foundLowerBinValue && foundUpperBinValue) {
719 std::vector<float> binThresh;
746 LogDebug(
"L1GetHistLimits") <<
"\n Histogram limits for L1GtObject"
747 << l1GtObject <<
" and quantity " << quantity
748 <<
" within the required range [" << histMinValue <<
", "
749 << histMaxValue <<
"] not found."
750 <<
"\n The range is not included in the original histogram range."
758 LogDebug(
"L1GetHistLimits") <<
"\n Histogram limits for L1GtObject"
759 << l1GtObject <<
" and quantity " << quantity
761 <<
"\n Lower limit of first bin: "
763 <<
"\n Upper limit of last bin: "
771 <<
"\n Warning: inconsistent nrBins and binThresholds size"
773 <<
"\n binThresholds size = " << binThreshSize
774 <<
"\n Please fix the L1GetLimits class.\n\n" << std::endl;
778 for (
int iBin = 0; iBin < binThreshSize; ++iBin) {
779 LogTrace(
"L1GetHistLimits") <<
" Bin " << std::right
780 << std::setw(5) << iBin <<
": "
793 const std::string& quantity) {
801 const std::string& quantity) {
809 const std::string& quantity) {
817 const L1GtObject& l1GtObject,
const std::string& quantity) {
double globalEtaBinLowEdge(unsigned int globalEtaIndex) const
unsigned int numberGctForwardEtaBinsPerHalf() const
void getHistLimits(const L1GtObject &l1GtObject, const std::string &quantity)
const edm::EventSetup & m_evSetup
L1HistLimits m_l1HistLimits
all limits for a histogram
unsigned int numberGctHtSumPhiBins() const
double htSumPhiBinLowEdge(unsigned int phiIndex) const
const double l1HistUpperBinValue(const L1GtObject &l1GtObject, const std::string &quantity)
unsigned int numberGctEtSumPhiBins() const
const std::vector< float > & l1HistBinThresholds(const L1GtObject &l1GtObject, const std::string &quantity)
unsigned int numberGctEmJetPhiBins() const
const int l1HistNrBins(const L1GtObject &l1GtObject, const std::string &quantity)
unsigned int numberGctCentralEtaBinsPerHalf() const
virtual ~L1GetHistLimits()
const unsigned int R3BINS
std::vector< float > binThresholds
const double rad2deg(const double &)
convert phi from rad (-pi, pi] to deg (0, 360)
T const * product() const
double globalEtaBinHighEdge(unsigned int globalEtaIndex) const
double etSumPhiBinLowEdge(unsigned int phiIndex) const
double emJetPhiBinLowEdge(unsigned int phiIndex) const
double htSumPhiBinHighEdge(unsigned int phiIndex) const
L1GetHistLimits(const edm::EventSetup &evSetup)
const double l1HistLowerBinValue(const L1GtObject &l1GtObject, const std::string &quantity)
double emJetPhiBinHighEdge(unsigned int phiIndex) const
double etSumPhiBinHighEdge(unsigned int phiIndex) const
const L1HistLimits & l1HistLimits(const L1GtObject &l1GtObject, const std::string &quantity)