Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:56:41

0001 //-------------------------------------------------
0002 //
0003 //   \class L1MuGMTParametersProducer
0004 //
0005 //   Description:  A class to produce the L1 GMT emulator Parameters record in the event setup
0006 //
0007 //
0008 //   Author :
0009 //   I. Mikulec
0010 //
0011 //--------------------------------------------------
0012 #include "L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersProducer.h"
0013 
0014 L1MuGMTParametersProducer::L1MuGMTParametersProducer(const edm::ParameterSet& ps) {
0015   m_ps = new edm::ParameterSet(ps);
0016   setWhatProduced(this, &L1MuGMTParametersProducer::produceL1MuGMTParameters);
0017   setWhatProduced(this, &L1MuGMTParametersProducer::produceL1MuGMTChannelMask);
0018 }
0019 
0020 L1MuGMTParametersProducer::~L1MuGMTParametersProducer() { delete m_ps; }
0021 
0022 //
0023 // member functions
0024 //
0025 
0026 // ------------ methods called to produce the data  ------------
0027 std::unique_ptr<L1MuGMTParameters> L1MuGMTParametersProducer::produceL1MuGMTParameters(
0028     const L1MuGMTParametersRcd& iRecord) {
0029   auto gmtparams = std::make_unique<L1MuGMTParameters>();
0030 
0031   gmtparams->setEtaWeight_barrel(m_ps->getParameter<double>("EtaWeight_barrel"));
0032   gmtparams->setPhiWeight_barrel(m_ps->getParameter<double>("PhiWeight_barrel"));
0033   gmtparams->setEtaPhiThreshold_barrel(m_ps->getParameter<double>("EtaPhiThreshold_barrel"));
0034   gmtparams->setEtaWeight_endcap(m_ps->getParameter<double>("EtaWeight_endcap"));
0035   gmtparams->setPhiWeight_endcap(m_ps->getParameter<double>("PhiWeight_endcap"));
0036   gmtparams->setEtaPhiThreshold_endcap(m_ps->getParameter<double>("EtaPhiThreshold_endcap"));
0037   gmtparams->setEtaWeight_COU(m_ps->getParameter<double>("EtaWeight_COU"));
0038   gmtparams->setPhiWeight_COU(m_ps->getParameter<double>("PhiWeight_COU"));
0039   gmtparams->setEtaPhiThreshold_COU(m_ps->getParameter<double>("EtaPhiThreshold_COU"));
0040   gmtparams->setCaloTrigger(m_ps->getParameter<bool>("CaloTrigger"));
0041   gmtparams->setIsolationCellSizeEta(m_ps->getParameter<int>("IsolationCellSizeEta"));
0042   gmtparams->setIsolationCellSizePhi(m_ps->getParameter<int>("IsolationCellSizePhi"));
0043   gmtparams->setDoOvlRpcAnd(m_ps->getParameter<bool>("DoOvlRpcAnd"));
0044   gmtparams->setPropagatePhi(m_ps->getParameter<bool>("PropagatePhi"));
0045   gmtparams->setMergeMethodPhiBrl(m_ps->getParameter<std::string>("MergeMethodPhiBrl"));
0046   gmtparams->setMergeMethodPhiFwd(m_ps->getParameter<std::string>("MergeMethodPhiFwd"));
0047   gmtparams->setMergeMethodEtaBrl(m_ps->getParameter<std::string>("MergeMethodEtaBrl"));
0048   gmtparams->setMergeMethodEtaFwd(m_ps->getParameter<std::string>("MergeMethodEtaFwd"));
0049   gmtparams->setMergeMethodPtBrl(m_ps->getParameter<std::string>("MergeMethodPtBrl"));
0050   gmtparams->setMergeMethodPtFwd(m_ps->getParameter<std::string>("MergeMethodPtFwd"));
0051   gmtparams->setMergeMethodChargeBrl(m_ps->getParameter<std::string>("MergeMethodChargeBrl"));
0052   gmtparams->setMergeMethodChargeFwd(m_ps->getParameter<std::string>("MergeMethodChargeFwd"));
0053   gmtparams->setMergeMethodMIPBrl(m_ps->getParameter<std::string>("MergeMethodMIPBrl"));
0054   gmtparams->setMergeMethodMIPFwd(m_ps->getParameter<std::string>("MergeMethodMIPFwd"));
0055   gmtparams->setMergeMethodMIPSpecialUseANDBrl(m_ps->getParameter<bool>("MergeMethodMIPSpecialUseANDBrl"));
0056   gmtparams->setMergeMethodMIPSpecialUseANDFwd(m_ps->getParameter<bool>("MergeMethodMIPSpecialUseANDFwd"));
0057   gmtparams->setMergeMethodISOBrl(m_ps->getParameter<std::string>("MergeMethodISOBrl"));
0058   gmtparams->setMergeMethodISOFwd(m_ps->getParameter<std::string>("MergeMethodISOFwd"));
0059   gmtparams->setMergeMethodISOSpecialUseANDBrl(m_ps->getParameter<bool>("MergeMethodISOSpecialUseANDBrl"));
0060   gmtparams->setMergeMethodISOSpecialUseANDFwd(m_ps->getParameter<bool>("MergeMethodISOSpecialUseANDFwd"));
0061   gmtparams->setMergeMethodSRKBrl(m_ps->getParameter<std::string>("MergeMethodSRKBrl"));
0062   gmtparams->setMergeMethodSRKFwd(m_ps->getParameter<std::string>("MergeMethodSRKFwd"));
0063   gmtparams->setHaloOverwritesMatchedBrl(m_ps->getParameter<bool>("HaloOverwritesMatchedBrl"));
0064   gmtparams->setHaloOverwritesMatchedFwd(m_ps->getParameter<bool>("HaloOverwritesMatchedFwd"));
0065   gmtparams->setSortRankOffsetBrl(m_ps->getParameter<unsigned>("SortRankOffsetBrl"));
0066   gmtparams->setSortRankOffsetFwd(m_ps->getParameter<unsigned>("SortRankOffsetFwd"));
0067   gmtparams->setCDLConfigWordDTCSC(m_ps->getParameter<unsigned>("CDLConfigWordDTCSC"));
0068   gmtparams->setCDLConfigWordCSCDT(m_ps->getParameter<unsigned>("CDLConfigWordCSCDT"));
0069   gmtparams->setCDLConfigWordbRPCCSC(m_ps->getParameter<unsigned>("CDLConfigWordbRPCCSC"));
0070   gmtparams->setCDLConfigWordfRPCDT(m_ps->getParameter<unsigned>("CDLConfigWordfRPCDT"));
0071   gmtparams->setVersionSortRankEtaQLUT(m_ps->getParameter<unsigned>("VersionSortRankEtaQLUT"));
0072   gmtparams->setVersionLUTs(m_ps->getParameter<unsigned>("VersionLUTs"));
0073 
0074   return gmtparams;
0075 }
0076 
0077 std::unique_ptr<L1MuGMTChannelMask> L1MuGMTParametersProducer::produceL1MuGMTChannelMask(
0078     const L1MuGMTChannelMaskRcd& iRecord) {
0079   auto gmtchanmask = std::make_unique<L1MuGMTChannelMask>();
0080 
0081   gmtchanmask->setSubsystemMask(m_ps->getParameter<unsigned>("SubsystemMask"));
0082 
0083   return gmtchanmask;
0084 }