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 edm::EDConsumerBase

Public Member Functions

 L1TDTTPG (const edm::ParameterSet &ps)
 
virtual ~L1TDTTPG ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 32 of file L1TDTTPG.h.

Constructor & Destructor Documentation

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

Definition at line 111 of file L1TDTTPG.cc.

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

112  : dttpgSource_( ps.getParameter< InputTag >("dttpgSource") )
113 {
114 
115  // verbosity switch
116  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
117 
118  if(verbose_) cout << "L1TDTTPG: constructor...." << endl;
119 
120 
121  dbe = NULL;
122  if ( ps.getUntrackedParameter<bool>("DQMStore", false) )
123  {
125  dbe->setVerbose(0);
126  }
127 
128  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
129  if ( outputFile_.size() != 0 ) {
130  cout << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
131  }
132 
133  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
134  if(disable){
135  outputFile_="";
136  }
137 
138 
139  if ( dbe !=NULL ) {
140  dbe->setCurrentFolder("L1T/L1TDTTPG");
141  }
142 
143 
144 }
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:398
edm::InputTag dttpgSource_
Definition: L1TDTTPG.h:102
tuple cout
Definition: gather_cfg.py:121
bool verbose_
Definition: L1TDTTPG.h:99
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
L1TDTTPG::~L1TDTTPG ( )
virtual

Definition at line 146 of file L1TDTTPG.cc.

147 {
148 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 337 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(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, and verbose_.

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

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

Reimplemented from edm::EDAnalyzer.

Definition at line 327 of file L1TDTTPG.cc.

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

328 {
329  if(verbose_) cout << "L1TDTTPG: end job...." << endl;
330  LogInfo("EndJob") << "analyzed " << nev_ << " events";
331 
332  if ( outputFile_.size() != 0 && dbe ) dbe->save(outputFile_);
333 
334  return;
335 }
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:2118
DQMStore * dbe
Definition: L1TDTTPG.h:58
std::string outputFile_
Definition: L1TDTTPG.h:98
tuple cout
Definition: gather_cfg.py:121
bool verbose_
Definition: L1TDTTPG.h:99
void L1TDTTPG::setMapPhLabel ( MonitorElement me)
private

Definition at line 687 of file L1TDTTPG.cc.

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

Referenced by beginJob().

688 {
689 
690  me->setAxisTitle("DTTF Sector",2);
691  for(int i=0;i<5;i++){
692  ostringstream wheel;
693  wheel << i-2;
694  me->setBinLabel(1+i*4,"Wheel "+ wheel.str(),1);
695  }
696 
697 }
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 699 of file L1TDTTPG.cc.

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

Referenced by beginJob().

700 {
701 
702  me->setAxisTitle("DTTF Sector",2);
703  for(int i=0;i<5;i++){
704  ostringstream wheel;
705  wheel << i-2;
706  me->setBinLabel(1+i*3,"Wheel "+ wheel.str(),1);
707  }
708 
709 }
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().