CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  bool isMTCC = iConfig.getParameter<bool>("isMTCC");
29  bool isTMB07 = iConfig.getParameter<bool>("isTMB07");
30  if (isMTCC) {
31  alctParamSet = "alctParamMTCC2";
32  clctParamSet = "clctParamMTCC2";
33  }
34  else if (isTMB07) {
35  alctParamSet = "alctParamMTCC2";
36  clctParamSet = "clctParam";
37  }
38  else {
39  alctParamSet = "alctParam";
40  clctParamSet = "clctParam";
41  }
42  tmbParamSet = "tmbParam";
43 
44  // get ALCT parameters from the config file
45  edm::ParameterSet alctParams =
46  iConfig.getParameter<edm::ParameterSet>(alctParamSet);
48  alctParams.getParameter<unsigned int>("alctFifoTbins");
50  alctParams.getParameter<unsigned int>("alctFifoPretrig");
52  alctParams.getParameter<unsigned int>("alctDriftDelay");
54  alctParams.getParameter<unsigned int>("alctNplanesHitPretrig");
56  alctParams.getParameter<unsigned int>("alctNplanesHitPattern");
58  alctParams.getParameter<unsigned int>("alctNplanesHitAccelPretrig");
60  alctParams.getParameter<unsigned int>("alctNplanesHitAccelPattern");
62  alctParams.getParameter<unsigned int>("alctTrigMode");
64  alctParams.getParameter<unsigned int>("alctAccelMode");
66  alctParams.getParameter<unsigned int>("alctL1aWindowWidth");
67 
68  // get CLCT parameters from the config file
69  edm::ParameterSet clctParams =
70  iConfig.getParameter<edm::ParameterSet>(clctParamSet);
72  clctParams.getParameter<unsigned int>("clctFifoTbins");
74  clctParams.getParameter<unsigned int>("clctFifoPretrig");
76  clctParams.getParameter<unsigned int>("clctHitPersist");
78  clctParams.getParameter<unsigned int>("clctDriftDelay");
80  clctParams.getParameter<unsigned int>("clctNplanesHitPretrig");
82  clctParams.getParameter<unsigned int>("clctNplanesHitPattern");
84  clctParams.getParameter<unsigned int>("clctPidThreshPretrig");
86  clctParams.getParameter<unsigned int>("clctMinSeparation");
87 
88  // get TMB parameters from the config file
89  edm::ParameterSet tmbParams =
90  iConfig.getParameter<edm::ParameterSet>(tmbParamSet);
92  tmbParams.getParameter<unsigned int>("tmbMpcBlockMe1a");
94  tmbParams.getParameter<unsigned int>("tmbAlctTrigEnable");
96  tmbParams.getParameter<unsigned int>("tmbClctTrigEnable");
98  tmbParams.getParameter<unsigned int>("tmbMatchTrigEnable");
100  tmbParams.getParameter<unsigned int>("tmbMatchTrigWindowSize");
102  tmbParams.getParameter<unsigned int>("tmbTmbL1aWindowSize");
103 }
104 
105 //----------------
106 // Destructors --
107 //----------------
108 
110 }
111 
112 //------------------
113 // Member functions
114 //------------------
115 
116 // ------------ method called to produce the data ------------
117 std::auto_ptr<CSCDBL1TPParameters>
119  using namespace edm::es;
120  //boost::shared_ptr<L1CSCTriggerPrimitivesConfigProducer> pL1CSCTPConfigProducer;
121 
122  // Create empty collection of CSCTPParameters.
123  std::auto_ptr<CSCDBL1TPParameters> pL1CSCTPParams(new CSCDBL1TPParameters);
124 
125  // Set ALCT parameters.
126  pL1CSCTPParams->setAlctFifoTbins(m_alct_fifo_tbins);
127  pL1CSCTPParams->setAlctFifoPretrig(m_alct_fifo_pretrig);
128  pL1CSCTPParams->setAlctDriftDelay(m_alct_drift_delay);
129  pL1CSCTPParams->setAlctNplanesHitPretrig(m_alct_nplanes_hit_pretrig);
130  pL1CSCTPParams->setAlctNplanesHitPattern(m_alct_nplanes_hit_pattern);
131  pL1CSCTPParams->setAlctNplanesHitAccelPretrig(m_alct_nplanes_hit_accel_pretrig);
132  pL1CSCTPParams->setAlctNplanesHitAccelPattern(m_alct_nplanes_hit_accel_pattern);
133  pL1CSCTPParams->setAlctTrigMode(m_alct_trig_mode);
134  pL1CSCTPParams->setAlctAccelMode(m_alct_accel_mode);
135  pL1CSCTPParams->setAlctL1aWindowWidth(m_alct_l1a_window_width);
136 
137  // Set CLCT parameters.
138  pL1CSCTPParams->setClctFifoTbins(m_clct_fifo_tbins);
139  pL1CSCTPParams->setClctFifoPretrig(m_clct_fifo_pretrig);
140  pL1CSCTPParams->setClctHitPersist(m_clct_hit_persist);
141  pL1CSCTPParams->setClctDriftDelay(m_clct_drift_delay);
142  pL1CSCTPParams->setClctNplanesHitPretrig(m_clct_nplanes_hit_pretrig);
143  pL1CSCTPParams->setClctNplanesHitPattern(m_clct_nplanes_hit_pattern);
144  pL1CSCTPParams->setClctPidThreshPretrig(m_clct_pid_thresh_pretrig);
145  pL1CSCTPParams->setClctMinSeparation(m_clct_min_separation);
146 
147  // Set TMB parameters.
148  pL1CSCTPParams->setTmbMpcBlockMe1a(m_tmb_mpc_block_me1a);
149  pL1CSCTPParams->setTmbAlctTrigEnable(m_tmb_alct_trig_enable);
150  pL1CSCTPParams->setTmbClctTrigEnable(m_tmb_clct_trig_enable);
151  pL1CSCTPParams->setTmbMatchTrigEnable(m_tmb_match_trig_enable);
152  pL1CSCTPParams->setTmbMatchTrigWindowSize(m_tmb_match_trig_window_size);
153  pL1CSCTPParams->setTmbTmbL1aWindowSize(m_tmb_tmb_l1a_window_size);
154 
155  //return pL1CSCTPProducer;
156  return pL1CSCTPParams;
157 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::auto_ptr< CSCDBL1TPParameters > produce(const CSCDBL1TPParametersRcd &)