Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:32

0001 #include <L1Trigger/CSCTrackFinder/interface/CSCTFSPCoreLogic.h>
0002 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0003 #include <DataFormats/MuonDetId/interface/CSCTriggerNumbering.h>
0004 #include <L1Trigger/CSCTrackFinder/interface/CSCTrackFinderDataTypes.h>
0005 
0006 #include <FWCore/MessageLogger/interface/MessageLogger.h>
0007 #include <iostream>
0008 
0009 //vpp_generated CSCTFSPCoreLogic::sp_;
0010 vpp_generated_2010_01_22 CSCTFSPCoreLogic::sp_2010_01_22_;
0011 vpp_generated_2010_07_28 CSCTFSPCoreLogic::sp_2010_07_28_;
0012 vpp_generated_2010_09_01 CSCTFSPCoreLogic::sp_2010_09_01_;
0013 vpp_generated_2010_10_11 CSCTFSPCoreLogic::sp_2010_10_11_;
0014 vpp_generated_2010_12_10 CSCTFSPCoreLogic::sp_2010_12_10_;
0015 vpp_generated_2011_01_18 CSCTFSPCoreLogic::sp_2011_01_18_;
0016 vpp_generated_2012_01_31 CSCTFSPCoreLogic::sp_2012_01_31_;
0017 vpp_generated_2012_03_13 CSCTFSPCoreLogic::sp_2012_03_13_;
0018 vpp_generated_2012_07_30 CSCTFSPCoreLogic::sp_2012_07_30_;
0019 vpp_generated_2014_04_24 CSCTFSPCoreLogic::sp_2014_04_24_;
0020 vpp_generated_2014_05_15 CSCTFSPCoreLogic::sp_2014_05_15_;
0021 
0022 // takes a trigger container and loads the first n bx of data into io_
0023 void CSCTFSPCoreLogic::loadData(const CSCTriggerContainer<csctf::TrackStub>& theStubs,
0024                                 const unsigned& endcap,
0025                                 const unsigned& sector,
0026                                 const int& minBX,
0027                                 const int& maxBX,
0028                                 const bool gangedME1a) {
0029   io_.clear();
0030   runme = false;
0031   io_.resize(maxBX - minBX + 2);
0032   unsigned relative_bx = 0;
0033 
0034   for (int bx = minBX; bx <= maxBX; ++bx) {
0035     for (int st = CSCDetId::minStationId(); st <= CSCDetId::maxStationId() + 1; ++st)  // 1 - 5 for DT stubs
0036     {
0037       std::vector<csctf::TrackStub> stub_list;
0038       std::vector<csctf::TrackStub>::const_iterator stubi;
0039       if (st == 1) {
0040         stub_list = theStubs.get(endcap, st, sector, 1, bx);
0041         std::vector<csctf::TrackStub> stub_list2 = theStubs.get(endcap, st, sector, 2, bx);
0042         stub_list.insert(stub_list.end(), stub_list2.begin(), stub_list2.end());
0043       } else
0044         stub_list = theStubs.get(endcap, st, sector, 0, bx);
0045 
0046       for (stubi = stub_list.begin(); stubi != stub_list.end(); stubi++) {
0047         runme |= stubi->isValid();
0048         unsigned csc_id = stubi->cscid();
0049         switch (st) {
0050           case 1:
0051             // correctly pass 10,11,12 ro the SP core if ME1a
0052             if (!gangedME1a)
0053               csc_id = stubi->cscidSeparateME1a();
0054             switch (stubi->getMPCLink()) {
0055               case 1:
0056                 if (CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 1) {
0057                   io_[relative_bx + 1].me1aVp = stubi->isValid();
0058                   io_[relative_bx + 1].me1aQp = stubi->getQuality();
0059                   io_[relative_bx + 1].me1aEtap = stubi->etaPacked();
0060                   io_[relative_bx + 1].me1aPhip = stubi->phiPacked();
0061                   io_[relative_bx + 1].me1aAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0062                   //io_[relative_bx+1].me1aCSCIdp  = stubi->cscid();
0063                   io_[relative_bx + 1].me1aCSCIdp = csc_id;
0064                   io_[relative_bx + 1].me1aCLCTp = stubi->getCLCTPattern();
0065                 }
0066                 if (CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 2) {
0067                   io_[relative_bx + 1].me1dVp = stubi->isValid();
0068                   io_[relative_bx + 1].me1dQp = stubi->getQuality();
0069                   io_[relative_bx + 1].me1dEtap = stubi->etaPacked();
0070                   io_[relative_bx + 1].me1dPhip = stubi->phiPacked();
0071                   io_[relative_bx + 1].me1dAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0072                   //io_[relative_bx+1].me1dCSCIdp  = stubi->cscid();
0073                   io_[relative_bx + 1].me1dCSCIdp = csc_id;
0074                   io_[relative_bx + 1].me1dCLCTp = stubi->getCLCTPattern();
0075                 }
0076                 break;
0077               case 2:
0078                 if (CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 1) {
0079                   io_[relative_bx + 1].me1bVp = stubi->isValid();
0080                   io_[relative_bx + 1].me1bQp = stubi->getQuality();
0081                   io_[relative_bx + 1].me1bEtap = stubi->etaPacked();
0082                   io_[relative_bx + 1].me1bPhip = stubi->phiPacked();
0083                   io_[relative_bx + 1].me1bAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0084                   //io_[relative_bx+1].me1bCSCIdp  = stubi->cscid();
0085                   io_[relative_bx + 1].me1dCSCIdp = csc_id;
0086                   io_[relative_bx + 1].me1bCLCTp = stubi->getCLCTPattern();
0087                 }
0088                 if (CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 2) {
0089                   io_[relative_bx + 1].me1eVp = stubi->isValid();
0090                   io_[relative_bx + 1].me1eQp = stubi->getQuality();
0091                   io_[relative_bx + 1].me1eEtap = stubi->etaPacked();
0092                   io_[relative_bx + 1].me1ePhip = stubi->phiPacked();
0093                   io_[relative_bx + 1].me1eAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0094                   //io_[relative_bx+1].me1eCSCIdp  = stubi->cscid();
0095                   io_[relative_bx + 1].me1dCSCIdp = csc_id;
0096                   io_[relative_bx + 1].me1eCLCTp = stubi->getCLCTPattern();
0097                 }
0098                 break;
0099               case 3:
0100                 if (CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 1) {
0101                   io_[relative_bx + 1].me1cVp = stubi->isValid();
0102                   io_[relative_bx + 1].me1cQp = stubi->getQuality();
0103                   io_[relative_bx + 1].me1cEtap = stubi->etaPacked();
0104                   io_[relative_bx + 1].me1cPhip = stubi->phiPacked();
0105                   io_[relative_bx + 1].me1cAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0106                   //io_[relative_bx+1].me1cCSCIdp  = stubi->cscid();
0107                   io_[relative_bx + 1].me1dCSCIdp = csc_id;
0108                   io_[relative_bx + 1].me1cCLCTp = stubi->getCLCTPattern();
0109                 }
0110                 if (CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 2) {
0111                   io_[relative_bx + 1].me1fVp = stubi->isValid();
0112                   io_[relative_bx + 1].me1fQp = stubi->getQuality();
0113                   io_[relative_bx + 1].me1fEtap = stubi->etaPacked();
0114                   io_[relative_bx + 1].me1fPhip = stubi->phiPacked();
0115                   io_[relative_bx + 1].me1fAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0116                   //io_[relative_bx+1].me1fCSCIdp  = stubi->cscid();
0117                   io_[relative_bx + 1].me1dCSCIdp = csc_id;
0118                   io_[relative_bx + 1].me1fCLCTp = stubi->getCLCTPattern();
0119                 }
0120                 break;
0121               default:
0122                 edm::LogWarning("CSCTFSPCoreLogic::loadData()")
0123                     << "SERIOUS ERROR: MPC LINK " << stubi->getMPCLink() << " NOT IN RANGE [1,3]\n";
0124             };
0125             break;
0126           case 2:
0127             switch (stubi->getMPCLink()) {
0128               case 1:
0129                 io_[relative_bx + 1].me2aVp = stubi->isValid();
0130                 io_[relative_bx + 1].me2aQp = stubi->getQuality();
0131                 io_[relative_bx + 1].me2aEtap = stubi->etaPacked();
0132                 io_[relative_bx + 1].me2aPhip = stubi->phiPacked();
0133                 io_[relative_bx + 1].me2aAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0134                 break;
0135               case 2:
0136                 io_[relative_bx + 1].me2bVp = stubi->isValid();
0137                 io_[relative_bx + 1].me2bQp = stubi->getQuality();
0138                 io_[relative_bx + 1].me2bEtap = stubi->etaPacked();
0139                 io_[relative_bx + 1].me2bPhip = stubi->phiPacked();
0140                 io_[relative_bx + 1].me2bAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0141                 break;
0142               case 3:
0143                 io_[relative_bx + 1].me2cVp = stubi->isValid();
0144                 io_[relative_bx + 1].me2cQp = stubi->getQuality();
0145                 io_[relative_bx + 1].me2cEtap = stubi->etaPacked();
0146                 io_[relative_bx + 1].me2cPhip = stubi->phiPacked();
0147                 io_[relative_bx + 1].me2cAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0148                 break;
0149               default:
0150                 edm::LogWarning("CSCTFSPCoreLogic::loadData()")
0151                     << "SERIOUS ERROR: MPC LINK " << stubi->getMPCLink() << " NOT IN RANGE [1,3]\n";
0152             };
0153             break;
0154           case 3:
0155             switch (stubi->getMPCLink()) {
0156               case 1:
0157                 io_[relative_bx + 1].me3aVp = stubi->isValid();
0158                 io_[relative_bx + 1].me3aQp = stubi->getQuality();
0159                 io_[relative_bx + 1].me3aEtap = stubi->etaPacked();
0160                 io_[relative_bx + 1].me3aPhip = stubi->phiPacked();
0161                 io_[relative_bx + 1].me3aAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0162                 break;
0163               case 2:
0164                 io_[relative_bx + 1].me3bVp = stubi->isValid();
0165                 io_[relative_bx + 1].me3bQp = stubi->getQuality();
0166                 io_[relative_bx + 1].me3bEtap = stubi->etaPacked();
0167                 io_[relative_bx + 1].me3bPhip = stubi->phiPacked();
0168                 io_[relative_bx + 1].me3bAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0169                 break;
0170               case 3:
0171                 io_[relative_bx + 1].me3cVp = stubi->isValid();
0172                 io_[relative_bx + 1].me3cQp = stubi->getQuality();
0173                 io_[relative_bx + 1].me3cEtap = stubi->etaPacked();
0174                 io_[relative_bx + 1].me3cPhip = stubi->phiPacked();
0175                 io_[relative_bx + 1].me3cAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0176                 break;
0177               default:
0178                 edm::LogWarning("CSCTFSPCoreLogic::loadData()")
0179                     << "SERIOUS ERROR: MPC LINK " << stubi->getMPCLink() << " NOT IN RANGE [1,3]\n";
0180             };
0181             break;
0182           case 4:
0183             switch (stubi->getMPCLink()) {
0184               case 1:
0185                 io_[relative_bx + 1].me4aVp = stubi->isValid();
0186                 io_[relative_bx + 1].me4aQp = stubi->getQuality();
0187                 io_[relative_bx + 1].me4aEtap = stubi->etaPacked();
0188                 io_[relative_bx + 1].me4aPhip = stubi->phiPacked();
0189                 io_[relative_bx + 1].me4aAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0190                 break;
0191               case 2:
0192                 io_[relative_bx + 1].me4bVp = stubi->isValid();
0193                 io_[relative_bx + 1].me4bQp = stubi->getQuality();
0194                 io_[relative_bx + 1].me4bEtap = stubi->etaPacked();
0195                 io_[relative_bx + 1].me4bPhip = stubi->phiPacked();
0196                 io_[relative_bx + 1].me4bAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0197                 break;
0198               case 3:
0199                 io_[relative_bx + 1].me4cVp = stubi->isValid();
0200                 io_[relative_bx + 1].me4cQp = stubi->getQuality();
0201                 io_[relative_bx + 1].me4cEtap = stubi->etaPacked();
0202                 io_[relative_bx + 1].me4cPhip = stubi->phiPacked();
0203                 io_[relative_bx + 1].me4cAmp = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
0204                 break;
0205               default:
0206                 edm::LogWarning("CSCTFSPCoreLogic::loadData()")
0207                     << "SERIOUS ERROR: MPC LINK " << stubi->getMPCLink() << " NOT IN RANGE [1,3]\n";
0208             };
0209             break;
0210           case 5:
0211             // We need to put the DT stubs 1 BX ahead of the CSC ones for the TF firmware
0212             //std::cout << "DT Stub at bx: " << relative_bx << std::endl;
0213             switch (stubi->getMPCLink()) {
0214               case 1:
0215                 if (this->GetSPFirmwareVersion() < 20100629) {
0216                   // introducing the bug which was causing only even DT qualities
0217                   // to get accepted
0218                   if (stubi->getQuality() % 2 == 1) {
0219                     //io_[relative_bx].mb1aVp   = stubi->isValid();
0220                     io_[relative_bx].mb1aVp = stubi->getStrip();
0221                     io_[relative_bx].mb1aQp = stubi->getQuality();
0222                     io_[relative_bx].mb1aPhip = stubi->phiPacked();
0223                     io_[relative_bx].mb1aBendp = stubi->getBend();
0224                   }
0225                 } else {
0226                   io_[relative_bx].mb1aVp = stubi->getStrip();
0227                   io_[relative_bx].mb1aQp = stubi->getQuality();
0228                   io_[relative_bx].mb1aPhip = stubi->phiPacked();
0229                   io_[relative_bx].mb1aBendp = stubi->getBend();
0230                 }
0231                 break;
0232               case 2:
0233                 if (this->GetSPFirmwareVersion() < 20100629) {
0234                   // introducing the bug which was causing only even DT qualities
0235                   // to get accepted
0236                   if (stubi->getQuality() % 2 == 1) {
0237                     //io_[relative_bx].mb1aVp   = stubi->isValid();
0238                     io_[relative_bx].mb1bVp = stubi->getStrip();
0239                     io_[relative_bx].mb1bQp = stubi->getQuality();
0240                     io_[relative_bx].mb1bPhip = stubi->phiPacked();
0241                     io_[relative_bx].mb1bBendp = stubi->getBend();
0242                   }
0243                 } else {
0244                   io_[relative_bx].mb1bVp = stubi->getStrip();
0245                   io_[relative_bx].mb1bQp = stubi->getQuality();
0246                   io_[relative_bx].mb1bPhip = stubi->phiPacked();
0247                   io_[relative_bx].mb1bBendp = stubi->getBend();
0248                 }
0249                 break;
0250                 /*case 3:
0251                     io_[relative_bx].mb1cVp   = stubi->isValid();
0252                     io_[relative_bx].mb1cQp   = stubi->getQuality();
0253                     io_[relative_bx].mb1cPhip = stubi->phiPacked();
0254                     break;
0255                     case 4:
0256                     io_[relative_bx].mb1dVp   = stubi->isValid();
0257                     io_[relative_bx].mb1dQp   = stubi->getQuality();
0258                     io_[relative_bx].mb1dPhip = stubi->phiPacked();
0259                     break;*/
0260               default:
0261                 edm::LogWarning("CSCTFSPCoreLogic::loadData()")
0262                     << "SERIOUS ERROR: DT LINK " << stubi->getMPCLink() << " NOT IN RANGE [1,4]\n";
0263             }
0264             break;
0265           default:
0266             edm::LogWarning("CSCTFSPCoreLogic::loadData()")
0267                 << "SERIOUS ERROR: STATION  " << st << " NOT IN RANGE [1,5]\n";
0268         };
0269       }
0270     }
0271     ++relative_bx;
0272   }
0273 }
0274 
0275 // Here we should assume the loadData() has been called...
0276 // But in reality you don't need to.
0277 bool CSCTFSPCoreLogic::run(const unsigned& endcap,
0278                            const unsigned& sector,
0279                            const unsigned& latency,
0280                            const unsigned& etamin1,
0281                            const unsigned& etamin2,
0282                            const unsigned& etamin3,
0283                            const unsigned& etamin4,
0284                            const unsigned& etamin5,
0285                            const unsigned& etamin6,
0286                            const unsigned& etamin7,
0287                            const unsigned& etamin8,
0288                            const unsigned& etamax1,
0289                            const unsigned& etamax2,
0290                            const unsigned& etamax3,
0291                            const unsigned& etamax4,
0292                            const unsigned& etamax5,
0293                            const unsigned& etamax6,
0294                            const unsigned& etamax7,
0295                            const unsigned& etamax8,
0296                            const unsigned& etawin1,
0297                            const unsigned& etawin2,
0298                            const unsigned& etawin3,
0299                            const unsigned& etawin4,
0300                            const unsigned& etawin5,
0301                            const unsigned& etawin6,
0302                            const unsigned& etawin7,
0303                            const unsigned& mindphip,
0304                            const unsigned& mindetap,
0305                            const unsigned& mindeta12_accp,
0306                            const unsigned& maxdeta12_accp,
0307                            const unsigned& maxdphi12_accp,
0308                            const unsigned& mindeta13_accp,
0309                            const unsigned& maxdeta13_accp,
0310                            const unsigned& maxdphi13_accp,
0311                            const unsigned& mindeta112_accp,
0312                            const unsigned& maxdeta112_accp,
0313                            const unsigned& maxdphi112_accp,
0314                            const unsigned& mindeta113_accp,
0315                            const unsigned& maxdeta113_accp,
0316                            const unsigned& maxdphi113_accp,
0317                            const unsigned& mindphip_halo,
0318                            const unsigned& mindetap_halo,
0319                            const unsigned& straightp,
0320                            const unsigned& curvedp,
0321                            const unsigned& mbaPhiOff,
0322                            const unsigned& mbbPhiOff,
0323                            const unsigned& m_extend_length,
0324                            const unsigned& m_allowALCTonly,
0325                            const unsigned& m_allowCLCTonly,
0326                            const unsigned& m_preTrigger,
0327                            const unsigned& m_widePhi,
0328                            const int& minBX,
0329                            const int& maxBX) {
0330   mytracks.clear();
0331 
0332   int train_length = io_.size();
0333   int bx = 0;
0334   io_.resize(train_length + latency);
0335   std::vector<SPio>::iterator io;
0336 
0337   // run over enough clock cycles to get tracks from input stubs.
0338   for (io = io_.begin(); io != io_.end() && runme; io++) {
0339     switch (this->GetCoreFirmwareVersion()) {
0340       case 20100122:
0341         sp_2010_01_22_.wrap(io->me1aVp,
0342                             io->me1aQp,
0343                             io->me1aEtap,
0344                             io->me1aPhip,
0345                             io->me1aCSCIdp,
0346                             io->me1bVp,
0347                             io->me1bQp,
0348                             io->me1bEtap,
0349                             io->me1bPhip,
0350                             io->me1bCSCIdp,
0351                             io->me1cVp,
0352                             io->me1cQp,
0353                             io->me1cEtap,
0354                             io->me1cPhip,
0355                             io->me1cCSCIdp,
0356 
0357                             io->me1dVp,
0358                             io->me1dQp,
0359                             io->me1dEtap,
0360                             io->me1dPhip,
0361                             io->me1dCSCIdp,
0362                             io->me1eVp,
0363                             io->me1eQp,
0364                             io->me1eEtap,
0365                             io->me1ePhip,
0366                             io->me1eCSCIdp,
0367                             io->me1fVp,
0368                             io->me1fQp,
0369                             io->me1fEtap,
0370                             io->me1fPhip,
0371                             io->me1fCSCIdp,
0372 
0373                             io->me2aVp,
0374                             io->me2aQp,
0375                             io->me2aEtap,
0376                             io->me2aPhip,
0377                             io->me2bVp,
0378                             io->me2bQp,
0379                             io->me2bEtap,
0380                             io->me2bPhip,
0381                             io->me2cVp,
0382                             io->me2cQp,
0383                             io->me2cEtap,
0384                             io->me2cPhip,
0385 
0386                             io->me3aVp,
0387                             io->me3aQp,
0388                             io->me3aEtap,
0389                             io->me3aPhip,
0390                             io->me3bVp,
0391                             io->me3bQp,
0392                             io->me3bEtap,
0393                             io->me3bPhip,
0394                             io->me3cVp,
0395                             io->me3cQp,
0396                             io->me3cEtap,
0397                             io->me3cPhip,
0398 
0399                             io->me4aVp,
0400                             io->me4aQp,
0401                             io->me4aEtap,
0402                             io->me4aPhip,
0403                             io->me4bVp,
0404                             io->me4bQp,
0405                             io->me4bEtap,
0406                             io->me4bPhip,
0407                             io->me4cVp,
0408                             io->me4cQp,
0409                             io->me4cEtap,
0410                             io->me4cPhip,
0411 
0412                             io->mb1aVp,
0413                             io->mb1aQp,
0414                             io->mb1aPhip,
0415                             io->mb1bVp,
0416                             io->mb1bQp,
0417                             io->mb1bPhip,
0418                             io->mb1cVp,
0419                             io->mb1cQp,
0420                             io->mb1cPhip,
0421                             io->mb1dVp,
0422                             io->mb1dQp,
0423                             io->mb1dPhip,
0424 
0425                             io->ptHp,
0426                             io->signHp,
0427                             io->modeMemHp,
0428                             io->etaPTHp,
0429                             io->FRHp,
0430                             io->phiHp,
0431                             io->ptMp,
0432                             io->signMp,
0433                             io->modeMemMp,
0434                             io->etaPTMp,
0435                             io->FRMp,
0436                             io->phiMp,
0437                             io->ptLp,
0438                             io->signLp,
0439                             io->modeMemLp,
0440                             io->etaPTLp,
0441                             io->FRLp,
0442                             io->phiLp,
0443 
0444                             io->me1idH,
0445                             io->me2idH,
0446                             io->me3idH,
0447                             io->me4idH,
0448                             io->mb1idH,
0449                             io->mb2idH,
0450                             io->me1idM,
0451                             io->me2idM,
0452                             io->me3idM,
0453                             io->me4idM,
0454                             io->mb1idM,
0455                             io->mb2idM,
0456                             io->me1idL,
0457                             io->me2idL,
0458                             io->me3idL,
0459                             io->me4idL,
0460                             io->mb1idL,
0461                             io->mb2idL,
0462 
0463                             etamin1,
0464                             etamin2,
0465                             etamin3,
0466                             etamin4,
0467                             etamin5,
0468                             etamin6,
0469                             etamin7,
0470                             etamin8,
0471                             etamax1,
0472                             etamax2,
0473                             etamax3,
0474                             etamax4,
0475                             etamax5,
0476                             etamax6,
0477                             etamax7,
0478                             etamax8,
0479                             etawin1,
0480                             etawin2,
0481                             etawin3,
0482                             etawin4,
0483                             etawin5,
0484                             etawin6,
0485                             etawin7,
0486                             mindphip,
0487                             mindetap,
0488 
0489                             mindeta12_accp,
0490                             maxdeta12_accp,
0491                             maxdphi12_accp,
0492                             mindeta13_accp,
0493                             maxdeta13_accp,
0494                             maxdphi13_accp,
0495 
0496                             mindeta112_accp,
0497                             maxdeta112_accp,
0498                             maxdphi112_accp,
0499                             mindeta113_accp,
0500                             maxdeta113_accp,
0501                             maxdphi113_accp,
0502                             mindphip_halo,
0503                             mindetap_halo,
0504 
0505                             straightp,
0506                             curvedp,
0507                             mbaPhiOff,
0508                             mbbPhiOff,
0509                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
0510                                 (m_extend_length << 1) | (m_widePhi));
0511 
0512         break;
0513       case 20100728:
0514         sp_2010_07_28_.wrap(io->me1aVp,
0515                             io->me1aQp,
0516                             io->me1aEtap,
0517                             io->me1aPhip,
0518                             io->me1aCSCIdp,
0519                             io->me1bVp,
0520                             io->me1bQp,
0521                             io->me1bEtap,
0522                             io->me1bPhip,
0523                             io->me1bCSCIdp,
0524                             io->me1cVp,
0525                             io->me1cQp,
0526                             io->me1cEtap,
0527                             io->me1cPhip,
0528                             io->me1cCSCIdp,
0529 
0530                             io->me1dVp,
0531                             io->me1dQp,
0532                             io->me1dEtap,
0533                             io->me1dPhip,
0534                             io->me1dCSCIdp,
0535                             io->me1eVp,
0536                             io->me1eQp,
0537                             io->me1eEtap,
0538                             io->me1ePhip,
0539                             io->me1eCSCIdp,
0540                             io->me1fVp,
0541                             io->me1fQp,
0542                             io->me1fEtap,
0543                             io->me1fPhip,
0544                             io->me1fCSCIdp,
0545 
0546                             io->me2aVp,
0547                             io->me2aQp,
0548                             io->me2aEtap,
0549                             io->me2aPhip,
0550                             io->me2bVp,
0551                             io->me2bQp,
0552                             io->me2bEtap,
0553                             io->me2bPhip,
0554                             io->me2cVp,
0555                             io->me2cQp,
0556                             io->me2cEtap,
0557                             io->me2cPhip,
0558 
0559                             io->me3aVp,
0560                             io->me3aQp,
0561                             io->me3aEtap,
0562                             io->me3aPhip,
0563                             io->me3bVp,
0564                             io->me3bQp,
0565                             io->me3bEtap,
0566                             io->me3bPhip,
0567                             io->me3cVp,
0568                             io->me3cQp,
0569                             io->me3cEtap,
0570                             io->me3cPhip,
0571 
0572                             io->me4aVp,
0573                             io->me4aQp,
0574                             io->me4aEtap,
0575                             io->me4aPhip,
0576                             io->me4bVp,
0577                             io->me4bQp,
0578                             io->me4bEtap,
0579                             io->me4bPhip,
0580                             io->me4cVp,
0581                             io->me4cQp,
0582                             io->me4cEtap,
0583                             io->me4cPhip,
0584 
0585                             io->mb1aVp,
0586                             io->mb1aQp,
0587                             io->mb1aPhip,
0588                             io->mb1bVp,
0589                             io->mb1bQp,
0590                             io->mb1bPhip,
0591                             io->mb1cVp,
0592                             io->mb1cQp,
0593                             io->mb1cPhip,
0594                             io->mb1dVp,
0595                             io->mb1dQp,
0596                             io->mb1dPhip,
0597 
0598                             io->ptHp,
0599                             io->signHp,
0600                             io->modeMemHp,
0601                             io->etaPTHp,
0602                             io->FRHp,
0603                             io->phiHp,
0604                             io->ptMp,
0605                             io->signMp,
0606                             io->modeMemMp,
0607                             io->etaPTMp,
0608                             io->FRMp,
0609                             io->phiMp,
0610                             io->ptLp,
0611                             io->signLp,
0612                             io->modeMemLp,
0613                             io->etaPTLp,
0614                             io->FRLp,
0615                             io->phiLp,
0616 
0617                             io->me1idH,
0618                             io->me2idH,
0619                             io->me3idH,
0620                             io->me4idH,
0621                             io->mb1idH,
0622                             io->mb2idH,
0623                             io->me1idM,
0624                             io->me2idM,
0625                             io->me3idM,
0626                             io->me4idM,
0627                             io->mb1idM,
0628                             io->mb2idM,
0629                             io->me1idL,
0630                             io->me2idL,
0631                             io->me3idL,
0632                             io->me4idL,
0633                             io->mb1idL,
0634                             io->mb2idL,
0635 
0636                             etamin1,
0637                             etamin2,
0638                             etamin3,
0639                             etamin4,
0640                             etamin5,
0641                             etamin6,
0642                             etamin7,
0643                             etamin8,
0644                             etamax1,
0645                             etamax2,
0646                             etamax3,
0647                             etamax4,
0648                             etamax5,
0649                             etamax6,
0650                             etamax7,
0651                             etamax8,
0652                             etawin1,
0653                             etawin2,
0654                             etawin3,
0655                             etawin4,
0656                             etawin5,
0657                             etawin6,
0658                             etawin7,
0659                             mindphip,
0660                             mindetap,
0661 
0662                             mindeta12_accp,
0663                             maxdeta12_accp,
0664                             maxdphi12_accp,
0665                             mindeta13_accp,
0666                             maxdeta13_accp,
0667                             maxdphi13_accp,
0668 
0669                             mindeta112_accp,
0670                             maxdeta112_accp,
0671                             maxdphi112_accp,
0672                             mindeta113_accp,
0673                             maxdeta113_accp,
0674                             maxdphi113_accp,
0675                             mindphip_halo,
0676                             mindetap_halo,
0677 
0678                             straightp,
0679                             curvedp,
0680                             mbaPhiOff,
0681                             mbbPhiOff,
0682                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
0683                                 (m_extend_length << 1) | (m_widePhi));
0684         break;
0685       case 20100901:
0686         sp_2010_09_01_.wrap(io->me1aVp,
0687                             io->me1aQp,
0688                             io->me1aEtap,
0689                             io->me1aPhip,
0690                             io->me1aCSCIdp,
0691                             io->me1bVp,
0692                             io->me1bQp,
0693                             io->me1bEtap,
0694                             io->me1bPhip,
0695                             io->me1bCSCIdp,
0696                             io->me1cVp,
0697                             io->me1cQp,
0698                             io->me1cEtap,
0699                             io->me1cPhip,
0700                             io->me1cCSCIdp,
0701 
0702                             io->me1dVp,
0703                             io->me1dQp,
0704                             io->me1dEtap,
0705                             io->me1dPhip,
0706                             io->me1dCSCIdp,
0707                             io->me1eVp,
0708                             io->me1eQp,
0709                             io->me1eEtap,
0710                             io->me1ePhip,
0711                             io->me1eCSCIdp,
0712                             io->me1fVp,
0713                             io->me1fQp,
0714                             io->me1fEtap,
0715                             io->me1fPhip,
0716                             io->me1fCSCIdp,
0717 
0718                             io->me2aVp,
0719                             io->me2aQp,
0720                             io->me2aEtap,
0721                             io->me2aPhip,
0722                             io->me2bVp,
0723                             io->me2bQp,
0724                             io->me2bEtap,
0725                             io->me2bPhip,
0726                             io->me2cVp,
0727                             io->me2cQp,
0728                             io->me2cEtap,
0729                             io->me2cPhip,
0730 
0731                             io->me3aVp,
0732                             io->me3aQp,
0733                             io->me3aEtap,
0734                             io->me3aPhip,
0735                             io->me3bVp,
0736                             io->me3bQp,
0737                             io->me3bEtap,
0738                             io->me3bPhip,
0739                             io->me3cVp,
0740                             io->me3cQp,
0741                             io->me3cEtap,
0742                             io->me3cPhip,
0743 
0744                             io->me4aVp,
0745                             io->me4aQp,
0746                             io->me4aEtap,
0747                             io->me4aPhip,
0748                             io->me4bVp,
0749                             io->me4bQp,
0750                             io->me4bEtap,
0751                             io->me4bPhip,
0752                             io->me4cVp,
0753                             io->me4cQp,
0754                             io->me4cEtap,
0755                             io->me4cPhip,
0756 
0757                             io->mb1aVp,
0758                             io->mb1aQp,
0759                             io->mb1aPhip,
0760                             io->mb1bVp,
0761                             io->mb1bQp,
0762                             io->mb1bPhip,
0763                             io->mb1cVp,
0764                             io->mb1cQp,
0765                             io->mb1cPhip,
0766                             io->mb1dVp,
0767                             io->mb1dQp,
0768                             io->mb1dPhip,
0769 
0770                             io->ptHp,
0771                             io->signHp,
0772                             io->modeMemHp,
0773                             io->etaPTHp,
0774                             io->FRHp,
0775                             io->phiHp,
0776                             io->ptMp,
0777                             io->signMp,
0778                             io->modeMemMp,
0779                             io->etaPTMp,
0780                             io->FRMp,
0781                             io->phiMp,
0782                             io->ptLp,
0783                             io->signLp,
0784                             io->modeMemLp,
0785                             io->etaPTLp,
0786                             io->FRLp,
0787                             io->phiLp,
0788 
0789                             io->me1idH,
0790                             io->me2idH,
0791                             io->me3idH,
0792                             io->me4idH,
0793                             io->mb1idH,
0794                             io->mb2idH,
0795                             io->me1idM,
0796                             io->me2idM,
0797                             io->me3idM,
0798                             io->me4idM,
0799                             io->mb1idM,
0800                             io->mb2idM,
0801                             io->me1idL,
0802                             io->me2idL,
0803                             io->me3idL,
0804                             io->me4idL,
0805                             io->mb1idL,
0806                             io->mb2idL,
0807 
0808                             etamin1,
0809                             etamin2,
0810                             etamin3,
0811                             etamin4,
0812                             etamin5,
0813                             etamin6,
0814                             etamin7,
0815                             etamin8,
0816                             etamax1,
0817                             etamax2,
0818                             etamax3,
0819                             etamax4,
0820                             etamax5,
0821                             etamax6,
0822                             etamax7,
0823                             etamax8,
0824                             etawin1,
0825                             etawin2,
0826                             etawin3,
0827                             etawin4,
0828                             etawin5,
0829                             etawin6,
0830                             etawin7,
0831                             mindphip,
0832                             mindetap,
0833 
0834                             mindeta12_accp,
0835                             maxdeta12_accp,
0836                             maxdphi12_accp,
0837                             mindeta13_accp,
0838                             maxdeta13_accp,
0839                             maxdphi13_accp,
0840 
0841                             mindeta112_accp,
0842                             maxdeta112_accp,
0843                             maxdphi112_accp,
0844                             mindeta113_accp,
0845                             maxdeta113_accp,
0846                             maxdphi113_accp,
0847                             mindphip_halo,
0848                             mindetap_halo,
0849 
0850                             straightp,
0851                             curvedp,
0852                             mbaPhiOff,
0853                             mbbPhiOff,
0854                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
0855                                 (m_extend_length << 1) | (m_widePhi));
0856         break;
0857 
0858       case 20101011:
0859         sp_2010_10_11_.wrap(io->me1aVp,
0860                             io->me1aQp,
0861                             io->me1aEtap,
0862                             io->me1aPhip,
0863                             io->me1aCSCIdp,
0864                             io->me1bVp,
0865                             io->me1bQp,
0866                             io->me1bEtap,
0867                             io->me1bPhip,
0868                             io->me1bCSCIdp,
0869                             io->me1cVp,
0870                             io->me1cQp,
0871                             io->me1cEtap,
0872                             io->me1cPhip,
0873                             io->me1cCSCIdp,
0874 
0875                             io->me1dVp,
0876                             io->me1dQp,
0877                             io->me1dEtap,
0878                             io->me1dPhip,
0879                             io->me1dCSCIdp,
0880                             io->me1eVp,
0881                             io->me1eQp,
0882                             io->me1eEtap,
0883                             io->me1ePhip,
0884                             io->me1eCSCIdp,
0885                             io->me1fVp,
0886                             io->me1fQp,
0887                             io->me1fEtap,
0888                             io->me1fPhip,
0889                             io->me1fCSCIdp,
0890 
0891                             io->me2aVp,
0892                             io->me2aQp,
0893                             io->me2aEtap,
0894                             io->me2aPhip,
0895                             io->me2bVp,
0896                             io->me2bQp,
0897                             io->me2bEtap,
0898                             io->me2bPhip,
0899                             io->me2cVp,
0900                             io->me2cQp,
0901                             io->me2cEtap,
0902                             io->me2cPhip,
0903 
0904                             io->me3aVp,
0905                             io->me3aQp,
0906                             io->me3aEtap,
0907                             io->me3aPhip,
0908                             io->me3bVp,
0909                             io->me3bQp,
0910                             io->me3bEtap,
0911                             io->me3bPhip,
0912                             io->me3cVp,
0913                             io->me3cQp,
0914                             io->me3cEtap,
0915                             io->me3cPhip,
0916 
0917                             io->me4aVp,
0918                             io->me4aQp,
0919                             io->me4aEtap,
0920                             io->me4aPhip,
0921                             io->me4bVp,
0922                             io->me4bQp,
0923                             io->me4bEtap,
0924                             io->me4bPhip,
0925                             io->me4cVp,
0926                             io->me4cQp,
0927                             io->me4cEtap,
0928                             io->me4cPhip,
0929 
0930                             io->mb1aVp,
0931                             io->mb1aQp,
0932                             io->mb1aPhip,
0933                             io->mb1bVp,
0934                             io->mb1bQp,
0935                             io->mb1bPhip,
0936                             io->mb1cVp,
0937                             io->mb1cQp,
0938                             io->mb1cPhip,
0939                             io->mb1dVp,
0940                             io->mb1dQp,
0941                             io->mb1dPhip,
0942 
0943                             io->ptHp,
0944                             io->signHp,
0945                             io->modeMemHp,
0946                             io->etaPTHp,
0947                             io->FRHp,
0948                             io->phiHp,
0949                             io->ptMp,
0950                             io->signMp,
0951                             io->modeMemMp,
0952                             io->etaPTMp,
0953                             io->FRMp,
0954                             io->phiMp,
0955                             io->ptLp,
0956                             io->signLp,
0957                             io->modeMemLp,
0958                             io->etaPTLp,
0959                             io->FRLp,
0960                             io->phiLp,
0961 
0962                             io->me1idH,
0963                             io->me2idH,
0964                             io->me3idH,
0965                             io->me4idH,
0966                             io->mb1idH,
0967                             io->mb2idH,
0968                             io->me1idM,
0969                             io->me2idM,
0970                             io->me3idM,
0971                             io->me4idM,
0972                             io->mb1idM,
0973                             io->mb2idM,
0974                             io->me1idL,
0975                             io->me2idL,
0976                             io->me3idL,
0977                             io->me4idL,
0978                             io->mb1idL,
0979                             io->mb2idL,
0980 
0981                             etamin1,
0982                             etamin2,
0983                             etamin3,
0984                             etamin4,
0985                             etamin5,
0986                             /*etamin6,*/ etamin7,
0987                             etamin8,
0988                             etamax1,
0989                             etamax2,
0990                             etamax3,
0991                             etamax4,
0992                             etamax5,
0993                             /*etamax6,*/ etamax7,
0994                             etamax8,
0995                             etawin1,
0996                             etawin2,
0997                             etawin3,
0998                             etawin4,
0999                             etawin5,
1000                             /*etawin6,*/ etawin7,
1001                             mindphip,
1002                             mindetap,
1003 
1004                             mindeta12_accp,
1005                             maxdeta12_accp,
1006                             maxdphi12_accp,
1007                             mindeta13_accp,
1008                             maxdeta13_accp,
1009                             maxdphi13_accp,
1010 
1011                             mindeta112_accp,
1012                             maxdeta112_accp,
1013                             maxdphi112_accp,
1014                             mindeta113_accp,
1015                             maxdeta113_accp,
1016                             maxdphi113_accp,
1017                             mindphip_halo,
1018                             mindetap_halo,
1019 
1020                             straightp,
1021                             curvedp,
1022                             mbaPhiOff,
1023                             mbbPhiOff,
1024                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
1025                                 (m_extend_length << 1) | (m_widePhi));
1026         break;
1027 
1028       case 20101210:
1029         sp_2010_12_10_.wrap(io->me1aVp,
1030                             io->me1aQp,
1031                             io->me1aEtap,
1032                             io->me1aPhip,
1033                             io->me1aCSCIdp,
1034                             io->me1bVp,
1035                             io->me1bQp,
1036                             io->me1bEtap,
1037                             io->me1bPhip,
1038                             io->me1bCSCIdp,
1039                             io->me1cVp,
1040                             io->me1cQp,
1041                             io->me1cEtap,
1042                             io->me1cPhip,
1043                             io->me1cCSCIdp,
1044 
1045                             io->me1dVp,
1046                             io->me1dQp,
1047                             io->me1dEtap,
1048                             io->me1dPhip,
1049                             io->me1dCSCIdp,
1050                             io->me1eVp,
1051                             io->me1eQp,
1052                             io->me1eEtap,
1053                             io->me1ePhip,
1054                             io->me1eCSCIdp,
1055                             io->me1fVp,
1056                             io->me1fQp,
1057                             io->me1fEtap,
1058                             io->me1fPhip,
1059                             io->me1fCSCIdp,
1060 
1061                             io->me2aVp,
1062                             io->me2aQp,
1063                             io->me2aEtap,
1064                             io->me2aPhip,
1065                             io->me2bVp,
1066                             io->me2bQp,
1067                             io->me2bEtap,
1068                             io->me2bPhip,
1069                             io->me2cVp,
1070                             io->me2cQp,
1071                             io->me2cEtap,
1072                             io->me2cPhip,
1073 
1074                             io->me3aVp,
1075                             io->me3aQp,
1076                             io->me3aEtap,
1077                             io->me3aPhip,
1078                             io->me3bVp,
1079                             io->me3bQp,
1080                             io->me3bEtap,
1081                             io->me3bPhip,
1082                             io->me3cVp,
1083                             io->me3cQp,
1084                             io->me3cEtap,
1085                             io->me3cPhip,
1086 
1087                             io->me4aVp,
1088                             io->me4aQp,
1089                             io->me4aEtap,
1090                             io->me4aPhip,
1091                             io->me4bVp,
1092                             io->me4bQp,
1093                             io->me4bEtap,
1094                             io->me4bPhip,
1095                             io->me4cVp,
1096                             io->me4cQp,
1097                             io->me4cEtap,
1098                             io->me4cPhip,
1099 
1100                             io->mb1aVp,
1101                             io->mb1aQp,
1102                             io->mb1aPhip,
1103                             io->mb1bVp,
1104                             io->mb1bQp,
1105                             io->mb1bPhip,
1106                             io->mb1cVp,
1107                             io->mb1cQp,
1108                             io->mb1cPhip,
1109                             io->mb1dVp,
1110                             io->mb1dQp,
1111                             io->mb1dPhip,
1112 
1113                             io->ptHp,
1114                             io->signHp,
1115                             io->modeMemHp,
1116                             io->etaPTHp,
1117                             io->FRHp,
1118                             io->phiHp,
1119                             io->ptMp,
1120                             io->signMp,
1121                             io->modeMemMp,
1122                             io->etaPTMp,
1123                             io->FRMp,
1124                             io->phiMp,
1125                             io->ptLp,
1126                             io->signLp,
1127                             io->modeMemLp,
1128                             io->etaPTLp,
1129                             io->FRLp,
1130                             io->phiLp,
1131 
1132                             io->me1idH,
1133                             io->me2idH,
1134                             io->me3idH,
1135                             io->me4idH,
1136                             io->mb1idH,
1137                             io->mb2idH,
1138                             io->me1idM,
1139                             io->me2idM,
1140                             io->me3idM,
1141                             io->me4idM,
1142                             io->mb1idM,
1143                             io->mb2idM,
1144                             io->me1idL,
1145                             io->me2idL,
1146                             io->me3idL,
1147                             io->me4idL,
1148                             io->mb1idL,
1149                             io->mb2idL,
1150 
1151                             etamin1,
1152                             etamin2,
1153                             etamin3,
1154                             etamin4,
1155                             etamin5,
1156                             /*etamin6,*/ etamin7,
1157                             etamin8,
1158                             etamax1,
1159                             etamax2,
1160                             etamax3,
1161                             etamax4,
1162                             etamax5,
1163                             /*etamax6,*/ etamax7,
1164                             etamax8,
1165                             etawin1,
1166                             etawin2,
1167                             etawin3,
1168                             etawin4,
1169                             etawin5,
1170                             /*etawin6,*/ etawin7,
1171                             mindphip,
1172                             mindetap,
1173 
1174                             mindeta12_accp,
1175                             maxdeta12_accp,
1176                             maxdphi12_accp,
1177                             mindeta13_accp,
1178                             maxdeta13_accp,
1179                             maxdphi13_accp,
1180 
1181                             mindeta112_accp,
1182                             maxdeta112_accp,
1183                             maxdphi112_accp,
1184                             mindeta113_accp,
1185                             maxdeta113_accp,
1186                             maxdphi113_accp,
1187                             mindphip_halo,
1188                             mindetap_halo,
1189 
1190                             straightp,
1191                             curvedp,
1192                             mbaPhiOff,
1193                             mbbPhiOff,
1194                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
1195                                 (m_extend_length << 1) | (m_widePhi));
1196         break;
1197 
1198       case 20110118:
1199         sp_2011_01_18_.wrap(io->me1aVp,
1200                             io->me1aQp,
1201                             io->me1aEtap,
1202                             io->me1aPhip,
1203                             io->me1aCSCIdp,
1204                             io->me1aCLCTp,
1205                             io->me1bVp,
1206                             io->me1bQp,
1207                             io->me1bEtap,
1208                             io->me1bPhip,
1209                             io->me1bCSCIdp,
1210                             io->me1bCLCTp,
1211                             io->me1cVp,
1212                             io->me1cQp,
1213                             io->me1cEtap,
1214                             io->me1cPhip,
1215                             io->me1cCSCIdp,
1216                             io->me1cCLCTp,
1217 
1218                             io->me1dVp,
1219                             io->me1dQp,
1220                             io->me1dEtap,
1221                             io->me1dPhip,
1222                             io->me1dCSCIdp,
1223                             io->me1dCLCTp,
1224                             io->me1eVp,
1225                             io->me1eQp,
1226                             io->me1eEtap,
1227                             io->me1ePhip,
1228                             io->me1eCSCIdp,
1229                             io->me1eCLCTp,
1230                             io->me1fVp,
1231                             io->me1fQp,
1232                             io->me1fEtap,
1233                             io->me1fPhip,
1234                             io->me1fCSCIdp,
1235                             io->me1fCLCTp,
1236 
1237                             io->me2aVp,
1238                             io->me2aQp,
1239                             io->me2aEtap,
1240                             io->me2aPhip,
1241                             io->me2bVp,
1242                             io->me2bQp,
1243                             io->me2bEtap,
1244                             io->me2bPhip,
1245                             io->me2cVp,
1246                             io->me2cQp,
1247                             io->me2cEtap,
1248                             io->me2cPhip,
1249 
1250                             io->me3aVp,
1251                             io->me3aQp,
1252                             io->me3aEtap,
1253                             io->me3aPhip,
1254                             io->me3bVp,
1255                             io->me3bQp,
1256                             io->me3bEtap,
1257                             io->me3bPhip,
1258                             io->me3cVp,
1259                             io->me3cQp,
1260                             io->me3cEtap,
1261                             io->me3cPhip,
1262 
1263                             io->me4aVp,
1264                             io->me4aQp,
1265                             io->me4aEtap,
1266                             io->me4aPhip,
1267                             io->me4bVp,
1268                             io->me4bQp,
1269                             io->me4bEtap,
1270                             io->me4bPhip,
1271                             io->me4cVp,
1272                             io->me4cQp,
1273                             io->me4cEtap,
1274                             io->me4cPhip,
1275 
1276                             io->mb1aVp,
1277                             io->mb1aQp,
1278                             io->mb1aPhip,
1279                             io->mb1aBendp,
1280                             io->mb1bVp,
1281                             io->mb1bQp,
1282                             io->mb1bPhip,
1283                             io->mb1bBendp,
1284                             io->mb1cVp,
1285                             io->mb1cQp,
1286                             io->mb1cPhip,
1287                             io->mb1cBendp,
1288                             io->mb1dVp,
1289                             io->mb1dQp,
1290                             io->mb1dPhip,
1291                             io->mb1dBendp,
1292 
1293                             io->ptHp,
1294                             io->signHp,
1295                             io->modeMemHp,
1296                             io->etaPTHp,
1297                             io->FRHp,
1298                             io->phiHp,
1299                             io->ptMp,
1300                             io->signMp,
1301                             io->modeMemMp,
1302                             io->etaPTMp,
1303                             io->FRMp,
1304                             io->phiMp,
1305                             io->ptLp,
1306                             io->signLp,
1307                             io->modeMemLp,
1308                             io->etaPTLp,
1309                             io->FRLp,
1310                             io->phiLp,
1311 
1312                             io->me1idH,
1313                             io->me2idH,
1314                             io->me3idH,
1315                             io->me4idH,
1316                             io->mb1idH,
1317                             io->mb2idH,
1318                             io->me1idM,
1319                             io->me2idM,
1320                             io->me3idM,
1321                             io->me4idM,
1322                             io->mb1idM,
1323                             io->mb2idM,
1324                             io->me1idL,
1325                             io->me2idL,
1326                             io->me3idL,
1327                             io->me4idL,
1328                             io->mb1idL,
1329                             io->mb2idL,
1330 
1331                             etamin1,
1332                             etamin2,
1333                             etamin3,
1334                             etamin4,
1335                             etamin5,
1336                             /*etamin6,*/ etamin7,
1337                             etamin8,
1338                             etamax1,
1339                             etamax2,
1340                             etamax3,
1341                             etamax4,
1342                             etamax5,
1343                             /*etamax6,*/ etamax7,
1344                             etamax8,
1345                             etawin1,
1346                             etawin2,
1347                             etawin3,
1348                             etawin4,
1349                             etawin5,
1350                             /*etawin6,*/ etawin7,
1351                             mindphip,
1352                             mindetap,
1353 
1354                             mindeta12_accp,
1355                             maxdeta12_accp,
1356                             maxdphi12_accp,
1357                             mindeta13_accp,
1358                             maxdeta13_accp,
1359                             maxdphi13_accp,
1360 
1361                             mindeta112_accp,
1362                             maxdeta112_accp,
1363                             maxdphi112_accp,
1364                             mindeta113_accp,
1365                             maxdeta113_accp,
1366                             maxdphi113_accp,
1367                             mindphip_halo,
1368                             mindetap_halo,
1369 
1370                             straightp,
1371                             curvedp,
1372                             mbaPhiOff,
1373                             mbbPhiOff,
1374                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
1375                                 (m_extend_length << 1) | (m_widePhi));
1376         break;
1377 
1378       case 20120131:
1379         setNLBTables();
1380 
1381         sp_2012_01_31_.wrap(io->me1aVp,
1382                             io->me1aQp,
1383                             io->me1aEtap,
1384                             io->me1aPhip,
1385                             io->me1aCSCIdp,
1386                             io->me1aCLCTp,
1387                             io->me1bVp,
1388                             io->me1bQp,
1389                             io->me1bEtap,
1390                             io->me1bPhip,
1391                             io->me1bCSCIdp,
1392                             io->me1bCLCTp,
1393                             io->me1cVp,
1394                             io->me1cQp,
1395                             io->me1cEtap,
1396                             io->me1cPhip,
1397                             io->me1cCSCIdp,
1398                             io->me1cCLCTp,
1399 
1400                             io->me1dVp,
1401                             io->me1dQp,
1402                             io->me1dEtap,
1403                             io->me1dPhip,
1404                             io->me1dCSCIdp,
1405                             io->me1dCLCTp,
1406                             io->me1eVp,
1407                             io->me1eQp,
1408                             io->me1eEtap,
1409                             io->me1ePhip,
1410                             io->me1eCSCIdp,
1411                             io->me1eCLCTp,
1412                             io->me1fVp,
1413                             io->me1fQp,
1414                             io->me1fEtap,
1415                             io->me1fPhip,
1416                             io->me1fCSCIdp,
1417                             io->me1fCLCTp,
1418 
1419                             io->me2aVp,
1420                             io->me2aQp,
1421                             io->me2aEtap,
1422                             io->me2aPhip,
1423                             io->me2bVp,
1424                             io->me2bQp,
1425                             io->me2bEtap,
1426                             io->me2bPhip,
1427                             io->me2cVp,
1428                             io->me2cQp,
1429                             io->me2cEtap,
1430                             io->me2cPhip,
1431 
1432                             io->me3aVp,
1433                             io->me3aQp,
1434                             io->me3aEtap,
1435                             io->me3aPhip,
1436                             io->me3bVp,
1437                             io->me3bQp,
1438                             io->me3bEtap,
1439                             io->me3bPhip,
1440                             io->me3cVp,
1441                             io->me3cQp,
1442                             io->me3cEtap,
1443                             io->me3cPhip,
1444 
1445                             io->me4aVp,
1446                             io->me4aQp,
1447                             io->me4aEtap,
1448                             io->me4aPhip,
1449                             io->me4bVp,
1450                             io->me4bQp,
1451                             io->me4bEtap,
1452                             io->me4bPhip,
1453                             io->me4cVp,
1454                             io->me4cQp,
1455                             io->me4cEtap,
1456                             io->me4cPhip,
1457 
1458                             io->mb1aVp,
1459                             io->mb1aQp,
1460                             io->mb1aPhip,
1461                             io->mb1aBendp,
1462                             io->mb1bVp,
1463                             io->mb1bQp,
1464                             io->mb1bPhip,
1465                             io->mb1bBendp,
1466                             io->mb1cVp,
1467                             io->mb1cQp,
1468                             io->mb1cPhip,
1469                             io->mb1cBendp,
1470                             io->mb1dVp,
1471                             io->mb1dQp,
1472                             io->mb1dPhip,
1473                             io->mb1dBendp,
1474 
1475                             io->ptHp,
1476                             io->signHp,
1477                             io->modeMemHp,
1478                             io->etaPTHp,
1479                             io->FRHp,
1480                             io->phiHp,
1481                             io->phdiff_aHp,
1482                             io->phdiff_bHp,
1483                             io->ptMp,
1484                             io->signMp,
1485                             io->modeMemMp,
1486                             io->etaPTMp,
1487                             io->FRMp,
1488                             io->phiMp,
1489                             io->phdiff_aMp,
1490                             io->phdiff_bMp,
1491                             io->ptLp,
1492                             io->signLp,
1493                             io->modeMemLp,
1494                             io->etaPTLp,
1495                             io->FRLp,
1496                             io->phiLp,
1497                             io->phdiff_aLp,
1498                             io->phdiff_bLp,
1499 
1500                             io->me1idH,
1501                             io->me2idH,
1502                             io->me3idH,
1503                             io->me4idH,
1504                             io->mb1idH,
1505                             io->mb2idH,
1506                             io->me1idM,
1507                             io->me2idM,
1508                             io->me3idM,
1509                             io->me4idM,
1510                             io->mb1idM,
1511                             io->mb2idM,
1512                             io->me1idL,
1513                             io->me2idL,
1514                             io->me3idL,
1515                             io->me4idL,
1516                             io->mb1idL,
1517                             io->mb2idL,
1518 
1519                             etamin1,
1520                             etamin2,
1521                             etamin3,
1522                             etamin4,
1523                             etamin5,
1524                             /*etamin6,*/ etamin7,
1525                             etamin8,
1526                             etamax1,
1527                             etamax2,
1528                             etamax3,
1529                             etamax4,
1530                             etamax5,
1531                             /*etamax6,*/ etamax7,
1532                             etamax8,
1533                             etawin1,
1534                             etawin2,
1535                             etawin3,
1536                             etawin4,
1537                             etawin5,
1538                             /*etawin6,*/ etawin7,
1539                             mindphip,
1540                             mindetap,
1541 
1542                             mindeta12_accp,
1543                             maxdeta12_accp,
1544                             maxdphi12_accp,
1545                             mindeta13_accp,
1546                             maxdeta13_accp,
1547                             maxdphi13_accp,
1548 
1549                             mindeta112_accp,
1550                             maxdeta112_accp,
1551                             maxdphi112_accp,
1552                             mindeta113_accp,
1553                             maxdeta113_accp,
1554                             maxdphi113_accp,
1555                             mindphip_halo,
1556                             mindetap_halo,
1557 
1558                             straightp,
1559                             curvedp,
1560                             mbaPhiOff,
1561                             mbbPhiOff,
1562                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
1563                                 (m_extend_length << 1) | (m_widePhi));
1564         break;
1565 
1566       case 20120313:
1567 
1568         sp_2012_03_13_.wrap(io->me1aVp,
1569                             io->me1aQp,
1570                             io->me1aEtap,
1571                             io->me1aPhip,
1572                             io->me1aCSCIdp,
1573                             io->me1aCLCTp,
1574                             io->me1bVp,
1575                             io->me1bQp,
1576                             io->me1bEtap,
1577                             io->me1bPhip,
1578                             io->me1bCSCIdp,
1579                             io->me1bCLCTp,
1580                             io->me1cVp,
1581                             io->me1cQp,
1582                             io->me1cEtap,
1583                             io->me1cPhip,
1584                             io->me1cCSCIdp,
1585                             io->me1cCLCTp,
1586 
1587                             io->me1dVp,
1588                             io->me1dQp,
1589                             io->me1dEtap,
1590                             io->me1dPhip,
1591                             io->me1dCSCIdp,
1592                             io->me1dCLCTp,
1593                             io->me1eVp,
1594                             io->me1eQp,
1595                             io->me1eEtap,
1596                             io->me1ePhip,
1597                             io->me1eCSCIdp,
1598                             io->me1eCLCTp,
1599                             io->me1fVp,
1600                             io->me1fQp,
1601                             io->me1fEtap,
1602                             io->me1fPhip,
1603                             io->me1fCSCIdp,
1604                             io->me1fCLCTp,
1605 
1606                             io->me2aVp,
1607                             io->me2aQp,
1608                             io->me2aEtap,
1609                             io->me2aPhip,
1610                             io->me2bVp,
1611                             io->me2bQp,
1612                             io->me2bEtap,
1613                             io->me2bPhip,
1614                             io->me2cVp,
1615                             io->me2cQp,
1616                             io->me2cEtap,
1617                             io->me2cPhip,
1618 
1619                             io->me3aVp,
1620                             io->me3aQp,
1621                             io->me3aEtap,
1622                             io->me3aPhip,
1623                             io->me3bVp,
1624                             io->me3bQp,
1625                             io->me3bEtap,
1626                             io->me3bPhip,
1627                             io->me3cVp,
1628                             io->me3cQp,
1629                             io->me3cEtap,
1630                             io->me3cPhip,
1631 
1632                             io->me4aVp,
1633                             io->me4aQp,
1634                             io->me4aEtap,
1635                             io->me4aPhip,
1636                             io->me4bVp,
1637                             io->me4bQp,
1638                             io->me4bEtap,
1639                             io->me4bPhip,
1640                             io->me4cVp,
1641                             io->me4cQp,
1642                             io->me4cEtap,
1643                             io->me4cPhip,
1644 
1645                             io->mb1aVp,
1646                             io->mb1aQp,
1647                             io->mb1aPhip,
1648                             io->mb1aBendp,
1649                             io->mb1bVp,
1650                             io->mb1bQp,
1651                             io->mb1bPhip,
1652                             io->mb1bBendp,
1653                             io->mb1cVp,
1654                             io->mb1cQp,
1655                             io->mb1cPhip,
1656                             io->mb1cBendp,
1657                             io->mb1dVp,
1658                             io->mb1dQp,
1659                             io->mb1dPhip,
1660                             io->mb1dBendp,
1661 
1662                             io->ptHp,
1663                             io->signHp,
1664                             io->modeMemHp,
1665                             io->etaPTHp,
1666                             io->FRHp,
1667                             io->phiHp,
1668                             io->phdiff_aHp,
1669                             io->phdiff_bHp,
1670                             io->ptMp,
1671                             io->signMp,
1672                             io->modeMemMp,
1673                             io->etaPTMp,
1674                             io->FRMp,
1675                             io->phiMp,
1676                             io->phdiff_aMp,
1677                             io->phdiff_bMp,
1678                             io->ptLp,
1679                             io->signLp,
1680                             io->modeMemLp,
1681                             io->etaPTLp,
1682                             io->FRLp,
1683                             io->phiLp,
1684                             io->phdiff_aLp,
1685                             io->phdiff_bLp,
1686 
1687                             io->me1idH,
1688                             io->me2idH,
1689                             io->me3idH,
1690                             io->me4idH,
1691                             io->mb1idH,
1692                             io->mb2idH,
1693                             io->me1idM,
1694                             io->me2idM,
1695                             io->me3idM,
1696                             io->me4idM,
1697                             io->mb1idM,
1698                             io->mb2idM,
1699                             io->me1idL,
1700                             io->me2idL,
1701                             io->me3idL,
1702                             io->me4idL,
1703                             io->mb1idL,
1704                             io->mb2idL,
1705 
1706                             etamin1,
1707                             etamin2,
1708                             etamin3,
1709                             etamin4,
1710                             etamin5,
1711                             /*etamin6,*/ etamin7,
1712                             etamin8,
1713                             etamax1,
1714                             etamax2,
1715                             etamax3,
1716                             etamax4,
1717                             etamax5,
1718                             /*etamax6,*/ etamax7,
1719                             etamax8,
1720                             etawin1,
1721                             etawin2,
1722                             etawin3,
1723                             etawin4,
1724                             etawin5,
1725                             /*etawin6,*/ etawin7,
1726                             mindphip,
1727                             mindetap,
1728 
1729                             mindeta12_accp,
1730                             maxdeta12_accp,
1731                             maxdphi12_accp,
1732                             mindeta13_accp,
1733                             maxdeta13_accp,
1734                             maxdphi13_accp,
1735 
1736                             mindeta112_accp,
1737                             maxdeta112_accp,
1738                             maxdphi112_accp,
1739                             mindeta113_accp,
1740                             maxdeta113_accp,
1741                             maxdphi113_accp,
1742                             mindphip_halo,
1743                             mindetap_halo,
1744 
1745                             straightp,
1746                             curvedp,
1747                             mbaPhiOff,
1748                             mbbPhiOff,
1749                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
1750                                 (m_extend_length << 1) | (m_widePhi));
1751         break;
1752 
1753       case 20120730:
1754 
1755         sp_2012_07_30_.wrap(io->me1aVp,
1756                             io->me1aQp,
1757                             io->me1aEtap,
1758                             io->me1aPhip,
1759                             io->me1aCSCIdp,
1760                             io->me1aCLCTp,
1761                             io->me1bVp,
1762                             io->me1bQp,
1763                             io->me1bEtap,
1764                             io->me1bPhip,
1765                             io->me1bCSCIdp,
1766                             io->me1bCLCTp,
1767                             io->me1cVp,
1768                             io->me1cQp,
1769                             io->me1cEtap,
1770                             io->me1cPhip,
1771                             io->me1cCSCIdp,
1772                             io->me1cCLCTp,
1773 
1774                             io->me1dVp,
1775                             io->me1dQp,
1776                             io->me1dEtap,
1777                             io->me1dPhip,
1778                             io->me1dCSCIdp,
1779                             io->me1dCLCTp,
1780                             io->me1eVp,
1781                             io->me1eQp,
1782                             io->me1eEtap,
1783                             io->me1ePhip,
1784                             io->me1eCSCIdp,
1785                             io->me1eCLCTp,
1786                             io->me1fVp,
1787                             io->me1fQp,
1788                             io->me1fEtap,
1789                             io->me1fPhip,
1790                             io->me1fCSCIdp,
1791                             io->me1fCLCTp,
1792 
1793                             io->me2aVp,
1794                             io->me2aQp,
1795                             io->me2aEtap,
1796                             io->me2aPhip,
1797                             io->me2bVp,
1798                             io->me2bQp,
1799                             io->me2bEtap,
1800                             io->me2bPhip,
1801                             io->me2cVp,
1802                             io->me2cQp,
1803                             io->me2cEtap,
1804                             io->me2cPhip,
1805 
1806                             io->me3aVp,
1807                             io->me3aQp,
1808                             io->me3aEtap,
1809                             io->me3aPhip,
1810                             io->me3bVp,
1811                             io->me3bQp,
1812                             io->me3bEtap,
1813                             io->me3bPhip,
1814                             io->me3cVp,
1815                             io->me3cQp,
1816                             io->me3cEtap,
1817                             io->me3cPhip,
1818 
1819                             io->me4aVp,
1820                             io->me4aQp,
1821                             io->me4aEtap,
1822                             io->me4aPhip,
1823                             io->me4bVp,
1824                             io->me4bQp,
1825                             io->me4bEtap,
1826                             io->me4bPhip,
1827                             io->me4cVp,
1828                             io->me4cQp,
1829                             io->me4cEtap,
1830                             io->me4cPhip,
1831 
1832                             io->mb1aVp,
1833                             io->mb1aQp,
1834                             io->mb1aPhip,
1835                             io->mb1aBendp,
1836                             io->mb1bVp,
1837                             io->mb1bQp,
1838                             io->mb1bPhip,
1839                             io->mb1bBendp,
1840                             io->mb1cVp,
1841                             io->mb1cQp,
1842                             io->mb1cPhip,
1843                             io->mb1cBendp,
1844                             io->mb1dVp,
1845                             io->mb1dQp,
1846                             io->mb1dPhip,
1847                             io->mb1dBendp,
1848 
1849                             io->ptHp,
1850                             io->signHp,
1851                             io->modeMemHp,
1852                             io->etaPTHp,
1853                             io->FRHp,
1854                             io->phiHp,
1855                             io->phdiff_aHp,
1856                             io->phdiff_bHp,
1857                             io->ptMp,
1858                             io->signMp,
1859                             io->modeMemMp,
1860                             io->etaPTMp,
1861                             io->FRMp,
1862                             io->phiMp,
1863                             io->phdiff_aMp,
1864                             io->phdiff_bMp,
1865                             io->ptLp,
1866                             io->signLp,
1867                             io->modeMemLp,
1868                             io->etaPTLp,
1869                             io->FRLp,
1870                             io->phiLp,
1871                             io->phdiff_aLp,
1872                             io->phdiff_bLp,
1873 
1874                             io->me1idH,
1875                             io->me2idH,
1876                             io->me3idH,
1877                             io->me4idH,
1878                             io->mb1idH,
1879                             io->mb2idH,
1880                             io->me1idM,
1881                             io->me2idM,
1882                             io->me3idM,
1883                             io->me4idM,
1884                             io->mb1idM,
1885                             io->mb2idM,
1886                             io->me1idL,
1887                             io->me2idL,
1888                             io->me3idL,
1889                             io->me4idL,
1890                             io->mb1idL,
1891                             io->mb2idL,
1892 
1893                             etamin1,
1894                             etamin2,
1895                             etamin3,
1896                             etamin4,
1897                             etamin5,
1898                             /*etamin6,*/ etamin7,
1899                             etamin8,
1900                             etamax1,
1901                             etamax2,
1902                             etamax3,
1903                             etamax4,
1904                             etamax5,
1905                             /*etamax6,*/ etamax7,
1906                             etamax8,
1907                             etawin1,
1908                             etawin2,
1909                             etawin3,
1910                             etawin4,
1911                             etawin5,
1912                             /*etawin6,*/ etawin7,
1913                             mindphip,
1914                             mindetap,
1915 
1916                             mindeta12_accp,
1917                             maxdeta12_accp,
1918                             maxdphi12_accp,
1919                             mindeta13_accp,
1920                             maxdeta13_accp,
1921                             maxdphi13_accp,
1922 
1923                             mindeta112_accp,
1924                             maxdeta112_accp,
1925                             maxdphi112_accp,
1926                             mindeta113_accp,
1927                             maxdeta113_accp,
1928                             maxdphi113_accp,
1929                             mindphip_halo,
1930                             mindetap_halo,
1931 
1932                             straightp,
1933                             curvedp,
1934                             mbaPhiOff,
1935                             mbbPhiOff,
1936                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
1937                                 (m_extend_length << 1) | (m_widePhi));
1938         break;
1939 
1940       case 20140424:
1941 
1942         sp_2014_04_24_.wrap(io->me1aVp,
1943                             io->me1aQp,
1944                             io->me1aEtap,
1945                             io->me1aPhip,
1946                             io->me1aCSCIdp,
1947                             io->me1aCLCTp,
1948                             io->me1bVp,
1949                             io->me1bQp,
1950                             io->me1bEtap,
1951                             io->me1bPhip,
1952                             io->me1bCSCIdp,
1953                             io->me1bCLCTp,
1954                             io->me1cVp,
1955                             io->me1cQp,
1956                             io->me1cEtap,
1957                             io->me1cPhip,
1958                             io->me1cCSCIdp,
1959                             io->me1cCLCTp,
1960 
1961                             io->me1dVp,
1962                             io->me1dQp,
1963                             io->me1dEtap,
1964                             io->me1dPhip,
1965                             io->me1dCSCIdp,
1966                             io->me1dCLCTp,
1967                             io->me1eVp,
1968                             io->me1eQp,
1969                             io->me1eEtap,
1970                             io->me1ePhip,
1971                             io->me1eCSCIdp,
1972                             io->me1eCLCTp,
1973                             io->me1fVp,
1974                             io->me1fQp,
1975                             io->me1fEtap,
1976                             io->me1fPhip,
1977                             io->me1fCSCIdp,
1978                             io->me1fCLCTp,
1979 
1980                             io->me2aVp,
1981                             io->me2aQp,
1982                             io->me2aEtap,
1983                             io->me2aPhip,
1984                             io->me2bVp,
1985                             io->me2bQp,
1986                             io->me2bEtap,
1987                             io->me2bPhip,
1988                             io->me2cVp,
1989                             io->me2cQp,
1990                             io->me2cEtap,
1991                             io->me2cPhip,
1992 
1993                             io->me3aVp,
1994                             io->me3aQp,
1995                             io->me3aEtap,
1996                             io->me3aPhip,
1997                             io->me3bVp,
1998                             io->me3bQp,
1999                             io->me3bEtap,
2000                             io->me3bPhip,
2001                             io->me3cVp,
2002                             io->me3cQp,
2003                             io->me3cEtap,
2004                             io->me3cPhip,
2005 
2006                             io->me4aVp,
2007                             io->me4aQp,
2008                             io->me4aEtap,
2009                             io->me4aPhip,
2010                             io->me4bVp,
2011                             io->me4bQp,
2012                             io->me4bEtap,
2013                             io->me4bPhip,
2014                             io->me4cVp,
2015                             io->me4cQp,
2016                             io->me4cEtap,
2017                             io->me4cPhip,
2018 
2019                             io->mb1aVp,
2020                             io->mb1aQp,
2021                             io->mb1aPhip,
2022                             io->mb1aBendp,
2023                             io->mb1bVp,
2024                             io->mb1bQp,
2025                             io->mb1bPhip,
2026                             io->mb1bBendp,
2027                             io->mb1cVp,
2028                             io->mb1cQp,
2029                             io->mb1cPhip,
2030                             io->mb1cBendp,
2031                             io->mb1dVp,
2032                             io->mb1dQp,
2033                             io->mb1dPhip,
2034                             io->mb1dBendp,
2035 
2036                             io->ptHp,
2037                             io->signHp,
2038                             io->modeMemHp,
2039                             io->etaPTHp,
2040                             io->FRHp,
2041                             io->phiHp,
2042                             io->phdiff_aHp,
2043                             io->phdiff_bHp,
2044                             io->ptMp,
2045                             io->signMp,
2046                             io->modeMemMp,
2047                             io->etaPTMp,
2048                             io->FRMp,
2049                             io->phiMp,
2050                             io->phdiff_aMp,
2051                             io->phdiff_bMp,
2052                             io->ptLp,
2053                             io->signLp,
2054                             io->modeMemLp,
2055                             io->etaPTLp,
2056                             io->FRLp,
2057                             io->phiLp,
2058                             io->phdiff_aLp,
2059                             io->phdiff_bLp,
2060 
2061                             io->me1idH,
2062                             io->me2idH,
2063                             io->me3idH,
2064                             io->me4idH,
2065                             io->mb1idH,
2066                             io->mb2idH,
2067                             io->me1idM,
2068                             io->me2idM,
2069                             io->me3idM,
2070                             io->me4idM,
2071                             io->mb1idM,
2072                             io->mb2idM,
2073                             io->me1idL,
2074                             io->me2idL,
2075                             io->me3idL,
2076                             io->me4idL,
2077                             io->mb1idL,
2078                             io->mb2idL,
2079 
2080                             etamin1,
2081                             etamin2,
2082                             etamin3,
2083                             etamin4,
2084                             etamin5,
2085                             /*etamin6,*/ etamin7,
2086                             etamin8,
2087                             etamax1,
2088                             etamax2,
2089                             etamax3,
2090                             etamax4,
2091                             etamax5,
2092                             /*etamax6,*/ etamax7,
2093                             etamax8,
2094                             etawin1,
2095                             etawin2,
2096                             etawin3,
2097                             etawin4,
2098                             etawin5,
2099                             /*etawin6,*/ etawin7,
2100                             mindphip,
2101                             mindetap,
2102 
2103                             mindeta12_accp,
2104                             maxdeta12_accp,
2105                             maxdphi12_accp,
2106                             mindeta13_accp,
2107                             maxdeta13_accp,
2108                             maxdphi13_accp,
2109 
2110                             mindeta112_accp,
2111                             maxdeta112_accp,
2112                             maxdphi112_accp,
2113                             mindeta113_accp,
2114                             maxdeta113_accp,
2115                             maxdphi113_accp,
2116                             mindphip_halo,
2117                             mindetap_halo,
2118 
2119                             straightp,
2120                             curvedp,
2121                             mbaPhiOff,
2122                             mbbPhiOff,
2123                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
2124                                 (m_extend_length << 1) | (m_widePhi));
2125         break;
2126 
2127       case 20140515:
2128 
2129         sp_2014_05_15_.wrap(io->me1aVp,
2130                             io->me1aQp,
2131                             io->me1aEtap,
2132                             io->me1aPhip,
2133                             io->me1aCSCIdp,
2134                             io->me1aCLCTp,
2135                             io->me1bVp,
2136                             io->me1bQp,
2137                             io->me1bEtap,
2138                             io->me1bPhip,
2139                             io->me1bCSCIdp,
2140                             io->me1bCLCTp,
2141                             io->me1cVp,
2142                             io->me1cQp,
2143                             io->me1cEtap,
2144                             io->me1cPhip,
2145                             io->me1cCSCIdp,
2146                             io->me1cCLCTp,
2147 
2148                             io->me1dVp,
2149                             io->me1dQp,
2150                             io->me1dEtap,
2151                             io->me1dPhip,
2152                             io->me1dCSCIdp,
2153                             io->me1dCLCTp,
2154                             io->me1eVp,
2155                             io->me1eQp,
2156                             io->me1eEtap,
2157                             io->me1ePhip,
2158                             io->me1eCSCIdp,
2159                             io->me1eCLCTp,
2160                             io->me1fVp,
2161                             io->me1fQp,
2162                             io->me1fEtap,
2163                             io->me1fPhip,
2164                             io->me1fCSCIdp,
2165                             io->me1fCLCTp,
2166 
2167                             io->me2aVp,
2168                             io->me2aQp,
2169                             io->me2aEtap,
2170                             io->me2aPhip,
2171                             io->me2bVp,
2172                             io->me2bQp,
2173                             io->me2bEtap,
2174                             io->me2bPhip,
2175                             io->me2cVp,
2176                             io->me2cQp,
2177                             io->me2cEtap,
2178                             io->me2cPhip,
2179 
2180                             io->me3aVp,
2181                             io->me3aQp,
2182                             io->me3aEtap,
2183                             io->me3aPhip,
2184                             io->me3bVp,
2185                             io->me3bQp,
2186                             io->me3bEtap,
2187                             io->me3bPhip,
2188                             io->me3cVp,
2189                             io->me3cQp,
2190                             io->me3cEtap,
2191                             io->me3cPhip,
2192 
2193                             io->me4aVp,
2194                             io->me4aQp,
2195                             io->me4aEtap,
2196                             io->me4aPhip,
2197                             io->me4bVp,
2198                             io->me4bQp,
2199                             io->me4bEtap,
2200                             io->me4bPhip,
2201                             io->me4cVp,
2202                             io->me4cQp,
2203                             io->me4cEtap,
2204                             io->me4cPhip,
2205 
2206                             io->mb1aVp,
2207                             io->mb1aQp,
2208                             io->mb1aPhip,
2209                             io->mb1aBendp,
2210                             io->mb1bVp,
2211                             io->mb1bQp,
2212                             io->mb1bPhip,
2213                             io->mb1bBendp,
2214                             io->mb1cVp,
2215                             io->mb1cQp,
2216                             io->mb1cPhip,
2217                             io->mb1cBendp,
2218                             io->mb1dVp,
2219                             io->mb1dQp,
2220                             io->mb1dPhip,
2221                             io->mb1dBendp,
2222 
2223                             io->ptHp,
2224                             io->signHp,
2225                             io->modeMemHp,
2226                             io->etaPTHp,
2227                             io->FRHp,
2228                             io->phiHp,
2229                             io->phdiff_aHp,
2230                             io->phdiff_bHp,
2231                             io->ptMp,
2232                             io->signMp,
2233                             io->modeMemMp,
2234                             io->etaPTMp,
2235                             io->FRMp,
2236                             io->phiMp,
2237                             io->phdiff_aMp,
2238                             io->phdiff_bMp,
2239                             io->ptLp,
2240                             io->signLp,
2241                             io->modeMemLp,
2242                             io->etaPTLp,
2243                             io->FRLp,
2244                             io->phiLp,
2245                             io->phdiff_aLp,
2246                             io->phdiff_bLp,
2247 
2248                             io->me1idH,
2249                             io->me2idH,
2250                             io->me3idH,
2251                             io->me4idH,
2252                             io->mb1idH,
2253                             io->mb2idH,
2254                             io->me1idM,
2255                             io->me2idM,
2256                             io->me3idM,
2257                             io->me4idM,
2258                             io->mb1idM,
2259                             io->mb2idM,
2260                             io->me1idL,
2261                             io->me2idL,
2262                             io->me3idL,
2263                             io->me4idL,
2264                             io->mb1idL,
2265                             io->mb2idL,
2266 
2267                             etamin1,
2268                             etamin2,
2269                             etamin3,
2270                             etamin4,
2271                             etamin5,
2272                             /*etamin6,*/ etamin7,
2273                             etamin8,
2274                             etamax1,
2275                             etamax2,
2276                             etamax3,
2277                             etamax4,
2278                             etamax5,
2279                             /*etamax6,*/ etamax7,
2280                             etamax8,
2281                             etawin1,
2282                             etawin2,
2283                             etawin3,
2284                             etawin4,
2285                             etawin5,
2286                             /*etawin6,*/ etawin7,
2287                             mindphip,
2288                             mindetap,
2289 
2290                             mindeta12_accp,
2291                             maxdeta12_accp,
2292                             maxdphi12_accp,
2293                             mindeta13_accp,
2294                             maxdeta13_accp,
2295                             maxdphi13_accp,
2296 
2297                             mindeta112_accp,
2298                             maxdeta112_accp,
2299                             maxdphi112_accp,
2300                             mindeta113_accp,
2301                             maxdeta113_accp,
2302                             maxdphi113_accp,
2303                             mindphip_halo,
2304                             mindetap_halo,
2305 
2306                             straightp,
2307                             curvedp,
2308                             mbaPhiOff,
2309                             mbbPhiOff,
2310                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
2311                                 (m_extend_length << 1) | (m_widePhi));
2312         break;
2313 
2314       default:
2315         edm::LogInfo("CSCSTFSPCoreLogic") << "Warning: using the default core is what you want?"
2316                                           << " Core version is " << this->GetCoreFirmwareVersion();
2317         setNLBTables();
2318         sp_2012_01_31_.wrap(io->me1aVp,
2319                             io->me1aQp,
2320                             io->me1aEtap,
2321                             io->me1aPhip,
2322                             io->me1aCSCIdp,
2323                             io->me1aCLCTp,
2324                             io->me1bVp,
2325                             io->me1bQp,
2326                             io->me1bEtap,
2327                             io->me1bPhip,
2328                             io->me1bCSCIdp,
2329                             io->me1bCLCTp,
2330                             io->me1cVp,
2331                             io->me1cQp,
2332                             io->me1cEtap,
2333                             io->me1cPhip,
2334                             io->me1cCSCIdp,
2335                             io->me1cCLCTp,
2336 
2337                             io->me1dVp,
2338                             io->me1dQp,
2339                             io->me1dEtap,
2340                             io->me1dPhip,
2341                             io->me1dCSCIdp,
2342                             io->me1dCLCTp,
2343                             io->me1eVp,
2344                             io->me1eQp,
2345                             io->me1eEtap,
2346                             io->me1ePhip,
2347                             io->me1eCSCIdp,
2348                             io->me1eCLCTp,
2349                             io->me1fVp,
2350                             io->me1fQp,
2351                             io->me1fEtap,
2352                             io->me1fPhip,
2353                             io->me1fCSCIdp,
2354                             io->me1fCLCTp,
2355 
2356                             io->me2aVp,
2357                             io->me2aQp,
2358                             io->me2aEtap,
2359                             io->me2aPhip,
2360                             io->me2bVp,
2361                             io->me2bQp,
2362                             io->me2bEtap,
2363                             io->me2bPhip,
2364                             io->me2cVp,
2365                             io->me2cQp,
2366                             io->me2cEtap,
2367                             io->me2cPhip,
2368 
2369                             io->me3aVp,
2370                             io->me3aQp,
2371                             io->me3aEtap,
2372                             io->me3aPhip,
2373                             io->me3bVp,
2374                             io->me3bQp,
2375                             io->me3bEtap,
2376                             io->me3bPhip,
2377                             io->me3cVp,
2378                             io->me3cQp,
2379                             io->me3cEtap,
2380                             io->me3cPhip,
2381 
2382                             io->me4aVp,
2383                             io->me4aQp,
2384                             io->me4aEtap,
2385                             io->me4aPhip,
2386                             io->me4bVp,
2387                             io->me4bQp,
2388                             io->me4bEtap,
2389                             io->me4bPhip,
2390                             io->me4cVp,
2391                             io->me4cQp,
2392                             io->me4cEtap,
2393                             io->me4cPhip,
2394 
2395                             io->mb1aVp,
2396                             io->mb1aQp,
2397                             io->mb1aPhip,
2398                             io->mb1aBendp,
2399                             io->mb1bVp,
2400                             io->mb1bQp,
2401                             io->mb1bPhip,
2402                             io->mb1bBendp,
2403                             io->mb1cVp,
2404                             io->mb1cQp,
2405                             io->mb1cPhip,
2406                             io->mb1cBendp,
2407                             io->mb1dVp,
2408                             io->mb1dQp,
2409                             io->mb1dPhip,
2410                             io->mb1dBendp,
2411 
2412                             io->ptHp,
2413                             io->signHp,
2414                             io->modeMemHp,
2415                             io->etaPTHp,
2416                             io->FRHp,
2417                             io->phiHp,
2418                             io->phdiff_aHp,
2419                             io->phdiff_bHp,
2420                             io->ptMp,
2421                             io->signMp,
2422                             io->modeMemMp,
2423                             io->etaPTMp,
2424                             io->FRMp,
2425                             io->phiMp,
2426                             io->phdiff_aMp,
2427                             io->phdiff_bMp,
2428                             io->ptLp,
2429                             io->signLp,
2430                             io->modeMemLp,
2431                             io->etaPTLp,
2432                             io->FRLp,
2433                             io->phiLp,
2434                             io->phdiff_aLp,
2435                             io->phdiff_bLp,
2436 
2437                             io->me1idH,
2438                             io->me2idH,
2439                             io->me3idH,
2440                             io->me4idH,
2441                             io->mb1idH,
2442                             io->mb2idH,
2443                             io->me1idM,
2444                             io->me2idM,
2445                             io->me3idM,
2446                             io->me4idM,
2447                             io->mb1idM,
2448                             io->mb2idM,
2449                             io->me1idL,
2450                             io->me2idL,
2451                             io->me3idL,
2452                             io->me4idL,
2453                             io->mb1idL,
2454                             io->mb2idL,
2455 
2456                             etamin1,
2457                             etamin2,
2458                             etamin3,
2459                             etamin4,
2460                             etamin5,
2461                             /*etamin6,*/ etamin7,
2462                             etamin8,
2463                             etamax1,
2464                             etamax2,
2465                             etamax3,
2466                             etamax4,
2467                             etamax5,
2468                             /*etamax6,*/ etamax7,
2469                             etamax8,
2470                             etawin1,
2471                             etawin2,
2472                             etawin3,
2473                             etawin4,
2474                             etawin5,
2475                             /*etawin6,*/ etawin7,
2476                             mindphip,
2477                             mindetap,
2478 
2479                             mindeta12_accp,
2480                             maxdeta12_accp,
2481                             maxdphi12_accp,
2482                             mindeta13_accp,
2483                             maxdeta13_accp,
2484                             maxdphi13_accp,
2485 
2486                             mindeta112_accp,
2487                             maxdeta112_accp,
2488                             maxdphi112_accp,
2489                             mindeta113_accp,
2490                             maxdeta113_accp,
2491                             maxdphi113_accp,
2492                             mindphip_halo,
2493                             mindetap_halo,
2494 
2495                             straightp,
2496                             curvedp,
2497                             mbaPhiOff,
2498                             mbbPhiOff,
2499                             (m_preTrigger << 7) | (m_allowCLCTonly << 5) | (m_allowALCTonly << 4) |
2500                                 (m_extend_length << 1) | (m_widePhi));
2501         break;
2502     }
2503 
2504     if (IsVerbose()) {
2505       std::cout << "Core Verbose Output For Debugging\n";
2506       std::cout << io->me1aVp << " " << io->me1aQp << " " << io->me1aEtap << " " << io->me1aPhip << " "
2507                 << io->me1aCSCIdp << " " << io->me1aCLCTp << std::endl;
2508       std::cout << io->me1bVp << " " << io->me1bQp << " " << io->me1bEtap << " " << io->me1bPhip << " "
2509                 << io->me1bCSCIdp << " " << io->me1bCLCTp << std::endl;
2510       std::cout << io->me1cVp << " " << io->me1cQp << " " << io->me1cEtap << " " << io->me1cPhip << " "
2511                 << io->me1cCSCIdp << " " << io->me1cCLCTp << std::endl;
2512 
2513       std::cout << io->me1dVp << " " << io->me1dQp << " " << io->me1dEtap << " " << io->me1dPhip << " "
2514                 << io->me1dCSCIdp << " " << io->me1dCLCTp << std::endl;
2515       std::cout << io->me1eVp << " " << io->me1eQp << " " << io->me1eEtap << " " << io->me1ePhip << " "
2516                 << io->me1eCSCIdp << " " << io->me1eCLCTp << std::endl;
2517       std::cout << io->me1fVp << " " << io->me1fQp << " " << io->me1fEtap << " " << io->me1fPhip << " "
2518                 << io->me1fCSCIdp << " " << io->me1fCLCTp << std::endl;
2519 
2520       std::cout << io->me2aVp << " " << io->me2aQp << " " << io->me2aEtap << " " << io->me2aPhip << " " << 0 << " " << 0
2521                 << std::endl;
2522       std::cout << io->me2bVp << " " << io->me2bQp << " " << io->me2bEtap << " " << io->me2bPhip << " " << 0 << " " << 0
2523                 << std::endl;
2524       std::cout << io->me2cVp << " " << io->me2cQp << " " << io->me2cEtap << " " << io->me2cPhip << " " << 0 << " " << 0
2525                 << std::endl;
2526 
2527       std::cout << io->me3aVp << " " << io->me3aQp << " " << io->me3aEtap << " " << io->me3aPhip << " " << 0 << " " << 0
2528                 << std::endl;
2529       std::cout << io->me3bVp << " " << io->me3bQp << " " << io->me3bEtap << " " << io->me3bPhip << " " << 0 << " " << 0
2530                 << std::endl;
2531       std::cout << io->me3cVp << " " << io->me3cQp << " " << io->me3cEtap << " " << io->me3cPhip << " " << 0 << " " << 0
2532                 << std::endl;
2533 
2534       std::cout << io->me4aVp << " " << io->me4aQp << " " << io->me4aEtap << " " << io->me4aPhip << " " << 0 << " " << 0
2535                 << std::endl;
2536       std::cout << io->me4bVp << " " << io->me4bQp << " " << io->me4bEtap << " " << io->me4bPhip << " " << 0 << " " << 0
2537                 << std::endl;
2538       std::cout << io->me4cVp << " " << io->me4cQp << " " << io->me4cEtap << " " << io->me4cPhip << " " << 0 << " " << 0
2539                 << std::endl;
2540 
2541       std::cout << io->mb1aVp << " " << io->mb1aQp << " " << 0 << " " << io->mb1aPhip << " " << 0 << " "
2542                 << io->mb1aBendp << std::endl;
2543       std::cout << io->mb1bVp << " " << io->mb1bQp << " " << 0 << " " << io->mb1bPhip << " " << 0 << " "
2544                 << io->mb1bBendp << std::endl;
2545       std::cout << io->mb1cVp << " " << io->mb1cQp << " " << 0 << " " << 0 /*io->mb1cPhip*/ << " " << 0 << " "
2546                 << 0 /*io->mb1aBendp*/ << std::endl;
2547       std::cout << io->mb1dVp << " " << io->mb1dQp << " " << 0 << " " << 0 /*io->mb1dPhip*/ << " " << 0 << " "
2548                 << 0 /*io->mb1aBendp*/ << std::endl;
2549 
2550       std::cout << io->ptHp << " " << io->signHp << " " << io->modeMemHp << " " << io->etaPTHp << " " << io->FRHp << " "
2551                 << io->phiHp << std::endl;
2552       std::cout << io->ptMp << " " << io->signMp << " " << io->modeMemMp << " " << io->etaPTMp << " " << io->FRMp << " "
2553                 << io->phiMp << std::endl;
2554       std::cout << io->ptLp << " " << io->signLp << " " << io->modeMemLp << " " << io->etaPTLp << " " << io->FRLp << " "
2555                 << io->phiLp << std::endl;
2556 
2557       std::cout << io->me1idH << " " << io->me2idH << " " << io->me3idH << " " << io->me4idH << " " << io->mb1idH << " "
2558                 << io->mb2idH << std::endl;
2559       std::cout << io->me1idM << " " << io->me2idM << " " << io->me3idM << " " << io->me4idM << " " << io->mb1idM << " "
2560                 << io->mb2idM << std::endl;
2561       std::cout << io->me1idL << " " << io->me2idL << " " << io->me3idL << " " << io->me4idL << " " << io->mb1idL << " "
2562                 << io->mb2idL << std::endl
2563                 << std::endl;
2564     }
2565     ++bx;
2566   }
2567 
2568   bx = 0;
2569 
2570   //int nmuons = 0;
2571   // start from where tracks could first possibly appear
2572   // read out tracks from io_
2573   // We add first +1 to the starting position because the CSC data started 1 BX after DT,
2574   // and the other +1 because of the number of calls to the core (i.e. latency+1):
2575   for (io = io_.begin() + latency + 1 + 1; io != io_.end(); io++) {
2576     csc::L1TrackId trkHid(endcap, sector), trkMid(endcap, sector), trkLid(endcap, sector);
2577     trkHid.setMode(io->modeMemHp);
2578     trkMid.setMode(io->modeMemMp);
2579     trkLid.setMode(io->modeMemLp);
2580 
2581     csc::L1Track trkH(trkHid), trkM(trkMid), trkL(trkLid);
2582 
2583     ptadd LUTAddressH, LUTAddressM, LUTAddressL;
2584 
2585     // construct PT LUT address for all possible muons
2586     LUTAddressH.delta_phi_12 = io->ptHp & 0xff;
2587     LUTAddressH.delta_phi_23 = (io->ptHp >> 8) & 0xf;
2588     LUTAddressH.track_eta = (io->etaPTHp >> 1) & 0xf;
2589     LUTAddressH.track_mode = io->modeMemHp & 0xf;
2590     //  Line Replaced due to removal of spbits.h, note that
2591     //  BWPT and MODE_ACC are now hard coded (13 and 15 respectively)
2592     //      LUTAddressH.delta_phi_sign = (io->ptHp >> (BWPT-1)) & 0x1;
2593     LUTAddressH.delta_phi_sign = (io->ptHp >> (13 - 1)) & 0x1;
2594     LUTAddressH.track_fr = io->FRHp & 0x1;
2595 
2596     LUTAddressM.delta_phi_12 = io->ptMp & 0xff;
2597     LUTAddressM.delta_phi_23 = (io->ptMp >> 8) & 0xf;
2598     LUTAddressM.track_eta = (io->etaPTMp >> 1) & 0xf;
2599     LUTAddressM.track_mode = io->modeMemMp & 0xf;
2600     //      LUTAddressM.delta_phi_sign = (io->ptMp >> (BWPT-1)) & 0x1;
2601     LUTAddressM.delta_phi_sign = (io->ptMp >> (13 - 1)) & 0x1;
2602     LUTAddressM.track_fr = io->FRMp & 0x1;
2603 
2604     LUTAddressL.delta_phi_12 = io->ptLp & 0xff;
2605     LUTAddressL.delta_phi_23 = (io->ptLp >> 8) & 0xf;
2606     LUTAddressL.track_eta = (io->etaPTLp >> 1) & 0xf;
2607     LUTAddressL.track_mode = io->modeMemLp & 0xf;
2608     //      LUTAddressL.delta_phi_sign = (io->ptLp >> (BWPT-1)) & 0x1;
2609     LUTAddressL.delta_phi_sign = (io->ptLp >> (13 - 1)) & 0x1;
2610     LUTAddressL.track_fr = io->FRLp & 0x1;
2611 
2612     // Core's input was loaded in a relative time window starting from BX=1(CSC)/0(DT)
2613     // If we account for latency related shift in the core's output (as we do in this loop)
2614     //  then output tracks appear in the same BX as input stubs.
2615     // To create new time window with perfectly timed-in tracks placed at BX=0 we introduce a shift:
2616     int shift = (maxBX - minBX) / 2;
2617 
2618     if (LUTAddressH.track_mode) {
2619       trkH.setPtLUTAddress(LUTAddressH.toint());
2620       trkH.setChargePacked((io->signHp) & 0x1);
2621       trkH.setLocalPhi(io->phiHp);
2622       trkH.setEtaPacked(io->etaPTHp);
2623       trkH.setBx((int)(bx)-shift);
2624       trkH.setStationIds(io->me1idH & 0x7, io->me2idH & 0x3, io->me3idH & 0x3, io->me4idH & 0x3, io->mb1idH & 0x3);
2625       trkH.setTbins(io->me1idH >> 3, io->me2idH >> 2, io->me3idH >> 2, io->me4idH >> 2, io->mb1idH >> 2);
2626       trkH.setOutputLink(1);
2627       if (LUTAddressH.track_mode == 15)
2628         trkH.setFineHaloPacked(1);
2629       mytracks.push_back(trkH);
2630     }
2631     if (LUTAddressM.track_mode) {
2632       trkM.setPtLUTAddress(LUTAddressM.toint());
2633       trkM.setChargePacked((io->signMp) & 0x1);
2634       trkM.setLocalPhi(io->phiMp);
2635       trkM.setEtaPacked(io->etaPTMp);
2636       trkM.setBx((int)(bx)-shift);
2637       trkM.setStationIds(io->me1idM & 0x7, io->me2idM & 0x3, io->me3idM & 0x3, io->me4idM & 0x3, io->mb1idM & 0x3);
2638       trkM.setTbins(io->me1idM >> 3, io->me2idM >> 2, io->me3idM >> 2, io->me4idM >> 2, io->mb1idM >> 2);
2639       trkM.setOutputLink(2);
2640       if (LUTAddressM.track_mode == 15)
2641         trkM.setFineHaloPacked(1);
2642       mytracks.push_back(trkM);
2643     }
2644     if (LUTAddressL.track_mode) {
2645       trkL.setPtLUTAddress(LUTAddressL.toint());
2646       trkL.setChargePacked((io->signLp) & 0x1);
2647       trkL.setLocalPhi(io->phiLp);
2648       trkL.setEtaPacked(io->etaPTLp);
2649       trkL.setBx((int)(bx)-shift);
2650       trkL.setStationIds(io->me1idL & 0x7, io->me2idL & 0x3, io->me3idL & 0x3, io->me4idL & 0x3, io->mb1idL & 0x3);
2651       trkL.setTbins(io->me1idL >> 3, io->me2idL >> 2, io->me3idL >> 2, io->me4idL >> 2, io->mb1idL >> 2);
2652       trkL.setOutputLink(3);
2653       if (LUTAddressL.track_mode == 15)
2654         trkL.setFineHaloPacked(1);
2655       mytracks.push_back(trkL);
2656     }
2657     ++bx;
2658   }
2659   return runme;
2660 }
2661 
2662 void CSCTFSPCoreLogic::setNLBTables() {
2663   /*
2664     These arrays define the non-linear dPhi bins used by the SP core logic.
2665     dPhi is mapped to an integer value value. The integer value is remapped
2666     to phi-units in CSCTFPtLUT.
2667   */
2668 
2669   // initialize the dphi arrays to maximum possible value
2670   for (int i = 0; i < 1024; i++) {
2671     // 5-bit words
2672     sp_2012_01_31_.spvpp_ptu2a_comp_dphi_5[i] = (1 << 5) - 1;
2673     sp_2012_01_31_.spvpp_ptu2b_comp_dphi_5[i] = (1 << 5) - 1;
2674     sp_2012_01_31_.spvpp_ptu2c_comp_dphi_5[i] = (1 << 5) - 1;
2675 
2676     sp_2012_01_31_.spvpp_ptu3a_comp_dphi_5[i] = (1 << 5) - 1;
2677     sp_2012_01_31_.spvpp_ptu3b_comp_dphi_5[i] = (1 << 5) - 1;
2678     sp_2012_01_31_.spvpp_ptu3c_comp_dphi_5[i] = (1 << 5) - 1;
2679 
2680     // 7-bit words
2681     sp_2012_01_31_.spvpp_ptu2a_comp_dphi_7[i] = (1 << 7) - 1;
2682     sp_2012_01_31_.spvpp_ptu2b_comp_dphi_7[i] = (1 << 7) - 1;
2683     sp_2012_01_31_.spvpp_ptu2c_comp_dphi_7[i] = (1 << 7) - 1;
2684 
2685     sp_2012_01_31_.spvpp_ptu3a_comp_dphi_7[i] = (1 << 7) - 1;
2686     sp_2012_01_31_.spvpp_ptu3b_comp_dphi_7[i] = (1 << 7) - 1;
2687     sp_2012_01_31_.spvpp_ptu3c_comp_dphi_7[i] = (1 << 7) - 1;
2688 
2689     // 8-bit words
2690     sp_2012_01_31_.spvpp_ptu2a_comp_dphi_8[i] = (1 << 8) - 1;
2691     sp_2012_01_31_.spvpp_ptu2b_comp_dphi_8[i] = (1 << 8) - 1;
2692     sp_2012_01_31_.spvpp_ptu2c_comp_dphi_8[i] = (1 << 8) - 1;
2693 
2694     sp_2012_01_31_.spvpp_ptu3a_comp_dphi_8[i] = (1 << 8) - 1;
2695     sp_2012_01_31_.spvpp_ptu3b_comp_dphi_8[i] = (1 << 8) - 1;
2696     sp_2012_01_31_.spvpp_ptu3c_comp_dphi_8[i] = (1 << 8) - 1;
2697 
2698     sp_2012_01_31_.spvpp_ptu4a_comp_dphi_8[i] = (1 << 8) - 1;
2699     sp_2012_01_31_.spvpp_ptu4b_comp_dphi_8[i] = (1 << 8) - 1;
2700     sp_2012_01_31_.spvpp_ptu4c_comp_dphi_8[i] = (1 << 8) - 1;
2701   }
2702 
2703   // define the non-linear bin map. This takes dphi (phi-units) --> integer value
2704 
2705   // 5-bit table
2706   int dPhiTable_5b[256] = {
2707       0,  1,  2,  2,  3,  4,  4,  5,  5,  6,  6,  7,  7,  8,  8,  9,  9,  9,  10, 10, 10, 11, 11, 11, 12, 12,
2708       12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17,
2709       17, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21,
2710       21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
2711       23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
2712       25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
2713       27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29,
2714       29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30,
2715       30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
2716       31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31};
2717 
2718   // 7-bit table
2719   int dPhiTable_7b[512] = {
2720       0,   1,   2,   3,   4,   5,   6,   6,   7,   8,   9,   10,  11,  11,  12,  13,  14,  15,  15,  16,  17,  18,  18,
2721       19,  20,  20,  21,  22,  22,  23,  24,  24,  25,  26,  26,  27,  27,  28,  29,  29,  30,  30,  31,  31,  32,  33,
2722       33,  34,  34,  35,  35,  36,  36,  37,  37,  38,  38,  39,  39,  40,  40,  41,  41,  42,  42,  43,  43,  44,  44,
2723       44,  45,  45,  46,  46,  47,  47,  47,  48,  48,  49,  49,  50,  50,  50,  51,  51,  52,  52,  52,  53,  53,  53,
2724       54,  54,  55,  55,  55,  56,  56,  56,  57,  57,  57,  58,  58,  59,  59,  59,  60,  60,  60,  61,  61,  61,  62,
2725       62,  62,  63,  63,  63,  63,  64,  64,  64,  65,  65,  65,  66,  66,  66,  67,  67,  67,  67,  68,  68,  68,  69,
2726       69,  69,  69,  70,  70,  70,  71,  71,  71,  71,  72,  72,  72,  73,  73,  73,  73,  74,  74,  74,  74,  75,  75,
2727       75,  75,  76,  76,  76,  76,  77,  77,  77,  77,  78,  78,  78,  78,  79,  79,  79,  79,  80,  80,  80,  80,  81,
2728       81,  81,  81,  81,  82,  82,  82,  82,  83,  83,  83,  83,  83,  84,  84,  84,  84,  85,  85,  85,  85,  85,  86,
2729       86,  86,  86,  87,  87,  87,  87,  87,  88,  88,  88,  88,  88,  89,  89,  89,  89,  89,  90,  90,  90,  90,  90,
2730       91,  91,  91,  91,  91,  92,  92,  92,  92,  92,  92,  93,  93,  93,  93,  93,  94,  94,  94,  94,  94,  95,  95,
2731       95,  95,  95,  95,  96,  96,  96,  96,  96,  96,  97,  97,  97,  97,  97,  98,  98,  98,  98,  98,  98,  99,  99,
2732       99,  99,  99,  99,  100, 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 102, 102, 102, 102, 102, 102, 102,
2733       103, 103, 103, 103, 103, 103, 104, 104, 104, 104, 104, 104, 104, 105, 105, 105, 105, 105, 105, 106, 106, 106, 106,
2734       106, 106, 106, 107, 107, 107, 107, 107, 107, 107, 108, 108, 108, 108, 108, 108, 108, 109, 109, 109, 109, 109, 109,
2735       109, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, 112, 112, 112, 112, 112, 112, 112,
2736       113, 113, 113, 113, 113, 113, 113, 113, 114, 114, 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115,
2737       116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, 118, 118, 118, 118, 118,
2738       118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 120, 120, 120, 120, 120, 120, 120, 120, 121, 121, 121, 121,
2739       121, 121, 121, 121, 121, 122, 122, 122, 122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 123, 123, 123,
2740       124, 124, 124, 124, 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 126, 126, 126, 126,
2741       126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
2742       127, 127, 127, 127, 127, 127};
2743 
2744   // 8-bit table
2745   int dPhiTable_8b[512] = {
2746       0,   1,   2,   3,   4,   5,   6,   7,   8,   9,   10,  11,  12,  13,  14,  14,  15,  16,  17,  18,  19,  20,  21,
2747       22,  23,  24,  24,  25,  26,  27,  28,  29,  30,  31,  31,  32,  33,  34,  35,  36,  37,  37,  38,  39,  40,  41,
2748       42,  42,  43,  44,  45,  46,  46,  47,  48,  49,  50,  50,  51,  52,  53,  54,  54,  55,  56,  57,  57,  58,  59,
2749       60,  61,  61,  62,  63,  64,  64,  65,  66,  66,  67,  68,  69,  69,  70,  71,  72,  72,  73,  74,  74,  75,  76,
2750       77,  77,  78,  79,  79,  80,  81,  81,  82,  83,  83,  84,  85,  86,  86,  87,  88,  88,  89,  90,  90,  91,  91,
2751       92,  93,  93,  94,  95,  95,  96,  97,  97,  98,  99,  99,  100, 100, 101, 102, 102, 103, 104, 104, 105, 105, 106,
2752       107, 107, 108, 109, 109, 110, 110, 111, 112, 112, 113, 113, 114, 115, 115, 116, 116, 117, 117, 118, 119, 119, 120,
2753       120, 121, 122, 122, 123, 123, 124, 124, 125, 125, 126, 127, 127, 128, 128, 129, 129, 130, 130, 131, 132, 132, 133,
2754       133, 134, 134, 135, 135, 136, 136, 137, 138, 138, 139, 139, 140, 140, 141, 141, 142, 142, 143, 143, 144, 144, 145,
2755       145, 146, 146, 147, 147, 148, 148, 149, 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, 154, 155, 155, 156, 156,
2756       157, 157, 158, 158, 159, 159, 160, 160, 161, 161, 162, 162, 163, 163, 164, 164, 165, 165, 165, 166, 166, 167, 167,
2757       168, 168, 169, 169, 170, 170, 171, 171, 172, 172, 172, 173, 173, 174, 174, 175, 175, 176, 176, 176, 177, 177, 178,
2758       178, 179, 179, 180, 180, 180, 181, 181, 182, 182, 183, 183, 183, 184, 184, 185, 185, 186, 186, 186, 187, 187, 188,
2759       188, 189, 189, 189, 190, 190, 191, 191, 192, 192, 192, 193, 193, 194, 194, 194, 195, 195, 196, 196, 196, 197, 197,
2760       198, 198, 199, 199, 199, 200, 200, 201, 201, 201, 202, 202, 203, 203, 203, 204, 204, 204, 205, 205, 206, 206, 206,
2761       207, 207, 208, 208, 208, 209, 209, 210, 210, 210, 211, 211, 211, 212, 212, 213, 213, 213, 214, 214, 214, 215, 215,
2762       216, 216, 216, 217, 217, 217, 218, 218, 219, 219, 219, 220, 220, 220, 221, 221, 221, 222, 222, 223, 223, 223, 224,
2763       224, 224, 225, 225, 225, 226, 226, 227, 227, 227, 228, 228, 228, 229, 229, 229, 230, 230, 230, 231, 231, 231, 232,
2764       232, 232, 233, 233, 233, 234, 234, 235, 235, 235, 236, 236, 236, 237, 237, 237, 238, 238, 238, 239, 239, 239, 240,
2765       240, 240, 241, 241, 241, 242, 242, 242, 243, 243, 243, 244, 244, 244, 245, 245, 245, 246, 246, 246, 247, 247, 247,
2766       247, 248, 248, 248, 249, 249, 249, 250, 250, 250, 251, 251, 251, 252, 252, 252, 253, 253, 253, 254, 254, 254, 254,
2767       255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
2768       255, 255, 255, 255, 255, 255};
2769 
2770   // Now set the arrays
2771 
2772   // 5-bit words
2773   for (int i = 0; i < 256; i++) {
2774     sp_2012_01_31_.spvpp_ptu2a_comp_dphi_5[i] = dPhiTable_5b[i];
2775     sp_2012_01_31_.spvpp_ptu2b_comp_dphi_5[i] = dPhiTable_5b[i];
2776     sp_2012_01_31_.spvpp_ptu2c_comp_dphi_5[i] = dPhiTable_5b[i];
2777 
2778     sp_2012_01_31_.spvpp_ptu3a_comp_dphi_5[i] = dPhiTable_5b[i];
2779     sp_2012_01_31_.spvpp_ptu3b_comp_dphi_5[i] = dPhiTable_5b[i];
2780     sp_2012_01_31_.spvpp_ptu3c_comp_dphi_5[i] = dPhiTable_5b[i];
2781   }
2782 
2783   // 7-bit words
2784   for (int i = 0; i < 512; i++) {
2785     sp_2012_01_31_.spvpp_ptu2a_comp_dphi_7[i] = dPhiTable_7b[i];
2786     sp_2012_01_31_.spvpp_ptu2b_comp_dphi_7[i] = dPhiTable_7b[i];
2787     sp_2012_01_31_.spvpp_ptu2c_comp_dphi_7[i] = dPhiTable_7b[i];
2788 
2789     sp_2012_01_31_.spvpp_ptu3a_comp_dphi_7[i] = dPhiTable_7b[i];
2790     sp_2012_01_31_.spvpp_ptu3b_comp_dphi_7[i] = dPhiTable_7b[i];
2791     sp_2012_01_31_.spvpp_ptu3c_comp_dphi_7[i] = dPhiTable_7b[i];
2792   }
2793 
2794   // 8-bit words
2795   for (int i = 0; i < 512; i++) {
2796     sp_2012_01_31_.spvpp_ptu2a_comp_dphi_8[i] = dPhiTable_8b[i];
2797     sp_2012_01_31_.spvpp_ptu2b_comp_dphi_8[i] = dPhiTable_8b[i];
2798     sp_2012_01_31_.spvpp_ptu2c_comp_dphi_8[i] = dPhiTable_8b[i];
2799 
2800     sp_2012_01_31_.spvpp_ptu3a_comp_dphi_8[i] = dPhiTable_8b[i];
2801     sp_2012_01_31_.spvpp_ptu3b_comp_dphi_8[i] = dPhiTable_8b[i];
2802     sp_2012_01_31_.spvpp_ptu3c_comp_dphi_8[i] = dPhiTable_8b[i];
2803 
2804     sp_2012_01_31_.spvpp_ptu4a_comp_dphi_8[i] = dPhiTable_8b[i];
2805     sp_2012_01_31_.spvpp_ptu4b_comp_dphi_8[i] = dPhiTable_8b[i];
2806     sp_2012_01_31_.spvpp_ptu4c_comp_dphi_8[i] = dPhiTable_8b[i];
2807   }
2808 }
2809 
2810 CSCTriggerContainer<csc::L1Track> CSCTFSPCoreLogic::tracks() { return mytracks; }
2811 
2812 //  LocalWords:  isValid