CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TDEMON Class Reference

#include <L1TDEMON.h>

Inheritance diagram for L1TDEMON:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 L1TDEMON (const edm::ParameterSet &)
 
 ~L1TDEMON () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Protected Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

int verbose ()
 

Private Attributes

edm::InputTag DEsource_
 
edm::EDGetTokenT< L1DataEmulRecordDEsourceToken_
 
int deSysCount [dedefs::DEnsys]
 
MonitorElementdeword [dedefs::DEnsys]
 
MonitorElementdword [dedefs::DEnsys]
 
MonitorElementerrordist
 
MonitorElementerrortype [dedefs::DEnsys]
 
MonitorElementeta [dedefs::DEnsys]
 
MonitorElementetaData [dedefs::DEnsys]
 
MonitorElementetaphi [dedefs::DEnsys]
 
MonitorElementeword [dedefs::DEnsys]
 
bool hasRecord_
 
std::string histFile_
 
std::string histFolder_
 
bool m_doSys [dedefs::DEnsys]
 
MonitorElementmasked [dedefs::DEnsys]
 
bool monitorDaemon_
 
int nEvt_
 
int nEvtWithSys [dedefs::DEnsys]
 
MonitorElementphi [dedefs::DEnsys]
 
MonitorElementphiData [dedefs::DEnsys]
 
MonitorElementrnkData [dedefs::DEnsys]
 
bool runInFF_
 
MonitorElementsysncand [2]
 
MonitorElementsysrates
 monitoring elements More...
 
int verbose_
 
MonitorElementx3 [dedefs::DEnsys]
 
MonitorElementx3Data [dedefs::DEnsys]
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 28 of file L1TDEMON.h.

Constructor & Destructor Documentation

◆ L1TDEMON()

L1TDEMON::L1TDEMON ( const edm::ParameterSet iConfig)
explicit

Definition at line 7 of file L1TDEMON.cc.

7  {
8  verbose_ = iConfig.getUntrackedParameter<int>("VerboseFlag", 0);
9 
10  if (verbose())
11  std::cout << "L1TDEMON::L1TDEMON()...\n" << std::flush;
12 
13  DEsource_ = iConfig.getParameter<edm::InputTag>("DataEmulCompareSource");
14  histFolder_ = iConfig.getUntrackedParameter<std::string>("HistFolder", "L1TEMU");
15  histFile_ = iConfig.getUntrackedParameter<std::string>("HistFile", "");
16 
17  runInFF_ = iConfig.getUntrackedParameter<bool>("RunInFilterFarm", false);
18  if (verbose())
19  std::cout << "Filter farm run setting? " << runInFF_ << "\n" << std::flush;
20 
21  if (iConfig.getUntrackedParameter<bool>("disableROOToutput", true))
22  histFile_ = "";
23 
24  if (!histFile_.empty()) {
25  edm::LogInfo("OutputRootFile") << "L1TEmulator Monitoring histograms will be saved to " << histFile_.c_str()
26  << std::endl;
27  }
28 
29  // copied from HardwareValidation/L1Comparator
30  // check on size are done there
31  std::vector<unsigned int> dosys(0, DEnsys);
32  dosys = iConfig.getUntrackedParameter<std::vector<unsigned int> >("COMPARE_COLLS", dosys);
33 
34  for (int i = 0; i < DEnsys; i++) {
35  m_doSys[i] = dosys[i];
36  }
37 
38  //
39 
40  nEvt_ = 0;
41  for (int i = 0; i < DEnsys; i++) {
42  deSysCount[i] = 0;
43  nEvtWithSys[i] = 0;
44  }
45 
46  hasRecord_ = true;
47 
48  if (verbose())
49  std::cout << "L1TDEMON::L1TDEMON constructor...done.\n" << std::flush;
50 
51  //set Tokens(-s)
52  DEsourceToken_ = consumes<L1DataEmulRecord>(iConfig.getParameter<edm::InputTag>("DataEmulCompareSource"));
53 }

References gather_cfg::cout, dedefs::DEnsys, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, and verbose.

◆ ~L1TDEMON()

L1TDEMON::~L1TDEMON ( )
override

Definition at line 55 of file L1TDEMON.cc.

55 {}

Member Function Documentation

◆ analyze()

void L1TDEMON::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

get the comparison results

get the de candidates

— Fill histograms(me) —

bitset loop

Reimplemented from DQMEDAnalyzer.

Definition at line 262 of file L1TDEMON.cc.

262  {
263  if (!hasRecord_)
264  return;
265 
266  if (verbose())
267  std::cout << "L1TDEMON::analyze() start\n" << std::flush;
268 
269  nEvt_++;
270 
273  iEvent.getByToken(DEsourceToken_, deRecord);
274 
275  if (!deRecord.isValid()) {
276  edm::LogInfo("DataNotFound") << "Cannot find L1DataEmulRecord with label " << DEsource_.label()
277  << " Please verify that comparator was successfully executed."
278  << " Emulator DQM will be skipped!" << std::endl;
279  hasRecord_ = false;
280  return;
281  }
282 
283  bool deMatch[DEnsys];
284  deRecord->get_status(deMatch);
285  if (verbose()) {
286  std::cout << "[L1TDEMON] verbose sys match?: ";
287  for (int i = 0; i < DEnsys; i++)
288  std::cout << deMatch[i] << " ";
289  std::cout << std::endl;
290  }
291 
292  bool isComp[DEnsys];
293  for (int i = 0; i < DEnsys; i++)
294  isComp[i] = deRecord->get_isComp(i);
295  if (verbose()) {
296  std::cout << "[L1TDEMON] verbose dosys?: ";
297  for (int i = 0; i < DEnsys; i++)
298  std::cout << isComp[i];
299  std::cout << std::endl;
300  }
301 
302  int DEncand[DEnsys][2];
303  for (int i = 0; i < DEnsys; i++)
304  for (int j = 0; j < 2; j++)
305  DEncand[i][j] = deRecord->getNCand(i, j);
306 
307  if (verbose()) {
308  std::cout << "[L1TDEMON] ncands d: ";
309  for (int i = 0; i < DEnsys; i++)
310  std::cout << DEncand[i][0] << " ";
311  std::cout << "\n[L1TDEMON] ncands e: ";
312  for (int i = 0; i < DEnsys; i++)
313  std::cout << DEncand[i][1] << " ";
314  std::cout << std::endl;
315  }
316 
317  const int nullVal = L1DataEmulDigi().reset();
318 
320  L1DEDigiCollection deColl;
321  deColl = deRecord->getColl();
322 
323  // global counters
324  int hasSys[DEnsys] = {0};
325  for (L1DEDigiCollection::const_iterator it = deColl.begin(); it != deColl.end(); it++)
326  if (!it->empty())
327  hasSys[it->sid()]++;
328  for (int i = 0; i < DEnsys; i++) {
329  if (!hasSys[i])
330  continue;
331  nEvtWithSys[i]++;
332  if (deMatch[i])
333  deSysCount[i]++;
334  }
335 
336  if (verbose()) {
337  std::cout << "[L1TDEMON] digis: \n";
338  for (L1DEDigiCollection::const_iterator it = deColl.begin(); it != deColl.end(); it++)
339  std::cout << "\t" << *it << std::endl;
340  }
341 
343 
344  // global, sub-systems d|e match, ncands
345  for (int i = 0; i < DEnsys; i++) {
346  // skip if system disabled
347  if (!m_doSys[i]) {
348  continue;
349  }
350 
351  if (!isComp[i])
352  continue;
353 
354  for (int j = 0; j < 2; j++)
355  sysncand[j]->Fill(i, DEncand[i][j]);
356 
357  //sysrates->Fill(i,(int)!deMatch[i]);
358  int ibin = i + 1;
359  double rate = nEvtWithSys[i] ? (nEvtWithSys[i] - 1. * deSysCount[i]) / nEvtWithSys[i] : 0.;
360  sysrates->setBinContent(ibin, rate);
361 
362  if (verbose()) {
363  std::cout << "[L1TDEMON] analyze "
364  << " sysid:" << i << " nEvt:" << nEvt_ << " match?" << deMatch[i] << " ncands:" << hasSys[i]
365  << " nevtwsys:" << nEvtWithSys[i] << " nevtgood:" << deSysCount[i]
366  << " rate:" << sysrates->getBinContent(ibin) << "\n";
367 
368  if (rate > 1)
369  std::cout << "problem, error rate for " << SystLabel[i] << " is " << sysrates->getBinContent(ibin) << std::endl;
370  }
371  }
372 
373  // container for subsystem's leading candidate
374  const int ncorr = 3;
375  float LeadCandVal[DEnsys][ncorr] = {{(float)nullVal}};
376  for (int i = 0; i < DEnsys; i++)
377  for (int j = 0; j < ncorr; j++)
378  LeadCandVal[i][j] = nullVal;
379 
380  // d|e candidate loop
381  for (L1DEDigiCollection::const_iterator it = deColl.begin(); it != deColl.end(); it++) {
382  int sid = it->sid();
383  int cid = it->cid();
384 
385  if (it->empty())
386  continue;
387  assert(isComp[sid]);
388 
389  int type = it->type();
390  double phiv = it->x1();
391  double etav = it->x2();
392  double x3v = it->x3();
393 
394  float rankarr[2];
395  it->rank(rankarr);
396  float rnkv = rankarr[0];
397 
398  double wei = 1.;
399 
400  unsigned int mask = (~0x0);
401 
402  if (sid == RCT) {
403  //if(cid!=RCTem) continue;
404  //if(cid!=RCTrgn) continue;
405  }
406  // if(sid==GCT) {
407  // // For the moment just include EM and jet objects, energy sums being debugged in the expert DQM first.
408  // if(cid!=GCTisolaem &&
409  // cid!=GCTnoisoem &&
410  // cid!=GCTcenjets &&
411  // cid!=GCTforjets &&
412  // cid!=GCTtaujets) continue;
413  // }
414  if (sid == DTP) {
415  //tbd cols:th,ph; plots per wheel
416  //if(it->x3()!=0) continue;
417  }
418  if (sid == GMT) {
419  //select gmt cands only for GMT sys
420  if (cid != GMTcnd)
421  continue;
422  //masking: gres -- I.Mikulec: mask bits 0,5,16,21,22,23
423  //mask = (~(0x0e10021));
424  }
425  if (sid == DTF) {
426  if (cid != DTtftrk)
427  continue;
428  }
429  if (sid == RPC || sid == CTF || sid == RPC) {
430  //select mu regional cands only for dtf,ctf,rpc
431  //if(cid!=MUrtf) continue;
432  //masking: gres dttf only -- I.Mikulec: lowest 16 bits only
433  //if(sid==DTF) mask = 0xffff;
434  }
435 
436  errordist->Fill(type);
437  errortype[sid]->Fill(type);
438 
439  // skip next if running in filter farm
440  if (runInFF_)
441  continue;
442 
443  //exclude agreeing cands
444  wei = 1.;
445  if (!type)
446  wei = 0.;
447  if (etav != nullVal && phiv != nullVal)
448  etaphi[sid]->Fill(etav, phiv, wei);
449  if (etav != nullVal)
450  eta[sid]->Fill(etav, wei);
451  if (phiv != nullVal)
452  phi[sid]->Fill(phiv, wei);
453  if (sid == DTP)
454  if (x3v != nullVal)
455  x3[sid]->Fill(x3v, wei);
456 
457  unsigned int word[2];
458  it->data(word);
459  std::bitset<32> dbits(word[0]);
460  std::bitset<32> ebits(word[1]);
461  unsigned int dexor = ((word[0]) ^ (word[1]));
462  //disagreeing bits
463  std::bitset<32> debits(dexor);
464  //disagreeing bits after masking
465  std::bitset<32> dembits(((dexor) & (mask)));
466 
467  if (verbose())
468  std::cout << "l1demon"
469  << " sid:" << sid << " cid:" << cid << "\n"
470  << " data:0x" << std::hex << word[0] << std::dec << " bitset:" << dbits << "\n"
471  << " emul:0x" << std::hex << word[1] << std::dec << " bitset:" << ebits << "\n"
472  << " xor:0x" << std::hex << dexor << std::dec << " bitset:" << debits
473  << " bitset:" << ((dbits) ^ (ebits)) << "\n"
474  << std::flush;
475 
477  for (int ibit = 0; ibit < 32; ibit++) {
478  wei = 1.;
479  //comparison gives no info if there's only 1 candidate
480  if (type == 3 || type == 4)
481  wei = 0.;
482  if (dbits[ibit])
483  dword[sid]->Fill(ibit, wei);
484  if (ebits[ibit])
485  eword[sid]->Fill(ibit, wei);
486  if (debits[ibit])
487  deword[sid]->Fill(ibit, wei);
488  //if(dembits[ibit])masked[sid]->Fill(ibit,wei);
489  }
490 
491  //exclude e-only cands (only data)
492  wei = 1.;
493  if (type == 4)
494  wei = 0.;
495  if (etav != nullVal)
496  etaData[sid]->Fill(etav, wei);
497  if (phiv != nullVal)
498  phiData[sid]->Fill(phiv, wei);
499  if (sid == DTP)
500  if (x3v != nullVal)
501  x3Data[sid]->Fill(x3v, wei);
502  rnkData[sid]->Fill(rnkv, wei);
503 
504  //correlations: store leading candidate
505  if (type == 4)
506  continue; //exclude e-only cands
507  bool islead = false;
508  if (rnkv > LeadCandVal[sid][2])
509  islead = true;
510  else if (rnkv == LeadCandVal[sid][2]) {
511  if (phiv > LeadCandVal[sid][0])
512  islead = true;
513  else if (phiv == LeadCandVal[sid][0])
514  if (etav > LeadCandVal[sid][1])
515  islead = true;
516  }
517 
518  if (islead) {
519  LeadCandVal[sid][0] = phiv;
520  LeadCandVal[sid][1] = etav;
521  LeadCandVal[sid][2] = rnkv;
522  }
523 
524  } //close loop over dedigi-cands
525 }

References cms::cuda::assert(), gather_cfg::cout, dedefs::CTF, TauDecayModes::dec, dedefs::DEnsys, dedefs::DTF, dedefs::DTP, dedefs::DTtftrk, PVValHelper::eta, fastmath::etaphi(), HcalObjRepresent::Fill(), dqmMemoryStats::float, L1DataEmulRecord::get_isComp(), L1DataEmulRecord::get_status(), L1DataEmulRecord::getColl(), L1DataEmulRecord::getNCand(), dedefs::GMT, dedefs::GMTcnd, mps_fire::i, iEvent, edm::HandleBase::isValid(), dqmiolumiharvest::j, RPCpg::rate(), dedefs::RCT, L1DataEmulDigi::reset(), dedefs::RPC, dedefs::SystLabel, and verbose.

◆ bookHistograms()

void L1TDEMON::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

labeling (temporary cosmetics added here)

Implements DQMEDAnalyzer.

Definition at line 57 of file L1TDEMON.cc.

57  {
58  if (verbose())
59  std::cout << "L1TDEMON::beginJob() start\n" << std::flush;
60 
61  ibooker.setCurrentFolder(histFolder_);
62 
63  //physical values disabled now, waiting for scale procedure
64  //const double tpi = 6.2832;
65  //const double amin= -0.5;
66  //const double amax=tpi+0.5;
67 
68  // ETP, HTP, RCT, GCT, DTP, DTF, CTP, CTF, RPC,LTC, GMT,GLT
69  int phiNBins[DEnsys] = {71, 71, 18, 18, 12, 255, 160, 255, 144, 0, 255, 0};
70  double phiMinim[DEnsys] = {0.5, 0.5, -0.5, -0.5, -0.5, 0, -0.5, 0, -0.5, 0, 0, 0};
71  double phiMaxim[DEnsys] = {71.5, 71.5, 17.5, 17.5, 11.5, 255, 159.5, 255, 143.5, 0, 255, 0};
72 
73  int etaNBins[DEnsys] = {35, 35, 22, 22, 5, 20, 120, 20, 64, 0, 20, 0};
74  double etaMinim[DEnsys] = {-17.5, -17.5, -0.5, -0.5, -2.5, 0, -0.5, 0, -0.5, 0, 0, 0};
75  double etaMaxim[DEnsys] = {17.5, 17.5, 21.5, 21.5, 2.5, 63, 119.5, 63, 63.5, 0, 63, 0};
76 
77  int x3NBins[DEnsys] = {0, 0, 7, 0, 4, 0, 0, 0, 0, 0, 0, 0};
78  double x3Minim[DEnsys] = {0, 0, -0.5, 0, 0.5, 0, 0, 0, 0, 0, 0, 0};
79  double x3Maxim[DEnsys] = {0, 0, 6.5, 0, 4.5, 0, 0, 0, 0, 0, 0, 0};
80 
81  int rnkNBins[DEnsys] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
82  double rnkMinim[DEnsys] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
83  double rnkMaxim[DEnsys] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
84  //assume for
85  for (int i = 0; i < DEnsys; i++) {
86  rnkNBins[i] = 63;
87  rnkMinim[i] = 0.5;
88  rnkMaxim[i] = 63.5;
89  } //rank 0x3f->63
90  rnkNBins[DTP] = 7;
91  rnkMinim[DTP] = -0.5;
92  rnkMaxim[DTP] = 6.5; //rank 0-6
93  rnkNBins[CTP] = 16;
94  rnkMinim[CTP] = -0.5;
95  rnkMaxim[CTP] = 15.5; //quality 0-15
96 
97  /*--notes
98  RCT: global index ieta (0-21)=[22,-0.5,21.5] , iphi (0-17)=[18,-0.5,17.5]; card (0-6)
99  GCT: phi index (0-17); eta = -6 to -0, +0 to +6. Sign is bit 3, 1 means -ve Z, 0 means +ve Z -> 0.17
100  DTP: usc 0..11; uwh -2..2; ust 1..4;
101  CTP: rank is quality 0..15
102  */
103 
104  if (!runInFF_)
105  ibooker.setCurrentFolder(std::string(histFolder_ + "/common"));
106 
107  for (int j = 0; j < 2; j++) {
108  std::string lbl("sysncand");
109  lbl += (j == 0 ? "Data" : "Emul");
110  sysncand[j] = ibooker.book1D(lbl.data(), lbl.data(), DEnsys, 0, DEnsys);
111  }
112 
113  sysrates = ibooker.book1D("sysrates", "sysrates", DEnsys, 0, DEnsys);
114  const int nerr = 5;
115  errordist = ibooker.book1D("errorflag", "errorflag", nerr, 0, nerr);
116 
117  for (int j = 0; j < DEnsys; j++) {
118  // skip if system disabled
119  if (!m_doSys[j]) {
120  continue;
121  }
122 
123  if (!runInFF_) {
124  ibooker.setCurrentFolder(std::string(histFolder_ + "/" + SystLabelExt[j]));
125  }
126 
127  std::string lbl("");
128  lbl.clear();
129  lbl += SystLabel[j];
130  lbl += "ErrorFlag";
131  errortype[j] = ibooker.book1D(lbl.data(), lbl.data(), nerr, 0, nerr);
132 
133  // skip next histos if running in filter farm
134  if (runInFF_) {
135  continue;
136  }
137 
138  //
139  lbl.clear();
140  lbl += SystLabel[j];
141  lbl += "eta";
142  eta[j] = ibooker.book1D(lbl.data(), lbl.data(), etaNBins[j], etaMinim[j], etaMaxim[j]);
143  lbl.clear();
144  lbl += SystLabel[j];
145  lbl += "phi";
146  phi[j] = ibooker.book1D(lbl.data(), lbl.data(), phiNBins[j], phiMinim[j], phiMaxim[j]);
147  lbl.clear();
148  lbl += SystLabel[j];
149  lbl += "x3";
150  x3[j] = ibooker.book1D(lbl.data(), lbl.data(), x3NBins[j], x3Minim[j], x3Maxim[j]);
151  lbl.clear();
152  lbl += SystLabel[j];
153  lbl += "etaphi";
154  etaphi[j] = ibooker.book2D(
155  lbl.data(), lbl.data(), etaNBins[j], etaMinim[j], etaMaxim[j], phiNBins[j], phiMinim[j], phiMaxim[j]);
156  //
157  lbl.clear();
158  lbl += SystLabel[j];
159  lbl += "eta";
160  lbl += "Data";
161  etaData[j] = ibooker.book1D(lbl.data(), lbl.data(), etaNBins[j], etaMinim[j], etaMaxim[j]);
162  lbl.clear();
163  lbl += SystLabel[j];
164  lbl += "phi";
165  lbl += "Data";
166  phiData[j] = ibooker.book1D(lbl.data(), lbl.data(), phiNBins[j], phiMinim[j], phiMaxim[j]);
167  lbl.clear();
168  lbl += SystLabel[j];
169  lbl += "x3";
170  lbl += "Data";
171  x3Data[j] = ibooker.book1D(lbl.data(), lbl.data(), x3NBins[j], x3Minim[j], x3Maxim[j]);
172  lbl.clear();
173  lbl += SystLabel[j];
174  lbl += "rank";
175  lbl += "Data";
176  rnkData[j] = ibooker.book1D(lbl.data(), lbl.data(), rnkNBins[j], rnkMinim[j], rnkMaxim[j]);
177 
178  const int nbit = (j == GLT) ? 128 : 32;
179  lbl.clear();
180  lbl += SystLabel[j];
181  lbl += "dword";
182  dword[j] = ibooker.book1D(lbl.data(), lbl.data(), nbit, 0, nbit);
183  lbl.clear();
184  lbl += SystLabel[j];
185  lbl += "eword";
186  eword[j] = ibooker.book1D(lbl.data(), lbl.data(), nbit, 0, nbit);
187  lbl.clear();
188  lbl += SystLabel[j];
189  lbl += "deword";
190  deword[j] = ibooker.book1D(lbl.data(), lbl.data(), nbit, 0, nbit);
191  //lbl.clear();
192  //lbl+=SystLabel[j];lbl+="masked";
193  //masked[j] = dbe->book1D(lbl.data(),lbl.data(),nbit,0,nbit);
194  }
195 
197  for (int i = 0; i < DEnsys; i++) {
198  sysrates->setBinLabel(i + 1, SystLabel[i]);
199  sysncand[0]->setBinLabel(i + 1, SystLabel[i]);
200  sysncand[1]->setBinLabel(i + 1, SystLabel[i]);
201  }
202  //const int nerr = 5;
203  std::string errLabel[nerr] = {"Agree", "Loc. Agree", "L.Disagree", "Data only", "Emul only"};
204  for (int j = 0; j < nerr; j++) {
205  errordist->setBinLabel(j + 1, errLabel[j]);
206  }
207  for (int i = 0; i < DEnsys; i++) {
208  // skip if system disabled
209  if (!m_doSys[i]) {
210  continue;
211  }
212 
213  for (int j = 0; j < nerr; j++) {
214  errortype[i]->setBinLabel(j + 1, errLabel[j]);
215  }
216  }
217 
218  // done if running in filter farm
219  if (runInFF_)
220  return;
221 
222  for (int i = 0; i < DEnsys; i++) {
223  // skip if system disabled
224  if (!m_doSys[i]) {
225  continue;
226  }
227 
228  etaphi[i]->setAxisTitle("eta", 1);
229  etaphi[i]->setAxisTitle("phi", 2);
230  eta[i]->setAxisTitle("eta");
231  phi[i]->setAxisTitle("phi");
232  x3[i]->setAxisTitle("x3");
233  etaData[i]->setAxisTitle("eta");
234  phiData[i]->setAxisTitle("phi");
235  x3Data[i]->setAxisTitle("x3");
236  rnkData[i]->setAxisTitle("rank");
237  dword[i]->setAxisTitle("trigger data word bit");
238  eword[i]->setAxisTitle("trigger data word bit");
239  deword[i]->setAxisTitle("trigger data word bit");
240  //masked [i]->setAxisTitle("trigger data word bit");
241  }
242 
243  // assertions/temporary
244  assert(ETP == 0);
245  assert(HTP == 1);
246  assert(RCT == 2);
247  assert(GCT == 3);
248  assert(DTP == 4);
249  assert(DTF == 5);
250  assert(CTP == 6);
251  assert(CTF == 7);
252  assert(RPC == 8);
253  assert(LTC == 9);
254  assert(GMT == 10);
255  assert(GLT == 11);
256 
257  if (verbose())
258  std::cout << "L1TDEMON::bookHistograms() end.\n" << std::flush;
259 }

References cms::cuda::assert(), dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), gather_cfg::cout, dedefs::CTF, dedefs::CTP, dedefs::DEnsys, dedefs::DTF, dedefs::DTP, PVValHelper::eta, metDiagnosticParameterSet_cfi::etaNBins, fastmath::etaphi(), dedefs::ETP, dedefs::GCT, dedefs::GLT, dedefs::GMT, dedefs::HTP, mps_fire::i, dqmiolumiharvest::j, dedefs::LTC, metDiagnosticParameterSet_cfi::phiNBins, dedefs::RCT, dedefs::RPC, dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, dedefs::SystLabel, dedefs::SystLabelExt, and verbose.

◆ verbose()

int L1TDEMON::verbose ( )
inlineprivate

Definition at line 44 of file L1TDEMON.h.

44 { return verbose_; }

References verbose_.

Member Data Documentation

◆ DEsource_

edm::InputTag L1TDEMON::DEsource_
private

Definition at line 39 of file L1TDEMON.h.

◆ DEsourceToken_

edm::EDGetTokenT<L1DataEmulRecord> L1TDEMON::DEsourceToken_
private

Definition at line 94 of file L1TDEMON.h.

◆ deSysCount

int L1TDEMON::deSysCount[dedefs::DEnsys]
private

Definition at line 60 of file L1TDEMON.h.

◆ deword

MonitorElement* L1TDEMON::deword[dedefs::DEnsys]
private

Definition at line 90 of file L1TDEMON.h.

◆ dword

MonitorElement* L1TDEMON::dword[dedefs::DEnsys]
private

Definition at line 88 of file L1TDEMON.h.

◆ errordist

MonitorElement* L1TDEMON::errordist
private

Definition at line 74 of file L1TDEMON.h.

◆ errortype

MonitorElement* L1TDEMON::errortype[dedefs::DEnsys]
private

Definition at line 75 of file L1TDEMON.h.

◆ eta

MonitorElement* L1TDEMON::eta[dedefs::DEnsys]
private

Definition at line 79 of file L1TDEMON.h.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

◆ etaData

MonitorElement* L1TDEMON::etaData[dedefs::DEnsys]
private

Definition at line 82 of file L1TDEMON.h.

◆ etaphi

MonitorElement* L1TDEMON::etaphi[dedefs::DEnsys]
private

Definition at line 78 of file L1TDEMON.h.

◆ eword

MonitorElement* L1TDEMON::eword[dedefs::DEnsys]
private

Definition at line 89 of file L1TDEMON.h.

◆ hasRecord_

bool L1TDEMON::hasRecord_
private

Definition at line 40 of file L1TDEMON.h.

◆ histFile_

std::string L1TDEMON::histFile_
private

Definition at line 47 of file L1TDEMON.h.

◆ histFolder_

std::string L1TDEMON::histFolder_
private

Definition at line 50 of file L1TDEMON.h.

◆ m_doSys

bool L1TDEMON::m_doSys[dedefs::DEnsys]
private

Definition at line 67 of file L1TDEMON.h.

◆ masked

MonitorElement* L1TDEMON::masked[dedefs::DEnsys]
private

Definition at line 91 of file L1TDEMON.h.

◆ monitorDaemon_

bool L1TDEMON::monitorDaemon_
private

Definition at line 53 of file L1TDEMON.h.

◆ nEvt_

int L1TDEMON::nEvt_
private

Definition at line 59 of file L1TDEMON.h.

◆ nEvtWithSys

int L1TDEMON::nEvtWithSys[dedefs::DEnsys]
private

Definition at line 61 of file L1TDEMON.h.

◆ phi

MonitorElement* L1TDEMON::phi[dedefs::DEnsys]
private

Definition at line 80 of file L1TDEMON.h.

Referenced by Particle.Particle::__str__(), and ntupleDataFormat.Track::phiPull().

◆ phiData

MonitorElement* L1TDEMON::phiData[dedefs::DEnsys]
private

Definition at line 83 of file L1TDEMON.h.

◆ rnkData

MonitorElement* L1TDEMON::rnkData[dedefs::DEnsys]
private

Definition at line 85 of file L1TDEMON.h.

◆ runInFF_

bool L1TDEMON::runInFF_
private

Definition at line 56 of file L1TDEMON.h.

◆ sysncand

MonitorElement* L1TDEMON::sysncand[2]
private

Definition at line 73 of file L1TDEMON.h.

◆ sysrates

MonitorElement* L1TDEMON::sysrates
private

monitoring elements

Definition at line 72 of file L1TDEMON.h.

◆ verbose_

int L1TDEMON::verbose_
private

Definition at line 43 of file L1TDEMON.h.

Referenced by verbose().

◆ x3

MonitorElement* L1TDEMON::x3[dedefs::DEnsys]
private

Definition at line 81 of file L1TDEMON.h.

◆ x3Data

MonitorElement* L1TDEMON::x3Data[dedefs::DEnsys]
private

Definition at line 84 of file L1TDEMON.h.

dedefs::HTP
Definition: DEtrait.h:40
L1TDEMON::histFile_
std::string histFile_
Definition: L1TDEMON.h:47
dedefs::SystLabel
const std::string SystLabel[DEnsys]
Definition: DEtrait.h:42
L1DEDigiCollection
std::vector< L1DataEmulDigi > L1DEDigiCollection
Definition: DEtrait.h:101
mps_fire.i
i
Definition: mps_fire.py:355
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
L1TDEMON::runInFF_
bool runInFF_
Definition: L1TDEMON.h:56
dedefs::RPC
Definition: DEtrait.h:40
dedefs::SystLabelExt
const std::string SystLabelExt[DEnsys]
Definition: DEtrait.h:45
L1TDEMON::phi
MonitorElement * phi[dedefs::DEnsys]
Definition: L1TDEMON.h:80
L1TDEMON::errortype
MonitorElement * errortype[dedefs::DEnsys]
Definition: L1TDEMON.h:75
L1TDEMON::nEvt_
int nEvt_
Definition: L1TDEMON.h:59
gather_cfg.cout
cout
Definition: gather_cfg.py:144
dedefs::CTP
Definition: DEtrait.h:40
edm::LogInfo
Definition: MessageLogger.h:254
cms::cuda::assert
assert(be >=bs)
L1DataEmulRecord::getNCand
int getNCand(int i, int j) const
Definition: L1DataEmulRecord.h:41
L1TDEMON::DEsourceToken_
edm::EDGetTokenT< L1DataEmulRecord > DEsourceToken_
Definition: L1TDEMON.h:94
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
L1TDEMON::dword
MonitorElement * dword[dedefs::DEnsys]
Definition: L1TDEMON.h:88
RPCpg::rate
double rate(double x)
Definition: Constants.cc:3
edm::Handle
Definition: AssociativeIterator.h:50
dedefs::DTP
Definition: DEtrait.h:40
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
L1TDEMON::histFolder_
std::string histFolder_
Definition: L1TDEMON.h:50
L1DataEmulDigi
Definition: L1DataEmulDigi.h:17
L1TDEMON::rnkData
MonitorElement * rnkData[dedefs::DEnsys]
Definition: L1TDEMON.h:85
dedefs::DTtftrk
Definition: DEtrait.h:71
dedefs::GCT
Definition: DEtrait.h:40
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
GMT
Definition: L1GtDefinitions.h:27
dedefs::ETP
Definition: DEtrait.h:40
L1TDEMON::x3
MonitorElement * x3[dedefs::DEnsys]
Definition: L1TDEMON.h:81
L1TDEMON::etaData
MonitorElement * etaData[dedefs::DEnsys]
Definition: L1TDEMON.h:82
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
metDiagnosticParameterSet_cfi.etaNBins
etaNBins
Definition: metDiagnosticParameterSet_cfi.py:12
L1TDEMON::DEsource_
edm::InputTag DEsource_
Definition: L1TDEMON.h:39
L1TDEMON::hasRecord_
bool hasRecord_
Definition: L1TDEMON.h:40
dedefs::GLT
Definition: DEtrait.h:40
L1DataEmulRecord::get_status
bool get_status() const
Definition: L1DataEmulRecord.h:36
dedefs::DTF
Definition: DEtrait.h:40
L1TDEMON::sysrates
MonitorElement * sysrates
monitoring elements
Definition: L1TDEMON.h:72
iEvent
int iEvent
Definition: GenABIO.cc:224
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
dedefs::LTC
Definition: DEtrait.h:40
metDiagnosticParameterSet_cfi.phiNBins
phiNBins
Definition: metDiagnosticParameterSet_cfi.py:15
L1DataEmulDigi::reset
int reset()
Definition: L1DataEmulDigi.cc:13
L1TDEMON::sysncand
MonitorElement * sysncand[2]
Definition: L1TDEMON.h:73
L1DataEmulRecord::getColl
L1DEDigiCollection getColl() const
Definition: L1DataEmulRecord.h:39
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
L1TDEMON::nEvtWithSys
int nEvtWithSys[dedefs::DEnsys]
Definition: L1TDEMON.h:61
L1TDEMON::x3Data
MonitorElement * x3Data[dedefs::DEnsys]
Definition: L1TDEMON.h:84
dedefs::DEnsys
const int DEnsys
Definition: DEtrait.h:38
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L1TDEMON::eta
MonitorElement * eta[dedefs::DEnsys]
Definition: L1TDEMON.h:79
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
type
type
Definition: HCALResponse.h:21
L1TDEMON::verbose_
int verbose_
Definition: L1TDEMON.h:43
L1DataEmulRecord::get_isComp
bool get_isComp(int i) const
Definition: L1DataEmulRecord.h:42
L1TDEMON::phiData
MonitorElement * phiData[dedefs::DEnsys]
Definition: L1TDEMON.h:83
L1TDEMON::m_doSys
bool m_doSys[dedefs::DEnsys]
Definition: L1TDEMON.h:67
L1TDEMON::errordist
MonitorElement * errordist
Definition: L1TDEMON.h:74
dedefs::GMTcnd
Definition: DEtrait.h:85
L1TDEMON::eword
MonitorElement * eword[dedefs::DEnsys]
Definition: L1TDEMON.h:89
L1TDEMON::deSysCount
int deSysCount[dedefs::DEnsys]
Definition: L1TDEMON.h:60
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
L1TDEMON::verbose
int verbose()
Definition: L1TDEMON.h:44
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
L1TDEMON::deword
MonitorElement * deword[dedefs::DEnsys]
Definition: L1TDEMON.h:90
L1TDEMON::etaphi
MonitorElement * etaphi[dedefs::DEnsys]
Definition: L1TDEMON.h:78
dedefs::RCT
Definition: DEtrait.h:40
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
dedefs::CTF
Definition: DEtrait.h:40
edm::InputTag
Definition: InputTag.h:15