#include <CSCMuonPortCard.h>
Public Types | |
typedef CSCTriggerContainer < csctf::TrackStub > | TrackStubList |
Public Member Functions | |
void | clear () |
CSCMuonPortCard (const edm::ParameterSet &conf) | |
CSCMuonPortCard () | |
void | loadDigis (const CSCCorrelatedLCTDigiCollection &thedigis) |
std::vector< csctf::TrackStub > | sort (const unsigned endcap, const unsigned station, const unsigned sector, const unsigned subsector, const int bx) |
Private Attributes | |
unsigned int | max_stubs_ |
CSCTriggerContainer < csctf::TrackStub > | stubs_ |
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.
Definition at line 25 of file CSCMuonPortCard.h.
Definition at line 31 of file CSCMuonPortCard.h.
CSCMuonPortCard::CSCMuonPortCard | ( | ) |
Definition at line 27 of file CSCMuonPortCard.cc.
References max_stubs_, and CSCConstants::maxStubs.
{ max_stubs_ = CSCConstants::maxStubs; }
CSCMuonPortCard::CSCMuonPortCard | ( | const edm::ParameterSet & | conf | ) |
Definition at line 32 of file CSCMuonPortCard.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), max_stubs_, and CSCConstants::maxStubs.
{ max_stubs_ = CSCConstants::maxStubs; edm::ParameterSet commonParams = conf.getParameter<edm::ParameterSet>("commonParam"); if (commonParams.getUntrackedParameter<bool>("isSLHC",false)) { edm::ParameterSet mpcParams = conf.getParameter<edm::ParameterSet>("mpcSLHC"); max_stubs_ = mpcParams.getUntrackedParameter<unsigned int>("mpcMaxStubs", CSCConstants::maxStubs); } }
void CSCMuonPortCard::clear | ( | void | ) | [inline] |
Definition at line 44 of file CSCMuonPortCard.h.
References CSCTriggerContainer< T >::clear(), and stubs_.
Referenced by loadDigis().
void CSCMuonPortCard::loadDigis | ( | const CSCCorrelatedLCTDigiCollection & | thedigis | ) |
Definition at line 44 of file CSCMuonPortCard.cc.
References clear(), CSCTriggerContainer< T >::push_back(), and stubs_.
Referenced by CSCTriggerPrimitivesBuilder::build().
{ // Put everything from the digi container into a trigger container. // This allows us to sort per BX more easily. clear(); CSCCorrelatedLCTDigiCollection::DigiRangeIterator Citer; for (Citer = thedigis.begin(); Citer != thedigis.end(); Citer++) { CSCCorrelatedLCTDigiCollection::const_iterator Diter = (*Citer).second.first; CSCCorrelatedLCTDigiCollection::const_iterator Dend = (*Citer).second.second; for (; Diter != Dend; Diter++) { csctf::TrackStub theStub((*Diter), (*Citer).first); stubs_.push_back(theStub); } } }
std::vector< csctf::TrackStub > CSCMuonPortCard::sort | ( | const unsigned | endcap, |
const unsigned | station, | ||
const unsigned | sector, | ||
const unsigned | subsector, | ||
const int | bx | ||
) |
Definition at line 63 of file CSCMuonPortCard.cc.
References CSCTriggerContainer< T >::get(), i, max_stubs_, query::result, and stubs_.
Referenced by CSCTriggerPrimitivesBuilder::build().
{ std::vector<csctf::TrackStub> result; std::vector<csctf::TrackStub>::iterator LCT; result = stubs_.get(endcap, station, sector, subsector, bx); // Make sure no Quality 0 or non-valid LCTs come through the portcard. for (LCT = result.begin(); LCT != result.end(); LCT++) { if ( !(LCT->getQuality() && LCT->isValid()) ) result.erase(LCT, LCT); } if (result.size()) { std::sort(result.begin(), result.end(), std::greater<csctf::TrackStub>()); // Can only return maxStubs or less LCTs per bunch crossing. if (result.size() > max_stubs_) result.erase(result.begin() + max_stubs_, result.end()); // Go through the sorted list and label the LCTs with a sorting number. unsigned i = 0; for (LCT = result.begin(); LCT != result.end(); LCT++) LCT->setMPCLink(++i); } return result; }
unsigned int CSCMuonPortCard::max_stubs_ [private] |
Definition at line 48 of file CSCMuonPortCard.h.
Referenced by CSCMuonPortCard(), and sort().
Definition at line 47 of file CSCMuonPortCard.h.
Referenced by clear(), loadDigis(), and sort().