689 edm::LogInfo(
"L1TCSCTF") <<
"Changing triggerscales and triggerptscales...";
692 int NumCSCTfTracksRep = 0;
702 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label ";
707 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
708 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
718 for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ ) {
722 vector<L1MuRegionalCand> INPCands = RRItr->getCSCCands();
723 vector<L1MuRegionalCand>::const_iterator INPItr;
729 for( INPItr = INPCands.begin(); INPItr != INPCands.end(); ++INPItr ) {
735 if (
verbose_)
edm::LogInfo(
"DataNotFound") <<
"cand " << nCandsBx <<
" -> assigned CSCTF bx: " << INPItr->bx() << endl;
742 if (nCands != 1)
return;
749 edm::LogInfo(
"DataNotFound") <<
"\tCSCTFCand ntrack " << ncsctftrack << endl;
758 bool integrity=status->first, se=
false, sm=
false, bx=
false, af=
false, fmm=
false;
761 for(std::vector<L1CSCSPStatusDigi>::const_iterator
stat=status->second.begin();
stat!=status->second.end();
stat++)
763 se |=
stat->SEs()&0xFFF;
764 sm |=
stat->SMs()&0xFFF;
765 bx |=
stat->BXs()&0xFFF;
766 af |=
stat->AFs()&0xFFF;
767 fmm|=
stat->FMM()!=8;
770 int ise =
stat->SEs()&0xFFF;
772 int ibx =
stat->BXs()&0xFFF;
773 int iaf =
stat->AFs()&0xFFF;
774 int ifmm=
stat->FMM();
775 int slot=
stat->slot();
778 for(
int j=0; j<15; j++) {
783 if(slot>=6 && slot<=11) sp_num = slot-5;
784 if(slot>=16 && slot<=21) sp_num = slot-9;
787 if (link>=1 && link<=3) mpc_id=2;
788 else if(link>=4 && link<=6) mpc_id=3;
789 else if(link>=7 && link<=9) mpc_id=13;
790 else if(link>=10 && link<=12) mpc_id=19;
791 else if(link>=13 && link<=15) mpc_id=25;
794 if (link>=1 && link<=3) mpc_id=4;
795 else if(link>=4 && link<=6) mpc_id=5;
796 else if(link>=7 && link<=9) mpc_id=14;
797 else if(link>=10 && link<=12) mpc_id=20;
798 else if(link>=13 && link<=15) mpc_id=26;
801 if (link>=1 && link<=3) mpc_id=6;
802 else if(link>=4 && link<=6) mpc_id=7;
803 else if(link>=7 && link<=9) mpc_id=15;
804 else if(link>=10 && link<=12) mpc_id=21;
805 else if(link>=13 && link<=15) mpc_id=27;
808 if (link>=1 && link<=3) mpc_id=8;
809 else if(link>=4 && link<=6) mpc_id=9;
810 else if(link>=7 && link<=9) mpc_id=16;
811 else if(link>=10 && link<=12) mpc_id=22;
812 else if(link>=13 && link<=15) mpc_id=28;
815 if (link>=1 && link<=3) mpc_id=10;
816 else if(link>=4 && link<=6) mpc_id=11;
817 else if(link>=7 && link<=9) mpc_id=17;
818 else if(link>=10 && link<=12) mpc_id=23;
819 else if(link>=13 && link<=15) mpc_id=29;
822 if (link>=1 && link<=3) mpc_id=12;
823 else if(link>=4 && link<=6) mpc_id=1;
824 else if(link>=7 && link<=9) mpc_id=18;
825 else if(link>=10 && link<=12) mpc_id=24;
826 else if(link>=13 && link<=15) mpc_id=30;
829 if (link>=1 && link<=3) mpc_id=32;
830 else if(link>=4 && link<=6) mpc_id=33;
831 else if(link>=7 && link<=9) mpc_id=43;
832 else if(link>=10 && link<=12) mpc_id=49;
833 else if(link>=13 && link<=15) mpc_id=55;
836 if (link>=1 && link<=3) mpc_id=34;
837 else if(link>=4 && link<=6) mpc_id=35;
838 else if(link>=7 && link<=9) mpc_id=44;
839 else if(link>=10 && link<=12) mpc_id=50;
840 else if(link>=13 && link<=15) mpc_id=56;
843 if (link>=1 && link<=3) mpc_id=36;
844 else if(link>=4 && link<=6) mpc_id=37;
845 else if(link>=7 && link<=9) mpc_id=45;
846 else if(link>=10 && link<=12) mpc_id=51;
847 else if(link>=13 && link<=15) mpc_id=57;
850 if (link>=1 && link<=3) mpc_id=38;
851 else if(link>=4 && link<=6) mpc_id=39;
852 else if(link>=7 && link<=9) mpc_id=46;
853 else if(link>=10 && link<=12) mpc_id=52;
854 else if(link>=13 && link<=15) mpc_id=58;
857 if (link>=1 && link<=3) mpc_id=40;
858 else if(link>=4 && link<=6) mpc_id=41;
859 else if(link>=7 && link<=9) mpc_id=47;
860 else if(link>=10 && link<=12) mpc_id=53;
861 else if(link>=13 && link<=15) mpc_id=59;
864 if (link>=1 && link<=3) mpc_id=42;
865 else if(link>=4 && link<=6) mpc_id=31;
866 else if(link>=7 && link<=9) mpc_id=48;
867 else if(link>=10 && link<=12) mpc_id=54;
868 else if(link>=13 && link<=15) mpc_id=60;
894 if(nStat!=0)
L1ABXN /= nStat;
916 int endcap = (*csc).first.endcap()-1;
917 int station = (*csc).first.station()-1;
918 int sector = (*csc).first.triggerSector()-1;
920 int ring = (*csc).first.ring();
921 int cscId = (*csc).first.triggerCscId()-1;
922 int fpga = ( subSector ? subSector-1 : station+1 );
923 int strip = lct -> getStrip();
924 int keyWire = lct -> getKeyWG();
925 int bx = lct -> getBX();
928 int endcapAssignment = 1;
930 float sectorArg = sector;
934 endcapAssignment = -1;
939 int signedStation = (station +
shift)* endcapAssignment;
940 if( (station == 0) && (endcap == 0)) signedStation = subSector - 1;
941 if( (station == 0) && (endcap == 1)) signedStation = (-1)*subSector;
943 float chamberArg1 = cscId * 0.1 + sectorArg;
947 float chamberArg11 = chamberArg1;
948 if(sectorArg == 1) chamberArg1 = chamberArg11 - 0.1;
949 if(sectorArg == 2) chamberArg1 = chamberArg11 - 0.2;
950 if(sectorArg == 3) chamberArg1 = chamberArg11 - 0.3;
951 if(sectorArg == 4) chamberArg1 = chamberArg11 - 0.4;
952 if(sectorArg == 5) chamberArg1 = chamberArg11 - 0.5;
968 if( endcap<0||endcap>1 || sector<0||sector>6 || station<0||station>3 || cscId<0||cscId>8 || fpga<0||fpga>4)
970 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);
976 if(endcap==1) EndCapLUT=0;
980 lclPhi =
srLUTs_[fpga][EndCapLUT][sector]->
localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend(),
gangedME11a_);
982 bzero(&lclPhi,
sizeof(lclPhi));
989 bzero(&gblPhi,
sizeof(gblPhi));
996 bzero(&gblEta,
sizeof(gblEta));
1002 theStub.setPhiPacked(gblPhi.global_phi);
1003 theStub.setEtaPacked(gblEta.global_eta);
1005 float etaG = theStub.etaValue();
1006 float phiG = fmod( theStub.phiValue()+15.0*
M_PI/180+(sector)*60.0*
M_PI/180, 2.*
M_PI );
1017 }
else if(station==1) {
1020 }
else if(station==2) {
1023 }
else if(station==3) {
1033 }
else if(station==1) {
1036 }
else if(station==2) {
1039 }
else if(station==3) {
1050 if(station == 0 && ring == 1){
1060 if(station == 3 && ring == 2){
1067 if (station == 0 && ring == 1){
1068 int realID = cscId+6*sector+3*subSector;
1069 if(realID>36) realID -= 36;
1074 if (station == 0 && ring == 2){
1075 int realID = (cscId-3)+6*sector+3*subSector;
1076 if(realID>36) realID -= 36;
1081 if (station == 0 && ring == 3){
1082 int realID = (cscId-6)+6*sector+3*subSector;
1083 if(realID>36) realID -= 36;
1088 if (station == 1 && ring == 1){
1089 int realID = cscId+3*sector+2;
1090 if(realID>18) realID -= 18;
1095 if (station == 1 && ring == 2){
1096 int realID = (cscId-3)+6*sector+3;
1097 if(realID>36) realID -= 36;
1103 if (station == 2 && ring == 1){
1104 int realID = cscId+3*sector+2;
1105 if(realID>18) realID -= 18;
1111 if (station == 2 && ring == 2){
1112 int realID = (cscId-3)+6*sector+3;
1113 if(realID>36) realID -= 36;
1118 if (station == 3 && ring == 1){
1119 int realID = cscId+3*sector+2;
1120 if(realID>18) realID -= 18;
1125 if (station == 3 && ring == 2){
1126 int realID = (cscId-3)+6*sector+3;
1127 if(realID>36) realID -= 36;
1152 for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
1155 NumCSCTfTracksRep++;
1156 long LUTAdd = trk->first.ptLUTAddress();
1157 int trigMode = ( (LUTAdd)&0xf0000 ) >> 16;
1158 int trEta = (trk->first.eta_packed() );
1164 if( trk->first.endcap() != 1)
1171 int trSector = 6*(trk->first.endcap()-1)+trk->first.sector();
1172 int trBX = trk->first.BX();
1186 double trPhi02PI = fmod(trPhi +
1187 ((trSector-1)*
M_PI/3) +
1190 if (trigMode == 15) {
1204 if (
abs(trEta) < 24) {
1205 if (trigMode == 2 ||
1216 if (trigMode == 8 ||
1221 if (trigMode == 2 ||
1235 int trRank = trk->first.rank();
1237 int trQuality = ((trRank>>5)&0x3);
1305 int cscTrackStub = 0;
1369 std::vector<csctf::TrackStub> vstubs = dtStubs->get();
1370 for(std::vector<csctf::TrackStub>::const_iterator stub=vstubs.begin();
1371 stub!=vstubs.end(); stub++)
1375 edm::LogInfo(
"DataNotFound") <<
"\n mbEndcap: " << stub->endcap();
1376 edm::LogInfo(
"DataNotFound") <<
"\n stub->getStrip()[FLAG]: " << stub->getStrip();
1377 edm::LogInfo(
"DataNotFound") <<
"\n stub->getKeyWG()[CAL]: " << stub->getKeyWG();
1378 edm::LogInfo(
"DataNotFound") <<
"\n stub->BX(): " << stub->BX();
1379 edm::LogInfo(
"DataNotFound") <<
"\n stub->sector(): " << stub->sector();
1380 edm::LogInfo(
"DataNotFound") <<
"\n stub->subsector(): " << stub->subsector();
1381 edm::LogInfo(
"DataNotFound") <<
"\n stub->station(): " << stub->station();
1382 edm::LogInfo(
"DataNotFound") <<
"\n stub->phiPacked(): " << stub->phiPacked();
1383 edm::LogInfo(
"DataNotFound") <<
"\n stub->getBend(): " << stub->getBend();
1384 edm::LogInfo(
"DataNotFound") <<
"\n stub->getQuality(): " << stub->getQuality();
1385 edm::LogInfo(
"DataNotFound") <<
"\n stub->cscid(): " << stub->cscid() << endl;
1388 int mbId = (stub->endcap()==2) ? 6 : 0;
1389 mbId += stub->sector();
1394 if (stub->getKeyWG() == 0)
1397 int bxDT = stub->BX()-stub->getStrip();
1398 int subDT = stub->subsector();
1405 for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
1407 trkBX = trk->first.BX();
1408 int trkId = (trk->first.endcap()==2) ? 6 : 0;
1409 trkId += trk->first.sector();
1412 <<
" Sector: " << trkId
1413 <<
" SubSector: " << trk->first.subsector()
1414 <<
" Endcap: " << trk->first.endcap();
1416 edm::LogInfo(
"DataNotFound") <<
"\n DT BX: " << stub->BX()
1417 <<
" Sector: " << mbId
1418 <<
" SubSector: " << stub->subsector()
1419 <<
" Endcap: " << stub->endcap() << endl;
1426 edm::LogInfo(
"DataNotFound") <<
"Fill :" << trkBX+6-bxDT <<
" -- " << subDT <<
" -- cands" << endl;
MonitorElement * DTstubsTimeTrackMenTimeArrival[12]
MonitorElement * csctfoccupancies
unsigned long long cacheIdentifier() const
MonitorElement * csctfTrackEtaHighQ
MonitorElement * csctflcts
lclphidat localPhi(int strip, int pattern, int quality, int lr, const bool gangedME1a=false) const
Geometry Lookup Tables.
MonitorElement * csctfTrackPhi
MonitorElement * csctferrors_mpc
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
MonitorElement * csc_wire_MEminus13
MonitorElement * csc_wire_MEminus22
MonitorElement * me11_lctGblPhi
MonitorElement * csc_wire_MEplus12
MonitorElement * csc_wire_MEminus31
MonitorElement * csc_wire_MEminus32
MonitorElement * csctfTrackEtaLowQ
MonitorElement * csc_strip_MEminus12
MonitorElement * csctfTrackEta
MonitorElement * me11_lctWire
MonitorElement * csc_strip_MEminus31
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
const L1MuScale * getPhiScale() const
get the phi scale
MonitorElement * csc_strip_MEplus13
Abs< T >::type abs(const T &t)
MonitorElement * csc_strip_MEplus22
MonitorElement * csc_wire_MEminus41
MonitorElement * csctfChamberOccupancies
MonitorElement * csc_wire_MEplus13
edm::InputTag lctProducer
MonitorElement * csc_wire_MEplus21
edm::EDGetTokenT< L1CSCTrackCollection > tracksToken_
MonitorElement * csc_strip_MEminus41
MonitorElement * me42_lctGblEta
MonitorElement * csc_strip_MEplus31
MonitorElement * csc_wire_MEplus32
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > corrlctsToken_
MonitorElement * csctferrors
T const * product() const
MonitorElement * csc_wire_MEminus42
class global_phi_data gblphidat
MonitorElement * csc_strip_MEplus41
MonitorElement * csctfTrackM
edm::EDGetTokenT< L1CSCTrackCollection > mbtracksToken_
MonitorElement * csctfbx_H
std::vector< CSCCorrelatedLCTDigi >::const_iterator const_iterator
class local_phi_data lclphidat
Data Types.
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
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
MonitorElement * csc_strip_MEminus21
MonitorElement * csctfoccupancies_H
MonitorElement * csc_strip_MEplus32
MonitorElement * csc_strip_MEplus12
static unsigned int const shift
CSCSectorReceiverLUT * srLUTs_[5][2][6]
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
MonitorElement * csc_wire_MEminus12
class global_eta_data gbletadat
int ism(int ieta, int iphi)
MonitorElement * cscWireStripOverflow
T const * product() const
MonitorElement * csc_strip_MEplus42
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > dtStubsToken_
edm::InputTag gmtProducer
MonitorElement * me11_lctPackedPhi
MonitorElement * csc_wire_MEplus22
MonitorElement * csc_wire_MEminus11