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
34  m_alct_fifo_tbins = alctParams.getParameter<unsigned int>("alctFifoTbins");
35  m_alct_fifo_pretrig = alctParams.getParameter<unsigned int>("alctFifoPretrig");
36  m_alct_drift_delay = alctParams.getParameter<unsigned int>("alctDriftDelay");
37  m_alct_nplanes_hit_pretrig = alctParams.getParameter<unsigned int>("alctNplanesHitPretrig");
38  m_alct_nplanes_hit_pattern = alctParams.getParameter<unsigned int>("alctNplanesHitPattern");
39  m_alct_nplanes_hit_accel_pretrig = alctParams.getParameter<unsigned int>("alctNplanesHitAccelPretrig");
40  m_alct_nplanes_hit_accel_pattern = alctParams.getParameter<unsigned int>("alctNplanesHitAccelPattern");
41  m_alct_trig_mode = alctParams.getParameter<unsigned int>("alctTrigMode");
42  m_alct_accel_mode = alctParams.getParameter<unsigned int>("alctAccelMode");
43  m_alct_l1a_window_width = alctParams.getParameter<unsigned int>("alctL1aWindowWidth");
44 
45  // get CLCT parameters from the config file
47  m_clct_fifo_tbins = clctParams.getParameter<unsigned int>("clctFifoTbins");
48  m_clct_fifo_pretrig = clctParams.getParameter<unsigned int>("clctFifoPretrig");
49  m_clct_hit_persist = clctParams.getParameter<unsigned int>("clctHitPersist");
50  m_clct_drift_delay = clctParams.getParameter<unsigned int>("clctDriftDelay");
51  m_clct_nplanes_hit_pretrig = clctParams.getParameter<unsigned int>("clctNplanesHitPretrig");
52  m_clct_nplanes_hit_pattern = clctParams.getParameter<unsigned int>("clctNplanesHitPattern");
53  m_clct_pid_thresh_pretrig = clctParams.getParameter<unsigned int>("clctPidThreshPretrig");
54  m_clct_min_separation = clctParams.getParameter<unsigned int>("clctMinSeparation");
55 
56  // get TMB parameters from the config file
58  m_tmb_mpc_block_me1a = tmbParams.getParameter<unsigned int>("tmbMpcBlockMe1a");
59  m_tmb_alct_trig_enable = tmbParams.getParameter<unsigned int>("tmbAlctTrigEnable");
60  m_tmb_clct_trig_enable = tmbParams.getParameter<unsigned int>("tmbClctTrigEnable");
61  m_tmb_match_trig_enable = tmbParams.getParameter<unsigned int>("tmbMatchTrigEnable");
62  m_tmb_match_trig_window_size = tmbParams.getParameter<unsigned int>("tmbMatchTrigWindowSize");
63  m_tmb_tmb_l1a_window_size = tmbParams.getParameter<unsigned int>("tmbTmbL1aWindowSize");
64 }
65 
66 //----------------
67 // Destructors --
68 //----------------
69 
71 
72 //------------------
73 // Member functions
74 //------------------
75 
76 // ------------ method called to produce the data ------------
77 std::unique_ptr<CSCDBL1TPParameters> L1CSCTriggerPrimitivesConfigProducer::produce(
78  const CSCDBL1TPParametersRcd& iRecord) {
79  using namespace edm::es;
80  //std::shared_ptr<L1CSCTriggerPrimitivesConfigProducer> pL1CSCTPConfigProducer;
81 
82  // Create empty collection of CSCTPParameters.
83  auto pL1CSCTPParams = std::make_unique<CSCDBL1TPParameters>();
84 
85  // Set ALCT parameters.
86  pL1CSCTPParams->setAlctFifoTbins(m_alct_fifo_tbins);
87  pL1CSCTPParams->setAlctFifoPretrig(m_alct_fifo_pretrig);
88  pL1CSCTPParams->setAlctDriftDelay(m_alct_drift_delay);
89  pL1CSCTPParams->setAlctNplanesHitPretrig(m_alct_nplanes_hit_pretrig);
90  pL1CSCTPParams->setAlctNplanesHitPattern(m_alct_nplanes_hit_pattern);
91  pL1CSCTPParams->setAlctNplanesHitAccelPretrig(m_alct_nplanes_hit_accel_pretrig);
92  pL1CSCTPParams->setAlctNplanesHitAccelPattern(m_alct_nplanes_hit_accel_pattern);
93  pL1CSCTPParams->setAlctTrigMode(m_alct_trig_mode);
94  pL1CSCTPParams->setAlctAccelMode(m_alct_accel_mode);
95  pL1CSCTPParams->setAlctL1aWindowWidth(m_alct_l1a_window_width);
96 
97  // Set CLCT parameters.
98  pL1CSCTPParams->setClctFifoTbins(m_clct_fifo_tbins);
99  pL1CSCTPParams->setClctFifoPretrig(m_clct_fifo_pretrig);
100  pL1CSCTPParams->setClctHitPersist(m_clct_hit_persist);
101  pL1CSCTPParams->setClctDriftDelay(m_clct_drift_delay);
102  pL1CSCTPParams->setClctNplanesHitPretrig(m_clct_nplanes_hit_pretrig);
103  pL1CSCTPParams->setClctNplanesHitPattern(m_clct_nplanes_hit_pattern);
104  pL1CSCTPParams->setClctPidThreshPretrig(m_clct_pid_thresh_pretrig);
105  pL1CSCTPParams->setClctMinSeparation(m_clct_min_separation);
106 
107  // Set TMB parameters.
108  pL1CSCTPParams->setTmbMpcBlockMe1a(m_tmb_mpc_block_me1a);
109  pL1CSCTPParams->setTmbAlctTrigEnable(m_tmb_alct_trig_enable);
110  pL1CSCTPParams->setTmbClctTrigEnable(m_tmb_clct_trig_enable);
111  pL1CSCTPParams->setTmbMatchTrigEnable(m_tmb_match_trig_enable);
112  pL1CSCTPParams->setTmbMatchTrigWindowSize(m_tmb_match_trig_window_size);
113  pL1CSCTPParams->setTmbTmbL1aWindowSize(m_tmb_tmb_l1a_window_size);
114 
115  //return pL1CSCTPProducer;
116  return pL1CSCTPParams;
117 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:165
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< CSCDBL1TPParameters > produce(const CSCDBL1TPParametersRcd &)