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