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 Attributes
L1TCSCTF Class Reference

#include <L1TCSCTF.h>

Inheritance diagram for L1TCSCTF:
thread_unsafe::DQMEDAnalyzer edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TCSCTF (const edm::ParameterSet &ps)
 
virtual ~L1TCSCTF ()
 
- Public Member Functions inherited from thread_unsafe::DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
 DQMEDAnalyzer (void)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
virtual void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
 
virtual void dqmBeginRun (const edm::Run &, const edm::EventSetup &)
 
- 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 Attributes

int BxInEvent_
 
edm::EDGetTokenT
< CSCCorrelatedLCTDigiCollection
corrlctsToken_
 
MonitorElementcsctfAFerror
 
MonitorElementcsctfbx
 
MonitorElementcsctfbx_H
 
MonitorElementcsctfChamberOccupancies
 
MonitorElementcsctferrors
 
MonitorElementcsctfntrack
 
MonitorElementcsctfoccupancies
 
MonitorElementcsctfoccupancies_H
 
MonitorElementcsctfTrackEta
 
MonitorElementcsctfTrackEta_H
 
MonitorElementcsctfTrackEtaHighQ
 
MonitorElementcsctfTrackEtaLowQ
 
MonitorElementcsctfTrackM
 
MonitorElementcsctfTrackPhi
 
MonitorElementcsctfTrackPhi_H
 
MonitorElementcscTrackStubNumbers
 
MonitorElementDTstubsTimeTrackMenTimeArrival [12]
 
edm::EDGetTokenT
< CSCTriggerContainer
< csctf::TrackStub > > 
dtStubsToken_
 
edm::InputTag gmtProducer
 
edm::EDGetTokenT
< L1MuGMTReadoutCollection
gmtProducerToken_
 
bool isCSCcand_
 
int L1ABXN
 
edm::InputTag lctProducer
 
std::ofstream logFile_
 
unsigned long long m_ptScaleCacheID
 
unsigned long long m_scalesCacheID
 
edm::InputTag mbProducer
 
edm::EDGetTokenT
< L1CSCTrackCollection
mbtracksToken_
 
bool monitorDaemon_
 
int nev_
 
std::string outputFile_
 
CSCSectorReceiverLUTsrLUTs_ [5]
 
edm::InputTag statusProducer
 
edm::EDGetTokenT
< L1CSCStatusDigiCollection
statusToken_
 
const L1MuTriggerPtScaletpts
 
MonitorElementtrackModeVsQ
 
edm::InputTag trackProducer
 
edm::EDGetTokenT
< L1CSCTrackCollection
tracksToken_
 
const L1MuTriggerScalests
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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 58 of file L1TCSCTF.h.

Constructor & Destructor Documentation

L1TCSCTF::L1TCSCTF ( const edm::ParameterSet ps)

Definition at line 25 of file L1TCSCTF.cc.

References edm::ParameterSet::addUntrackedParameter(), corrlctsToken_, dtStubsToken_, Reference_intrackfit_cff::endcap, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gmtProducerToken_, edm::InputTag::instance(), edm::InputTag::label(), lctProducer, mbProducer, mbtracksToken_, outputFile_, srLUTs_, relativeConstraints::station, statusProducer, statusToken_, AlCaHLTBitMon_QueryRunRegistry::string, trackProducer, tracksToken_, and verbose_.

28  : gmtProducer( ps.getParameter< InputTag >("gmtProducer") ),
29  lctProducer( ps.getParameter< InputTag >("lctProducer") ),
30  trackProducer( ps.getParameter< InputTag >("trackProducer") ),
31  statusProducer( ps.getParameter< InputTag >("statusProducer") ),
32  mbProducer( ps.getParameter< InputTag >("mbProducer") )
33 {
34 
35  // verbosity switch
36  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
37 
38  if(verbose_) edm::LogInfo("DataNotFound") << "L1TCSCTF: constructor...." << endl;
39 
40  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
41  if ( outputFile_.size() != 0 )
42  {
43  edm::LogInfo("DataNotFound") << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
44  }
45 
46  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
47  if(disable){
48  outputFile_="";
49  }
50 
51  // instantiate standard on-fly SR LUTs from CSC TF emulator package
52  bzero(srLUTs_,sizeof(srLUTs_));
53  int endcap=1, sector=1; // assume SR LUTs are all same for every sector in either of endcaps
54  bool TMB07=true; // specific TMB firmware
55  // Create a dummy pset for SR LUTs
56  edm::ParameterSet srLUTset;
57  srLUTset.addUntrackedParameter<bool>("ReadLUTs", false);
58  srLUTset.addUntrackedParameter<bool>("Binary", false);
59  srLUTset.addUntrackedParameter<std::string>("LUTPath", "./");
60  for(int station=1,fpga=0; station<=4 && fpga<5; station++)
61  {
62  if(station==1)
63  for(int subSector=0; subSector<2 && fpga<5; subSector++)
64  srLUTs_[fpga++] = new CSCSectorReceiverLUT(endcap, sector, subSector+1, station, srLUTset, TMB07);
65  else
66  srLUTs_[fpga++] = new CSCSectorReceiverLUT(endcap, sector, 0, station, srLUTset, TMB07);
67  }
68 
69  //set Token(-s)
75 
76  gmtProducerToken_ = consumes<L1MuGMTReadoutCollection>(ps.getParameter< InputTag >("gmtProducer"));
77  statusToken_ = consumes<L1CSCStatusDigiCollection>(statusTag_);
78  corrlctsToken_ = consumes<CSCCorrelatedLCTDigiCollection>(corrlctsTag_);
79  tracksToken_ = consumes<L1CSCTrackCollection>(tracksTag_);
80  dtStubsToken_ = consumes<CSCTriggerContainer<csctf::TrackStub> >(dtStubsTag_);
81  mbtracksToken_ = consumes<L1CSCTrackCollection>(mbtracksTag_);
82 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool verbose_
Definition: L1TCSCTF.h:117
edm::InputTag mbProducer
Definition: L1TCSCTF.h:120
std::string outputFile_
Definition: L1TCSCTF.h:116
edm::InputTag statusProducer
Definition: L1TCSCTF.h:120
edm::EDGetTokenT< L1CSCStatusDigiCollection > statusToken_
Definition: L1TCSCTF.h:131
edm::InputTag lctProducer
Definition: L1TCSCTF.h:120
edm::EDGetTokenT< L1CSCTrackCollection > tracksToken_
Definition: L1TCSCTF.h:133
CSCSectorReceiverLUT * srLUTs_[5]
Definition: L1TCSCTF.h:122
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > corrlctsToken_
Definition: L1TCSCTF.h:132
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:207
edm::EDGetTokenT< L1CSCTrackCollection > mbtracksToken_
Definition: L1TCSCTF.h:135
edm::InputTag trackProducer
Definition: L1TCSCTF.h:120
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtProducerToken_
Definition: L1TCSCTF.h:130
std::string const & label() const
Definition: InputTag.h:42
std::string const & instance() const
Definition: InputTag.h:43
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dtStubsToken_
Definition: L1TCSCTF.h:134
edm::InputTag gmtProducer
Definition: L1TCSCTF.h:120
L1TCSCTF::~L1TCSCTF ( )
virtual

Definition at line 84 of file L1TCSCTF.cc.

References i, and srLUTs_.

85 {
86 
87  for(int i=0; i<5; i++)
88  delete srLUTs_[i]; //free the array of pointers
89 }
int i
Definition: DBlmapReader.cc:9
CSCSectorReceiverLUT * srLUTs_[5]
Definition: L1TCSCTF.h:122

Member Function Documentation

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

CAL as Janos adviced

Implements edm::EDAnalyzer.

Definition at line 389 of file L1TCSCTF.cc.

References funct::abs(), BxInEvent_, edm::eventsetup::EventSetupRecord::cacheIdentifier(), corrlctsToken_, csctfbx, csctfbx_H, csctfChamberOccupancies, csctferrors, csctfntrack, csctfoccupancies, csctfoccupancies_H, csctfTrackEta, csctfTrackEta_H, csctfTrackEtaHighQ, csctfTrackEtaLowQ, csctfTrackM, csctfTrackPhi, csctfTrackPhi_H, cscTrackStubNumbers, DTstubsTimeTrackMenTimeArrival, dtStubsToken_, Reference_intrackfit_cff::endcap, MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), L1MuScale::getLowEdge(), L1MuTriggerScales::getPhiScale(), L1MuGMTReadoutCollection::getRecords(), CSCSectorReceiverLUT::globalEtaME(), CSCSectorReceiverLUT::globalPhiME(), gmtProducer, gmtProducerToken_, isCSCcand_, edm::HandleBase::isValid(), L1ABXN, edm::InputTag::label(), lctProducer, CSCSectorReceiverLUT::localPhi(), M_PI, m_ptScaleCacheID, m_scalesCacheID, mbProducer, mbtracksToken_, nev_, edm::Handle< T >::product(), edm::ESHandle< class >::product(), CSCTriggerGeometry::setGeometry(), edm::shift, srLUTs_, relativeConstraints::station, ntuplemaker::status, statusProducer, statusToken_, tpts, trackModeVsQ, trackProducer, testEve_cfg::tracks, tracksToken_, CSCTriggerNumbering::triggerSubSectorFromLabels(), ts, and verbose_.

390 {
391 
393  c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier() != m_ptScaleCacheID ){
394 
396  c.get< L1MuTriggerScalesRcd >().get(scales);
397  ts = scales.product();
399  c.get< L1MuTriggerPtScaleRcd >().get(ptscales);
400  tpts = ptscales.product();
401  m_scalesCacheID = c.get< L1MuTriggerScalesRcd >().cacheIdentifier();
402  m_ptScaleCacheID = c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier();
403 
404  edm::LogInfo("L1TCSCTF") << "Changing triggerscales and triggerptscales...";
405  }
406 
407  int NumCSCTfTracksRep = 0;
408  nev_++;
409  if(verbose_) edm::LogInfo("DataNotFound") << "L1TCSCTF: analyze...." << endl;
410 
412  if( gmtProducer.label() != "null" )
413  { // GMT block
414  e.getByToken(gmtProducerToken_, pCollection);
415  if (!pCollection.isValid())
416  {
417  edm::LogInfo("DataNotFound") << "can't find L1MuGMTReadoutCollection with label "; // << csctfSource_.label() ;
418  return;
419  }
420 
421  L1MuGMTReadoutCollection const* gmtrc = pCollection.product();
422  vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
423  vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
424 
425  // Look if the readout window contains one (and only one CSC cands)
426  // to make it simpler I reject events with more than a CSC cand in the
427  // same readout window
428 
429  // count non-empty candidates in this bx
430  int bxWindow = 0;
431  int nCands = 0;
432 
433  for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ ) {
434  bxWindow++;
435 
436  // get the csc candidates
437  vector<L1MuRegionalCand> INPCands = RRItr->getCSCCands();
438  vector<L1MuRegionalCand>::const_iterator INPItr;
439 
440  BxInEvent_ = 0;
441  isCSCcand_ = false;
442  int nCandsBx = 0;
443 
444  for( INPItr = INPCands.begin(); INPItr != INPCands.end(); ++INPItr ) {
445  if(!INPItr->empty())
446  {
447  nCandsBx++;
448  nCands++;
449  BxInEvent_ = RRItr->getBxInEvent();
450  if (verbose_) edm::LogInfo("DataNotFound") << "cand " << nCandsBx << " -> assigned CSCTF bx: " << INPItr->bx() << endl;
451  }
452  }
453  if (verbose_)
454  if(nCandsBx) edm::LogInfo("DataNotFound") << nCandsBx << " cands in bx: " << BxInEvent_ << endl;
455  }
456 
457  if (nCands != 1) return;
458  else isCSCcand_ = true;
459  if (verbose_) edm::LogInfo("DataNotFound") << "bxWindow: " << bxWindow << endl;
460 
461  int ncsctftrack = 0;
462  if (verbose_)
463  {
464  edm::LogInfo("DataNotFound") << "\tCSCTFCand ntrack " << ncsctftrack << endl;
465  }
466  } // end of GMT block
467 
468  L1ABXN = -999;
469  if( statusProducer.label() != "null" )
470  {
472  e.getByToken(statusToken_, status);
473  bool integrity=status->first, se=false, sm=false, bx=false, af=false, fmm=false;
474  int nStat = 0;
475 
476  for(std::vector<L1CSCSPStatusDigi>::const_iterator stat=status->second.begin(); stat!=status->second.end(); stat++)
477  {
478  se |= stat->SEs()&0xFFF;
479  sm |= stat->SMs()&0xFFF;
480  bx |= stat->BXs()&0xFFF;
481  af |= stat->AFs()&0xFFF;
482  fmm|= stat->FMM()!=8;
483 
484  if(stat->VPs() != 0)
485  {
486  L1ABXN += stat->BXN();
487  nStat++;
488  }
489  }
490  // compute the average
491  if(nStat!=0) L1ABXN /= nStat;
492  if(integrity) csctferrors->Fill(0.5);
493  if(se) csctferrors->Fill(1.5);
494  if(sm) csctferrors->Fill(2.5);
495  if(bx) csctferrors->Fill(3.5);
496  if(af) csctferrors->Fill(4.5);
497  if(fmm) csctferrors->Fill(5.5);
498  }
499 
500  if( lctProducer.label() != "null" )
501  {
503  c.get<MuonGeometryRecord>().get( pDD );
505 
507  e.getByToken(corrlctsToken_, corrlcts);
508 
509  for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator csc=corrlcts.product()->begin(); csc!=corrlcts.product()->end(); csc++)
510  {
511  CSCCorrelatedLCTDigiCollection::Range range1 = corrlcts.product()->get((*csc).first);
512  for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range1.first; lct!=range1.second; lct++)
513  {
514  int endcap = (*csc).first.endcap()-1;
515  int station = (*csc).first.station()-1;
516  int sector = (*csc).first.triggerSector()-1;
517  int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*csc).first);
518  int cscId = (*csc).first.triggerCscId()-1;
519  int fpga = ( subSector ? subSector-1 : station+1 );
520 
521  int endcapAssignment = 1;
522  int shift = 1;
523  float sectorArg = sector;
524  //float sectorArg = j;
525 
526  if( endcap == 1 ){
527  endcapAssignment = -1;
528  shift = 2;
529  //sectorArg = sector - 6;
530  }
531 
532  int signedStation = (station + shift)* endcapAssignment;
533  if( (station == 0) && (endcap == 0)) signedStation = subSector - 1;
534  if( (station == 0) && (endcap == 1)) signedStation = (-1)*subSector;
535 
536  float chamberArg1 = cscId * 0.1 + sectorArg;
537  //float chamberArg1 = i*0.1 + sectorArg;
538  //std::cout << "First" << i << " " << sectorArg << " " << chamberArg1 << std::endl;
539 
540  float chamberArg11 = chamberArg1;
541  if(sectorArg == 1) chamberArg1 = chamberArg11 - 0.1;
542  if(sectorArg == 2) chamberArg1 = chamberArg11 - 0.2;
543  if(sectorArg == 3) chamberArg1 = chamberArg11 - 0.3;
544  if(sectorArg == 4) chamberArg1 = chamberArg11 - 0.4;
545  if(sectorArg == 5) chamberArg1 = chamberArg11 - 0.5;
546 
547  //std::cout << "cscId, station, sector, endcap, sectorArg, chamber Arg: " << cscId << ", " << station << ", " <<sector << ", " << endcap << ", " << chamberArg1 << ", " << signedStation << std::endl;
548 
549  csctfChamberOccupancies->Fill(chamberArg1, signedStation);
550  //int bunchX = ( (lct->getBX()) - 6 );
551 
552  //int timingSectorArg = 3*(sector) + (lct->getMPCLink());
553  //if( endcap == 1) timingSectorArg = 3*(sector + 6) + (lct->getMPCLink());
554  //std::cout << "Sector, MPCLink, TSA, endcap: " << sector << ", " << lct->getMPCLink() << ", " << timingSectorArg << ", " << endcap << std::endl;
555 
556  //csctfbx->Fill(timingSectorArg, bunchX );
557  //std::cout << "LCT'S, encap: " << endcap << ", station: " << station << ", sector: " << sector << ", subSector: " << subSector << ", cscId: " << cscId << std:: endl;
558  //End JAG
559 
560  // Check if Det Id is within pysical range:
561  if( endcap<0||endcap>1 || sector<0||sector>6 || station<0||station>3 || cscId<0||cscId>8 || fpga<0||fpga>4)
562  {
563  edm::LogError("L1CSCTF: CSC TP are out of range: ")<<" endcap: "<<(endcap+1)<<" station: "<<(station+1) <<" sector: "<<(sector+1)<<" subSector: "<<subSector<<" fpga: "<<fpga<<" cscId: "<<(cscId+1);
564  continue;
565  }
566  lclphidat lclPhi;
567  try {
568  lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
569  } catch(cms::Exception &) {
570  bzero(&lclPhi,sizeof(lclPhi));
571  }
572 
573  gblphidat gblPhi;
574  try {
575  gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1);
576  } catch(cms::Exception &) {
577  bzero(&gblPhi,sizeof(gblPhi));
578  }
579 
580  gbletadat gblEta;
581  try {
582  gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
583  } catch(cms::Exception &) {
584  bzero(&gblEta,sizeof(gblEta));
585  }
586 
587  // SR LUT gives packed eta and phi values -> normilize them to 1 by scale them to 'max' and shift by 'min'
588  //float etaP = gblEta.global_eta/127*1.5 + 0.9;
589  //float phiP = (gblPhi.global_phi);// + ( sector )*4096 + station*4096*12) * 1./(4*4096*12);
590  //std::cout << "LCT Eta & Phi Coordinates: " << etaP << ", " << phiP << "." << std::endl;
591  //csctfoccupancies->Fill( gblEta.global_eta/127. * 1.5 + 0.9, (gblPhi.global_phi + ( sector + (endcap?0:6) )*4096 + station*4096*12) * 1./(4*4096*12) );
592  }//lct != range1.scond
593  }//csc!=corrlcts.product()->end()
594  }// lctProducer.label() != "null"
595 
596 
597 
598  if( trackProducer.label() != "null" )
599  {
601  e.getByToken(tracksToken_, tracks);
602  for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
603  {
604 
605  NumCSCTfTracksRep++;
606  long LUTAdd = trk->first.ptLUTAddress();
607  int trigMode = ( (LUTAdd)&0xf0000 ) >> 16;
608  int trEta = (trk->first.eta_packed() );
609 
610 
611  // trk->first.endcap() = 2 for - endcap
612  // = 1 for + endcap
613  //int trEndcap = (trk->first.endcap()==2 ? trk->first.endcap()-3 : trk->first.endcap());
614  if( trk->first.endcap() != 1)
615  {
616  int holder = trEta;
617  trEta = -1*holder;
618  trEta -= 1;
619  }
620 
621  int trSector = 6*(trk->first.endcap()-1)+trk->first.sector();
622  int trBX = trk->first.BX();
623 
624  //Here is what is done with output phi value:
625  //output_phi = (phi / 32) * 3 /16
626  //where:
627  //phi is 12-bit phi, 4096 bins covering 62 degrees
628  //output_phi is 5-bit value
629 
630  //Easy to see that output_phi can have values from 0 to 23, or 24 total combinations.
631  //This gives per-bin phi value of 62/24 = 2.583333 degrees.
632 
633  // Sector 1 nominally starts at 15 degrees but there 1 degree overlap between sectors so 14 degrees effectively
634  //double trPhi = trk->first.localPhi() * 62. / 24.;
635  double trPhi = ts->getPhiScale()->getLowEdge(trk->first.localPhi());
636  double trPhi02PI = fmod(trPhi +
637  ((trSector-1)*M_PI/3) +
638  (M_PI*14/180.), 2*M_PI);
639 
640  if (trigMode == 15) {
641  csctfTrackPhi_H -> Fill( trPhi02PI );
642  csctfTrackEta_H -> Fill( trEta );
643  csctfoccupancies_H -> Fill( trEta, trPhi02PI );
644  csctfbx_H -> Fill( trSector, trBX );
645  }
646  else{
647  csctfTrackPhi -> Fill( trPhi02PI );
648  csctfTrackEta -> Fill( trEta );
649  csctfoccupancies -> Fill( trEta, trPhi02PI );
650  csctfbx -> Fill( trSector, trBX );
651 
652  // Low Quality / High Quality Eta Distributions
653  //|eta| < 2.1
654  if (abs(trEta) < 24) {
655  if (trigMode == 2 ||
656  trigMode == 3 ||
657  trigMode == 4 ||
658  trigMode == 5 ||
659  trigMode == 6 ||
660  trigMode == 7 ||
661  trigMode == 11 ||
662  trigMode == 12 ||
663  trigMode == 13 ||
664  trigMode == 14 ) csctfTrackEtaHighQ -> Fill (trEta);
665 
666  if (trigMode == 8 ||
667  trigMode == 9 ||
668  trigMode == 10 ) csctfTrackEtaLowQ -> Fill (trEta);
669  }
670  else {//|eta| > 2.1
671  if (trigMode == 2 ||
672  trigMode == 3 ||
673  trigMode == 4 ||
674  trigMode == 5 ) csctfTrackEtaHighQ -> Fill (trEta);
675  else
676  csctfTrackEtaLowQ -> Fill (trEta);
677  }
678  }
679 
680  csctfTrackM->Fill( trk->first.modeExtended() );
681 
682  // we monitor the track quality only on the first link
683  // so let's make sure to fill the plot if there is something that
684  // is read from the hardware
685  int trRank = trk->first.rank();
686  if (trRank) {
687  int trQuality = ((trRank>>5)&0x3);
688  trackModeVsQ->Fill( trk->first.modeExtended(), trQuality );
689  }
690 
691  /*
692  OLD METHOD FOR FILLING HALO PLOTS, IMPROVED METHOD USING ASSOCIATED TRACK STUBS
693  BELOW ~LINE 605
694  if( trigMode == 15 )
695  {
696 
697  double haloVals[4][4];
698  for( int i = 0; i < 4; i++)
699  {
700  haloVals[i][0] = 0;
701  }
702 
703  edm::Handle<CSCCorrelatedLCTDigiCollection> corrlcts;
704  for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator csc=corrlcts.product()->begin(); csc!=corrlcts.product()->end(); csc++)
705  {
706  CSCCorrelatedLCTDigiCollection::Range range1 = corrlcts.product()->get((*csc).first);
707  for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range1.first; lct!=range1.second; lct++)
708  {
709  int endcap = (*csc).first.endcap()-1;
710  int station = (*csc).first.station()-1;
711  int sector = (*csc).first.triggerSector()-1;
712  int cscId = (*csc).first.triggerCscId()-1;
713  int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*csc).first);
714  int fpga = ( subSector ? subSector-1 : station+1 );
715 
716  if(station != 4)
717  {
718  int modEnd = 1;
719  if( endcap == 0 ) modEnd = -1;
720  int indexHalo = modEnd + station;
721  if(haloVals[indexHalo][0] == 1.0) haloVals[indexHalo][3] = 1.0;
722  if(haloVals[indexHalo][0] == 0) haloVals[indexHalo][0] = 1.0;
723  haloVals[indexHalo][1] = sector*1.0;
724 
725  lclphidat lclPhi;
726  lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
727  gblphidat gblPhi;
728  gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1);
729  gbletadat gblEta;
730  gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
731 
732  haloVals[indexHalo][2] = gblEta.global_eta/127. * 1.5 + 0.9;
733  } //station1 or 2
734  } //lct first to second
735  } //corrlcts
736 
737  if( (haloVals[0][0] == 1.) && (haloVals[1][0] == 1.) && (haloVals[0][3] != 1.) && (haloVals[1][3] != 1.) )
738  {
739  if( haloVals[0][1] == haloVals[1][1] ){
740  double delEta23 = haloVals[1][2] - haloVals[0][2];
741  haloDelEta23->Fill( delEta23 );
742  }
743  }
744 
745  if( (haloVals[2][0] == 1.) && (haloVals[3][0] == 1.) && (haloVals[2][3] != 1.) && (haloVals[3][3] != 1.) )
746  {
747  if( haloVals[2][1] == haloVals[3][1] ){
748  double delEta23 = haloVals[3][2] - haloVals[2][2];
749  haloDelEta23->Fill( delEta23 );
750  }
751  }
752  } //halo trigger
753  */
754 
755  int cscTrackStub = 0;
756  //float haloEta[3];
757  //for(int i=0; i<3; i++) haloEta[i]=-1.0;
758  //bool haloME11 = false;
759  CSCCorrelatedLCTDigiCollection lctsOfTracks=trk->second;
760  for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator trackStub=lctsOfTracks.begin(); trackStub!=lctsOfTracks.end(); trackStub++)
761  {
762  CSCCorrelatedLCTDigiCollection::Range range2 = lctsOfTracks.get((*trackStub).first);
763  for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range2.first; lct!=range2.second; lct++)
764  {
765 // int station = (*trackStub).first.station()-1;
766 // if(station != 4)
767 // {
768 // // int endcap = (*trackStub).first.endcap()-1;
769 // // int sector = (*trackStub).first.triggerSector()-1;
770 // int cscId = (*trackStub).first.triggerCscId()-1;
771 // int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*trackStub).first);
772 // int fpga = ( subSector ? subSector-1 : station+1 );
773 
774 // lclphidat lclPhi;
775 // lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
776 // gblphidat gblPhi;
777 // gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1);
778 // gbletadat gblEta;
779 // gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
780 // haloEta[station-1] = gblEta.global_eta/127. * 1.5 + 0.9;
781 // if(station==1 && cscId<2) haloME11 = true;
782 // }
783  cscTrackStub++;
784  }
785  }
786  cscTrackStubNumbers->Fill(cscTrackStub);
787 
788 // if(trigMode == 15)
789 // {
790 // float dEta13 = haloEta[2]-haloEta[0];
791 // float dEta12 = haloEta[1]-haloEta[0];
792 // if(haloME11)
793 // {
794 // if(haloEta[1]!=-1.0) haloDelEta112->Fill(dEta12);
795 // if(haloEta[2]!=-1.0) haloDelEta113->Fill(dEta13);
796 // } else {
797 // if(haloEta[1]!=-1.0) haloDelEta12->Fill(dEta12);
798 // if(haloEta[2]!=-1.0) haloDelEta13->Fill(dEta13);
799 // }
800 // }
801  //
802 
803 
804 
805  }
806  }
807  csctfntrack->Fill(NumCSCTfTracksRep);
808 
809 
810  if( mbProducer.label() != "null" )
811  {
812  // handle to needed collections
814  e.getByToken(dtStubsToken_, dtStubs);
816  e.getByToken(mbtracksToken_, tracks);
817 
818  // loop on the DT stubs
819  std::vector<csctf::TrackStub> vstubs = dtStubs->get();
820  for(std::vector<csctf::TrackStub>::const_iterator stub=vstubs.begin();
821  stub!=vstubs.end(); stub++)
822  {
823  if (verbose_)
824  {
825  edm::LogInfo("DataNotFound") << "\n mbEndcap: " << stub->endcap();
826  edm::LogInfo("DataNotFound") << "\n stub->getStrip()[FLAG]: " << stub->getStrip();
827  edm::LogInfo("DataNotFound") << "\n stub->getKeyWG()[CAL]: " << stub->getKeyWG();
828  edm::LogInfo("DataNotFound") << "\n stub->BX(): " << stub->BX();
829  edm::LogInfo("DataNotFound") << "\n stub->sector(): " << stub->sector();
830  edm::LogInfo("DataNotFound") << "\n stub->subsector(): " << stub->subsector();
831  edm::LogInfo("DataNotFound") << "\n stub->station(): " << stub->station();
832  edm::LogInfo("DataNotFound") << "\n stub->phiPacked(): " << stub->phiPacked();
833  edm::LogInfo("DataNotFound") << "\n stub->getBend(): " << stub->getBend();
834  edm::LogInfo("DataNotFound") << "\n stub->getQuality(): " << stub->getQuality();
835  edm::LogInfo("DataNotFound") << "\n stub->cscid(): " << stub->cscid() << endl;
836  }
837  // define the sector ID
838  int mbId = (stub->endcap()==2) ? 6 : 0;
839  mbId += stub->sector();
840  // *** do not fill if CalMB variable is set ***
841  // horrible! They used the same class to write up the LCT and MB info,
842  // but given the MB does not have strip and WG they replaced this two
843  // with the flag and cal bits... :S
844  if (stub->getKeyWG() == 0)
845  {
846  // if FLAG =1, muon belong to previous BX
847  int bxDT = stub->BX()-stub->getStrip(); // correct by the FLAG
848  int subDT = stub->subsector();
849 
850  // Fill the event only if CSC had or would have triggered
851  if (isCSCcand_)
852  {
853  //look for tracks in the event and compare the matching DT stubs
854  int trkBX = 0;
855  for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
856  {
857  trkBX = trk->first.BX();
858  int trkId = (trk->first.endcap()==2) ? 6 : 0;
859  trkId += trk->first.sector();
860  if (verbose_){
861  edm::LogInfo("DataNotFound") << "\n trk BX: " << trkBX
862  << " Sector: " << trkId
863  << " SubSector: " << trk->first.subsector()
864  << " Endcap: " << trk->first.endcap();
865 
866  edm::LogInfo("DataNotFound") << "\n DT BX: " << stub->BX()
867  << " Sector: " << mbId
868  << " SubSector: " << stub->subsector()
869  << " Endcap: " << stub->endcap() << endl;
870  }
871 
872  if (mbId == trkId)
873  {
874  if (verbose_) {
875  edm::LogInfo("DataNotFound") << " --> MATCH" << endl;
876  edm::LogInfo("DataNotFound") << "Fill :" << trkBX+6-bxDT << " -- " << subDT << " -- cands" << endl;
877  }
878  // DT bx ranges from 3 to 9
879  // trk bx ranges from -3 to 3
880  DTstubsTimeTrackMenTimeArrival[mbId-1]->Fill(bxDT-trkBX-6,subDT);//subsec
881  }
882  }// loop on the tracks
883  }//if (isCSCcand_){
884  }//if (stub->getKeyWG() == 0) {
885  }
886  }
887 }
MonitorElement * DTstubsTimeTrackMenTimeArrival[12]
Definition: L1TCSCTF.h:109
MonitorElement * csctfoccupancies
Definition: L1TCSCTF.h:83
unsigned long long cacheIdentifier() const
MonitorElement * csctfTrackEtaHighQ
Definition: L1TCSCTF.h:99
lclphidat localPhi(int strip, int pattern, int quality, int lr, const bool gangedME1a=false) const
Geometry Lookup Tables.
MonitorElement * csctfTrackPhi
Definition: L1TCSCTF.h:96
bool verbose_
Definition: L1TCSCTF.h:117
unsigned long long m_scalesCacheID
Definition: L1TCSCTF.h:126
MonitorElement * csctfTrackPhi_H
Definition: L1TCSCTF.h:100
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
MonitorElement * csctfbx
Definition: L1TCSCTF.h:79
MonitorElement * csctfTrackEtaLowQ
Definition: L1TCSCTF.h:98
edm::InputTag mbProducer
Definition: L1TCSCTF.h:120
static void setGeometry(const edm::ESHandle< CSCGeometry > &thegeom)
MonitorElement * csctfTrackEta
Definition: L1TCSCTF.h:97
void Fill(long long x)
edm::InputTag statusProducer
Definition: L1TCSCTF.h:120
edm::EDGetTokenT< L1CSCStatusDigiCollection > statusToken_
Definition: L1TCSCTF.h:131
MonitorElement * csctfTrackEta_H
Definition: L1TCSCTF.h:101
const L1MuTriggerScales * ts
Definition: L1TCSCTF.h:124
gblphidat globalPhiME(int phi_local, int wire_group, int cscid, const bool gangedME1a=false) const
MonitorElement * cscTrackStubNumbers
Definition: L1TCSCTF.h:102
int L1ABXN
Definition: L1TCSCTF.h:113
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int BxInEvent_
Definition: L1TCSCTF.h:110
const L1MuScale * getPhiScale() const
get the phi scale
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int nev_
Definition: L1TCSCTF.h:115
MonitorElement * csctfChamberOccupancies
Definition: L1TCSCTF.h:95
bool isValid() const
Definition: HandleBase.h:75
edm::InputTag lctProducer
Definition: L1TCSCTF.h:120
#define M_PI
edm::EDGetTokenT< L1CSCTrackCollection > tracksToken_
Definition: L1TCSCTF.h:133
CSCSectorReceiverLUT * srLUTs_[5]
Definition: L1TCSCTF.h:122
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > corrlctsToken_
Definition: L1TCSCTF.h:132
MonitorElement * csctferrors
Definition: L1TCSCTF.h:82
T const * product() const
Definition: Handle.h:81
tuple tracks
Definition: testEve_cfg.py:39
bool isCSCcand_
Definition: L1TCSCTF.h:111
class global_phi_data gblphidat
const T & get() const
Definition: EventSetup.h:55
MonitorElement * csctfTrackM
Definition: L1TCSCTF.h:103
edm::EDGetTokenT< L1CSCTrackCollection > mbtracksToken_
Definition: L1TCSCTF.h:135
T const * product() const
Definition: ESHandle.h:86
MonitorElement * csctfbx_H
Definition: L1TCSCTF.h:80
std::vector< CSCCorrelatedLCTDigi >::const_iterator const_iterator
class local_phi_data lclphidat
Data Types.
static int triggerSubSectorFromLabels(int station, int chamber)
MonitorElement * csctfntrack
Definition: L1TCSCTF.h:78
edm::InputTag trackProducer
Definition: L1TCSCTF.h:120
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtProducerToken_
Definition: L1TCSCTF.h:130
std::string const & label() const
Definition: InputTag.h:42
MonitorElement * trackModeVsQ
Definition: L1TCSCTF.h:104
gbletadat globalEtaME(int phi_bend, int phi_local, int wire_group, int cscid, const bool gangedME1a=false) const
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * csctfoccupancies_H
Definition: L1TCSCTF.h:84
static unsigned int const shift
std::pair< const_iterator, const_iterator > Range
const L1MuTriggerPtScale * tpts
Definition: L1TCSCTF.h:125
unsigned long long m_ptScaleCacheID
Definition: L1TCSCTF.h:127
tuple status
Definition: ntuplemaker.py:245
class global_eta_data gbletadat
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dtStubsToken_
Definition: L1TCSCTF.h:134
edm::InputTag gmtProducer
Definition: L1TCSCTF.h:120
void L1TCSCTF::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements thread_unsafe::DQMEDAnalyzer.

Definition at line 94 of file L1TCSCTF.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), csctfbx, csctfbx_H, csctfChamberOccupancies, csctferrors, csctfntrack, csctfoccupancies, csctfoccupancies_H, csctfTrackEta, csctfTrackEta_H, csctfTrackEtaHighQ, csctfTrackEtaLowQ, csctfTrackM, csctfTrackPhi, csctfTrackPhi_H, cscTrackStubNumbers, DTstubsTimeTrackMenTimeArrival, MonitorElement::getTH2F(), i, M_PI, m_ptScaleCacheID, m_scalesCacheID, nev_, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), and trackModeVsQ.

95 {
96  m_scalesCacheID = -999;
97  m_ptScaleCacheID = -999;
98 
99  nev_ = 0;
100  ibooker.setCurrentFolder("L1T/L1TCSCTF");
101 
102  // Error counting histogram:
103  // 1) checks TF data integrity (error rate - first bin),
104  // 2) monitors sychronization on input links (4 errors types: SE/SM/BX/AF; ORed for all time bins, links, and SPs),
105  // 3) reports FMM status (if in any SP FMM status != "Ready" - fill the last bin)
106  csctferrors = ibooker.book1D("CSCTF_errors","CSCTF Errors",6,0,6);
107  csctferrors->setAxisTitle("Error type",1);
108  csctferrors->setAxisTitle("Number of Errors",2);
109  csctferrors->setBinLabel(1,"Corruptions",1);
110  csctferrors->setBinLabel(2,"Synch. Err.",1);
111  csctferrors->setBinLabel(3,"Synch. Mod.",1);
112  csctferrors->setBinLabel(4,"BX mismatch",1);
113  csctferrors->setBinLabel(5,"Time misalign.",1);
114  csctferrors->setBinLabel(6,"FMM != Ready",1);
115 
116  // Occupancy histogram Eta x Y, where Y:
117  // 1) Phi_packed of input LCTs from 1st, 2nd, 3rd, and 4th stations
118  // 2) Phi_packed of output tracks
119  // (all 12 SPs - 360 degree coveradge)
120  csctfoccupancies = ibooker.book2D("CSCTF_occupancies", "CSCTF Occupancies", 64,-32,31,32,0,6.2);
121  csctfoccupancies->setAxisTitle("#eta",1);
122  csctfoccupancies->setAxisTitle("#phi",2);
123  csctfoccupancies->setBinLabel( 1,"-2.5", 1);
124  csctfoccupancies->setBinLabel( 8,"-2.1", 1);
125  csctfoccupancies->setBinLabel(18,"-1.6", 1);
126  csctfoccupancies->setBinLabel(26,"-1.2", 1);
127  csctfoccupancies->setBinLabel(32,"-0.9", 1);
128  csctfoccupancies->setBinLabel(33, "0.9", 1);
129  csctfoccupancies->setBinLabel(39, "1.2", 1);
130  csctfoccupancies->setBinLabel(47, "1.6", 1);
131  csctfoccupancies->setBinLabel(57, "2.1", 1);
132  csctfoccupancies->setBinLabel(64, "2.5", 1);
133 
134  // ... and for halo muons only
135  csctfoccupancies_H = ibooker.book2D("CSCTF_occupancies_H", "CSCTF Halo Occupancies", 64,-32,31,32,0,6.2);
136  csctfoccupancies_H->setAxisTitle("#eta",1);
137  csctfoccupancies_H->setAxisTitle("#phi",2);
138  csctfoccupancies_H->setBinLabel( 1,"-2.5", 1);
139  csctfoccupancies_H->setBinLabel( 8,"-2.1", 1);
140  csctfoccupancies_H->setBinLabel(18,"-1.6", 1);
141  csctfoccupancies_H->setBinLabel(26,"-1.2", 1);
142  csctfoccupancies_H->setBinLabel(32,"-0.9", 1);
143  csctfoccupancies_H->setBinLabel(33, "0.9", 1);
144  csctfoccupancies_H->setBinLabel(39, "1.2", 1);
145  csctfoccupancies_H->setBinLabel(47, "1.6", 1);
146  csctfoccupancies_H->setBinLabel(57, "2.1", 1);
147  csctfoccupancies_H->setBinLabel(64, "2.5", 1);
148 
149  //haloDelEta12 = dbe->book1D("CSCTF_Halo_Eta12", "#Delta #eta_{12} for Halo Muons", 40, -0.20,0.30);
150  //haloDelEta112 = dbe->book1D("CSCTF_Halo_Eta112","#Delta #eta_{112} for Halo Muons", 40, -0.20,0.30);
151  //haloDelEta13 = dbe->book1D("CSCTF_Halo_Eta13", "#Delta #eta_{13} for Halo Muons", 40, -0.20,0.30);
152  //haloDelEta113 = dbe->book1D("CSCTF_Halo_Eta113","#Delta #eta_{113} for Halo Muons", 40, -0.20,0.30);
153 
154  // Quality VS Mode
155  trackModeVsQ = ibooker.book2D("CSCTF_Track_ModeVsQual","CSC Track Mode Vs Quality", 19, -0.5, 18.5, 4, 0, 4);
156  trackModeVsQ->setAxisTitle("Track Type", 1);
157  trackModeVsQ->setBinLabel(1,"No Track",1);
158  trackModeVsQ->setBinLabel(2,"Bad Phi/Single",1);
159  trackModeVsQ->setBinLabel(3,"ME1-2-3",1);
160  trackModeVsQ->setBinLabel(4,"ME1-2-4",1);
161  trackModeVsQ->setBinLabel(5,"ME1-3-4",1);
162  trackModeVsQ->setBinLabel(6,"ME2-3-4",1);
163  trackModeVsQ->setBinLabel(7,"ME1-2",1);
164  trackModeVsQ->setBinLabel(8,"ME1-3",1);
165  trackModeVsQ->setBinLabel(9,"ME2-3",1);
166  trackModeVsQ->setBinLabel(10,"ME2-4",1);
167  trackModeVsQ->setBinLabel(11,"ME3-4",1);
168  trackModeVsQ->setBinLabel(12,"MB1-ME3",1);
169  trackModeVsQ->setBinLabel(13,"MB1-ME2",1);
170  trackModeVsQ->setBinLabel(14,"ME1-4",1);
171  trackModeVsQ->setBinLabel(15,"MB1-ME1",1);
172  trackModeVsQ->setBinLabel(16,"Halo Trigger",1);
173  trackModeVsQ->setBinLabel(17,"MB1-ME1-2",1);
174  trackModeVsQ->setBinLabel(18,"MB1-ME1-3",1);
175  trackModeVsQ->setBinLabel(19,"MB1-ME2-3",1);
176 
177  trackModeVsQ->setAxisTitle("Quality",2);
178  trackModeVsQ->setBinLabel(1,"0",2);
179  trackModeVsQ->setBinLabel(2,"1",2);
180  trackModeVsQ->setBinLabel(3,"2",2);
181  trackModeVsQ->setBinLabel(4,"3",2);
182 
183  // Mode
184  csctfTrackM = ibooker.book1D("CSCTF_Track_Mode","CSC Track Mode", 19, -0.5, 18.5);
185  csctfTrackM->setAxisTitle("Track Type", 1);
186  csctfTrackM->setBinLabel(1,"No Track",1);
187  csctfTrackM->setBinLabel(2,"Bad Phi/Single",1);
188  csctfTrackM->setBinLabel(3,"ME1-2-3",1);
189  csctfTrackM->setBinLabel(4,"ME1-2-4",1);
190  csctfTrackM->setBinLabel(5,"ME1-3-4",1);
191  csctfTrackM->setBinLabel(6,"ME2-3-4",1);
192  csctfTrackM->setBinLabel(7,"ME1-2",1);
193  csctfTrackM->setBinLabel(8,"ME1-3",1);
194  csctfTrackM->setBinLabel(9,"ME2-3",1);
195  csctfTrackM->setBinLabel(10,"ME2-4",1);
196  csctfTrackM->setBinLabel(11,"ME3-4",1);
197  csctfTrackM->setBinLabel(12,"MB1-ME3",1);
198  csctfTrackM->setBinLabel(13,"MB1-ME2",1);
199  csctfTrackM->setBinLabel(14,"ME1-4",1);
200  csctfTrackM->setBinLabel(15,"MB1-ME1",1);
201  csctfTrackM->setBinLabel(16,"Halo Trigger",1);
202  csctfTrackM->setBinLabel(17,"MB1-ME1-2",1);
203  csctfTrackM->setBinLabel(18,"MB1-ME1-3",1);
204  csctfTrackM->setBinLabel(19,"MB1-ME2-3",1);
205 
206  // Chamber Occupancy
207  csctfChamberOccupancies = ibooker.book2D("CSCTF_Chamber_Occupancies","CSCTF Chamber Occupancies", 54, -0.05, 5.35, 10, -5.5, 4.5);
208  csctfChamberOccupancies->setAxisTitle("Sector, (chambers 1-9 not labeled)",1);
212  csctfChamberOccupancies->setBinLabel(4,"ME-1b",2);
213  csctfChamberOccupancies->setBinLabel(5,"ME-1a",2);
214  csctfChamberOccupancies->setBinLabel(6,"ME+1a",2);
215  csctfChamberOccupancies->setBinLabel(7,"ME+1b",2);
218  csctfChamberOccupancies->setBinLabel(10,"ME+4",2);
225 
226  // Track Phi
227  csctfTrackPhi = ibooker.book1D("CSCTF_Track_Phi", "CSCTF Track #phi",144,0,2*M_PI);
228  csctfTrackPhi->setAxisTitle("Track #phi", 1);
229 
230  // Track Eta
231  csctfTrackEta = ibooker.book1D("CSCTF_Track_Eta", "CSCTF Track #eta",64,-32,32);
232  csctfTrackEta->setAxisTitle("Track #eta", 1);
233  csctfTrackEta->setBinLabel( 1,"-2.5", 1);
234  csctfTrackEta->setBinLabel( 8,"-2.1", 1);
235  csctfTrackEta->setBinLabel(18,"-1.6", 1);
236  csctfTrackEta->setBinLabel(26,"-1.2", 1);
237  csctfTrackEta->setBinLabel(32,"-0.9", 1);
238  csctfTrackEta->setBinLabel(33, "0.9", 1);
239  csctfTrackEta->setBinLabel(39, "1.2", 1);
240  csctfTrackEta->setBinLabel(47, "1.6", 1);
241  csctfTrackEta->setBinLabel(57, "2.1", 1);
242  csctfTrackEta->setBinLabel(64, "2.5", 1);
243 
244  // Track Eta Low Quality
245  csctfTrackEtaLowQ = ibooker.book1D("CSCTF_Track_Eta_LowQ", "CSCTF Track #eta LQ",64,-32,32);
246  csctfTrackEtaLowQ->setAxisTitle("Track #eta", 1);
247  csctfTrackEtaLowQ->setBinLabel( 1,"-2.5", 1);
248  csctfTrackEtaLowQ->setBinLabel( 8,"-2.1", 1);
249  csctfTrackEtaLowQ->setBinLabel(18,"-1.6", 1);
250  csctfTrackEtaLowQ->setBinLabel(26,"-1.2", 1);
251  csctfTrackEtaLowQ->setBinLabel(32,"-0.9", 1);
252  csctfTrackEtaLowQ->setBinLabel(33, "0.9", 1);
253  csctfTrackEtaLowQ->setBinLabel(39, "1.2", 1);
254  csctfTrackEtaLowQ->setBinLabel(47, "1.6", 1);
255  csctfTrackEtaLowQ->setBinLabel(57, "2.1", 1);
256  csctfTrackEtaLowQ->setBinLabel(64, "2.5", 1);
257 
258 
259  // Track Eta High Quality
260  csctfTrackEtaHighQ = ibooker.book1D("CSCTF_Track_Eta_HighQ", "CSCTF Track #eta HQ",64,-32,32);
261  csctfTrackEtaHighQ->setAxisTitle("Track #eta", 1);
262  csctfTrackEtaHighQ->setBinLabel( 1,"-2.5", 1);
263  csctfTrackEtaHighQ->setBinLabel( 8,"-2.1", 1);
264  csctfTrackEtaHighQ->setBinLabel(18,"-1.6", 1);
265  csctfTrackEtaHighQ->setBinLabel(26,"-1.2", 1);
266  csctfTrackEtaHighQ->setBinLabel(32,"-0.9", 1);
267  csctfTrackEtaHighQ->setBinLabel(33, "0.9", 1);
268  csctfTrackEtaHighQ->setBinLabel(39, "1.2", 1);
269  csctfTrackEtaHighQ->setBinLabel(47, "1.6", 1);
270  csctfTrackEtaHighQ->setBinLabel(57, "2.1", 1);
271  csctfTrackEtaHighQ->setBinLabel(64, "2.5", 1);
272 
273 
274  // Halo Phi
275  csctfTrackPhi_H = ibooker.book1D("CSCTF_Track_Phi_H", "CSCTF Halo #phi",144,0,2*M_PI);
276  csctfTrackPhi_H->setAxisTitle("Track #phi", 1);
277 
278  // Halo Eta
279  csctfTrackEta_H = ibooker.book1D("CSCTF_Track_Eta_H", "CSCTF Halo #eta",64,-32,32);
280  csctfTrackEta_H->setAxisTitle("Track #eta", 1);
281  csctfTrackEta_H->setBinLabel( 1,"-2.5", 1);
282  csctfTrackEta_H->setBinLabel( 8,"-2.1", 1);
283  csctfTrackEta_H->setBinLabel(18,"-1.6", 1);
284  csctfTrackEta_H->setBinLabel(26,"-1.2", 1);
285  csctfTrackEta_H->setBinLabel(32,"-0.9", 1);
286  csctfTrackEta_H->setBinLabel(33, "0.9", 1);
287  csctfTrackEta_H->setBinLabel(39, "1.2", 1);
288  csctfTrackEta_H->setBinLabel(47, "1.6", 1);
289  csctfTrackEta_H->setBinLabel(57, "2.1", 1);
290  csctfTrackEta_H->setBinLabel(64, "2.5", 1);
291 
292  // Track Timing
293  csctfbx = ibooker.book2D("CSCTF_bx","CSCTF BX", 12,1,13, 7,-3,3) ;
294  csctfbx->setAxisTitle("Sector (Endcap)", 1);
295  csctfbx->setBinLabel( 1," 1 (+)",1);
296  csctfbx->setBinLabel( 2," 2 (+)",1);
297  csctfbx->setBinLabel( 3," 3 (+)",1);
298  csctfbx->setBinLabel( 4," 4 (+)",1);
299  csctfbx->setBinLabel( 5," 5 (+)",1);
300  csctfbx->setBinLabel( 6," 6 (+)",1);
301  csctfbx->setBinLabel( 7," 7 (-)",1);
302  csctfbx->setBinLabel( 8," 8 (-)",1);
303  csctfbx->setBinLabel( 9," 9 (-)",1);
304  csctfbx->setBinLabel(10,"10 (-)",1);
305  csctfbx->setBinLabel(11,"11 (-)",1);
306  csctfbx->setBinLabel(12,"12 (-)",1);
307 
308  csctfbx->setAxisTitle("CSCTF BX", 2);
309  csctfbx->setBinLabel( 1, "-3", 2);
310  csctfbx->setBinLabel( 2, "-2", 2);
311  csctfbx->setBinLabel( 3, "-1", 2);
312  csctfbx->setBinLabel( 4, "-0", 2);
313  csctfbx->setBinLabel( 5, " 1", 2);
314  csctfbx->setBinLabel( 6, " 2", 2);
315  csctfbx->setBinLabel( 7, " 3", 2);
316 
317  // Halo Timing
318  csctfbx_H = ibooker.book2D("CSCTF_bx_H","CSCTF HALO BX", 12,1,13, 7,-3,3) ;
319  csctfbx_H->setAxisTitle("Sector (Endcap)", 1);
320  csctfbx_H->setBinLabel( 1," 1 (+)",1);
321  csctfbx_H->setBinLabel( 2," 2 (+)",1);
322  csctfbx_H->setBinLabel( 3," 3 (+)",1);
323  csctfbx_H->setBinLabel( 4," 4 (+)",1);
324  csctfbx_H->setBinLabel( 5," 5 (+)",1);
325  csctfbx_H->setBinLabel( 6," 6 (+)",1);
326  csctfbx_H->setBinLabel( 7," 7 (-)",1);
327  csctfbx_H->setBinLabel( 8," 8 (-)",1);
328  csctfbx_H->setBinLabel( 9," 9 (-)",1);
329  csctfbx_H->setBinLabel(10,"10 (-)",1);
330  csctfbx_H->setBinLabel(11,"11 (-)",1);
331  csctfbx_H->setBinLabel(12,"12 (-)",1);
332 
333  csctfbx_H->setAxisTitle("CSCTF BX", 2);
334  csctfbx_H->setBinLabel( 1, "-3", 2);
335  csctfbx_H->setBinLabel( 2, "-2", 2);
336  csctfbx_H->setBinLabel( 3, "-1", 2);
337  csctfbx_H->setBinLabel( 4, "-0", 2);
338  csctfbx_H->setBinLabel( 5, " 1", 2);
339  csctfbx_H->setBinLabel( 6, " 2", 2);
340  csctfbx_H->setBinLabel( 7, " 3", 2);
341 
342  // Number of Tracks Stubs
343  cscTrackStubNumbers = ibooker.book1D("CSCTF_TrackStubs", "Number of Stubs in CSCTF Tracks", 5, 0, 5);
344  cscTrackStubNumbers->setBinLabel( 1, "0", 1);
345  cscTrackStubNumbers->setBinLabel( 2, "1", 1);
346  cscTrackStubNumbers->setBinLabel( 3, "2", 1);
347  cscTrackStubNumbers->setBinLabel( 4, "3", 1);
348  cscTrackStubNumbers->setBinLabel( 5, "4", 1);
349 
350  // Number of Tracks
351  csctfntrack = ibooker.book1D("CSCTF_ntrack","Number of CSCTracks found per event", 5, 0, 5 ) ;
352  csctfntrack->setBinLabel( 1, "0", 1);
353  csctfntrack->setBinLabel( 2, "1", 1);
354  csctfntrack->setBinLabel( 3, "2", 1);
355  csctfntrack->setBinLabel( 4, "3", 1);
356  csctfntrack->setBinLabel( 5, "4", 1);
357  //}
358 
359  char hname [200];
360  char htitle[200];
361 
362  for(int i=0; i<12; i++) {
363 
364  sprintf(hname ,"DTstubsTimeTrackMenTimeArrival_%d",i+1);
365  sprintf(htitle,"T_{track} - T_{DT stub} sector %d",i+1);
366 
367  DTstubsTimeTrackMenTimeArrival[i] = ibooker.book2D(hname,htitle, 7,-3,3, 2,1,3);
368  DTstubsTimeTrackMenTimeArrival[i]->getTH2F()->SetMinimum(0);
369 
370  // axis makeup
371  DTstubsTimeTrackMenTimeArrival[i]->setAxisTitle("bx_{CSC track} - bx_{DT stub}",1);
373 
381 
384 
385  }
386 
387 }
MonitorElement * DTstubsTimeTrackMenTimeArrival[12]
Definition: L1TCSCTF.h:109
MonitorElement * csctfoccupancies
Definition: L1TCSCTF.h:83
MonitorElement * csctfTrackEtaHighQ
Definition: L1TCSCTF.h:99
int i
Definition: DBlmapReader.cc:9
MonitorElement * csctfTrackPhi
Definition: L1TCSCTF.h:96
unsigned long long m_scalesCacheID
Definition: L1TCSCTF.h:126
MonitorElement * csctfTrackPhi_H
Definition: L1TCSCTF.h:100
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 * csctfbx
Definition: L1TCSCTF.h:79
MonitorElement * csctfTrackEtaLowQ
Definition: L1TCSCTF.h:98
MonitorElement * csctfTrackEta
Definition: L1TCSCTF.h:97
MonitorElement * csctfTrackEta_H
Definition: L1TCSCTF.h:101
MonitorElement * cscTrackStubNumbers
Definition: L1TCSCTF.h:102
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
int nev_
Definition: L1TCSCTF.h:115
MonitorElement * csctfChamberOccupancies
Definition: L1TCSCTF.h:95
#define M_PI
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * csctferrors
Definition: L1TCSCTF.h:82
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * csctfTrackM
Definition: L1TCSCTF.h:103
MonitorElement * csctfbx_H
Definition: L1TCSCTF.h:80
MonitorElement * csctfntrack
Definition: L1TCSCTF.h:78
MonitorElement * trackModeVsQ
Definition: L1TCSCTF.h:104
MonitorElement * csctfoccupancies_H
Definition: L1TCSCTF.h:84
unsigned long long m_ptScaleCacheID
Definition: L1TCSCTF.h:127
TH2F * getTH2F(void) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TCSCTF::dqmBeginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from thread_unsafe::DQMEDAnalyzer.

Definition at line 91 of file L1TCSCTF.cc.

91  {
92 }

Member Data Documentation

int L1TCSCTF::BxInEvent_
private

Definition at line 110 of file L1TCSCTF.h.

Referenced by analyze().

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> L1TCSCTF::corrlctsToken_
private

Definition at line 132 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

MonitorElement* L1TCSCTF::csctfAFerror
private

Definition at line 105 of file L1TCSCTF.h.

MonitorElement* L1TCSCTF::csctfbx
private

Definition at line 79 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfbx_H
private

Definition at line 80 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfChamberOccupancies
private

Definition at line 95 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctferrors
private

Definition at line 82 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfntrack
private

Definition at line 78 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfoccupancies
private

Definition at line 83 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfoccupancies_H
private

Definition at line 84 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfTrackEta
private

Definition at line 97 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfTrackEta_H
private

Definition at line 101 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfTrackEtaHighQ
private

Definition at line 99 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfTrackEtaLowQ
private

Definition at line 98 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfTrackM
private

Definition at line 103 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfTrackPhi
private

Definition at line 96 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::csctfTrackPhi_H
private

Definition at line 100 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::cscTrackStubNumbers
private

Definition at line 102 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TCSCTF::DTstubsTimeTrackMenTimeArrival[12]
private

Definition at line 109 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<CSCTriggerContainer<csctf::TrackStub> > L1TCSCTF::dtStubsToken_
private

Definition at line 134 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

edm::InputTag L1TCSCTF::gmtProducer
private

Definition at line 120 of file L1TCSCTF.h.

Referenced by analyze().

edm::EDGetTokenT<L1MuGMTReadoutCollection> L1TCSCTF::gmtProducerToken_
private

Definition at line 130 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

bool L1TCSCTF::isCSCcand_
private

Definition at line 111 of file L1TCSCTF.h.

Referenced by analyze().

int L1TCSCTF::L1ABXN
private

Definition at line 113 of file L1TCSCTF.h.

Referenced by analyze().

edm::InputTag L1TCSCTF::lctProducer
private

Definition at line 120 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

std::ofstream L1TCSCTF::logFile_
private

Definition at line 119 of file L1TCSCTF.h.

unsigned long long L1TCSCTF::m_ptScaleCacheID
private

Definition at line 127 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

unsigned long long L1TCSCTF::m_scalesCacheID
private

Definition at line 126 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TCSCTF::mbProducer
private

Definition at line 120 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

edm::EDGetTokenT<L1CSCTrackCollection> L1TCSCTF::mbtracksToken_
private

Definition at line 135 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

bool L1TCSCTF::monitorDaemon_
private

Definition at line 118 of file L1TCSCTF.h.

int L1TCSCTF::nev_
private

Definition at line 115 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

std::string L1TCSCTF::outputFile_
private

Definition at line 116 of file L1TCSCTF.h.

Referenced by L1TCSCTF().

CSCSectorReceiverLUT* L1TCSCTF::srLUTs_[5]
private

Definition at line 122 of file L1TCSCTF.h.

Referenced by analyze(), L1TCSCTF(), and ~L1TCSCTF().

edm::InputTag L1TCSCTF::statusProducer
private

Definition at line 120 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

edm::EDGetTokenT<L1CSCStatusDigiCollection> L1TCSCTF::statusToken_
private

Definition at line 131 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

const L1MuTriggerPtScale* L1TCSCTF::tpts
private

Definition at line 125 of file L1TCSCTF.h.

Referenced by analyze().

MonitorElement* L1TCSCTF::trackModeVsQ
private

Definition at line 104 of file L1TCSCTF.h.

Referenced by analyze(), and bookHistograms().

edm::InputTag L1TCSCTF::trackProducer
private

Definition at line 120 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

edm::EDGetTokenT<L1CSCTrackCollection> L1TCSCTF::tracksToken_
private

Definition at line 133 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().

const L1MuTriggerScales* L1TCSCTF::ts
private

Definition at line 124 of file L1TCSCTF.h.

Referenced by analyze().

bool L1TCSCTF::verbose_
private

Definition at line 117 of file L1TCSCTF.h.

Referenced by analyze(), and L1TCSCTF().