61 printHfSF =
pset.getUntrackedParameter<
bool>(
"printHfSF",
false);
90 const EVP_MD* md = EVP_get_digestbyname(
"SHA1");
91 if (!EVP_DigestInit_ex(mdctx, md,
nullptr))
92 throw cms::Exception(
"L1TCaloParamsViewer::hash") <<
"SHA1 initialization error";
94 if (!EVP_DigestUpdate(mdctx,
buf, len))
95 throw cms::Exception(
"L1TCaloParamsViewer::hash") <<
"SHA1 processing error";
97 unsigned char hash[EVP_MAX_MD_SIZE];
98 unsigned int md_len = 0;
99 if (!EVP_DigestFinal_ex(mdctx,
hash, &md_len))
100 throw cms::Exception(
"L1TCaloParamsViewer::hash") <<
"SHA1 finalization error";
105 char tmp[EVP_MAX_MD_SIZE * 2 + 1];
108 for (
unsigned int i = 0;
i < md_len;
i++)
118 handle1 = evSetup.
getHandle(stage2ParamsToken_);
120 handle1 = evSetup.
getHandle(paramsToken_);
129 cout << endl <<
" Towers: " << endl;
142 cout << endl <<
" Regions: " << endl;
150 cout <<
" " <<
ceil(2 * pusParams[
i]) << endl;
165 cout <<
" regionPUSLUT= [0]" << endl;
170 cout << endl <<
" EG: " << endl;
171 cout <<
" egLsb= " << ptr1->
egLsb() << endl;
183 cout <<
" egTrimmingLUT= [0] " << endl;
200 cout <<
" egMaxHOverELUT= [0]" << endl;
210 cout <<
" egCompressShapesLUT= [0]" << endl;
222 cout <<
" egShapeIdLUT= [0]" << endl;
243 cout <<
i <<
" " << egIsolation[
i] << endl;
245 cout <<
" egIsoLUT= [0]" << endl;
255 cout <<
i <<
" " << egIsolation2[
i] << endl;
257 cout <<
" egIsoLUT2= [0]" << endl;
263 cout <<
" egPUSParams= [" << ptr1->
egPUSParams().size() <<
"] " << flush;
293 cout <<
i <<
" " << egCalibration[
i] << endl;
295 cout <<
" egCalibrationLUT= [0]" << endl;
298 cout << endl <<
" Tau: " << endl;
299 cout <<
" tauLsb= " << ptr1->
tauLsb() << endl;
317 cout <<
" tauIsoLUT= [0]" << endl;
326 cout <<
" tauIsoLUT2= [0]" << endl;
335 cout <<
" tauTrimmingShapeVetoLUT=[0]" << endl;
340 int tauCalibration[512];
341 for (
unsigned int i = 0;
i < 512;
i++)
343 cout <<
hash(tauCalibration,
sizeof(
int) * 512 ) << endl;
345 if (printTauCalibLUT)
346 for (
unsigned int i = 0;
i < 512 ;
i++)
347 cout <<
i <<
" " << tauCalibration[
i] << endl;
350 cout <<
" tauCalibrationLUT= [0]" << endl;
372 if (printTauCompressLUT)
374 cout <<
i <<
" " << tauCompress[
i] << endl;
377 cout <<
" tauCompressLUT= [0]" << endl;
388 cout <<
" tauEtToHFRingEtLUT= [0]" << endl;
403 cout << endl <<
" Jets: " << endl;
404 cout <<
" jetLsb= " << ptr1->
jetLsb() << endl;
444 if (printJetCalibLUT)
446 cout <<
i <<
" " << jetCalibration[
i] << endl;
449 cout <<
" jetCalibrationLUT= [0]" << endl;
460 if (printJetCompressPtLUT)
462 cout <<
i <<
" " << jetCompressPt[
i] << endl;
465 cout <<
" jetCompressPtLUT= [0]" << endl;
476 if (printJetCompressEtaLUT)
478 cout <<
i <<
" " << jetCompressEta[
i] << endl;
481 cout <<
" jetCompressEtaLUT= [0]" << endl;
484 cout << endl <<
" Sums: " << endl;
485 unsigned int nEntities = 0;
487 cout <<
" etSumEtaMin= [";
491 cout <<
" etSumEtaMax= [";
492 for (
unsigned int i = 0; ptr1->
etSumEtaMax(
i) > 0.001;
i++, nEntities++)
495 cout <<
" etSumEtThreshold= [";
496 for (
unsigned int i = 0;
i < nEntities;
i++)
508 cout <<
" etSumCentralityUpper= [";
512 cout <<
" etSumCentralityLower= [";
530 if (printEtSumMetPUSLUT)
532 cout <<
i <<
" " << etSumMetPUSLUT[
i] << endl;
535 cout <<
" etSumMetPUSLUT= [0]" << endl;
546 if (printEtSumEttPUSLUT)
548 cout <<
i <<
" " << etSumEttPUSLUT[
i] << endl;
551 cout <<
" etSumEttPUSLUT= [0]" << endl;
562 if (printEtSumEcalSumPUSLUT)
564 cout <<
i <<
" " << etSumEcalSumPUSLUT[
i] << endl;
567 cout <<
" etSumEcalSumPUSLUT= [0]" << endl;
578 if (printMetCalibrationLUT)
580 cout <<
i <<
" " << metCalibrationLUT[
i] << endl;
583 cout <<
" metCalibrationLUT= [0]" << endl;
594 if (printMetHFCalibrationLUT)
596 cout <<
i <<
" " << metHFCalibrationLUT[
i] << endl;
599 cout <<
" metHFCalibrationLUT= [0]" << endl;
610 if (printMetPhiCalibrationLUT)
612 cout <<
i <<
" " << metPhiCalibrationLUT[
i] << endl;
615 cout <<
" metPhiCalibrationLUT= [0]" << endl;
626 if (printMetHFCalibrationLUT)
628 cout <<
i <<
" " << metHFPhiCalibrationLUT[
i] << endl;
631 cout <<
" metHFPhiCalibrationLUT= [0]" << endl;
642 if (printEtSumEttCalibrationLUT)
644 cout <<
i <<
" " << etSumEttCalibrationLUT[
i] << endl;
647 cout <<
" etSumEttCalibrationLUT= [0]" << endl;
658 if (printEtSumEcalSumCalibrationLUT)
660 cout <<
i <<
" " << etSumEcalSumCalibrationLUT[
i] << endl;
663 cout <<
" etSumEcalSumCalibrationLUT=[0]" << endl;
666 cout << endl <<
" HI centrality trigger: " << endl;
667 cout <<
" centralityLUT= [";
673 cout <<
" minimumBiasThresholds= [";
674 for (
unsigned int i = 0;
i < mbt.size();
i++)
682 cout << endl <<
" HI Q2 trigger: " << endl;
688 cout << endl <<
" Layer1: " << endl;
690 cout <<
" layer1ECalScaleFactors= [" << ecalSF.size() <<
"] " << flush;
691 int _ecalSF[ecalSF.size()];
692 for (
unsigned int i = 0;
i < ecalSF.size();
i++)
693 _ecalSF[
i] =
int(ecalSF[
i] * 100000.);
694 cout <<
hash(_ecalSF,
sizeof(
int) * ecalSF.size()) << endl;
696 cout << endl <<
" [" << endl;
697 for (
unsigned int i = 0;
i < ecalSF.size();
i++)
698 cout << (
i == 0 ?
"" :
",") <<
int(ecalSF[
i] * 1000.) / 1000.;
702 cout <<
" layer1HCalScaleFactors= [" << hcalSF.size() <<
"] " << flush;
703 int _hcalSF[hcalSF.size()];
704 for (
unsigned int i = 0;
i < hcalSF.size();
i++) {
710 _hcalSF[
i] =
int(hcalSF[
i] * 100000.);
712 cout <<
hash(_hcalSF,
sizeof(
int) * hcalSF.size()) << endl;
714 cout << endl <<
" [" << endl;
715 for (
unsigned int i = 0;
i < hcalSF.size();
i++)
716 cout << (
i == 0 ?
"" :
",") <<
int(hcalSF[
i] * 1000.) / 1000.;
720 cout <<
" layer1HFScaleFactors= [" <<
hfSF.size() <<
"] " << flush;
721 int _hfSF[
hfSF.size()];
722 for (
unsigned int i = 0;
i <
hfSF.size();
i++)
723 _hfSF[
i] =
int(
hfSF[
i] * 100000.);
726 cout << endl <<
" [" << endl;
727 for (
unsigned int i = 0;
i <
hfSF.size();
i++)
733 cout <<
" layer1ECalScaleETBins= [";
734 for (
unsigned int i = 0;
i < ecalScaleET.size();
i++)
735 cout << (
i == 0 ?
"" :
",") << ecalScaleET[
i];
738 cout <<
" layer1HCalScaleETBins= [";
739 for (
unsigned int i = 0;
i < hcalScaleET.size();
i++)
740 cout << (
i == 0 ?
"" :
",") << hcalScaleET[
i];
743 cout <<
" layer1HFScaleETBins= [";
744 for (
unsigned int i = 0;
i < hfScaleET.size();
i++)
745 cout << (
i == 0 ?
"" :
",") << hfScaleET[
i];
749 cout <<
" layer1ECalScalePhi= [";
750 for (
unsigned int i = 0;
i < layer1ECalScalePhi.size();
i++)
751 cout << (
i == 0 ?
"" :
",") << layer1ECalScalePhi[
i];
754 cout <<
" layer1HCalScalePhi= [";
755 for (
unsigned int i = 0;
i < layer1HCalScalePhi.size();
i++)
756 cout << (
i == 0 ?
"" :
",") << layer1HCalScalePhi[
i];
759 cout <<
" layer1HFScalePhiBins= [";
unsigned jetBypassPUS() const
std::string const & egShapeIdType() const
constexpr int32_t ceil(float num)
double tauMaxJetIsolationB() const
std::vector< unsigned > const & layer1HFScalePhiBins() const
int towerNBitsSum() const
bool printEtSumEcalSumCalibrationLUT
bool printMetPhiCalibrationLUT
l1t::LUT * etSumEttPUSLUT()
unsigned egIsoAreaNrTowersPhi() const
bool doTowerEncoding() const
l1t::LUT * centralityLUT()
l1t::LUT * etSumMetPUSLUT()
unsigned int maxSize() const
double etSumCentUpper(unsigned centClass) const
double etSumCentLower(unsigned centClass) const
l1t::LUT * jetCalibrationLUT()
std::string const & etSumEcalSumPUSType() const
unsigned etSumBypassEcalSumPUS() const
l1t::LUT * metCalibrationLUT()
const std::vector< double > & tauPUSParams() const
unsigned egCalibrationVersion() const
std::vector< unsigned > const & layer1ECalScalePhiBins() const
l1t::LUT const * egIsolationLUT() const
l1t::LUT * regionPUSLUT()
l1t::LUT * metHFPhiCalibrationLUT()
std::string hash(void *buf, size_t len) const
bool printMetHFPhiCalibrationLUT
unsigned tauIsoAreaNrTowersEta() const
std::string const & etSumEttCalibrationType() const
l1t::LUT * egShapeIdLUT()
std::vector< double > const & egCalibrationParams() const
std::vector< double > const & regionPUSParams() const
double tauMaxPtTauVeto() const
const std::string & egPUSType() const
int egMinPtJetIsolation() const
std::vector< int > minimumBiasThresholds() const
l1t::LUT * tauTrimmingShapeVetoLUT()
unsigned egShapeIdVersion() const
std::vector< int > const & layer1ECalScaleETBins() const
double jetSeedThreshold() const
int egHOverEcutEndcap() const
double etSumEtThreshold(unsigned isum) const
std::string const & metCalibrationType() const
std::vector< double > const & layer1HCalScaleFactors() const
double egNeighbourThreshold() const
unsigned egBypassEGVetos() const
l1t::LUT * egCompressShapesLUT()
double egHcalThreshold() const
std::vector< double > const & tauCalibrationParams() const
unsigned egIsoVetoNrTowersPhi() const
l1t::LUT * tauIsolationLUT2()
int egMinPtHOverEIsolation() const
std::string const & jetCalibrationType() const
int etSumEtaMax(unsigned isum) const
unsigned etSumBypassMetPUS() const
bool printMetHFCalibrationLUT
std::vector< double > const & layer1ECalScaleFactors() const
int etSumEtaMin(unsigned isum) const
unsigned egBypassShape() const
std::string const & etSumEcalSumCalibrationType() const
std::string const & etSumMetPUSType() const
int data(unsigned int address) const
bool printMetCalibrationLUT
l1t::LUT * tauCompressLUT()
edm::ESGetToken< l1t::CaloParams, L1TCaloStage2ParamsRcd > stage2ParamsToken_
double egMaxHcalEt() const
#define DEFINE_FWK_MODULE(type)
unsigned egBypassECALFG() const
double tauMaxJetIsolationA() const
l1t::LUT * egTrimmingLUT()
unsigned egBypassExtHOverE() const
std::string const & egCalibrationType() const
int egHOverEcutBarrel() const
double egSeedThreshold() const
int tauRegionMask() const
~L1TCaloParamsViewer(void) override
l1t::LUT * jetCompressPtLUT()
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
L1TCaloParamsViewer(const edm::ParameterSet &pset)
bool printJetCompressEtaLUT
l1t::LUT const * tauEtToHFRingEtLUT() const
std::string const & etSumEttPUSType() const
l1t::LUT * egMaxHOverELUT()
Log< level::Info, false > LogInfo
l1t::LUT * etSumEcalSumCalibrationLUT()
l1t::LUT const * egCalibrationLUT() const
l1t::LUT * metHFCalibrationLUT()
std::string const & tauCalibrationType() const
std::string tauPUSType() const
int centralityRegionMask() const
int egMaxPtHOverEIsolation() const
unsigned tauIsoVetoNrTowersPhi() const
unsigned etSumBypassEttPUS() const
edm::ESGetToken< l1t::CaloParams, L1TCaloParamsRcd > paramsToken_
std::string const & metHFCalibrationType() const
double egMaxPtHOverE() const
std::vector< int > const & layer1HCalScaleETBins() const
int egMaxPtJetIsolation() const
bool printEtSumEttCalibrationLUT
int towerNBitsRatio() const
std::vector< int > const & layer1HFScaleETBins() const
l1t::LUT * tauCalibrationLUT()
int jetRegionMask() const
double towerLsbSum() const
l1t::LUT * etSumEttCalibrationLUT()
bool printJetCompressPtLUT
bool printEtSumEcalSumPUSLUT
l1t::LUT * tauIsolationLUT()
std::vector< double > const & layer1HFScaleFactors() const
unsigned egIsoAreaNrTowersEta() const
l1t::LUT * jetCompressEtaLUT()
double tauMinPtJetIsolationB() const
std::vector< unsigned > const & layer1HCalScalePhiBins() const
l1t::LUT * metPhiCalibrationLUT()
int pileUpTowerThreshold() const
l1t::LUT const * egIsolationLUT2() const
std::string const & egIsolationType() const
double jetNeighbourThreshold() const
const std::vector< double > & egPUSParams() const
std::string const & regionPUSType() const
l1t::LUT * etSumEcalSumPUSLUT()
unsigned jetPUSUsePhiRing() const
unsigned tauIsoAreaNrTowersPhi() const
void analyze(const edm::Event &, const edm::EventSetup &) override