28 : gmtProducer( ps.getParameter<
InputTag >(
"gmtProducer") ),
29 lctProducer( ps.getParameter<
InputTag >(
"lctProducer") ),
31 statusProducer( ps.getParameter<
InputTag >(
"statusProducer") ),
32 mbProducer( ps.getParameter<
InputTag >(
"mbProducer") )
63 for(
int subSector=0; subSector<2 && fpga<5; subSector++)
77 statusToken_ = consumes<L1CSCStatusDigiCollection>(statusTag_);
78 corrlctsToken_ = consumes<CSCCorrelatedLCTDigiCollection>(corrlctsTag_);
79 tracksToken_ = consumes<L1CSCTrackCollection>(tracksTag_);
80 dtStubsToken_ = consumes<CSCTriggerContainer<csctf::TrackStub> >(dtStubsTag_);
87 for(
int i=0;
i<5;
i++)
155 trackModeVsQ = ibooker.
book2D(
"CSCTF_Track_ModeVsQual",
"CSC Track Mode Vs Quality", 19, -0.5, 18.5, 4, 0, 4);
184 csctfTrackM = ibooker.
book1D(
"CSCTF_Track_Mode",
"CSC Track Mode", 19, -0.5, 18.5);
293 csctfbx = ibooker.
book2D(
"CSCTF_bx",
"CSCTF BX", 12,1,13, 7,-3,3) ;
318 csctfbx_H = ibooker.
book2D(
"CSCTF_bx_H",
"CSCTF HALO BX", 12,1,13, 7,-3,3) ;
351 csctfntrack = ibooker.
book1D(
"CSCTF_ntrack",
"Number of CSCTracks found per event", 5, 0, 5 ) ;
362 for(
int i=0;
i<12;
i++) {
364 sprintf(hname ,
"DTstubsTimeTrackMenTimeArrival_%d",
i+1);
365 sprintf(htitle,
"T_{track} - T_{DT stub} sector %d",
i+1);
404 edm::LogInfo(
"L1TCSCTF") <<
"Changing triggerscales and triggerptscales...";
407 int NumCSCTfTracksRep = 0;
417 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label ";
422 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
423 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
433 for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ ) {
437 vector<L1MuRegionalCand> INPCands = RRItr->getCSCCands();
438 vector<L1MuRegionalCand>::const_iterator INPItr;
444 for( INPItr = INPCands.begin(); INPItr != INPCands.end(); ++INPItr ) {
450 if (
verbose_)
edm::LogInfo(
"DataNotFound") <<
"cand " << nCandsBx <<
" -> assigned CSCTF bx: " << INPItr->bx() << endl;
457 if (nCands != 1)
return;
464 edm::LogInfo(
"DataNotFound") <<
"\tCSCTFCand ntrack " << ncsctftrack << endl;
473 bool integrity=status->first, se=
false, sm=
false, bx=
false, af=
false, fmm=
false;
476 for(std::vector<L1CSCSPStatusDigi>::const_iterator stat=status->second.begin(); stat!=status->second.end(); stat++)
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;
491 if(nStat!=0)
L1ABXN /= nStat;
514 int endcap = (*csc).first.endcap()-1;
515 int station = (*csc).first.station()-1;
516 int sector = (*csc).first.triggerSector()-1;
518 int cscId = (*csc).first.triggerCscId()-1;
519 int fpga = ( subSector ? subSector-1 : station+1 );
521 int endcapAssignment = 1;
523 float sectorArg = sector;
527 endcapAssignment = -1;
532 int signedStation = (station +
shift)* endcapAssignment;
533 if( (station == 0) && (endcap == 0)) signedStation = subSector - 1;
534 if( (station == 0) && (endcap == 1)) signedStation = (-1)*subSector;
536 float chamberArg1 = cscId * 0.1 + sectorArg;
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;
561 if( endcap<0||endcap>1 || sector<0||sector>6 || station<0||station>3 || cscId<0||cscId>8 || fpga<0||fpga>4)
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);
568 lclPhi =
srLUTs_[fpga]->
localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
570 bzero(&lclPhi,
sizeof(lclPhi));
577 bzero(&gblPhi,
sizeof(gblPhi));
582 gblEta =
srLUTs_[fpga]->
globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
584 bzero(&gblEta,
sizeof(gblEta));
602 for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
606 long LUTAdd = trk->first.ptLUTAddress();
607 int trigMode = ( (LUTAdd)&0xf0000 ) >> 16;
608 int trEta = (trk->first.eta_packed() );
614 if( trk->first.endcap() != 1)
621 int trSector = 6*(trk->first.endcap()-1)+trk->first.sector();
622 int trBX = trk->first.BX();
636 double trPhi02PI = fmod(trPhi +
637 ((trSector-1)*
M_PI/3) +
640 if (trigMode == 15) {
654 if (
abs(trEta) < 24) {
685 int trRank = trk->first.rank();
687 int trQuality = ((trRank>>5)&0x3);
755 int cscTrackStub = 0;
819 std::vector<csctf::TrackStub> vstubs = dtStubs->get();
820 for(std::vector<csctf::TrackStub>::const_iterator stub=vstubs.begin();
821 stub!=vstubs.end(); stub++)
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;
838 int mbId = (stub->endcap()==2) ? 6 : 0;
839 mbId += stub->sector();
844 if (stub->getKeyWG() == 0)
847 int bxDT = stub->BX()-stub->getStrip();
848 int subDT = stub->subsector();
855 for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
857 trkBX = trk->first.BX();
858 int trkId = (trk->first.endcap()==2) ? 6 : 0;
859 trkId += trk->first.sector();
862 <<
" Sector: " << trkId
863 <<
" SubSector: " << trk->first.subsector()
864 <<
" Endcap: " << trk->first.endcap();
866 edm::LogInfo(
"DataNotFound") <<
"\n DT BX: " << stub->BX()
867 <<
" Sector: " << mbId
868 <<
" SubSector: " << stub->subsector()
869 <<
" Endcap: " << stub->endcap() << endl;
876 edm::LogInfo(
"DataNotFound") <<
"Fill :" << trkBX+6-bxDT <<
" -- " << subDT <<
" -- cands" << endl;
MonitorElement * DTstubsTimeTrackMenTimeArrival[12]
MonitorElement * csctfoccupancies
T getParameter(std::string const &) const
unsigned long long cacheIdentifier() const
MonitorElement * csctfTrackEtaHighQ
T getUntrackedParameter(std::string const &, T const &) const
lclphidat localPhi(int strip, int pattern, int quality, int lr, const bool gangedME1a=false) const
Geometry Lookup Tables.
MonitorElement * csctfTrackPhi
unsigned long long m_scalesCacheID
MonitorElement * csctfTrackPhi_H
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
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 * csctfTrackEtaLowQ
static void setGeometry(const edm::ESHandle< CSCGeometry > &thegeom)
MonitorElement * csctfTrackEta
void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::InputTag statusProducer
edm::EDGetTokenT< L1CSCStatusDigiCollection > statusToken_
MonitorElement * csctfTrackEta_H
const L1MuTriggerScales * ts
gblphidat globalPhiME(int phi_local, int wire_group, int cscid, const bool gangedME1a=false) const
MonitorElement * cscTrackStubNumbers
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
const L1MuScale * getPhiScale() const
get the phi scale
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
L1TCSCTF(const edm::ParameterSet &ps)
MonitorElement * csctfChamberOccupancies
edm::InputTag lctProducer
virtual void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< L1CSCTrackCollection > tracksToken_
CSCSectorReceiverLUT * srLUTs_[5]
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > corrlctsToken_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * csctferrors
T const * product() const
MonitorElement * book2D(Args &&...args)
void addUntrackedParameter(std::string const &name, T const &value)
class global_phi_data gblphidat
MonitorElement * csctfTrackM
edm::EDGetTokenT< L1CSCTrackCollection > mbtracksToken_
T const * product() const
MonitorElement * csctfbx_H
std::vector< CSCCorrelatedLCTDigi >::const_iterator const_iterator
class local_phi_data lclphidat
Data Types.
virtual void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
static int triggerSubSectorFromLabels(int station, int chamber)
MonitorElement * csctfntrack
edm::InputTag trackProducer
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtProducerToken_
MonitorElement * trackModeVsQ
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
static unsigned int const shift
std::pair< const_iterator, const_iterator > Range
const L1MuTriggerPtScale * tpts
unsigned long long m_ptScaleCacheID
TH2F * getTH2F(void) const
class global_eta_data gbletadat
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dtStubsToken_
edm::InputTag gmtProducer