30 : gmtProducer( ps.getParameter<
InputTag >(
"gmtProducer") ),
31 lctProducer( ps.getParameter<
InputTag >(
"lctProducer") ),
32 trackProducer( ps.getParameter<
InputTag >(
"trackProducer") ),
33 statusProducer( ps.getParameter<
InputTag >(
"statusProducer") ),
34 mbProducer( ps.getParameter<
InputTag >(
"mbProducer") )
79 for(
int subSector=0; subSector<2 && fpga<5; subSector++)
90 for(
int i=0;
i<5;
i++)
108 dbe->
rmdir(
"L1T/L1TCSCTF");
169 trackModeVsQ = dbe->
book2D(
"CSCTF_Track_ModeVsQual",
"CSC Track Mode Vs Quality", 19, -0.5, 18.5, 4, 0, 4);
307 csctfbx = dbe->
book2D(
"CSCTF_bx",
"CSCTF BX", 12,1,13, 7,-3,3) ;
332 csctfbx_H = dbe->
book2D(
"CSCTF_bx_H",
"CSCTF HALO BX", 12,1,13, 7,-3,3) ;
365 csctfntrack = dbe->
book1D(
"CSCTF_ntrack",
"Number of CSCTracks found per event", 5, 0, 5 ) ;
376 for(
int i=0;
i<12;
i++) {
378 sprintf(hname ,
"DTstubsTimeTrackMenTimeArrival_%d",
i+1);
379 sprintf(htitle,
"T_{track} - T_{DT stub} sector %d",
i+1);
408 LogInfo(
"EndJob") <<
"analyzed " <<
nev_ <<
" events";
430 edm::LogInfo(
"L1TCSCTF") <<
"Changing triggerscales and triggerptscales...";
433 int NumCSCTfTracksRep = 0;
443 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label ";
448 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
449 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
459 for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ ) {
463 vector<L1MuRegionalCand> INPCands = RRItr->getCSCCands();
464 vector<L1MuRegionalCand>::const_iterator INPItr;
470 for( INPItr = INPCands.begin(); INPItr != INPCands.end(); ++INPItr ) {
476 if (
verbose_)
edm::LogInfo(
"DataNotFound") <<
"cand " << nCandsBx <<
" -> assigned CSCTF bx: " << INPItr->bx() << endl;
483 if (nCands != 1)
return;
490 edm::LogInfo(
"DataNotFound") <<
"\tCSCTFCand ntrack " << ncsctftrack << endl;
499 bool integrity=status->first, se=
false, sm=
false, bx=
false, af=
false, fmm=
false;
502 for(std::vector<L1CSCSPStatusDigi>::const_iterator stat=status->second.begin(); stat!=status->second.end(); stat++)
504 se |= stat->SEs()&0xFFF;
505 sm |= stat->SMs()&0xFFF;
506 bx |= stat->BXs()&0xFFF;
507 af |= stat->AFs()&0xFFF;
508 fmm|= stat->FMM()!=8;
517 if(nStat!=0)
L1ABXN /= nStat;
540 int endcap = (*csc).first.endcap()-1;
541 int station = (*csc).first.station()-1;
542 int sector = (*csc).first.triggerSector()-1;
544 int cscId = (*csc).first.triggerCscId()-1;
545 int fpga = ( subSector ? subSector-1 : station+1 );
547 int endcapAssignment = 1;
549 float sectorArg = sector;
553 endcapAssignment = -1;
558 int signedStation = (station +
shift)* endcapAssignment;
559 if( (station == 0) && (endcap == 0)) signedStation = subSector - 1;
560 if( (station == 0) && (endcap == 1)) signedStation = (-1)*subSector;
562 float chamberArg1 = cscId * 0.1 + sectorArg;
566 float chamberArg11 = chamberArg1;
567 if(sectorArg == 1) chamberArg1 = chamberArg11 - 0.1;
568 if(sectorArg == 2) chamberArg1 = chamberArg11 - 0.2;
569 if(sectorArg == 3) chamberArg1 = chamberArg11 - 0.3;
570 if(sectorArg == 4) chamberArg1 = chamberArg11 - 0.4;
571 if(sectorArg == 5) chamberArg1 = chamberArg11 - 0.5;
587 if( endcap<0||endcap>1 || sector<0||sector>6 || station<0||station>3 || cscId<0||cscId>8 || fpga<0||fpga>4)
589 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);
594 lclPhi =
srLUTs_[fpga]->
localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
596 bzero(&lclPhi,
sizeof(lclPhi));
603 bzero(&gblPhi,
sizeof(gblPhi));
608 gblEta =
srLUTs_[fpga]->
globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
610 bzero(&gblEta,
sizeof(gblEta));
628 for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
632 long LUTAdd = trk->first.ptLUTAddress();
633 int trigMode = ( (LUTAdd)&0xf0000 ) >> 16;
634 int trEta = (trk->first.eta_packed() );
640 if( trk->first.endcap() != 1)
647 int trSector = 6*(trk->first.endcap()-1)+trk->first.sector();
648 int trBX = trk->first.BX();
662 double trPhi02PI = fmod(trPhi +
663 ((trSector-1)*
M_PI/3) +
666 if (trigMode == 15) {
680 if (
abs(trEta) < 24) {
711 int trRank = trk->first.rank();
713 int trQuality = ((trRank>>5)&0x3);
782 int cscTrackStub = 0;
846 std::vector<csctf::TrackStub> vstubs = dtStubs->get();
847 for(std::vector<csctf::TrackStub>::const_iterator stub=vstubs.begin();
848 stub!=vstubs.end(); stub++)
852 edm::LogInfo(
"DataNotFound") <<
"\n mbEndcap: " << stub->endcap();
853 edm::LogInfo(
"DataNotFound") <<
"\n stub->getStrip()[FLAG]: " << stub->getStrip();
854 edm::LogInfo(
"DataNotFound") <<
"\n stub->getKeyWG()[CAL]: " << stub->getKeyWG();
855 edm::LogInfo(
"DataNotFound") <<
"\n stub->BX(): " << stub->BX();
856 edm::LogInfo(
"DataNotFound") <<
"\n stub->sector(): " << stub->sector();
857 edm::LogInfo(
"DataNotFound") <<
"\n stub->subsector(): " << stub->subsector();
858 edm::LogInfo(
"DataNotFound") <<
"\n stub->station(): " << stub->station();
859 edm::LogInfo(
"DataNotFound") <<
"\n stub->phiPacked(): " << stub->phiPacked();
860 edm::LogInfo(
"DataNotFound") <<
"\n stub->getBend(): " << stub->getBend();
861 edm::LogInfo(
"DataNotFound") <<
"\n stub->getQuality(): " << stub->getQuality();
862 edm::LogInfo(
"DataNotFound") <<
"\n stub->cscid(): " << stub->cscid() << endl;
865 int mbId = (stub->endcap()==2) ? 6 : 0;
866 mbId += stub->sector();
871 if (stub->getKeyWG() == 0)
874 int bxDT = stub->BX()-stub->getStrip();
875 int subDT = stub->subsector();
882 for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
884 trkBX = trk->first.BX();
885 int trkId = (trk->first.endcap()==2) ? 6 : 0;
886 trkId += trk->first.sector();
889 <<
" Sector: " << trkId
890 <<
" SubSector: " << trk->first.subsector()
891 <<
" Endcap: " << trk->first.endcap();
893 edm::LogInfo(
"DataNotFound") <<
"\n DT BX: " << stub->BX()
894 <<
" Sector: " << mbId
895 <<
" SubSector: " << stub->subsector()
896 <<
" Endcap: " << stub->endcap() << endl;
903 edm::LogInfo(
"DataNotFound") <<
"Fill :" << trkBX+6-bxDT <<
" -- " << subDT <<
" -- cands" << endl;
MonitorElement * DTstubsTimeTrackMenTimeArrival[12]
MonitorElement * csctfoccupancies
unsigned long long cacheIdentifier() const
MonitorElement * csctfTrackEtaHighQ
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * csctfTrackPhi
unsigned long long m_scalesCacheID
MonitorElement * csctfTrackPhi_H
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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
gbletadat globalEtaME(int phi_bend, int phi_local, int wire_group, int cscid) const
static void setGeometry(const edm::ESHandle< CSCGeometry > &thegeom)
MonitorElement * csctfTrackEta
void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::InputTag statusProducer
MonitorElement * csctfTrackEta_H
const L1MuTriggerScales * ts
MonitorElement * cscTrackStubNumbers
lclphidat localPhi(int strip, int pattern, int quality, int lr) const
Geometry Lookup Tables.
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
const L1MuScale * getPhiScale() const
get the phi scale
L1TCSCTF(const edm::ParameterSet &ps)
void setVerbose(unsigned level)
MonitorElement * csctfChamberOccupancies
edm::InputTag lctProducer
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
CSCSectorReceiverLUT * srLUTs_[5]
MonitorElement * csctferrors
void addUntrackedParameter(std::string const &name, T const &value)
class global_phi_data gblphidat
MonitorElement * csctfTrackM
T const * product() const
MonitorElement * csctfbx_H
std::vector< DigiType >::const_iterator const_iterator
class local_phi_data lclphidat
Data Types.
static int triggerSubSectorFromLabels(int station, int chamber)
T const * product() const
edm::InputTag trackProducer
MonitorElement * csctfntrack
MonitorElement * trackModeVsQ
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
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
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::InputTag gmtProducer
void setCurrentFolder(const std::string &fullpath)
gblphidat globalPhiME(int phi_local, int wire_group, int cscid) const