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");
114 edm::LogError(
"L1-O2O") <<
"Problem with L1RCTParameters key.";
115 return std::unique_ptr<L1RCTParameters>();
134 paremResults.
fillVariable(
"JSC_QUIET_THRESHOLD_BARREL", jscQuietThreshBarrel);
135 paremResults.
fillVariable(
"JSC_QUIET_THRESHOLD_ENDCAP", jscQuietThreshEndcap);
166 std::vector<std::string> scaleFactorQueryStrings;
167 scaleFactorQueryStrings.push_back(
"SCALEFACTOR");
168 scaleFactorQueryStrings.push_back(
"FK_RCT_ETA");
171 scaleFactorQueryStrings,
173 "EGAMMA_ECAL_SCALEFACTOR",
174 "EGAMMA_ECAL_SCALEFACTOR.FK_VERSION",
175 m_omdsReader.
basicQuery(
"EGAMMA_ECAL", rctSchema,
"PAREM_CONF",
"PAREM_CONF.PAREM_KEY", paremKeyResults));
180 return std::unique_ptr<L1RCTParameters>();
184 std::vector<double> egammaEcalScaleFactors;
196 scaleFactorQueryStrings,
198 "EGAMMA_HCAL_SCALEFACTOR",
199 "EGAMMA_HCAL_SCALEFACTOR.FK_VERSION",
200 m_omdsReader.
basicQuery(
"EGAMMA_HCAL", rctSchema,
"PAREM_CONF",
"PAREM_CONF.PAREM_KEY", paremKeyResults));
205 return std::unique_ptr<L1RCTParameters>();
209 std::vector<double> egammaHcalScaleFactors;
221 scaleFactorQueryStrings,
223 "JETMET_ECAL_SCALEFACTOR",
224 "JETMET_ECAL_SCALEFACTOR.FK_VERSION",
225 m_omdsReader.
basicQuery(
"JETMET_ECAL", rctSchema,
"PAREM_CONF",
"PAREM_CONF.PAREM_KEY", paremKeyResults));
230 return std::unique_ptr<L1RCTParameters>();
234 std::vector<double> jetmetEcalScaleFactors;
246 scaleFactorQueryStrings,
248 "JETMET_HCAL_SCALEFACTOR",
249 "JETMET_HCAL_SCALEFACTOR.FK_VERSION",
250 m_omdsReader.
basicQuery(
"JETMET_HCAL", rctSchema,
"PAREM_CONF",
"PAREM_CONF.PAREM_KEY", paremKeyResults));
255 return std::unique_ptr<L1RCTParameters>();
259 std::vector<double> jetmetHcalScaleFactors;
270 std::vector<double> lowHoverE_smear, highHoverE_smear;
271 std::vector<double> hcalCalibScaleFactors, ecalCalibScaleFactors;
272 std::vector<double> hcalCalibHighScaleFactors, crossTermsScaleFactors;
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");
283 scaleFactorQuery3Strings,
286 "HCAL_CALIB_FACTOR.VERSION",
288 "HCAL_CALIB_VERSION", rctSchema,
"PAREM_CONF",
"PAREM_CONF.PAREM_KEY", paremKeyResults));
293 return std::unique_ptr<L1RCTParameters>();
301 scaleFactorQuery3Strings,
303 "HCAL_CALIB_HIGH_FACTOR",
304 "HCAL_CALIB_HIGH_FACTOR.VERSION",
306 "HCAL_CALIB_HIGH_VERSION", rctSchema,
"PAREM_CONF",
"PAREM_CONF.PAREM_KEY", paremKeyResults));
311 return std::unique_ptr<L1RCTParameters>();
317 scaleFactorQuery3Strings,
320 "ECAL_CALIB_FACTOR.VERSION",
322 "ECAL_CALIB_VERSION", rctSchema,
"PAREM_CONF",
"PAREM_CONF.PAREM_KEY", paremKeyResults));
327 return std::unique_ptr<L1RCTParameters>();
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,
343 "CROSS_TERMS_FACTOR",
344 "CROSS_TERMS_FACTOR.VERSION",
346 "CROSS_TERMS_VERSION", rctSchema,
"PAREM_CONF",
"PAREM_CONF.PAREM_KEY", paremKeyResults));
351 return std::unique_ptr<L1RCTParameters>();
357 scaleFactorQueryStrings,
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));
366 edm::LogError(
"L1-O2O") <<
"Problem with low h over e smear key.";
367 return std::unique_ptr<L1RCTParameters>();
374 scaleFactorQueryStrings,
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));
383 edm::LogError(
"L1-O2O") <<
"Problem with low h over e smear key.";
384 return std::unique_ptr<L1RCTParameters>();
395 return std::make_unique<L1RCTParameters>(
eGammaLSB,
406 (
int)jscQuietThreshBarrel,
407 (
int)jscQuietThreshEndcap,
412 egammaEcalScaleFactors,
413 egammaHcalScaleFactors,
414 jetmetEcalScaleFactors,
415 jetmetHcalScaleFactors,
416 ecalCalibScaleFactors,
417 hcalCalibScaleFactors,
418 hcalCalibHighScaleFactors,
419 crossTermsScaleFactors,
429 std::vector<double>&
output,
431 if ((nfactors < 1) || (nfactors > 6)) {
432 edm::LogError(
"L1-O2O") <<
"invalid number of factors in scale factors fill";
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");
447 std::vector<double> sfTmp[100];
455 for (
int i = 0;
i <
results.numberRows(); ++
i) {
457 for (
int nf = 0; nf < nfactors; nf++) {
458 results.fillVariableFromRow(scaleFactorQuery6Strings.at(nf),
i, sf[nf]);
463 for (
int nf = 0; nf < nfactors; nf++)
473 for (
short nf = 0; nf < nfactors; nf++)
474 output.push_back(sfTmp[
i].at(nf));
const QueryResults singleAttribute(const T &data) const
eMinForHoECut
RCTConfigProducers.eMinForHoECut = 1 RCTConfigProducers.eMaxForHoECut = 30.
~L1RCTParametersOnlineProd() override
Log< level::Error, false > LogError
void fillScaleFactors(const l1t::OMDSReader::QueryResults &results, std::vector< double > &output, int nfactor=1)
std::unique_ptr< L1RCTParameters > newObject(const std::string &objectKey) override
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="")
bool fillVariable(const std::string &columnName, T &outputVariable) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
l1t::OMDSReader m_omdsReader
L1RCTParametersOnlineProd(const edm::ParameterSet &)
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
hMinForHoECut
RCTConfigProducers.hMinForHoECut = 1.0.