28 : gmtProducer( ps.getParameter<
InputTag >(
"gmtProducer") ),
29 lctProducer( ps.getParameter<
InputTag >(
"lctProducer") ),
31 statusProducer( ps.getParameter<
InputTag >(
"statusProducer") ),
32 mbProducer( ps.getParameter<
InputTag >(
"mbProducer") )
65 for(
int subSector=0; subSector<2 && fpga<5; subSector++)
79 statusToken_ = consumes<L1CSCStatusDigiCollection>(statusTag_);
80 corrlctsToken_ = consumes<CSCCorrelatedLCTDigiCollection>(corrlctsTag_);
81 tracksToken_ = consumes<L1CSCTrackCollection>(tracksTag_);
82 dtStubsToken_ = consumes<CSCTriggerContainer<csctf::TrackStub> >(dtStubsTag_);
89 for(
int i=0;
i<5;
i++)
157 trackModeVsQ = ibooker.
book2D(
"CSCTF_Track_ModeVsQual",
"CSC Track Mode Vs Quality", 19, -0.5, 18.5, 4, 0, 4);
186 csctfTrackM = ibooker.
book1D(
"CSCTF_Track_Mode",
"CSC Track Mode", 19, -0.5, 18.5);
295 csctfbx = ibooker.
book2D(
"CSCTF_bx",
"CSCTF BX", 12,1,13, 7,-3,3) ;
320 csctfbx_H = ibooker.
book2D(
"CSCTF_bx_H",
"CSCTF HALO BX", 12,1,13, 7,-3,3) ;
353 csctfntrack = ibooker.
book1D(
"CSCTF_ntrack",
"Number of CSCTracks found per event", 5, 0, 5 ) ;
364 for(
int i=0;
i<12;
i++) {
366 sprintf(hname ,
"DTstubsTimeTrackMenTimeArrival_%d",
i+1);
367 sprintf(htitle,
"T_{track} - T_{DT stub} sector %d",
i+1);
391 csctflcts = ibooker.
book2D(
"CSCTF_LCT",
"CSCTF LCTs", 12,1,13, 18,0,18);
407 for (
int iEndcap = 0; iEndcap < 2; iEndcap++) {
408 for (
int iStation = 1; iStation < 5; iStation++) {
409 for (
int iRing = 1; iRing < 4; iRing++) {
410 if (iStation != 1 && iRing > 2)
continue;
411 TString signEndcap=
"+";
412 if(iEndcap==0) signEndcap=
"-";
415 snprintf(lcttitle,200,
"ME%s%d/%d", signEndcap.Data(), iStation, iRing);
417 csctflcts -> setBinLabel(9-ihist,lcttitle,2);
419 else csctflcts -> setBinLabel(ihist+1,lcttitle,2);
569 for(
int cscid = 1; cscid < 37; cscid++){
571 sprintf(bxtitle,
"%d", cscid);
603 for(
int cscid = 1; cscid < 19; cscid++){
605 sprintf(bxtitle,
"%d", cscid);
642 edm::LogInfo(
"L1TCSCTF") <<
"Changing triggerscales and triggerptscales...";
645 int NumCSCTfTracksRep = 0;
655 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label ";
660 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
661 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
671 for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ ) {
675 vector<L1MuRegionalCand> INPCands = RRItr->getCSCCands();
676 vector<L1MuRegionalCand>::const_iterator INPItr;
682 for( INPItr = INPCands.begin(); INPItr != INPCands.end(); ++INPItr ) {
688 if (
verbose_)
edm::LogInfo(
"DataNotFound") <<
"cand " << nCandsBx <<
" -> assigned CSCTF bx: " << INPItr->bx() << endl;
695 if (nCands != 1)
return;
702 edm::LogInfo(
"DataNotFound") <<
"\tCSCTFCand ntrack " << ncsctftrack << endl;
711 bool integrity=status->first, se=
false, sm=
false, bx=
false, af=
false, fmm=
false;
714 for(std::vector<L1CSCSPStatusDigi>::const_iterator stat=status->second.begin(); stat!=status->second.end(); stat++)
716 se |= stat->SEs()&0xFFF;
717 sm |= stat->SMs()&0xFFF;
718 bx |= stat->BXs()&0xFFF;
719 af |= stat->AFs()&0xFFF;
720 fmm|= stat->FMM()!=8;
729 if(nStat!=0)
L1ABXN /= nStat;
752 int endcap = (*csc).first.endcap()-1;
753 int station = (*csc).first.station()-1;
754 int sector = (*csc).first.triggerSector()-1;
756 int ring = (*csc).first.ring();
757 int cscId = (*csc).first.triggerCscId()-1;
758 int fpga = ( subSector ? subSector-1 : station+1 );
759 int strip = lct -> getStrip();
760 int keyWire = lct -> getKeyWG();
761 int bx = lct -> getBX();
764 int endcapAssignment = 1;
766 float sectorArg = sector;
770 endcapAssignment = -1;
775 int signedStation = (station +
shift)* endcapAssignment;
776 if( (station == 0) && (endcap == 0)) signedStation = subSector - 1;
777 if( (station == 0) && (endcap == 1)) signedStation = (-1)*subSector;
779 float chamberArg1 = cscId * 0.1 + sectorArg;
783 float chamberArg11 = chamberArg1;
784 if(sectorArg == 1) chamberArg1 = chamberArg11 - 0.1;
785 if(sectorArg == 2) chamberArg1 = chamberArg11 - 0.2;
786 if(sectorArg == 3) chamberArg1 = chamberArg11 - 0.3;
787 if(sectorArg == 4) chamberArg1 = chamberArg11 - 0.4;
788 if(sectorArg == 5) chamberArg1 = chamberArg11 - 0.5;
804 if( endcap<0||endcap>1 || sector<0||sector>6 || station<0||station>3 || cscId<0||cscId>8 || fpga<0||fpga>4)
806 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);
813 bzero(&lclPhi,
sizeof(lclPhi));
820 bzero(&gblPhi,
sizeof(gblPhi));
827 bzero(&gblEta,
sizeof(gblEta));
848 }
else if(station==1) {
851 }
else if(station==2) {
854 }
else if(station==3) {
864 }
else if(station==1) {
867 }
else if(station==2) {
870 }
else if(station==3) {
881 if(station == 0 && ring == 1){
891 if(station == 3 && ring == 2){
898 if (station == 0 && ring == 1){
899 int realID = cscId+6*sector+3*subSector;
900 if(realID>36) realID -= 36;
905 if (station == 0 && ring == 2){
906 int realID = (cscId-3)+6*sector+3*subSector;
907 if(realID>36) realID -= 36;
912 if (station == 0 && ring == 3){
913 int realID = (cscId-6)+6*sector+3*subSector;
914 if(realID>36) realID -= 36;
919 if (station == 1 && ring == 1){
920 int realID = cscId+3*sector+2;
921 if(realID>18) realID -= 18;
926 if (station == 1 && ring == 2){
927 int realID = (cscId-3)+6*sector+3;
928 if(realID>36) realID -= 36;
934 if (station == 2 && ring == 1){
935 int realID = cscId+3*sector+2;
936 if(realID>18) realID -= 18;
942 if (station == 2 && ring == 2){
943 int realID = (cscId-3)+6*sector+3;
944 if(realID>36) realID -= 36;
949 if (station == 3 && ring == 1){
950 int realID = cscId+3*sector+2;
951 if(realID>18) realID -= 18;
956 if (station == 3 && ring == 2){
957 int realID = (cscId-3)+6*sector+3;
958 if(realID>36) realID -= 36;
983 for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
987 long LUTAdd = trk->first.ptLUTAddress();
988 int trigMode = ( (LUTAdd)&0xf0000 ) >> 16;
989 int trEta = (trk->first.eta_packed() );
995 if( trk->first.endcap() != 1)
1002 int trSector = 6*(trk->first.endcap()-1)+trk->first.sector();
1003 int trBX = trk->first.BX();
1017 double trPhi02PI = fmod(trPhi +
1018 ((trSector-1)*
M_PI/3) +
1021 if (trigMode == 15) {
1035 if (
abs(trEta) < 24) {
1036 if (trigMode == 2 ||
1047 if (trigMode == 8 ||
1052 if (trigMode == 2 ||
1066 int trRank = trk->first.rank();
1068 int trQuality = ((trRank>>5)&0x3);
1136 int cscTrackStub = 0;
1200 std::vector<csctf::TrackStub> vstubs = dtStubs->get();
1201 for(std::vector<csctf::TrackStub>::const_iterator stub=vstubs.begin();
1202 stub!=vstubs.end(); stub++)
1206 edm::LogInfo(
"DataNotFound") <<
"\n mbEndcap: " << stub->endcap();
1207 edm::LogInfo(
"DataNotFound") <<
"\n stub->getStrip()[FLAG]: " << stub->getStrip();
1208 edm::LogInfo(
"DataNotFound") <<
"\n stub->getKeyWG()[CAL]: " << stub->getKeyWG();
1209 edm::LogInfo(
"DataNotFound") <<
"\n stub->BX(): " << stub->BX();
1210 edm::LogInfo(
"DataNotFound") <<
"\n stub->sector(): " << stub->sector();
1211 edm::LogInfo(
"DataNotFound") <<
"\n stub->subsector(): " << stub->subsector();
1212 edm::LogInfo(
"DataNotFound") <<
"\n stub->station(): " << stub->station();
1213 edm::LogInfo(
"DataNotFound") <<
"\n stub->phiPacked(): " << stub->phiPacked();
1214 edm::LogInfo(
"DataNotFound") <<
"\n stub->getBend(): " << stub->getBend();
1215 edm::LogInfo(
"DataNotFound") <<
"\n stub->getQuality(): " << stub->getQuality();
1216 edm::LogInfo(
"DataNotFound") <<
"\n stub->cscid(): " << stub->cscid() << endl;
1219 int mbId = (stub->endcap()==2) ? 6 : 0;
1220 mbId += stub->sector();
1225 if (stub->getKeyWG() == 0)
1228 int bxDT = stub->BX()-stub->getStrip();
1229 int subDT = stub->subsector();
1236 for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
1238 trkBX = trk->first.BX();
1239 int trkId = (trk->first.endcap()==2) ? 6 : 0;
1240 trkId += trk->first.sector();
1243 <<
" Sector: " << trkId
1244 <<
" SubSector: " << trk->first.subsector()
1245 <<
" Endcap: " << trk->first.endcap();
1247 edm::LogInfo(
"DataNotFound") <<
"\n DT BX: " << stub->BX()
1248 <<
" Sector: " << mbId
1249 <<
" SubSector: " << stub->subsector()
1250 <<
" Endcap: " << stub->endcap() << endl;
1257 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
MonitorElement * csctflcts
lclphidat localPhi(int strip, int pattern, int quality, int lr, const bool gangedME1a=false) const
Geometry Lookup Tables.
MonitorElement * csctfTrackPhi
MonitorElement * csc_strip_MEminus22
unsigned long long m_scalesCacheID
MonitorElement * csctfTrackPhi_H
MonitorElement * csc_wire_MEplus31
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * csc_strip_MEplus21
MonitorElement * csc_strip_MEplus11
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
MonitorElement * csc_wire_MEminus13
MonitorElement * csc_wire_MEminus22
MonitorElement * me11_lctGblPhi
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 * csc_wire_MEplus12
MonitorElement * csc_wire_MEminus31
MonitorElement * csc_wire_MEminus32
MonitorElement * csctfTrackEtaLowQ
MonitorElement * csc_strip_MEminus12
static void setGeometry(const edm::ESHandle< CSCGeometry > &thegeom)
MonitorElement * csctfTrackEta
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * me11_lctWire
MonitorElement * csc_strip_MEminus31
unsigned phiPacked() const
Return the binned phi for this stub.
MonitorElement * csc_wire_MEminus21
edm::InputTag statusProducer
edm::EDGetTokenT< L1CSCStatusDigiCollection > statusToken_
MonitorElement * csctfTrackEta_H
MonitorElement * me42_lctGblPhi
const L1MuTriggerScales * ts
gblphidat globalPhiME(int phi_local, int wire_group, int cscid, const bool gangedME1a=false) const
MonitorElement * cscTrackStubNumbers
MonitorElement * csc_strip_MEminus32
MonitorElement * me11_lctStrip
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * csc_strip_MEminus42
MonitorElement * csc_wire_MEplus41
double etaValue() const
return the Eta Value of this stub's position.
const L1MuScale * getPhiScale() const
get the phi scale
MonitorElement * book1D(Args &&...args)
MonitorElement * csc_strip_MEplus13
Abs< T >::type abs(const T &t)
MonitorElement * csc_strip_MEplus22
MonitorElement * csc_wire_MEminus41
L1TCSCTF(const edm::ParameterSet &ps)
MonitorElement * csctfChamberOccupancies
MonitorElement * csc_wire_MEplus13
edm::InputTag lctProducer
MonitorElement * csc_wire_MEplus21
virtual void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< L1CSCTrackCollection > tracksToken_
MonitorElement * csc_strip_MEminus41
MonitorElement * me42_lctGblEta
CSCSectorReceiverLUT * srLUTs_[5]
MonitorElement * csc_strip_MEplus31
MonitorElement * csc_wire_MEplus32
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > corrlctsToken_
double phiValue() const
return the Phi Value of this stub's position in local coordinates.
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)
MonitorElement * csc_wire_MEminus42
class global_phi_data gblphidat
MonitorElement * csc_strip_MEplus41
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 * csc_wire_MEplus42
MonitorElement * trackModeVsQ
MonitorElement * me11_lctGblEta
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 * csc_strip_MEminus21
MonitorElement * csctfoccupancies_H
MonitorElement * csc_strip_MEplus32
MonitorElement * csc_strip_MEplus12
static unsigned int const shift
void setPhiPacked(const unsigned &phi_)
std::pair< const_iterator, const_iterator > Range
const L1MuTriggerPtScale * tpts
MonitorElement * me11_lctLocalPhi
MonitorElement * csc_strip_MEminus11
MonitorElement * csc_strip_MEminus13
unsigned long long m_ptScaleCacheID
MonitorElement * csc_wire_MEplus11
TH2F * getTH2F(void) const
MonitorElement * csc_wire_MEminus12
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)
MonitorElement * csc_strip_MEplus42
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dtStubsToken_
edm::InputTag gmtProducer
void setEtaPacked(const unsigned &eta_)
set Eta and Phi from integer values.
MonitorElement * me11_lctPackedPhi
MonitorElement * csc_wire_MEplus22
MonitorElement * csc_wire_MEminus11