Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:23:10

0001 // -*- C++ -*-
0002 //
0003 // Package:    L1Trigger/L1TMuonGlobalParamsESProducer
0004 // Class:      L1TMuonGlobalParamsESProducer
0005 //
0006 /**\class L1TMuonGlobalParamsESProducer L1TMuonGlobalParamsESProducer.h L1Trigger/L1TMuonGlobalParamsESProducer/plugins/L1TMuonGlobalParamsESProducer.cc
0007 
0008  Description: [one line class summary]
0009 
0010  Implementation:
0011      [Notes on implementation]
0012 */
0013 //
0014 // Original Author:  Thomas Reis
0015 //         Created:  Mon, 21 Sep 2015 13:28:49 GMT
0016 //
0017 //
0018 
0019 // system include files
0020 #include <memory>
0021 #include <strstream>
0022 
0023 // user include files
0024 #include "FWCore/Framework/interface/ModuleFactory.h"
0025 #include "FWCore/Framework/interface/ESProducer.h"
0026 #include "FWCore/Framework/interface/ESProducts.h"
0027 
0028 #include "CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h"
0029 #include "CondFormats/DataRecord/interface/L1TMuonGlobalParamsRcd.h"
0030 #include "L1Trigger/L1TMuon/interface/L1TMuonGlobalParamsHelper.h"
0031 #include "L1Trigger/L1TMuon/interface/MicroGMTLUTFactories.h"
0032 #include "L1Trigger/L1TCommon/interface/TriggerSystem.h"
0033 #include "L1Trigger/L1TCommon/interface/Parameter.h"
0034 #include "L1Trigger/L1TCommon/interface/Mask.h"
0035 
0036 //
0037 // class declaration
0038 //
0039 
0040 class L1TMuonGlobalParamsESProducer : public edm::ESProducer {
0041 public:
0042   L1TMuonGlobalParamsESProducer(const edm::ParameterSet&);
0043   ~L1TMuonGlobalParamsESProducer() override;
0044 
0045   using ReturnType = std::unique_ptr<L1TMuonGlobalParams>;
0046 
0047   ReturnType produce(const L1TMuonGlobalParamsRcd&);
0048 
0049 private:
0050   L1TMuonGlobalParams m_params;
0051 };
0052 
0053 //
0054 // constants, enums and typedefs
0055 //
0056 
0057 //
0058 // static data member definitions
0059 //
0060 
0061 //
0062 // constructors and destructor
0063 //
0064 L1TMuonGlobalParamsESProducer::L1TMuonGlobalParamsESProducer(const edm::ParameterSet& iConfig) {
0065   //the following line is needed to tell the framework what
0066   // data is being produced
0067   setWhatProduced(this);
0068 
0069   L1TMuonGlobalParamsHelper m_params_helper;
0070 
0071   // get configuration from DB
0072   if (iConfig.getParameter<bool>("configFromXml")) {
0073     l1t::TriggerSystem trgSys;
0074     edm::FileInPath hwXmlFile(iConfig.getParameter<std::string>("hwXmlFile"));
0075     edm::FileInPath topCfgXmlFile(iConfig.getParameter<std::string>("topCfgXmlFile"));
0076     // These xml files are for testing the configuration from the online DB
0077     trgSys.configureSystemFromFiles(hwXmlFile.fullPath().c_str(),
0078                                     topCfgXmlFile.fullPath().c_str(),
0079                                     iConfig.getParameter<std::string>("xmlCfgKey").c_str());
0080 
0081     m_params_helper.loadFromOnline(trgSys, iConfig.getParameter<std::string>("uGmtProcessorId"));
0082   } else {
0083     // Firmware version
0084     unsigned fwVersion = iConfig.getParameter<unsigned>("fwVersion");
0085     m_params_helper.setFwVersion(fwVersion);
0086 
0087     // LUTs
0088     m_params_helper.setFwdPosSingleMatchQualLUTMaxDR(iConfig.getParameter<double>("FwdPosSingleMatchQualLUTMaxDR"),
0089                                                      iConfig.getParameter<double>("FwdPosSingleMatchQualLUTfEta"),
0090                                                      iConfig.getParameter<double>("FwdPosSingleMatchQualLUTfPhi"));
0091     m_params_helper.setFwdNegSingleMatchQualLUTMaxDR(iConfig.getParameter<double>("FwdNegSingleMatchQualLUTMaxDR"),
0092                                                      iConfig.getParameter<double>("FwdNegSingleMatchQualLUTfEta"),
0093                                                      iConfig.getParameter<double>("FwdNegSingleMatchQualLUTfPhi"));
0094     m_params_helper.setOvlPosSingleMatchQualLUTMaxDR(iConfig.getParameter<double>("OvlPosSingleMatchQualLUTMaxDR"),
0095                                                      iConfig.getParameter<double>("OvlPosSingleMatchQualLUTfEta"),
0096                                                      iConfig.getParameter<double>("OvlPosSingleMatchQualLUTfEtaCoarse"),
0097                                                      iConfig.getParameter<double>("OvlPosSingleMatchQualLUTfPhi"));
0098     m_params_helper.setOvlNegSingleMatchQualLUTMaxDR(iConfig.getParameter<double>("OvlNegSingleMatchQualLUTMaxDR"),
0099                                                      iConfig.getParameter<double>("OvlNegSingleMatchQualLUTfEta"),
0100                                                      iConfig.getParameter<double>("OvlNegSingleMatchQualLUTfEtaCoarse"),
0101                                                      iConfig.getParameter<double>("OvlNegSingleMatchQualLUTfPhi"));
0102     m_params_helper.setBOPosMatchQualLUTMaxDR(iConfig.getParameter<double>("BOPosMatchQualLUTMaxDR"),
0103                                               iConfig.getParameter<double>("BOPosMatchQualLUTfEta"),
0104                                               iConfig.getParameter<double>("BOPosMatchQualLUTfEtaCoarse"),
0105                                               iConfig.getParameter<double>("BOPosMatchQualLUTfPhi"));
0106     m_params_helper.setBONegMatchQualLUTMaxDR(iConfig.getParameter<double>("BONegMatchQualLUTMaxDR"),
0107                                               iConfig.getParameter<double>("BONegMatchQualLUTfEta"),
0108                                               iConfig.getParameter<double>("BONegMatchQualLUTfEtaCoarse"),
0109                                               iConfig.getParameter<double>("BONegMatchQualLUTfPhi"));
0110     m_params_helper.setFOPosMatchQualLUTMaxDR(iConfig.getParameter<double>("FOPosMatchQualLUTMaxDR"),
0111                                               iConfig.getParameter<double>("FOPosMatchQualLUTfEta"),
0112                                               iConfig.getParameter<double>("FOPosMatchQualLUTfEtaCoarse"),
0113                                               iConfig.getParameter<double>("FOPosMatchQualLUTfPhi"));
0114     m_params_helper.setFONegMatchQualLUTMaxDR(iConfig.getParameter<double>("FONegMatchQualLUTMaxDR"),
0115                                               iConfig.getParameter<double>("FONegMatchQualLUTfEta"),
0116                                               iConfig.getParameter<double>("FONegMatchQualLUTfEtaCoarse"),
0117                                               iConfig.getParameter<double>("FONegMatchQualLUTfPhi"));
0118 
0119     unsigned sortRankLUTPtFactor = iConfig.getParameter<unsigned>("SortRankLUTPtFactor");
0120     unsigned sortRankLUTQualFactor = iConfig.getParameter<unsigned>("SortRankLUTQualFactor");
0121     m_params_helper.setSortRankLUTFactors(sortRankLUTPtFactor, sortRankLUTQualFactor);
0122 
0123     auto absIsoCheckMemLUT = l1t::MicroGMTAbsoluteIsolationCheckLUTFactory::create(
0124         iConfig.getParameter<std::string>("AbsIsoCheckMemLUTPath"), fwVersion);
0125     auto relIsoCheckMemLUT = l1t::MicroGMTRelativeIsolationCheckLUTFactory::create(
0126         iConfig.getParameter<std::string>("RelIsoCheckMemLUTPath"), fwVersion);
0127     auto idxSelMemPhiLUT = l1t::MicroGMTCaloIndexSelectionLUTFactory::create(
0128         iConfig.getParameter<std::string>("IdxSelMemPhiLUTPath"), l1t::MicroGMTConfiguration::PHI, fwVersion);
0129     auto idxSelMemEtaLUT = l1t::MicroGMTCaloIndexSelectionLUTFactory::create(
0130         iConfig.getParameter<std::string>("IdxSelMemEtaLUTPath"), l1t::MicroGMTConfiguration::ETA, fwVersion);
0131     auto fwdPosSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(
0132         iConfig.getParameter<std::string>("FwdPosSingleMatchQualLUTPath"),
0133         iConfig.getParameter<double>("FwdPosSingleMatchQualLUTMaxDR"),
0134         iConfig.getParameter<double>("FwdPosSingleMatchQualLUTfEta"),
0135         iConfig.getParameter<double>("FwdPosSingleMatchQualLUTfEta"),  // set the coarse eta factor = fine eta factor
0136         iConfig.getParameter<double>("FwdPosSingleMatchQualLUTfPhi"),
0137         l1t::cancel_t::emtf_emtf_pos,
0138         fwVersion);
0139     auto fwdNegSingleMatchQualLUT = l1t::MicroGMTMatchQualLUTFactory::create(
0140         iConfig.getParameter<std::string>("FwdNegSingleMatchQualLUTPath"),
0141         iConfig.getParameter<double>("FwdNegSingleMatchQualLUTMaxDR"),
0142         iConfig.getParameter<double>("FwdNegSingleMatchQualLUTfEta"),
0143         iConfig.getParameter<double>("FwdNegSingleMatchQualLUTfEta"),  // set the coarse eta factor = fine eta factor
0144         iConfig.getParameter<double>("FwdNegSingleMatchQualLUTfPhi"),
0145         l1t::cancel_t::emtf_emtf_neg,
0146         fwVersion);
0147     auto ovlPosSingleMatchQualLUT =
0148         l1t::MicroGMTMatchQualLUTFactory::create(iConfig.getParameter<std::string>("OvlPosSingleMatchQualLUTPath"),
0149                                                  iConfig.getParameter<double>("OvlPosSingleMatchQualLUTMaxDR"),
0150                                                  iConfig.getParameter<double>("OvlPosSingleMatchQualLUTfEta"),
0151                                                  iConfig.getParameter<double>("OvlPosSingleMatchQualLUTfEtaCoarse"),
0152                                                  iConfig.getParameter<double>("OvlPosSingleMatchQualLUTfPhi"),
0153                                                  l1t::cancel_t::omtf_omtf_pos,
0154                                                  fwVersion);
0155     auto ovlNegSingleMatchQualLUT =
0156         l1t::MicroGMTMatchQualLUTFactory::create(iConfig.getParameter<std::string>("OvlNegSingleMatchQualLUTPath"),
0157                                                  iConfig.getParameter<double>("OvlNegSingleMatchQualLUTMaxDR"),
0158                                                  iConfig.getParameter<double>("OvlNegSingleMatchQualLUTfEta"),
0159                                                  iConfig.getParameter<double>("OvlNegSingleMatchQualLUTfEtaCoarse"),
0160                                                  iConfig.getParameter<double>("OvlNegSingleMatchQualLUTfPhi"),
0161                                                  l1t::cancel_t::omtf_omtf_neg,
0162                                                  fwVersion);
0163     auto bOPosMatchQualLUT =
0164         l1t::MicroGMTMatchQualLUTFactory::create(iConfig.getParameter<std::string>("BOPosMatchQualLUTPath"),
0165                                                  iConfig.getParameter<double>("BOPosMatchQualLUTMaxDR"),
0166                                                  iConfig.getParameter<double>("BOPosMatchQualLUTfEta"),
0167                                                  iConfig.getParameter<double>("BOPosMatchQualLUTfEtaCoarse"),
0168                                                  iConfig.getParameter<double>("BOPosMatchQualLUTfPhi"),
0169                                                  l1t::cancel_t::omtf_bmtf_pos,
0170                                                  fwVersion);
0171     auto bONegMatchQualLUT =
0172         l1t::MicroGMTMatchQualLUTFactory::create(iConfig.getParameter<std::string>("BONegMatchQualLUTPath"),
0173                                                  iConfig.getParameter<double>("BONegMatchQualLUTMaxDR"),
0174                                                  iConfig.getParameter<double>("BONegMatchQualLUTfEta"),
0175                                                  iConfig.getParameter<double>("BONegMatchQualLUTfEtaCoarse"),
0176                                                  iConfig.getParameter<double>("BONegMatchQualLUTfPhi"),
0177                                                  l1t::cancel_t::omtf_bmtf_neg,
0178                                                  fwVersion);
0179     auto fOPosMatchQualLUT =
0180         l1t::MicroGMTMatchQualLUTFactory::create(iConfig.getParameter<std::string>("FOPosMatchQualLUTPath"),
0181                                                  iConfig.getParameter<double>("FOPosMatchQualLUTMaxDR"),
0182                                                  iConfig.getParameter<double>("FOPosMatchQualLUTfEta"),
0183                                                  iConfig.getParameter<double>("FOPosMatchQualLUTfEtaCoarse"),
0184                                                  iConfig.getParameter<double>("FOPosMatchQualLUTfPhi"),
0185                                                  l1t::cancel_t::omtf_emtf_pos,
0186                                                  fwVersion);
0187     auto fONegMatchQualLUT =
0188         l1t::MicroGMTMatchQualLUTFactory::create(iConfig.getParameter<std::string>("FONegMatchQualLUTPath"),
0189                                                  iConfig.getParameter<double>("FONegMatchQualLUTMaxDR"),
0190                                                  iConfig.getParameter<double>("FONegMatchQualLUTfEta"),
0191                                                  iConfig.getParameter<double>("FONegMatchQualLUTfEtaCoarse"),
0192                                                  iConfig.getParameter<double>("FONegMatchQualLUTfPhi"),
0193                                                  l1t::cancel_t::omtf_emtf_neg,
0194                                                  fwVersion);
0195     auto bPhiExtrapolationLUT = l1t::MicroGMTExtrapolationLUTFactory::create(
0196         iConfig.getParameter<std::string>("BPhiExtrapolationLUTPath"), l1t::MicroGMTConfiguration::PHI_OUT, fwVersion);
0197     auto oPhiExtrapolationLUT = l1t::MicroGMTExtrapolationLUTFactory::create(
0198         iConfig.getParameter<std::string>("OPhiExtrapolationLUTPath"), l1t::MicroGMTConfiguration::PHI_OUT, fwVersion);
0199     auto fPhiExtrapolationLUT = l1t::MicroGMTExtrapolationLUTFactory::create(
0200         iConfig.getParameter<std::string>("FPhiExtrapolationLUTPath"), l1t::MicroGMTConfiguration::PHI_OUT, fwVersion);
0201     auto bEtaExtrapolationLUT = l1t::MicroGMTExtrapolationLUTFactory::create(
0202         iConfig.getParameter<std::string>("BEtaExtrapolationLUTPath"), l1t::MicroGMTConfiguration::ETA_OUT, fwVersion);
0203     auto oEtaExtrapolationLUT = l1t::MicroGMTExtrapolationLUTFactory::create(
0204         iConfig.getParameter<std::string>("OEtaExtrapolationLUTPath"), l1t::MicroGMTConfiguration::ETA_OUT, fwVersion);
0205     auto fEtaExtrapolationLUT = l1t::MicroGMTExtrapolationLUTFactory::create(
0206         iConfig.getParameter<std::string>("FEtaExtrapolationLUTPath"), l1t::MicroGMTConfiguration::ETA_OUT, fwVersion);
0207     auto rankPtQualityLUT =
0208         l1t::MicroGMTRankPtQualLUTFactory::create(iConfig.getParameter<std::string>("SortRankLUTPath"),
0209                                                   fwVersion,
0210                                                   sortRankLUTPtFactor,
0211                                                   sortRankLUTQualFactor);  // LUTs defined from config file
0212     m_params_helper.setAbsIsoCheckMemLUT(*absIsoCheckMemLUT);
0213     m_params_helper.setRelIsoCheckMemLUT(*relIsoCheckMemLUT);
0214     m_params_helper.setIdxSelMemPhiLUT(*idxSelMemPhiLUT);
0215     m_params_helper.setIdxSelMemEtaLUT(*idxSelMemEtaLUT);
0216     m_params_helper.setFwdPosSingleMatchQualLUT(*fwdPosSingleMatchQualLUT);
0217     m_params_helper.setFwdNegSingleMatchQualLUT(*fwdNegSingleMatchQualLUT);
0218     m_params_helper.setOvlPosSingleMatchQualLUT(*ovlPosSingleMatchQualLUT);
0219     m_params_helper.setOvlNegSingleMatchQualLUT(*ovlNegSingleMatchQualLUT);
0220     m_params_helper.setBOPosMatchQualLUT(*bOPosMatchQualLUT);
0221     m_params_helper.setBONegMatchQualLUT(*bONegMatchQualLUT);
0222     m_params_helper.setFOPosMatchQualLUT(*fOPosMatchQualLUT);
0223     m_params_helper.setFONegMatchQualLUT(*fONegMatchQualLUT);
0224     m_params_helper.setBPhiExtrapolationLUT(*bPhiExtrapolationLUT);
0225     m_params_helper.setOPhiExtrapolationLUT(*oPhiExtrapolationLUT);
0226     m_params_helper.setFPhiExtrapolationLUT(*fPhiExtrapolationLUT);
0227     m_params_helper.setBEtaExtrapolationLUT(*bEtaExtrapolationLUT);
0228     m_params_helper.setOEtaExtrapolationLUT(*oEtaExtrapolationLUT);
0229     m_params_helper.setFEtaExtrapolationLUT(*fEtaExtrapolationLUT);
0230     m_params_helper.setSortRankLUT(*rankPtQualityLUT);
0231 
0232     // LUT paths
0233     m_params_helper.setAbsIsoCheckMemLUTPath(iConfig.getParameter<std::string>("AbsIsoCheckMemLUTPath"));
0234     m_params_helper.setRelIsoCheckMemLUTPath(iConfig.getParameter<std::string>("RelIsoCheckMemLUTPath"));
0235     m_params_helper.setIdxSelMemPhiLUTPath(iConfig.getParameter<std::string>("IdxSelMemPhiLUTPath"));
0236     m_params_helper.setIdxSelMemEtaLUTPath(iConfig.getParameter<std::string>("IdxSelMemEtaLUTPath"));
0237     m_params_helper.setFwdPosSingleMatchQualLUTPath(iConfig.getParameter<std::string>("FwdPosSingleMatchQualLUTPath"));
0238     m_params_helper.setFwdNegSingleMatchQualLUTPath(iConfig.getParameter<std::string>("FwdNegSingleMatchQualLUTPath"));
0239     m_params_helper.setOvlPosSingleMatchQualLUTPath(iConfig.getParameter<std::string>("OvlPosSingleMatchQualLUTPath"));
0240     m_params_helper.setOvlNegSingleMatchQualLUTPath(iConfig.getParameter<std::string>("OvlNegSingleMatchQualLUTPath"));
0241     m_params_helper.setBOPosMatchQualLUTPath(iConfig.getParameter<std::string>("BOPosMatchQualLUTPath"));
0242     m_params_helper.setBONegMatchQualLUTPath(iConfig.getParameter<std::string>("BONegMatchQualLUTPath"));
0243     m_params_helper.setFOPosMatchQualLUTPath(iConfig.getParameter<std::string>("FOPosMatchQualLUTPath"));
0244     m_params_helper.setFONegMatchQualLUTPath(iConfig.getParameter<std::string>("FONegMatchQualLUTPath"));
0245     m_params_helper.setBPhiExtrapolationLUTPath(iConfig.getParameter<std::string>("BPhiExtrapolationLUTPath"));
0246     m_params_helper.setOPhiExtrapolationLUTPath(iConfig.getParameter<std::string>("OPhiExtrapolationLUTPath"));
0247     m_params_helper.setFPhiExtrapolationLUTPath(iConfig.getParameter<std::string>("FPhiExtrapolationLUTPath"));
0248     m_params_helper.setBEtaExtrapolationLUTPath(iConfig.getParameter<std::string>("BEtaExtrapolationLUTPath"));
0249     m_params_helper.setOEtaExtrapolationLUTPath(iConfig.getParameter<std::string>("OEtaExtrapolationLUTPath"));
0250     m_params_helper.setFEtaExtrapolationLUTPath(iConfig.getParameter<std::string>("FEtaExtrapolationLUTPath"));
0251     m_params_helper.setSortRankLUTPath(iConfig.getParameter<std::string>("SortRankLUTPath"));
0252 
0253     // uGMT disabled inputs
0254     bool disableCaloInputs = iConfig.getParameter<bool>("caloInputsDisable");
0255     std::vector<unsigned> bmtfInputsToDisable = iConfig.getParameter<std::vector<unsigned> >("bmtfInputsToDisable");
0256     std::vector<unsigned> omtfInputsToDisable = iConfig.getParameter<std::vector<unsigned> >("omtfInputsToDisable");
0257     std::vector<unsigned> emtfInputsToDisable = iConfig.getParameter<std::vector<unsigned> >("emtfInputsToDisable");
0258 
0259     if (disableCaloInputs) {
0260       m_params_helper.setCaloInputsToDisable(std::bitset<28>(0xFFFFFFF));
0261     } else {
0262       m_params_helper.setCaloInputsToDisable(std::bitset<28>());
0263     }
0264 
0265     std::bitset<12> bmtfDisables;
0266     for (size_t i = 0; i < bmtfInputsToDisable.size(); ++i) {
0267       bmtfDisables.set(i, bmtfInputsToDisable[i] > 0);
0268     }
0269     m_params_helper.setBmtfInputsToDisable(bmtfDisables);
0270 
0271     std::bitset<6> omtfpDisables;
0272     std::bitset<6> omtfnDisables;
0273     for (size_t i = 0; i < omtfInputsToDisable.size(); ++i) {
0274       if (i < 6) {
0275         omtfpDisables.set(i, omtfInputsToDisable[i] > 0);
0276       } else {
0277         omtfnDisables.set(i - 6, omtfInputsToDisable[i] > 0);
0278       }
0279     }
0280     m_params_helper.setOmtfpInputsToDisable(omtfpDisables);
0281     m_params_helper.setOmtfnInputsToDisable(omtfnDisables);
0282 
0283     std::bitset<6> emtfpDisables;
0284     std::bitset<6> emtfnDisables;
0285     for (size_t i = 0; i < emtfInputsToDisable.size(); ++i) {
0286       if (i < 6) {
0287         emtfpDisables.set(i, emtfInputsToDisable[i] > 0);
0288       } else {
0289         emtfnDisables.set(i - 6, emtfInputsToDisable[i] > 0);
0290       }
0291     }
0292     m_params_helper.setEmtfpInputsToDisable(emtfpDisables);
0293     m_params_helper.setEmtfnInputsToDisable(emtfnDisables);
0294 
0295     // masked inputs
0296     bool caloInputsMasked = iConfig.getParameter<bool>("caloInputsMasked");
0297     std::vector<unsigned> maskedBmtfInputs = iConfig.getParameter<std::vector<unsigned> >("maskedBmtfInputs");
0298     std::vector<unsigned> maskedOmtfInputs = iConfig.getParameter<std::vector<unsigned> >("maskedOmtfInputs");
0299     std::vector<unsigned> maskedEmtfInputs = iConfig.getParameter<std::vector<unsigned> >("maskedEmtfInputs");
0300 
0301     if (caloInputsMasked) {
0302       m_params_helper.setMaskedCaloInputs(std::bitset<28>(0xFFFFFFF));
0303     } else {
0304       m_params_helper.setMaskedCaloInputs(std::bitset<28>());
0305     }
0306 
0307     std::bitset<12> bmtfMasked;
0308     for (size_t i = 0; i < maskedBmtfInputs.size(); ++i) {
0309       bmtfMasked.set(i, maskedBmtfInputs[i] > 0);
0310     }
0311     m_params_helper.setMaskedBmtfInputs(bmtfMasked);
0312 
0313     std::bitset<6> omtfpMasked;
0314     std::bitset<6> omtfnMasked;
0315     for (size_t i = 0; i < maskedOmtfInputs.size(); ++i) {
0316       if (i < 6) {
0317         omtfpMasked.set(i, maskedOmtfInputs[i] > 0);
0318       } else {
0319         omtfnMasked.set(i - 6, maskedOmtfInputs[i] > 0);
0320       }
0321     }
0322     m_params_helper.setMaskedOmtfpInputs(omtfpMasked);
0323     m_params_helper.setMaskedOmtfnInputs(omtfnMasked);
0324 
0325     std::bitset<6> emtfpMasked;
0326     std::bitset<6> emtfnMasked;
0327     for (size_t i = 0; i < maskedEmtfInputs.size(); ++i) {
0328       if (i < 6) {
0329         emtfpMasked.set(i, maskedEmtfInputs[i] > 0);
0330       } else {
0331         emtfnMasked.set(i - 6, maskedEmtfInputs[i] > 0);
0332       }
0333     }
0334     m_params_helper.setMaskedEmtfpInputs(emtfpMasked);
0335     m_params_helper.setMaskedEmtfnInputs(emtfnMasked);
0336   }
0337 
0338   // temp hack to avoid ALCA/DB signoff:
0339   m_params = cast_to_L1TMuonGlobalParams((L1TMuonGlobalParams_PUBLIC)m_params_helper);
0340 }
0341 
0342 L1TMuonGlobalParamsESProducer::~L1TMuonGlobalParamsESProducer() {}
0343 
0344 //
0345 // member functions
0346 //
0347 
0348 // ------------ method called to produce the data  ------------
0349 L1TMuonGlobalParamsESProducer::ReturnType L1TMuonGlobalParamsESProducer::produce(const L1TMuonGlobalParamsRcd& iRecord) {
0350   return std::make_unique<L1TMuonGlobalParams>(m_params);
0351 }
0352 
0353 //define this as a plug-in
0354 DEFINE_FWK_EVENTSETUP_MODULE(L1TMuonGlobalParamsESProducer);