CMS 3D CMS Logo

CSCMuonPortCard Class Reference

Simulates the functionality of the Muon Port Card (MPC). More...

#include <L1Trigger/CSCTriggerPrimitives/src/CSCMuonPortCard.h>

List of all members.

Public Types

typedef CSCTriggerContainer
< csctf::TrackStub
TrackStubList

Public Member Functions

void clear ()
 CSCMuonPortCard ()
void loadDigis (const CSCCorrelatedLCTDigiCollection &thedigis)
std::vector< csctf::TrackStubsort (const unsigned endcap, const unsigned station, const unsigned sector, const unsigned subsector, const int bx)

Private Attributes

CSCTriggerContainer
< csctf::TrackStub
_stubs


Detailed Description

Simulates the functionality of the Muon Port Card (MPC).

Each MPC is responsible for 9 Trigger Mother Boards (TMBs). It takes the up to 18 LCTs (2/TMB) in each (sub)sector every bunch crossing, sorts them, selects up to three best, and puts them into an output collection.

A port/reworking of the muon port card from ORCA.

Author:
L. Gray (UF)

Definition at line 24 of file CSCMuonPortCard.h.


Member Typedef Documentation

typedef CSCTriggerContainer<csctf::TrackStub> CSCMuonPortCard::TrackStubList

Definition at line 27 of file CSCMuonPortCard.h.


Constructor & Destructor Documentation

CSCMuonPortCard::CSCMuonPortCard (  )  [inline]

Definition at line 27 of file CSCMuonPortCard.h.

00027 {};


Member Function Documentation

void CSCMuonPortCard::clear ( void   )  [inline]

Definition at line 42 of file CSCMuonPortCard.h.

References _stubs, and CSCTriggerContainer< T >::clear().

Referenced by loadDigis().

00042 { _stubs.clear(); }

void CSCMuonPortCard::loadDigis ( const CSCCorrelatedLCTDigiCollection thedigis  ) 

Definition at line 26 of file CSCMuonPortCard.cc.

References _stubs, clear(), and CSCTriggerContainer< T >::push_back().

Referenced by CSCTriggerPrimitivesBuilder::build().

00027 {
00028   // Put everything from the digi container into a trigger container.
00029   // This allows us to sort per BX more easily.
00030   clear();
00031 
00032   CSCCorrelatedLCTDigiCollection::DigiRangeIterator Citer;
00033 
00034   for (Citer = thedigis.begin(); Citer != thedigis.end(); Citer++) {
00035     CSCCorrelatedLCTDigiCollection::const_iterator Diter = (*Citer).second.first;
00036     CSCCorrelatedLCTDigiCollection::const_iterator Dend = (*Citer).second.second;
00037 
00038     for (; Diter != Dend; Diter++) {
00039       csctf::TrackStub theStub((*Diter), (*Citer).first);
00040       _stubs.push_back(theStub);
00041     }
00042   }
00043 }

std::vector< csctf::TrackStub > CSCMuonPortCard::sort ( const unsigned  endcap,
const unsigned  station,
const unsigned  sector,
const unsigned  subsector,
const int  bx 
)

Definition at line 45 of file CSCMuonPortCard.cc.

References _stubs, CSCTriggerContainer< T >::get(), i, CSCConstants::maxStubs, HLT_VtxMuL3::result, and python::multivaluedict::sort().

Referenced by CSCTriggerPrimitivesBuilder::build().

00047 {
00048   std::vector<csctf::TrackStub> result;
00049   std::vector<csctf::TrackStub>::iterator LCT;
00050 
00051   result = _stubs.get(endcap, station, sector, subsector, bx);
00052 
00053   // Make sure no Quality 0 or non-valid LCTs come through the portcard.
00054   for (LCT = result.begin(); LCT != result.end(); LCT++) {
00055     if ( !(LCT->getQuality() && LCT->isValid()) )
00056       result.erase(LCT, LCT);
00057   }
00058 
00059   if (result.size()) {
00060     std::sort(result.begin(), result.end(), std::greater<csctf::TrackStub>());
00061     // Can only return maxStubs or less LCTs per bunch crossing.
00062     if (result.size() > CSCConstants::maxStubs)
00063       result.erase(result.begin() + CSCConstants::maxStubs, result.end());
00064 
00065 
00066     // Go through the sorted list and label the LCTs with a sorting number.
00067     unsigned i = 0;
00068     for (LCT = result.begin(); LCT != result.end(); LCT++)
00069       LCT->setMPCLink(++i);
00070   }
00071 
00072   return result;
00073 }


Member Data Documentation

CSCTriggerContainer<csctf::TrackStub> CSCMuonPortCard::_stubs [private]

Definition at line 45 of file CSCMuonPortCard.h.

Referenced by clear(), loadDigis(), and sort().


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