CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions
L1RCTParametersOnlineProd Class Reference
Inheritance diagram for L1RCTParametersOnlineProd:
L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

void fillScaleFactors (const l1t::OMDSReader::QueryResults &results, std::vector< double > &output, int nfactor=1)
 
 L1RCTParametersOnlineProd (const edm::ParameterSet &)
 
std::unique_ptr< L1RCTParametersnewObject (const std::string &objectKey) override
 
 ~L1RCTParametersOnlineProd () override
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::unique_ptr< L1RCTParametersproduce (const L1RCTParametersRcd &iRecord)
 
 ~L1ConfigOnlineProdBase () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters >
bool getObjectKey (const L1RCTParametersRcd &record, std::string &objectKey)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Attributes inherited from L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters >
bool m_copyFromCondDB
 
cond::persistency::Session m_dbSession
 
bool m_forceGeneration
 
l1t::OMDSReader m_omdsReader
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 34 of file L1RCTParametersOnlineProd.cc.

Constructor & Destructor Documentation

◆ L1RCTParametersOnlineProd()

L1RCTParametersOnlineProd::L1RCTParametersOnlineProd ( const edm::ParameterSet iConfig)

Definition at line 63 of file L1RCTParametersOnlineProd.cc.

65  //the following line is needed to tell the framework what
66  // data is being produced
67 
68  //now do what ever other initialization is needed
69 }

◆ ~L1RCTParametersOnlineProd()

L1RCTParametersOnlineProd::~L1RCTParametersOnlineProd ( )
override

Definition at line 71 of file L1RCTParametersOnlineProd.cc.

71  {
72  // do anything here that needs to be done at desctruction time
73  // (e.g. close files, deallocate resources etc.)
74 }

Member Function Documentation

◆ fillScaleFactors()

void L1RCTParametersOnlineProd::fillScaleFactors ( const l1t::OMDSReader::QueryResults results,
std::vector< double > &  output,
int  nfactor = 1 
)

Definition at line 428 of file L1RCTParametersOnlineProd.cc.

430  {
431  if ((nfactors < 1) || (nfactors > 6)) {
432  edm::LogError("L1-O2O") << "invalid number of factors in scale factors fill";
433  return;
434  }
435 
436  std::vector<std::string> scaleFactorQuery6Strings;
437  scaleFactorQuery6Strings.push_back("SCALEFACTOR");
438  scaleFactorQuery6Strings.push_back("SF2");
439  scaleFactorQuery6Strings.push_back("SF3");
440  scaleFactorQuery6Strings.push_back("SF4");
441  scaleFactorQuery6Strings.push_back("SF5");
442  scaleFactorQuery6Strings.push_back("SF6");
443  // Store scale factors in temporary array to get ordering right.
444  // Reserve space for 100 bins.
445 
446  // static const int reserve = 100 ;
447  std::vector<double> sfTmp[100];
448  /*
449  for( int i = 0 ; i < reserve ; ++i )
450  {
451  sfTmp[ i ] = 0. ;
452  }
453  */
454  short maxBin = 0;
455  for (int i = 0; i < results.numberRows(); ++i) {
456  double sf[6];
457  for (int nf = 0; nf < nfactors; nf++) {
458  results.fillVariableFromRow(scaleFactorQuery6Strings.at(nf), i, sf[nf]);
459  }
460  short ieta = 0;
461  results.fillVariableFromRow("FK_RCT_ETA", i, ieta);
462 
463  for (int nf = 0; nf < nfactors; nf++)
464  // sfTmp[ ieta-1 ] = sf ; // eta bins start at 1.
465  sfTmp[ieta - 1].push_back(sf[nf]);
466 
467  if (ieta > maxBin) {
468  maxBin = ieta;
469  }
470  }
471 
472  for (short i = 0; i < maxBin; ++i) {
473  for (short nf = 0; nf < nfactors; nf++)
474  output.push_back(sfTmp[i].at(nf));
475  }
476 }

References mps_fire::i, LEDCalibrationChannels::ieta, cms::cuda::allocator::maxBin, convertSQLitetoXML_cfg::output, and bookConverter::results.

Referenced by newObject().

◆ newObject()

std::unique_ptr< L1RCTParameters > L1RCTParametersOnlineProd::newObject ( const std::string &  objectKey)
overridevirtual

Implements L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters >.

Definition at line 76 of file L1RCTParametersOnlineProd.cc.

76  {
77  std::string rctSchema = "CMS_RCT";
78  const l1t::OMDSReader::QueryResults paremKeyResults = m_omdsReader.singleAttribute(objectKey);
79 
80  // ~~~~~~~~~ Cut values ~~~~~~~~~
81 
82  // select egamma_lsb, jetmet_lsb, e_min_for_fg_cut, e_max_for_fg_cut,
83  // h_ove r_e_cut, e_min_for_h_over_e_cut, e_max_for_h_over_e_cut,
84  // h_min_for_h_over_e_cut, e_activity_cut, h_activity_cut,
85  // eic_isolation_threshold, jsc_quiet_threshold_barrel,
86  // jsc_quiet_threshold_endcap, noisevetohb, noisevetoheplus,
87  // noisevetoheminus from parem_conf where parem_conf.parem_key =
88  // (select rct_parameter from rct_conf where rct_conf.rct_key =
89  // 'rct_cmssw_def');
90 
91  std::vector<std::string> queryStrings;
92  queryStrings.push_back("EGAMMA_LSB");
93  queryStrings.push_back("JETMET_LSB");
94  queryStrings.push_back("E_MIN_FOR_FG_CUT");
95  queryStrings.push_back("E_MAX_FOR_FG_CUT");
96  queryStrings.push_back("H_OVER_E_CUT");
97  queryStrings.push_back("E_MIN_FOR_H_OVER_E_CUT");
98  queryStrings.push_back("E_MAX_FOR_H_OVER_E_CUT");
99  queryStrings.push_back("H_MIN_FOR_H_OVER_E_CUT");
100  queryStrings.push_back("E_ACTIVITY_CUT");
101  queryStrings.push_back("H_ACTIVITY_CUT");
102  queryStrings.push_back("EIC_ISOLATION_THRESHOLD");
103  queryStrings.push_back("JSC_QUIET_THRESHOLD_BARREL");
104  queryStrings.push_back("JSC_QUIET_THRESHOLD_ENDCAP");
105  queryStrings.push_back("NOISEVETOHB");
106  queryStrings.push_back("NOISEVETOHEPLUS");
107  queryStrings.push_back("NOISEVETOHEMINUS");
108  queryStrings.push_back("USECORR");
109  l1t::OMDSReader::QueryResults paremResults =
110  m_omdsReader.basicQuery(queryStrings, rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults);
111 
112  if (paremResults.queryFailed() || paremResults.numberRows() != 1) // check query successful
113  {
114  edm::LogError("L1-O2O") << "Problem with L1RCTParameters key.";
115  return std::unique_ptr<L1RCTParameters>();
116  }
117 
120  double eActivityCut, hActivityCut;
121  double jscQuietThreshBarrel, jscQuietThreshEndcap, eicIsolationThreshold;
123 
124  paremResults.fillVariable("EGAMMA_LSB", eGammaLSB);
125  paremResults.fillVariable("JETMET_LSB", jetMETLSB);
126  paremResults.fillVariable("E_MIN_FOR_FG_CUT", eMinForFGCut);
127  paremResults.fillVariable("E_MAX_FOR_FG_CUT", eMaxForFGCut);
128  paremResults.fillVariable("H_OVER_E_CUT", hOeCut);
129  paremResults.fillVariable("E_MIN_FOR_H_OVER_E_CUT", eMinForHoECut);
130  paremResults.fillVariable("E_MAX_FOR_H_OVER_E_CUT", eMaxForHoECut);
131  paremResults.fillVariable("H_MIN_FOR_H_OVER_E_CUT", hMinForHoECut);
132  paremResults.fillVariable("E_ACTIVITY_CUT", eActivityCut);
133  paremResults.fillVariable("H_ACTIVITY_CUT", hActivityCut);
134  paremResults.fillVariable("JSC_QUIET_THRESHOLD_BARREL", jscQuietThreshBarrel);
135  paremResults.fillVariable("JSC_QUIET_THRESHOLD_ENDCAP", jscQuietThreshEndcap);
136  paremResults.fillVariable("EIC_ISOLATION_THRESHOLD", eicIsolationThreshold);
137  paremResults.fillVariable("NOISEVETOHB", noiseVetoHB);
138  paremResults.fillVariable("NOISEVETOHEPLUS", noiseVetoHEplus);
139  paremResults.fillVariable("NOISEVETOHEMINUS", noiseVetoHEminus);
140  paremResults.fillVariable("USECORR", useCorr);
141  // std::cout << "eGammaLSB = " << eGammaLSB << std::endl ;
142  // std::cout << "jetMETLSB = " << jetMETLSB << std::endl ;
143  // std::cout << "eMinForFGCut = " << eMinForFGCut << std::endl ;
144  // std::cout << "eMaxForFGCut = " << eMaxForFGCut << std::endl ;
145  // std::cout << "hOeCut = " << hOeCut << std::endl ;
146  // std::cout << "eMinForHoECut = " << eMinForHoECut << std::endl ;
147  // std::cout << "eMaxForHoECut = " << eMaxForHoECut << std::endl ;
148  // std::cout << "hMinForHoECut = " << hMinForHoECut << std::endl ;
149  // std::cout << "eActivityCut = " << eActivityCut << std::endl ;
150  // std::cout << "hActivityCut = " << hActivityCut << std::endl ;
151  // std::cout << "eicIsolationThreshold = " << eicIsolationThreshold << std::endl ;
152  // std::cout << "jscQuietThreshBarrel = " << jscQuietThreshBarrel << std::endl ;
153  // std::cout << "jscQuietThreshEndcap = " << jscQuietThreshEndcap << std::endl ;
154  // std::cout << "noiseVetoHB = " << noiseVetoHB << std::endl ;
155  // std::cout << "noiseVetoHEplus = " << noiseVetoHEplus << std::endl ;
156  // std::cout << "noiseVetoHEminus = " << noiseVetoHEminus << std::endl ;
157 
158  // ~~~~~~~~~ EGamma ECAL scale factors ~~~~~~~~~
159 
160  // select scalefactor, fk_rct_eta from egamma_ecal_scalefactor where
161  // egamma_ecal_scalefactor.fk_version =
162  // (select egamma_ecal from parem_conf where parem_conf.parem_key =
163  // (select rct_parameter from rct_conf where rct_conf.rct_key=
164  // 'rct_cmssw_def'));
165 
166  std::vector<std::string> scaleFactorQueryStrings;
167  scaleFactorQueryStrings.push_back("SCALEFACTOR");
168  scaleFactorQueryStrings.push_back("FK_RCT_ETA");
169 
171  scaleFactorQueryStrings,
172  rctSchema,
173  "EGAMMA_ECAL_SCALEFACTOR",
174  "EGAMMA_ECAL_SCALEFACTOR.FK_VERSION",
175  m_omdsReader.basicQuery("EGAMMA_ECAL", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
176 
177  if (egammaEcalResults.queryFailed()) // check query successful
178  {
179  edm::LogError("L1-O2O") << "Problem with EgammaEcal key.";
180  return std::unique_ptr<L1RCTParameters>();
181  }
182 
183  // std::cout << "egammaEcal " ;
184  std::vector<double> egammaEcalScaleFactors;
185  fillScaleFactors(egammaEcalResults, egammaEcalScaleFactors);
186 
187  // ~~~~~~~~~ EGamma HCAL scale factors ~~~~~~~~~
188 
189  // select scalefactor, fk_rct_eta from egamma_hcal_scalefactor where
190  // egamma_hcal_scalefactor.fk_version =
191  // (select egamma_hcal from parem_conf where parem_conf.parem_key =
192  // (select rct_parameter from rct_conf where rct_conf.rct_key=
193  // 'rct_cmssw_def'));
194 
196  scaleFactorQueryStrings,
197  rctSchema,
198  "EGAMMA_HCAL_SCALEFACTOR",
199  "EGAMMA_HCAL_SCALEFACTOR.FK_VERSION",
200  m_omdsReader.basicQuery("EGAMMA_HCAL", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
201 
202  if (egammaHcalResults.queryFailed()) // check query successful
203  {
204  edm::LogError("L1-O2O") << "Problem with EgammaHcal key.";
205  return std::unique_ptr<L1RCTParameters>();
206  }
207 
208  // std::cout << "egammaHcal " ;
209  std::vector<double> egammaHcalScaleFactors;
210  fillScaleFactors(egammaHcalResults, egammaHcalScaleFactors);
211 
212  // ~~~~~~~~~ JetMET ECAL scale factors ~~~~~~~~~
213 
214  // select scalefactor, fk_rct_eta from jetmet_ecal_scalefactor where
215  // jetmet_ecal_scalefactor.fk_version =
216  // (select jetmet_ecal from parem_conf where parem_conf.parem_key =
217  // (select rct_parameter from rct_conf where rct_conf.rct_key=
218  // 'rct_cmssw_def'));
219 
221  scaleFactorQueryStrings,
222  rctSchema,
223  "JETMET_ECAL_SCALEFACTOR",
224  "JETMET_ECAL_SCALEFACTOR.FK_VERSION",
225  m_omdsReader.basicQuery("JETMET_ECAL", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
226 
227  if (jetmetEcalResults.queryFailed()) // check query successful
228  {
229  edm::LogError("L1-O2O") << "Problem with JetmetEcal key.";
230  return std::unique_ptr<L1RCTParameters>();
231  }
232 
233  // std::cout << "jetmetEcal " ;
234  std::vector<double> jetmetEcalScaleFactors;
235  fillScaleFactors(jetmetEcalResults, jetmetEcalScaleFactors);
236 
237  // ~~~~~~~~~ JetMET HCAL scale factors ~~~~~~~~~
238 
239  // select scalefactor, fk_rct_eta from jetmet_hcal_scalefactor where
240  // jetmet_hcal_scalefactor.fk_version =
241  // (select jetmet_hcal from parem_conf where parem_conf.parem_key =
242  // (select rct_parameter from rct_conf where rct_conf.rct_key=
243  // 'rct_cmssw_def'));
244 
246  scaleFactorQueryStrings,
247  rctSchema,
248  "JETMET_HCAL_SCALEFACTOR",
249  "JETMET_HCAL_SCALEFACTOR.FK_VERSION",
250  m_omdsReader.basicQuery("JETMET_HCAL", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
251 
252  if (jetmetHcalResults.queryFailed()) // check query successful
253  {
254  edm::LogError("L1-O2O") << "Problem with JetmetHcal key.";
255  return std::unique_ptr<L1RCTParameters>();
256  }
257 
258  // std::cout << "jetmetHcal " ;
259  std::vector<double> jetmetHcalScaleFactors;
260  fillScaleFactors(jetmetHcalResults, jetmetHcalScaleFactors);
261 
262  //Lindsay variables
263 
264  /*
265  std::vector< std::vector< double > > hcalCalibScaleFactors ;
266  std::vector< std::vector< double > > hcalCalibHighScaleFactors ;
267  std::vector< std::vector< double > > ecalCalibScaleFactors ;
268  std::vector< std::vector< double > > crossTermsScaleFactors ;
269  */
270  std::vector<double> lowHoverE_smear, highHoverE_smear;
271  std::vector<double> hcalCalibScaleFactors, ecalCalibScaleFactors;
272  std::vector<double> hcalCalibHighScaleFactors, crossTermsScaleFactors;
273 
274  if (useCorr) { //lindsay corrections
275 
276  std::vector<std::string> scaleFactorQuery3Strings;
277  scaleFactorQuery3Strings.push_back("SCALEFACTOR");
278  scaleFactorQuery3Strings.push_back("SF2");
279  scaleFactorQuery3Strings.push_back("SF3");
280  scaleFactorQuery3Strings.push_back("FK_RCT_ETA");
281 
283  scaleFactorQuery3Strings,
284  rctSchema,
285  "HCAL_CALIB_FACTOR",
286  "HCAL_CALIB_FACTOR.VERSION",
288  "HCAL_CALIB_VERSION", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
289 
290  if (hcalCalibResults.queryFailed()) { // check query successful
291 
292  edm::LogError("L1-O2O") << "Problem with JetmetHcal key.";
293  return std::unique_ptr<L1RCTParameters>();
294  }
295 
296  // std::cout << "jetmetHcal " ;
297 
298  fillScaleFactors(hcalCalibResults, hcalCalibScaleFactors, 3);
299 
301  scaleFactorQuery3Strings,
302  rctSchema,
303  "HCAL_CALIB_HIGH_FACTOR",
304  "HCAL_CALIB_HIGH_FACTOR.VERSION",
306  "HCAL_CALIB_HIGH_VERSION", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
307 
308  if (hcalCalibHighResults.queryFailed()) // check query successful
309  {
310  edm::LogError("L1-O2O") << "Problem with hcalHigh key.";
311  return std::unique_ptr<L1RCTParameters>();
312  }
313 
314  fillScaleFactors(hcalCalibHighResults, hcalCalibHighScaleFactors, 3);
315 
317  scaleFactorQuery3Strings,
318  rctSchema,
319  "ECAL_CALIB_FACTOR",
320  "ECAL_CALIB_FACTOR.VERSION",
322  "ECAL_CALIB_VERSION", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
323 
324  if (ecalCalibResults.queryFailed()) // check query successful
325  {
326  edm::LogError("L1-O2O") << "Problem with ecal calib key.";
327  return std::unique_ptr<L1RCTParameters>();
328  }
329 
330  fillScaleFactors(ecalCalibResults, ecalCalibScaleFactors, 3);
331 
332  std::vector<std::string> scaleFactorQuery6Strings;
333  scaleFactorQuery6Strings.push_back("SCALEFACTOR");
334  scaleFactorQuery6Strings.push_back("SF2");
335  scaleFactorQuery6Strings.push_back("SF3");
336  scaleFactorQuery6Strings.push_back("SF4");
337  scaleFactorQuery6Strings.push_back("SF5");
338  scaleFactorQuery6Strings.push_back("SF6");
339  scaleFactorQuery6Strings.push_back("FK_RCT_ETA");
341  scaleFactorQuery6Strings,
342  rctSchema,
343  "CROSS_TERMS_FACTOR",
344  "CROSS_TERMS_FACTOR.VERSION",
346  "CROSS_TERMS_VERSION", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
347 
348  if (crossTermResults.queryFailed()) // check query successful
349  {
350  edm::LogError("L1-O2O") << "Problem with crossTerms key.";
351  return std::unique_ptr<L1RCTParameters>();
352  }
353 
354  fillScaleFactors(crossTermResults, crossTermsScaleFactors, 6);
355 
356  l1t::OMDSReader::QueryResults hoveresmearhighResults = m_omdsReader.basicQuery(
357  scaleFactorQueryStrings,
358  rctSchema,
359  "H_OVER_E_SMEAR_HIGH_FACTOR",
360  "H_OVER_E_SMEAR_HIGH_FACTOR.FK_VERSION",
362  "H_OVER_E_SMEAR_HIGH_VERSION", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
363 
364  if (hoveresmearhighResults.queryFailed()) // check query successful
365  {
366  edm::LogError("L1-O2O") << "Problem with low h over e smear key.";
367  return std::unique_ptr<L1RCTParameters>();
368  }
369 
370  // std::cout << "egammaEcal " ;
371  fillScaleFactors(hoveresmearhighResults, highHoverE_smear);
372 
373  l1t::OMDSReader::QueryResults hoveresmearlowResults = m_omdsReader.basicQuery(
374  scaleFactorQueryStrings,
375  rctSchema,
376  "H_OVER_E_SMEAR_LOW_FACTOR",
377  "H_OVER_E_SMEAR_LOW_FACTOR.FK_VERSION",
379  "H_OVER_E_SMEAR_LOW_VERSION", rctSchema, "PAREM_CONF", "PAREM_CONF.PAREM_KEY", paremKeyResults));
380 
381  if (hoveresmearlowResults.queryFailed()) // check query successful
382  {
383  edm::LogError("L1-O2O") << "Problem with low h over e smear key.";
384  return std::unique_ptr<L1RCTParameters>();
385  }
386 
387  // std::cout << "egammaEcal " ;
388  fillScaleFactors(hoveresmearlowResults, lowHoverE_smear);
389  }
390 
391  //~~~~~~~~~ Instantiate new L1RCTParameters object. ~~~~~~~~~
392 
393  // Default objects for Lindsey
394 
395  return std::make_unique<L1RCTParameters>(eGammaLSB,
396  jetMETLSB,
397  eMinForFGCut,
398  eMaxForFGCut,
399  hOeCut,
403  eActivityCut,
404  hActivityCut,
405  (unsigned int)eicIsolationThreshold,
406  (int)jscQuietThreshBarrel,
407  (int)jscQuietThreshEndcap,
408  noiseVetoHB,
411  useCorr, // useLindsey
412  egammaEcalScaleFactors,
413  egammaHcalScaleFactors,
414  jetmetEcalScaleFactors,
415  jetmetHcalScaleFactors,
416  ecalCalibScaleFactors,
417  hcalCalibScaleFactors,
418  hcalCalibHighScaleFactors,
419  crossTermsScaleFactors,
420  lowHoverE_smear,
421  highHoverE_smear);
422 }

References l1t::OMDSReader::basicQuery(), caloStage1RCTLuts_cff::eActivityCut, L1StartupConfig_cff::eGammaLSB, caloStage1RCTLuts_cff::eicIsolationThreshold, caloStage1RCTLuts_cff::eMaxForFGCut, caloStage1RCTLuts_cff::eMaxForHoECut, caloStage1RCTLuts_cff::eMinForFGCut, caloStage1RCTLuts_cff::eMinForHoECut, fillScaleFactors(), l1t::OMDSReader::QueryResults::fillVariable(), caloStage1RCTLuts_cff::hActivityCut, caloStage1RCTLuts_cff::hMinForHoECut, caloStage1RCTLuts_cff::hOeCut, L1StartupConfig_cff::jetMETLSB, L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters >::m_omdsReader, L1RCTConfig_cfi::noiseVetoHB, L1RCTConfig_cfi::noiseVetoHEminus, L1RCTConfig_cfi::noiseVetoHEplus, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), l1t::OMDSReader::singleAttribute(), and AlCaHLTBitMon_QueryRunRegistry::string.

l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
mps_fire.i
i
Definition: mps_fire.py:428
L1StartupConfig_cff.jetMETLSB
jetMETLSB
Definition: L1StartupConfig_cff.py:23
caloStage1RCTLuts_cff.eicIsolationThreshold
eicIsolationThreshold
Definition: caloStage1RCTLuts_cff.py:34
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters >::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ConfigOnlineProdBase.h:65
caloStage1RCTLuts_cff.hOeCut
hOeCut
Definition: caloStage1RCTLuts_cff.py:18
bookConverter.results
results
Definition: bookConverter.py:144
l1t::OMDSReader::singleAttribute
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters >
L1RCTConfig_cfi.noiseVetoHEplus
noiseVetoHEplus
Definition: L1RCTConfig_cfi.py:32
l1t::OMDSReader::QueryResults::fillVariable
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
caloStage1RCTLuts_cff.hMinForHoECut
hMinForHoECut
RCTConfigProducers.hMinForHoECut = 1.0.
Definition: caloStage1RCTLuts_cff.py:28
L1RCTParametersOnlineProd::fillScaleFactors
void fillScaleFactors(const l1t::OMDSReader::QueryResults &results, std::vector< double > &output, int nfactor=1)
Definition: L1RCTParametersOnlineProd.cc:428
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
cms::cuda::allocator::maxBin
constexpr unsigned int maxBin
Definition: getCachingDeviceAllocator.h:20
l1t::OMDSReader::QueryResults::numberRows
int numberRows() const
Definition: OMDSReader.h:60
caloStage1RCTLuts_cff.eMinForFGCut
eMinForFGCut
Definition: caloStage1RCTLuts_cff.py:16
caloStage1RCTLuts_cff.eMaxForFGCut
eMaxForFGCut
Definition: caloStage1RCTLuts_cff.py:17
l1t::OMDSReader::basicQuery
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
Definition: OMDSReader.cc:75
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
caloStage1RCTLuts_cff.eMaxForHoECut
eMaxForHoECut
Definition: caloStage1RCTLuts_cff.py:24
L1StartupConfig_cff.eGammaLSB
eGammaLSB
Definition: L1StartupConfig_cff.py:5
L1RCTConfig_cfi.noiseVetoHEminus
noiseVetoHEminus
Definition: L1RCTConfig_cfi.py:45
caloStage1RCTLuts_cff.eMinForHoECut
eMinForHoECut
RCTConfigProducers.eMinForHoECut = 1 RCTConfigProducers.eMaxForHoECut = 30.
Definition: caloStage1RCTLuts_cff.py:23
L1RCTConfig_cfi.noiseVetoHB
noiseVetoHB
Definition: L1RCTConfig_cfi.py:13
l1t::OMDSReader::QueryResults::queryFailed
bool queryFailed() const
Definition: OMDSReader.h:59
caloStage1RCTLuts_cff.hActivityCut
hActivityCut
Definition: caloStage1RCTLuts_cff.py:32
caloStage1RCTLuts_cff.eActivityCut
eActivityCut
Definition: caloStage1RCTLuts_cff.py:33