60 if ( m_config->Debug(1) )
cout << endl;
61 if ( m_config->Debug(1) )
cout <<
"**** entering L1MuDTTrackFinder ****" << endl;
62 if ( m_config->Debug(1) )
cout << endl;
70 _cache0.reserve(144*17);
84 vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin();
85 while ( it_ep != m_epvec.end() ) {
91 vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin();
92 while ( it_ws != m_wsvec.end() ) {
100 if ( m_config )
delete m_config;
117 if ( m_config->Debug(1) )
cout << endl;
118 if ( m_config->Debug(1) )
cout <<
"**** L1MuDTTrackFinder building ****" << endl;
119 if ( m_config->Debug(1) )
cout << endl;
122 for (
int wh = -3; wh <= 3; wh++ ) {
123 if ( wh == 0 )
continue;
124 for (
int sc = 0;
sc < 12;
sc++ ) {
127 if ( m_config->Debug(2) )
cout <<
"creating " << tmpspid << endl;
128 m_spmap->insert(tmpspid,sp);
133 for (
int sc = 0;
sc < 12;
sc++ ) {
135 if ( m_config->Debug(2) )
cout <<
"creating Eta Processor " <<
sc << endl;
136 m_epvec.push_back(ep);
138 if ( m_config->Debug(2) )
cout <<
"creating Wedge Sorter " <<
sc << endl;
139 m_wsvec.push_back(ws);
143 if ( m_config->Debug(2) )
cout <<
"creating DT Muon Sorter " << endl;
160 if ( m_config->Debug(2) )
cout << endl;
161 if ( m_config->Debug(2) )
cout <<
"**** L1MuDTTrackFinder processing ****" << endl;
162 if ( m_config->Debug(2) )
cout << endl;
164 int bx_min = m_config->getBxMin();
165 int bx_max = m_config->getBxMax();
167 for (
int bx = bx_min; bx <= bx_max; bx++ ) {
169 if ( dttrig->
bxEmpty(bx) )
continue;
171 if ( m_config->Debug(2) )
cout <<
"L1MuDTTrackFinder processing bunch-crossing : " << bx << endl;
178 while ( it_sp != m_spmap->end() ) {
179 if ( m_config->Debug(2) )
cout <<
"running " 180 << (*it_sp).second->id() << endl;
181 if ( (*it_sp).second ) (*it_sp).second->run(bx,e,c);
182 if ( m_config->Debug(2) && (*it_sp).second ) (*it_sp).second->print();
187 vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin();
188 while ( it_ep != m_epvec.end() ) {
189 if ( m_config->Debug(2) )
cout <<
"running Eta Processor " 190 << (*it_ep)->id() << endl;
191 if ( *it_ep ) (*it_ep)->run(bx,e,c);
192 if ( m_config->Debug(2) && *it_ep ) (*it_ep)->print();
197 it_sp = m_spmap->begin();
198 while ( it_sp != m_spmap->end() ) {
199 if ( m_config->Debug(2) )
cout <<
"reading " 200 << (*it_sp).second->id() << endl;
201 for (
int number = 0; number < 2; number++ ) {
211 vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin();
212 while ( it_ws != m_wsvec.end() ) {
213 if ( m_config->Debug(2) )
cout <<
"running Wedge Sorter " 214 << (*it_ws)->id() << endl;
215 if ( *it_ws ) (*it_ws)->run();
216 if ( m_config->Debug(2) && *it_ws ) (*it_ws)->print();
221 if ( m_config->Debug(2) )
cout <<
"running DT Muon Sorter" << endl;
222 if ( m_ms ) m_ms->run();
223 if ( m_config->Debug(2) && m_ms ) m_ms->print();
226 if ( m_ms->numberOfTracks() > 0 ) {
227 const vector<const L1MuDTTrack*>& mttf_cont = m_ms->tracks();
228 vector<const L1MuDTTrack*>::const_iterator iter;
229 for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) {
230 if ( *iter ) _cache.push_back(
L1MuRegionalCand((*iter)->getDataWord(),(*iter)->bx()));
245 while ( it_sp != m_spmap->end() ) {
246 if ( (*it_sp).second ) (*it_sp).second->reset();
250 vector<L1MuDTEtaProcessor*>::iterator it_ep = m_epvec.begin();
251 while ( it_ep != m_epvec.end() ) {
252 if ( *it_ep ) (*it_ep)->reset();
256 vector<L1MuDTWedgeSorter*>::iterator it_ws = m_wsvec.begin();
257 while ( it_ws != m_wsvec.end() ) {
258 if ( *it_ws ) (*it_ws)->reset();
262 if ( m_ms ) m_ms->reset();
272 return m_spmap->sp(
id);
282 return _cache.size();
289 return _cache.begin();
316 if ( (*it).bx() == bx ) number++;
TFtracks_const_iter begin()
L1MuDTAddressArray address() const
get address-array for this muon candidate
bool getByToken(EDGetToken token, Handle< PROD > &result) const
TrackClass tc() const
get track-class
TFtracks_const_iter end()
bool bxEmpty(int step) const
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
void setup(edm::ConsumesCollector &&iC)
build the structure of the barrel MTTF
const L1MuDTSectorProcessor * sp(const L1MuDTSecProcId &) const
get a pointer to a Sector Processor
int sector() const
return sector number
virtual ~L1MuDTTrackFinder()
destructor
void reset()
reset the barrel MTTF
bool empty() const override
is it an empty muon candidate?
int numberOfTracks()
get number of muon candidates found by the barrel MTTF
unsigned getDataWord() const
return data word
L1MuDTTrackFinder(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
constructor
const L1MuDTSecProcId & spid() const
return Sector Processor in which the muon candidate was found
SPmap::iterator SPmap_iter
std::vector< L1MuRegionalCand >::const_iterator TFtracks_const_iter
container for muon candidates
Phi_Container const * getContainer() const
int bx() const
return bunch crossing identifier
int wheel() const
return wheel number
static L1MuDTTFConfig * m_config
Track Finder configuration.
void reset(double vett[256])