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
 
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)
 

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

const edm::ESGetToken< l1t::CaloParams, L1TCaloParamsRcdbaseSettings_token
 
const unsigned int exclusiveLayer
 
const 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={})
 
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 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)

Definition at line 212 of file L1TCaloParamsOnlineProd.cc.

214  baseSettings_token(wrappedSetWhatProduced(iConfig).consumes()),
215  exclusiveLayer(iConfig.getParameter<uint32_t>("exclusiveLayer")),
216  transactionSafe(iConfig.getParameter<bool>("transactionSafe")) {}

◆ ~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 218 of file L1TCaloParamsOnlineProd.cc.

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

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(), AlCaHarvesting_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

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

Definition at line 22 of file L1TCaloParamsOnlineProd.cc.

Referenced by newObject().

◆ exclusiveLayer

const unsigned int L1TCaloParamsOnlineProd::exclusiveLayer
private

Definition at line 23 of file L1TCaloParamsOnlineProd.cc.

Referenced by newObject().

◆ transactionSafe

const bool L1TCaloParamsOnlineProd::transactionSafe
private

Definition at line 24 of file L1TCaloParamsOnlineProd.cc.

Referenced by newObject().

L1TCaloParamsOnlineProd::transactionSafe
const bool transactionSafe
Definition: L1TCaloParamsOnlineProd.cc:24
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:566
l1t::CaloParamsHelperO2O::setIsoTauEtaMax
void setIsoTauEtaMax(int value)
Definition: CaloParamsHelperO2O.h:321
mps_fire.i
i
Definition: mps_fire.py:428
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:72
l1t::CaloParamsHelperO2O::setLayer1HCalScaleFactors
void setLayer1HCalScaleFactors(const std::vector< double > params)
Definition: CaloParamsHelperO2O.h:559
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
l1t::TriggerSystem::addProcessor
void addProcessor(const char *processor, const char *role, const char *crate, const char *slot)
Definition: TriggerSystem.cc:26
l1t::CaloParamsHelperO2O::setEgSeedThreshold
void setEgSeedThreshold(double thresh)
Definition: CaloParamsHelperO2O.h:216
l1t::CaloParamsHelperO2O::setLayer1ECalScalePhiBins
void setLayer1ECalScalePhiBins(const std::vector< unsigned > params)
Definition: CaloParamsHelperO2O.h:564
L1TCaloParamsOnlineProd::baseSettings_token
const edm::ESGetToken< l1t::CaloParams, L1TCaloParamsRcd > baseSettings_token
Definition: L1TCaloParamsOnlineProd.cc:22
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
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:565
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:560
l1t::CaloParamsHelperO2O::setJetBypassPUS
void setJetBypassPUS(unsigned flag)
Definition: CaloParamsHelperO2O.h:387
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:569
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
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
AlCaHarvesting_cff.record
record
Definition: AlCaHarvesting_cff.py:42
l1t::CaloParamsHelperO2O::setEgBypassECALFG
void setEgBypassECALFG(unsigned flag)
Definition: CaloParamsHelperO2O.h:237
l1t::CaloParamsHelperO2O::setMetPhiCalibrationLUT
void setMetPhiCalibrationLUT(const l1t::LUT &lut)
Definition: CaloParamsHelperO2O.h:480
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
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
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1t::CaloParamsHelperO2O::setLayer1HCalScaleETBins
void setLayer1HCalScaleETBins(const std::vector< int > params)
Definition: CaloParamsHelperO2O.h:562
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
l1t::CaloParamsHelperO2O::setLayer1ECalScaleFactors
void setLayer1ECalScaleFactors(const std::vector< double > params)
Definition: CaloParamsHelperO2O.h:558
l1t::CaloParamsHelperO2O::setLayer1ECalScaleETBins
void setLayer1ECalScaleETBins(const std::vector< int > params)
Definition: CaloParamsHelperO2O.h:561
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
L1TCaloParamsOnlineProd::exclusiveLayer
const unsigned int exclusiveLayer
Definition: L1TCaloParamsOnlineProd.cc:23
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:563
l1t::CaloParamsHelperO2O::setEgNeighbourThreshold
void setEgNeighbourThreshold(double thresh)
Definition: CaloParamsHelperO2O.h:217
l1t::CaloParamsHelperO2O::setEgBypassExtHOverE
void setEgBypassExtHOverE(unsigned flag)
Definition: CaloParamsHelperO2O.h:241
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