CMS 3D CMS Logo

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

#include <L1TdeCSCTF.h>

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

Public Member Functions

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

Protected Member Functions

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

Private Attributes

MonitorElementbadDtStubSector
 
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dataStubProducer
 
edm::EDGetTokenT< L1CSCTrackCollectiondataTrackProducer
 
MonitorElementdtStubPhi
 
MonitorElementdtStubPhi_1d
 
edm::EDGetTokenT< L1MuDTChambPhContaineremulStubProducer
 
edm::EDGetTokenT< L1CSCTrackCollectionemulTrackProducer
 
MonitorElementetaComp
 
MonitorElementetaComp_1d
 
std::string m_dirName
 
std::unique_ptr< CSCTFDTReceivermy_dtrc
 
MonitorElementoccComp
 
MonitorElementoccComp_1d
 
std::string outFile
 
MonitorElementphiComp
 
MonitorElementphiComp_1d
 
MonitorElementpt1Comp
 
MonitorElementpt1Comp_1d
 
MonitorElementpt2Comp
 
MonitorElementpt2Comp_1d
 
MonitorElementpt3Comp
 
MonitorElementpt3Comp_1d
 
MonitorElementpt4Comp
 
MonitorElementpt4Comp_1d
 
MonitorElementpt5Comp
 
MonitorElementpt5Comp_1d
 
MonitorElementpt6Comp
 
MonitorElementpt6Comp_1d
 
MonitorElementptComp
 
MonitorElementptComp_1d
 
edm::ParameterSet ptLUTset
 
MonitorElementqualComp
 
MonitorElementqualComp_1d
 

Detailed Description

Definition at line 42 of file L1TdeCSCTF.h.

Constructor & Destructor Documentation

L1TdeCSCTF::L1TdeCSCTF ( edm::ParameterSet const &  pset)
explicit

Definition at line 39 of file L1TdeCSCTF.cc.

References edm::ParameterSet::empty(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and GetRecoTauVFromDQM_MC_cff::outFile.

39  {
40  dataTrackProducer = consumes<L1CSCTrackCollection>(pset.getParameter<InputTag>("dataTrackProducer"));
41  emulTrackProducer = consumes<L1CSCTrackCollection>(pset.getParameter<InputTag>("emulTrackProducer"));
42  dataStubProducer = consumes<CSCTriggerContainer<csctf::TrackStub> >(pset.getParameter<InputTag>("dataStubProducer"));
43  emulStubProducer = consumes<L1MuDTChambPhContainer>(pset.getParameter<InputTag>("emulStubProducer"));
44 
45  m_dirName = pset.getUntrackedParameter("DQMFolder", string("L1TEMU/CSCTFexpert"));
46 
47  ptLUTset = pset.getParameter<ParameterSet>("PTLUT");
48 
49  outFile = pset.getUntrackedParameter<string>("outFile", "");
50  if( !outFile.empty() )
51  {
52  LogWarning("L1TdeCSCTF")
53  << "L1T Monitoring histograms will be saved to "
54  << outFile.c_str()
55  << endl;
56  }
57 
58  bool disable = pset. getUntrackedParameter<bool>("disableROOToutput", false);
59  if(disable){
60  outFile="";
61  }
62 
63  /*bzero(srLUTs_, sizeof(srLUTs_));
64  //int endcap =1, sector =1;
65  bool TMB07=true;
66  ParameterSet srLUTset;
67  srLUTset.addUntrackedParameter<bool>("ReadLUTs", false);
68  srLUTset.addUntrackedParameter<bool>("Binary", false);
69  srLUTset.addUntrackedParameter<string>("LUTPath", "./");
70  for(int endcapItr = CSCDetId::minEndcapId(); endcapItr <= CSCDetId::maxEndcapId(); endcapItr++)
71  {
72  for(int sectorItr = CSCTriggerNumbering::minTriggerSectorId();sectorItr <= CSCTriggerNumbering::maxTriggerSectorId();sectorItr++)
73  {
74  for(int stationItr = 1; stationItr <= 4; stationItr++)
75  {
76  if(stationItr == 1)
77  {
78  for(int subsectorItr = 0; subsectorItr < 2; subsectorItr++)
79  {
80  srLUTs_[endcapItr-1][sectorItr-1][subsectorItr] = new CSCSectorReceiverLUT(endcapItr, sectorItr, subsectorItr+1, stationItr, srLUTset, TMB07);
81  }
82  } else {
83  srLUTs_[endcapItr-1][sectorItr-1][stationItr] = new CSCSectorReceiverLUT(endcapItr, sectorItr, 0, stationItr, srLUTset, TMB07);
84  } //if for station 1 or 234
85  } // stationItr loop
86  } // sectorItr loop
87  } // endcapItr loop
88  */
89  my_dtrc =std::make_unique<CSCTFDTReceiver>();
90 }
bool empty() const
Definition: ParameterSet.h:217
std::unique_ptr< CSCTFDTReceiver > my_dtrc
Definition: L1TdeCSCTF.h:50
edm::EDGetTokenT< L1CSCTrackCollection > emulTrackProducer
Definition: L1TdeCSCTF.h:45
edm::EDGetTokenT< L1CSCTrackCollection > dataTrackProducer
Definition: L1TdeCSCTF.h:44
edm::EDGetTokenT< L1MuDTChambPhContainer > emulStubProducer
Definition: L1TdeCSCTF.h:47
std::string outFile
Definition: L1TdeCSCTF.h:65
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dataStubProducer
Definition: L1TdeCSCTF.h:46
edm::ParameterSet ptLUTset
Definition: L1TdeCSCTF.h:49
std::string m_dirName
Definition: L1TdeCSCTF.h:64
L1TdeCSCTF::~L1TdeCSCTF ( )
inlineoverride

Definition at line 75 of file L1TdeCSCTF.h.

75 {}

Member Function Documentation

void L1TdeCSCTF::analyze ( edm::Event const &  e,
edm::EventSetup const &  iSetup 
)
overrideprotected

Definition at line 256 of file L1TdeCSCTF.cc.

References funct::abs(), CSCTriggerContainer< T >::get(), edm::Event::getByToken(), edm::HandleBase::isValid(), taus_updatedMVAIds_cff::mapping, metsig::muon, edm::Handle< T >::product(), CSCTriggerContainer< T >::push_many(), and l1t::tracks.

256  {
257  // Initialize Arrays
259  unsigned int nDataMuons = 0;
260  unsigned int nEmulMuons = 0;
261  int dataMuonArray[8][10], emuMuonArray[8][10];
262  for(int muon=0; muon<8; muon++)
263  {
264  for(int par=0; par<3; par++)
265  {
266  dataMuonArray[muon][par]=0;
267  emuMuonArray[muon][par] =0;
268  }
269  emuMuonArray[muon][3] =-1;
270  dataMuonArray[muon][3]=-1;
271 
272  emuMuonArray[muon][4]=7;
273  dataMuonArray[muon][4]=7;
274 
275  for(int par2=5; par2<10; par2++)
276  {
277  emuMuonArray[muon][par2]= -1;
278  dataMuonArray[muon][par2]= -1;
279  }
280  }
281  // Get Hardware information, and check output of PtLUT
284  {
286  e.getByToken(dataTrackProducer,tracks);
287 
288  // check validity of input collection
289  if(!tracks.isValid()) {
290  LogWarning("L1TdeCSCTF")
291  << "\n No valid [data tracks] product found: "
292  << " L1CSCTrackCollection"
293  << endl;
294  return;
295  }
296 
297 
298  for(L1CSCTrackCollection::const_iterator trk=tracks.product()->begin(); trk!=tracks.product()->end(); trk++)
299  {
300  if (nDataMuons>=8)
301  break;
302  if ( (trk->first.BX() <2) && (trk->first.BX() > -1) )
303  {
304  //int mOdE = (trk->first.ptLUTAddress()>>16)&0xf;
305  //cout << "D->Mode: " << mOdE << ", Rank " << trk->first.rank() << endl;
306  dataMuonArray[nDataMuons][0] = trk->first.ptLUTAddress();
307  dataMuonArray[nDataMuons][1] = trk->first.sector();
308  dataMuonArray[nDataMuons][2] = trk->first.endcap();
309  dataMuonArray[nDataMuons][8] = trk->first.outputLink();
310  dataMuonArray[nDataMuons][4] = trk->first.BX();
311  dataMuonArray[nDataMuons][5] = trk->first.rank();
312  dataMuonArray[nDataMuons][6] = trk->first.localPhi();
313  dataMuonArray[nDataMuons][7] = trk->first.eta_packed();
314  dataMuonArray[nDataMuons][9] = trk->first.modeExtended();
315  nDataMuons++;
316  }
317  }
318  }
319  // Get Emulator information
322  {
324  e.getByToken(emulTrackProducer,tracks);
325 
326  // check validity of input collection
327  if(!tracks.isValid()) {
328  LogWarning("L1TdeCSCTF")
329  << "\n No valid [emulator tracks] product found: "
330  << " L1CSCTrackCollection"
331  << endl;
332  return;
333  }
334 
335  for(L1CSCTrackCollection::const_iterator trk=tracks.product()->begin(); trk!=tracks.product()->end(); trk++)
336  {
337  if(nEmulMuons>=8)
338  break;
339  if((trk->first.BX() <2) && (trk->first.BX() >-1))
340  {
341  //int mOdE = (trk->first.ptLUTAddress()>>16)&0xf;
342  //cout << "E->Mode: " << mOdE << ", Rank " << trk->first.rank() << endl;
343  emuMuonArray[nEmulMuons][0] = trk->first.ptLUTAddress();
344  emuMuonArray[nEmulMuons][1] = trk->first.sector();
345  emuMuonArray[nEmulMuons][2] = trk->first.endcap();
346  emuMuonArray[nEmulMuons][4] = trk->first.BX();
347  emuMuonArray[nEmulMuons][5] = trk->first.rank();
348  emuMuonArray[nEmulMuons][6] = trk->first.localPhi();
349  emuMuonArray[nEmulMuons][7] = trk->first.eta_packed();
350  emuMuonArray[nEmulMuons][9] = trk->first.modeExtended();
351  nEmulMuons++;
352  }
353  }
354  }
355  //Fill Occupancy M.E.
356  if( (nDataMuons!=0)||(nEmulMuons!=0) ) {
357  occComp->Fill(nDataMuons,nEmulMuons);
358  (nDataMuons==nEmulMuons) ? occComp_1d->Fill(0) : occComp_1d->Fill(1);
359  }
360  // Match Tracks by sector & mode in the case of multiple tracks
362  if(nDataMuons==nEmulMuons)
363  {
364  //First, find EXACT address matches in a given sector, endcap
365  for(unsigned int mu1=0; mu1<nDataMuons; mu1++)
366  {
367  for(unsigned int mu2=0; mu2<nEmulMuons; mu2++)
368  if((emuMuonArray[mu2][1]==dataMuonArray[mu1][1])&&(emuMuonArray[mu2][2]==dataMuonArray[mu1][2]))
369  {
370  if(emuMuonArray[mu2][0]==dataMuonArray[mu1][0])
371  {
372  emuMuonArray[mu2][3]=mu1;
373  dataMuonArray[mu1][3]=1;
374  }
375  }
376  }
377  //Next, try to match unmapped
378  for(unsigned int c2a=0; c2a<nEmulMuons; c2a++)
379  {
380  if(emuMuonArray[c2a][3]==-1)
381  {
382  for(unsigned int cor_a=0; cor_a<nDataMuons; cor_a++)
383  {
384  if( (dataMuonArray[cor_a][1]==emuMuonArray[c2a][1]) && (dataMuonArray[cor_a][2]==emuMuonArray[c2a][2]))// && (dataMuonArray[cor_a][3]==-1))
385  {
386  emuMuonArray[c2a][3]=cor_a;
387  dataMuonArray[cor_a][3]=1;
388  }
389  }
390  }
391  }
392  //Check that a single emulator track is not mapped to multiple data tracks
393  bool multiMap = false;
394  if(nEmulMuons>1)
395  {
396  for(unsigned int c1a=0; c1a<(nEmulMuons-1); c1a++)
397  {
398  for(unsigned int c1b=(c1a+1); c1b<nEmulMuons; c1b++)
399  {
400  if(emuMuonArray[c1a][3]==emuMuonArray[c1b][3])
401  {
402  //cout << "Error: Multiple Emulator Muons Mapped to the same Data Muon." << endl;
403  multiMap = true;
404  break;
405  }
406  }
407  if (multiMap)
408  break;
409  }
410  }
411  //Fill histograms based on matched Tracks
412  for(unsigned int mu3=0; mu3<nEmulMuons; mu3++)
413  {
414  int mapping = emuMuonArray[mu3][3];
415  if((mapping!=-1)&&(multiMap==false))
416  {
417  //Decode LUT Address for more meaningful comparison
418  int emuPhi12 = (0x0000ff & emuMuonArray[mu3][0]);
419  int datPhi12 = (0x0000ff & dataMuonArray[mapping][0]);
420  int emuPhi23 = (0x000f00 & emuMuonArray[mu3][0])>>8;
421  int datPhi23 = (0x000f00 & dataMuonArray[mapping][0])>>8;
422  int emuEta = (0x00f000 & emuMuonArray[mu3][0])>>12;
423  int datEta = (0x00f000 & dataMuonArray[mapping][0])>>12;
424  //int emuMode = (0x0f0000 & emuMuonArray[mu3][0])>>16;
425  //int datMode = (0x0f0000 & dataMuonArray[mapping][0])>>16;
426  int emuFrSin = (0xf00000 & emuMuonArray[mu3][0])>>20;
427  int datFrSin = (0xf00000 & dataMuonArray[mapping][0])>>20;
428  //Decode Rank for more meaningful comparison
429  int emuQual = emuMuonArray[mu3][5]>>5;
430  int datQual = dataMuonArray[mapping][5]>>5;
431  int emuPt = 0x1f & emuMuonArray[mu3][5];
432  int datPt = 0x1f & dataMuonArray[mapping][5];
433  int emuModeExtended = emuMuonArray[mu3][9];
434  int datModeExtended = dataMuonArray[mapping][9];
435 
436  //Fill mode M.E., one of (the most important) PtLUT address field
437  pt4Comp->Fill(datModeExtended,emuModeExtended);
438  (datModeExtended==emuModeExtended) ? pt4Comp_1d->Fill(0) : pt4Comp_1d->Fill(1);
439  //To disentagle problems, only fill histograms if mode matches
440  if(emuModeExtended==datModeExtended)
441  {
442  //Fill Pt LUT address field M.E.
443  pt1Comp->Fill(datPhi12,emuPhi12); (datPhi12==emuPhi12) ? pt1Comp_1d->Fill(0) : pt1Comp_1d->Fill(1);
444  pt2Comp->Fill(datPhi23,emuPhi23); (datPhi23==emuPhi23) ? pt2Comp_1d->Fill(0) : pt2Comp_1d->Fill(1);
445  pt3Comp->Fill(datEta,emuEta); (datEta==emuEta) ? pt3Comp_1d->Fill(0) : pt3Comp_1d->Fill(1);
446  pt5Comp->Fill(datFrSin,emuFrSin); (datFrSin==emuFrSin) ? pt5Comp_1d->Fill(0) : pt5Comp_1d->Fill(1);
447  //Fill Track value M.E.
448  if(dataMuonArray[mapping][8]==1) //Rank Comparison available for Link 1 only due to readout limitation
449  {
450  ptComp->Fill(datPt,emuPt); (datPt==emuPt) ? ptComp_1d->Fill(0) : ptComp_1d->Fill(1);
451  qualComp->Fill(datQual,emuQual);(datQual==emuQual) ? qualComp_1d->Fill(0) : qualComp_1d->Fill(1);
452  }
453  phiComp->Fill(dataMuonArray[mapping][6],emuMuonArray[mu3][6]);
454  etaComp->Fill(dataMuonArray[mapping][7],emuMuonArray[mu3][7]);
455 
456  (dataMuonArray[mapping][6]==emuMuonArray[mu3][6]) ? phiComp_1d->Fill(0) : phiComp_1d->Fill(1);
457  (dataMuonArray[mapping][7]==emuMuonArray[mu3][7]) ? etaComp_1d->Fill(0) : etaComp_1d->Fill(1);
458  }
459  }
460  }
461  }
462 
463  //Compare DT stubs to check transmission quality
465  //Declare arrays, initialize
466  int eDtStub[7][15];
467  int dDtStub[8][15];
468  int eDtCounter = 0;
469  int dDtCounter = 0;
470  for(int dJ=0; dJ<7; dJ++)
471  {
472  for(int dK=0; dK<15; dK++)
473  {
474  eDtStub[dJ][dK] = -55;
475  dDtStub[dJ][dK] = -55;
476  dDtStub[7][dK] = -55;
477  }
478  }
479 
480  // Get Daq Recorded Stub Information
482  {
484  e.getByToken(dataStubProducer,dtTrig);
485  // check validity of input collection
486  if(!dtTrig.isValid()) {
487  LogWarning("L1TdeCSCTF")
488  << "\n No valid [Data Stubs] product found: "
489  << " L1CSCTrackCollection"
490  << endl;
491  return;
492  }
493  const CSCTriggerContainer<csctf::TrackStub>* dt_stubs = dtTrig.product();
495  stub_list.push_many(*dt_stubs);
496  vector<csctf::TrackStub> stuList = stub_list.get();
497  vector<csctf::TrackStub>::const_iterator stu= stuList.begin();
498  for(; stu!=stuList.end(); stu++)
499  {
500  if(dDtCounter>=15)
501  break;
502  if((stu->BX()>4) && (stu->BX()<9))
503  {
504  dDtStub[0][dDtCounter] = stu->phiPacked();
505  dDtStub[1][dDtCounter] = stu->getQuality();
506  dDtStub[2][dDtCounter] = stu->endcap();
507  dDtStub[3][dDtCounter] = stu->sector();
508  dDtStub[4][dDtCounter] = stu->subsector();
509  dDtCounter++;
510  }
511  }
512  }
513 
514  // Get Daq Recorded Stub Information
516  {
517  // Get Emulated Stub Information
519  e.getByToken(emulStubProducer,pCon);
520  // check validity of input collection
521  if(!pCon.isValid()) {
522  LogWarning("L1TdeCSCTF")
523  << "\n No valid [Data Stubs] product found: "
524  << " L1CSCTrackCollection"
525  << endl;
526  return;
527  }
528  CSCTriggerContainer<csctf::TrackStub> emulStub = my_dtrc->process(pCon.product());
529  vector<csctf::TrackStub> emuList = emulStub.get();
530  vector<csctf::TrackStub>::const_iterator eStu=emuList.begin();
531  for(; eStu!=emuList.end(); eStu++)
532  {
533  if (eDtCounter>=15)
534  break;
535  if((eStu->BX()>4) && (eStu->BX()<9) )
536  {
537  eDtStub[0][eDtCounter] = eStu->phiPacked();
538  eDtStub[1][eDtCounter] = eStu->getQuality();
539  eDtStub[2][eDtCounter] = eStu->endcap();
540  eDtStub[3][eDtCounter] = eStu->sector();
541  eDtStub[4][eDtCounter] = eStu->subsector();
542  eDtCounter++;
543  }
544  }
545  }
546 
547  //cout << "Num Tracks match eDtCounter: " << eDtCounter << ", dDt: " << dDtCounter << endl;
548  //First find perfect matches
549  for(int eS=0; eS<eDtCounter; eS++)
550  {
551  //cout << "es Loop" << endl;
552  for(int dS=0; dS<dDtCounter; dS++)
553  {
554  //cout << "ds Loop" << endl;
555  if(eDtStub[2][eS]==dDtStub[2][dS])
556  {
557  //cout << "end match" << endl;
558  if(eDtStub[3][eS]==dDtStub[3][dS])
559  {
560  //cout << "sec match" << endl;
561  if(eDtStub[4][eS]==dDtStub[4][dS])
562  {
563  //cout << "First match loop, eS: " << eS << ", dS" << dS << endl;
564  if( (eDtStub[0][eS]==dDtStub[0][dS]) && (eDtStub[1][eS]==dDtStub[1][dS]) && (eDtStub[6][eS]!=1) && (dDtStub[6][dS]!=1) )
565  {
566  //cout << "Passed fist matching." << endl;
567  eDtStub[5][eS] = dS;
568  eDtStub[6][eS] = 1;
569  dDtStub[5][dS] = eS;
570  dDtStub[6][dS] = 1;
571  }
572  }
573  }
574  }
575  }
576  }
577 
578  //Now find imperfect matches
579  for(int eS2=0; eS2<eDtCounter; eS2++)
580  {
581  for(int dS2=0; dS2<dDtCounter; dS2++)
582  {
583  //cout << "1: " << eDtStub[2][eS2] << ", " << dDtStub[2][dS2] << ", " << eDtStub[3][eS2] << ", " << dDtStub[3][dS2] << ", " << eDtStub[4][eS2] << ", " << dDtStub[4][dS2] << endl;
584  if( (eDtStub[2][eS2]==dDtStub[2][dS2]) && (eDtStub[3][eS2]==dDtStub[3][dS2]) && (eDtStub[4][eS2]==dDtStub[4][dS2]) )
585  {
586  //cout << "2: " << dDtStub[7][eS2] << ", " << dDtStub[7][dS2] << ", " << abs(eDtStub[0][eS2]-dDtStub[0][dS2]) << ", " << ", " << eDtStub[6][eS2] << ", " << dDtStub[6][dS2] << endl;
587  if( ((dDtStub[7][eS2]==-55) || (dDtStub[7][dS2]>(abs(eDtStub[0][eS2]-dDtStub[0][dS2]))) ) && (eDtStub[6][eS2]!=1) && (dDtStub[6][dS2]!=1) )
588  {
589  //cout << "Imperfect match found" << endl;
590  dDtStub[5][dS2] = eS2;
591  dDtStub[6][dS2] = 2;
592  eDtStub[5][eS2] = dS2;
593  eDtStub[6][eS2] = 2;
594  dDtStub[7][dS2] = abs(eDtStub[0][eS2]-dDtStub[0][dS2]);
595  }
596  }
597  }
598  }
599 
600  //Debug time!
601  bool dtSMulti = false;
602  int dtUnmap = 0;
603  if(eDtCounter>1)
604  for(int eS3a=0; eS3a<eDtCounter-1; eS3a++)
605  for(int eS3b=eS3a+1; eS3b<eDtCounter; eS3b++)
606  {
607  if( eDtStub[5][eS3a]==eDtStub[5][eS3b] ) dtSMulti=true;
608  if( eDtStub[5][eS3a]==-55 || eDtStub[5][eS3b]==-55 ) dtUnmap++;
609  }
610 
611  if(dDtCounter>1)
612  for(int dS3a=0; dS3a<dDtCounter-1; dS3a++)
613  for(int dS3b=dS3a+1; dS3b<dDtCounter; dS3b++)
614  {
615  if( dDtStub[5][dS3a]==dDtStub[5][dS3b] ) dtSMulti=true;
616  if( dDtStub[5][dS3a]==-55||dDtStub[5][dS3b]==-55 ) dtUnmap++;
617  }
618  /*if(dtSMulti==true)
619  cout << "Multiple DT stubs mapped to the same stub" << endl;
620  if(dtUnmap!=0)
621  cout << "Unmapped DT stubs:" << dtUnmap << endl;*/
622 
623  if(dtSMulti==false && dtUnmap==0)
624  {
625  for(int phil=0; phil<eDtCounter; phil++)
626  {
627  if(eDtStub[6][phil]==1 || eDtStub[6][phil]==2)
628  {
629  int indexFil = eDtStub[3][phil]*2+eDtStub[4][phil]-1;
630  dtStubPhi->Fill(eDtStub[0][phil], dDtStub[0][ eDtStub[5][phil] ]);
631  (eDtStub[0][phil] == dDtStub[0][ eDtStub[5][phil] ]) ? dtStubPhi_1d->Fill(0) : dtStubPhi_1d->Fill(1);
632  if( eDtStub[0][phil] != dDtStub[0][ eDtStub[5][phil] ])
633  badDtStubSector->Fill(indexFil,eDtStub[2][phil]);
634  }
635  }
636  }
637 }
MonitorElement * ptComp
Definition: L1TdeCSCTF.h:54
MonitorElement * etaComp_1d
Definition: L1TdeCSCTF.h:58
MonitorElement * qualComp
Definition: L1TdeCSCTF.h:54
std::vector< T > get() const
std::unique_ptr< CSCTFDTReceiver > my_dtrc
Definition: L1TdeCSCTF.h:50
edm::EDGetTokenT< L1CSCTrackCollection > emulTrackProducer
Definition: L1TdeCSCTF.h:45
edm::EDGetTokenT< L1CSCTrackCollection > dataTrackProducer
Definition: L1TdeCSCTF.h:44
MonitorElement * qualComp_1d
Definition: L1TdeCSCTF.h:58
MonitorElement * dtStubPhi
Definition: L1TdeCSCTF.h:56
MonitorElement * pt5Comp
Definition: L1TdeCSCTF.h:55
MonitorElement * phiComp_1d
Definition: L1TdeCSCTF.h:58
void Fill(long long x)
edm::EDGetTokenT< L1MuDTChambPhContainer > emulStubProducer
Definition: L1TdeCSCTF.h:47
MonitorElement * ptComp_1d
Definition: L1TdeCSCTF.h:58
MonitorElement * pt2Comp
Definition: L1TdeCSCTF.h:55
MonitorElement * pt4Comp
Definition: L1TdeCSCTF.h:55
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * phiComp
Definition: L1TdeCSCTF.h:54
bool isValid() const
Definition: HandleBase.h:74
void push_many(const std::vector< T > &data)
MonitorElement * pt1Comp_1d
Definition: L1TdeCSCTF.h:59
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dataStubProducer
Definition: L1TdeCSCTF.h:46
MonitorElement * occComp_1d
Definition: L1TdeCSCTF.h:58
MonitorElement * dtStubPhi_1d
Definition: L1TdeCSCTF.h:60
T const * product() const
Definition: Handle.h:81
MonitorElement * occComp
Definition: L1TdeCSCTF.h:54
MonitorElement * pt5Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * badDtStubSector
Definition: L1TdeCSCTF.h:56
MonitorElement * pt4Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * pt2Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * pt1Comp
Definition: L1TdeCSCTF.h:55
bool isUninitialized() const
Definition: EDGetToken.h:73
MonitorElement * pt3Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * etaComp
Definition: L1TdeCSCTF.h:54
MonitorElement * pt3Comp
Definition: L1TdeCSCTF.h:55
void L1TdeCSCTF::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 95 of file L1TdeCSCTF.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), MonitorElement::setAxisTitle(), and DQMStore::IBooker::setCurrentFolder().

96 {
97  //Histograms booking
98 
100  // DQM Directory Structure //
102 
103  ibooker.setCurrentFolder(m_dirName);
104 
106  // Define Monitor Elements //
108  //Monitor Elements for Pt Lut Address Field
109  pt1Comp = ibooker.book2D("pt1Comp","Hardware Vs. Emulator #Delta #phi_{12}",256,0,256,256,0,256);
110  pt1Comp->setAxisTitle("Hardware #Delta #phi_{12}",1);
111  pt1Comp->setAxisTitle("Emulator #Delta #phi_{12}",2);
112  pt2Comp = ibooker.book2D("pt2Comp","Hardware Vs. Emulator #Delta #phi_{23}",16,0,16,16,0,16);
113  pt2Comp->setAxisTitle("Hardware #Delta #phi_{23}",1);
114  pt2Comp->setAxisTitle("Emulator #Delta #phi_{23}",2);
115  pt3Comp = ibooker.book2D("pt3Comp","Hardware Vs. Emulator #eta",16,0,16,16,0,16);
116  pt3Comp->setAxisTitle("Hardware #eta",1);
117  pt3Comp->setAxisTitle("Emulator #eta",2);
118  pt4Comp = ibooker.book2D("pt4Comp","Hardware Vs. Emulator Mode",19,0,19,19,0,19);
119  pt4Comp->setAxisTitle("Hardware Mode",1);
120  pt4Comp->setAxisTitle("Emulator Mode",2);
121  //Hardware Bin Titles
122  pt4Comp->setBinLabel(1,"No Track",1);
123  pt4Comp->setBinLabel(2,"Bad Phi/Single",1);
124  pt4Comp->setBinLabel(3,"ME1-2-3",1);
125  pt4Comp->setBinLabel(4,"ME1-2-4",1);
126  pt4Comp->setBinLabel(5,"ME1-3-4",1);
127  pt4Comp->setBinLabel(6,"ME2-3-4",1);
128  pt4Comp->setBinLabel(7,"ME1-2",1);
129  pt4Comp->setBinLabel(8,"ME1-3",1);
130  pt4Comp->setBinLabel(9,"ME2-3",1);
131  pt4Comp->setBinLabel(10,"ME2-4",1);
132  pt4Comp->setBinLabel(11,"ME3-4",1);
133  pt4Comp->setBinLabel(12,"MB1-ME3",1);
134  pt4Comp->setBinLabel(13,"MB1-ME2",1);
135  pt4Comp->setBinLabel(14,"ME1-4",1);
136  pt4Comp->setBinLabel(15,"MB1-ME1",1);
137  pt4Comp->setBinLabel(16,"Halo Trigger",1);
138  pt4Comp->setBinLabel(17,"MB1-ME1-2",1);
139  pt4Comp->setBinLabel(18,"MB1-ME1-3",1);
140  pt4Comp->setBinLabel(19,"MB1-ME2-3",1);
141  //Emu Bin Titles
142  pt4Comp->setBinLabel(1,"No Track",2);
143  pt4Comp->setBinLabel(2,"Bad Phi/Single",2);
144  pt4Comp->setBinLabel(3,"ME1-2-3",2);
145  pt4Comp->setBinLabel(4,"ME1-2-4",2);
146  pt4Comp->setBinLabel(5,"ME1-3-4",2);
147  pt4Comp->setBinLabel(6,"ME2-3-4",2);
148  pt4Comp->setBinLabel(7,"ME1-2",2);
149  pt4Comp->setBinLabel(8,"ME1-3",2);
150  pt4Comp->setBinLabel(9,"ME2-3",2);
151  pt4Comp->setBinLabel(10,"ME2-4",2);
152  pt4Comp->setBinLabel(11,"ME3-4",2);
153  pt4Comp->setBinLabel(12,"MB1-ME3",2);
154  pt4Comp->setBinLabel(13,"MB1-ME2",2);
155  pt4Comp->setBinLabel(14,"ME1-4",2);
156  pt4Comp->setBinLabel(15,"MB1-ME1",2);
157  pt4Comp->setBinLabel(16,"Halo Trigger",2);
158  pt4Comp->setBinLabel(17,"MB1-ME1-2",2);
159  pt4Comp->setBinLabel(18,"MB1-ME1-3",2);
160  pt4Comp->setBinLabel(19,"MB1-ME2-3",2);
161 
162  pt5Comp = ibooker.book2D("pt5Comp","Hardware Vs. Emulator Sign, FR",4,0,4,4,0,4);
163  pt5Comp->setAxisTitle("Hardware Sign<<1|FR",1);
164  pt5Comp->setAxisTitle("Emulator Sign<<1|FR",2);
165 
166  //Monitor Elements for track variables
167  phiComp = ibooker.book2D("phiComp","Hardware Vs. Emulator Track #phi",32,0,32,32,0,32);
168  phiComp->setAxisTitle("Hardware #phi",1);
169  phiComp->setAxisTitle("Emulator #phi",2);
170  etaComp = ibooker.book2D("etaComp","Hardware Vs. Emulator Track #eta",32,0,32,32,0,32);
171  etaComp->setAxisTitle("Hardware #eta",1);
172  etaComp->setAxisTitle("Emulator #eta",2);
173  occComp = ibooker.book2D("occComp","Hardware Vs. Emulator Track Occupancy",5,0,5,5,0,5);
174  occComp->setAxisTitle("Hardware Occupancy",1);
175  occComp->setAxisTitle("Emulator Occupancy",2);
176  ptComp = ibooker.book2D("ptComp","Hardware Vs. Emulator Pt",32,0,32,32,0,32);
177  ptComp->setAxisTitle("Hardware P_{t}",1);
178  ptComp->setAxisTitle("Emulator P_{t}",2);
179  qualComp= ibooker.book2D("qualComp","Hardware Vs. Emulator Quality",4,0,4,4,0,4);
180  qualComp->setAxisTitle("Hardware Quality",1);
181  qualComp->setAxisTitle("Emulator Quality",2);
182 
183 
184  //Monitor Elemens for Dt Stubs
185  dtStubPhi = ibooker.book2D("dtStubPhi","Hardware Vs. Emulator DT Stub #phi",200,400,2400,200,400,2400);
186  dtStubPhi->setAxisTitle("Hardware Stub #phi",1);
187  dtStubPhi->setAxisTitle("Emulator Stub #phi",2);
188  badDtStubSector = ibooker.book2D("badDtStubSector","Dt Sector for bad Dt stub #phi",6,1,7,2,1,3);
189  badDtStubSector->setAxisTitle("Dt stub sector, subsector",1);
190  badDtStubSector->setAxisTitle("Dt Stub Endcap",2);
191 
192  //***********************************//
193  //* F O R Q U A L I T Y T E S T *//
194  //***********************************//
195  //1D plots for the quality test
196  //Monitor Elements for Pt Lut Address Field
197  pt1Comp_1d = ibooker.book1D("pt1Comp_1d","Hardware Vs. Emulator #Delta #phi_{12}",2,0,2);
198  pt1Comp_1d->setAxisTitle("#Delta #phi_{12}",1);
199  pt1Comp_1d->setBinLabel(1, "Agree", 1);
200  pt1Comp_1d->setBinLabel(2, "Disagree", 1);
201 
202  pt2Comp_1d = ibooker.book1D("pt2Comp_1d","Hardware Vs. Emulator #Delta #phi_{23}",2,0,2);
203  pt2Comp_1d->setAxisTitle("#Delta #phi_{23}",1);
204  pt2Comp_1d->setBinLabel(1, "Agree", 1);
205  pt2Comp_1d->setBinLabel(2, "Disagree", 1);
206 
207  pt3Comp_1d = ibooker.book1D("pt3Comp_1d","Hardware Vs. Emulator #eta",2,0,2);
208  pt3Comp_1d->setAxisTitle("#eta",1);
209  pt3Comp_1d->setBinLabel(1, "Agree", 1);
210  pt3Comp_1d->setBinLabel(2, "Disagree", 1);
211 
212  pt4Comp_1d = ibooker.book1D("pt4Comp_1d","Hardware Vs. Emulator Mode",2,0,2);
213  pt4Comp_1d->setAxisTitle("Mode",1);
214  pt4Comp_1d->setBinLabel(1, "Agree", 1);
215  pt4Comp_1d->setBinLabel(2, "Disagree", 1);
216 
217  pt5Comp_1d = ibooker.book1D("pt5Comp_1d","Hardware Vs. Emulator Sign, FR",2,0,2);
218  pt5Comp_1d->setAxisTitle("Sign<<1|FR",1);
219  pt5Comp_1d->setBinLabel(1, "Agree", 1);
220  pt5Comp_1d->setBinLabel(2, "Disagree", 1);
221 
222 
223  //Monitor Elements for track variables
224  phiComp_1d = ibooker.book1D("phiComp_1d","Hardware Vs. Emulator Track #phi",2,0,2);
225  phiComp_1d->setAxisTitle("#phi",1);
226  phiComp_1d->setBinLabel(1, "Agree", 1);
227  phiComp_1d->setBinLabel(2, "Disagree", 1);
228 
229  etaComp_1d = ibooker.book1D("etaComp_1d","Hardware Vs. Emulator Track #eta",2,0,2);
230  etaComp_1d->setAxisTitle("#eta",1);
231  etaComp_1d->setBinLabel(1, "Agree", 1);
232  etaComp_1d->setBinLabel(2, "Disagree", 1);
233 
234  occComp_1d = ibooker.book1D("occComp_1d","Hardware Vs. Emulator Track Occupancy",2,0,2);
235  occComp_1d->setAxisTitle("Occupancy",1);
236  occComp_1d->setBinLabel(1, "Agree", 1);
237  occComp_1d->setBinLabel(2, "Disagree", 1);
238 
239  ptComp_1d = ibooker.book1D("ptComp_1d","Hardware Vs. Emulator Pt",2,0,2);
240  ptComp_1d->setAxisTitle("P_{t}",1);
241  ptComp_1d->setBinLabel(1, "Agree", 1);
242  ptComp_1d->setBinLabel(2, "Disagree", 1);
243 
244  qualComp_1d= ibooker.book1D("qualComp_1d","Hardware Vs. Emulator Quality",2,0,2);
245  qualComp_1d->setAxisTitle("Quality",1);
246  qualComp_1d->setBinLabel(1, "Agree", 1);
247  qualComp_1d->setBinLabel(2, "Disagree", 1);
248 
249  //Monitor Elemens for Dt Stubs
250  dtStubPhi_1d = ibooker.book1D("dtStubPhi_1d","Hardware Vs. Emulator DT Stub #phi",2,0,2);
251  dtStubPhi_1d->setAxisTitle("DT Stub #phi",1);
252  dtStubPhi_1d->setBinLabel(1, "Agree", 1);
253  dtStubPhi_1d->setBinLabel(2, "Disagree", 1);
254 }
MonitorElement * ptComp
Definition: L1TdeCSCTF.h:54
MonitorElement * etaComp_1d
Definition: L1TdeCSCTF.h:58
MonitorElement * qualComp
Definition: L1TdeCSCTF.h:54
MonitorElement * qualComp_1d
Definition: L1TdeCSCTF.h:58
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 * dtStubPhi
Definition: L1TdeCSCTF.h:56
MonitorElement * pt5Comp
Definition: L1TdeCSCTF.h:55
MonitorElement * phiComp_1d
Definition: L1TdeCSCTF.h:58
MonitorElement * ptComp_1d
Definition: L1TdeCSCTF.h:58
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * pt2Comp
Definition: L1TdeCSCTF.h:55
MonitorElement * pt4Comp
Definition: L1TdeCSCTF.h:55
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * phiComp
Definition: L1TdeCSCTF.h:54
MonitorElement * pt1Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * occComp_1d
Definition: L1TdeCSCTF.h:58
MonitorElement * dtStubPhi_1d
Definition: L1TdeCSCTF.h:60
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * occComp
Definition: L1TdeCSCTF.h:54
MonitorElement * pt5Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * badDtStubSector
Definition: L1TdeCSCTF.h:56
MonitorElement * pt4Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * pt2Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * pt1Comp
Definition: L1TdeCSCTF.h:55
MonitorElement * pt3Comp_1d
Definition: L1TdeCSCTF.h:59
MonitorElement * etaComp
Definition: L1TdeCSCTF.h:54
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * pt3Comp
Definition: L1TdeCSCTF.h:55
std::string m_dirName
Definition: L1TdeCSCTF.h:64
void L1TdeCSCTF::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotected

Definition at line 91 of file L1TdeCSCTF.cc.

91  {
92 }

Member Data Documentation

MonitorElement * L1TdeCSCTF::badDtStubSector
private

Definition at line 56 of file L1TdeCSCTF.h.

edm::EDGetTokenT<CSCTriggerContainer<csctf::TrackStub> > L1TdeCSCTF::dataStubProducer
private

Definition at line 46 of file L1TdeCSCTF.h.

edm::EDGetTokenT<L1CSCTrackCollection> L1TdeCSCTF::dataTrackProducer
private

Definition at line 44 of file L1TdeCSCTF.h.

MonitorElement* L1TdeCSCTF::dtStubPhi
private

Definition at line 56 of file L1TdeCSCTF.h.

MonitorElement* L1TdeCSCTF::dtStubPhi_1d
private

Definition at line 60 of file L1TdeCSCTF.h.

edm::EDGetTokenT<L1MuDTChambPhContainer> L1TdeCSCTF::emulStubProducer
private

Definition at line 47 of file L1TdeCSCTF.h.

edm::EDGetTokenT<L1CSCTrackCollection> L1TdeCSCTF::emulTrackProducer
private

Definition at line 45 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::etaComp
private

Definition at line 54 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::etaComp_1d
private

Definition at line 58 of file L1TdeCSCTF.h.

std::string L1TdeCSCTF::m_dirName
private

Definition at line 64 of file L1TdeCSCTF.h.

std::unique_ptr<CSCTFDTReceiver> L1TdeCSCTF::my_dtrc
private

Definition at line 50 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::occComp
private

Definition at line 54 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::occComp_1d
private

Definition at line 58 of file L1TdeCSCTF.h.

std::string L1TdeCSCTF::outFile
private

Definition at line 65 of file L1TdeCSCTF.h.

MonitorElement* L1TdeCSCTF::phiComp
private

Definition at line 54 of file L1TdeCSCTF.h.

MonitorElement* L1TdeCSCTF::phiComp_1d
private

Definition at line 58 of file L1TdeCSCTF.h.

MonitorElement* L1TdeCSCTF::pt1Comp
private

Definition at line 55 of file L1TdeCSCTF.h.

MonitorElement* L1TdeCSCTF::pt1Comp_1d
private

Definition at line 59 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt2Comp
private

Definition at line 55 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt2Comp_1d
private

Definition at line 59 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt3Comp
private

Definition at line 55 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt3Comp_1d
private

Definition at line 59 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt4Comp
private

Definition at line 55 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt4Comp_1d
private

Definition at line 59 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt5Comp
private

Definition at line 55 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt5Comp_1d
private

Definition at line 59 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt6Comp
private

Definition at line 55 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::pt6Comp_1d
private

Definition at line 59 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::ptComp
private

Definition at line 54 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::ptComp_1d
private

Definition at line 58 of file L1TdeCSCTF.h.

edm::ParameterSet L1TdeCSCTF::ptLUTset
private

Definition at line 49 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::qualComp
private

Definition at line 54 of file L1TdeCSCTF.h.

MonitorElement * L1TdeCSCTF::qualComp_1d
private

Definition at line 58 of file L1TdeCSCTF.h.