CMS 3D CMS Logo

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

#include <L1TDTTPG.h>

Inheritance diagram for L1TDTTPG:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

 L1TDTTPG (const edm::ParameterSet &ps)
 
 ~L1TDTTPG () override
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 

Private Member Functions

void setMapPhLabel (MonitorElement *me)
 
void setMapThLabel (MonitorElement *me)
 

Private Attributes

MonitorElementdttf_p_phi [3]
 
MonitorElementdttf_p_pt [3]
 
MonitorElementdttf_p_q [3]
 
MonitorElementdttf_p_qual [3]
 
MonitorElementdttpgphbestmap
 
MonitorElementdttpgphbestmapcorr
 
MonitorElementdttpgphbx [8]
 
MonitorElementdttpgphbxcomp
 
MonitorElementdttpgphmap
 
MonitorElementdttpgphmap2nd
 
MonitorElementdttpgphmapbx [3]
 
MonitorElementdttpgphmapcorr
 
MonitorElementdttpgphntrack
 
MonitorElementdttpgphquality [3]
 
MonitorElementdttpgphsector [3]
 
MonitorElementdttpgphstation [3]
 
MonitorElementdttpgphts2tag [3]
 
MonitorElementdttpgphwheel [3]
 
edm::InputTag dttpgSource_
 
edm::EDGetTokenT< L1MuDTChambPhContainerdttpgSourcePhContainer_token_
 
edm::EDGetTokenT< L1MuDTChambThContainerdttpgSourceThContainer_token_
 
MonitorElementdttpgthbestmap
 
MonitorElementdttpgthbestmaph
 
MonitorElementdttpgthbx [3]
 
MonitorElementdttpgthmap
 
MonitorElementdttpgthmapbx [3]
 
MonitorElementdttpgthmaph
 
MonitorElementdttpgthntrack
 
MonitorElementdttpgthquality [3]
 
MonitorElementdttpgthsector [3]
 
MonitorElementdttpgthstation [3]
 
MonitorElementdttpgththeta [3]
 
MonitorElementdttpgthwheel [3]
 
std::ofstream logFile_
 
bool monitorDaemon_
 
int nev_
 
std::string outputFile_
 
std::string trstring_
 
edm::EDGetTokenT< L1MuDTTrackContainertrToken_
 
bool verbose_
 

Detailed Description

Definition at line 40 of file L1TDTTPG.h.

Constructor & Destructor Documentation

L1TDTTPG::L1TDTTPG ( const edm::ParameterSet ps)

Definition at line 93 of file L1TDTTPG.cc.

References gather_cfg::cout, dttpgSource_, edm::ParameterSet::getUntrackedParameter(), edm::InputTag::label(), outputFile_, edm::InputTag::process(), trstring_, trToken_, and verbose_.

94  : dttpgSourcePhContainer_token_( consumes<L1MuDTChambPhContainer>(ps.getParameter< InputTag >("dttpgSource") )),
95  dttpgSourceThContainer_token_( consumes<L1MuDTChambThContainer>(ps.getParameter< InputTag >("dttpgSource") )),
96  dttpgSource_( ps.getParameter< InputTag >("dttpgSource") )
97 {
98  trstring_ = dttpgSource_.label()+":"+"DATA"+":"+dttpgSource_.process();
99  trToken_ = consumes<L1MuDTTrackContainer>(trstring_);
100 
101  // verbosity switch
102  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
103 
104  if(verbose_) cout << "L1TDTTPG: constructor...." << endl;
105 
106  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
107  if ( !outputFile_.empty() ) {
108  cout << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
109  }
110 
111  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
112  if(disable){
113  outputFile_="";
114  }
115 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< L1MuDTChambThContainer > dttpgSourceThContainer_token_
Definition: L1TDTTPG.h:109
edm::EDGetTokenT< L1MuDTTrackContainer > trToken_
Definition: L1TDTTPG.h:113
std::string outputFile_
Definition: L1TDTTPG.h:104
edm::InputTag dttpgSource_
Definition: L1TDTTPG.h:110
edm::EDGetTokenT< L1MuDTChambPhContainer > dttpgSourcePhContainer_token_
Definition: L1TDTTPG.h:108
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
std::string trstring_
Definition: L1TDTTPG.h:112
bool verbose_
Definition: L1TDTTPG.h:105
L1TDTTPG::~L1TDTTPG ( )
override

Definition at line 117 of file L1TDTTPG.cc.

118 {
119 }

Member Function Documentation

void L1TDTTPG::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

Definition at line 288 of file L1TDTTPG.cc.

References L1MuDTChambPhDigi::code(), gather_cfg::cout, dttf_p_phi, dttf_p_pt, dttf_p_q, dttf_p_qual, dttpgphbestmap, dttpgphbestmapcorr, dttpgphbx, dttpgphbxcomp, dttpgphmap, dttpgphmap2nd, dttpgphmapbx, dttpgphmapcorr, dttpgphntrack, dttpgphquality, dttpgphsector, dttpgphstation, dttpgphts2tag, dttpgphwheel, dttpgSource_, dttpgSourcePhContainer_token_, dttpgSourceThContainer_token_, dttpgthbestmap, dttpgthbestmaph, dttpgthbx, dttpgthmap, dttpgthmapbx, dttpgthmaph, dttpgthntrack, dttpgthquality, dttpgthsector, dttpgthstation, dttpgththeta, dttpgthwheel, MonitorElement::Fill(), edm::Event::getByToken(), L1MuDTTrackContainer::getContainer(), L1MuDTChambPhContainer::getContainer(), L1MuDTChambThContainer::getContainer(), mps_fire::i, edm::HandleBase::isValid(), gen::k, edm::InputTag::label(), nev_, lumiQTWidget::t, trToken_, and verbose_.

289 {
290 
291  nev_++;
292  if(verbose_) cout << "L1TDTTPG: analyze...." << endl;
293 
294  edm::Handle<L1MuDTChambPhContainer > myL1MuDTChambPhContainer;
295  e.getByToken(dttpgSourcePhContainer_token_,myL1MuDTChambPhContainer);
296 
297  if (!myL1MuDTChambPhContainer.isValid()) {
298  edm::LogInfo("DataNotFound") << "can't find L1MuDTChambPhContainer with label "
299  << dttpgSource_.label() ;
300  return;
301  }
302  L1MuDTChambPhContainer::Phi_Container const *myPhContainer =
303  myL1MuDTChambPhContainer->getContainer();
304 
305  edm::Handle<L1MuDTChambThContainer > myL1MuDTChambThContainer;
306  e.getByToken(dttpgSourceThContainer_token_,myL1MuDTChambThContainer);
307 
308  if (!myL1MuDTChambThContainer.isValid()) {
309  edm::LogInfo("DataNotFound") << "can't find L1MuDTChambThContainer with label "
310  << dttpgSource_.label() ;
311  edm::LogInfo("DataNotFound") << "if this fails try to add DATA to the process name." ;
312 
313  return;
314  }
315  L1MuDTChambThContainer::The_Container const* myThContainer =
316  myL1MuDTChambThContainer->getContainer();
317 
318  int ndttpgphtrack = 0;
319  int ndttpgthtrack = 0;
320  int NumberOfSegmentsPhi[3]={0,0,0};
321 
322  for( L1MuDTChambPhContainer::Phi_Container::const_iterator
323  DTPhDigiItr = myPhContainer->begin() ;
324  DTPhDigiItr != myPhContainer->end() ;
325  ++DTPhDigiItr )
326  {
327  int bx = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag();
328  if(bx == -1)
329  NumberOfSegmentsPhi[0]++;
330  if(bx == 0)
331  NumberOfSegmentsPhi[1]++;
332  if(bx == 1)
333  NumberOfSegmentsPhi[2]++;
334  }
335  /*Fill Histos for Segment counter for each bx separately */
336 
337  for(int k=0;k<3;k++){
338  dttpgphbx[k+2]->Fill(NumberOfSegmentsPhi[k]);
339  }
340  int bxCounterDttfPhi=0; // = no. of BX's with non-zero data
341  for (int k=0;k<3;k++){
342  if (NumberOfSegmentsPhi[k]>0)
343  bxCounterDttfPhi++;
344  }
345 
346  /* the BX "code" */
347 
348  int bxCodePhi=0;
349  if(bxCounterDttfPhi==0){
350  bxCodePhi=0;
351  }else if(bxCounterDttfPhi==1){
352  for(int k=0;k<3;k++){
353  if(NumberOfSegmentsPhi[k]>0)
354  bxCodePhi=k+2;
355  }
356  }else if(bxCounterDttfPhi==2){
357  for(int k=0;k<3;k++){
358  if(NumberOfSegmentsPhi[k]==0)
359  bxCodePhi=8-k;
360  }
361  }else if(bxCounterDttfPhi==3){
362  bxCodePhi=10;
363  }
364 
365  //The bx analyzer histo
366  dttpgphbx[0]->Fill(bxCodePhi);
367 
368 
369  const L1MuDTChambPhDigi* bestPhQualMap[5][12][4];
370  memset(bestPhQualMap,0,240*sizeof(L1MuDTChambPhDigi*));
371 
372  for( L1MuDTChambPhContainer::Phi_Container::const_iterator
373  DTPhDigiItr = myPhContainer->begin() ;
374  DTPhDigiItr != myPhContainer->end() ;
375  ++DTPhDigiItr )
376  {
377 
378  ndttpgphtrack++;
379 
380  int bxindex = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1;
381 
382  dttpgphwheel[bxindex]->Fill(DTPhDigiItr->whNum());
383  if (verbose_)
384  {
385  cout << "DTTPG phi wheel number " << DTPhDigiItr->whNum() << endl;
386  }
387  dttpgphstation[bxindex]->Fill(DTPhDigiItr->stNum());
388  if (verbose_)
389  {
390  cout << "DTTPG phi station number " << DTPhDigiItr->stNum() << endl;
391  }
392  dttpgphsector[bxindex]->Fill(DTPhDigiItr->scNum());
393  if (verbose_)
394  {
395  cout << "DTTPG phi sector number " << DTPhDigiItr->scNum() << endl;
396  }
397  dttpgphquality[bxindex]->Fill(DTPhDigiItr->code());
398  if (verbose_)
399  {
400  cout << "DTTPG phi quality " << DTPhDigiItr->code() << endl;
401  }
402  dttpgphts2tag[bxindex]->Fill(DTPhDigiItr->Ts2Tag());
403  if (verbose_)
404  {
405  cout << "DTTPG phi ts2tag " << DTPhDigiItr->Ts2Tag() << endl;
406  }
407  int ypos = DTPhDigiItr->scNum();
408  int xpos = DTPhDigiItr->stNum()+4*(DTPhDigiItr->whNum()+2);
409  dttpgphmap->Fill(xpos,ypos);
410  if (DTPhDigiItr->Ts2Tag())
411  dttpgphmap2nd->Fill(xpos,ypos);
412  dttpgphmapbx[bxindex]->Fill(xpos,ypos);
413  if (DTPhDigiItr->code()>3)
414  dttpgphmapcorr->Fill(xpos,ypos);
415 
416  if (bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]==nullptr ||
417  bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]->code()<DTPhDigiItr->code())
418  {
419  bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]=&(*DTPhDigiItr);
420  }
421 
422  }
423 
424  for (int iwh=0; iwh<5; iwh++){
425  for (int isec=0; isec<12; isec++){
426  for (int ist=0; ist<4; ist++){
427  if (bestPhQualMap[iwh][isec][ist]){
428  int xpos = iwh*4+ist+1;
429  dttpgphbestmap->Fill(xpos,isec);
430  if(bestPhQualMap[iwh][isec][ist]->code()>3)
431  dttpgphbestmapcorr->Fill(xpos,isec);
432  }
433  }
434  }
435  }
436 
437 
438  int bestThQualMap[5][12][3];
439  memset(bestThQualMap,0,180*sizeof(int));
440  //for( vector<L1MuDTChambThDigi>::const_iterator
441  for( L1MuDTChambThContainer::The_Container::const_iterator
442  DTThDigiItr = myThContainer->begin() ;
443  DTThDigiItr != myThContainer->end() ;
444  ++DTThDigiItr )
445  {
446  ndttpgthtrack++;
447 
448  int bxindex = DTThDigiItr->bxNum() + 1;
449 
450  dttpgthwheel[bxindex]->Fill(DTThDigiItr->whNum());
451  if (verbose_)
452  {
453  cout << "DTTPG theta wheel number " << DTThDigiItr->whNum() << endl;
454  }
455  dttpgthstation[bxindex]->Fill(DTThDigiItr->stNum());
456  if (verbose_)
457  {
458  cout << "DTTPG theta station number " << DTThDigiItr->stNum() << endl;
459  }
460  dttpgthsector[bxindex]->Fill(DTThDigiItr->scNum());
461  if (verbose_)
462  {
463  cout << "DTTPG theta sector number " << DTThDigiItr->scNum() << endl;
464  }
465  dttpgthbx[bxindex]->Fill(DTThDigiItr->bxNum());
466  if (verbose_)
467  {
468  cout << "DTTPG theta bx number " << DTThDigiItr->bxNum() << endl;
469  }
470  int thcode[7]= {0,0,0,0,0,0,0};
471  for (int j = 0; j < 7; j++)
472  {
473  dttpgththeta[bxindex]->Fill(DTThDigiItr->position(j));
474  if (verbose_)
475  {
476  cout << "DTTPG theta position " << DTThDigiItr->position(j) << endl;
477  }
478  thcode[j]=DTThDigiItr->code(j);
479  dttpgthquality[bxindex]->Fill(thcode[j]);
480  if (verbose_)
481  {
482  cout << "DTTPG theta quality " << DTThDigiItr->code(j) << endl;
483  }
484  }
485 
486  int ypos = DTThDigiItr->scNum();
487  int xpos = DTThDigiItr->stNum()+4*(DTThDigiItr->whNum()+2);
488  int bestqual=0;
489  dttpgthmap->Fill(xpos,ypos);
490  dttpgthmapbx[bxindex]->Fill(xpos,ypos);
491  for (int pos = 0; pos < 7; pos++){
492  if (thcode[pos]>bestqual)
493  bestqual=thcode[pos];
494  if(thcode[pos]==2)
495  dttpgthmaph->Fill(xpos,ypos);
496  }
497 
498  if (bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1] < bestqual)
499  {
500  bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1]=bestqual;
501  }
502  }
503 
504  for (int iwh=0; iwh<5; iwh++){
505  for (int isec=0; isec<12; isec++){
506  for (int ist=0; ist<3; ist++){
507  if (bestThQualMap[iwh][isec][ist]){
508  int xpos = iwh*4+ist+1;
509  dttpgthbestmap->Fill(xpos,isec);
510  if(bestThQualMap[iwh][isec][ist]==2)
511  dttpgthbestmaph->Fill(xpos,isec);
512  }
513  }
514  }
515  }
516 
517 
518  dttpgphntrack->Fill(ndttpgphtrack);
519  if (verbose_)
520  {
521  cout << "DTTPG phi ntrack " << ndttpgphtrack << endl;
522  }
523  dttpgthntrack->Fill(ndttpgthtrack);
524  if (verbose_) {
525  cout << "DTTPG theta ntrack " << ndttpgthtrack << endl;
526  }
527 
528  edm::Handle<L1MuDTTrackContainer > myL1MuDTTrackContainer;
529  e.getByToken(trToken_,myL1MuDTTrackContainer);
530 
531  if (!myL1MuDTTrackContainer.isValid()) {
532  edm::LogInfo("DataNotFound") << "can't find L1MuDTTrackContainer with label "
533  << dttpgSource_.label() ;
534  return;
535  }
536 
537  L1MuDTTrackContainer::TrackContainer const * t = myL1MuDTTrackContainer->getContainer();
538 
539 
540 
541  int NumberOfSegmentsOut[3]={0,0,0};
542  for ( L1MuDTTrackContainer::TrackContainer::const_iterator i
543  = t->begin(); i != t->end(); ++i ) {
544  if(i->bx() ==-1)
545  NumberOfSegmentsOut[0]++;
546  if(i->bx() ==0)
547  NumberOfSegmentsOut[1]++;
548  if(i->bx() ==1)
549  NumberOfSegmentsOut[2]++;
550  }
551 
552 
553  /*Fill Histos for Segment counter*/
554  for(int k=0;k<3;k++){
555  dttpgphbx[k+5]->Fill(NumberOfSegmentsOut[k]);
556  }
557 
558  /*Bunch assigments*/
559 
560  int bxCounterDttfOut=0;
561  for (int k=0;k<3;k++){
562  if (NumberOfSegmentsOut[k]>0)
563  bxCounterDttfOut++;
564  }
565 
566  int bxCodeOut=0;
567  if(bxCounterDttfOut==0){
568  bxCodeOut=0;
569  }else if(bxCounterDttfOut==1){
570  for(int k=0;k<3;k++){
571  if(NumberOfSegmentsOut[k]>0)
572  bxCodeOut=k+2;
573  }
574  }else if(bxCounterDttfOut==2){
575  for(int k=0;k<3;k++){
576  if(NumberOfSegmentsOut[k]==0)
577  bxCodeOut=8-k;
578  }
579  }else if(bxCounterDttfOut==3){
580  bxCodeOut=10;
581  }
582 
583  //The bx analyzer histo
584  dttpgphbx[1]->Fill(bxCodeOut);
585 
586  /*End Dttf Output Bunch analysis*/
587 
588  // the 2-DIM histo with phi.input vs. output
589  dttpgphbxcomp->Fill(bxCodePhi,bxCodeOut);
590 
591 
592  for ( L1MuDTTrackContainer::TrackContainer::const_iterator i
593  = t->begin(); i != t->end(); ++i ) {
594  if ( verbose_ ) {
595  std::cout << "bx = " << i->bx()
596  << std::endl;
597  std::cout << "quality (packed) = " << i->quality_packed()
598  << std::endl;
599  std::cout << "pt (packed) = " << i->pt_packed()
600  << std::endl;
601  std::cout << "phi (packed) = " << i->phi_packed()
602  << std::endl;
603  std::cout << "charge (packed) = " << i->charge_packed()
604  << std::endl;
605  }
606 
607 
608  int bxindex = i->bx() + 1;
609  dttf_p_phi[bxindex]->Fill(i->phi_packed());
610  dttf_p_qual[bxindex]->Fill(i->quality_packed());
611  dttf_p_pt[bxindex]->Fill(i->pt_packed());
612  dttf_p_q[bxindex]->Fill(i->charge_packed());
613  }
614 
615 }
The_Container const * getContainer() const
MonitorElement * dttpgthbestmaph
Definition: L1TDTTPG.h:96
MonitorElement * dttf_p_phi[3]
Definition: L1TDTTPG.h:98
MonitorElement * dttpgphmap
Definition: L1TDTTPG.h:77
MonitorElement * dttpgphbestmapcorr
Definition: L1TDTTPG.h:82
MonitorElement * dttpgphmapcorr
Definition: L1TDTTPG.h:80
MonitorElement * dttpgphbx[8]
Definition: L1TDTTPG.h:66
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
int nev_
Definition: L1TDTTPG.h:103
edm::EDGetTokenT< L1MuDTChambThContainer > dttpgSourceThContainer_token_
Definition: L1TDTTPG.h:109
MonitorElement * dttpgththeta[3]
Definition: L1TDTTPG.h:89
MonitorElement * dttpgphwheel[3]
Definition: L1TDTTPG.h:68
MonitorElement * dttpgthbestmap
Definition: L1TDTTPG.h:95
MonitorElement * dttpgphbxcomp
Definition: L1TDTTPG.h:67
edm::EDGetTokenT< L1MuDTTrackContainer > trToken_
Definition: L1TDTTPG.h:113
MonitorElement * dttpgthmaph
Definition: L1TDTTPG.h:94
void Fill(long long x)
MonitorElement * dttpgthsector[3]
Definition: L1TDTTPG.h:87
MonitorElement * dttpgthmapbx[3]
Definition: L1TDTTPG.h:93
MonitorElement * dttpgthwheel[3]
Definition: L1TDTTPG.h:86
MonitorElement * dttpgthmap
Definition: L1TDTTPG.h:92
std::vector< L1MuDTTrackCand > TrackContainer
MonitorElement * dttf_p_qual[3]
Definition: L1TDTTPG.h:101
MonitorElement * dttpgthbx[3]
Definition: L1TDTTPG.h:85
MonitorElement * dttpgthquality[3]
Definition: L1TDTTPG.h:90
std::vector< L1MuDTChambPhDigi > Phi_Container
MonitorElement * dttf_p_pt[3]
Definition: L1TDTTPG.h:99
std::vector< L1MuDTChambThDigi > The_Container
bool isValid() const
Definition: HandleBase.h:74
int k[5][pyjets_maxn]
MonitorElement * dttpgphbestmap
Definition: L1TDTTPG.h:81
MonitorElement * dttpgthntrack
Definition: L1TDTTPG.h:91
edm::InputTag dttpgSource_
Definition: L1TDTTPG.h:110
MonitorElement * dttpgphts2tag[3]
Definition: L1TDTTPG.h:74
MonitorElement * dttpgphntrack
Definition: L1TDTTPG.h:76
Phi_Container const * getContainer() const
edm::EDGetTokenT< L1MuDTChambPhContainer > dttpgSourcePhContainer_token_
Definition: L1TDTTPG.h:108
MonitorElement * dttf_p_q[3]
Definition: L1TDTTPG.h:100
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * dttpgphmapbx[3]
Definition: L1TDTTPG.h:78
bool verbose_
Definition: L1TDTTPG.h:105
MonitorElement * dttpgthstation[3]
Definition: L1TDTTPG.h:88
MonitorElement * dttpgphsector[3]
Definition: L1TDTTPG.h:69
TrackContainer const * getContainer() const
MonitorElement * dttpgphquality[3]
Definition: L1TDTTPG.h:73
MonitorElement * dttpgphmap2nd
Definition: L1TDTTPG.h:79
MonitorElement * dttpgphstation[3]
Definition: L1TDTTPG.h:70
void L1TDTTPG::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 128 of file L1TDTTPG.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), dttf_p_phi, dttf_p_pt, dttf_p_q, dttf_p_qual, dttpgphbestmap, dttpgphbestmapcorr, dttpgphbx, dttpgphbxcomp, dttpgphmap, dttpgphmap2nd, dttpgphmapbx, dttpgphmapcorr, dttpgphntrack, dttpgphquality, dttpgphsector, dttpgphstation, dttpgphts2tag, dttpgphwheel, dttpgthbestmap, dttpgthbestmaph, dttpgthbx, dttpgthmap, dttpgthmapbx, dttpgthmaph, dttpgthntrack, dttpgthquality, dttpgthsector, dttpgthstation, dttpgththeta, dttpgthwheel, mps_fire::i, nev_, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), setMapPhLabel(), and setMapThLabel().

129 {
130  nev_ = 0;
131  ibooker.setCurrentFolder("L1T/L1TDTTPG");
132 
133 
134  //hist1[0]
135  dttpgphbx[0] = ibooker.book1D("BxEncoding_PHI",
136  "Bunch encoding DTTF Phi",11,0,11);
137  //hist1[1]
138  dttpgphbx[1] = ibooker.book1D("BxEncoding_OUT",
139  "Bunch encoding DTTF Output",11,0,11);
140 
141  //hist1[2]
142  dttpgphbx[2] = ibooker.book1D("NumberOfSegmentsPHI_BunchNeg1",
143  "Number of segments for bunch -1 Dttf Phi",
144  20,0,20);
145  //hist1[3]
146  dttpgphbx[3] = ibooker.book1D("NumberOfSegmentsPHI_Bunch0",
147  "Number of segments for bunch 0 Dttf Phi",
148  20,0,20);
149  //hist1[4]
150  dttpgphbx[4] = ibooker.book1D("NumberOfSegmentsPHI_Bunch1",
151  "Number of segments for bunch 1 Dttf Phi",
152  20,0,20);
153 
154  //hist1[5]
155  dttpgphbx[5] = ibooker.book1D("NumberOfSegmentsOUT_BunchNeg1",
156  "Number of segments for bunch -1 Dttf Output",
157  20,0,20);
158  //hist1[6]
159  dttpgphbx[6] = ibooker.book1D("NumberOfSegmentsOUT_Bunch0",
160  "Number of segments for bunch 0 Dttf Output",
161  20,0,20);
162  //hist1[7]
163  dttpgphbx[7] = ibooker.book1D("NumberOfSegmentsOUT_Bunch1",
164  "Number of segments for bunch 1 Dttf Output",
165  20,0,20);
166 
167  for(int i=0;i<2;i++){
168  dttpgphbx[i]->setBinLabel(1,"None");
169  dttpgphbx[i]->setBinLabel(3,"Only bx=-1");
170  dttpgphbx[i]->setBinLabel(4,"Only bx= 0");
171  dttpgphbx[i]->setBinLabel(5,"Only bx=+1");
172  dttpgphbx[i]->setBinLabel(7,"Bx=-1,0");
173  dttpgphbx[i]->setBinLabel(8,"Bx=-1,1");
174  dttpgphbx[i]->setBinLabel(9,"Bx= 0,1");
175  dttpgphbx[i]->setBinLabel(11,"All bx");
176  }
177 
178  dttpgphbxcomp = ibooker.book2D("BxEncoding_PHI_OUT",
179  "Bunch encoding: DTTF Phi vs. Output",
180  11,0,11,11,0,11);
181  dttpgphbxcomp->setAxisTitle("DTTF (output)",1);
182  dttpgphbxcomp->setAxisTitle("PHI-TF",2);
183  for(int i=1;i<=2;i++){
184  dttpgphbxcomp->setBinLabel(1,"None",i);
185  dttpgphbxcomp->setBinLabel(3,"Only bx=-1",i);
186  dttpgphbxcomp->setBinLabel(4,"Only bx= 0",i);
187  dttpgphbxcomp->setBinLabel(5,"Only bx=+1",i);
188  dttpgphbxcomp->setBinLabel(7,"Bx=-1,0",i);
189  dttpgphbxcomp->setBinLabel(8,"Bx=-1,1",i);
190  dttpgphbxcomp->setBinLabel(9,"Bx= 0,1",i);
191  dttpgphbxcomp->setBinLabel(11,"All bx",i);
192  }
193 
194  dttpgphntrack = ibooker.book1D("DT_TPG_phi_ntrack",
195  "DT TPG phi ntrack", 20, -0.5, 19.5 ) ;
196  dttpgthntrack = ibooker.book1D("DT_TPG_theta_ntrack",
197  "DT TPG theta ntrack", 20, -0.5, 19.5 ) ;
198 
199  for (int ibx=0 ; ibx<=2; ibx++) {
200 
201  ostringstream bxnum;
202  bxnum << ibx-1;
203  string bxn;
204  if (ibx<2)
205  bxn = bxnum.str();
206  else
207  bxn = "+" + bxnum.str();
208 
209  // Phi
210  dttpgphwheel[ibx] = ibooker.book1D("DT_TPG_phi_wheel_number_"+bxn,
211  "DT TPG phi wheel number "+bxn, 5, -2.5, 2.5 ) ;
212  dttpgphsector[ibx] = ibooker.book1D("DT_TPG_phi_sector_number_"+bxn,
213  "DT TPG phi sector number "+bxn, 12, -0.5, 11.5 );
214  dttpgphstation[ibx] = ibooker.book1D("DT_TPG_phi_station_number_"+bxn,
215  "DT TPG phi station number "+bxn, 5, 0.5, 4.5 ) ;
216 // dttpgphphi[ibx] = dbe->book1D("DT_TPG_phi_"+bxn,
217 // "DT TPG phi "+bxn, 100, -2100., 2100. ) ;
218 // dttpgphphiB[ibx] = dbe->book1D("DT_TPG_phiB_"+bxn,
219 // "DT TPG phiB "+bxn, 100, -550., 550. ) ;
220  dttpgphquality[ibx] = ibooker.book1D("DT_TPG_phi_quality_"+bxn,
221  "DT TPG phi quality "+bxn, 8, -0.5, 7.5 ) ;
222  dttpgphts2tag[ibx] = ibooker.book1D("DT_TPG_phi_Ts2Tag_"+bxn,
223  "DT TPG phi Ts2Tag "+bxn, 2, -0.5, 1.5 ) ;
224 // dttpgphbxcnt[ibx] = dbe->book1D("DT_TPG_phi_BxCnt_"+bxn,
225 // "DT TPG phi BxCnt "+bxn, 10, -0.5, 9.5 ) ;
226  dttpgphmapbx[ibx] = ibooker.book2D("DT_TPG_phi_map_bx"+bxn,
227  "Map of triggers per station (BX="+bxn+")",20,1,21,12,0,12);
229 
230  //Theta
231  dttpgthbx[ibx] = ibooker.book1D("DT_TPG_theta_bx_"+bxn,
232  "DT TPG theta bx "+bxn, 50, -24.5, 24.5 ) ;
233  dttpgthwheel[ibx] = ibooker.book1D("DT_TPG_theta_wheel_number_"+bxn,
234  "DT TPG theta wheel number "+bxn, 5, -2.5, 2.5 ) ;
235  dttpgthsector[ibx] = ibooker.book1D("DT_TPG_theta_sector_number_"+bxn,
236  "DT TPG theta sector number "+bxn, 12, -0.5, 11.5 ) ;
237  dttpgthstation[ibx] = ibooker.book1D("DT_TPG_theta_station_number_"+bxn,
238  "DT TPG theta station number "+bxn, 5, -0.5, 4.5 ) ;
239  dttpgththeta[ibx] = ibooker.book1D("DT_TPG_theta_"+bxn,
240  "DT TPG theta "+bxn, 20, -0.5, 19.5 ) ;
241  dttpgthquality[ibx] = ibooker.book1D("DT_TPG_theta_quality_"+bxn,
242  "DT TPG theta quality "+bxn, 8, -0.5, 7.5 ) ;
243  dttpgthmapbx[ibx] = ibooker.book2D("DT_TPG_theta_map_bx_"+bxn,
244  "Map of triggers per station (BX="+bxn+")",15,1,16,12,0,12);
246 
247  // Phi output
248  dttf_p_phi[ibx] = ibooker.book1D("dttf_p_phi_"+bxn, "dttf phi output #phi "+bxn, 256,
249  -0.5, 255.5);
250  dttf_p_qual[ibx] = ibooker.book1D("dttf_p_qual_"+bxn, "dttf phi output qual "+bxn, 8, -0.5, 7.5);
251  dttf_p_q[ibx] = ibooker.book1D("dttf_p_q_"+bxn, "dttf phi output q "+bxn, 2, -0.5, 1.5);
252  dttf_p_pt[ibx] = ibooker.book1D("dttf_p_pt_"+bxn, "dttf phi output p_{t} "+bxn, 32, -0.5, 31.5);
253 
254  }
255 
256  dttpgphmap = ibooker.book2D("DT_TPG_phi_map",
257  "Map of triggers per station",20,1,21,12,0,12);
258  dttpgphmapcorr = ibooker.book2D("DT_TPG_phi_map_corr",
259  "Map of correlated triggers per station",20,1,21,12,0,12);
260  dttpgphmap2nd = ibooker.book2D("DT_TPG_phi_map_2nd",
261  "Map of second tracks per station",20,1,21,12,0,12);
262  dttpgphbestmap = ibooker.book2D("DT_TPG_phi_best_map",
263  "Map of best triggers per station",20,1,21,12,0,12);
264  dttpgphbestmapcorr = ibooker.book2D("DT_TPG_phi_best_map_corr",
265  "Map of correlated best triggers per station",20,1,21,12,0,12);
271 
272 
273 
274  dttpgthmap = ibooker.book2D("DT_TPG_theta_map",
275  "Map of triggers per station",15,1,16,12,0,12);
276  dttpgthmaph = ibooker.book2D("DT_TPG_theta_map_h",
277  "Map of H quality triggers per station",15,1,16,12,0,12);
278  dttpgthbestmap = ibooker.book2D("DT_TPG_theta_best_map",
279  "Map of besttriggers per station",15,1,16,12,0,12);
280  dttpgthbestmaph = ibooker.book2D("DT_TPG_theta_best_map_h",
281  "Map of H quality best triggers per station",15,1,16,12,0,12);
286 }
MonitorElement * dttpgthbestmaph
Definition: L1TDTTPG.h:96
MonitorElement * dttf_p_phi[3]
Definition: L1TDTTPG.h:98
MonitorElement * dttpgphmap
Definition: L1TDTTPG.h:77
MonitorElement * dttpgphbestmapcorr
Definition: L1TDTTPG.h:82
MonitorElement * dttpgphmapcorr
Definition: L1TDTTPG.h:80
void setMapPhLabel(MonitorElement *me)
Definition: L1TDTTPG.cc:617
MonitorElement * dttpgphbx[8]
Definition: L1TDTTPG.h:66
int nev_
Definition: L1TDTTPG.h:103
MonitorElement * dttpgththeta[3]
Definition: L1TDTTPG.h:89
MonitorElement * dttpgphwheel[3]
Definition: L1TDTTPG.h:68
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 * dttpgthbestmap
Definition: L1TDTTPG.h:95
MonitorElement * dttpgphbxcomp
Definition: L1TDTTPG.h:67
MonitorElement * dttpgthmaph
Definition: L1TDTTPG.h:94
MonitorElement * dttpgthsector[3]
Definition: L1TDTTPG.h:87
MonitorElement * dttpgthmapbx[3]
Definition: L1TDTTPG.h:93
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * dttpgthwheel[3]
Definition: L1TDTTPG.h:86
MonitorElement * dttpgthmap
Definition: L1TDTTPG.h:92
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * dttf_p_qual[3]
Definition: L1TDTTPG.h:101
MonitorElement * dttpgthbx[3]
Definition: L1TDTTPG.h:85
MonitorElement * dttpgthquality[3]
Definition: L1TDTTPG.h:90
MonitorElement * dttf_p_pt[3]
Definition: L1TDTTPG.h:99
MonitorElement * dttpgphbestmap
Definition: L1TDTTPG.h:81
MonitorElement * dttpgthntrack
Definition: L1TDTTPG.h:91
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * dttpgphts2tag[3]
Definition: L1TDTTPG.h:74
MonitorElement * dttpgphntrack
Definition: L1TDTTPG.h:76
MonitorElement * dttf_p_q[3]
Definition: L1TDTTPG.h:100
void setMapThLabel(MonitorElement *me)
Definition: L1TDTTPG.cc:629
MonitorElement * dttpgphmapbx[3]
Definition: L1TDTTPG.h:78
MonitorElement * dttpgthstation[3]
Definition: L1TDTTPG.h:88
MonitorElement * dttpgphsector[3]
Definition: L1TDTTPG.h:69
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * dttpgphquality[3]
Definition: L1TDTTPG.h:73
MonitorElement * dttpgphmap2nd
Definition: L1TDTTPG.h:79
MonitorElement * dttpgphstation[3]
Definition: L1TDTTPG.h:70
void L1TDTTPG::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 122 of file L1TDTTPG.cc.

122  {
123  //empty
124 
125 }
void L1TDTTPG::setMapPhLabel ( MonitorElement me)
private

Definition at line 617 of file L1TDTTPG.cc.

References mps_fire::i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

618 {
619 
620  me->setAxisTitle("DTTF Sector",2);
621  for(int i=0;i<5;i++){
622  ostringstream wheel;
623  wheel << i-2;
624  me->setBinLabel(1+i*4,"Wheel "+ wheel.str(),1);
625  }
626 
627 }
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)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TDTTPG::setMapThLabel ( MonitorElement me)
private

Definition at line 629 of file L1TDTTPG.cc.

References mps_fire::i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

630 {
631 
632  me->setAxisTitle("DTTF Sector",2);
633  for(int i=0;i<5;i++){
634  ostringstream wheel;
635  wheel << i-2;
636  me->setBinLabel(1+i*3,"Wheel "+ wheel.str(),1);
637  }
638 
639 }
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)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

MonitorElement* L1TDTTPG::dttf_p_phi[3]
private

Definition at line 98 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttf_p_pt[3]
private

Definition at line 99 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttf_p_q[3]
private

Definition at line 100 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttf_p_qual[3]
private

Definition at line 101 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphbestmap
private

Definition at line 81 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphbestmapcorr
private

Definition at line 82 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphbx[8]
private

Definition at line 66 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphbxcomp
private

Definition at line 67 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphmap
private

Definition at line 77 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphmap2nd
private

Definition at line 79 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphmapbx[3]
private

Definition at line 78 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphmapcorr
private

Definition at line 80 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphntrack
private

Definition at line 76 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphquality[3]
private

Definition at line 73 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphsector[3]
private

Definition at line 69 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphstation[3]
private

Definition at line 70 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphts2tag[3]
private

Definition at line 74 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgphwheel[3]
private

Definition at line 68 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TDTTPG::dttpgSource_
private

Definition at line 110 of file L1TDTTPG.h.

Referenced by analyze(), and L1TDTTPG().

edm::EDGetTokenT<L1MuDTChambPhContainer> L1TDTTPG::dttpgSourcePhContainer_token_
private

Definition at line 108 of file L1TDTTPG.h.

Referenced by analyze().

edm::EDGetTokenT<L1MuDTChambThContainer> L1TDTTPG::dttpgSourceThContainer_token_
private

Definition at line 109 of file L1TDTTPG.h.

Referenced by analyze().

MonitorElement* L1TDTTPG::dttpgthbestmap
private

Definition at line 95 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthbestmaph
private

Definition at line 96 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthbx[3]
private

Definition at line 85 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthmap
private

Definition at line 92 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthmapbx[3]
private

Definition at line 93 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthmaph
private

Definition at line 94 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthntrack
private

Definition at line 91 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthquality[3]
private

Definition at line 90 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthsector[3]
private

Definition at line 87 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthstation[3]
private

Definition at line 88 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgththeta[3]
private

Definition at line 89 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTPG::dttpgthwheel[3]
private

Definition at line 86 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

std::ofstream L1TDTTPG::logFile_
private

Definition at line 107 of file L1TDTTPG.h.

bool L1TDTTPG::monitorDaemon_
private

Definition at line 106 of file L1TDTTPG.h.

int L1TDTTPG::nev_
private

Definition at line 103 of file L1TDTTPG.h.

Referenced by analyze(), and bookHistograms().

std::string L1TDTTPG::outputFile_
private

Definition at line 104 of file L1TDTTPG.h.

Referenced by L1TDTTPG().

std::string L1TDTTPG::trstring_
private

Definition at line 112 of file L1TDTTPG.h.

Referenced by L1TDTTPG().

edm::EDGetTokenT<L1MuDTTrackContainer> L1TDTTPG::trToken_
private

Definition at line 113 of file L1TDTTPG.h.

Referenced by analyze(), and L1TDTTPG().

bool L1TDTTPG::verbose_
private

Definition at line 105 of file L1TDTTPG.h.

Referenced by analyze(), and L1TDTTPG().