CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
L1TGT Class Reference

#include <L1TGT.h>

Inheritance diagram for L1TGT:
edm::EDAnalyzer

Public Member Functions

 L1TGT (const edm::ParameterSet &ps)
 
virtual ~L1TGT ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob ()
 
void endJob (void)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Types

enum  activeDAQ {
  FDL =0, PSB9, PSB13, PSB14,
  PSB15, PSB19, PSB20, PSB21,
  GMT
}
 
enum  activeEVM { TCS, FDLEVM }
 

Private Member Functions

bool isActive (int word, int bit)
 

Private Attributes

MonitorElementalgo_bits
 
MonitorElementalgo_bits_corr
 
MonitorElementalgo_bits_lumi
 
MonitorElementalgo_tt_bits_corr
 
MonitorElementBST_beamMode
 
MonitorElementBST_beamMomentum
 
MonitorElementBST_intensityBeam1
 
MonitorElementBST_intensityBeam2
 
MonitorElementBST_lhcFillNumber
 
MonitorElementBST_MasterStatus
 
MonitorElementBST_turnCountNumber
 
DQMStoredbe
 
MonitorElementdbx_module
 
MonitorElementevent_lumi
 
MonitorElementevent_number
 
MonitorElementevent_type
 
MonitorElementevnum_trignum_lumi
 
MonitorElementgpsfreq
 
MonitorElementgpsfreqlum
 
MonitorElementgpsfreqwide
 
edm::InputTag gtEvmSource_
 
MonitorElementgtfe_bx
 
edm::InputTag gtSource_
 
ofstream logFile_
 
MonitorElementm_monL1PrescaleFactorSet
 
bool monitorDaemon_
 
int nev_
 
MonitorElementorbit_lumi
 
std::string outputFile_
 
boost::uint64_t preGps_
 
boost::uint64_t preOrb_
 
MonitorElementsetupversion_lumi
 
MonitorElementtrigger_lumi
 
MonitorElementtrigger_number
 
MonitorElementtt_bits
 
MonitorElementtt_bits_corr
 
MonitorElementtt_bits_lumi
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 39 of file L1TGT.h.

Member Enumeration Documentation

enum L1TGT::activeDAQ
private
Enumerator
FDL 
PSB9 
PSB13 
PSB14 
PSB15 
PSB19 
PSB20 
PSB21 
GMT 

Definition at line 72 of file L1TGT.h.

enum L1TGT::activeEVM
private
Enumerator
TCS 
FDLEVM 

Definition at line 76 of file L1TGT.h.

76 { TCS, FDLEVM };

Constructor & Destructor Documentation

L1TGT::L1TGT ( const edm::ParameterSet ps)

Definition at line 20 of file L1TGT.cc.

References gather_cfg::cout, dbe, edm::ParameterSet::getUntrackedParameter(), NULL, cmsCodeRules.cppFunctionSkipper::operator, outputFile_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), and verbose_.

20  :
21  gtSource_(ps.getParameter<InputTag> ("gtSource")),
22  gtEvmSource_(ps.getParameter<InputTag> ("gtEvmSource")) {
23 
24  // verbosity switch
25  verbose_ = ps.getUntrackedParameter<bool> ("verbose", false);
26 
27  if (verbose_)
28  cout << "L1TGT: constructor...." << endl;
29 
30  dbe = NULL;
31  if (ps.getUntrackedParameter<bool> ("DQMStore", false)) {
33  dbe->setVerbose(0);
34  }
35 
36  outputFile_ = ps.getUntrackedParameter<string> ("outputFile", "");
37  if (outputFile_.size() != 0) {
38  cout << "L1T Monitoring histograms will be saved to "
39  << outputFile_.c_str() << endl;
40  }
41 
42  bool disable = ps.getUntrackedParameter<bool> ("disableROOToutput", false);
43  if (disable) {
44  outputFile_ = "";
45  }
46 
47  if (dbe != NULL) {
48  dbe->setCurrentFolder("L1T/L1TGT");
49  }
50 
51 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string outputFile_
Definition: L1TGT.h:118
#define NULL
Definition: scimark2.h:8
bool verbose_
Definition: L1TGT.h:119
edm::InputTag gtSource_
Definition: L1TGT.h:122
edm::InputTag gtEvmSource_
Definition: L1TGT.h:123
void setVerbose(unsigned level)
Definition: DQMStore.cc:196
DQMStore * dbe
Definition: L1TGT.h:79
tuple cout
Definition: gather_cfg.py:41
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
L1TGT::~L1TGT ( )
virtual

Definition at line 53 of file L1TGT.cc.

53  {
54 
55  // empty
56 }

Member Function Documentation

void L1TGT::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

get Global Trigger algo and technical trigger bit statistics

Implements edm::EDAnalyzer.

Definition at line 291 of file L1TGT.cc.

References L1GtfeWord::activeBoards(), algo_bits, algo_bits_corr, algo_bits_lumi, L1GtfeExtWord::beamMode(), L1GtfeExtWord::beamMomentum(), BST_beamMode, BST_beamMomentum, BST_intensityBeam1, BST_intensityBeam2, BST_lhcFillNumber, BST_MasterStatus, BST_turnCountNumber, L1GtfeExtWord::bstMasterStatus(), L1TcsWord::bxNr(), L1GtPsbWord::bxNr(), L1GtFdlWord::bxNr(), L1GtfeWord::bxNr(), gather_cfg::cout, dbx_module, event_lumi, event_number, event_type, L1TcsWord::eventNr(), evnum_trignum_lumi, FDL, MonitorElement::Fill(), edm::Event::getByLabel(), GMT, gpsfreq, gpsfreqlum, gpsfreqwide, L1GtfeExtWord::gpsTime(), gtEvmSource_, gtfe_bx, L1GtFdlWord::gtPrescaleFactorIndexAlgo(), gtSource_, i, isActive(), edm::HandleBase::isValid(), j, edm::InputTag::label(), L1GtfeExtWord::lhcFillNumber(), L1GtPsbWord::localBxNr(), L1GtFdlWord::localBxNr(), edm::EventBase::luminosityBlock(), m_monL1PrescaleFactorSet, funct::master(), nev_, orbit_lumi, L1TcsWord::orbitNr(), L1TcsWord::partTrigNr(), preGps_, preOrb_, PSB9, L1GtfeWord::setupVersion(), setupversion_lumi, TCS, L1GtfeExtWord::totalIntensityBeam1(), L1GtfeExtWord::totalIntensityBeam2(), trigger_lumi, trigger_number, L1TcsWord::triggerType(), tt_bits, tt_bits_corr, tt_bits_lumi, L1GtfeExtWord::turnCountNumber(), and verbose_.

291  {
292 
293  nev_++;
294 
295  if (verbose_) {
296  cout << "L1TGT: analyze...." << endl;
297  }
298 
299  // initialize bx's to invalid value
300  int tcsBx = -1;
301  int gtfeEvmBx = -1;
302 
303  // open EVM readout record if available
304  Handle<L1GlobalTriggerEvmReadoutRecord> gtEvmReadoutRecord;
305  e.getByLabel(gtEvmSource_, gtEvmReadoutRecord);
306 
307  if (!gtEvmReadoutRecord.isValid()) {
308  edm::LogInfo("DataNotFound")
309  << "can't find L1GlobalTriggerEvmReadoutRecord with label "
310  << gtSource_.label();
311  } else {
312 
313  // get all info from the EVM record if available and fill the histograms
314 
315  const L1GtfeWord& gtfeEvmWord = gtEvmReadoutRecord->gtfeWord();
316  const L1GtfeExtWord& gtfeEvmExtWord = gtEvmReadoutRecord->gtfeWord();
317 
318  gtfeEvmBx = gtfeEvmWord.bxNr();
319  int gtfeEvmActiveBoards = gtfeEvmWord.activeBoards();
320 
321  if (isActive(gtfeEvmActiveBoards, TCS)) { // if TCS present in the record
322 
323  const L1TcsWord& tcsWord = gtEvmReadoutRecord->tcsWord();
324  tcsBx = tcsWord.bxNr();
325 
326  event_type->Fill(tcsWord.triggerType());
327  orbit_lumi->Fill(e.luminosityBlock(), tcsWord.orbitNr());
328 
329  trigger_number->Fill(tcsWord.partTrigNr());
330  event_number->Fill(tcsWord.eventNr());
331 
332  trigger_lumi->Fill(e.luminosityBlock(), tcsWord.partTrigNr());
333  event_lumi->Fill(e.luminosityBlock(), tcsWord.eventNr());
335  double(tcsWord.eventNr()) / double(tcsWord.partTrigNr()));
336 
337  boost::uint16_t master = gtfeEvmExtWord.bstMasterStatus();
338  boost::uint32_t turnCount = gtfeEvmExtWord.turnCountNumber();
339  boost::uint32_t lhcFill = gtfeEvmExtWord.lhcFillNumber();
340  boost::uint16_t beam = gtfeEvmExtWord.beamMode();
341  boost::uint16_t momentum = gtfeEvmExtWord.beamMomentum();
342  boost::uint32_t intensity1 = gtfeEvmExtWord.totalIntensityBeam1();
343  boost::uint32_t intensity2 = gtfeEvmExtWord.totalIntensityBeam2();
344 
345  BST_MasterStatus->Fill(e.luminosityBlock(), (float) (master));
346  BST_turnCountNumber->Fill(e.luminosityBlock(), (float) (turnCount));
347  BST_lhcFillNumber->Fill((float) (lhcFill % 1000));
348  BST_beamMode->Fill(e.luminosityBlock(), (float) (beam));
349 
350  BST_beamMomentum->Fill(e.luminosityBlock(), (float) (momentum));
351  BST_intensityBeam1->Fill(e.luminosityBlock(), (float) (intensity1));
352  BST_intensityBeam2->Fill(e.luminosityBlock(), (float) (intensity2));
353 
354  if (verbose_) {
355  cout << " check mode = " << beam << " momentum " << momentum
356  << " int2 " << intensity2 << endl;
357  }
358 
359  boost::uint64_t orb = tcsWord.orbitNr();
360  boost::uint64_t gpsr = gtfeEvmExtWord.gpsTime();
361  boost::uint64_t gpshi = (gpsr >> 32) & 0xffffffff;
362  boost::uint64_t gpslo = gpsr & 0xffffffff;
363  boost::uint64_t gps = gpshi * 1000000 + gpslo;
364  // cout << " gpsr = " << hex << gpsr << " hi=" << gpshi << " lo=" << gpslo << " gps=" << gps << endl;
365 
366  Long64_t delorb = orb - preOrb_;
367  Long64_t delgps = gps - preGps_;
368  Double_t freq = -1.;
369 
370  if (delgps > 0) {
371  freq = ((Double_t)(delorb)) * 3564. / ((Double_t)(delgps));
372  }
373 
374  if (delorb > 0) {
375  gpsfreq->Fill(freq);
376  gpsfreqwide->Fill(freq);
377  gpsfreqlum->Fill(e.luminosityBlock(), freq);
378  if (verbose_) {
379  if (freq > 200.) {
380  cout << " preOrb_ = " << preOrb_ << " orb=" << orb
381  << " delorb=" << delorb << hex << " preGps_="
382  << preGps_ << " gps=" << gps << dec
383  << " delgps=" << delgps << " freq=" << freq
384  << endl;
385 
386  }
387  }
388  }
389 
390  preGps_ = gps;
391  preOrb_ = orb;
392 
393  }
394  }
395 
396  // open GT DAQ readout record - exit if failed
397  Handle<L1GlobalTriggerReadoutRecord> gtReadoutRecord;
398  e.getByLabel(gtSource_, gtReadoutRecord);
399 
400  if (!gtReadoutRecord.isValid()) {
401  edm::LogInfo("DataNotFound")
402  << "can't find L1GlobalTriggerReadoutRecord with label "
403  << gtSource_.label();
404  return;
405  }
406 
407  // initialize bx's to invalid value
408  int gtfeBx = -1;
409  int fdlBx[2] = { -1, -1 };
410  int psbBx[2][7] = { { -1, -1, -1, -1, -1, -1, -1 }, { -1, -1, -1, -1, -1,
411  -1, -1 } };
412  int gmtBx = -1;
413 
414  // get info from GTFE DAQ record
415  const L1GtfeWord& gtfeWord = gtReadoutRecord->gtfeWord();
416  gtfeBx = gtfeWord.bxNr();
417  gtfe_bx->Fill(gtfeBx);
419  int gtfeActiveBoards = gtfeWord.activeBoards();
420 
421  // look for GMT readout collection from the same source if GMT active
422  if (isActive(gtfeActiveBoards, GMT)) {
423  edm::Handle<L1MuGMTReadoutCollection> gmtReadoutCollection;
424  e.getByLabel(gtSource_, gmtReadoutCollection);
425 
426  if (gmtReadoutCollection.isValid()) {
427  gmtBx = gmtReadoutCollection->getRecord().getBxNr();
428  }
429  }
430 
431  // get info from FDL if active (including decision word)
432  if (isActive(gtfeActiveBoards, FDL)) {
433  const L1GtFdlWord& fdlWord = gtReadoutRecord->gtFdlWord();
434  fdlBx[0] = fdlWord.bxNr();
435  fdlBx[1] = fdlWord.localBxNr();
436 
438  const DecisionWord& gtDecisionWord = gtReadoutRecord->decisionWord();
439  const TechnicalTriggerWord& gtTTWord =
440  gtReadoutRecord->technicalTriggerWord();
441 
442  int dbitNumber = 0;
443  DecisionWord::const_iterator GTdbitItr;
444  algo_bits->Fill(-1.); // fill underflow to normalize
445  for (GTdbitItr = gtDecisionWord.begin(); GTdbitItr
446  != gtDecisionWord.end(); GTdbitItr++) {
447  if (*GTdbitItr) {
448  algo_bits->Fill(dbitNumber);
449  algo_bits_lumi->Fill(e.luminosityBlock(), dbitNumber);
450  int dbitNumber1 = 0;
451  DecisionWord::const_iterator GTdbitItr1;
452  for (GTdbitItr1 = gtDecisionWord.begin(); GTdbitItr1
453  != gtDecisionWord.end(); GTdbitItr1++) {
454  if (*GTdbitItr1)
455  algo_bits_corr->Fill(dbitNumber, dbitNumber1);
456  dbitNumber1++;
457  }
458  int tbitNumber1 = 0;
459  TechnicalTriggerWord::const_iterator GTtbitItr1;
460  for (GTtbitItr1 = gtTTWord.begin(); GTtbitItr1
461  != gtTTWord.end(); GTtbitItr1++) {
462  if (*GTtbitItr1)
463  tt_bits_corr->Fill(dbitNumber, tbitNumber1);
464  tbitNumber1++;
465  }
466  }
467  dbitNumber++;
468  }
469 
470  int tbitNumber = 0;
471  TechnicalTriggerWord::const_iterator GTtbitItr;
472  tt_bits->Fill(-1.); // fill underflow to normalize
473  for (GTtbitItr = gtTTWord.begin(); GTtbitItr != gtTTWord.end(); GTtbitItr++) {
474  if (*GTtbitItr) {
475  tt_bits->Fill(tbitNumber);
476  tt_bits_lumi->Fill(e.luminosityBlock(), tbitNumber);
477  int tbitNumber1 = 0;
478  TechnicalTriggerWord::const_iterator GTtbitItr1;
479  for (GTtbitItr1 = gtTTWord.begin(); GTtbitItr1
480  != gtTTWord.end(); GTtbitItr1++) {
481  if (*GTtbitItr1)
482  tt_bits_corr->Fill(tbitNumber, tbitNumber1);
483  tbitNumber1++;
484  }
485  }
486  tbitNumber++;
487  }
488 
489 
490  // fill the index of actual prescale factor set
491  // the index for technical triggers and algorithm trigger is the same (constraint in L1 GT TS)
492  // so we read only pfIndexAlgoTrig (boost::uint16_t)
493 
494  const float pfIndexAlgoTrig = static_cast<float>(fdlWord.gtPrescaleFactorIndexAlgo());
495  m_monL1PrescaleFactorSet->Fill(e.luminosityBlock(), pfIndexAlgoTrig);
496 
497 
498  }
499 
500  // get info from active PSB's
501  int ibit = PSB9; // first psb
502  // for now hardcode psb id's - TODO - get them from Vasile's board maps...
503  int psbID[7] = { 0xbb09, 0xbb0d, 0xbb0e, 0xbb0f, 0xbb13, 0xbb14, 0xbb15 };
504  for (int i = 0; i < 7; i++) {
505  if (isActive(gtfeActiveBoards, ibit)) {
506  L1GtPsbWord psbWord = gtReadoutRecord->gtPsbWord(psbID[i]);
507  psbBx[0][i] = psbWord.bxNr();
508  psbBx[1][i] = psbWord.localBxNr();
509  }
510  ibit++;
511  }
512 
513  //fill the dbx histo
514  if (gtfeEvmBx > -1)
515  dbx_module->Fill(0., gtfeEvmBx - gtfeBx);
516  if (tcsBx > -1)
517  dbx_module->Fill(1., tcsBx - gtfeBx);
518  for (int i = 0; i < 2; i++) {
519  if (fdlBx[i] > -1)
520  dbx_module->Fill(2. + i, fdlBx[i] - gtfeBx);
521  }
522  for (int j = 0; j < 7; j++) {
523  for (int i = 0; i < 2; i++) {
524  if (psbBx[i][j] > -1)
525  dbx_module->Fill(4. + i + 2 * j, psbBx[i][j] - gtfeBx);
526  }
527  }
528  if (gmtBx > -1)
529  dbx_module->Fill(18., gmtBx - gtfeBx);
530 
531 }
const boost::uint32_t partTrigNr() const
get/set total number of L1A sent since start of the run to this DAQ partition
Definition: L1TcsWord.h:228
MonitorElement * m_monL1PrescaleFactorSet
Definition: L1TGT.h:112
Master< F > master(const F &f)
Definition: FunctClone.h:68
MonitorElement * gpsfreqwide
Definition: L1TGT.h:109
int i
Definition: DBlmapReader.cc:9
const boost::uint16_t gtPrescaleFactorIndexAlgo() const
Definition: L1GtFdlWord.h:269
const boost::uint16_t bxNr() const
get/set bunch cross number of the actual bx
Definition: L1GtPsbWord.h:110
boost::uint64_t preGps_
Definition: L1TGT.h:125
const boost::uint32_t turnCountNumber() const
const boost::uint16_t localBxNr() const
get/set local bunch cross number of the actual bx
Definition: L1GtPsbWord.h:180
const boost::uint64_t orbitNr() const
get/set orbit number since start of run
Definition: L1TcsWord.h:268
const boost::uint16_t bxNr() const
get/set bunch cross number as counted in the GTFE board
Definition: L1GtfeWord.h:124
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
MonitorElement * BST_intensityBeam1
Definition: L1TGT.h:106
MonitorElement * algo_bits_corr
Definition: L1TGT.h:82
MonitorElement * tt_bits
Definition: L1TGT.h:83
bool verbose_
Definition: L1TGT.h:119
const boost::uint32_t setupVersion() const
get/set setup version
Definition: L1GtfeWord.h:142
const boost::uint32_t totalIntensityBeam2() const
MonitorElement * gtfe_bx
Definition: L1TGT.h:98
edm::InputTag gtSource_
Definition: L1TGT.h:122
MonitorElement * BST_beamMode
Definition: L1TGT.h:104
void Fill(long long x)
MonitorElement * BST_MasterStatus
Definition: L1TGT.h:101
MonitorElement * BST_intensityBeam2
Definition: L1TGT.h:107
const boost::uint16_t beamMode() const
MonitorElement * event_number
Definition: L1TGT.h:90
edm::InputTag gtEvmSource_
Definition: L1TGT.h:123
const boost::uint16_t triggerType() const
get/set trigger type, identical with event type in CMS header
Definition: L1TcsWord.h:129
std::vector< bool > DecisionWord
typedefs
const boost::uint16_t localBxNr() const
get/set local bunch cross number of the actual bx
Definition: L1GtFdlWord.h:374
MonitorElement * orbit_lumi
Definition: L1TGT.h:95
int j
Definition: DBlmapReader.cc:9
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
bool isValid() const
Definition: HandleBase.h:76
MonitorElement * algo_bits_lumi
Definition: L1TGT.h:86
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
MonitorElement * gpsfreq
Definition: L1TGT.h:108
const boost::uint32_t lhcFillNumber() const
const boost::uint16_t bxNr() const
get/set bunch cross number as counted in the TCS chip
Definition: L1TcsWord.h:89
int nev_
Definition: L1TGT.h:117
MonitorElement * algo_bits
Definition: L1TGT.h:81
MonitorElement * event_type
Definition: L1TGT.h:88
const boost::uint16_t bstMasterStatus() const
MonitorElement * dbx_module
Definition: L1TGT.h:99
const boost::uint32_t totalIntensityBeam1() const
unsigned long long uint64_t
Definition: Time.h:15
MonitorElement * tt_bits_corr
Definition: L1TGT.h:84
bool isActive(int word, int bit)
Definition: L1TGT.cc:534
MonitorElement * gpsfreqlum
Definition: L1TGT.h:110
std::string const & label() const
Definition: InputTag.h:25
const boost::uint16_t bxNr() const
get/set BxNr - bunch cross number of the actual bx
Definition: L1GtFdlWord.h:112
MonitorElement * trigger_number
Definition: L1TGT.h:92
const boost::uint16_t activeBoards() const
get/set boards contributing to EVM respectively DAQ record
Definition: L1GtfeWord.h:165
tuple cout
Definition: gather_cfg.py:41
MonitorElement * BST_beamMomentum
Definition: L1TGT.h:105
MonitorElement * BST_lhcFillNumber
Definition: L1TGT.h:103
MonitorElement * setupversion_lumi
Definition: L1TGT.h:96
const boost::uint16_t beamMomentum() const
const boost::uint32_t eventNr() const
get/set event number since last L1 reset generated in TCS chip
Definition: L1TcsWord.h:248
MonitorElement * BST_turnCountNumber
Definition: L1TGT.h:102
boost::uint64_t preOrb_
Definition: L1TGT.h:126
MonitorElement * event_lumi
Definition: L1TGT.h:91
MonitorElement * tt_bits_lumi
Definition: L1TGT.h:87
MonitorElement * trigger_lumi
Definition: L1TGT.h:93
MonitorElement * evnum_trignum_lumi
Definition: L1TGT.h:94
const boost::uint64_t gpsTime() const
LHC-BOB-ES-0001 (EDMS 638899)
void L1TGT::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 58 of file L1TGT.cc.

References algo_bits, algo_bits_corr, algo_bits_lumi, algo_tt_bits_corr, DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), BST_beamMode, BST_beamMomentum, BST_intensityBeam1, BST_intensityBeam2, BST_lhcFillNumber, BST_MasterStatus, BST_turnCountNumber, dbe, dbx_module, event_lumi, event_number, event_type, evnum_trignum_lumi, gpsfreq, gpsfreqlum, gpsfreqwide, gtfe_bx, m_monL1PrescaleFactorSet, nev_, cmsCodeRules.cppFunctionSkipper::operator, orbit_lumi, preGps_, preOrb_, DQMStore::rmdir(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), setupversion_lumi, trigger_lumi, trigger_number, tt_bits, tt_bits_corr, and tt_bits_lumi.

58  {
59 
60  nev_ = 0;
61  preGps_ = 0;
62  preOrb_ = 0;
63 
64  // get hold of back-end interface
65  DQMStore* dbe = 0;
66  dbe = Service<DQMStore> ().operator->();
67 
68  if (dbe) {
69  dbe->setCurrentFolder("L1T/L1TGT");
70  dbe->rmdir("L1T/L1TGT");
71  }
72 
73  if (dbe) {
74  dbe->setCurrentFolder("L1T/L1TGT");
75 
76  algo_bits = dbe->book1D("algo_bits", "GT algo bits", 128, -0.5, 127.5);
77  algo_bits->setAxisTitle("algorithm bits", 1);
78 
79  algo_bits_corr = dbe->book2D("algo_bits_corr",
80  "GT algo bit correlation",
81  128, -0.5, 127.5, 128, -0.5, 127.5);
82  algo_bits_corr->setAxisTitle("algorithm bits", 1);
83  algo_bits_corr->setAxisTitle("algorithm bits", 2);
84 
85  tt_bits = dbe->book1D("tt_bits",
86  "GT technical trigger bits",
87  64, -0.5, 63.5);
88  tt_bits->setAxisTitle("technical trigger bits", 1);
89 
90  tt_bits_corr = dbe->book2D("tt_bits_corr",
91  "GT tech. trig. bit correlation",
92  64, -0.5, 63.5, 64, -0.5, 63.5);
93  tt_bits_corr->setAxisTitle("technical trigger bits", 1);
94  tt_bits_corr->setAxisTitle("technical trigger bits", 2);
95 
96  algo_tt_bits_corr = dbe->book2D("algo_tt_bits_corr",
97  "GT algo tech. trig. bit correlation",
98  128, -0.5, 127.5, 64, -0.5, 63.5);
99  algo_tt_bits_corr->setAxisTitle("algorithm bits", 1);
100  algo_tt_bits_corr->setAxisTitle("technical trigger bits", 2);
101 
102  algo_bits_lumi = dbe->book2D("algo_bits_lumi",
103  "GT algo bit rate per lumi segment",
104  250, 0., 250., 128, -0.5, 127.5);
105  algo_bits_lumi->setAxisTitle("luminosity segment", 1);
106  algo_bits_lumi->setAxisTitle("algorithm bits", 2);
107 
108  tt_bits_lumi = dbe->book2D("tt_bits_lumi",
109  "GT tech. trig. bit rate per lumi segment",
110  250, 0., 250., 64, -0.5, 63.5);
111  tt_bits_lumi->setAxisTitle("luminosity segment", 1);
112  tt_bits_lumi->setAxisTitle("technical trigger bits", 2);
113 
114  event_type = dbe->book1D("event_type", "GT event type", 10, -0.5, 9.5);
115  event_type->setAxisTitle("event type", 1);
116  event_type->setBinLabel(2, "Physics", 1);
117  event_type->setBinLabel(3, "Calibration", 1);
118  event_type->setBinLabel(4, "Random", 1);
119  event_type->setBinLabel(6, "Traced", 1);
120  event_type->setBinLabel(7, "Test", 1);
121  event_type->setBinLabel(8, "Error", 1);
122 
123  event_number = dbe->book1D("event_number",
124  "GT Event number (from last resync)",
125  100, 0., 50000.);
126  event_number->setAxisTitle("event number", 1);
127 
128  event_lumi = dbe->bookProfile("event_lumi",
129  "GT Event number (from last resync) vs lumi section",
130  250, 0., 250., 100, -0.1, 1.e15, "s");
131  event_lumi->setAxisTitle("luminosity segment", 1);
132  event_lumi->setAxisTitle("event number", 2);
133 
134  trigger_number = dbe->book1D("trigger_number",
135  "GT Trigger number (from start run)",
136  100, 0., 50000.);
137  trigger_number->setAxisTitle("trigger number", 1);
138 
139  trigger_lumi = dbe->bookProfile("trigger_lumi",
140  "GT Trigger number (from start run) vs lumi section",
141  250, 0., 250., 100, -0.1, 1.e15, "s");
142  trigger_lumi->setAxisTitle("luminosity segment", 1);
143  trigger_lumi->setAxisTitle("trigger number", 2);
144 
145  evnum_trignum_lumi = dbe->bookProfile("evnum_trignum_lumi",
146  "GT Event/Trigger number ratio vs lumi section",
147  250, 0., 250., 100, -0.1, 2., "s");
148  evnum_trignum_lumi->setAxisTitle("luminosity segment", 1);
149  evnum_trignum_lumi->setAxisTitle("event/trigger number ratio", 2);
150 
151  orbit_lumi = dbe->bookProfile("orbit_lumi",
152  "GT orbit number vs lumi section",
153  250, 0., 250., 100, -0.1, 1.e15, "s");
154  orbit_lumi->setAxisTitle("luminosity segment", 1);
155  orbit_lumi->setAxisTitle("orbit number", 2);
156 
157  setupversion_lumi = dbe->bookProfile("setupversion_lumi",
158  "GT setup version vs lumi section",
159  250, 0., 250., 100, -0.1, 1.e10, "i");
160  setupversion_lumi->setAxisTitle("luminosity segment", 1);
161  setupversion_lumi->setAxisTitle("prescale stup version", 2);
162 
163  gtfe_bx = dbe->book1D("gtfe_bx", "GTFE Bx number", 3600, 0., 3600.);
164  gtfe_bx->setAxisTitle("GTFE BX number", 1);
165 
166  dbx_module = dbe->bookProfile("dbx_module",
167  "delta Bx of GT modules wrt. GTFE",
168  20, 0., 20., 100, -4000., 4000., "i");
169  dbx_module->setAxisTitle("GT crate module", 1);
170  dbx_module->setAxisTitle("Module Bx - GTFE Bx", 2);
171  dbx_module->setBinLabel(1, "GTFEevm", 1);
172  dbx_module->setBinLabel(2, "TCS", 1);
173  dbx_module->setBinLabel(3, "FDL", 1);
174  dbx_module->setBinLabel(4, "FDLloc", 1);
175  dbx_module->setBinLabel(5, "PSB9", 1);
176  dbx_module->setBinLabel(6, "PSB9loc", 1);
177  dbx_module->setBinLabel(7, "PSB13", 1);
178  dbx_module->setBinLabel(8, "PSB13loc", 1);
179  dbx_module->setBinLabel(9, "PSB14", 1);
180  dbx_module->setBinLabel(10, "PSB14loc", 1);
181  dbx_module->setBinLabel(11, "PSB15", 1);
182  dbx_module->setBinLabel(12, "PSB15loc", 1);
183  dbx_module->setBinLabel(13, "PSB19", 1);
184  dbx_module->setBinLabel(14, "PSB19loc", 1);
185  dbx_module->setBinLabel(15, "PSB20", 1);
186  dbx_module->setBinLabel(16, "PSB20loc", 1);
187  dbx_module->setBinLabel(17, "PSB21", 1);
188  dbx_module->setBinLabel(18, "PSB21loc", 1);
189  dbx_module->setBinLabel(19, "GMT", 1);
190 
191  BST_MasterStatus = dbe->book2D("BST_MasterStatus",
192  "BST master status over lumi segment",
193  250, 0., 250., 6, -1., 5.);
194  BST_MasterStatus->setAxisTitle("luminosity segment", 1);
195  BST_MasterStatus->setAxisTitle("BST master status", 2);
196  BST_MasterStatus->setBinLabel(2, "Master Beam 1", 2);
197  BST_MasterStatus->setBinLabel(3, "Master Beam 2", 2);
198 
199  BST_turnCountNumber = dbe->book2D("BST_turnCountNumber",
200  "BST turn count over lumi segment",
201  250, 0., 250., 250, 0., 4.3e9);
202  BST_turnCountNumber->setAxisTitle("luminosity segment", 1);
203  BST_turnCountNumber->setAxisTitle("BST turn count number", 2);
204 
205  BST_lhcFillNumber = dbe->book1D("BST_lhcFillNumber",
206  "BST LHC fill number % 1000", 1000, 0., 1000.);
207  BST_lhcFillNumber->setAxisTitle("BST LHC fill number modulo 1000");
208 
209  BST_beamMode = dbe->book2D("BST_beamMode",
210  "BST beam mode over lumi segment",
211  250, 0., 250., 25, 1., 26.);
212  BST_beamMode->setAxisTitle("luminosity segment", 1);
213  BST_beamMode->setAxisTitle("mode", 2);
214  BST_beamMode->setBinLabel(1, "no mode", 2);
215  BST_beamMode->setBinLabel(2, "setup", 2);
216  BST_beamMode->setBinLabel(3, "inj pilot", 2);
217  BST_beamMode->setBinLabel(4, "inj intr", 2);
218  BST_beamMode->setBinLabel(5, "inj nomn", 2);
219  BST_beamMode->setBinLabel(6, "pre ramp", 2);
220  BST_beamMode->setBinLabel(7, "ramp", 2);
221  BST_beamMode->setBinLabel(8, "flat top", 2);
222  BST_beamMode->setBinLabel(9, "squeeze", 2);
223  BST_beamMode->setBinLabel(10, "adjust", 2);
224  BST_beamMode->setBinLabel(11, "stable", 2);
225  BST_beamMode->setBinLabel(12, "unstable", 2);
226  BST_beamMode->setBinLabel(13, "beam dump", 2);
227  BST_beamMode->setBinLabel(14, "ramp down", 2);
228  BST_beamMode->setBinLabel(15, "recovery", 2);
229  BST_beamMode->setBinLabel(16, "inj dump", 2);
230  BST_beamMode->setBinLabel(17, "circ dump", 2);
231  BST_beamMode->setBinLabel(18, "abort", 2);
232  BST_beamMode->setBinLabel(19, "cycling", 2);
233  BST_beamMode->setBinLabel(20, "warn beam dump", 2);
234  BST_beamMode->setBinLabel(21, "no beam", 2);
235 
236  BST_beamMomentum = dbe->book2D("BST_beamMomentum",
237  "BST beam momentum",
238  250, 0., 250., 100, 0., 7200.);
239  BST_beamMomentum->setAxisTitle("luminosity segment", 1);
240  BST_beamMomentum->setAxisTitle("beam momentum", 2);
241 
242  gpsfreq = dbe->book1D("gpsfreq", "clock frequency measured by GPS",
243  1000, 39.95, 40.2);
244  gpsfreq->setAxisTitle("CMS clock frequency (MHz)");
245 
246  gpsfreqwide = dbe->book1D("gpsfreqwide",
247  "clock frequency measured by GPS", 1000, -2., 200.);
248  gpsfreqwide->setAxisTitle("CMS clock frequency (MHz)");
249 
250  gpsfreqlum = dbe->book2D("gpsfreqlum",
251  "clock frequency measured by GPS",
252  250, 0., 250., 100, 39.95, 40.2);
253  gpsfreqlum->setAxisTitle("luminosity segment", 1);
254  gpsfreqlum->setAxisTitle("CMS clock frequency (MHz)", 2);
255 
256  BST_intensityBeam1 = dbe->book2D("BST_intensityBeam1",
257  "intensity beam 1",
258  250, 0., 250., 100, 0., 100.);
259  BST_intensityBeam1->setAxisTitle("luminosity segment", 1);
260  BST_intensityBeam1->setAxisTitle("beam intensity", 2);
261 
262  BST_intensityBeam2 = dbe->book2D("BST_intensityBeam2",
263  "intensity beam 2",
264  250, 0., 250., 100, 0., 100.);
265  BST_intensityBeam2->setAxisTitle("luminosity segment", 1);
266  BST_intensityBeam2->setAxisTitle("beam intensity", 2);
267 
268  m_monL1PrescaleFactorSet = dbe->book2D("L1PrescaleFactorSet",
269  "Index of L1 prescale factor set",
270  250, 0., 250., 25, 0., 25.);
271  m_monL1PrescaleFactorSet->setAxisTitle("Luminosity segment", 1);
272  m_monL1PrescaleFactorSet->setAxisTitle("L1 PF set index", 2);
273 
274  }
275 }
MonitorElement * m_monL1PrescaleFactorSet
Definition: L1TGT.h:112
MonitorElement * gpsfreqwide
Definition: L1TGT.h:109
boost::uint64_t preGps_
Definition: L1TGT.h:125
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2311
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)
MonitorElement * BST_intensityBeam1
Definition: L1TGT.h:106
MonitorElement * algo_bits_corr
Definition: L1TGT.h:82
MonitorElement * tt_bits
Definition: L1TGT.h:83
MonitorElement * gtfe_bx
Definition: L1TGT.h:98
MonitorElement * BST_beamMode
Definition: L1TGT.h:104
MonitorElement * BST_MasterStatus
Definition: L1TGT.h:101
MonitorElement * BST_intensityBeam2
Definition: L1TGT.h:107
MonitorElement * event_number
Definition: L1TGT.h:90
MonitorElement * orbit_lumi
Definition: L1TGT.h:95
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:828
DQMStore * dbe
Definition: L1TGT.h:79
MonitorElement * algo_bits_lumi
Definition: L1TGT.h:86
MonitorElement * gpsfreq
Definition: L1TGT.h:108
int nev_
Definition: L1TGT.h:117
MonitorElement * algo_bits
Definition: L1TGT.h:81
MonitorElement * event_type
Definition: L1TGT.h:88
MonitorElement * dbx_module
Definition: L1TGT.h:99
MonitorElement * tt_bits_corr
Definition: L1TGT.h:84
MonitorElement * gpsfreqlum
Definition: L1TGT.h:110
MonitorElement * trigger_number
Definition: L1TGT.h:92
MonitorElement * BST_beamMomentum
Definition: L1TGT.h:105
MonitorElement * BST_lhcFillNumber
Definition: L1TGT.h:103
MonitorElement * setupversion_lumi
Definition: L1TGT.h:96
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
MonitorElement * BST_turnCountNumber
Definition: L1TGT.h:102
boost::uint64_t preOrb_
Definition: L1TGT.h:126
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * event_lumi
Definition: L1TGT.h:91
MonitorElement * tt_bits_lumi
Definition: L1TGT.h:87
MonitorElement * trigger_lumi
Definition: L1TGT.h:93
MonitorElement * evnum_trignum_lumi
Definition: L1TGT.h:94
MonitorElement * algo_tt_bits_corr
Definition: L1TGT.h:85
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void L1TGT::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 277 of file L1TGT.cc.

References gather_cfg::cout, dbe, nev_, outputFile_, DQMStore::save(), and verbose_.

277  {
278 
279  if (verbose_) {
280  cout << "L1TGT: end job...." << endl;
281  }
282 
283  LogInfo("EndJob") << "analyzed " << nev_ << " events";
284 
285  if (outputFile_.size() != 0 && dbe)
286  dbe->save(outputFile_);
287 
288  return;
289 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1898
std::string outputFile_
Definition: L1TGT.h:118
bool verbose_
Definition: L1TGT.h:119
DQMStore * dbe
Definition: L1TGT.h:79
int nev_
Definition: L1TGT.h:117
tuple cout
Definition: gather_cfg.py:41
bool L1TGT::isActive ( int  word,
int  bit 
)
private

Definition at line 534 of file L1TGT.cc.

Referenced by analyze().

534  {
535  if (word & (1 << bit))
536  return true;
537  return false;
538 }

Member Data Documentation

MonitorElement* L1TGT::algo_bits
private

Definition at line 81 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::algo_bits_corr
private

Definition at line 82 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::algo_bits_lumi
private

Definition at line 86 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::algo_tt_bits_corr
private

Definition at line 85 of file L1TGT.h.

Referenced by beginJob().

MonitorElement* L1TGT::BST_beamMode
private

Definition at line 104 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::BST_beamMomentum
private

Definition at line 105 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::BST_intensityBeam1
private

Definition at line 106 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::BST_intensityBeam2
private

Definition at line 107 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::BST_lhcFillNumber
private

Definition at line 103 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::BST_MasterStatus
private

Definition at line 101 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::BST_turnCountNumber
private

Definition at line 102 of file L1TGT.h.

Referenced by analyze(), and beginJob().

DQMStore* L1TGT::dbe
private

Definition at line 79 of file L1TGT.h.

Referenced by beginJob(), endJob(), and L1TGT().

MonitorElement* L1TGT::dbx_module
private

Definition at line 99 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::event_lumi
private

Definition at line 91 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::event_number
private

Definition at line 90 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::event_type
private

Definition at line 88 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::evnum_trignum_lumi
private

Definition at line 94 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::gpsfreq
private

Definition at line 108 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::gpsfreqlum
private

Definition at line 110 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::gpsfreqwide
private

Definition at line 109 of file L1TGT.h.

Referenced by analyze(), and beginJob().

edm::InputTag L1TGT::gtEvmSource_
private

Definition at line 123 of file L1TGT.h.

Referenced by analyze().

MonitorElement* L1TGT::gtfe_bx
private

Definition at line 98 of file L1TGT.h.

Referenced by analyze(), and beginJob().

edm::InputTag L1TGT::gtSource_
private

Definition at line 122 of file L1TGT.h.

Referenced by analyze().

ofstream L1TGT::logFile_
private

Definition at line 121 of file L1TGT.h.

MonitorElement* L1TGT::m_monL1PrescaleFactorSet
private

Definition at line 112 of file L1TGT.h.

Referenced by analyze(), and beginJob().

bool L1TGT::monitorDaemon_
private

Definition at line 120 of file L1TGT.h.

int L1TGT::nev_
private

Definition at line 117 of file L1TGT.h.

Referenced by analyze(), beginJob(), and endJob().

MonitorElement* L1TGT::orbit_lumi
private

Definition at line 95 of file L1TGT.h.

Referenced by analyze(), and beginJob().

std::string L1TGT::outputFile_
private

Definition at line 118 of file L1TGT.h.

Referenced by endJob(), and L1TGT().

boost::uint64_t L1TGT::preGps_
private

Definition at line 125 of file L1TGT.h.

Referenced by analyze(), and beginJob().

boost::uint64_t L1TGT::preOrb_
private

Definition at line 126 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::setupversion_lumi
private

Definition at line 96 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::trigger_lumi
private

Definition at line 93 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::trigger_number
private

Definition at line 92 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::tt_bits
private

Definition at line 83 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::tt_bits_corr
private

Definition at line 84 of file L1TGT.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TGT::tt_bits_lumi
private

Definition at line 87 of file L1TGT.h.

Referenced by analyze(), and beginJob().

bool L1TGT::verbose_
private

Definition at line 119 of file L1TGT.h.

Referenced by analyze(), endJob(), and L1TGT().