CMS 3D CMS Logo

CSCTFSPCoreLogic Class Reference

#include <L1Trigger/CSCTrackFinder/interface/CSCTFSPCoreLogic.h>

List of all members.

Public Member Functions

 CSCTFSPCoreLogic ()
void loadData (const CSCTriggerContainer< csctf::TrackStub > &, const unsigned &endcap, const unsigned &sector, const int &minBX, const int &maxBX)
bool run (const unsigned &endcap, const unsigned &sector, const unsigned &latency, const unsigned &etamin1, const unsigned &etamin2, const unsigned &etamin3, const unsigned &etamin4, const unsigned &etamin5, const unsigned &etamin6, const unsigned &etamin7, const unsigned &etamin8, const unsigned &etamax1, const unsigned &etamax2, const unsigned &etamax3, const unsigned &etamax4, const unsigned &etamax5, const unsigned &etamax6, const unsigned &etamax7, const unsigned &etamax8, const unsigned &etawin1, const unsigned &etawin2, const unsigned &etawin3, const unsigned &etawin4, const unsigned &etawin5, const unsigned &etawin6, const unsigned &mindphip, const unsigned &mindeta_accp, const unsigned &maxdeta_accp, const unsigned &maxdphi_accp, const unsigned &m_extend_length, const unsigned &m_allowALCTonly, const unsigned &m_allowCLCTonly, const unsigned &m_preTrigger, const int &minBX, const int &maxBX)
CSCTriggerContainer< csc::L1Tracktracks ()

Private Attributes

std::vector< SPioio_
CSCTriggerContainer< csc::L1Trackmytracks
bool runme

Static Private Attributes

static vpp_generated sp_

Classes

struct  SPio
 change input and output to Signal More...


Detailed Description

Definition at line 11 of file CSCTFSPCoreLogic.h.


Constructor & Destructor Documentation

CSCTFSPCoreLogic::CSCTFSPCoreLogic (  )  [inline]

Definition at line 56 of file CSCTFSPCoreLogic.h.

00056 : runme(false) {}


Member Function Documentation

void CSCTFSPCoreLogic::loadData ( const CSCTriggerContainer< csctf::TrackStub > &  theStubs,
const unsigned &  endcap,
const unsigned &  sector,
const int minBX,
const int maxBX 
)

Definition at line 13 of file CSCTFSPCoreLogic.cc.

References CSCTriggerContainer< T >::get(), io_, CSCDetId::maxStationId(), CSCDetId::minStationId(), runme, st, and CSCTriggerNumbering::triggerSubSectorFromLabels().

Referenced by CSCTFSectorProcessor::run().

00016 {
00017   io_.clear();
00018   runme = 0;
00019   io_.resize(maxBX - minBX + 2);
00020   unsigned relative_bx = 0;
00021 
00022   for(int bx = minBX; bx <= maxBX; ++bx)
00023     {
00024       for(int st = CSCDetId::minStationId(); st <= CSCDetId::maxStationId() + 1; ++st) // 1 - 5 for DT stubs
00025         {
00026           std::vector<csctf::TrackStub> stub_list;
00027           std::vector<csctf::TrackStub>::const_iterator stubi;
00028           if(st == 1)
00029             {
00030               stub_list = theStubs.get(endcap, st, sector, 1, bx);
00031               std::vector<csctf::TrackStub> stub_list2 = theStubs.get(endcap, st, sector, 2, bx);
00032               stub_list.insert(stub_list.end(), stub_list2.begin(), stub_list2.end());
00033             }
00034           else stub_list = theStubs.get(endcap, st, sector, 0, bx);
00035 
00036           for(stubi = stub_list.begin(); stubi != stub_list.end(); stubi++)
00037             {
00038               runme |= stubi->isValid();
00039               switch(st)
00040                 {
00041                 case 1:
00042                   switch(stubi->getMPCLink())
00043                     {
00044                     case 1:
00045                       if(CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 1)
00046                         {
00047                           io_[relative_bx+1].me1aVp   = stubi->isValid();
00048                           io_[relative_bx+1].me1aQp   = stubi->getQuality();
00049                           io_[relative_bx+1].me1aEtap = stubi->etaPacked();
00050                           io_[relative_bx+1].me1aPhip = stubi->phiPacked();
00051                           io_[relative_bx+1].me1aAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00052                           io_[relative_bx+1].me1aCSCIdp  = stubi->cscid();
00053                         }
00054                       if(CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 2)
00055                         {
00056                           io_[relative_bx+1].me1dVp   = stubi->isValid();
00057                           io_[relative_bx+1].me1dQp   = stubi->getQuality();
00058                           io_[relative_bx+1].me1dEtap = stubi->etaPacked();
00059                           io_[relative_bx+1].me1dPhip = stubi->phiPacked();
00060                           io_[relative_bx+1].me1dAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00061                           io_[relative_bx+1].me1dCSCIdp  = stubi->cscid();
00062                         }
00063                       break;
00064                     case 2:
00065                       if(CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 1)
00066                         {
00067                           io_[relative_bx+1].me1bVp   = stubi->isValid();
00068                           io_[relative_bx+1].me1bQp   = stubi->getQuality();
00069                           io_[relative_bx+1].me1bEtap = stubi->etaPacked();
00070                           io_[relative_bx+1].me1bPhip = stubi->phiPacked();
00071                           io_[relative_bx+1].me1bAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00072                           io_[relative_bx+1].me1bCSCIdp  = stubi->cscid();
00073                         }
00074                       if(CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 2)
00075                         {
00076                           io_[relative_bx+1].me1eVp   = stubi->isValid();
00077                           io_[relative_bx+1].me1eQp   = stubi->getQuality();
00078                           io_[relative_bx+1].me1eEtap = stubi->etaPacked();
00079                           io_[relative_bx+1].me1ePhip = stubi->phiPacked();
00080                           io_[relative_bx+1].me1eAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00081                           io_[relative_bx+1].me1eCSCIdp  = stubi->cscid();
00082                         }
00083                       break;
00084                     case 3:
00085                       if(CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 1)
00086                         {
00087                           io_[relative_bx+1].me1cVp   = stubi->isValid();
00088                           io_[relative_bx+1].me1cQp   = stubi->getQuality();
00089                           io_[relative_bx+1].me1cEtap = stubi->etaPacked();
00090                           io_[relative_bx+1].me1cPhip = stubi->phiPacked();
00091                           io_[relative_bx+1].me1cAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00092                           io_[relative_bx+1].me1cCSCIdp  = stubi->cscid();
00093                         }
00094                       if(CSCTriggerNumbering::triggerSubSectorFromLabels(CSCDetId(stubi->getDetId().rawId())) == 2)
00095                         {
00096                           io_[relative_bx+1].me1fVp   = stubi->isValid();
00097                           io_[relative_bx+1].me1fQp   = stubi->getQuality();
00098                           io_[relative_bx+1].me1fEtap = stubi->etaPacked();
00099                           io_[relative_bx+1].me1fPhip = stubi->phiPacked();
00100                           io_[relative_bx+1].me1fAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00101                           io_[relative_bx+1].me1fCSCIdp  = stubi->cscid();
00102                         }
00103                       break;
00104                     default:
00105                       edm::LogWarning("CSCTFSPCoreLogic::loadData()") << "SERIOUS ERROR: MPC LINK " << stubi->getMPCLink()
00106                                                                      << " NOT IN RANGE [1,3]\n";
00107                     };
00108                   break;
00109                 case 2:
00110                   switch(stubi->getMPCLink())
00111                     {
00112                     case 1:
00113                       io_[relative_bx+1].me2aVp   = stubi->isValid();
00114                       io_[relative_bx+1].me2aQp   = stubi->getQuality();
00115                       io_[relative_bx+1].me2aEtap = stubi->etaPacked();
00116                       io_[relative_bx+1].me2aPhip = stubi->phiPacked();
00117                       io_[relative_bx+1].me2aAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00118                       break;
00119                     case 2:
00120                       io_[relative_bx+1].me2bVp   = stubi->isValid();
00121                       io_[relative_bx+1].me2bQp   = stubi->getQuality();
00122                       io_[relative_bx+1].me2bEtap = stubi->etaPacked();
00123                       io_[relative_bx+1].me2bPhip = stubi->phiPacked();
00124                       io_[relative_bx+1].me2bAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00125                       break;
00126                     case 3:
00127                       io_[relative_bx+1].me2cVp   = stubi->isValid();
00128                       io_[relative_bx+1].me2cQp   = stubi->getQuality();
00129                       io_[relative_bx+1].me2cEtap = stubi->etaPacked();
00130                       io_[relative_bx+1].me2cPhip = stubi->phiPacked();
00131                       io_[relative_bx+1].me2cAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00132                       break;
00133                     default:
00134                       edm::LogWarning("CSCTFSPCoreLogic::loadData()") << "SERIOUS ERROR: MPC LINK " << stubi->getMPCLink()
00135                                                                      << " NOT IN RANGE [1,3]\n";
00136                     };
00137                   break;
00138                 case 3:
00139                   switch(stubi->getMPCLink())
00140                     {
00141                     case 1:
00142                       io_[relative_bx+1].me3aVp   = stubi->isValid();
00143                       io_[relative_bx+1].me3aQp   = stubi->getQuality();
00144                       io_[relative_bx+1].me3aEtap = stubi->etaPacked();
00145                       io_[relative_bx+1].me3aPhip = stubi->phiPacked();
00146                       io_[relative_bx+1].me3aAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00147                       break;
00148                     case 2:
00149                       io_[relative_bx+1].me3bVp   = stubi->isValid();
00150                       io_[relative_bx+1].me3bQp   = stubi->getQuality();
00151                       io_[relative_bx+1].me3bEtap = stubi->etaPacked();
00152                       io_[relative_bx+1].me3bPhip = stubi->phiPacked();
00153                       io_[relative_bx+1].me3bAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00154                       break;
00155                     case 3:
00156                       io_[relative_bx+1].me3cVp   = stubi->isValid();
00157                       io_[relative_bx+1].me3cQp   = stubi->getQuality();
00158                       io_[relative_bx+1].me3cEtap = stubi->etaPacked();
00159                       io_[relative_bx+1].me3cPhip = stubi->phiPacked();
00160                       io_[relative_bx+1].me3cAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00161                       break;
00162                     default:
00163                       edm::LogWarning("CSCTFSPCoreLogic::loadData()") << "SERIOUS ERROR: MPC LINK " << stubi->getMPCLink()
00164                                                                      << " NOT IN RANGE [1,3]\n";
00165                     };
00166                   break;
00167                 case 4:
00168                   switch(stubi->getMPCLink())
00169                     {
00170                     case 1:
00171                       io_[relative_bx+1].me4aVp   = stubi->isValid();
00172                       io_[relative_bx+1].me4aQp   = stubi->getQuality();
00173                       io_[relative_bx+1].me4aEtap = stubi->etaPacked();
00174                       io_[relative_bx+1].me4aPhip = stubi->phiPacked();
00175                       io_[relative_bx+1].me4aAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00176                       break;
00177                     case 2:
00178                       io_[relative_bx+1].me4bVp   = stubi->isValid();
00179                       io_[relative_bx+1].me4bQp   = stubi->getQuality();
00180                       io_[relative_bx+1].me4bEtap = stubi->etaPacked();
00181                       io_[relative_bx+1].me4bPhip = stubi->phiPacked();
00182                       io_[relative_bx+1].me4bAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00183                       break;
00184                     case 3:
00185                       io_[relative_bx+1].me4cVp   = stubi->isValid();
00186                       io_[relative_bx+1].me4cQp   = stubi->getQuality();
00187                       io_[relative_bx+1].me4cEtap = stubi->etaPacked();
00188                       io_[relative_bx+1].me4cPhip = stubi->phiPacked();
00189                       io_[relative_bx+1].me4cAmp  = (stubi->getQuality() == 1 || stubi->getQuality() == 2);
00190                       break;
00191                     default:
00192                       edm::LogWarning("CSCTFSPCoreLogic::loadData()") << "SERIOUS ERROR: MPC LINK " << stubi->getMPCLink()
00193                                                                      << " NOT IN RANGE [1,3]\n";
00194                     };
00195                   break;
00196                 case 5:
00197                   // We need to put the DT stubs 1 BX ahead of the CSC ones for the TF firmware
00198                   switch(stubi->getMPCLink())
00199                     {
00200                     case 1:
00201                       io_[relative_bx].mb1aVp   = stubi->isValid();
00202                       io_[relative_bx].mb1aQp   = stubi->getQuality();
00203                       io_[relative_bx].mb1aPhip = stubi->phiPacked();
00204                       break;
00205                     case 2:
00206                       io_[relative_bx].mb1bVp   = stubi->isValid();
00207                       io_[relative_bx].mb1bQp   = stubi->getQuality();
00208                       io_[relative_bx].mb1bPhip = stubi->phiPacked();
00209                       break;
00210                     case 3:
00211                       io_[relative_bx].mb1cVp   = stubi->isValid();
00212                       io_[relative_bx].mb1cQp   = stubi->getQuality();
00213                       io_[relative_bx].mb1cPhip = stubi->phiPacked();
00214                       break;
00215                     case 4:
00216                       io_[relative_bx].mb1dVp   = stubi->isValid();
00217                       io_[relative_bx].mb1dQp   = stubi->getQuality();
00218                       io_[relative_bx].mb1dPhip = stubi->phiPacked();
00219                       break;
00220                     default:
00221                       edm::LogWarning("CSCTFSPCoreLogic::loadData()") <<  "SERIOUS ERROR: DT LINK " << stubi->getMPCLink()
00222                                                                       << " NOT IN RANGE [1,4]\n";
00223                     }
00224                   break;
00225                 default:
00226                   edm::LogWarning("CSCTFSPCoreLogic::loadData()") << "SERIOUS ERROR: STATION  " << st << " NOT IN RANGE [1,5]\n";
00227                 };
00228             }
00229         }
00230       ++relative_bx;
00231     }
00232 }

bool CSCTFSPCoreLogic::run ( const unsigned &  endcap,
const unsigned &  sector,
const unsigned &  latency,
const unsigned &  etamin1,
const unsigned &  etamin2,
const unsigned &  etamin3,
const unsigned &  etamin4,
const unsigned &  etamin5,
const unsigned &  etamin6,
const unsigned &  etamin7,
const unsigned &  etamin8,
const unsigned &  etamax1,
const unsigned &  etamax2,
const unsigned &  etamax3,
const unsigned &  etamax4,
const unsigned &  etamax5,
const unsigned &  etamax6,
const unsigned &  etamax7,
const unsigned &  etamax8,
const unsigned &  etawin1,
const unsigned &  etawin2,
const unsigned &  etawin3,
const unsigned &  etawin4,
const unsigned &  etawin5,
const unsigned &  etawin6,
const unsigned &  mindphip,
const unsigned &  mindeta_accp,
const unsigned &  maxdeta_accp,
const unsigned &  maxdphi_accp,
const unsigned &  m_extend_length,
const unsigned &  m_allowALCTonly,
const unsigned &  m_allowCLCTonly,
const unsigned &  m_preTrigger,
const int minBX,
const int maxBX 
)

0x144?:

Definition at line 236 of file CSCTFSPCoreLogic.cc.

References CSCTriggerContainer< T >::clear(), pt_address::delta_phi_12, io_, csc::L1Track::m_output_link, mytracks, CSCTriggerContainer< T >::push_back(), runme, L1MuRegionalCand::setBx(), L1MuRegionalCand::setChargePacked(), L1MuRegionalCand::setEtaPacked(), L1MuRegionalCand::setFineHaloPacked(), csc::L1Track::setLocalPhi(), csc::L1TrackId::setMode(), csc::L1Track::setPtLUTAddress(), csc::L1Track::setStationIds(), sp_, and vpp_generated::wrap().

Referenced by CSCTFSectorProcessor::run().

00251 {
00252   mytracks.clear();
00253 
00254   int train_length = io_.size();
00255   int bx = 0;
00256   io_.resize(train_length + latency);
00257   std::vector<SPio>::iterator io;
00258 
00259   // run over enough clock cycles to get tracks from input stubs.
00260   for( io = io_.begin(); io != io_.end() && runme; io++)
00261     {
00262       sp_.wrap
00263         (
00264          io->me1aVp, io->me1aQp, io->me1aEtap, io->me1aPhip, io->me1aCSCIdp,
00265          io->me1bVp, io->me1bQp, io->me1bEtap, io->me1bPhip, io->me1bCSCIdp,
00266          io->me1cVp, io->me1cQp, io->me1cEtap, io->me1cPhip, io->me1cCSCIdp,
00267 
00268          io->me1dVp, io->me1dQp, io->me1dEtap, io->me1dPhip, io->me1dCSCIdp,
00269          io->me1eVp, io->me1eQp, io->me1eEtap, io->me1ePhip, io->me1eCSCIdp,
00270          io->me1fVp, io->me1fQp, io->me1fEtap, io->me1fPhip, io->me1fCSCIdp,
00271 
00272          io->me2aVp, io->me2aQp, io->me2aEtap, io->me2aPhip,
00273          io->me2bVp, io->me2bQp, io->me2bEtap, io->me2bPhip,
00274          io->me2cVp, io->me2cQp, io->me2cEtap, io->me2cPhip,
00275 
00276          io->me3aVp, io->me3aQp, io->me3aEtap, io->me3aPhip,
00277          io->me3bVp, io->me3bQp, io->me3bEtap, io->me3bPhip,
00278          io->me3cVp, io->me3cQp, io->me3cEtap, io->me3cPhip,
00279 
00280          io->me4aVp, io->me4aQp, io->me4aEtap, io->me4aPhip,
00281          io->me4bVp, io->me4bQp, io->me4bEtap, io->me4bPhip,
00282          io->me4cVp, io->me4cQp, io->me4cEtap, io->me4cPhip,
00283 
00284          io->mb1aVp, io->mb1aQp, io->mb1aPhip,
00285          io->mb1bVp, io->mb1bQp, io->mb1bPhip,
00286          io->mb1cVp, io->mb1cQp, io->mb1cPhip,
00287          io->mb1dVp, io->mb1dQp, io->mb1dPhip,
00288 
00289          io->ptHp, io->signHp, io->modeMemHp, io->etaPTHp, io->FRHp, io->phiHp,
00290          io->ptMp, io->signMp, io->modeMemMp, io->etaPTMp, io->FRMp, io->phiMp,
00291          io->ptLp, io->signLp, io->modeMemLp, io->etaPTLp, io->FRLp, io->phiLp,
00292 
00293          io->me1idH, io->me2idH, io->me3idH, io->me4idH, io->mb1idH, io->mb2idH,
00294          io->me1idM, io->me2idM, io->me3idM, io->me4idM, io->mb1idM, io->mb2idM,
00295          io->me1idL, io->me2idL, io->me3idL, io->me4idL, io->mb1idL, io->mb2idL,
00296 
00297          // Adjustable registers in SP core
00298          etamin1,etamin2,etamin3,etamin4,etamin5,etamin6,etamin7,etamin8,
00299          etamax1,etamax2,etamax3,etamax4,etamax5,etamax6,etamax7,etamax8,
00300          /*
00301          11*2, 11*2, 7*2, 7*2, 7*2, 5*2,  5*2,  5*2,  // etamin
00302          127,  127,  127, 127, 127, 12*2, 12*2, 12*2, // etamax */
00303          //DEA: beam test settings:
00304          //10,  10,  10, 10, 10, 10,              // etawindow
00305          //10, 0, 0, 0,                           // eta offsets - NOTE bug in first offset for June04 beam test
00306          // ORCA settings:
00307          etawin1, etawin2, etawin3, etawin4, etawin5, etawin6,// eta windows
00308 
00309          mindphip, mindeta_accp, maxdeta_accp, maxdphi_accp,
00310          //70, 4, 16, 128,
00311 
00312          //((extend << 1) & 0xe)|bxa_on // {reserved[11:0], extend[2:0],BXA_enable}
00314          (m_preTrigger<<7)|(m_allowCLCTonly<<5)|(m_allowALCTonly<<4)|(m_extend_length<<1)
00315          );
00316       /* // Extremely verbose debug
00317       LogDebug("CSCTFSPCoreLogic:run()") << std::hex
00318                                          << "Input:  F1/M1{bx, v, q, e, p, csc} " << std::dec << (int)(bx)<< std::hex << " " << io->me1aVp << " "
00319                                          << io->me1aQp << " "<< io->me1aEtap << " " << io->me1aPhip << " " << io->me1aCSCIdp << std::endl
00320                                          << "Input:  F1/M2{bx, v, q, e, p, csc} " << std::dec << (int)(bx)<< std::hex << " " << io->me1bVp << " "
00321                                          << io->me1bQp << " "<< io->me1bEtap << " " << io->me1bPhip << " " << io->me1bCSCIdp << std::endl
00322                                          << "Input:  F1/M3{bx, v, q, e, p, csc} " << std::dec << (int)(bx)<< std::hex << " " << io->me1cVp << " "
00323                                          << io->me1cQp << " "<< io->me1cEtap << " " << io->me1cPhip << " " << io->me1cCSCIdp << std::endl
00324                                          << "Input:  F2/M1{bx, v, q, e, p, csc} " << std::dec << (int)(bx)<< std::hex << " " << io->me1dVp << " "
00325                                          << io->me1dQp << " "<< io->me1dEtap << " " << io->me1dPhip << " " << io->me1dCSCIdp << std::endl
00326                                          << "Input:  F2/M2{bx, v, q, e, p, csc} " << std::dec << (int)(bx)<< std::hex << " " << io->me1eVp << " "
00327                                          << io->me1eQp << " "<< io->me1eEtap << " " << io->me1ePhip << " " << io->me1eCSCIdp << std::endl
00328                                          << "Input:  F2/M3{bx, v, q, e, p, csc} " << std::dec << (int)(bx)<< std::hex << " " << io->me1fVp << " "
00329                                          << io->me1fQp << " "<< io->me1fEtap << " " << io->me1fPhip << " " << io->me1fCSCIdp << std::endl
00330                                          << "Input:  F3/M1{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me2aVp << " "
00331                                          << io->me2aQp << " "<< io->me2aEtap << " " << io->me2aPhip << " " << std::endl
00332                                          << "Input:  F3/M2{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me2bVp << " "
00333                                          << io->me2bQp << " "<< io->me2bEtap << " " << io->me2bPhip << " " << std::endl
00334                                          << "Input:  F3/M3{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me2cVp << " "
00335                                          << io->me2cQp << " "<< io->me2cEtap << " " << io->me2cPhip << " " << std::endl
00336                                          << "Input:  F4/M1{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me3aVp << " "
00337                                          << io->me3aQp << " "<< io->me3aEtap << " " << io->me3aPhip << " " << std::endl
00338                                          << "Input:  F4/M2{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me3bVp << " "
00339                                          << io->me3bQp << " "<< io->me3bEtap << " " << io->me3bPhip << " " << std::endl
00340                                          << "Input:  F4/M3{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me3cVp << " "
00341                                          << io->me3cQp << " "<< io->me3cEtap << " " << io->me3cPhip << " " << std::endl
00342                                          << "Input:  F5/M1{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me4aVp << " "
00343                                          << io->me4aQp << " "<< io->me4aEtap << " " << io->me4aPhip << " " << std::endl
00344                                          << "Input:  F5/M2{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me4bVp << " "
00345                                          << io->me4bQp << " "<< io->me4bEtap << " " << io->me4bPhip << " " << std::endl
00346                                          << "Input:  F5/M3{bx, v, q, e, p}      " << std::dec << (int)(bx)<< std::hex << " " << io->me4cVp << " "
00347                                          << io->me4cQp << " "<< io->me4cEtap << " " << io->me4cPhip << " " << std::endl
00348                                          << "Input:  MB 1A{bx, v, q, p}         " << std::dec << (int)(bx) << std::hex << " " << io->mb1aVp << " "
00349                                          << io->mb1aQp << " "<< io->mb1aPhip << " " << std::endl
00350                                          << "Input:  MB 1B{bx, v, q, p}         " << std::dec << (int)(bx) << std::hex << " " << io->mb1bVp << " "
00351                                          << io->mb1bQp << " "<< io->mb1bPhip << " " << std::endl
00352                                          << "Input:  MB 1C{bx, v, q, p}         " << std::dec << (int)(bx) << std::hex << " " << io->mb1cVp << " "
00353                                          << io->mb1cQp << " "<< io->mb1cPhip << " " << std::endl
00354                                          << "Input:  MB 1D{bx, v, q, p}         " << std::dec << (int)(bx) << std::hex << " " << io->mb1dVp << " "
00355                                          << io->mb1dQp << " "<< io->mb1dPhip << " " << std::endl
00356                                          << "Input:  MB 2A{bx, v, q, p}         " << std::dec << (int)(bx) << std::hex << " " << io->mb2aVp << " "
00357                                          << io->mb2aQp << " "<< io->mb2aPhip << " " << std::endl
00358                                          << "Input:  MB 2B{bx, v, q, p}         " << std::dec << (int)(bx) << std::hex << " " << io->mb2bVp << " "
00359                                          << io->mb2bQp << " "<< io->mb2bPhip << " " << std::endl
00360                                          << "Input:  MB 2C{bx, v, q, p}         " << std::dec << (int)(bx) << std::hex << " " << io->mb2cVp << " "
00361                                          << io->mb2cQp << " "<< io->mb2cPhip << " " << std::endl
00362                                          << "Input:  MB 2D{bx, v, q, p}         " << std::dec << (int)(bx) << std::hex << " " << io->mb2dVp << " "
00363                                          << io->mb2dQp << " "<< io->mb2dPhip << " " << std::endl
00364                                          << std::dec << std::endl ;
00365 
00366       if(io->ptHp !=0 || io->ptMp !=0 || io->ptLp !=0)
00367         LogDebug("CSCTFSPCoreLogic:run()")<<"ENDCAP/SECTOR "<< endcap << "/" << sector << std::endl;
00368       if(io->ptHp !=0)
00369         {
00370           LogDebug("CSCTFSPCoreLogic:run()") << std::hex << "Output M1: " << std::dec << (int)(bx-latency)<< std::hex << " " << io->ptHp << "/" << io->signHp << "/"
00371                                              <<  io->modeMemHp << "/" <<  io->etaPTHp << "/" <<  io->FRHp << "/" <<  io->phiHp<<std::endl
00372                                              << "Stubs Used ME1/ME2/ME3/ME4/MB1/MB2 : "
00373                                              << io->me1idH <<'/'<< io->me2idH <<'/'<< io->me3idH <<'/'<< io->me4idH <<'/'
00374                                              << io->mb1idH <<'/'<< io->mb2idH << std::dec << std::endl;
00375         }
00376       if(io->ptMp !=0)
00377         {
00378           LogDebug("CSCTFSPCoreLogic:run()") << std::hex << "Output M2: " << std::dec << (int)(bx-latency)<< std::hex << " " << io->ptMp << "/" << io->signMp << "/"
00379                                              <<  io->modeMemMp << "/" <<  io->etaPTMp << "/" <<  io->FRMp << "/" <<  io->phiMp << std::endl
00380                                              << "Stubs Used ME1/ME2/ME3/ME4/MB1/MB2 : "
00381                                              << io->me1idM <<'/'<< io->me2idM <<'/'<< io->me3idM <<'/'<< io->me4idM <<'/'
00382                                              << io->mb1idM <<'/'<< io->mb2idM << std::dec << std::endl;
00383         }
00384       if(io->ptLp !=0)
00385         {
00386           LogDebug("CSCTFSPCoreLogic:run()") << std::hex << "Output M3: " << std::dec << (int)(bx-latency)<< std::hex << " " << io->ptLp << "/" << io->signLp << "/"
00387                                              <<  io->modeMemLp << "/" <<  io->etaPTLp << "/" <<  io->FRLp << "/" <<  io->phiLp << std::endl
00388                                              << "Stubs Used ME1/ME2/ME3/ME4/MB1/MB2 : "
00389                                              << io->me1idL <<'/'<< io->me2idL <<'/'<< io->me3idL <<'/'<< io->me4idL <<'/'
00390                                              << io->mb1idL <<'/'<< io->mb2idL << std::dec << std::endl;
00391         }
00392       */
00393       ++bx;
00394     }
00395 
00396   bx = 0;
00397 
00398   int nmuons = 0;
00399   // start from where tracks could first possibly appear
00400   // read out tracks from io_
00401   // We add first +1 to the starting position because the CSC data started 1 BX after DT,
00402   // and the other +1 because of the number of calls to the core (i.e. latency+1):
00403   for(io = io_.begin() + latency + 1 + 1; io != io_.end(); io++)
00404     {
00405       csc::L1TrackId trkHid(endcap, sector), trkMid(endcap, sector), trkLid(endcap, sector);
00406       trkHid.setMode(io->modeMemHp);
00407       trkMid.setMode(io->modeMemMp);
00408       trkLid.setMode(io->modeMemLp);
00409 
00410       csc::L1Track trkH(trkHid), trkM(trkMid), trkL(trkLid);
00411 
00412       ptadd LUTAddressH, LUTAddressM, LUTAddressL;
00413 
00414       // construct PT LUT address for all possible muons
00415       LUTAddressH.delta_phi_12   = io->ptHp & 0xff;
00416       LUTAddressH.delta_phi_23   = (io->ptHp >> 8) & 0xf;
00417       LUTAddressH.track_eta      = (io->etaPTHp>>1) & 0xf;
00418       LUTAddressH.track_mode     = io->modeMemHp & 0xf;
00419 //      Line Replaced due to removal of spbits.h, note that
00420 //      BWPT and MODE_ACC are now hard coded (13 and 15 respectively)
00421 //      LUTAddressH.delta_phi_sign = (io->ptHp >> (BWPT-1)) & 0x1;
00422       LUTAddressH.delta_phi_sign = (io->ptHp >> (13-1)) & 0x1;
00423       LUTAddressH.track_fr       = io->FRHp & 0x1;
00424 
00425       LUTAddressM.delta_phi_12   = io->ptMp & 0xff;
00426       LUTAddressM.delta_phi_23   = (io->ptMp >> 8) & 0xf;
00427       LUTAddressM.track_eta      = (io->etaPTMp>>1) & 0xf;
00428       LUTAddressM.track_mode     = io->modeMemMp & 0xf;
00429 //      LUTAddressM.delta_phi_sign = (io->ptMp >> (BWPT-1)) & 0x1;
00430       LUTAddressM.delta_phi_sign = (io->ptMp >> (13-1)) & 0x1;
00431       LUTAddressM.track_fr       = io->FRMp & 0x1;
00432 
00433       LUTAddressL.delta_phi_12   = io->ptLp & 0xff;
00434       LUTAddressL.delta_phi_23   = (io->ptLp >> 8) & 0xf;
00435       LUTAddressL.track_eta      = (io->etaPTLp>>1) & 0xf;
00436       LUTAddressL.track_mode     = io->modeMemLp & 0xf;
00437 //      LUTAddressL.delta_phi_sign = (io->ptLp >> (BWPT-1)) & 0x1;
00438       LUTAddressL.delta_phi_sign = (io->ptLp >> (13-1)) & 0x1;
00439       LUTAddressL.track_fr       = io->FRLp & 0x1;
00440 
00441      // Core's input was loaded in a relative time window starting from BX=1(CSC)/0(DT)
00442      // If we account for latency related shift in the core's output (as we do in this loop)
00443      //  then output tracks appear in the same BX as input stubs.
00444      // To create new time window with perfectly timed-in tracks placed at BX=0 we introduce a shift:
00445      int shift = (maxBX - minBX)/2;
00446 
00447       if(LUTAddressH.track_mode)
00448         {
00449           trkH.setPtLUTAddress(LUTAddressH.toint());
00450           trkH.setChargePacked(~(io->signHp)&0x1);
00451           trkH.setLocalPhi(io->phiHp);
00452           trkH.setEtaPacked(io->etaPTHp);
00453           trkH.setBx((int)(bx)-shift);
00454           trkH.setStationIds(io->me1idH, io->me2idH, io->me3idH, io->me4idH, io->mb1idH);
00455           trkH.m_output_link = 1;
00456           if( LUTAddressH.track_mode==15 ) trkH.setFineHaloPacked(1);
00457           mytracks.push_back(trkH);
00458         }
00459       if(LUTAddressM.track_mode)
00460         {
00461           trkM.setPtLUTAddress(LUTAddressM.toint());
00462           trkM.setChargePacked(~(io->signMp)&0x1);
00463           trkM.setLocalPhi(io->phiMp);
00464           trkM.setEtaPacked(io->etaPTMp);
00465           trkM.setBx((int)(bx)-shift);
00466           trkM.setStationIds(io->me1idM, io->me2idM, io->me3idM, io->me4idM, io->mb1idM);
00467           trkM.m_output_link = 2;
00468           if( LUTAddressM.track_mode==15 ) trkM.setFineHaloPacked(1);
00469           mytracks.push_back(trkM);
00470         }
00471       if(LUTAddressL.track_mode)
00472         {
00473           trkL.setPtLUTAddress(LUTAddressL.toint());
00474           trkL.setChargePacked(~(io->signLp)&0x1);
00475           trkL.setLocalPhi(io->phiLp);
00476           trkL.setEtaPacked(io->etaPTLp);
00477           trkL.setBx((int)(bx)-shift);
00478           trkL.setStationIds(io->me1idL, io->me2idL, io->me3idL, io->me4idL, io->mb1idL);
00479           trkL.m_output_link = 3;
00480           if( LUTAddressL.track_mode==15 ) trkL.setFineHaloPacked(1);
00481           mytracks.push_back(trkL);
00482         }
00483       ++bx;
00484     }
00485   return runme;
00486 }

CSCTriggerContainer< csc::L1Track > CSCTFSPCoreLogic::tracks ( void   ) 

Definition at line 488 of file CSCTFSPCoreLogic.cc.

References mytracks.

Referenced by CSCTFSectorProcessor::run().

00489 {
00490   return mytracks;
00491 }


Member Data Documentation

std::vector<SPio> CSCTFSPCoreLogic::io_ [private]

Definition at line 82 of file CSCTFSPCoreLogic.h.

Referenced by loadData(), and run().

CSCTriggerContainer<csc::L1Track> CSCTFSPCoreLogic::mytracks [private]

Definition at line 84 of file CSCTFSPCoreLogic.h.

Referenced by run(), and tracks().

bool CSCTFSPCoreLogic::runme [private]

Definition at line 83 of file CSCTFSPCoreLogic.h.

Referenced by loadData(), and run().

vpp_generated CSCTFSPCoreLogic::sp_ [static, private]

Definition at line 81 of file CSCTFSPCoreLogic.h.

Referenced by run().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:30 2009 for CMSSW by  doxygen 1.5.4