667 edm::LogInfo(
"L1TCSCTF") <<
"Changing triggerscales and triggerptscales...";
670 int NumCSCTfTracksRep = 0;
673 edm::LogInfo(
"DataNotFound") <<
"L1TCSCTF: analyze...." << endl;
679 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuGMTReadoutCollection with label ";
684 vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
685 vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
695 for (RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++) {
699 vector<L1MuRegionalCand> INPCands = RRItr->getCSCCands();
700 vector<L1MuRegionalCand>::const_iterator INPItr;
706 for (INPItr = INPCands.begin(); INPItr != INPCands.end(); ++INPItr) {
707 if (!INPItr->empty()) {
712 edm::LogInfo(
"DataNotFound") <<
"cand " << nCandsBx <<
" -> assigned CSCTF bx: " << INPItr->bx() << endl;
725 edm::LogInfo(
"DataNotFound") <<
"bxWindow: " << bxWindow << endl;
729 edm::LogInfo(
"DataNotFound") <<
"\tCSCTFCand ntrack " << ncsctftrack << endl;
737 bool integrity = status->first, se =
false, sm =
false,
bx =
false, af =
false, fmm =
false;
740 for (std::vector<L1CSCSPStatusDigi>::const_iterator
stat = status->second.begin();
stat != status->second.end();
742 se |=
stat->SEs() & 0xFFF;
743 sm |=
stat->SMs() & 0xFFF;
744 bx |=
stat->BXs() & 0xFFF;
745 af |=
stat->AFs() & 0xFFF;
746 fmm |=
stat->FMM() != 8;
748 int ise =
stat->SEs() & 0xFFF;
750 int ibx =
stat->BXs() & 0xFFF;
751 int iaf =
stat->AFs() & 0xFFF;
752 int ifmm =
stat->FMM();
753 int slot =
stat->slot();
755 for (
int j = 0;
j < 15;
j++) {
759 if (slot >= 6 && slot <= 11)
761 if (slot >= 16 && slot <= 21)
765 if (link >= 1 && link <= 3)
767 else if (link >= 4 && link <= 6)
769 else if (link >= 7 && link <= 9)
771 else if (link >= 10 && link <= 12)
773 else if (link >= 13 && link <= 15)
775 }
else if (sp_num == 2) {
776 if (link >= 1 && link <= 3)
778 else if (link >= 4 && link <= 6)
780 else if (link >= 7 && link <= 9)
782 else if (link >= 10 && link <= 12)
784 else if (link >= 13 && link <= 15)
786 }
else if (sp_num == 3) {
787 if (link >= 1 && link <= 3)
789 else if (link >= 4 && link <= 6)
791 else if (link >= 7 && link <= 9)
793 else if (link >= 10 && link <= 12)
795 else if (link >= 13 && link <= 15)
797 }
else if (sp_num == 4) {
798 if (link >= 1 && link <= 3)
800 else if (link >= 4 && link <= 6)
802 else if (link >= 7 && link <= 9)
804 else if (link >= 10 && link <= 12)
806 else if (link >= 13 && link <= 15)
808 }
else if (sp_num == 5) {
809 if (link >= 1 && link <= 3)
811 else if (link >= 4 && link <= 6)
813 else if (link >= 7 && link <= 9)
815 else if (link >= 10 && link <= 12)
817 else if (link >= 13 && link <= 15)
819 }
else if (sp_num == 6) {
820 if (link >= 1 && link <= 3)
822 else if (link >= 4 && link <= 6)
824 else if (link >= 7 && link <= 9)
826 else if (link >= 10 && link <= 12)
828 else if (link >= 13 && link <= 15)
830 }
else if (sp_num == 7) {
831 if (link >= 1 && link <= 3)
833 else if (link >= 4 && link <= 6)
835 else if (link >= 7 && link <= 9)
837 else if (link >= 10 && link <= 12)
839 else if (link >= 13 && link <= 15)
841 }
else if (sp_num == 8) {
842 if (link >= 1 && link <= 3)
844 else if (link >= 4 && link <= 6)
846 else if (link >= 7 && link <= 9)
848 else if (link >= 10 && link <= 12)
850 else if (link >= 13 && link <= 15)
852 }
else if (sp_num == 9) {
853 if (link >= 1 && link <= 3)
855 else if (link >= 4 && link <= 6)
857 else if (link >= 7 && link <= 9)
859 else if (link >= 10 && link <= 12)
861 else if (link >= 13 && link <= 15)
863 }
else if (sp_num == 10) {
864 if (link >= 1 && link <= 3)
866 else if (link >= 4 && link <= 6)
868 else if (link >= 7 && link <= 9)
870 else if (link >= 10 && link <= 12)
872 else if (link >= 13 && link <= 15)
874 }
else if (sp_num == 11) {
875 if (link >= 1 && link <= 3)
877 else if (link >= 4 && link <= 6)
879 else if (link >= 7 && link <= 9)
881 else if (link >= 10 && link <= 12)
883 else if (link >= 13 && link <= 15)
885 }
else if (sp_num == 12) {
886 if (link >= 1 && link <= 3)
888 else if (link >= 4 && link <= 6)
890 else if (link >= 7 && link <= 9)
892 else if (link >= 10 && link <= 12)
894 else if (link >= 13 && link <= 15)
900 if ((ise >>
j) & 0
x1)
902 if ((ism >>
j) & 0x1)
904 if ((ibx >>
j) & 0x1)
906 if ((iaf >>
j) & 0x1)
912 if (
stat->VPs() != 0) {
946 int endcap = (*csc).first.endcap() - 1;
947 int station = (*csc).first.station() - 1;
948 int sector = (*csc).first.triggerSector() - 1;
950 int ring = (*csc).first.ring();
951 int cscId = (*csc).first.triggerCscId() - 1;
952 int fpga = (subSector ? subSector - 1 : station + 1);
953 int strip = lct->getStrip();
954 int keyWire = lct->getKeyWG();
955 int bx = lct->getBX();
957 int endcapAssignment = 1;
959 float sectorArg = sector;
963 endcapAssignment = -1;
968 int signedStation = (station +
shift) * endcapAssignment;
969 if ((station == 0) && (endcap == 0))
970 signedStation = subSector - 1;
971 if ((station == 0) && (endcap == 1))
972 signedStation = (-1) * subSector;
974 float chamberArg1 = cscId * 0.1 + sectorArg;
978 float chamberArg11 = chamberArg1;
980 chamberArg1 = chamberArg11 - 0.1;
982 chamberArg1 = chamberArg11 - 0.2;
984 chamberArg1 = chamberArg11 - 0.3;
986 chamberArg1 = chamberArg11 - 0.4;
988 chamberArg1 = chamberArg11 - 0.5;
1004 if (endcap < 0 || endcap > 1 || sector < 0 || sector > 6 || station < 0 || station > 3 || cscId < 0 ||
1005 cscId > 8 || fpga < 0 || fpga > 4) {
1007 <<
" endcap: " << (endcap + 1) <<
" station: " << (station + 1) <<
" sector: " << (sector + 1)
1008 <<
" subSector: " << subSector <<
" fpga: " << fpga <<
" cscId: " << (cscId + 1);
1020 lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend(),
gangedME11a_);
1022 bzero(&lclPhi,
sizeof(lclPhi));
1030 bzero(&gblPhi,
sizeof(gblPhi));
1036 lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId + 1,
gangedME11a_);
1038 bzero(&gblEta,
sizeof(gblEta));
1043 theStub.setPhiPacked(gblPhi.global_phi);
1044 theStub.setEtaPacked(gblEta.global_eta);
1046 float etaG = theStub.etaValue();
1047 float phiG = fmod(theStub.phiValue() + 15.0 *
M_PI / 180 + (sector)*60.0 *
M_PI / 180, 2. *
M_PI);
1060 }
else if (station == 1) {
1065 }
else if (station == 2) {
1070 }
else if (station == 3) {
1085 }
else if (station == 1) {
1090 }
else if (station == 2) {
1095 }
else if (station == 3) {
1104 if (station == 0 && ring == 1) {
1114 if (station == 3 && ring == 2) {
1120 if (station == 0 && ring == 1) {
1121 int realID = cscId + 6 * sector + 3 * subSector;
1127 if (keyWire > 48 || strip > 224)
1133 if (keyWire > 48 || strip > 224)
1138 if (station == 0 && ring == 2) {
1139 int realID = (cscId - 3) + 6 * sector + 3 * subSector;
1145 if (keyWire > 64 || strip > 160)
1151 if (keyWire > 64 || strip > 160)
1156 if (station == 0 && ring == 3) {
1157 int realID = (cscId - 6) + 6 * sector + 3 * subSector;
1163 if (keyWire > 32 || strip > 128)
1169 if (keyWire > 32 || strip > 128)
1174 if (station == 1 && ring == 1) {
1175 int realID = cscId + 3 * sector + 2;
1181 if (keyWire > 112 || strip > 160)
1187 if (keyWire > 112 || strip > 160)
1192 if (station == 1 && ring == 2) {
1193 int realID = (cscId - 3) + 6 * sector + 3;
1199 if (keyWire > 64 || strip > 160)
1205 if (keyWire > 64 || strip > 160)
1211 if (station == 2 && ring == 1) {
1212 int realID = cscId + 3 * sector + 2;
1218 if (keyWire > 96 || strip > 160)
1224 if (keyWire > 96 || strip > 160)
1230 if (station == 2 && ring == 2) {
1231 int realID = (cscId - 3) + 6 * sector + 3;
1237 if (keyWire > 64 || strip > 160)
1243 if (keyWire > 64 || strip > 160)
1248 if (station == 3 && ring == 1) {
1249 int realID = cscId + 3 * sector + 2;
1255 if (keyWire > 96 || strip > 160)
1261 if (keyWire > 96 || strip > 160)
1266 if (station == 3 && ring == 2) {
1267 int realID = (cscId - 3) + 6 * sector + 3;
1273 if (keyWire > 64 || strip > 160)
1279 if (keyWire > 64 || strip > 160)
1296 for (L1CSCTrackCollection::const_iterator trk = tracks->begin(); trk < tracks->end(); trk++) {
1297 NumCSCTfTracksRep++;
1298 long LUTAdd = trk->first.ptLUTAddress();
1299 int trigMode = ((LUTAdd)&0xf0000) >> 16;
1300 int trEta = (trk->first.eta_packed());
1305 if (trk->first.endcap() != 1) {
1307 trEta = -1 * holder;
1311 int trSector = 6 * (trk->first.endcap() - 1) + trk->first.sector();
1312 int trBX = trk->first.BX();
1326 double trPhi02PI = fmod(trPhi + ((trSector - 1) *
M_PI / 3) + (
M_PI * 14 / 180.), 2 *
M_PI);
1328 if (trigMode == 15) {
1341 if (
abs(trEta) < 24) {
1342 if (trigMode == 2 || trigMode == 3 || trigMode == 4 || trigMode == 5 || trigMode == 6 || trigMode == 7 ||
1343 trigMode == 11 || trigMode == 12 || trigMode == 13 || trigMode == 14)
1346 if (trigMode == 8 || trigMode == 9 || trigMode == 10)
1349 if (trigMode == 2 || trigMode == 3 || trigMode == 4 || trigMode == 5)
1361 int trRank = trk->first.rank();
1363 int trQuality = ((trRank >> 5) & 0x3);
1431 int cscTrackStub = 0;
1437 trackStub != lctsOfTracks.end();
1490 std::vector<csctf::TrackStub> vstubs = dtStubs->get();
1491 for (std::vector<csctf::TrackStub>::const_iterator stub = vstubs.begin(); stub != vstubs.end(); stub++) {
1493 edm::LogInfo(
"DataNotFound") <<
"\n mbEndcap: " << stub->endcap();
1494 edm::LogInfo(
"DataNotFound") <<
"\n stub->getStrip()[FLAG]: " << stub->getStrip();
1495 edm::LogInfo(
"DataNotFound") <<
"\n stub->getKeyWG()[CAL]: " << stub->getKeyWG();
1496 edm::LogInfo(
"DataNotFound") <<
"\n stub->BX(): " << stub->BX();
1497 edm::LogInfo(
"DataNotFound") <<
"\n stub->sector(): " << stub->sector();
1498 edm::LogInfo(
"DataNotFound") <<
"\n stub->subsector(): " << stub->subsector();
1499 edm::LogInfo(
"DataNotFound") <<
"\n stub->station(): " << stub->station();
1500 edm::LogInfo(
"DataNotFound") <<
"\n stub->phiPacked(): " << stub->phiPacked();
1501 edm::LogInfo(
"DataNotFound") <<
"\n stub->getBend(): " << stub->getBend();
1502 edm::LogInfo(
"DataNotFound") <<
"\n stub->getQuality(): " << stub->getQuality();
1503 edm::LogInfo(
"DataNotFound") <<
"\n stub->cscid(): " << stub->cscid() << endl;
1506 int mbId = (stub->endcap() == 2) ? 6 : 0;
1507 mbId += stub->sector();
1512 if (stub->getKeyWG() == 0)
1515 int bxDT = stub->BX() - stub->getStrip();
1516 int subDT = stub->subsector();
1522 for (L1CSCTrackCollection::const_iterator trk = tracks->begin(); trk < tracks->end(); trk++) {
1523 trkBX = trk->first.BX();
1524 int trkId = (trk->first.endcap() == 2) ? 6 : 0;
1525 trkId += trk->first.sector();
1528 <<
"\n trk BX: " << trkBX <<
" Sector: " << trkId <<
" SubSector: " << trk->first.subsector()
1529 <<
" Endcap: " << trk->first.endcap();
1532 <<
"\n DT BX: " << stub->BX() <<
" Sector: " << mbId <<
" SubSector: " << stub->subsector()
1533 <<
" Endcap: " << stub->endcap() << endl;
1536 if (mbId == trkId) {
1539 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
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
std::pair< const_iterator, const_iterator > Range
MonitorElement * csctfTrackM
edm::EDGetTokenT< L1CSCTrackCollection > mbtracksToken_
MonitorElement * csctfbx_H
std::vector< DigiType >::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]
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