#include <L1MuDTTrackFinder.h>
Public Types | |
typedef std::vector < L1MuRegionalCand > ::const_iterator | TFtracks_const_iter |
container for muon candidates | |
typedef std::vector < L1MuRegionalCand >::iterator | TFtracks_iter |
Public Member Functions | |
TFtracks_const_iter | begin () |
void | clear () |
TFtracks_const_iter | end () |
const L1MuDTEtaProcessor * | ep (int id) const |
get a pointer to an Eta Processor, index [0-11] | |
std::vector< L1MuRegionalCand > & | getcache () |
std::vector< L1MuDTTrackCand > & | getcache0 () |
L1MuDTTrackFinder (const edm::ParameterSet &ps) | |
constructor | |
const L1MuDTMuonSorter * | ms () const |
get a pointer to the DT Muon Sorter | |
int | numberOfTracks () |
get number of muon candidates found by the barrel MTTF | |
int | numberOfTracks (int bx) |
get number of muon candidates found by the barrel MTTF at a given bx | |
void | reset () |
reset the barrel MTTF | |
void | run (const edm::Event &e, const edm::EventSetup &c) |
run the barrel MTTF | |
void | setup () |
build the structure of the barrel MTTF | |
const L1MuDTSectorProcessor * | sp (const L1MuDTSecProcId &) const |
get a pointer to a Sector Processor | |
const L1MuDTWedgeSorter * | ws (int id) const |
get a pointer to a Wedge Sorter, index [0-11] | |
virtual | ~L1MuDTTrackFinder () |
destructor | |
Static Public Member Functions | |
static L1MuDTTFConfig * | config () |
return configuration | |
Private Member Functions | |
virtual void | reconstruct (const edm::Event &e, const edm::EventSetup &c) |
run Track Finder and store candidates in cache | |
Private Attributes | |
std::vector< L1MuRegionalCand > | _cache |
std::vector< L1MuDTTrackCand > | _cache0 |
std::vector< L1MuDTEtaProcessor * > | m_epvec |
Eta Processors. | |
L1MuDTMuonSorter * | m_ms |
DT Muon Sorter. | |
L1MuDTSecProcMap * | m_spmap |
Sector Processors. | |
std::vector< L1MuDTWedgeSorter * > | m_wsvec |
Wedge Sorters. | |
Static Private Attributes | |
static L1MuDTTFConfig * | m_config = 0 |
Track Finder configuration. |
L1 barrel Muon Trigger Track Finder (MTTF)
The barrel MTTF consists of:
N. Neumeister CERN EP J. Troconiz UAM Madrid
Definition at line 57 of file L1MuDTTrackFinder.h.
typedef std::vector<L1MuRegionalCand>::const_iterator L1MuDTTrackFinder::TFtracks_const_iter |
container for muon candidates
Definition at line 62 of file L1MuDTTrackFinder.h.
typedef std::vector<L1MuRegionalCand>::iterator L1MuDTTrackFinder::TFtracks_iter |
Definition at line 63 of file L1MuDTTrackFinder.h.
L1MuDTTrackFinder::L1MuDTTrackFinder | ( | const edm::ParameterSet & | ps | ) |
constructor
Definition at line 57 of file L1MuDTTrackFinder.cc.
References gather_cfg::cout, and L1MuDTTFConfig::Debug().
{ // set configuration parameters if ( m_config == 0 ) m_config = new L1MuDTTFConfig(ps); if ( L1MuDTTFConfig::Debug(1) ) cout << endl; if ( L1MuDTTFConfig::Debug(1) ) cout << "**** entering L1MuDTTrackFinder ****" << endl; if ( L1MuDTTFConfig::Debug(1) ) cout << endl; m_spmap = new L1MuDTSecProcMap(); m_epvec.reserve(12); m_wsvec.reserve(12); m_ms = 0; _cache.reserve(4*17); _cache0.reserve(144*17); }
L1MuDTTrackFinder::~L1MuDTTrackFinder | ( | ) | [virtual] |
destructor
Definition at line 81 of file L1MuDTTrackFinder.cc.
{ delete m_spmap; vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin(); while ( it_ep != m_epvec.end() ) { delete (*it_ep); it_ep++; } m_epvec.clear(); vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin(); while ( it_ws != m_wsvec.end() ) { delete (*it_ws); it_ws++; } m_wsvec.clear(); delete m_ms; if ( m_config ) delete m_config; m_config = 0; }
L1MuDTTrackFinder::TFtracks_const_iter L1MuDTTrackFinder::begin | ( | void | ) |
Definition at line 288 of file L1MuDTTrackFinder.cc.
{ return _cache.begin(); }
void L1MuDTTrackFinder::clear | ( | void | ) |
Definition at line 302 of file L1MuDTTrackFinder.cc.
Referenced by DTTrackFinder::produce().
static L1MuDTTFConfig* L1MuDTTrackFinder::config | ( | void | ) | [inline, static] |
return configuration
Definition at line 105 of file L1MuDTTrackFinder.h.
References m_config.
{ return m_config; }
L1MuDTTrackFinder::TFtracks_const_iter L1MuDTTrackFinder::end | ( | void | ) |
Definition at line 295 of file L1MuDTTrackFinder.cc.
{ return _cache.end(); }
const L1MuDTEtaProcessor* L1MuDTTrackFinder::ep | ( | int | id | ) | const [inline] |
get a pointer to an Eta Processor, index [0-11]
Definition at line 84 of file L1MuDTTrackFinder.h.
References errorMatrix2Lands_multiChannel::id, and m_epvec.
std::vector<L1MuRegionalCand>& L1MuDTTrackFinder::getcache | ( | ) | [inline] |
Definition at line 109 of file L1MuDTTrackFinder.h.
References _cache.
Referenced by DTTrackFinder::produce().
{ return _cache; }
std::vector<L1MuDTTrackCand>& L1MuDTTrackFinder::getcache0 | ( | ) | [inline] |
Definition at line 107 of file L1MuDTTrackFinder.h.
References _cache0.
Referenced by DTTrackFinder::produce().
{ return _cache0; }
const L1MuDTMuonSorter* L1MuDTTrackFinder::ms | ( | ) | const [inline] |
get a pointer to the DT Muon Sorter
Definition at line 90 of file L1MuDTTrackFinder.h.
References m_ms.
{ return m_ms; }
int L1MuDTTrackFinder::numberOfTracks | ( | int | bx | ) |
get number of muon candidates found by the barrel MTTF at a given bx
Definition at line 313 of file L1MuDTTrackFinder.cc.
{ int number = 0; for ( TFtracks_const_iter it = _cache.begin(); it != _cache.end(); it++ ) { if ( (*it).bx() == bx ) number++; } return number; }
int L1MuDTTrackFinder::numberOfTracks | ( | ) |
get number of muon candidates found by the barrel MTTF
Definition at line 281 of file L1MuDTTrackFinder.cc.
Referenced by DTTrackFinder::produce().
{ return _cache.size(); }
virtual void L1MuDTTrackFinder::reconstruct | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [inline, private, virtual] |
void L1MuDTTrackFinder::reset | ( | void | ) |
reset the barrel MTTF
Definition at line 243 of file L1MuDTTrackFinder.cc.
Referenced by reconstruct().
{ L1MuDTSecProcMap::SPmap_iter it_sp = m_spmap->begin(); while ( it_sp != m_spmap->end() ) { if ( (*it_sp).second ) (*it_sp).second->reset(); it_sp++; } vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin(); while ( it_ep != m_epvec.end() ) { if ( *it_ep ) (*it_ep)->reset(); it_ep++; } vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin(); while ( it_ws != m_wsvec.end() ) { if ( *it_ws ) (*it_ws)->reset(); it_ws++; } if ( m_ms ) m_ms->reset(); }
void L1MuDTTrackFinder::run | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) |
run the barrel MTTF
Definition at line 153 of file L1MuDTTrackFinder.cc.
References L1MuDTTrack::address(), L1MuRegionalCand::bx(), gather_cfg::cout, L1MuDTTFConfig::Debug(), L1MuDTTrack::empty(), L1MuDTTFConfig::getBxMax(), L1MuDTTFConfig::getBxMin(), edm::Event::getByLabel(), L1MuRegionalCand::getDataWord(), L1MuDTTFConfig::getDTDigiInputTag(), reset(), L1MuDTSecProcId::sector(), L1MuDTTrack::spid(), L1MuDTTrack::tc(), and L1MuDTSecProcId::wheel().
Referenced by DTTrackFinder::produce(), and reconstruct().
{ // run the barrel Muon Trigger Track Finder edm::Handle<L1MuDTChambPhContainer> dttrig; e.getByLabel(L1MuDTTFConfig::getDTDigiInputTag(),dttrig); if ( dttrig->getContainer()->size() == 0 ) return; if ( L1MuDTTFConfig::Debug(2) ) cout << endl; if ( L1MuDTTFConfig::Debug(2) ) cout << "**** L1MuDTTrackFinder processing ****" << endl; if ( L1MuDTTFConfig::Debug(2) ) cout << endl; int bx_min = L1MuDTTFConfig::getBxMin(); int bx_max = L1MuDTTFConfig::getBxMax(); for ( int bx = bx_min; bx <= bx_max; bx++ ) { if ( dttrig->bxEmpty(bx) ) continue; if ( L1MuDTTFConfig::Debug(2) ) cout << "L1MuDTTrackFinder processing bunch-crossing : " << bx << endl; // reset MTTF reset(); // run sector processors L1MuDTSecProcMap::SPmap_iter it_sp = m_spmap->begin(); while ( it_sp != m_spmap->end() ) { if ( L1MuDTTFConfig::Debug(2) ) cout << "running " << (*it_sp).second->id() << endl; if ( (*it_sp).second ) (*it_sp).second->run(bx,e,c); if ( L1MuDTTFConfig::Debug(2) && (*it_sp).second ) (*it_sp).second->print(); it_sp++; } // run eta processors vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin(); while ( it_ep != m_epvec.end() ) { if ( L1MuDTTFConfig::Debug(2) ) cout << "running Eta Processor " << (*it_ep)->id() << endl; if ( *it_ep ) (*it_ep)->run(bx,e,c); if ( L1MuDTTFConfig::Debug(2) && *it_ep ) (*it_ep)->print(); it_ep++; } // read sector processors it_sp = m_spmap->begin(); while ( it_sp != m_spmap->end() ) { if ( L1MuDTTFConfig::Debug(2) ) cout << "reading " << (*it_sp).second->id() << endl; for ( int number = 0; number < 2; number++ ) { const L1MuDTTrack* cand = (*it_sp).second->tracK(number); if ( cand && !cand->empty() ) _cache0.push_back(L1MuDTTrackCand(cand->getDataWord(),cand->bx(), cand->spid().wheel(),cand->spid().sector(),number,cand->address(1), cand->address(2),cand->address(3),cand->address(4),cand->tc())); } it_sp++; } // run wedge sorters vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin(); while ( it_ws != m_wsvec.end() ) { if ( L1MuDTTFConfig::Debug(2) ) cout << "running Wedge Sorter " << (*it_ws)->id() << endl; if ( *it_ws ) (*it_ws)->run(); if ( L1MuDTTFConfig::Debug(2) && *it_ws ) (*it_ws)->print(); it_ws++; } // run muon sorter if ( L1MuDTTFConfig::Debug(2) ) cout << "running DT Muon Sorter" << endl; if ( m_ms ) m_ms->run(); if ( L1MuDTTFConfig::Debug(2) && m_ms ) m_ms->print(); // store found track candidates in container (cache) if ( m_ms->numberOfTracks() > 0 ) { const vector<const L1MuDTTrack*>& mttf_cont = m_ms->tracks(); vector<const L1MuDTTrack*>::const_iterator iter; for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) { if ( *iter ) _cache.push_back(L1MuRegionalCand((*iter)->getDataWord(),(*iter)->bx())); } } } }
void L1MuDTTrackFinder::setup | ( | void | ) |
build the structure of the barrel MTTF
Definition at line 114 of file L1MuDTTrackFinder.cc.
References gather_cfg::cout, and L1MuDTTFConfig::Debug().
Referenced by L1MuDTTFSetup::L1MuDTTFSetup().
{ // build the barrel Muon Trigger Track Finder if ( L1MuDTTFConfig::Debug(1) ) cout << endl; if ( L1MuDTTFConfig::Debug(1) ) cout << "**** L1MuDTTrackFinder building ****" << endl; if ( L1MuDTTFConfig::Debug(1) ) cout << endl; // create new sector processors for ( int wh = -3; wh <= 3; wh++ ) { if ( wh == 0 ) continue; for ( int sc = 0; sc < 12; sc++ ) { L1MuDTSecProcId tmpspid(wh,sc); L1MuDTSectorProcessor* sp = new L1MuDTSectorProcessor(*this,tmpspid); if ( L1MuDTTFConfig::Debug(2) ) cout << "creating " << tmpspid << endl; m_spmap->insert(tmpspid,sp); } } // create new eta processors and wedge sorters for ( int sc = 0; sc < 12; sc++ ) { L1MuDTEtaProcessor* ep = new L1MuDTEtaProcessor(*this,sc); if ( L1MuDTTFConfig::Debug(2) ) cout << "creating Eta Processor " << sc << endl; m_epvec.push_back(ep); L1MuDTWedgeSorter* ws = new L1MuDTWedgeSorter(*this,sc); if ( L1MuDTTFConfig::Debug(2) ) cout << "creating Wedge Sorter " << sc << endl; m_wsvec.push_back(ws); } // create new muon sorter if ( L1MuDTTFConfig::Debug(2) ) cout << "creating DT Muon Sorter " << endl; m_ms = new L1MuDTMuonSorter(*this); }
const L1MuDTSectorProcessor * L1MuDTTrackFinder::sp | ( | const L1MuDTSecProcId & | id | ) | const |
get a pointer to a Sector Processor
Definition at line 271 of file L1MuDTTrackFinder.cc.
Referenced by L1MuDTSectorProcessor::neighbour(), L1MuDTEtaProcessor::receiveAddresses(), and L1MuDTWedgeSorter::run().
const L1MuDTWedgeSorter* L1MuDTTrackFinder::ws | ( | int | id | ) | const [inline] |
get a pointer to a Wedge Sorter, index [0-11]
Definition at line 87 of file L1MuDTTrackFinder.h.
References errorMatrix2Lands_multiChannel::id, and m_wsvec.
Referenced by L1MuDTMuonSorter::run().
std::vector<L1MuRegionalCand> L1MuDTTrackFinder::_cache [private] |
Definition at line 119 of file L1MuDTTrackFinder.h.
Referenced by getcache().
std::vector<L1MuDTTrackCand> L1MuDTTrackFinder::_cache0 [private] |
Definition at line 118 of file L1MuDTTrackFinder.h.
Referenced by getcache0().
L1MuDTTFConfig * L1MuDTTrackFinder::m_config = 0 [static, private] |
Track Finder configuration.
Definition at line 125 of file L1MuDTTrackFinder.h.
Referenced by config().
std::vector<L1MuDTEtaProcessor*> L1MuDTTrackFinder::m_epvec [private] |
L1MuDTMuonSorter* L1MuDTTrackFinder::m_ms [private] |
L1MuDTSecProcMap* L1MuDTTrackFinder::m_spmap [private] |
Sector Processors.
Definition at line 120 of file L1MuDTTrackFinder.h.
std::vector<L1MuDTWedgeSorter*> L1MuDTTrackFinder::m_wsvec [private] |