File indexing completed on 2024-04-06 12:22:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <L1TriggerConfig/L1CSCTPConfigProducers/src/L1CSCTriggerPrimitivesConfigProducer.h>
0012
0013 #include "CondFormats/CSCObjects/interface/CSCDBL1TPParameters.h"
0014 #include "CondFormats/DataRecord/interface/CSCDBL1TPParametersRcd.h"
0015
0016
0017
0018
0019
0020 L1CSCTriggerPrimitivesConfigProducer::L1CSCTriggerPrimitivesConfigProducer(const edm::ParameterSet& iConfig) {
0021
0022
0023 setWhatProduced(this);
0024
0025
0026
0027 std::string alctParamSet, clctParamSet, tmbParamSet;
0028 alctParamSet = "alctParam";
0029 clctParamSet = "clctParam";
0030 tmbParamSet = "tmbParam";
0031
0032
0033 edm::ParameterSet alctParams = iConfig.getParameter<edm::ParameterSet>(alctParamSet);
0034 m_alct_fifo_tbins = alctParams.getParameter<unsigned int>("alctFifoTbins");
0035 m_alct_fifo_pretrig = alctParams.getParameter<unsigned int>("alctFifoPretrig");
0036 m_alct_drift_delay = alctParams.getParameter<unsigned int>("alctDriftDelay");
0037 m_alct_nplanes_hit_pretrig = alctParams.getParameter<unsigned int>("alctNplanesHitPretrig");
0038 m_alct_nplanes_hit_pattern = alctParams.getParameter<unsigned int>("alctNplanesHitPattern");
0039 m_alct_nplanes_hit_accel_pretrig = alctParams.getParameter<unsigned int>("alctNplanesHitAccelPretrig");
0040 m_alct_nplanes_hit_accel_pattern = alctParams.getParameter<unsigned int>("alctNplanesHitAccelPattern");
0041 m_alct_trig_mode = alctParams.getParameter<unsigned int>("alctTrigMode");
0042 m_alct_accel_mode = alctParams.getParameter<unsigned int>("alctAccelMode");
0043 m_alct_l1a_window_width = alctParams.getParameter<unsigned int>("alctL1aWindowWidth");
0044
0045
0046 edm::ParameterSet clctParams = iConfig.getParameter<edm::ParameterSet>(clctParamSet);
0047 m_clct_fifo_tbins = clctParams.getParameter<unsigned int>("clctFifoTbins");
0048 m_clct_fifo_pretrig = clctParams.getParameter<unsigned int>("clctFifoPretrig");
0049 m_clct_hit_persist = clctParams.getParameter<unsigned int>("clctHitPersist");
0050 m_clct_drift_delay = clctParams.getParameter<unsigned int>("clctDriftDelay");
0051 m_clct_nplanes_hit_pretrig = clctParams.getParameter<unsigned int>("clctNplanesHitPretrig");
0052 m_clct_nplanes_hit_pattern = clctParams.getParameter<unsigned int>("clctNplanesHitPattern");
0053 m_clct_pid_thresh_pretrig = clctParams.getParameter<unsigned int>("clctPidThreshPretrig");
0054 m_clct_min_separation = clctParams.getParameter<unsigned int>("clctMinSeparation");
0055
0056
0057 edm::ParameterSet tmbParams = iConfig.getParameter<edm::ParameterSet>(tmbParamSet);
0058 m_tmb_mpc_block_me1a = tmbParams.getParameter<unsigned int>("tmbMpcBlockMe1a");
0059 m_tmb_alct_trig_enable = tmbParams.getParameter<unsigned int>("tmbAlctTrigEnable");
0060 m_tmb_clct_trig_enable = tmbParams.getParameter<unsigned int>("tmbClctTrigEnable");
0061 m_tmb_match_trig_enable = tmbParams.getParameter<unsigned int>("tmbMatchTrigEnable");
0062 m_tmb_match_trig_window_size = tmbParams.getParameter<unsigned int>("tmbMatchTrigWindowSize");
0063 m_tmb_tmb_l1a_window_size = tmbParams.getParameter<unsigned int>("tmbTmbL1aWindowSize");
0064 }
0065
0066
0067
0068
0069
0070 L1CSCTriggerPrimitivesConfigProducer::~L1CSCTriggerPrimitivesConfigProducer() {}
0071
0072
0073
0074
0075
0076
0077 std::unique_ptr<CSCDBL1TPParameters> L1CSCTriggerPrimitivesConfigProducer::produce(
0078 const CSCDBL1TPParametersRcd& iRecord) {
0079 using namespace edm::es;
0080
0081
0082
0083 auto pL1CSCTPParams = std::make_unique<CSCDBL1TPParameters>();
0084
0085
0086 pL1CSCTPParams->setAlctFifoTbins(m_alct_fifo_tbins);
0087 pL1CSCTPParams->setAlctFifoPretrig(m_alct_fifo_pretrig);
0088 pL1CSCTPParams->setAlctDriftDelay(m_alct_drift_delay);
0089 pL1CSCTPParams->setAlctNplanesHitPretrig(m_alct_nplanes_hit_pretrig);
0090 pL1CSCTPParams->setAlctNplanesHitPattern(m_alct_nplanes_hit_pattern);
0091 pL1CSCTPParams->setAlctNplanesHitAccelPretrig(m_alct_nplanes_hit_accel_pretrig);
0092 pL1CSCTPParams->setAlctNplanesHitAccelPattern(m_alct_nplanes_hit_accel_pattern);
0093 pL1CSCTPParams->setAlctTrigMode(m_alct_trig_mode);
0094 pL1CSCTPParams->setAlctAccelMode(m_alct_accel_mode);
0095 pL1CSCTPParams->setAlctL1aWindowWidth(m_alct_l1a_window_width);
0096
0097
0098 pL1CSCTPParams->setClctFifoTbins(m_clct_fifo_tbins);
0099 pL1CSCTPParams->setClctFifoPretrig(m_clct_fifo_pretrig);
0100 pL1CSCTPParams->setClctHitPersist(m_clct_hit_persist);
0101 pL1CSCTPParams->setClctDriftDelay(m_clct_drift_delay);
0102 pL1CSCTPParams->setClctNplanesHitPretrig(m_clct_nplanes_hit_pretrig);
0103 pL1CSCTPParams->setClctNplanesHitPattern(m_clct_nplanes_hit_pattern);
0104 pL1CSCTPParams->setClctPidThreshPretrig(m_clct_pid_thresh_pretrig);
0105 pL1CSCTPParams->setClctMinSeparation(m_clct_min_separation);
0106
0107
0108 pL1CSCTPParams->setTmbMpcBlockMe1a(m_tmb_mpc_block_me1a);
0109 pL1CSCTPParams->setTmbAlctTrigEnable(m_tmb_alct_trig_enable);
0110 pL1CSCTPParams->setTmbClctTrigEnable(m_tmb_clct_trig_enable);
0111 pL1CSCTPParams->setTmbMatchTrigEnable(m_tmb_match_trig_enable);
0112 pL1CSCTPParams->setTmbMatchTrigWindowSize(m_tmb_match_trig_window_size);
0113 pL1CSCTPParams->setTmbTmbL1aWindowSize(m_tmb_tmb_l1a_window_size);
0114
0115
0116 return pL1CSCTPParams;
0117 }