61 if (quantity ==
"NrObjects") {
88 if (quantity ==
"PT") {
95 = muPtScale->getPtScale()->getScaleMin();
97 = muPtScale->getPtScale()->getScaleMax();
103 = muPtScale->getPtScale()->getValue(iBin);
113 float maxLaxtBinsize = 200;
114 if (lastBinSize >= maxLaxtBinsize) {
120 <<
"\n L1ExtraMuon: PT histogram"
121 <<
"\nm_l1HistLimits.upperBinValue truncated to = "
129 }
else if (quantity ==
"eta" || quantity ==
"phi") {
133 if (quantity ==
"eta") {
135 int histNrBinsHalf = muScales->getGMTEtaScale()->getNBins();
137 = muScales->getGMTEtaScale()->getScaleMin();
139 = muScales->getGMTEtaScale()->getScaleMax();
148 for (
int j = histNrBinsHalf;
j > 0;
j--, iBin++) {
150 * muScales->getGMTEtaScale()->getValue(
j);
152 for (
int j = 0;
j <= histNrBinsHalf;
j++, iBin++) {
154 = muScales->getGMTEtaScale()->getValue(
j);
164 muScales->getPhiScale()->getScaleMin());
166 muScales->getPhiScale()->getScaleMax());
173 muScales->getPhiScale()->getValue(iBin));
189 if (quantity ==
"ET") {
193 std::vector<double> emThresholds = emScale->getThresholds();
208 =
static_cast<float>(emThresholds[iBin]);
216 }
else if (quantity ==
"eta" || quantity ==
"phi") {
221 if (quantity ==
"eta") {
286 if (quantity ==
"ET") {
290 std::vector<double> jetThresholds = jetScale->getThresholds();
305 =
static_cast<float>(jetThresholds[iBin]);
313 }
else if (quantity ==
"eta" || quantity ==
"phi") {
318 if (quantity ==
"eta") {
377 if (quantity ==
"ET") {
382 const double etSumLSB = etMissScale->linearLsb() ;
401 }
else if (quantity ==
"eta" || quantity ==
"phi") {
406 if (quantity ==
"eta") {
439 if (quantity ==
"ET") {
444 const double etSumLSB = etMissScale->linearLsb() ;
463 }
else if (quantity ==
"eta" || quantity ==
"phi") {
472 if (quantity ==
"ET") {
476 double htSumLSB = jetFinderParams->getHtLsbGeV();
495 }
else if (quantity ==
"eta" || quantity ==
"phi") {
503 if (quantity ==
"ET") {
507 const std::vector<double>& htThresholds =
508 htMissScale->getThresholds();
523 =
static_cast<float>(htThresholds[iBin]);
531 }
else if (quantity ==
"eta" || quantity ==
"phi") {
536 if (quantity ==
"eta") {
574 const unsigned int R3BINS = 8;
575 const float R3MIN = -0.5;
576 const float R3MAX = 7.5;
590 = R3MIN + iBin*(R3MAX -
R3MIN)/R3BINS;
603 if (quantity ==
"ET") {
607 const std::vector<double>& hfRingEtThresholds =
608 hfRingEtScale->getThresholds();
623 =
static_cast<float>(hfRingEtThresholds[iBin]);
631 }
else if (quantity ==
"eta" || quantity ==
"phi") {
656 LogDebug(
"L1GetHistLimits") <<
"\n Histogram limits for L1GtObject "
657 << l1GtObject <<
" and quantity " << quantity
659 <<
"\n Lower limit of first bin: "
661 <<
"\n Upper limit of last bin: "
669 <<
"\n Warning: inconsistent nrBins and binThresholds size"
671 <<
"\n binThresholds size = " << binThreshSize
672 <<
"\n Please fix the L1GetLimits class.\n\n" << std::endl;
676 for (
int iBin = 0; iBin < binThreshSize; ++iBin) {
677 LogTrace(
"L1GetHistLimits") <<
" Bin " << std::right
678 << std::setw(5) << iBin <<
": "
691 const double histMinValue,
const double histMaxValue) {
695 bool foundLowerBinValue =
false;
696 bool foundUpperBinValue =
false;
701 foundLowerBinValue =
true;
709 foundUpperBinValue =
true;
714 if (foundLowerBinValue && foundUpperBinValue) {
717 std::vector<float> binThresh;
744 LogDebug(
"L1GetHistLimits") <<
"\n Histogram limits for L1GtObject"
745 << l1GtObject <<
" and quantity " << quantity
746 <<
" within the required range [" << histMinValue <<
", "
747 << histMaxValue <<
"] not found."
748 <<
"\n The range is not included in the original histogram range."
756 LogDebug(
"L1GetHistLimits") <<
"\n Histogram limits for L1GtObject"
757 << l1GtObject <<
" and quantity " << quantity
759 <<
"\n Lower limit of first bin: "
761 <<
"\n Upper limit of last bin: "
769 <<
"\n Warning: inconsistent nrBins and binThresholds size"
771 <<
"\n binThresholds size = " << binThreshSize
772 <<
"\n Please fix the L1GetLimits class.\n\n" << std::endl;
776 for (
int iBin = 0; iBin < binThreshSize; ++iBin) {
777 LogTrace(
"L1GetHistLimits") <<
" Bin " << std::right
778 << std::setw(5) << iBin <<
": "
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)