CMS 3D CMS Logo

L1CSCTriggerPrimitivesConfigProducer.cc
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // Class: L1CSCTriggerPrimitivesConfigProducer
4 //
5 // Description:
6 //
7 // Author: Slava Valuev
8 //
9 //-----------------------------------------------------------------------------
10 
12 
15 
16 //----------------
17 // Constructors --
18 //----------------
19 
21  // the following line is needed to tell the framework what
22  // data is being produced
23  setWhatProduced(this);
24 
25  // Decide on which of the two sets of parameters will be used.
26  // (Temporary substitute for the IOV.)
27  std::string alctParamSet, clctParamSet, tmbParamSet;
28  alctParamSet = "alctParam";
29  clctParamSet = "clctParam";
30  tmbParamSet = "tmbParam";
31 
32  // get ALCT parameters from the config file
33  edm::ParameterSet alctParams =
34  iConfig.getParameter<edm::ParameterSet>(alctParamSet);
36  alctParams.getParameter<unsigned int>("alctFifoTbins");
38  alctParams.getParameter<unsigned int>("alctFifoPretrig");
40  alctParams.getParameter<unsigned int>("alctDriftDelay");
42  alctParams.getParameter<unsigned int>("alctNplanesHitPretrig");
44  alctParams.getParameter<unsigned int>("alctNplanesHitPattern");
46  alctParams.getParameter<unsigned int>("alctNplanesHitAccelPretrig");
48  alctParams.getParameter<unsigned int>("alctNplanesHitAccelPattern");
50  alctParams.getParameter<unsigned int>("alctTrigMode");
52  alctParams.getParameter<unsigned int>("alctAccelMode");
54  alctParams.getParameter<unsigned int>("alctL1aWindowWidth");
55 
56  // get CLCT parameters from the config file
57  edm::ParameterSet clctParams =
58  iConfig.getParameter<edm::ParameterSet>(clctParamSet);
60  clctParams.getParameter<unsigned int>("clctFifoTbins");
62  clctParams.getParameter<unsigned int>("clctFifoPretrig");
64  clctParams.getParameter<unsigned int>("clctHitPersist");
66  clctParams.getParameter<unsigned int>("clctDriftDelay");
68  clctParams.getParameter<unsigned int>("clctNplanesHitPretrig");
70  clctParams.getParameter<unsigned int>("clctNplanesHitPattern");
72  clctParams.getParameter<unsigned int>("clctPidThreshPretrig");
74  clctParams.getParameter<unsigned int>("clctMinSeparation");
75 
76  // get TMB parameters from the config file
77  edm::ParameterSet tmbParams =
78  iConfig.getParameter<edm::ParameterSet>(tmbParamSet);
80  tmbParams.getParameter<unsigned int>("tmbMpcBlockMe1a");
82  tmbParams.getParameter<unsigned int>("tmbAlctTrigEnable");
84  tmbParams.getParameter<unsigned int>("tmbClctTrigEnable");
86  tmbParams.getParameter<unsigned int>("tmbMatchTrigEnable");
88  tmbParams.getParameter<unsigned int>("tmbMatchTrigWindowSize");
90  tmbParams.getParameter<unsigned int>("tmbTmbL1aWindowSize");
91 }
92 
93 //----------------
94 // Destructors --
95 //----------------
96 
98 }
99 
100 //------------------
101 // Member functions
102 //------------------
103 
104 // ------------ method called to produce the data ------------
105 std::unique_ptr<CSCDBL1TPParameters>
107  using namespace edm::es;
108  //std::shared_ptr<L1CSCTriggerPrimitivesConfigProducer> pL1CSCTPConfigProducer;
109 
110  // Create empty collection of CSCTPParameters.
111  auto pL1CSCTPParams = std::make_unique<CSCDBL1TPParameters>();
112 
113  // Set ALCT parameters.
114  pL1CSCTPParams->setAlctFifoTbins(m_alct_fifo_tbins);
115  pL1CSCTPParams->setAlctFifoPretrig(m_alct_fifo_pretrig);
116  pL1CSCTPParams->setAlctDriftDelay(m_alct_drift_delay);
117  pL1CSCTPParams->setAlctNplanesHitPretrig(m_alct_nplanes_hit_pretrig);
118  pL1CSCTPParams->setAlctNplanesHitPattern(m_alct_nplanes_hit_pattern);
119  pL1CSCTPParams->setAlctNplanesHitAccelPretrig(m_alct_nplanes_hit_accel_pretrig);
120  pL1CSCTPParams->setAlctNplanesHitAccelPattern(m_alct_nplanes_hit_accel_pattern);
121  pL1CSCTPParams->setAlctTrigMode(m_alct_trig_mode);
122  pL1CSCTPParams->setAlctAccelMode(m_alct_accel_mode);
123  pL1CSCTPParams->setAlctL1aWindowWidth(m_alct_l1a_window_width);
124 
125  // Set CLCT parameters.
126  pL1CSCTPParams->setClctFifoTbins(m_clct_fifo_tbins);
127  pL1CSCTPParams->setClctFifoPretrig(m_clct_fifo_pretrig);
128  pL1CSCTPParams->setClctHitPersist(m_clct_hit_persist);
129  pL1CSCTPParams->setClctDriftDelay(m_clct_drift_delay);
130  pL1CSCTPParams->setClctNplanesHitPretrig(m_clct_nplanes_hit_pretrig);
131  pL1CSCTPParams->setClctNplanesHitPattern(m_clct_nplanes_hit_pattern);
132  pL1CSCTPParams->setClctPidThreshPretrig(m_clct_pid_thresh_pretrig);
133  pL1CSCTPParams->setClctMinSeparation(m_clct_min_separation);
134 
135  // Set TMB parameters.
136  pL1CSCTPParams->setTmbMpcBlockMe1a(m_tmb_mpc_block_me1a);
137  pL1CSCTPParams->setTmbAlctTrigEnable(m_tmb_alct_trig_enable);
138  pL1CSCTPParams->setTmbClctTrigEnable(m_tmb_clct_trig_enable);
139  pL1CSCTPParams->setTmbMatchTrigEnable(m_tmb_match_trig_enable);
140  pL1CSCTPParams->setTmbMatchTrigWindowSize(m_tmb_match_trig_window_size);
141  pL1CSCTPParams->setTmbTmbL1aWindowSize(m_tmb_tmb_l1a_window_size);
142 
143  //return pL1CSCTPProducer;
144  return pL1CSCTPParams;
145 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::unique_ptr< CSCDBL1TPParameters > produce(const CSCDBL1TPParametersRcd &)