CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1TCaloParamsOnlineProd Class Reference
Inheritance diagram for L1TCaloParamsOnlineProd:
L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 L1TCaloParamsOnlineProd (const edm::ParameterSet &)
 
std::unique_ptr< const l1t::CaloParamsnewObject (const std::string &objectKey, const L1TCaloParamsO2ORcd &record) override
 
 ~L1TCaloParamsOnlineProd (void) override
 
- Public Member Functions inherited from L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >
 L1ConfigOnlineProdBaseExt (const edm::ParameterSet &)
 
std::unique_ptr< const l1t::CaloParamsproduce (const L1TCaloParamsO2ORcd &iRecord)
 
 ~L1ConfigOnlineProdBaseExt () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
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)
 

Private Member Functions

bool readCaloLayer1OnlineSettings (l1t::CaloParamsHelperO2O &paramsHelper, std::map< std::string, l1t::Parameter > &conf, std::map< std::string, l1t::Mask > &)
 
bool readCaloLayer2OnlineSettings (l1t::CaloParamsHelperO2O &paramsHelper, std::map< std::string, l1t::Parameter > &conf, std::map< std::string, l1t::Mask > &)
 

Private Attributes

edm::ESGetToken< l1t::CaloParams, L1TCaloParamsRcdbaseSettings_token
 
unsigned int exclusiveLayer
 
bool transactionSafe
 

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 L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >
bool getObjectKey (const L1TCaloParamsO2ORcd &record, std::string &objectKey)
 
edm::ESConsumesCollectorT< L1TCaloParamsO2ORcdwrappedSetWhatProduced (const edm::ParameterSet &)
 
- 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={})
 
- 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 L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >
bool m_copyFromCondDB
 
cond::persistency::Session m_dbSession
 
bool m_forceGeneration
 
l1t::OMDSReader m_omdsReader
 

Detailed Description

Definition at line 20 of file L1TCaloParamsOnlineProd.cc.

Constructor & Destructor Documentation

◆ L1TCaloParamsOnlineProd()

L1TCaloParamsOnlineProd::L1TCaloParamsOnlineProd ( const edm::ParameterSet iConfig)

◆ ~L1TCaloParamsOnlineProd()

L1TCaloParamsOnlineProd::~L1TCaloParamsOnlineProd ( void  )
inlineoverride

Definition at line 38 of file L1TCaloParamsOnlineProd.cc.

38 {}

Member Function Documentation

◆ newObject()

std::unique_ptr< const l1t::CaloParams > L1TCaloParamsOnlineProd::newObject ( const std::string &  objectKey,
const L1TCaloParamsO2ORcd record 
)
overridevirtual

Implements L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >.

Definition at line 219 of file L1TCaloParamsOnlineProd.cc.

220  {
221  const L1TCaloParamsRcd& baseRcd = record.template getRecord<L1TCaloParamsRcd>();
222  auto const& baseSettings = baseRcd.get(baseSettings_token);
223 
224  if (objectKey.empty()) {
225  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd") << "Key is empty";
226  if (transactionSafe)
227  throw std::runtime_error("SummaryForFunctionManager: Calo | Faulty | Empty objectKey");
228  else {
229  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd") << "returning unmodified prototype of l1t::CaloParams";
230  return std::make_unique<const l1t::CaloParams>(baseSettings);
231  }
232  }
233 
234  std::string tscKey = objectKey.substr(0, objectKey.find(":"));
235  std::string rsKey = objectKey.substr(objectKey.find(":") + 1, std::string::npos);
236 
237  edm::LogInfo("L1-O2O: L1TCaloParamsOnlineProd")
238  << "Producing L1TCaloParamsOnlineProd with TSC key = " << tscKey << " and RS key = " << rsKey;
239 
240  std::string calol1_top_key, calol1_algo_key;
241  std::string calol1_algo_payload;
242  std::string calol2_top_key, calol2_algo_key, calol2_hw_key;
243  std::string calol2_hw_payload;
244  std::map<std::string, std::string> calol2_algo_payloads; // key -> XML payload
245  try {
246  std::map<std::string, std::string> topKeys =
247  l1t::OnlineDBqueryHelper::fetch({"CALOL1_KEY", "CALOL2_KEY"}, "L1_TRG_CONF_KEYS", tscKey, m_omdsReader);
248 
249  if (exclusiveLayer == 0 || exclusiveLayer == 1) {
250  calol1_top_key = topKeys["CALOL1_KEY"];
251 
252  calol1_algo_key = l1t::OnlineDBqueryHelper::fetch({"ALGO"}, "CALOL1_KEYS", calol1_top_key, m_omdsReader)["ALGO"];
253 
254  calol1_algo_payload =
255  l1t::OnlineDBqueryHelper::fetch({"CONF"}, "CALOL1_CLOBS", calol1_algo_key, m_omdsReader)["CONF"];
256  }
257 
258  if (exclusiveLayer == 0 || exclusiveLayer == 2) {
259  calol2_top_key = topKeys["CALOL2_KEY"];
260 
261  std::map<std::string, std::string> calol2_keys =
262  l1t::OnlineDBqueryHelper::fetch({"ALGO", "HW"}, "CALOL2_KEYS", calol2_top_key, m_omdsReader);
263 
264  calol2_hw_key = calol2_keys["HW"];
265  calol2_hw_payload =
266  l1t::OnlineDBqueryHelper::fetch({"CONF"}, "CALOL2_CLOBS", calol2_hw_key, m_omdsReader)["CONF"];
267 
268  calol2_algo_key = calol2_keys["ALGO"];
269 
270  std::map<std::string, std::string> calol2_algo_keys =
271  l1t::OnlineDBqueryHelper::fetch({"DEMUX", "MPS_COMMON", "MPS_JET", "MP_EGAMMA", "MP_SUM", "MP_TAU"},
272  "CALOL2_ALGO_KEYS",
273  calol2_algo_key,
274  m_omdsReader);
275 
276  for (auto& key : calol2_algo_keys)
277  calol2_algo_payloads[key.second] =
278  l1t::OnlineDBqueryHelper::fetch({"CONF"}, "CALOL2_CLOBS", key.second, m_omdsReader)["CONF"];
279  }
280 
281  } catch (std::runtime_error& e) {
282  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd") << e.what();
283  if (transactionSafe)
284  throw std::runtime_error(std::string("SummaryForFunctionManager: Calo | Faulty | ") + e.what());
285  else {
286  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd") << "returning unmodified prototype of l1t::CaloParams";
287  return std::make_unique<const l1t::CaloParams>(baseSettings);
288  }
289  }
290 
291  if (exclusiveLayer == 0 || exclusiveLayer == 2) {
292  // for debugging purposes dump the configs to local files
293  for (auto& conf : calol2_algo_payloads) {
294  std::ofstream output(std::string("/tmp/").append(conf.first.substr(0, conf.first.find("/"))).append(".xml"));
295  output << conf.second;
296  output.close();
297  }
298  std::ofstream output(std::string("/tmp/").append(calol2_hw_key.substr(0, calol2_hw_key.find("/"))).append(".xml"));
299  output << calol2_hw_payload;
300  output.close();
301  }
302  if (exclusiveLayer == 0 || exclusiveLayer == 1) {
303  std::ofstream output(
304  std::string("/tmp/").append(calol1_algo_key.substr(0, calol1_algo_key.find("/"))).append(".xml"));
305  output << calol1_algo_payload;
306  output.close();
307  }
308 
309  l1t::CaloParamsHelperO2O m_params_helper(baseSettings);
310 
311  if (exclusiveLayer == 0 || exclusiveLayer == 1) {
312  try {
313  l1t::XmlConfigParser xmlReader1;
314  xmlReader1.readDOMFromString(calol1_algo_payload);
315 
316  l1t::TriggerSystem calol1;
317  calol1.addProcessor("processors", "processors", "-1", "-1");
318  xmlReader1.readRootElement(calol1, "calol1");
319  calol1.setConfigured();
320 
321  std::map<std::string, l1t::Parameter> calol1_conf = calol1.getParameters("processors");
322  std::map<std::string, l1t::Mask> calol1_rs; //= calol1.getMasks ("processors");
323 
324  if (!readCaloLayer1OnlineSettings(m_params_helper, calol1_conf, calol1_rs))
325  throw std::runtime_error("Parsing error for CaloLayer1");
326 
327  } catch (std::runtime_error& e) {
328  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd") << e.what();
329  if (transactionSafe)
330  throw std::runtime_error(std::string("SummaryForFunctionManager: Calo | Faulty | ") + e.what());
331  else {
332  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd") << "returning unmodified prototype of l1t::CaloParams";
333  return std::make_unique<const l1t::CaloParams>(baseSettings);
334  }
335  }
336  }
337 
338  if (exclusiveLayer == 0 || exclusiveLayer == 2) {
339  try {
340  l1t::TriggerSystem calol2;
341  l1t::XmlConfigParser xmlReader2;
342  xmlReader2.readDOMFromString(calol2_hw_payload);
343  xmlReader2.readRootElement(calol2, "calol2");
344 
345  for (auto& conf : calol2_algo_payloads) {
346  xmlReader2.readDOMFromString(conf.second);
347  xmlReader2.readRootElement(calol2, "calol2");
348  }
349 
350  // calol2.setSystemId("calol2");
351  calol2.setConfigured();
352 
353  std::map<std::string, l1t::Parameter> calol2_conf = calol2.getParameters("MP1");
354  std::map<std::string, l1t::Parameter> calol2_conf_demux = calol2.getParameters("DEMUX");
355  calol2_conf.insert(calol2_conf_demux.begin(), calol2_conf_demux.end());
356  std::map<std::string, l1t::Mask> calol2_rs; //= calol2.getMasks ("processors");
357 
358  if (!readCaloLayer2OnlineSettings(m_params_helper, calol2_conf, calol2_rs))
359  throw std::runtime_error("Parsing error for CaloLayer2");
360 
361  } catch (std::runtime_error& e) {
362  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd") << e.what();
363  if (transactionSafe)
364  throw std::runtime_error(std::string("SummaryForFunctionManager: Calo | Faulty | ") + e.what());
365  else {
366  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd") << "returning unmodified prototype of l1t::CaloParams";
367  return std::make_unique<const l1t::CaloParams>(baseSettings);
368  }
369  }
370  }
371 
372  auto retval = std::make_unique<const l1t::CaloParams>(m_params_helper);
373 
374  edm::LogInfo("L1-O2O: L1TCaloParamsOnlineProd") << "SummaryForFunctionManager: Calo | OK | All looks good";
375  return retval;
376 }

References l1t::TriggerSystem::addProcessor(), mps_setup::append, baseSettings_token, MillePedeFileConverter_cfg::e, exclusiveLayer, l1t::OnlineDBqueryHelper::fetch(), edm::eventsetup::EventSetupRecordImplementation< T >::get(), l1t::TriggerSystem::getParameters(), crabWrapper::key, L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >::m_omdsReader, convertSQLitetoXML_cfg::output, readCaloLayer1OnlineSettings(), readCaloLayer2OnlineSettings(), l1t::XmlConfigParser::readDOMFromString(), l1t::XmlConfigParser::readRootElement(), GlobalPosition_Frontier_DevDB_cff::record, l1t::TriggerSystem::setConfigured(), AlCaHLTBitMon_QueryRunRegistry::string, and transactionSafe.

◆ readCaloLayer1OnlineSettings()

bool L1TCaloParamsOnlineProd::readCaloLayer1OnlineSettings ( l1t::CaloParamsHelperO2O paramsHelper,
std::map< std::string, l1t::Parameter > &  conf,
std::map< std::string, l1t::Mask > &   
)
private

Definition at line 41 of file L1TCaloParamsOnlineProd.cc.

43  {
44  const char* expectedParams[] = {
45  "layer1ECalScaleFactors",
46  "layer1HCalScaleFactors",
47  "layer1HFScaleFactors",
48  "layer1ECalScaleETBins",
49  "layer1HCalScaleETBins",
50  "layer1HFScaleETBins"
51  // Optional params
52  //"layer1ECalScalePhiBins",
53  //"layer1HCalScalePhiBins",
54  //"layer1HFScalePhiBins",
55  //"layer1SecondStageLUT"
56  };
57  for (const auto param : expectedParams) {
58  if (conf.find(param) == conf.end()) {
59  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd")
60  << "Unable to locate expected CaloLayer1 parameter: " << param << " in L1 settings payload!";
61  return false;
62  }
63  }
64  // Layer 1 LUT specification
65  paramsHelper.setLayer1ECalScaleFactors((conf["layer1ECalScaleFactors"].getVector<double>()));
66  paramsHelper.setLayer1HCalScaleFactors((conf["layer1HCalScaleFactors"].getVector<double>()));
67  paramsHelper.setLayer1HFScaleFactors((conf["layer1HFScaleFactors"].getVector<double>()));
68  paramsHelper.setLayer1ECalScaleETBins(conf["layer1ECalScaleETBins"].getVector<int>());
69  paramsHelper.setLayer1HCalScaleETBins(conf["layer1HCalScaleETBins"].getVector<int>());
70  paramsHelper.setLayer1HFScaleETBins(conf["layer1HFScaleETBins"].getVector<int>());
71 
72  if (conf.find("layer1ECalScalePhiBins") != conf.end())
73  paramsHelper.setLayer1ECalScalePhiBins(
74  conf["layer1ECalScalePhiBins"].getVector<unsigned int>()); // std::vector<unsigned>(36,0)
75  if (conf.find("layer1HCalScalePhiBins") != conf.end())
76  paramsHelper.setLayer1HCalScalePhiBins(conf["layer1HCalScalePhiBins"].getVector<unsigned int>());
77  if (conf.find("layer1HFScalePhiBins") != conf.end())
78  paramsHelper.setLayer1HFScalePhiBins(conf["layer1HFScalePhiBins"].getVector<unsigned int>());
79  if (conf.find("layer1SecondStageLUT") != conf.end())
80  paramsHelper.setLayer1SecondStageLUT(conf["layer1SecondStageLUT"].getVector<unsigned int>());
81 
82  return true;
83 }

References l1t::CaloParamsHelperO2O::setLayer1ECalScaleETBins(), l1t::CaloParamsHelperO2O::setLayer1ECalScaleFactors(), l1t::CaloParamsHelperO2O::setLayer1ECalScalePhiBins(), l1t::CaloParamsHelperO2O::setLayer1HCalScaleETBins(), l1t::CaloParamsHelperO2O::setLayer1HCalScaleFactors(), l1t::CaloParamsHelperO2O::setLayer1HCalScalePhiBins(), l1t::CaloParamsHelperO2O::setLayer1HFScaleETBins(), l1t::CaloParamsHelperO2O::setLayer1HFScaleFactors(), l1t::CaloParamsHelperO2O::setLayer1HFScalePhiBins(), and l1t::CaloParamsHelperO2O::setLayer1SecondStageLUT().

Referenced by newObject().

◆ readCaloLayer2OnlineSettings()

bool L1TCaloParamsOnlineProd::readCaloLayer2OnlineSettings ( l1t::CaloParamsHelperO2O paramsHelper,
std::map< std::string, l1t::Parameter > &  conf,
std::map< std::string, l1t::Mask > &   
)
private

Definition at line 85 of file L1TCaloParamsOnlineProd.cc.

87  {
88  const char* expectedParams[] = {
89  "leptonSeedThreshold",
90  "leptonTowerThreshold",
91  "pileUpTowerThreshold",
92  "egammaRelaxationThreshold",
93  "egammaMaxEta",
94  "egammaBypassCuts",
95  "egammaBypassShape",
96  "egammaBypassEcalFG",
97  "egammaBypassExtendedHOverE",
98  "egammaHOverECut_iEtaLT15",
99  "egammaHOverECut_iEtaGTEq15",
100  "egammaEnergyCalibLUT",
101  "egammaIsoLUT1",
102  "egammaIsoLUT2",
103  "tauMaxEta",
104  "tauEnergyCalibLUT",
105  "tauIsoLUT",
106  "tauTrimmingLUT",
107  "jetSeedThreshold",
108  "HTMHT_maxJetEta",
109  "HT_jetThreshold",
110  "MHT_jetThreshold",
111  "jetBypassPileUpSub",
112  "jetEnergyCalibLUT",
113  "jetPUSUsePhiRing",
114  "towerCountThreshold",
115  "towerCountMaxEta",
116  "ETMET_maxTowerEta",
117  "ecalET_towerThresholdLUT",
118  "ET_towerThresholdLUT",
119  "MET_towerThresholdLUT",
120  "ET_centralityLowerThresholds",
121  "ET_centralityUpperThresholds",
122  "ET_energyCalibLUT",
123  "ecalET_energyCalibLUT",
124  "MET_energyCalibLUT",
125  "METHF_energyCalibLUT",
126  "MET_phiCalibLUT",
127  "METHF_phiCalibLUT",
128  };
129 
130  for (const auto param : expectedParams) {
131  if (conf.find(param) == conf.end()) {
132  edm::LogError("L1-O2O: L1TCaloParamsOnlineProd")
133  << "Unable to locate expected CaloLayer2 parameter: " << param << " in L1 settings payload!";
134  return false;
135  }
136  }
137  // Layer 2 params specification
138  paramsHelper.setEgSeedThreshold((conf["leptonSeedThreshold"].getValue<int>()) / 2);
139  paramsHelper.setTauSeedThreshold((conf["leptonSeedThreshold"].getValue<int>()) / 2);
140  paramsHelper.setEgNeighbourThreshold((conf["leptonTowerThreshold"].getValue<int>()) / 2);
141  paramsHelper.setTauNeighbourThreshold((conf["leptonTowerThreshold"].getValue<int>()) / 2);
142  paramsHelper.setPileUpTowerThreshold((conf["pileUpTowerThreshold"].getValue<int>()) / 2);
143 
144  paramsHelper.setEgMaxPtHOverE((conf["egammaRelaxationThreshold"].getValue<int>()) / 2.);
145  paramsHelper.setEgEtaCut((conf["egammaMaxEta"].getValue<int>()));
146  paramsHelper.setEgBypassEGVetos(conf["egammaBypassCuts"].getValue<bool>());
147  paramsHelper.setEgBypassShape(conf["egammaBypassShape"].getValue<bool>());
148  paramsHelper.setEgBypassECALFG(conf["egammaBypassEcalFG"].getValue<bool>());
149  paramsHelper.setEgBypassExtHOverE(conf["egammaBypassExtendedHOverE"].getValue<bool>());
150  paramsHelper.setEgHOverEcutBarrel(conf["egammaHOverECut_iEtaLT15"].getValue<int>());
151  paramsHelper.setEgHOverEcutEndcap(conf["egammaHOverECut_iEtaGTEq15"].getValue<int>());
152  paramsHelper.setEgCalibrationLUT(l1t::convertToLUT(conf["egammaEnergyCalibLUT"].getVector<int>()));
153  paramsHelper.setEgIsolationLUT(l1t::convertToLUT(conf["egammaIsoLUT1"].getVector<int>()));
154  paramsHelper.setEgIsolationLUT2(l1t::convertToLUT(conf["egammaIsoLUT2"].getVector<int>()));
155 
156  paramsHelper.setIsoTauEtaMax((conf["tauMaxEta"].getValue<int>()));
157  paramsHelper.setTauCalibrationLUT(l1t::convertToLUT(conf["tauEnergyCalibLUT"].getVector<int>()));
158  paramsHelper.setTauIsolationLUT(l1t::convertToLUT(conf["tauIsoLUT"].getVector<int>()));
159  paramsHelper.setTauTrimmingShapeVetoLUT(l1t::convertToLUT(conf["tauTrimmingLUT"].getVector<int>()));
160 
161  paramsHelper.setJetSeedThreshold((conf["jetSeedThreshold"].getValue<int>()) / 2);
162  paramsHelper.setJetBypassPUS(conf["jetBypassPileUpSub"].getValue<bool>());
163  paramsHelper.setJetPUSUsePhiRing(conf["jetPUSUsePhiRing"].getValue<bool>());
164  paramsHelper.setJetCalibrationLUT(l1t::convertToLUT(conf["jetEnergyCalibLUT"].getVector<uint32_t>()));
165 
166  std::vector<int> etSumEtaMax;
167  std::vector<int> etSumEtThresh;
168 
169  etSumEtaMax.push_back(conf["ETMET_maxTowerEta"].getValue<int>());
170  etSumEtaMax.push_back(conf["HTMHT_maxJetEta"].getValue<int>());
171  etSumEtaMax.push_back(conf["ETMET_maxTowerEta"].getValue<int>());
172  etSumEtaMax.push_back(conf["HTMHT_maxJetEta"].getValue<int>());
173  etSumEtaMax.push_back(conf["towerCountMaxEta"].getValue<int>());
174 
175  etSumEtThresh.push_back(0); //deprecated by EttPUSLUT
176  etSumEtThresh.push_back(conf["HT_jetThreshold"].getValue<int>() / 2);
177  etSumEtThresh.push_back(0); //deprecated by MetPUSLUT
178  etSumEtThresh.push_back(conf["MHT_jetThreshold"].getValue<int>() / 2);
179  etSumEtThresh.push_back(conf["towerCountThreshold"].getValue<int>() / 2);
180 
181  for (uint i = 0; i < 5; ++i) {
182  paramsHelper.setEtSumEtaMax(i, etSumEtaMax.at(i));
183  paramsHelper.setEtSumEtThreshold(i, etSumEtThresh.at(i));
184  }
185 
186  paramsHelper.setEtSumMetPUSLUT(l1t::convertToLUT(conf["MET_towerThresholdLUT"].getVector<int>()));
187  paramsHelper.setEtSumEttPUSLUT(l1t::convertToLUT(conf["ET_towerThresholdLUT"].getVector<int>()));
188  paramsHelper.setEtSumEcalSumPUSLUT(l1t::convertToLUT(conf["ecalET_towerThresholdLUT"].getVector<int>()));
189 
190  std::vector<double> etSumCentLowerValues;
191  std::vector<double> etSumCentUpperValues;
192 
193  etSumCentLowerValues = conf["ET_centralityLowerThresholds"].getVector<double>();
194  etSumCentUpperValues = conf["ET_centralityUpperThresholds"].getVector<double>();
195 
196  for (uint i = 0; i < 8; ++i) {
197  paramsHelper.setEtSumCentLower(i, etSumCentLowerValues[i] / 2);
198  paramsHelper.setEtSumCentUpper(i, etSumCentUpperValues[i] / 2);
199  }
200 
201  // demux tower sum calib LUTs
202  paramsHelper.setEtSumEttCalibrationLUT(l1t::convertToLUT(conf["ET_energyCalibLUT"].getVector<int>()));
203  paramsHelper.setEtSumEcalSumCalibrationLUT(l1t::convertToLUT(conf["ecalET_energyCalibLUT"].getVector<int>()));
204  paramsHelper.setMetCalibrationLUT(l1t::convertToLUT(conf["MET_energyCalibLUT"].getVector<int>()));
205  paramsHelper.setMetHFCalibrationLUT(l1t::convertToLUT(conf["METHF_energyCalibLUT"].getVector<int>()));
206  paramsHelper.setMetPhiCalibrationLUT(l1t::convertToLUT(conf["MET_phiCalibLUT"].getVector<int>()));
207  paramsHelper.setMetHFPhiCalibrationLUT(l1t::convertToLUT(conf["METHF_phiCalibLUT"].getVector<int>()));
208 
209  return true;
210 }

References l1t::convertToLUT(), caloParams_2018_v1_0_ECALZS_inconsistent_cfi::etSumEtaMax, mps_fire::i, l1t::CaloParamsHelperO2O::setEgBypassECALFG(), l1t::CaloParamsHelperO2O::setEgBypassEGVetos(), l1t::CaloParamsHelperO2O::setEgBypassExtHOverE(), l1t::CaloParamsHelperO2O::setEgBypassShape(), l1t::CaloParamsHelperO2O::setEgCalibrationLUT(), l1t::CaloParamsHelperO2O::setEgEtaCut(), l1t::CaloParamsHelperO2O::setEgHOverEcutBarrel(), l1t::CaloParamsHelperO2O::setEgHOverEcutEndcap(), l1t::CaloParamsHelperO2O::setEgIsolationLUT(), l1t::CaloParamsHelperO2O::setEgIsolationLUT2(), l1t::CaloParamsHelperO2O::setEgMaxPtHOverE(), l1t::CaloParamsHelperO2O::setEgNeighbourThreshold(), l1t::CaloParamsHelperO2O::setEgSeedThreshold(), l1t::CaloParamsHelperO2O::setEtSumCentLower(), l1t::CaloParamsHelperO2O::setEtSumCentUpper(), l1t::CaloParamsHelperO2O::setEtSumEcalSumCalibrationLUT(), l1t::CaloParamsHelperO2O::setEtSumEcalSumPUSLUT(), l1t::CaloParamsHelperO2O::setEtSumEtaMax(), l1t::CaloParamsHelperO2O::setEtSumEttCalibrationLUT(), l1t::CaloParamsHelperO2O::setEtSumEtThreshold(), l1t::CaloParamsHelperO2O::setEtSumEttPUSLUT(), l1t::CaloParamsHelperO2O::setEtSumMetPUSLUT(), l1t::CaloParamsHelperO2O::setIsoTauEtaMax(), l1t::CaloParamsHelperO2O::setJetBypassPUS(), l1t::CaloParamsHelperO2O::setJetCalibrationLUT(), l1t::CaloParamsHelperO2O::setJetPUSUsePhiRing(), l1t::CaloParamsHelperO2O::setJetSeedThreshold(), l1t::CaloParamsHelperO2O::setMetCalibrationLUT(), l1t::CaloParamsHelperO2O::setMetHFCalibrationLUT(), l1t::CaloParamsHelperO2O::setMetHFPhiCalibrationLUT(), l1t::CaloParamsHelperO2O::setMetPhiCalibrationLUT(), l1t::CaloParamsHelperO2O::setPileUpTowerThreshold(), l1t::CaloParamsHelperO2O::setTauCalibrationLUT(), l1t::CaloParamsHelperO2O::setTauIsolationLUT(), l1t::CaloParamsHelperO2O::setTauNeighbourThreshold(), l1t::CaloParamsHelperO2O::setTauSeedThreshold(), l1t::CaloParamsHelperO2O::setTauTrimmingShapeVetoLUT(), and parallelization::uint.

Referenced by newObject().

Member Data Documentation

◆ baseSettings_token

edm::ESGetToken<l1t::CaloParams, L1TCaloParamsRcd> L1TCaloParamsOnlineProd::baseSettings_token
private

Definition at line 24 of file L1TCaloParamsOnlineProd.cc.

Referenced by L1TCaloParamsOnlineProd(), and newObject().

◆ exclusiveLayer

unsigned int L1TCaloParamsOnlineProd::exclusiveLayer
private

Definition at line 22 of file L1TCaloParamsOnlineProd.cc.

Referenced by L1TCaloParamsOnlineProd(), and newObject().

◆ transactionSafe

bool L1TCaloParamsOnlineProd::transactionSafe
private

Definition at line 23 of file L1TCaloParamsOnlineProd.cc.

Referenced by L1TCaloParamsOnlineProd(), and newObject().

l1t::CaloParamsHelperO2O::setTauCalibrationLUT
void setTauCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:339
l1t::CaloParamsHelperO2O::setLayer1HFScalePhiBins
void setLayer1HFScalePhiBins(const std::vector< unsigned > params)
Definition: CaloParamsHelperO2O.h:565
l1t::CaloParamsHelperO2O::setIsoTauEtaMax
void setIsoTauEtaMax(int value)
Definition: CaloParamsHelperO2O.h:321
mps_fire.i
i
Definition: mps_fire.py:355
L1TCaloParamsOnlineProd::exclusiveLayer
unsigned int exclusiveLayer
Definition: L1TCaloParamsOnlineProd.cc:22
L1TCaloParamsOnlineProd::baseSettings_token
edm::ESGetToken< l1t::CaloParams, L1TCaloParamsRcd > baseSettings_token
Definition: L1TCaloParamsOnlineProd.cc:24
l1t::CaloParamsHelperO2O::setPileUpTowerThreshold
void setPileUpTowerThreshold(int thresh)
Definition: CaloParamsHelperO2O.h:147
l1t::CaloParamsHelperO2O::setJetCalibrationLUT
void setJetCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:384
L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ConfigOnlineProdBaseExt.h:47
l1t::OnlineDBqueryHelper::fetch
static std::map< std::string, std::string > fetch(const std::vector< std::string > &queryColumns, const std::string &table, const std::string &key, l1t::OMDSReader &m_omdsReader)
Definition: OnlineDBqueryHelper.cc:3
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
l1t::CaloParamsHelperO2O::setLayer1HCalScaleFactors
void setLayer1HCalScaleFactors(const std::vector< double > params)
Definition: CaloParamsHelperO2O.h:558
l1t::CaloParamsHelperO2O::setEtSumEttPUSLUT
void setEtSumEttPUSLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:474
l1t::CaloParamsHelperO2O::setTauTrimmingShapeVetoLUT
void setTauTrimmingShapeVetoLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:325
l1t::XmlConfigParser::readRootElement
void readRootElement(TriggerSystem &aTriggerSystem, const std::string &sysId="")
Definition: XmlConfigParser.cc:189
edm::LogInfo
Definition: MessageLogger.h:254
l1t::TriggerSystem::addProcessor
void addProcessor(const char *processor, const char *role, const char *crate, const char *slot)
Definition: TriggerSystem.cc:26
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
l1t::CaloParamsHelperO2O::setEgSeedThreshold
void setEgSeedThreshold(double thresh)
Definition: CaloParamsHelperO2O.h:216
l1t::CaloParamsHelperO2O::setLayer1ECalScalePhiBins
void setLayer1ECalScalePhiBins(const std::vector< unsigned > params)
Definition: CaloParamsHelperO2O.h:563
l1t::convertToLUT
l1t::LUT convertToLUT(const std::vector< uint64_t > &v, int padding=-1) noexcept
Definition: ConvertToLUT.h:10
parallelization.uint
uint
Definition: parallelization.py:124
l1t::CaloParamsHelperO2O::setEtSumEcalSumCalibrationLUT
void setEtSumEcalSumCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:479
l1t::TriggerSystem
Definition: TriggerSystem.h:14
l1t::CaloParamsHelperO2O::setTauNeighbourThreshold
void setTauNeighbourThreshold(double thresh)
Definition: CaloParamsHelperO2O.h:315
L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >
caloParams_2018_v1_0_ECALZS_inconsistent_cfi.etSumEtaMax
etSumEtaMax
Definition: caloParams_2018_v1_0_ECALZS_inconsistent_cfi.py:122
l1t::CaloParamsHelperO2O::setMetCalibrationLUT
void setMetCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:476
l1t::CaloParamsHelperO2O::setEtSumEcalSumPUSLUT
void setEtSumEcalSumPUSLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:475
l1t::CaloParamsHelperO2O::setLayer1HCalScalePhiBins
void setLayer1HCalScalePhiBins(const std::vector< unsigned > params)
Definition: CaloParamsHelperO2O.h:564
l1t::CaloParamsHelperO2O::setEtSumMetPUSLUT
void setEtSumMetPUSLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:473
l1t::CaloParamsHelperO2O
Definition: CaloParamsHelperO2O.h:16
l1t::CaloParamsHelperO2O::setLayer1HFScaleFactors
void setLayer1HFScaleFactors(const std::vector< double > params)
Definition: CaloParamsHelperO2O.h:559
l1t::CaloParamsHelperO2O::setJetBypassPUS
void setJetBypassPUS(unsigned flag)
Definition: CaloParamsHelperO2O.h:387
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1t::XmlConfigParser
Definition: XmlConfigParser.h:23
l1t::CaloParamsHelperO2O::setMetHFCalibrationLUT
void setMetHFCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:477
l1t::CaloParamsHelperO2O::setLayer1SecondStageLUT
void setLayer1SecondStageLUT(const std::vector< unsigned > &lut)
Definition: CaloParamsHelperO2O.h:568
l1t::CaloParamsHelperO2O::setEtSumCentUpper
void setEtSumCentUpper(unsigned centClass, double upBound)
Definition: CaloParamsHelperO2O.h:503
L1TCaloParamsOnlineProd::readCaloLayer2OnlineSettings
bool readCaloLayer2OnlineSettings(l1t::CaloParamsHelperO2O &paramsHelper, std::map< std::string, l1t::Parameter > &conf, std::map< std::string, l1t::Mask > &)
Definition: L1TCaloParamsOnlineProd.cc:85
edm::LogError
Definition: MessageLogger.h:183
l1t::CaloParamsHelperO2O::setTauSeedThreshold
void setTauSeedThreshold(double thresh)
Definition: CaloParamsHelperO2O.h:314
L1TCaloParamsRcd
Definition: L1TCaloParamsRcd.h:16
l1t::CaloParamsHelperO2O::setEgBypassEGVetos
void setEgBypassEGVetos(unsigned flag)
Definition: CaloParamsHelperO2O.h:229
mps_setup.append
append
Definition: mps_setup.py:85
l1t::CaloParamsHelperO2O::setTauIsolationLUT
void setTauIsolationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:323
l1t::CaloParamsHelperO2O::setEgCalibrationLUT
void setEgCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:264
l1t::CaloParamsHelperO2O::setEgBypassECALFG
void setEgBypassECALFG(unsigned flag)
Definition: CaloParamsHelperO2O.h:237
l1t::CaloParamsHelperO2O::setMetPhiCalibrationLUT
void setMetPhiCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:480
l1t::CaloParamsHelperO2O::setEtSumCentLower
void setEtSumCentLower(unsigned centClass, double loBound)
Definition: CaloParamsHelperO2O.h:497
l1t::CaloParamsHelperO2O::setEgBypassShape
void setEgBypassShape(unsigned flag)
Definition: CaloParamsHelperO2O.h:233
l1t::CaloParamsHelperO2O::setEgIsolationLUT
void setEgIsolationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:260
l1t::CaloParamsHelperO2O::setJetPUSUsePhiRing
void setJetPUSUsePhiRing(unsigned flag)
Definition: CaloParamsHelperO2O.h:391
l1t::CaloParamsHelperO2O::setLayer1HCalScaleETBins
void setLayer1HCalScaleETBins(const std::vector< int > params)
Definition: CaloParamsHelperO2O.h:561
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
l1t::TriggerSystem::getParameters
const std::map< std::string, Parameter > & getParameters(const char *processor) const
Definition: TriggerSystem.cc:168
L1TCaloParamsOnlineProd::readCaloLayer1OnlineSettings
bool readCaloLayer1OnlineSettings(l1t::CaloParamsHelperO2O &paramsHelper, std::map< std::string, l1t::Parameter > &conf, std::map< std::string, l1t::Mask > &)
Definition: L1TCaloParamsOnlineProd.cc:41
l1t::CaloParamsHelperO2O::setEgHOverEcutBarrel
void setEgHOverEcutBarrel(int cut)
Definition: CaloParamsHelperO2O.h:245
l1t::CaloParamsHelperO2O::setEgEtaCut
void setEgEtaCut(int mask)
Definition: CaloParamsHelperO2O.h:211
l1t::CaloParamsHelperO2O::setEgHOverEcutEndcap
void setEgHOverEcutEndcap(int cut)
Definition: CaloParamsHelperO2O.h:249
l1t::CaloParamsHelperO2O::setLayer1ECalScaleFactors
void setLayer1ECalScaleFactors(const std::vector< double > params)
Definition: CaloParamsHelperO2O.h:557
l1t::CaloParamsHelperO2O::setLayer1ECalScaleETBins
void setLayer1ECalScaleETBins(const std::vector< int > params)
Definition: CaloParamsHelperO2O.h:560
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
l1t::CaloParamsHelperO2O::setJetSeedThreshold
void setJetSeedThreshold(double thresh)
Definition: CaloParamsHelperO2O.h:374
l1t::CaloParamsHelperO2O::setEtSumEtaMax
void setEtSumEtaMax(unsigned isum, int eta)
Definition: CaloParamsHelperO2O.h:443
l1t::XmlConfigParser::readDOMFromString
void readDOMFromString(const std::string &str, xercesc::DOMDocument *&doc)
l1t::CaloParamsHelperO2O::setEgIsolationLUT2
void setEgIsolationLUT2(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:261
l1t::TriggerSystem::setConfigured
void setConfigured(bool state=true) noexcept
Definition: TriggerSystem.h:74
l1t::CaloParamsHelperO2O::setEtSumEttCalibrationLUT
void setEtSumEttCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:478
l1t::CaloParamsHelperO2O::setLayer1HFScaleETBins
void setLayer1HFScaleETBins(const std::vector< int > params)
Definition: CaloParamsHelperO2O.h:562
l1t::CaloParamsHelperO2O::setEgNeighbourThreshold
void setEgNeighbourThreshold(double thresh)
Definition: CaloParamsHelperO2O.h:217
l1t::CaloParamsHelperO2O::setEgBypassExtHOverE
void setEgBypassExtHOverE(unsigned flag)
Definition: CaloParamsHelperO2O.h:241
L1TCaloParamsOnlineProd::transactionSafe
bool transactionSafe
Definition: L1TCaloParamsOnlineProd.cc:23
crabWrapper.key
key
Definition: crabWrapper.py:19
L1ConfigOnlineProdBaseExt< L1TCaloParamsO2ORcd, l1t::CaloParams >::wrappedSetWhatProduced
edm::ESConsumesCollectorT< L1TCaloParamsO2ORcd > wrappedSetWhatProduced(const edm::ParameterSet &)
Definition: L1ConfigOnlineProdBaseExt.h:93
l1t::CaloParamsHelperO2O::setEgMaxPtHOverE
void setEgMaxPtHOverE(double thresh)
Definition: CaloParamsHelperO2O.h:221
l1t::CaloParamsHelperO2O::setMetHFPhiCalibrationLUT
void setMetHFPhiCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:481
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
l1t::CaloParamsHelperO2O::setEtSumEtThreshold
void setEtSumEtThreshold(unsigned isum, double thresh)
Definition: CaloParamsHelperO2O.h:448