CMS 3D CMS Logo

L1TRate.cc
Go to the documentation of this file.
1 /*
2  * \file L1TRate.cc
3  *
4  * \author J. Pela, P. Musella
5  *
6  */
7 
8 // L1TMonitor includes
12 
14 
15 #include "DataFormats/Common/interface/ConditionsInEdm.h" // Parameters associated to Run, LS and Event
16 #include "DataFormats/Luminosity/interface/LumiDetails.h" // Luminosity Information
17 #include "DataFormats/Luminosity/interface/LumiSummary.h" // Luminosity Information
18 
26 
27 #include "TList.h"
28 
29 using namespace edm;
30 using namespace std;
31 
32 //_____________________________________________________________________
33 L1TRate::L1TRate(const ParameterSet& ps) : m_l1GtUtils(ps, consumesCollector(), false, *this) {
34  m_maxNbins = 2500; // Maximum LS for each run (for binning purposes)
35  m_parameters = ps;
36 
37  // Mapping parameter input variables
39  consumes<LumiScalersCollection>(m_parameters.getParameter<InputTag>("inputTagScalersResults"));
41  consumes<Level1TriggerScalersCollection>(m_parameters.getParameter<InputTag>("inputTagScalersResults"));
43  consumes<L1GlobalTriggerReadoutRecord>(m_parameters.getParameter<InputTag>("inputTagL1GtDataDaq"));
44  m_verbose = m_parameters.getUntrackedParameter<bool>("verbose", false);
45  m_refPrescaleSet = m_parameters.getParameter<int>("refPrescaleSet");
46  m_lsShiftGTRates = m_parameters.getUntrackedParameter<int>("lsShiftGTRates", 0);
47 
48  // Getting which categories to monitor
50  m_inputCategories["Mu"] = Categories.getUntrackedParameter<bool>("Mu");
51  m_inputCategories["EG"] = Categories.getUntrackedParameter<bool>("EG");
52  m_inputCategories["IsoEG"] = Categories.getUntrackedParameter<bool>("IsoEG");
53  m_inputCategories["Jet"] = Categories.getUntrackedParameter<bool>("Jet");
54  m_inputCategories["CenJet"] = Categories.getUntrackedParameter<bool>("CenJet");
55  m_inputCategories["ForJet"] = Categories.getUntrackedParameter<bool>("ForJet");
56  m_inputCategories["TauJet"] = Categories.getUntrackedParameter<bool>("TauJet");
57  m_inputCategories["ETM"] = Categories.getUntrackedParameter<bool>("ETM");
58  m_inputCategories["ETT"] = Categories.getUntrackedParameter<bool>("ETT");
59  m_inputCategories["HTT"] = Categories.getUntrackedParameter<bool>("HTT");
60  m_inputCategories["HTM"] = Categories.getUntrackedParameter<bool>("HTM");
61 
62  // What to do if we want our output to be saved to a external file
63  m_outputFile = ps.getUntrackedParameter<string>("outputFile", "");
64 
65  if (!m_outputFile.empty()) {
66  cout << "L1T Monitoring histograms will be saved to " << m_outputFile.c_str() << endl;
67  }
68 
69  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
70  if (disable) {
71  m_outputFile = "";
72  }
73 }
74 
75 //_____________________________________________________________________
77 
78 //_____________________________________________________________________
79 // BeginRun
80 //_____________________________________________________________________
81 void L1TRate::bookHistograms(DQMStore::IBooker& ibooker, const edm::Run&, const edm::EventSetup& iSetup) {
84 
85  iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
86  iSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
87 
88  const L1GtTriggerMenu* menu = menuRcd.product();
89  const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
90 
91  // Initializing DQM Monitor Elements
92  ibooker.setCurrentFolder("L1T/L1TRate");
93  m_ErrorMonitor = ibooker.book1D("ErrorMonitor", "ErrorMonitor", 5, 0, 5);
94  m_ErrorMonitor->setBinLabel(1, "WARNING_DB_CONN_FAILED"); // Errors from L1TOMDSHelper
95  m_ErrorMonitor->setBinLabel(2, "WARNING_DB_QUERY_FAILED"); // Errors from L1TOMDSHelper
96  m_ErrorMonitor->setBinLabel(3, "WARNING_DB_INCORRECT_NBUNCHES"); // Errors from L1TOMDSHelper
97  m_ErrorMonitor->setBinLabel(4, "WARNING_PY_MISSING_FIT");
98  m_ErrorMonitor->setBinLabel(5, "UNKNOWN");
99 
100  // Retriving the list of prescale sets
101  m_listsPrescaleFactors = &(m_l1GtPfAlgo->gtPrescaleFactors());
102 
103  // Getting Lowest Prescale Single Object Triggers from the menu
104  L1TMenuHelper myMenuHelper = L1TMenuHelper(iSetup);
107 
108  //-> Getting template fits for the algLo cross sections
109  int srcAlgoXSecFit = m_parameters.getParameter<int>("srcAlgoXSecFit");
110  if (srcAlgoXSecFit == 0) {
112  } else if (srcAlgoXSecFit == 1) {
114  }
115 
116  for (CItAlgo algo = menu->gtAlgorithmMap().begin(); algo != menu->gtAlgorithmMap().end(); ++algo) {
117  m_algoBit[(algo->second).algoAlias()] = (algo->second).algoBitNumber();
118  }
119 
120  double minInstantLuminosity = m_parameters.getParameter<double>("minInstantLuminosity");
121  double maxInstantLuminosity = m_parameters.getParameter<double>("maxInstantLuminosity");
122 
123  // Initializing DQM Monitor Elements
124  for (map<string, string>::const_iterator i = m_selectedTriggers.begin(); i != m_selectedTriggers.end(); i++) {
125  TString tCategory = (*i).first;
126  TString tTrigger = (*i).second;
127 
128  TString tErrorMessage = "";
129  TF1* tTestFunction;
130 
131  if (tTrigger != "Undefined" && m_templateFunctions.find(tTrigger) != m_templateFunctions.end()) {
132  tTestFunction = m_templateFunctions[tTrigger];
133  } else if (tTrigger == "Undefined") {
134  TString tFunc = "-1";
135  tTestFunction = new TF1("FitParametrization_" + tTrigger, tFunc, 0, double(m_maxNbins) - 0.5);
136  } else if (m_templateFunctions.find(tTrigger) == m_templateFunctions.end()) {
137  TString tFunc = "-1";
138  tTestFunction = new TF1("FitParametrization_" + tTrigger, tFunc, 0, double(m_maxNbins) - 0.5);
139  tErrorMessage = " (Undefined Test Function)";
140  } else {
141  TString tFunc = "-1";
142  tTestFunction = new TF1("FitParametrization_" + tTrigger, tFunc, 0, double(m_maxNbins) - 0.5);
143  }
144 
145  if (tTrigger != "Undefined") {
146  if (myMenuHelper.getPrescaleByAlias(tCategory, tTrigger) != 1) {
147  tErrorMessage += " WARNING: Default Prescale = ";
148  tErrorMessage += myMenuHelper.getPrescaleByAlias(tCategory, tTrigger);
149  }
150 
151  if (tCategory == "Mu" && myMenuHelper.getEtaRangeByAlias(tCategory, tTrigger) != 4294967295) {
152  tErrorMessage += " WARNING: Eta Range = ";
153  tErrorMessage += myMenuHelper.getEtaRangeByAlias(tCategory, tTrigger);
154  } else if (tCategory == "EG" && myMenuHelper.getEtaRangeByAlias(tCategory, tTrigger) != 32639) {
155  tErrorMessage += " WARNING: Eta Range = ";
156  tErrorMessage += myMenuHelper.getEtaRangeByAlias(tCategory, tTrigger);
157  } else if (tCategory == "IsoEG" && myMenuHelper.getEtaRangeByAlias(tCategory, tTrigger) != 32639) {
158  tErrorMessage += " WARNING: Eta Range = ";
159  tErrorMessage += myMenuHelper.getEtaRangeByAlias(tCategory, tTrigger);
160  }
161 
162  if (tCategory == "Mu" && myMenuHelper.getQualityAlias(tCategory, tTrigger) != 240) {
163  tErrorMessage += " WARNING: Quality = ";
164  tErrorMessage += myMenuHelper.getQualityAlias(tCategory, tTrigger);
165  }
166  }
167 
168  ibooker.setCurrentFolder("L1T/L1TRate/TriggerCrossSections");
169  m_xSecVsInstLumi[tTrigger] = ibooker.bookProfile(tCategory,
170  "Cross Sec. vs Inst. Lumi Algo: " + tTrigger + tErrorMessage,
171  m_maxNbins,
174  0,
175  500);
176  m_xSecVsInstLumi[tTrigger]->setAxisTitle("Instantaneous Luminosity [10^{30}cm^{-2}s^{-1}]", 1);
177  m_xSecVsInstLumi[tTrigger]->setAxisTitle("Algorithm #sigma [#mu b]", 2);
178  m_xSecVsInstLumi[tTrigger]->getTProfile()->GetListOfFunctions()->Add(tTestFunction);
179  m_xSecVsInstLumi[tTrigger]->getTProfile()->SetMarkerStyle(23);
180 
181  ibooker.setCurrentFolder("L1T/L1TRate/Certification");
182  m_xSecObservedToExpected[tTrigger] =
183  ibooker.book1D(tCategory, "Algo: " + tTrigger + tErrorMessage, m_maxNbins, -0.5, double(m_maxNbins) - 0.5);
184  m_xSecObservedToExpected[tTrigger]->setAxisTitle("Lumi Section", 1);
185  m_xSecObservedToExpected[tTrigger]->setAxisTitle("#sigma_{obs} / #sigma_{exp}", 2);
186  }
187 }
188 
190  //
191  if (m_verbose) {
192  cout << "[L1TRate:] Called beginRun." << endl;
193  }
194 }
195 //_____________________________________________________________________
197  if (m_verbose) {
198  cout << "[L1TRate:] Called beginLuminosityBlock at LS=" << lumiBlock.id().luminosityBlock() << endl;
199  }
200 }
201 
202 //_____________________________________________________________________
203 void L1TRate::endLuminosityBlock(LuminosityBlock const& lumiBlock, EventSetup const& c) {
204  int eventLS = lumiBlock.id().luminosityBlock();
205  if (m_verbose) {
206  cout << "[L1TRate:] Called endLuminosityBlock at LS=" << eventLS << endl;
207  }
208 
209  // We can certify LS -1 since we should have available:
210  // gt rates: (current LS)-1
211  // prescale: current LS
212  // lumi : current LS
213  //eventLS--;
214 
215  // Checking if all necessary quantities are defined for our calculations
216  bool isDefRate, isDefLumi, isDefPrescaleIndex;
217  map<TString, double>* rates = nullptr;
218  double lumi = 0;
219  int prescalesIndex = 0;
220 
221  // Reseting MonitorElements so we can refill them
222  for (map<string, string>::const_iterator i = m_selectedTriggers.begin(); i != m_selectedTriggers.end(); i++) {
223  string tTrigger = (*i).second;
224  m_xSecObservedToExpected[tTrigger]->getTH1()->Reset("ICE");
225  m_xSecVsInstLumi[tTrigger]->getTH1()->Reset("ICE");
226  }
227 
228  for (map<int, map<TString, double> >::iterator i = m_lsRates.begin(); i != m_lsRates.end(); i++) {
229  unsigned int ls = (*i).first;
230  rates = &(*i).second;
231  isDefRate = true;
232 
233  if (m_lsLuminosity.find(ls) == m_lsLuminosity.end()) {
234  isDefLumi = false;
235  } else {
236  isDefLumi = true;
238  }
239 
240  if (m_lsPrescaleIndex.find(ls) == m_lsPrescaleIndex.end()) {
241  isDefPrescaleIndex = false;
242  } else {
243  isDefPrescaleIndex = true;
244  prescalesIndex = m_lsPrescaleIndex[ls];
245  }
246 
247  if (isDefRate && isDefLumi && isDefPrescaleIndex) {
248  const vector<int>& currentPrescaleFactors = (*m_listsPrescaleFactors).at(prescalesIndex);
249 
250  for (map<string, string>::const_iterator i = m_selectedTriggers.begin(); i != m_selectedTriggers.end(); i++) {
251  string tTrigger = (*i).second;
252  TF1* tTestFunction = (TF1*)m_xSecVsInstLumi[tTrigger]->getTProfile()->GetListOfFunctions()->First();
253 
254  // If trigger name is defined we get the rate fit parameters
255  if (tTrigger != "Undefined") {
256  unsigned int trigBit = m_algoBit[tTrigger];
257  double trigPrescale = currentPrescaleFactors[trigBit];
258  double trigRate = (*rates)[tTrigger];
259 
260  if (lumi != 0 && trigPrescale != 0 && trigRate != 0) {
261  double AlgoXSec = (trigPrescale * trigRate) / lumi;
262  double TemplateFunctionValue = tTestFunction->Eval(lumi);
263 
264  // Checking against Template function
265  int ibin = m_xSecObservedToExpected[tTrigger]->getTH1()->FindBin(ls);
266  m_xSecObservedToExpected[tTrigger]->setBinContent(ibin, AlgoXSec / TemplateFunctionValue);
267  m_xSecVsInstLumi[tTrigger]->Fill(lumi, AlgoXSec);
268 
269  if (m_verbose) {
270  cout << "[L1TRate:] ls=" << ls << " Algo=" << tTrigger << " XSec=" << AlgoXSec
271  << " Test=" << AlgoXSec / TemplateFunctionValue << endl;
272  }
273 
274  } else {
275  int ibin = m_xSecObservedToExpected[tTrigger]->getTH1()->FindBin(ls);
276  m_xSecObservedToExpected[tTrigger]->setBinContent(ibin, 0.000001);
277  if (m_verbose) {
278  cout << "[L1TRate:] Algo=" << tTrigger << " XSec=Failed" << endl;
279  }
280  }
281  }
282  }
283  }
284  }
285 }
286 
287 //_____________________________________________________________________
288 void L1TRate::analyze(const Event& iEvent, const EventSetup& eventSetup) {
289  edm::Handle<L1GlobalTriggerReadoutRecord> gtReadoutRecordData;
292 
293  iEvent.getByToken(m_l1GtDataDaqInputTag, gtReadoutRecordData);
294  iEvent.getByToken(m_scalersSource_colLScal, colLScal);
295  iEvent.getByToken(m_scalersSource_triggerScalers, triggerScalers);
296 
297  // Integers
298  int EventRun = iEvent.id().run();
299  unsigned int eventLS = iEvent.id().luminosityBlock();
300 
301  // Getting the trigger trigger rates from GT and buffering it
302  if (triggerScalers.isValid()) {
303  Level1TriggerScalersCollection::const_iterator itL1TScalers = triggerScalers->begin();
304  Level1TriggerRates trigRates(*itL1TScalers, EventRun);
305 
306  int gtLS = (*itL1TScalers).lumiSegmentNr() + m_lsShiftGTRates;
307 
308  // If we haven't got the data from this LS yet get it
309  if (m_lsRates.find(gtLS) == m_lsRates.end()) {
310  if (m_verbose) {
311  cout << "[L1TRate:] Buffering GT Rates for LS=" << gtLS << endl;
312  }
313  map<TString, double> bufferRate;
314 
315  // Buffer the rate informations for all selected bits
316  for (map<string, string>::const_iterator i = m_selectedTriggers.begin(); i != m_selectedTriggers.end(); i++) {
317  string tTrigger = (*i).second;
318 
319  // If trigger name is defined we store the rate
320  if (tTrigger != "Undefined") {
321  unsigned int trigBit = m_algoBit[tTrigger];
322  double trigRate = trigRates.gtAlgoCountsRate()[trigBit];
323 
324  bufferRate[tTrigger] = trigRate;
325  }
326  }
327  m_lsRates[gtLS] = bufferRate;
328  }
329  }
330 
331  // Getting from the SCAL the luminosity information and buffering it
332  if (colLScal.isValid() && !colLScal->empty()) {
333  LumiScalersCollection::const_iterator itLScal = colLScal->begin();
334  unsigned int scalLS = itLScal->sectionNumber();
335 
336  // If we haven't got the data from this SCAL LS yet get it
337  if (m_lsLuminosity.find(scalLS) == m_lsLuminosity.end()) {
338  if (m_verbose) {
339  cout << "[L1TRate:] Buffering SCAL-HF Lumi for LS=" << scalLS << endl;
340  }
341  double instLumi = itLScal->instantLumi(); // Getting Instant Lumi from HF (via SCAL)
342  double deadTimeNormHF = itLScal->deadTimeNormalization(); // Getting Dead Time Normalization from HF (via SCAL)
343 
344  // If HF Dead Time Corrections is requested we apply it
345  // NOTE: By default this is assumed false since for now WbM fits do NOT assume this correction
346  if (m_parameters.getUntrackedParameter<bool>("useHFDeadTimeNormalization", false)) {
347  // Protecting for deadtime = 0
348  if (deadTimeNormHF == 0) {
349  instLumi = 0;
350  } else {
351  instLumi = instLumi / deadTimeNormHF;
352  }
353  }
354  // Buffering the luminosity information
355  m_lsLuminosity[scalLS] = instLumi;
356  }
357  }
358 
359  // Getting the prescale index used when this event was triggered
360  if (gtReadoutRecordData.isValid()) {
361  // If we haven't got the data from this LS yet get it
362  if (m_lsPrescaleIndex.find(eventLS) == m_lsPrescaleIndex.end()) {
363  if (m_verbose) {
364  cout << "[L1TRate:] Buffering Prescale Index for LS=" << eventLS << endl;
365  }
366 
367  // Getting Final Decision Logic (FDL) Data from GT
368  const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->gtFdlVector();
369 
370  // Getting the index for the fdl data for this event
371  int indexFDL = 0;
372  for (unsigned int i = 0; i < gtFdlVectorData.size(); i++) {
373  if (gtFdlVectorData[i].bxInEvent() == 0) {
374  indexFDL = i;
375  break;
376  }
377  }
378 
379  int CurrentPrescalesIndex = gtFdlVectorData[indexFDL].gtPrescaleFactorIndexAlgo();
380  m_lsPrescaleIndex[eventLS] = CurrentPrescalesIndex;
381  }
382  }
383 }
384 
385 //_____________________________________________________________________
386 // function: getXSexFitsOMDS
387 // Imputs:
388 // * const edm::ParameterSet& ps = ParameterSet contaning necessary
389 // information for the OMDS data extraction
390 // Outputs:
391 // * int error = Number of algos where you did not find a
392 // corresponding fit
393 //_____________________________________________________________________
395  bool noError = true;
396 
397  string oracleDB = ps.getParameter<string>("oracleDB");
398  string pathCondDB = ps.getParameter<string>("pathCondDB");
399 
400  L1TOMDSHelper myOMDSHelper;
401  int conError;
402  myOMDSHelper.connect(oracleDB, pathCondDB, conError);
403 
404  map<string, WbMTriggerXSecFit> wbmFits;
405 
406  if (conError == L1TOMDSHelper::NO_ERROR) {
407  int errorRetrive;
408  wbmFits = myOMDSHelper.getWbMAlgoXsecFits(errorRetrive);
409 
410  // Filling errors if they exist
411  if (errorRetrive != L1TOMDSHelper::NO_ERROR) {
412  noError = false;
413  string eName = myOMDSHelper.enumToStringError(errorRetrive);
414  m_ErrorMonitor->Fill(eName);
415  }
416  } else {
417  noError = false;
418  string eName = myOMDSHelper.enumToStringError(conError);
419  m_ErrorMonitor->Fill(eName);
420  }
421 
422  double minInstantLuminosity = m_parameters.getParameter<double>("minInstantLuminosity");
423  double maxInstantLuminosity = m_parameters.getParameter<double>("maxInstantLuminosity");
424 
425  // Getting rate fit parameters for all input triggers
426  for (map<string, string>::const_iterator a = m_selectedTriggers.begin(); a != m_selectedTriggers.end(); a++) {
427  string tTrigger = (*a).second;
428 
429  // If trigger name is defined we get the rate fit parameters
430  if (tTrigger != "Undefined") {
431  if (wbmFits.find(tTrigger) != wbmFits.end()) {
432  WbMTriggerXSecFit tWbMParameters = wbmFits[tTrigger];
433 
434  vector<double> tParameters;
435  tParameters.push_back(tWbMParameters.pm1);
436  tParameters.push_back(tWbMParameters.p0);
437  tParameters.push_back(tWbMParameters.p1);
438  tParameters.push_back(tWbMParameters.p2);
439 
440  // Retriving and populating the m_templateFunctions array
441  m_templateFunctions[tTrigger] = new TF1("FitParametrization_" + tWbMParameters.bitName,
442  tWbMParameters.fitFunction,
445  m_templateFunctions[tTrigger]->SetParameters(&tParameters[0]);
446  m_templateFunctions[tTrigger]->SetLineWidth(1);
447  m_templateFunctions[tTrigger]->SetLineColor(kRed);
448 
449  } else {
450  noError = false;
451  }
452  }
453  }
454 
455  return noError;
456 }
457 
458 //_____________________________________________________________________
459 // function: getXSexFitsPython
460 // Imputs:
461 // * const edm::ParameterSet& ps = ParameterSet contaning the fit
462 // functions and parameters for the selected triggers
463 // Outputs:
464 // * int error = Number of algos where you did not find a
465 // corresponding fit
466 //_____________________________________________________________________
468  // error meaning
469  bool noError = true;
470 
471  // Getting fit parameters
472  std::vector<edm::ParameterSet> m_fitParameters = ps.getParameter<vector<ParameterSet> >("fitParameters");
473 
474  double minInstantLuminosity = m_parameters.getParameter<double>("minInstantLuminosity");
475  double maxInstantLuminosity = m_parameters.getParameter<double>("maxInstantLuminosity");
476 
477  // Getting rate fit parameters for all input triggers
478  for (map<string, string>::const_iterator a = m_selectedTriggers.begin(); a != m_selectedTriggers.end(); a++) {
479  string tTrigger = (*a).second;
480 
481  // If trigger name is defined we get the rate fit parameters
482  if (tTrigger != "Undefined") {
483  bool foundFit = false;
484 
485  for (unsigned int b = 0; b < m_fitParameters.size(); b++) {
486  if (tTrigger == m_fitParameters[b].getParameter<string>("AlgoName")) {
487  TString tAlgoName = m_fitParameters[b].getParameter<string>("AlgoName");
488  TString tTemplateFunction = m_fitParameters[b].getParameter<string>("TemplateFunction");
489  vector<double> tParameters = m_fitParameters[b].getParameter<vector<double> >("Parameters");
490 
491  // Retriving and populating the m_templateFunctions array
492  m_templateFunctions[tTrigger] =
493  new TF1("FitParametrization_" + tAlgoName, tTemplateFunction, minInstantLuminosity, maxInstantLuminosity);
494  m_templateFunctions[tTrigger]->SetParameters(&tParameters[0]);
495  m_templateFunctions[tTrigger]->SetLineWidth(1);
496  m_templateFunctions[tTrigger]->SetLineColor(kRed);
497 
498  foundFit = true;
499  break;
500  }
501 
502  if (!foundFit) {
503  noError = false;
504  string eName = "WARNING_PY_MISSING_FIT";
505  m_ErrorMonitor->Fill(eName);
506  }
507  }
508  }
509  }
510 
511  return noError;
512 }
L1TOMDSHelper
Definition: L1TOMDSHelper.h:50
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
L1TRate::m_refPrescaleSet
int m_refPrescaleSet
Definition: L1TRate.h:75
L1GtTriggerMenu.h
L1TRate::m_inputCategories
std::map< std::string, bool > m_inputCategories
Definition: L1TRate.h:90
mps_fire.i
i
Definition: mps_fire.py:355
L1GtPrescaleFactors
Definition: L1GtPrescaleFactors.h:32
L1TSync_cfi.Categories
Categories
Definition: L1TSync_cfi.py:26
L1TBPTX_cfi.oracleDB
oracleDB
Definition: L1TBPTX_cfi.py:14
L1TRate::m_parameters
edm::ParameterSet m_parameters
Definition: L1TRate.h:102
L1GtTriggerMaskAlgoTrigRcd.h
funct::false
false
Definition: Factorize.h:34
L1TRate::m_verbose
bool m_verbose
Definition: L1TRate.h:72
L1GtTriggerMask.h
L1TRate::getXSexFitsOMDS
bool getXSexFitsOMDS(const edm::ParameterSet &ps)
Definition: L1TRate.cc:394
L1TRate_cfi.srcAlgoXSecFit
srcAlgoXSecFit
Definition: L1TRate_cfi.py:57
L1TRate::m_l1GtUtils
L1GtUtils m_l1GtUtils
Definition: L1TRate.h:110
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
L1TRate::m_lsPrescaleIndex
std::map< int, int > m_lsPrescaleIndex
Definition: L1TRate.h:86
edm
HLT enums.
Definition: AlignableModifier.h:19
L1GtTriggerMenuRcd.h
gather_cfg.cout
cout
Definition: gather_cfg.py:144
Level1TriggerRates::gtAlgoCountsRate
std::vector< double > gtAlgoCountsRate() const
Definition: Level1TriggerRates.h:103
L1TRate_cfi.minInstantLuminosity
minInstantLuminosity
Definition: L1TRate_cfi.py:28
L1GtPrescaleFactors::gtPrescaleFactors
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
Definition: L1GtPrescaleFactors.h:45
L1TRate::m_l1GtDataDaqInputTag
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TRate.h:99
L1TRate::m_listsPrescaleFactors
const std::vector< std::vector< int > > * m_listsPrescaleFactors
Definition: L1TRate.h:83
L1TRate::m_lsRates
std::map< int, std::map< TString, double > > m_lsRates
Definition: L1TRate.h:88
L1TRate::m_selectedTriggers
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TRate.h:91
DQMStore.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
L1TRate::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1TRate.cc:288
WbMTriggerXSecFit::p0
float p0
Definition: L1TOMDSHelper.h:47
L1TRate::m_lsLuminosity
std::map< int, double > m_lsLuminosity
Definition: L1TRate.h:87
WbMTriggerXSecFit::p2
float p2
Definition: L1TOMDSHelper.h:47
L1TMenuHelper::getQualityAlias
unsigned int getQualityAlias(const TString &iCategory, const TString &iAlias)
Definition: L1TMenuHelper.cc:754
tools.TF1
TF1
Definition: tools.py:23
edm::Handle
Definition: AssociativeIterator.h:50
L1TMenuHelper::getPrescaleByAlias
int getPrescaleByAlias(const TString &iCategory, const TString &iAlias)
Definition: L1TMenuHelper.cc:604
L1TBPTX_cfi.pathCondDB
pathCondDB
Definition: L1TBPTX_cfi.py:15
L1TRate::m_templateFunctions
std::map< TString, TF1 * > m_templateFunctions
Definition: L1TRate.h:94
cmsdt::algo
algo
Definition: constants.h:164
L1TOMDSHelper::NO_ERROR
Definition: L1TOMDSHelper.h:52
Level1TriggerRates
Definition: Level1TriggerRates.h:30
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:38
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::ESHandle< L1GtTriggerMenu >
WbMTriggerXSecFit::fitFunction
TString fitFunction
Definition: L1TOMDSHelper.h:45
L1TRate::bookHistograms
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
Definition: L1TRate.cc:81
b
double b
Definition: hdecay.h:118
L1TRate::m_xSecVsInstLumi
std::map< TString, MonitorElement * > m_xSecVsInstLumi
Definition: L1TRate.h:93
L1TMenuHelper
Definition: L1TMenuHelper.h:79
optionsL1T.menu
menu
Definition: optionsL1T.py:29
edm::ParameterSet
Definition: ParameterSet.h:36
a
double a
Definition: hdecay.h:119
L1TRate::getXSexFitsPython
bool getXSexFitsPython(const edm::ParameterSet &ps)
Definition: L1TRate.cc:467
L1GtTriggerMenu
Definition: L1GtTriggerMenu.h:48
LumiDetails.h
L1TRate::dqmBeginRun
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: L1TRate.cc:189
L1TRate::m_outputFile
std::string m_outputFile
Definition: L1TRate.h:80
WbMTriggerXSecFit::p1
float p1
Definition: L1TOMDSHelper.h:47
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::LuminosityBlockID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockID.h:42
edm::LuminosityBlockBase::id
LuminosityBlockID id() const
Definition: LuminosityBlockBase.h:44
dqm::impl::MonitorElement::setBinLabel
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:771
L1GtPrescaleFactorsAlgoTrigRcd.h
L1GtUtils::retrieveL1EventSetup
void retrieveL1EventSetup(const edm::EventSetup &, bool isRun=true)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed
Definition: L1GtUtils.cc:127
L1TRate::m_xSecObservedToExpected
std::map< TString, MonitorElement * > m_xSecObservedToExpected
Definition: L1TRate.h:92
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
get
#define get
muonGEMDigis_cfi.instLumi
instLumi
Definition: muonGEMDigis_cfi.py:10
L1TRate_cfi.maxInstantLuminosity
maxInstantLuminosity
Definition: L1TRate_cfi.py:29
L1TRate::m_lsShiftGTRates
int m_lsShiftGTRates
Definition: L1TRate.h:77
L1TRate::m_ErrorMonitor
MonitorElement * m_ErrorMonitor
Definition: L1TRate.h:105
WbMTriggerXSecFit::bitName
TString bitName
Definition: L1TOMDSHelper.h:44
L1TRate::~L1TRate
~L1TRate() override
Definition: L1TRate.cc:76
L1TMenuHelper.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
std
Definition: JetResolutionObject.h:76
L1TMenuHelper::getLUSOTrigger
std::map< std::string, std::string > getLUSOTrigger(const std::map< std::string, bool > &iCategories, int IndexRefPrescaleFactors, L1GtUtils const &myUtils)
Definition: L1TMenuHelper.cc:57
ConditionsInEdm.h
L1TOMDSHelper::connect
bool connect(std::string iOracleDB, std::string iPathCondDB, int &error)
Definition: L1TOMDSHelper.cc:15
LumiSummary.h
L1TRate::m_maxNbins
int m_maxNbins
Definition: L1TRate.h:76
L1TMenuHelper::getEtaRangeByAlias
unsigned int getEtaRangeByAlias(const TString &iCategory, const TString &iAlias)
Definition: L1TMenuHelper.cc:679
WbMTriggerXSecFit::pm1
float pm1
Definition: L1TOMDSHelper.h:47
L1TRate::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TRate.cc:203
WbMTriggerXSecFit
Definition: L1TOMDSHelper.h:43
L1TRate::L1TRate
L1TRate(const edm::ParameterSet &ps)
Definition: L1TRate.cc:33
genParticles_cff.map
map
Definition: genParticles_cff.py:11
L1GtTriggerMenuFwd.h
L1GtPrescaleFactorsAlgoTrigRcd
Definition: L1GtPrescaleFactorsAlgoTrigRcd.h:38
L1TRate::m_algoBit
std::map< TString, int > m_algoBit
Definition: L1TRate.h:89
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
L1TRate.h
lumi
Definition: LumiSectionData.h:20
L1TRate::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TRate.cc:196
L1TRate::m_scalersSource_triggerScalers
edm::EDGetTokenT< Level1TriggerScalersCollection > m_scalersSource_triggerScalers
Definition: L1TRate.h:98
edm::InputTag
Definition: InputTag.h:15
L1GtPrescaleFactors.h
L1GlobalTriggerReadoutRecord::gtFdlVector
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
Definition: L1GlobalTriggerReadoutRecord.h:119
L1TOMDSHelper.h
L1TRate::m_scalersSource_colLScal
edm::EDGetTokenT< LumiScalersCollection > m_scalersSource_colLScal
Definition: L1TRate.h:97