CMS 3D CMS Logo

L1TBPTX.cc
Go to the documentation of this file.
2 
4 
7 
8 #include "DataFormats/Common/interface/ConditionsInEdm.h" // Parameters associated to Run, LS and Event
9 
17 
18 // Luminosity Information
19 //#include "DataFormats/Luminosity/interface/LumiDetails.h"
20 //#include "DataFormats/Luminosity/interface/LumiSummary.h"
21 
22 // L1TMonitor includes
24 
25 #include "TList.h"
26 #include <string>
27 
28 using namespace edm;
29 using namespace std;
30 
31 //-------------------------------------------------------------------------------------
32 //-------------------------------------------------------------------------------------
34 
35  m_parameters = pset;
36 
37  // Mapping parameter input variables
38  m_scalersSource = consumes<Level1TriggerScalersCollection>(pset.getParameter <InputTag>("inputTagScalersResults"));
39  m_l1GtDataDaqInputTag = consumes<L1GlobalTriggerReadoutRecord>(pset.getParameter <InputTag>("inputTagL1GtDataDaq"));
40  m_l1GtEvmSource = consumes<L1GlobalTriggerEvmReadoutRecord>(pset.getParameter <InputTag>("inputTagtEvmSource"));
41  m_verbose = pset.getUntrackedParameter<bool> ("verbose",false);
42 // m_refPrescaleSet = pset.getParameter <int> ("refPrescaleSet");
43 
44  m_monitorBits = pset.getParameter< vector<ParameterSet> >("MonitorBits");
45 
46  for(unsigned i=0; i<m_monitorBits.size(); i++){
47 
48  // Algorithms
49  if(m_monitorBits[i].getParameter<bool>("bitType")){
50 
51  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
52  int offset = m_monitorBits[i].getParameter<int>("bitOffset");
53  m_selAlgoBit.push_back( pair<int,int>(bit,offset) );
54  }
55  // Tech
56  else{
57  int bit = m_monitorBits[i].getParameter<int>("bitNumber");
58  int offset = m_monitorBits[i].getParameter<int>("bitOffset");
59  m_selTechBit.push_back( pair<int,int>(bit,offset) );
60  }
61  }
62 
63  m_monitorRates = pset.getParameter< vector<ParameterSet> >("MonitorRates");
64 
65 }
66 
67 //-------------------------------------------------------------------------------------
68 //-------------------------------------------------------------------------------------
70 
71 //-------------------------------------------------------------------------------------
73 //-------------------------------------------------------------------------------------
74 void L1TBPTX::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run& iRun, const edm::EventSetup& iSetup){
75 
76  if (m_verbose){cout << "[L1TBPTX] Called beginRun." << endl;}
77 
78  ibooker.setCurrentFolder("L1T/L1TBPTX");
79 
80  // Initializing variables
81  int maxNbins = 2501;
82 
83  // Reseting run dependent variables
84  m_lhcFill = 0;
85  m_currentLS = 0;
86 
87  // Getting Trigger menu from GT
89  iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
90  const L1GtTriggerMenu* menu = menuRcd.product();
91 
92  // Filling Alias-Bit Map
93  for (CItAlgo algo = menu->gtAlgorithmAliasMap().begin(); algo!=menu->gtAlgorithmAliasMap().end(); ++algo){
94  m_algoBit_Alias[(algo->second).algoBitNumber()] = (algo->second).algoAlias();
95  }
96 
97  for (CItAlgo algo = menu->gtTechnicalTriggerMap().begin(); algo!=menu->gtTechnicalTriggerMap().end(); ++algo){
98  m_techBit_Alias[(algo->second).algoBitNumber()] = (algo->second).algoName();
99  }
100 
101  // Initializing DQM Monitor Elements
102  ibooker.setCurrentFolder("L1T/L1TBPTX");
103  m_ErrorMonitor = ibooker.book1D("ErrorMonitor","ErrorMonitor",7,0,7);
104  m_ErrorMonitor->setBinLabel(UNKNOWN ,"UNKNOWN");
105  m_ErrorMonitor->setBinLabel(WARNING_DB_CONN_FAILED ,"WARNING_DB_CONN_FAILED"); // Errors from L1TOMDSHelper
106  m_ErrorMonitor->setBinLabel(WARNING_DB_QUERY_FAILED ,"WARNING_DB_QUERY_FAILED"); // Errors from L1TOMDSHelper
107  m_ErrorMonitor->setBinLabel(WARNING_DB_INCORRECT_NBUNCHES,"WARNING_DB_INCORRECT_NBUNCHES"); // Errors from L1TOMDSHelper
108  m_ErrorMonitor->setBinLabel(ERROR_UNABLE_RETRIVE_PRODUCT ,"ERROR_UNABLE_RETRIVE_PRODUCT");
109  m_ErrorMonitor->setBinLabel(ERROR_TRIGGERALIAS_NOTVALID ,"ERROR_TRIGGERALIAS_NOTVALID");
110  m_ErrorMonitor->setBinLabel(ERROR_LSBLOCK_NOTVALID ,"ERROR_LSBLOCK_NOTVALID");
111 
112  for(unsigned i=0; i<m_monitorBits.size(); i++){
113 
114  bool isAlgo = m_monitorBits[i].getParameter<bool> ("bitType");
115  TString testName = m_monitorBits[i].getParameter<string>("testName");
116  int bit = m_monitorBits[i].getParameter<int> ("bitNumber");
117 
118  TString meTitle = "";
119  ibooker.setCurrentFolder("L1T/L1TBPTX/Efficiency/");
120  if(isAlgo){
121  meTitle="Algo ";meTitle+=bit; meTitle+=" - "; meTitle+=m_algoBit_Alias[bit]; meTitle+=" Efficiency";
122  m_meAlgoEfficiency[bit] = ibooker.book1D(testName,meTitle,maxNbins,-0.5,double(maxNbins)-0.5);
123  m_meAlgoEfficiency[bit]->setAxisTitle("Lumi Section" ,1);
124  }
125  else{
126  meTitle="Tech "; meTitle+=bit; meTitle+=" - "; meTitle+=m_techBit_Alias[bit]; meTitle+=" Efficiency";
127  m_meTechEfficiency[bit] = ibooker.book1D(testName,meTitle,maxNbins,-0.5,double(maxNbins)-0.5);
128  m_meTechEfficiency[bit]->setAxisTitle("Lumi Section" ,1);
129  }
130 
131  meTitle = "";
132  ibooker.setCurrentFolder("L1T/L1TBPTX/MissFire/");
133  if(isAlgo){
134  meTitle="Algo "; meTitle+=bit; meTitle+=" - "; meTitle+=m_algoBit_Alias[bit]; meTitle+="(1 - Miss Fire Rate)";
135  m_meAlgoMissFire[bit] = ibooker.book1D(testName,meTitle,maxNbins,-0.5,double(maxNbins)-0.5);
136  m_meAlgoMissFire[bit]->setAxisTitle("Lumi Section" ,1);
137  m_meAlgoMissFire[bit]->setAxisTitle("1 - Miss Fire Rate",2);
138  }
139  else{
140  meTitle="Tech "; meTitle+=bit; meTitle+=" - "; meTitle+=m_techBit_Alias[bit]; meTitle+="(1 - Miss Fire Rate)";
141  m_meTechMissFire[bit] = ibooker.book1D(testName,meTitle,maxNbins,-0.5,double(maxNbins)-0.5);
142  m_meTechMissFire[bit]->setAxisTitle("Lumi Section" ,1);
143  m_meTechMissFire[bit]->setAxisTitle("1 - Miss Fire Rate",2);
144  }
145  }
146 
147  for(unsigned i=0; i<m_monitorRates.size(); i++){
148 
149  TString testName = m_monitorRates[i].getParameter<string>("testName");
150  bool isAlgo = m_monitorRates[i].getParameter<bool> ("bitType");
151  int bit = m_monitorRates[i].getParameter<int> ("bitNumber");
152 
153  pair<bool,int> refME = pair<bool,int>(isAlgo,bit);
154 
155  TString meTitle = "";
156  ibooker.setCurrentFolder("L1T/L1TBPTX/Rate/");
157  if(isAlgo){
158  meTitle="Algo "+std::to_string(bit); meTitle+=" - "; meTitle+=m_algoBit_Alias[bit]; meTitle+=" Rate";
159  m_meRate[refME] = ibooker.book1D(testName,meTitle,maxNbins,-0.5,double(maxNbins)-0.5);
160  m_meRate[refME]->setAxisTitle("Lumi Section" ,1);
161  m_meRate[refME]->setAxisTitle("Rate (unprescaled) [Hz]",2);
162  }
163  else{
164  meTitle="Tech "+std::to_string(bit); meTitle+=" - "; meTitle+=m_techBit_Alias[bit]; meTitle+=" Rate";
165  m_meRate[refME] = ibooker.book1D(testName,meTitle,maxNbins,-0.5,double(maxNbins)-0.5);
166  m_meRate[refME]->setAxisTitle("Lumi Section" ,1);
167  m_meRate[refME]->setAxisTitle("Rate (unprescaled) [Hz]",2);
168  }
169  }
170 
171 
172 
173  //_____________________________________________________________________
174  // Getting the prescale columns definition for this run
177 
178  iSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
179  iSetup.get<L1GtPrescaleFactorsTechTrigRcd>().get(l1GtPfTech);
180 
181  if(l1GtPfAlgo.isValid()){
182  const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
183  m_prescaleFactorsAlgoTrig = &(m_l1GtPfAlgo->gtPrescaleFactors());
184  }else{
185  //TODO: Some error handling
186  }
187 
188  if(l1GtPfAlgo.isValid()){
189  const L1GtPrescaleFactors* m_l1GtPfTech = l1GtPfTech.product();
190  m_prescaleFactorsTechTrig = &(m_l1GtPfTech->gtPrescaleFactors());
191  }else{
192  //TODO: Some error handling
193  }
194 
195 }
196 
198  //empty
199 }
200 
201 //_____________________________________________________________________
202 // Function: beginLuminosityBlock
203 //_____________________________________________________________________
205 
206  if (m_verbose){cout << "[L1TBPTX] Called beginLuminosityBlock." << endl;}
207 
208  // Updating current LS number
209  m_currentLS = lumiBlock.id().luminosityBlock();
210 
211  // A LS will be valid if BeamMode==STABLE for all events monitored
212  m_currentLSValid = true;
213 
214  for(unsigned i=0; i<m_monitorBits.size(); i++){
215 
216  TString triggerName = "";
217  if(m_monitorBits[i].getParameter<bool>("bitType")){
218  triggerName = "algo_"+std::to_string(m_monitorBits[i].getParameter<int>("bitNumber"));
219  }else{
220  triggerName = "tech_"+std::to_string(m_monitorBits[i].getParameter<int>("bitNumber"));
221  }
222 
223  m_effNumerator [triggerName] = 0;
224  m_effDenominator [triggerName] = 0;
225  m_missFireNumerator [triggerName] = 0;
226  m_missFireDenominator[triggerName] = 0;
227 
228  }
229 
230 }
231 
232 //_____________________________________________________________________
233 // Function: endLuminosityBlock
234 // * Fills LS by LS ration of trigger out of sync
235 //_____________________________________________________________________
236 void L1TBPTX::endLuminosityBlock(LuminosityBlock const& lumiBlock, EventSetup const& c) {
237 
238  //______________________________________________________________________________
239  // Monitoring efficiencies
240  //______________________________________________________________________________
241  if(m_verbose){cout << "[L1TBPTX] Called endLuminosityBlock." << endl;}
242 
243  // If this LS is valid (i.e. all events recorded with stable beams)
244  if(m_currentLSValid && m_beamConfig.isValid()){
245 
246  for(unsigned i=0; i<m_monitorBits.size(); i++){
247 
248  bool isAlgo = m_monitorBits[i].getParameter<bool> ("bitType");
249  TString testName = m_monitorBits[i].getParameter<string>("testName");
250  int bit = m_monitorBits[i].getParameter<int> ("bitNumber");
251 
252  TString triggerName;
253  if(isAlgo){triggerName = "algo_"+std::to_string(bit);}
254  else {triggerName = "tech_"+std::to_string(bit);}
255 
256  double valEff;
257  double valMiss;
258  if(m_effDenominator[triggerName]!=0) {valEff = (double)m_effNumerator[triggerName]/m_effDenominator[triggerName];}
259  else {valEff = 0;}
260  if(m_missFireDenominator[triggerName]!=0){valMiss = (double)m_missFireNumerator[triggerName]/m_missFireDenominator[triggerName];}
261  else {valMiss = 0;}
262 
263  if(isAlgo){
264  int bin = m_meAlgoEfficiency[bit]->getTH1()->FindBin(m_currentLS);
265  m_meAlgoEfficiency[bit]->setBinContent(bin,valEff);
266  m_meAlgoMissFire[bit] ->setBinContent(bin,1-valMiss);
267  }
268  else{
269  int bin = m_meTechEfficiency[bit]->getTH1()->FindBin(m_currentLS);
270  m_meTechEfficiency[bit]->setBinContent(bin,valEff);
271  m_meTechMissFire[bit] ->setBinContent(bin,1-valMiss);
272  }
273  }
274  }
275 
276  //______________________________________________________________________________
277  // Monitoring rates
278  //______________________________________________________________________________
279  // We are only interested in monitoring lumisections where the the LHC state is
280  // RAMP, FLATTOP, SQUEEZE, ADJUST or STABLE since the bunch configuration and
281  // therefore the BPTX rate will not change.
282 
283  if(m_currentLSValid){
284 
285  const vector<int>& currentPFAlgo = (*m_prescaleFactorsAlgoTrig).at(m_currentPrescalesIndex);
286  const vector<int>& currentPFTech = (*m_prescaleFactorsTechTrig).at(m_currentPrescalesIndex);
287 
288  for(unsigned i=0; i<m_monitorRates.size(); i++){
289 
290  bool isAlgo = m_monitorRates[i].getParameter<bool> ("bitType");
291  int bit = m_monitorRates[i].getParameter<int> ("bitNumber");
292 
293  pair<bool,int> refME = pair<bool,int>(isAlgo,bit);
294 
295  if(isAlgo){
296  int bin = m_meRate[refME]->getTH1()->FindBin(m_currentGTLS);
297  int trigPS = currentPFAlgo[bit];
298  double trigRate = (double) trigPS*m_l1Rate[refME];
299  m_meRate[refME]->setBinContent(bin,trigRate);
300 
301  }else{
302  int bin = m_meRate[refME]->getTH1()->FindBin(m_currentGTLS);
303  int trigPS = currentPFTech[bit];
304  double trigRate = (double) trigPS*m_l1Rate[refME];
305  m_meRate[refME]->setBinContent(bin,trigRate);
306  }
307  }
308  }
309 }
310 
311 
312 //_____________________________________________________________________
313 void L1TBPTX::analyze(const Event & iEvent, const EventSetup & eventSetup){
314 
315  if(m_verbose){cout << "[L1TBPTX] Called analyze." << endl;}
316 
317  // We only start analyzing if current LS is still valid
318  if(m_currentLSValid){
319 
320  if(m_verbose){cout << "[L1TBPTX] -> m_currentLSValid=" << m_currentLSValid << endl;}
321 
322  // Retriving information from GT
324  iEvent.getByToken(m_l1GtEvmSource, gtEvmReadoutRecord);
325 
326  // Determining beam mode and fill number
327  if(gtEvmReadoutRecord.isValid()){
328 
329  const L1GtfeExtWord& gtfeEvmWord = gtEvmReadoutRecord->gtfeWord();
330  unsigned int lhcBeamMode = gtfeEvmWord.beamMode(); // Updating beam mode
331 
332  if(m_verbose){cout << "[L1TBPTX] Beam mode: "<< lhcBeamMode << endl;}
333 
334  if(lhcBeamMode==RAMP || lhcBeamMode==FLATTOP || lhcBeamMode==SQUEEZE || lhcBeamMode==ADJUST || lhcBeamMode==STABLE){
335 
336  if(m_lhcFill==0){
337 
338  if(m_verbose){cout << "[L1TBPTX] No valid bunch structure yet retrived. Attemptting to retrive..." << endl;}
339 
340  m_lhcFill = gtfeEvmWord.lhcFillNumber(); // Getting LHC Fill Number from GT
341 
342  getBeamConfOMDS(); // Getting Beam Configuration from OMDS
343 
344  // We are between RAMP and STABLE so there should be some colliding bunches
345  // in the machine. If 0 colliding bunched are found might be due to a delay
346  // of the update of the database. So we declare this LS as invalid and try
347  // again on the next one.
348  if(m_beamConfig.nCollidingBunches<=0){
349  m_lhcFill=0;
350  m_currentLSValid=false;
351  }
352  }
353  }
354  else{m_currentLSValid=false;}
355 
356  }else{
357  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT);
358  eCount++;
359  m_ErrorMonitor->getTH1()->SetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT,eCount);
360  }
361  }
362 
363  //______________________________________________________________________________
364  // If current LS is valid and Beam Configuration is Valid we analyse this event
365  //______________________________________________________________________________
366  if(m_currentLSValid && m_beamConfig.isValid()){
367 
368  if(m_verbose){cout << "Current event in valid LS and beam config" << endl;}
369 
370  // Getting Final Decision Logic (FDL) Data from GT
371  edm::Handle<L1GlobalTriggerReadoutRecord> gtReadoutRecordData;
372  iEvent.getByToken(m_l1GtDataDaqInputTag, gtReadoutRecordData);
373 
374  if(gtReadoutRecordData.isValid()){
375 
376  const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->gtFdlVector();
377 
378  // Getting the index for the fdl data for this event
379  int eventFDL=0;
380  for(unsigned int i=0; i<gtFdlVectorData.size(); i++){
381  if(gtFdlVectorData[i].bxInEvent()==0){eventFDL=i; break;}
382  }
383 
384  m_currentPrescalesIndex = gtFdlVectorData[eventFDL].gtPrescaleFactorIndexAlgo();
385 
386  for(unsigned i=0; i<m_monitorBits.size(); i++){
387 
388  TString triggerName = "";
389  bool isAlgo = m_monitorBits[i].getParameter<bool>("bitType");
390  int bit = m_monitorBits[i].getParameter<int> ("bitNumber");
391  int offset = m_monitorBits[i].getParameter<int> ("bitOffset");
392 
393  if(isAlgo){triggerName = "algo_"+std::to_string(bit);}
394  else {triggerName = "tech_"+std::to_string(bit);}
395 
396  int evBxStart = -2;
397  int evBxEnd = 2;
398 
399  if(offset<0){evBxStart+=-1*offset;}
400  if(offset>0){evBxEnd +=-1*offset;}
401 
402  for(unsigned a=0; a<gtFdlVectorData.size(); a++){
403 
404  int testBx = gtFdlVectorData[a].localBxNr()-offset;
405  bool lhcBxFilled = m_beamConfig.beam1[testBx] && m_beamConfig.beam2[testBx];
406  bool algoFired = false;
407 
408  if(isAlgo){
409  if(gtFdlVectorData[a].gtDecisionWord()[bit]){algoFired=true;}
410 
411  }
412  else{
413  if(gtFdlVectorData[a].gtTechnicalTriggerWord()[bit]){algoFired=true;}
414  }
415 
416  if(lhcBxFilled) {m_effDenominator[triggerName]++;}
417  if(lhcBxFilled && algoFired){m_effNumerator [triggerName]++;}
418 
419  if(algoFired) {m_missFireNumerator[triggerName]++;}
420  if(algoFired && !lhcBxFilled){m_missFireNumerator[triggerName]++;}
421 
422  }
423  }
424  }
425  }
426 
427  //______________________________________________________________________________
428  // Rate calculation
429  //______________________________________________________________________________
431  iEvent.getByToken(m_scalersSource,triggerScalers);
432 
433  if(triggerScalers.isValid()){
434 
435  Level1TriggerScalersCollection::const_iterator itL1TScalers = triggerScalers->begin();
436  Level1TriggerRates trigRates(*itL1TScalers,iEvent.id().run());
437 
438  m_currentGTLS= (*itL1TScalers).lumiSegmentNr();
439 
440  for(unsigned i=0; i<m_monitorRates.size(); i++){
441 
442  bool isAlgo = m_monitorRates[i].getParameter<bool>("bitType");
443  int bit = m_monitorRates[i].getParameter<int> ("bitNumber");
444 
445  pair<bool,int> refTrig = pair<bool,int>(isAlgo,bit);
446 
447  if(isAlgo){m_l1Rate[refTrig] = trigRates.gtAlgoCountsRate()[bit];}
448  else {m_l1Rate[refTrig] = trigRates.gtTechCountsRate()[bit];}
449  }
450  }
451 }
452 
453 //_____________________________________________________________________
454 // Method: getBunchStructureOMDS
455 // Description: Attempt to retrive Beam Configuration from OMDS and if
456 // we find error handle it
457 //_____________________________________________________________________
459 
460  if(m_verbose){cout << "[L1TBPTX] Called getBeamConfOMDS()" << endl;}
461 
462  //Getting connection paremeters
463  string oracleDB = m_parameters.getParameter<string>("oracleDB");
464  string pathCondDB = m_parameters.getParameter<string>("pathCondDB");
465 
466  // Connecting to OMDS
467  L1TOMDSHelper myOMDSHelper = L1TOMDSHelper();
468  int conError;
469  myOMDSHelper.connect(oracleDB,pathCondDB,conError);
470 
471  if(conError == L1TOMDSHelper::NO_ERROR){
472 
473  if(m_verbose){cout << "[L1TBPTX] Connected to DB with no error." << endl;}
474 
475  int errorRetrive;
476  m_beamConfig = myOMDSHelper.getBeamConfiguration(m_lhcFill,errorRetrive);
477 
478  if(errorRetrive == L1TOMDSHelper::NO_ERROR){
479  if(m_verbose){
480  cout << "[L1TBPTX] Retriving LHC Bunch Structure: NO_ERROR" << endl;
481  cout << "[L1TSync] -> LHC Bunch Structure valid=" << m_beamConfig.m_valid << " nBunches=" << m_beamConfig.nCollidingBunches << endl;
482  }
483  }
484  else if(errorRetrive == L1TOMDSHelper::WARNING_DB_QUERY_FAILED){
485  if(m_verbose){cout << "[L1TBPTX] Retriving LHC Bunch Structure: WARNING_DB_QUERY_FAILED" << endl;}
486 
487  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_QUERY_FAILED);
488  eCount++;
489  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_QUERY_FAILED,eCount);
490  }
491  else if(errorRetrive == L1TOMDSHelper::WARNING_DB_INCORRECT_NBUNCHES){
492  if(m_verbose){cout << "[L1TBPTX] Retriving LHC Bunch Structure: WARNING_DB_INCORRECT_NBUNCHES" << endl;}
493 
494  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_INCORRECT_NBUNCHES);
495  eCount++;
496  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_INCORRECT_NBUNCHES,eCount);
497  }
498  else{
499  if(m_verbose){cout << "[L1TBPTX] Retriving LHC Bunch Structure: UNKNOWN" << endl;}
500  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(UNKNOWN);
501  eCount++;
502  m_ErrorMonitor->getTH1()->SetBinContent(UNKNOWN,eCount);
503  }
504 
505  }
506  else if(conError == L1TOMDSHelper::WARNING_DB_CONN_FAILED){
507  if(m_verbose){cout << "[L1TBPTX] Connection to DB: WARNING_DB_CONN_FAILED" << endl;}
508  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_CONN_FAILED);
509  eCount++;
510  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_CONN_FAILED,eCount);
511  }
512  else{
513  if(m_verbose){cout << "[L1TBPTX] Connection to DB: UNKNOWN" << endl;}
514  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(UNKNOWN);
515  eCount++;
516  m_ErrorMonitor->getTH1()->SetBinContent(UNKNOWN,eCount);
517  }
518 }
519 
520 //_____________________________________________________________________
521 // Method: doFractionInSync
522 // Description: Produce plot with the fraction of in sync trigger for
523 // LS blocks with enough statistics.
524 // Variable: iForce - Forces closing of all blocks and calculation of
525 // the respective fractions
526 // Variable: iBad - (Only works with iForce=true) Forces the current
527 // all current blocks to be marked as bad
528 //_____________________________________________________________________
529 void L1TBPTX::doFractionInSync(bool iForce,bool iBad){
530 
531 }
532 
533 
534 //_____________________________________________________________________
535 // Method: certifyLSBlock
536 // Description: Fill the trigger certification plot by blocks
537 // Variable: iTrigger - Which trigger to certify
538 // Variable: iInitLs - Blocks initial LS
539 // Variable: iEndLs - Blocks end LS
540 // Variable: iValue - Value to be used to fill
541 //_____________________________________________________________________
542 void L1TBPTX::certifyLSBlock(string iTrigger, int iInitLs, int iEndLs ,float iValue){
543 
544 }
RunNumber_t run() const
Definition: EventID.h:39
LuminosityBlockID id() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TBPTX.cc:529
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
0: Unidentified isolated particle
Definition: ParticleCode.h:19
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TBPTX.cc:204
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)
L1TBPTX(const edm::ParameterSet &ps)
Definition: L1TBPTX.cc:33
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::vector< double > gtAlgoCountsRate() const
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: L1TBPTX.cc:197
int iEvent
Definition: GenABIO.cc:230
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
BeginRun.
Definition: L1TBPTX.cc:74
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1TBPTX.cc:313
void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TBPTX.cc:236
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
bool isValid() const
Definition: HandleBase.h:74
void certifyLSBlock(std::string iTrigger, int iInitLs, int iEndLs, float iValue)
Definition: L1TBPTX.cc:542
bin
set the eta bin as selection string.
const std::vector< std::vector< int > > & gtPrescaleFactors() const
get the prescale factors by reference
const cms_uint32_t lhcFillNumber() const
LuminosityBlockNumber_t luminosityBlock() const
edm::EventID id() const
Definition: EventBase.h:60
HLT enums.
double a
Definition: hdecay.h:121
T get() const
Definition: EventSetup.h:68
void getBeamConfOMDS()
Definition: L1TBPTX.cc:458
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
bool isValid() const
Definition: ESHandle.h:45
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
~L1TBPTX() override
Definition: L1TBPTX.cc:69
const cms_uint16_t beamMode() const
T const * product() const
Definition: ESHandle.h:84
Definition: Run.h:44