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 Member Functions | Private Attributes
L1TDTTPG Class Reference

#include <L1TDTTPG.h>

Inheritance diagram for L1TDTTPG:
edm::EDAnalyzer

Public Member Functions

 L1TDTTPG (const edm::ParameterSet &ps)
 
virtual ~L1TDTTPG ()
 
- 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)
 
void endJob (void)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Member Functions

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

Private Attributes

DQMStoredbe
 
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_
 
MonitorElementdttpgthbestmap
 
MonitorElementdttpgthbestmaph
 
MonitorElementdttpgthbx [3]
 
MonitorElementdttpgthmap
 
MonitorElementdttpgthmapbx [3]
 
MonitorElementdttpgthmaph
 
MonitorElementdttpgthntrack
 
MonitorElementdttpgthquality [3]
 
MonitorElementdttpgthsector [3]
 
MonitorElementdttpgthstation [3]
 
MonitorElementdttpgththeta [3]
 
MonitorElementdttpgthwheel [3]
 
ofstream logFile_
 
bool monitorDaemon_
 
int nev_
 
std::string outputFile_
 
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 32 of file L1TDTTPG.h.

Constructor & Destructor Documentation

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

Definition at line 105 of file L1TDTTPG.cc.

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

106  : dttpgSource_( ps.getParameter< InputTag >("dttpgSource") )
107 {
108 
109  // verbosity switch
110  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
111 
112  if(verbose_) cout << "L1TDTTPG: constructor...." << endl;
113 
114 
115  dbe = NULL;
116  if ( ps.getUntrackedParameter<bool>("DQMStore", false) )
117  {
119  dbe->setVerbose(0);
120  }
121 
122  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
123  if ( outputFile_.size() != 0 ) {
124  cout << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
125  }
126 
127  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
128  if(disable){
129  outputFile_="";
130  }
131 
132 
133  if ( dbe !=NULL ) {
134  dbe->setCurrentFolder("L1T/L1TDTTPG");
135  }
136 
137 
138 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DQMStore * dbe
Definition: L1TDTTPG.h:58
#define NULL
Definition: scimark2.h:8
std::string outputFile_
Definition: L1TDTTPG.h:98
void setVerbose(unsigned level)
Definition: DQMStore.cc:196
edm::InputTag dttpgSource_
Definition: L1TDTTPG.h:102
tuple cout
Definition: gather_cfg.py:41
bool verbose_
Definition: L1TDTTPG.h:99
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
L1TDTTPG::~L1TDTTPG ( )
virtual

Definition at line 140 of file L1TDTTPG.cc.

141 {
142 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 331 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_, dttpgthbestmap, dttpgthbestmaph, dttpgthbx, dttpgthmap, dttpgthmapbx, dttpgthmaph, dttpgthntrack, dttpgthquality, dttpgthsector, dttpgthstation, dttpgththeta, dttpgthwheel, MonitorElement::Fill(), edm::Event::getByLabel(), i, edm::HandleBase::isValid(), j, gen::k, edm::InputTag::label(), nev_, pos, edm::InputTag::process(), matplotRender::t, and verbose_.

332 {
333 
334  nev_++;
335  if(verbose_) cout << "L1TDTTPG: analyze...." << endl;
336 
337  edm::Handle<L1MuDTChambPhContainer > myL1MuDTChambPhContainer;
338  e.getByLabel(dttpgSource_,myL1MuDTChambPhContainer);
339 
340  if (!myL1MuDTChambPhContainer.isValid()) {
341  edm::LogInfo("DataNotFound") << "can't find L1MuDTChambPhContainer with label "
342  << dttpgSource_.label() ;
343  return;
344  }
345  L1MuDTChambPhContainer::Phi_Container *myPhContainer =
346  myL1MuDTChambPhContainer->getContainer();
347 
348  edm::Handle<L1MuDTChambThContainer > myL1MuDTChambThContainer;
349  e.getByLabel(dttpgSource_,myL1MuDTChambThContainer);
350 
351  if (!myL1MuDTChambThContainer.isValid()) {
352  edm::LogInfo("DataNotFound") << "can't find L1MuDTChambThContainer with label "
353  << dttpgSource_.label() ;
354  edm::LogInfo("DataNotFound") << "if this fails try to add DATA to the process name." ;
355 
356  return;
357  }
358  L1MuDTChambThContainer::The_Container* myThContainer =
359  myL1MuDTChambThContainer->getContainer();
360 
361  int ndttpgphtrack = 0;
362  int ndttpgthtrack = 0;
363  int NumberOfSegmentsPhi[3]={0,0,0};
364 
365  for( L1MuDTChambPhContainer::Phi_Container::const_iterator
366  DTPhDigiItr = myPhContainer->begin() ;
367  DTPhDigiItr != myPhContainer->end() ;
368  ++DTPhDigiItr )
369  {
370  int bx = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag();
371  if(bx == -1)
372  NumberOfSegmentsPhi[0]++;
373  if(bx == 0)
374  NumberOfSegmentsPhi[1]++;
375  if(bx == 1)
376  NumberOfSegmentsPhi[2]++;
377  }
378  /*Fill Histos for Segment counter for each bx separately */
379 
380  for(int k=0;k<3;k++){
381  dttpgphbx[k+2]->Fill(NumberOfSegmentsPhi[k]);
382  }
383  int bxCounterDttfPhi=0; // = no. of BX's with non-zero data
384  for (int k=0;k<3;k++){
385  if (NumberOfSegmentsPhi[k]>0)
386  bxCounterDttfPhi++;
387  }
388 
389  /* the BX "code" */
390 
391  int bxCodePhi=0;
392  if(bxCounterDttfPhi==0){
393  bxCodePhi=0;
394  }else if(bxCounterDttfPhi==1){
395  for(int k=0;k<3;k++){
396  if(NumberOfSegmentsPhi[k]>0)
397  bxCodePhi=k+2;
398  }
399  }else if(bxCounterDttfPhi==2){
400  for(int k=0;k<3;k++){
401  if(NumberOfSegmentsPhi[k]==0)
402  bxCodePhi=8-k;
403  }
404  }else if(bxCounterDttfPhi==3){
405  bxCodePhi=10;
406  }
407 
408  //The bx analyzer histo
409  dttpgphbx[0]->Fill(bxCodePhi);
410 
411 
412  const L1MuDTChambPhDigi* bestPhQualMap[5][12][4];
413  memset(bestPhQualMap,0,240*sizeof(L1MuDTChambPhDigi*));
414 
415  for( L1MuDTChambPhContainer::Phi_Container::const_iterator
416  DTPhDigiItr = myPhContainer->begin() ;
417  DTPhDigiItr != myPhContainer->end() ;
418  ++DTPhDigiItr )
419  {
420 
421  ndttpgphtrack++;
422 
423  int bxindex = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1;
424 
425  dttpgphwheel[bxindex]->Fill(DTPhDigiItr->whNum());
426  if (verbose_)
427  {
428  cout << "DTTPG phi wheel number " << DTPhDigiItr->whNum() << endl;
429  }
430  dttpgphstation[bxindex]->Fill(DTPhDigiItr->stNum());
431  if (verbose_)
432  {
433  cout << "DTTPG phi station number " << DTPhDigiItr->stNum() << endl;
434  }
435  dttpgphsector[bxindex]->Fill(DTPhDigiItr->scNum());
436  if (verbose_)
437  {
438  cout << "DTTPG phi sector number " << DTPhDigiItr->scNum() << endl;
439  }
440 // dttpgphphi[bxindex]->Fill(DTPhDigiItr->phi());
441 // if (verbose_)
442 // {
443 // cout << "DTTPG phi phi " << DTPhDigiItr->phi() << endl;
444 // }
445 // dttpgphphiB[bxindex]->Fill(DTPhDigiItr->phiB());
446 // if (verbose_)
447 // {
448 // cout << "DTTPG phi phiB " << DTPhDigiItr->phiB() << endl;
449 // }
450  dttpgphquality[bxindex]->Fill(DTPhDigiItr->code());
451  if (verbose_)
452  {
453  cout << "DTTPG phi quality " << DTPhDigiItr->code() << endl;
454  }
455  dttpgphts2tag[bxindex]->Fill(DTPhDigiItr->Ts2Tag());
456  if (verbose_)
457  {
458  cout << "DTTPG phi ts2tag " << DTPhDigiItr->Ts2Tag() << endl;
459  }
460 // dttpgphbxcnt[bxindex]->Fill(DTPhDigiItr->BxCnt());
461 // if (verbose_)
462 // {
463 // cout << "DTTPG phi bxcnt " << DTPhDigiItr->BxCnt() << endl;
464 // }
465 
466  int ypos = DTPhDigiItr->scNum();
467  int xpos = DTPhDigiItr->stNum()+4*(DTPhDigiItr->whNum()+2);
468  dttpgphmap->Fill(xpos,ypos);
469  if (DTPhDigiItr->Ts2Tag())
470  dttpgphmap2nd->Fill(xpos,ypos);
471  dttpgphmapbx[bxindex]->Fill(xpos,ypos);
472  if (DTPhDigiItr->code()>3)
473  dttpgphmapcorr->Fill(xpos,ypos);
474 
475  if (bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]==0 ||
476  bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]->code()<DTPhDigiItr->code())
477  {
478  bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]=&(*DTPhDigiItr);
479  }
480 
481  }
482 
483  for (int iwh=0; iwh<5; iwh++){
484  for (int isec=0; isec<12; isec++){
485  for (int ist=0; ist<4; ist++){
486  if (bestPhQualMap[iwh][isec][ist]){
487  int xpos = iwh*4+ist+1;
488  dttpgphbestmap->Fill(xpos,isec);
489  if(bestPhQualMap[iwh][isec][ist]->code()>3)
490  dttpgphbestmapcorr->Fill(xpos,isec);
491  }
492  }
493  }
494  }
495 
496 
497  int bestThQualMap[5][12][3];
498  memset(bestThQualMap,0,180*sizeof(int));
499  //for( vector<L1MuDTChambThDigi>::const_iterator
500  for( L1MuDTChambThContainer::The_Container::const_iterator
501  DTThDigiItr = myThContainer->begin() ;
502  DTThDigiItr != myThContainer->end() ;
503  ++DTThDigiItr )
504  {
505  ndttpgthtrack++;
506 
507  int bxindex = DTThDigiItr->bxNum() + 1;
508 
509  dttpgthwheel[bxindex]->Fill(DTThDigiItr->whNum());
510  if (verbose_)
511  {
512  cout << "DTTPG theta wheel number " << DTThDigiItr->whNum() << endl;
513  }
514  dttpgthstation[bxindex]->Fill(DTThDigiItr->stNum());
515  if (verbose_)
516  {
517  cout << "DTTPG theta station number " << DTThDigiItr->stNum() << endl;
518  }
519  dttpgthsector[bxindex]->Fill(DTThDigiItr->scNum());
520  if (verbose_)
521  {
522  cout << "DTTPG theta sector number " << DTThDigiItr->scNum() << endl;
523  }
524  dttpgthbx[bxindex]->Fill(DTThDigiItr->bxNum());
525  if (verbose_)
526  {
527  cout << "DTTPG theta bx number " << DTThDigiItr->bxNum() << endl;
528  }
529  int thcode[7]= {0,0,0,0,0,0,0};
530  for (int j = 0; j < 7; j++)
531  {
532  dttpgththeta[bxindex]->Fill(DTThDigiItr->position(j));
533  if (verbose_)
534  {
535  cout << "DTTPG theta position " << DTThDigiItr->position(j) << endl;
536  }
537  thcode[j]=DTThDigiItr->code(j);
538  dttpgthquality[bxindex]->Fill(thcode[j]);
539  if (verbose_)
540  {
541  cout << "DTTPG theta quality " << DTThDigiItr->code(j) << endl;
542  }
543  }
544 
545  int ypos = DTThDigiItr->scNum();
546  int xpos = DTThDigiItr->stNum()+4*(DTThDigiItr->whNum()+2);
547  int bestqual=0;
548  dttpgthmap->Fill(xpos,ypos);
549  dttpgthmapbx[bxindex]->Fill(xpos,ypos);
550  for (int pos = 0; pos < 7; pos++){
551  if (thcode[pos]>bestqual)
552  bestqual=thcode[pos];
553  if(thcode[pos]==2)
554  dttpgthmaph->Fill(xpos,ypos);
555  }
556 
557  if (bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1] < bestqual)
558  {
559  bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1]=bestqual;
560  }
561  }
562 
563  for (int iwh=0; iwh<5; iwh++){
564  for (int isec=0; isec<12; isec++){
565  for (int ist=0; ist<3; ist++){
566  if (bestThQualMap[iwh][isec][ist]){
567  int xpos = iwh*4+ist+1;
568  dttpgthbestmap->Fill(xpos,isec);
569  if(bestThQualMap[iwh][isec][ist]==2)
570  dttpgthbestmaph->Fill(xpos,isec);
571  }
572  }
573  }
574  }
575 
576 
577  dttpgphntrack->Fill(ndttpgphtrack);
578  if (verbose_)
579  {
580  cout << "DTTPG phi ntrack " << ndttpgphtrack << endl;
581  }
582  dttpgthntrack->Fill(ndttpgthtrack);
583  if (verbose_) {
584  cout << "DTTPG theta ntrack " << ndttpgthtrack << endl;
585  }
586 
587  edm::Handle<L1MuDTTrackContainer > myL1MuDTTrackContainer;
588 
589 
590  std::string trstring;
591  trstring = dttpgSource_.label()+":"+"DATA"+":"+dttpgSource_.process();
592  edm::InputTag trInputTag(trstring);
593  e.getByLabel(trInputTag,myL1MuDTTrackContainer);
594 
595  if (!myL1MuDTTrackContainer.isValid()) {
596  edm::LogInfo("DataNotFound") << "can't find L1MuDTTrackContainer with label "
597  << dttpgSource_.label() ;
598  return;
599  }
600 
601  L1MuDTTrackContainer::TrackContainer *t = myL1MuDTTrackContainer->getContainer();
602 
603 
604 
605  int NumberOfSegmentsOut[3]={0,0,0};
606  for ( L1MuDTTrackContainer::TrackContainer::const_iterator i
607  = t->begin(); i != t->end(); ++i ) {
608  if(i->bx() ==-1)
609  NumberOfSegmentsOut[0]++;
610  if(i->bx() ==0)
611  NumberOfSegmentsOut[1]++;
612  if(i->bx() ==1)
613  NumberOfSegmentsOut[2]++;
614  }
615 
616 
617  /*Fill Histos for Segment counter*/
618  for(int k=0;k<3;k++){
619  dttpgphbx[k+5]->Fill(NumberOfSegmentsOut[k]);
620  }
621 
622  /*Bunch assigments*/
623 
624  int bxCounterDttfOut=0;
625  for (int k=0;k<3;k++){
626  if (NumberOfSegmentsOut[k]>0)
627  bxCounterDttfOut++;
628  }
629 
630  int bxCodeOut=0;
631  if(bxCounterDttfOut==0){
632  bxCodeOut=0;
633  }else if(bxCounterDttfOut==1){
634  for(int k=0;k<3;k++){
635  if(NumberOfSegmentsOut[k]>0)
636  bxCodeOut=k+2;
637  }
638  }else if(bxCounterDttfOut==2){
639  for(int k=0;k<3;k++){
640  if(NumberOfSegmentsOut[k]==0)
641  bxCodeOut=8-k;
642  }
643  }else if(bxCounterDttfOut==3){
644  bxCodeOut=10;
645  }
646 
647  //The bx analyzer histo
648  dttpgphbx[1]->Fill(bxCodeOut);
649 
650  /*End Dttf Output Bunch analysis*/
651 
652  // the 2-DIM histo with phi.input vs. output
653  dttpgphbxcomp->Fill(bxCodePhi,bxCodeOut);
654 
655 
656  for ( L1MuDTTrackContainer::TrackContainer::const_iterator i
657  = t->begin(); i != t->end(); ++i ) {
658  if ( verbose_ ) {
659  std::cout << "bx = " << i->bx()
660  << std::endl;
661  std::cout << "quality (packed) = " << i->quality_packed()
662  << std::endl;
663  std::cout << "pt (packed) = " << i->pt_packed()
664  << std::endl;
665  std::cout << "phi (packed) = " << i->phi_packed()
666  << std::endl;
667  std::cout << "charge (packed) = " << i->charge_packed()
668  << std::endl;
669  }
670 
671 
672  int bxindex = i->bx() + 1;
673  dttf_p_phi[bxindex]->Fill(i->phi_packed());
674  dttf_p_qual[bxindex]->Fill(i->quality_packed());
675  dttf_p_pt[bxindex]->Fill(i->pt_packed());
676  dttf_p_q[bxindex]->Fill(i->charge_packed());
677  }
678 
679 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * dttpgthbestmaph
Definition: L1TDTTPG.h:90
MonitorElement * dttf_p_phi[3]
Definition: L1TDTTPG.h:92
MonitorElement * dttpgphmap
Definition: L1TDTTPG.h:71
MonitorElement * dttpgphbestmapcorr
Definition: L1TDTTPG.h:76
MonitorElement * dttpgphmapcorr
Definition: L1TDTTPG.h:74
MonitorElement * dttpgphbx[8]
Definition: L1TDTTPG.h:60
int nev_
Definition: L1TDTTPG.h:97
MonitorElement * dttpgththeta[3]
Definition: L1TDTTPG.h:83
MonitorElement * dttpgphwheel[3]
Definition: L1TDTTPG.h:62
MonitorElement * dttpgthbestmap
Definition: L1TDTTPG.h:89
MonitorElement * dttpgphbxcomp
Definition: L1TDTTPG.h:61
MonitorElement * dttpgthmaph
Definition: L1TDTTPG.h:88
void Fill(long long x)
MonitorElement * dttpgthsector[3]
Definition: L1TDTTPG.h:81
MonitorElement * dttpgthmapbx[3]
Definition: L1TDTTPG.h:87
MonitorElement * dttpgthwheel[3]
Definition: L1TDTTPG.h:80
MonitorElement * dttpgthmap
Definition: L1TDTTPG.h:86
std::vector< L1MuDTTrackCand > TrackContainer
MonitorElement * dttf_p_qual[3]
Definition: L1TDTTPG.h:95
int j
Definition: DBlmapReader.cc:9
MonitorElement * dttpgthbx[3]
Definition: L1TDTTPG.h:79
MonitorElement * dttpgthquality[3]
Definition: L1TDTTPG.h:84
std::vector< L1MuDTChambPhDigi > Phi_Container
MonitorElement * dttf_p_pt[3]
Definition: L1TDTTPG.h:93
std::vector< L1MuDTChambThDigi > The_Container
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
int k[5][pyjets_maxn]
MonitorElement * dttpgphbestmap
Definition: L1TDTTPG.h:75
MonitorElement * dttpgthntrack
Definition: L1TDTTPG.h:85
edm::InputTag dttpgSource_
Definition: L1TDTTPG.h:102
MonitorElement * dttpgphts2tag[3]
Definition: L1TDTTPG.h:68
MonitorElement * dttpgphntrack
Definition: L1TDTTPG.h:70
MonitorElement * dttf_p_q[3]
Definition: L1TDTTPG.h:94
std::string const & label() const
Definition: InputTag.h:25
std::string const & process() const
Definition: InputTag.h:29
MonitorElement * dttpgphmapbx[3]
Definition: L1TDTTPG.h:72
tuple cout
Definition: gather_cfg.py:41
bool verbose_
Definition: L1TDTTPG.h:99
MonitorElement * dttpgthstation[3]
Definition: L1TDTTPG.h:82
MonitorElement * dttpgphsector[3]
Definition: L1TDTTPG.h:63
MonitorElement * dttpgphquality[3]
Definition: L1TDTTPG.h:67
MonitorElement * dttpgphmap2nd
Definition: L1TDTTPG.h:73
MonitorElement * dttpgphstation[3]
Definition: L1TDTTPG.h:64
void L1TDTTPG::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 144 of file L1TDTTPG.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe, 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, i, nev_, cmsCodeRules.cppFunctionSkipper::operator, DQMStore::rmdir(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), setMapPhLabel(), and setMapThLabel().

145 {
146 
147  nev_ = 0;
148 
149  // get hold of back-end interface
150  DQMStore* dbe = 0;
151  dbe = Service<DQMStore>().operator->();
152  if ( dbe ) {
153  dbe->setCurrentFolder("L1T/L1TDTTPG");
154  dbe->rmdir("L1T/L1TDTTPG");
155  }
156 
157 
158  if ( dbe )
159  {
160  dbe->setCurrentFolder("L1T/L1TDTTPG");
161 
162 
163  //hist1[0]
164  dttpgphbx[0] = dbe->book1D("BxEncoding_PHI",
165  "Bunch encoding DTTF Phi",11,0,11);
166  //hist1[1]
167  dttpgphbx[1] = dbe->book1D("BxEncoding_OUT",
168  "Bunch encoding DTTF Output",11,0,11);
169 
170  //hist1[2]
171  dttpgphbx[2] = dbe->book1D("NumberOfSegmentsPHI_BunchNeg1",
172  "Number of segments for bunch -1 Dttf Phi",
173  20,0,20);
174  //hist1[3]
175  dttpgphbx[3] = dbe->book1D("NumberOfSegmentsPHI_Bunch0",
176  "Number of segments for bunch 0 Dttf Phi",
177  20,0,20);
178  //hist1[4]
179  dttpgphbx[4] = dbe->book1D("NumberOfSegmentsPHI_Bunch1",
180  "Number of segments for bunch 1 Dttf Phi",
181  20,0,20);
182 
183  //hist1[5]
184  dttpgphbx[5] = dbe->book1D("NumberOfSegmentsOUT_BunchNeg1",
185  "Number of segments for bunch -1 Dttf Output",
186  20,0,20);
187  //hist1[6]
188  dttpgphbx[6] = dbe->book1D("NumberOfSegmentsOUT_Bunch0",
189  "Number of segments for bunch 0 Dttf Output",
190  20,0,20);
191  //hist1[7]
192  dttpgphbx[7] = dbe->book1D("NumberOfSegmentsOUT_Bunch1",
193  "Number of segments for bunch 1 Dttf Output",
194  20,0,20);
195 
196  for(int i=0;i<2;i++){
197  dttpgphbx[i]->setBinLabel(1,"None");
198  dttpgphbx[i]->setBinLabel(3,"Only bx=-1");
199  dttpgphbx[i]->setBinLabel(4,"Only bx= 0");
200  dttpgphbx[i]->setBinLabel(5,"Only bx=+1");
201  dttpgphbx[i]->setBinLabel(7,"Bx=-1,0");
202  dttpgphbx[i]->setBinLabel(8,"Bx=-1,1");
203  dttpgphbx[i]->setBinLabel(9,"Bx= 0,1");
204  dttpgphbx[i]->setBinLabel(11,"All bx");
205  }
206 
207  dttpgphbxcomp = dbe->book2D("BxEncoding_PHI_OUT",
208  "Bunch encoding: DTTF Phi vs. Output",
209  11,0,11,11,0,11);
210  dttpgphbxcomp->setAxisTitle("DTTF (output)",1);
211  dttpgphbxcomp->setAxisTitle("PHI-TF",2);
212  for(int i=1;i<=2;i++){
213  dttpgphbxcomp->setBinLabel(1,"None",i);
214  dttpgphbxcomp->setBinLabel(3,"Only bx=-1",i);
215  dttpgphbxcomp->setBinLabel(4,"Only bx= 0",i);
216  dttpgphbxcomp->setBinLabel(5,"Only bx=+1",i);
217  dttpgphbxcomp->setBinLabel(7,"Bx=-1,0",i);
218  dttpgphbxcomp->setBinLabel(8,"Bx=-1,1",i);
219  dttpgphbxcomp->setBinLabel(9,"Bx= 0,1",i);
220  dttpgphbxcomp->setBinLabel(11,"All bx",i);
221  }
222 
223  dttpgphntrack = dbe->book1D("DT_TPG_phi_ntrack",
224  "DT TPG phi ntrack", 20, -0.5, 19.5 ) ;
225  dttpgthntrack = dbe->book1D("DT_TPG_theta_ntrack",
226  "DT TPG theta ntrack", 20, -0.5, 19.5 ) ;
227 
228  for (int ibx=0 ; ibx<=2; ibx++) {
229 
230  ostringstream bxnum;
231  bxnum << ibx-1;
232  string bxn;
233  if (ibx<2)
234  bxn = bxnum.str();
235  else
236  bxn = "+" + bxnum.str();
237 
238  // Phi
239  dttpgphwheel[ibx] = dbe->book1D("DT_TPG_phi_wheel_number_"+bxn,
240  "DT TPG phi wheel number "+bxn, 5, -2.5, 2.5 ) ;
241  dttpgphsector[ibx] = dbe->book1D("DT_TPG_phi_sector_number_"+bxn,
242  "DT TPG phi sector number "+bxn, 12, -0.5, 11.5 );
243  dttpgphstation[ibx] = dbe->book1D("DT_TPG_phi_station_number_"+bxn,
244  "DT TPG phi station number "+bxn, 5, 0.5, 4.5 ) ;
245 // dttpgphphi[ibx] = dbe->book1D("DT_TPG_phi_"+bxn,
246 // "DT TPG phi "+bxn, 100, -2100., 2100. ) ;
247 // dttpgphphiB[ibx] = dbe->book1D("DT_TPG_phiB_"+bxn,
248 // "DT TPG phiB "+bxn, 100, -550., 550. ) ;
249  dttpgphquality[ibx] = dbe->book1D("DT_TPG_phi_quality_"+bxn,
250  "DT TPG phi quality "+bxn, 8, -0.5, 7.5 ) ;
251  dttpgphts2tag[ibx] = dbe->book1D("DT_TPG_phi_Ts2Tag_"+bxn,
252  "DT TPG phi Ts2Tag "+bxn, 2, -0.5, 1.5 ) ;
253 // dttpgphbxcnt[ibx] = dbe->book1D("DT_TPG_phi_BxCnt_"+bxn,
254 // "DT TPG phi BxCnt "+bxn, 10, -0.5, 9.5 ) ;
255  dttpgphmapbx[ibx] = dbe->book2D("DT_TPG_phi_map_bx"+bxn,
256  "Map of triggers per station (BX="+bxn+")",20,1,21,12,0,12);
258 
259  //Theta
260  dttpgthbx[ibx] = dbe->book1D("DT_TPG_theta_bx_"+bxn,
261  "DT TPG theta bx "+bxn, 50, -24.5, 24.5 ) ;
262  dttpgthwheel[ibx] = dbe->book1D("DT_TPG_theta_wheel_number_"+bxn,
263  "DT TPG theta wheel number "+bxn, 5, -2.5, 2.5 ) ;
264  dttpgthsector[ibx] = dbe->book1D("DT_TPG_theta_sector_number_"+bxn,
265  "DT TPG theta sector number "+bxn, 12, -0.5, 11.5 ) ;
266  dttpgthstation[ibx] = dbe->book1D("DT_TPG_theta_station_number_"+bxn,
267  "DT TPG theta station number "+bxn, 5, -0.5, 4.5 ) ;
268  dttpgththeta[ibx] = dbe->book1D("DT_TPG_theta_"+bxn,
269  "DT TPG theta "+bxn, 20, -0.5, 19.5 ) ;
270  dttpgthquality[ibx] = dbe->book1D("DT_TPG_theta_quality_"+bxn,
271  "DT TPG theta quality "+bxn, 8, -0.5, 7.5 ) ;
272  dttpgthmapbx[ibx] = dbe->book2D("DT_TPG_theta_map_bx_"+bxn,
273  "Map of triggers per station (BX="+bxn+")",15,1,16,12,0,12);
275 
276  // Phi output
277  dttf_p_phi[ibx] = dbe->book1D("dttf_p_phi_"+bxn, "dttf phi output #phi "+bxn, 256,
278  -0.5, 255.5);
279  dttf_p_qual[ibx] = dbe->book1D("dttf_p_qual_"+bxn, "dttf phi output qual "+bxn, 8, -0.5, 7.5);
280  dttf_p_q[ibx] = dbe->book1D("dttf_p_q_"+bxn, "dttf phi output q "+bxn, 2, -0.5, 1.5);
281  dttf_p_pt[ibx] = dbe->book1D("dttf_p_pt_"+bxn, "dttf phi output p_{t} "+bxn, 32, -0.5, 31.5);
282 
283  }
284 
285  dttpgphmap = dbe->book2D("DT_TPG_phi_map",
286  "Map of triggers per station",20,1,21,12,0,12);
287  dttpgphmapcorr = dbe->book2D("DT_TPG_phi_map_corr",
288  "Map of correlated triggers per station",20,1,21,12,0,12);
289  dttpgphmap2nd = dbe->book2D("DT_TPG_phi_map_2nd",
290  "Map of second tracks per station",20,1,21,12,0,12);
291  dttpgphbestmap = dbe->book2D("DT_TPG_phi_best_map",
292  "Map of best triggers per station",20,1,21,12,0,12);
293  dttpgphbestmapcorr = dbe->book2D("DT_TPG_phi_best_map_corr",
294  "Map of correlated best triggers per station",20,1,21,12,0,12);
300 
301 
302 
303  dttpgthmap = dbe->book2D("DT_TPG_theta_map",
304  "Map of triggers per station",15,1,16,12,0,12);
305  dttpgthmaph = dbe->book2D("DT_TPG_theta_map_h",
306  "Map of H quality triggers per station",15,1,16,12,0,12);
307  dttpgthbestmap = dbe->book2D("DT_TPG_theta_best_map",
308  "Map of besttriggers per station",15,1,16,12,0,12);
309  dttpgthbestmaph = dbe->book2D("DT_TPG_theta_best_map_h",
310  "Map of H quality best triggers per station",15,1,16,12,0,12);
315 
316 
317  }
318 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * dttpgthbestmaph
Definition: L1TDTTPG.h:90
MonitorElement * dttf_p_phi[3]
Definition: L1TDTTPG.h:92
MonitorElement * dttpgphmap
Definition: L1TDTTPG.h:71
MonitorElement * dttpgphbestmapcorr
Definition: L1TDTTPG.h:76
MonitorElement * dttpgphmapcorr
Definition: L1TDTTPG.h:74
void setMapPhLabel(MonitorElement *me)
Definition: L1TDTTPG.cc:681
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
MonitorElement * dttpgphbx[8]
Definition: L1TDTTPG.h:60
int nev_
Definition: L1TDTTPG.h:97
MonitorElement * dttpgththeta[3]
Definition: L1TDTTPG.h:83
DQMStore * dbe
Definition: L1TDTTPG.h:58
MonitorElement * dttpgphwheel[3]
Definition: L1TDTTPG.h:62
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:89
MonitorElement * dttpgphbxcomp
Definition: L1TDTTPG.h:61
MonitorElement * dttpgthmaph
Definition: L1TDTTPG.h:88
MonitorElement * dttpgthsector[3]
Definition: L1TDTTPG.h:81
MonitorElement * dttpgthmapbx[3]
Definition: L1TDTTPG.h:87
MonitorElement * dttpgthwheel[3]
Definition: L1TDTTPG.h:80
MonitorElement * dttpgthmap
Definition: L1TDTTPG.h:86
MonitorElement * dttf_p_qual[3]
Definition: L1TDTTPG.h:95
MonitorElement * dttpgthbx[3]
Definition: L1TDTTPG.h:79
MonitorElement * dttpgthquality[3]
Definition: L1TDTTPG.h:84
MonitorElement * dttf_p_pt[3]
Definition: L1TDTTPG.h:93
MonitorElement * dttpgphbestmap
Definition: L1TDTTPG.h:75
MonitorElement * dttpgthntrack
Definition: L1TDTTPG.h:85
MonitorElement * dttpgphts2tag[3]
Definition: L1TDTTPG.h:68
MonitorElement * dttpgphntrack
Definition: L1TDTTPG.h:70
MonitorElement * dttf_p_q[3]
Definition: L1TDTTPG.h:94
void setMapThLabel(MonitorElement *me)
Definition: L1TDTTPG.cc:693
MonitorElement * dttpgphmapbx[3]
Definition: L1TDTTPG.h:72
MonitorElement * dttpgthstation[3]
Definition: L1TDTTPG.h:82
MonitorElement * dttpgphsector[3]
Definition: L1TDTTPG.h:63
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
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:67
MonitorElement * dttpgphmap2nd
Definition: L1TDTTPG.h:73
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
MonitorElement * dttpgphstation[3]
Definition: L1TDTTPG.h:64
void L1TDTTPG::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 321 of file L1TDTTPG.cc.

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

322 {
323  if(verbose_) cout << "L1TDTTPG: end job...." << endl;
324  LogInfo("EndJob") << "analyzed " << nev_ << " events";
325 
326  if ( outputFile_.size() != 0 && dbe ) dbe->save(outputFile_);
327 
328  return;
329 }
int nev_
Definition: L1TDTTPG.h:97
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
DQMStore * dbe
Definition: L1TDTTPG.h:58
std::string outputFile_
Definition: L1TDTTPG.h:98
tuple cout
Definition: gather_cfg.py:41
bool verbose_
Definition: L1TDTTPG.h:99
void L1TDTTPG::setMapPhLabel ( MonitorElement me)
private

Definition at line 681 of file L1TDTTPG.cc.

References i, MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

Referenced by beginJob().

682 {
683 
684  me->setAxisTitle("DTTF Sector",2);
685  for(int i=0;i<5;i++){
686  ostringstream wheel;
687  wheel << i-2;
688  me->setBinLabel(1+i*4,"Wheel "+ wheel.str(),1);
689  }
690 
691 }
int i
Definition: DBlmapReader.cc:9
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 693 of file L1TDTTPG.cc.

References i, MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

Referenced by beginJob().

694 {
695 
696  me->setAxisTitle("DTTF Sector",2);
697  for(int i=0;i<5;i++){
698  ostringstream wheel;
699  wheel << i-2;
700  me->setBinLabel(1+i*3,"Wheel "+ wheel.str(),1);
701  }
702 
703 }
int i
Definition: DBlmapReader.cc:9
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

DQMStore* L1TDTTPG::dbe
private

Definition at line 58 of file L1TDTTPG.h.

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

MonitorElement* L1TDTTPG::dttf_p_phi[3]
private

Definition at line 92 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttf_p_pt[3]
private

Definition at line 93 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttf_p_q[3]
private

Definition at line 94 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttf_p_qual[3]
private

Definition at line 95 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphbestmap
private

Definition at line 75 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphbestmapcorr
private

Definition at line 76 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphbx[8]
private

Definition at line 60 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphbxcomp
private

Definition at line 61 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphmap
private

Definition at line 71 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphmap2nd
private

Definition at line 73 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphmapbx[3]
private

Definition at line 72 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphmapcorr
private

Definition at line 74 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphntrack
private

Definition at line 70 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphquality[3]
private

Definition at line 67 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphsector[3]
private

Definition at line 63 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphstation[3]
private

Definition at line 64 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphts2tag[3]
private

Definition at line 68 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphwheel[3]
private

Definition at line 62 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

edm::InputTag L1TDTTPG::dttpgSource_
private

Definition at line 102 of file L1TDTTPG.h.

Referenced by analyze().

MonitorElement* L1TDTTPG::dttpgthbestmap
private

Definition at line 89 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthbestmaph
private

Definition at line 90 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthbx[3]
private

Definition at line 79 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthmap
private

Definition at line 86 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthmapbx[3]
private

Definition at line 87 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthmaph
private

Definition at line 88 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthntrack
private

Definition at line 85 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthquality[3]
private

Definition at line 84 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthsector[3]
private

Definition at line 81 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthstation[3]
private

Definition at line 82 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgththeta[3]
private

Definition at line 83 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthwheel[3]
private

Definition at line 80 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

ofstream L1TDTTPG::logFile_
private

Definition at line 101 of file L1TDTTPG.h.

bool L1TDTTPG::monitorDaemon_
private

Definition at line 100 of file L1TDTTPG.h.

int L1TDTTPG::nev_
private

Definition at line 97 of file L1TDTTPG.h.

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

std::string L1TDTTPG::outputFile_
private

Definition at line 98 of file L1TDTTPG.h.

Referenced by endJob(), and L1TDTTPG().

bool L1TDTTPG::verbose_
private

Definition at line 99 of file L1TDTTPG.h.

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