CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
L1MuBMTrackFinder Class Reference

#include <L1MuBMTrackFinder.h>

Public Types

typedef
l1t::RegionalMuonCandBxCollection::const_iterator 
TFtracks_const_iter
 container for muon candidates More...
 
typedef
l1t::RegionalMuonCandBxCollection::iterator 
TFtracks_iter
 

Public Member Functions

TFtracks_const_iter begin (int bx)
 
void clear ()
 
TFtracks_const_iter end (int bx)
 
const L1MuBMEtaProcessorep (int id) const
 get a pointer to an Eta Processor, index [0-11] More...
 
l1t::RegionalMuonCandBxCollectiongetcache ()
 
l1t::RegionalMuonCandBxCollectiongetcache0 ()
 
 L1MuBMTrackFinder (const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
 constructor More...
 
const L1MuBMMuonSorterms () const
 get a pointer to the BM Muon Sorter More...
 
int numberOfTracks ()
 get number of muon candidates found by the barrel MTTF More...
 
int numberOfTracks (int bx)
 get number of muon candidates found by the barrel MTTF at a given bx More...
 
void reset ()
 reset the barrel MTTF More...
 
void run (const edm::Event &e, const edm::EventSetup &c)
 run the barrel MTTF More...
 
int setAdd (int ust, int rel_add)
 
void setup (edm::ConsumesCollector &&)
 build the structure of the barrel MTTF More...
 
const L1MuBMSectorProcessorsp (const L1MuBMSecProcId &) const
 get a pointer to a Sector Processor More...
 
const L1MuBMWedgeSorterws (int id) const
 get a pointer to a Wedge Sorter, index [0-11] More...
 
virtual ~L1MuBMTrackFinder ()
 destructor More...
 

Static Public Member Functions

static L1MuBMTFConfigconfig ()
 return configuration More...
 

Private Member Functions

virtual void reconstruct (const edm::Event &e, const edm::EventSetup &c)
 run Track Finder and store candidates in cache More...
 

Private Attributes

l1t::RegionalMuonCandBxCollection _cache
 
l1t::RegionalMuonCandBxCollection _cache0
 
std::map< int, int > eta_map
 
edm::EDGetTokenT
< L1MuDTChambPhContainer
m_DTDigiToken
 
std::vector< L1MuBMEtaProcessor * > m_epvec
 Eta Processors. More...
 
L1MuBMMuonSorterm_ms
 BM Muon Sorter. More...
 
L1MuBMSecProcMapm_spmap
 Sector Processors. More...
 
std::vector< L1MuBMWedgeSorter * > m_wsvec
 Wedge Sorters. More...
 

Static Private Attributes

static L1MuBMTFConfigm_config = 0
 Track Finder configuration. More...
 

Detailed Description

L1 barrel Muon Trigger Track Finder (MTTF)

The barrel MTTF consists of:

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 62 of file L1MuBMTrackFinder.h.

Member Typedef Documentation

container for muon candidates

Definition at line 67 of file L1MuBMTrackFinder.h.

Definition at line 68 of file L1MuBMTrackFinder.h.

Constructor & Destructor Documentation

L1MuBMTrackFinder::L1MuBMTrackFinder ( const edm::ParameterSet ps,
edm::ConsumesCollector &&  iC 
)

constructor

Definition at line 58 of file L1MuBMTrackFinder.cc.

References gather_cfg::cout, L1MuBMTFConfig::Debug(), L1MuBMTFConfig::getBMDigiInputTag(), m_config, m_DTDigiToken, m_epvec, m_ms, m_spmap, and m_wsvec.

58  :
59 _cache0(144,-9,8),_cache(36, -9, 8) {
60  // set configuration parameters
61  if ( m_config == 0 ) m_config = new L1MuBMTFConfig(ps);
62 
63  if ( L1MuBMTFConfig::Debug(1) ) cout << endl;
64  if ( L1MuBMTFConfig::Debug(1) ) cout << "**** entering L1MuBMTrackFinder ****" << endl;
65  if ( L1MuBMTFConfig::Debug(1) ) cout << endl;
66 
67  m_spmap = new L1MuBMSecProcMap();
68  m_epvec.reserve(12);
69  m_wsvec.reserve(12);
70  m_ms = 0;
71 
73 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
static edm::InputTag getBMDigiInputTag()
std::vector< L1MuBMWedgeSorter * > m_wsvec
Wedge Sorters.
static L1MuBMTFConfig * m_config
Track Finder configuration.
l1t::RegionalMuonCandBxCollection _cache0
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
static bool Debug()
l1t::RegionalMuonCandBxCollection _cache
tuple cout
Definition: gather_cfg.py:145
L1MuBMSecProcMap * m_spmap
Sector Processors.
L1MuBMTrackFinder::~L1MuBMTrackFinder ( )
virtual

destructor

Definition at line 80 of file L1MuBMTrackFinder.cc.

References m_config, m_epvec, m_ms, m_spmap, and m_wsvec.

80  {
81 
82  delete m_spmap;
83 
84  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
85  while ( it_ep != m_epvec.end() ) {
86  delete (*it_ep);
87  it_ep++;
88  }
89  m_epvec.clear();
90 
91  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
92  while ( it_ws != m_wsvec.end() ) {
93  delete (*it_ws);
94  it_ws++;
95  }
96  m_wsvec.clear();
97 
98  delete m_ms;
99 
100  if ( m_config ) delete m_config;
101  m_config = 0;
102 
103 }
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
std::vector< L1MuBMWedgeSorter * > m_wsvec
Wedge Sorters.
static L1MuBMTFConfig * m_config
Track Finder configuration.
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
L1MuBMSecProcMap * m_spmap
Sector Processors.

Member Function Documentation

L1MuBMTrackFinder::TFtracks_const_iter L1MuBMTrackFinder::begin ( int  bx)

Definition at line 399 of file L1MuBMTrackFinder.cc.

References _cache, and BXVector< T >::begin().

399  {
400 
401  return _cache.begin(bx);
402 
403 }
l1t::RegionalMuonCandBxCollection _cache
const_iterator begin(int bx) const
void L1MuBMTrackFinder::clear ( void  )

Definition at line 413 of file L1MuBMTrackFinder.cc.

References _cache, _cache0, and BXVector< T >::clear().

Referenced by L1TMuonBarrelTrackProducer::produce().

413  {
414 
415  _cache.clear();
416  _cache0.clear();
417 
418 }
l1t::RegionalMuonCandBxCollection _cache0
void clear()
l1t::RegionalMuonCandBxCollection _cache
static L1MuBMTFConfig* L1MuBMTrackFinder::config ( void  )
inlinestatic

return configuration

Definition at line 112 of file L1MuBMTrackFinder.h.

References m_config.

112 { return m_config; }
static L1MuBMTFConfig * m_config
Track Finder configuration.
L1MuBMTrackFinder::TFtracks_const_iter L1MuBMTrackFinder::end ( int  bx)

Definition at line 406 of file L1MuBMTrackFinder.cc.

References _cache, and BXVector< T >::end().

406  {
407 
408  return _cache.end(bx);
409 
410 }
const_iterator end(int bx) const
l1t::RegionalMuonCandBxCollection _cache
const L1MuBMEtaProcessor* L1MuBMTrackFinder::ep ( int  id) const
inline

get a pointer to an Eta Processor, index [0-11]

Definition at line 91 of file L1MuBMTrackFinder.h.

References m_epvec.

Referenced by setup().

91 { return m_epvec[id]; }
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
l1t::RegionalMuonCandBxCollection& L1MuBMTrackFinder::getcache ( )
inline

Definition at line 116 of file L1MuBMTrackFinder.h.

References _cache.

Referenced by L1TMuonBarrelTrackProducer::produce().

116 { return _cache; }
l1t::RegionalMuonCandBxCollection _cache
l1t::RegionalMuonCandBxCollection& L1MuBMTrackFinder::getcache0 ( )
inline

Definition at line 117 of file L1MuBMTrackFinder.h.

References _cache0.

Referenced by L1TMuonBarrelTrackProducer::produce().

117 { return _cache0; }
l1t::RegionalMuonCandBxCollection _cache0
const L1MuBMMuonSorter* L1MuBMTrackFinder::ms ( ) const
inline

get a pointer to the BM Muon Sorter

Definition at line 97 of file L1MuBMTrackFinder.h.

References m_ms.

97 { return m_ms; }
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
int L1MuBMTrackFinder::numberOfTracks ( )

get number of muon candidates found by the barrel MTTF

Definition at line 390 of file L1MuBMTrackFinder.cc.

References _cache, BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), pileupDistInMC::num, and BXVector< T >::size().

Referenced by L1TMuonBarrelTrackProducer::produce().

390  {
391  int num = 0;
392  for (int bx = _cache.getFirstBX(); bx < _cache.getLastBX(); ++bx) {
393  num += _cache.size(bx);
394  }
395  return num;
396 }
unsigned size(int bx) const
int getFirstBX() const
l1t::RegionalMuonCandBxCollection _cache
int getLastBX() const
int L1MuBMTrackFinder::numberOfTracks ( int  bx)

get number of muon candidates found by the barrel MTTF at a given bx

Definition at line 424 of file L1MuBMTrackFinder.cc.

References _cache, and BXVector< T >::size().

424  {
425  return _cache.size(0);
426 }
unsigned size(int bx) const
l1t::RegionalMuonCandBxCollection _cache
virtual void L1MuBMTrackFinder::reconstruct ( const edm::Event e,
const edm::EventSetup c 
)
inlineprivatevirtual

run Track Finder and store candidates in cache

Definition at line 122 of file L1MuBMTrackFinder.h.

References reset(), and run().

122 { reset(); run(e,c); }
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
void reset()
reset the barrel MTTF
void L1MuBMTrackFinder::reset ( void  )

reset the barrel MTTF

Definition at line 352 of file L1MuBMTrackFinder.cc.

References L1MuBMSecProcMap::begin(), L1MuBMSecProcMap::end(), m_epvec, m_ms, m_spmap, m_wsvec, and L1MuBMMuonSorter::reset().

Referenced by reconstruct(), and run().

352  {
353 
355  while ( it_sp != m_spmap->end() ) {
356  if ( (*it_sp).second ) (*it_sp).second->reset();
357  it_sp++;
358  }
359 
360  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
361  while ( it_ep != m_epvec.end() ) {
362  if ( *it_ep ) (*it_ep)->reset();
363  it_ep++;
364  }
365 
366  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
367  while ( it_ws != m_wsvec.end() ) {
368  if ( *it_ws ) (*it_ws)->reset();
369  it_ws++;
370  }
371 
372  if ( m_ms ) m_ms->reset();
373 
374 }
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
SPmap::iterator SPmap_iter
virtual void reset()
reset Muon Sorter
std::vector< L1MuBMWedgeSorter * > m_wsvec
Wedge Sorters.
SPmap_iter begin()
return iterator which points to the first entry of the container
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
SPmap_iter end()
return iterator which points to the one-past-last entry of the container
L1MuBMSecProcMap * m_spmap
Sector Processors.
void L1MuBMTrackFinder::run ( const edm::Event e,
const edm::EventSetup c 
)

run the barrel MTTF

Resize the bx range according to the config file

Definition at line 152 of file L1MuBMTrackFinder.cc.

References _cache, _cache0, funct::abs(), L1MuBMTrack::address(), L1MuBMSecProcMap::begin(), l1t::bmtf, L1MuBMTrack::bx(), gather_cfg::cout, L1MuBMTFConfig::Debug(), L1MuBMTrack::empty(), L1MuBMSecProcMap::end(), eta_map, L1MuBMTFConfig::getBxMax(), L1MuBMTFConfig::getBxMin(), edm::Event::getByToken(), l1t::RegionalMuonCand::hwEta(), l1t::RegionalMuonCand::hwHF(), l1t::RegionalMuonCand::hwPhi(), l1t::RegionalMuonCand::hwQual(), l1t::RegionalMuonCand::hwSign(), l1t::RegionalMuonCand::hwSignValid(), l1t::RegionalMuonCand::kSegSelStat1, l1t::RegionalMuonCand::kSegSelStat2, l1t::RegionalMuonCand::kSegSelStat3, l1t::RegionalMuonCand::kSegSelStat4, l1t::RegionalMuonCand::kStat1, l1t::RegionalMuonCand::kStat2, l1t::RegionalMuonCand::kStat3, l1t::RegionalMuonCand::kStat4, l1t::RegionalMuonCand::kWheelNum, l1t::RegionalMuonCand::kWheelSide, m_config, m_DTDigiToken, m_epvec, m_spmap, m_wsvec, contentValuesFiles::number, L1MuBMTrack::pt(), BXVector< T >::push_back(), reset(), L1MuBMSecProcId::sector(), setAdd(), BXVector< T >::setBXRange(), L1MuBMTFConfig::setDefaultsES(), l1t::RegionalMuonCand::setHwEta(), l1t::RegionalMuonCand::setHwHF(), l1t::RegionalMuonCand::setHwPhi(), l1t::RegionalMuonCand::setHwPt(), l1t::RegionalMuonCand::setHwQual(), l1t::RegionalMuonCand::setHwSign(), l1t::RegionalMuonCand::setHwSignValid(), l1t::RegionalMuonCand::setTFIdentifiers(), l1t::RegionalMuonCand::setTrackSubAddress(), L1MuBMTrack::spid(), and L1MuBMSecProcId::wheel().

Referenced by L1TMuonBarrelTrackProducer::produce(), and reconstruct().

152  {
153 
155  // run the barrel Muon Trigger Track Finder
157  e.getByToken(m_DTDigiToken,dttrig);
158  if ( dttrig->getContainer()->size() == 0 ) return;
159 
160  if ( L1MuBMTFConfig::Debug(2) ) cout << endl;
161  if ( L1MuBMTFConfig::Debug(2) ) cout << "**** L1MuBMTrackFinder processing ------****" << endl;
162  if ( L1MuBMTFConfig::Debug(2) ) cout << endl;
163 
164  int bx_min = L1MuBMTFConfig::getBxMin();
165  int bx_max = L1MuBMTFConfig::getBxMax();
166 
168  _cache0.setBXRange(bx_min,bx_max);
169  _cache.setBXRange(bx_min,bx_max);
170 
171  for ( int bx = bx_min; bx <= bx_max; bx++ ) {
172  if ( dttrig->bxEmpty(bx) ) continue;
173 
174  if ( L1MuBMTFConfig::Debug(2) ) cout << "L1MuBMTrackFinder processing bunch-crossing : " << bx << endl;
175 
176  // reset MTTF
177  reset();
178 
179  // run sector processors
181  while ( it_sp != m_spmap->end() ) {
182  if ( L1MuBMTFConfig::Debug(2) ) cout << "running "
183  << (*it_sp).second->id() << endl;
184  if ( (*it_sp).second ) (*it_sp).second->run(bx,e,c);
185  if ( L1MuBMTFConfig::Debug(2) && (*it_sp).second ) (*it_sp).second->print();
186  it_sp++;
187  }
188 
189  // run eta processors
190  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
191  while ( it_ep != m_epvec.end() ) {
192  if ( L1MuBMTFConfig::Debug(2) ) cout << "running Eta Processor "
193  << (*it_ep)->id() << endl;
194  if ( *it_ep ) (*it_ep)->run(bx,e,c);
195  if ( L1MuBMTFConfig::Debug(2) && *it_ep ) (*it_ep)->print();
196  it_ep++;
197  }
198 
199  // read sector processors
200  it_sp = m_spmap->begin();
201  while ( it_sp != m_spmap->end() ) {
202  if ( L1MuBMTFConfig::Debug(2) ) cout << "reading "
203  << (*it_sp).second->id() << endl;
204  for ( int number = 0; number < 2; number++ ) {
205  const L1MuBMTrack* cand = (*it_sp).second->tracK(number);
206 
207  if ( cand && !cand->empty() ) {
208 
210 
211  if(cand->hwEta()>-33 || cand->hwEta()<32 )
212  rmc.setHwEta(eta_map[cand->hwEta()]);
213  else
214  rmc.setHwEta(-1000);
215 
216  rmc.setHwPt(cand->pt());
217  int abs_add_1 = setAdd(1,cand->address(1));
218  int abs_add_2 = setAdd(2,cand->address(2));
219  int abs_add_3 = setAdd(3,cand->address(3));
220  int abs_add_4 = setAdd(4,cand->address(4));
221 
222  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, cand->spid().wheel() < 0); // this has to be set!
223  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelNum, abs(cand->spid().wheel()) - 1); // this has to be set!
232  rmc.setHwHF(cand->hwHF());
233 
234  rmc.setHwPhi(cand->hwPhi());
235  rmc.setHwSign(cand->hwSign() == 1 ? 0 : 1 );
236  rmc.setHwSignValid(cand->hwSignValid());
237  rmc.setHwQual(cand->hwQual());
239 
240  _cache0.push_back(cand->bx(), rmc);
241 
242  }
243  }
244  it_sp++;
245  }
246 
247  // run wedge sorters
248  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
249  while ( it_ws != m_wsvec.end() ) {
250  if ( L1MuBMTFConfig::Debug(2) ) cout << "running Wedge Sorter "
251  << (*it_ws)->id() << endl;
252  if ( *it_ws ) (*it_ws)->run();
253  if ( L1MuBMTFConfig::Debug(2) && *it_ws ) (*it_ws)->print();
254 
255  // store found track candidates in container (cache)
256  if ( (*it_ws)->anyMuonCands() ) {
257  const vector<const L1MuBMTrack*>& mttf_cont = (*it_ws)->tracks();
258 
259  vector<const L1MuBMTrack*>::const_iterator iter;
260  for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) {
261  if(!*iter) continue;
263  rmc.setHwPt((*iter)->hwPt());
264  int abs_add_1 = setAdd(1,(*iter)->address(1));
265  int abs_add_2 = setAdd(2,(*iter)->address(2));
266  int abs_add_3 = setAdd(3,(*iter)->address(3));
267  int abs_add_4 = setAdd(4,(*iter)->address(4));
268 
269  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, (*iter)->spid().wheel() < 0); // this has to be set!
270  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelNum, abs((*iter)->spid().wheel()) - 1); // this has to be set!
279  rmc.setHwHF((*iter)->hwHF());
280 
281  rmc.setHwPhi((*iter)->hwPhi());
282  if((*iter)->hwEta()>-33 || (*iter)->hwEta()<32 )
283  rmc.setHwEta(eta_map[(*iter)->hwEta()]);
284  else
285  rmc.setHwEta(-1000);
286  rmc.setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
287  rmc.setHwSignValid((*iter)->hwSignValid());
288  rmc.setHwQual((*iter)->hwQual());
289  rmc.setTFIdentifiers((*iter)->spid().sector(),l1t::tftype::bmtf);
290 
291  if ( *iter ){ _cache.push_back((*iter)->bx(), rmc);}
292  }
293  }
294 
295  it_ws++;
296 
297  }//end wedge sorting
298 
299  /* // run muon sorter
300  if ( L1MuBMTFConfig::Debug(2) ) cout << "running BM Muon Sorter" << endl;
301  if ( m_ms ) m_ms->run();
302  if ( L1MuBMTFConfig::Debug(2) && m_ms ) m_ms->print();
303 
304 
305  // store found track candidates in container (cache)
306  if ( m_ms->numberOfTracks() > 0 ) {
307  const vector<const L1MuBMTrack*>& mttf_cont = m_ms->tracks();
308  vector<const L1MuBMTrack*>::const_iterator iter;
309  for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) {
310 
311  l1t::RegionalMuonCand rmc;
312  rmc.setHwPt((*iter)->hwPt());
313  int abs_add_1 = setAdd(1,(*iter)->address(1));
314  int abs_add_2 = setAdd(2,(*iter)->address(2));
315  int abs_add_3 = setAdd(3,(*iter)->address(3));
316  int abs_add_4 = setAdd(4,(*iter)->address(4));
317 
318  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, (*iter)->spid().wheel() < 0); // this has to be set!
319  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelNum, abs((*iter)->spid().wheel()) - 1); // this has to be set!
320  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat1, abs_add_1);
321  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat2, abs_add_2);
322  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat3, abs_add_3);
323  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat4, abs_add_4);
324  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat1, 0);
325  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat2, 0);
326  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat3, 0);
327  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat4, 0);
328 
329 
330  rmc.setHwPhi((*iter)->hwPhi());
331  if((*iter)->hwEta()>-33 || (*iter)->hwEta()<32 )
332  rmc.setHwEta(eta_map[(*iter)->hwEta()]);
333  else
334  rmc.setHwEta(-1000);
335  rmc.setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
336  rmc.setHwSignValid((*iter)->hwSignValid());
337  rmc.setHwQual((*iter)->hwQual());
338  rmc.setTFIdentifiers((*iter)->spid().sector(),l1t::tftype::bmtf);
339 
340  if ( *iter ){ _cache.push_back((*iter)->bx(), rmc);}
341  }
342  }
343  */
344 
345  }//end of bx loop
346 }
static int getBxMax()
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
unsigned int pt() const
get pt-code (5 bits)
Definition: L1MuBMTrack.h:76
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
const int hwSignValid() const
Get charge sign valid bit (0 - not valid (high pT muon); 1 - valid)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
L1MuBMAddressArray address() const
get address-array for this muon candidate
Definition: L1MuBMTrack.h:103
const L1MuBMSecProcId & spid() const
return Sector Processor in which the muon candidate was found
Definition: L1MuBMTrack.h:100
SPmap::iterator SPmap_iter
int sector() const
return sector number
const int hwQual() const
Get quality code.
std::map< int, int > eta_map
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
static int getBxMin()
std::vector< L1MuBMWedgeSorter * > m_wsvec
Wedge Sorters.
void setTrackSubAddress(bmtfAddress subAddress, int value)
Set a part of the muon candidates track address; specialised for BMTF.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int hwHF() const
Get HF (halo / fine eta) bit (EMTF: halo -&gt; 1; BMTF: fine eta -&gt; 1)
void setHwHF(bool bit)
Set HF (halo / fine eta) bit (EMTF: halo -&gt; 1; BMTF: fine eta -&gt; 1)
const int hwEta() const
Get compressed eta (returned int * 0.010875 = eta)
SPmap_iter begin()
return iterator which points to the first entry of the container
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
int bx() const
get the bunch crossing for this muon candidate
Definition: L1MuBMTrack.h:109
static L1MuBMTFConfig * m_config
Track Finder configuration.
void setHwQual(int bits)
Set compressed quality code as transmitted by hardware (4 bits)
void setHwPt(int bits)
Set compressed pT as transmitted by hardware LSB = 0.5 (9 bits)
l1t::RegionalMuonCandBxCollection _cache0
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
void setDefaultsES(const edm::EventSetup &c)
void setBXRange(int bxFirst, int bxLast)
static bool Debug()
l1t::RegionalMuonCandBxCollection _cache
int setAdd(int ust, int rel_add)
const int hwSign() const
Get charge sign bit (charge = (-1)^(sign))
void setHwSignValid(int bits)
Set whether charge measurement is valid (0 for high pT muons)
tuple cout
Definition: gather_cfg.py:145
SPmap_iter end()
return iterator which points to the one-past-last entry of the container
bool empty() const
is it an empty muon candidate?
Definition: L1MuBMTrack.h:97
L1MuBMSecProcMap * m_spmap
Sector Processors.
void push_back(int bx, T object)
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))
void reset()
reset the barrel MTTF
int wheel() const
return wheel number
int L1MuBMTrackFinder::setAdd ( int  ust,
int  rel_add 
)
inline

Definition at line 433 of file L1MuBMTrackFinder.cc.

Referenced by run().

433  {
434  unsigned int uadd = rel_add;
435 
436  switch (uadd) {
437  case 0: { rel_add = 8; break; }
438  case 1: { rel_add = 9; break; }
439  case 2: { rel_add = 0; break; }
440  case 3: { rel_add = 1; break; }
441  case 8: { rel_add = 10; break; }
442  case 9: { rel_add = 11; break; }
443  case 10: { rel_add = 2; break; }
444  case 11: { rel_add = 3; break; }
445  case 4: { rel_add = 12; break; }
446  case 5: { rel_add = 13; break; }
447  case 6: { rel_add = 4; break; }
448  case 7: { rel_add = 5; break; }
449  case 15: { rel_add = 15; break; }
450  default: { rel_add = 15; break; }
451  }
452 
453  if (ust!=1) return rel_add;
454 
455  switch (uadd) {
456  case 0: { rel_add = 2; break; }
457  case 1: { rel_add = 1; break; }
458  case 15: { rel_add = 3; break; }
459  default: { rel_add = 3; break; }
460  }
461  return rel_add;
462 }
void L1MuBMTrackFinder::setup ( edm::ConsumesCollector &&  iC)

build the structure of the barrel MTTF

Definition at line 113 of file L1MuBMTrackFinder.cc.

References gather_cfg::cout, L1MuBMTFConfig::Debug(), ep(), L1MuBMSecProcMap::insert(), m_epvec, m_ms, m_spmap, m_wsvec, eostools::move(), and ws().

Referenced by L1MuBMTFSetup::L1MuBMTFSetup().

113  {
114 
115  // build the barrel Muon Trigger Track Finder
116 
117  if ( L1MuBMTFConfig::Debug(1) ) cout << endl;
118  if ( L1MuBMTFConfig::Debug(1) ) cout << "**** L1MuBMTrackFinder building ****" << endl;
119  if ( L1MuBMTFConfig::Debug(1) ) cout << endl;
120 
121  // create new sector processors
122  for ( int wh = -3; wh <= 3; wh++ ) {
123  if ( wh == 0 ) continue;
124  for ( int sc = 0; sc < 12; sc++ ) {
125  L1MuBMSecProcId tmpspid(wh,sc);
126  L1MuBMSectorProcessor* sp = new L1MuBMSectorProcessor(*this,tmpspid,std::move(iC));
127  if ( L1MuBMTFConfig::Debug(2) ) cout << "creating " << tmpspid << endl;
128  m_spmap->insert(tmpspid,sp);
129  }
130  }
131 
132  // create new eta processors and wedge sorters
133  for ( int sc = 0; sc < 12; sc++ ) {
134  L1MuBMEtaProcessor* ep = new L1MuBMEtaProcessor(*this,sc, std::move(iC));
135  if ( L1MuBMTFConfig::Debug(2) ) cout << "creating Eta Processor " << sc << endl;
136  m_epvec.push_back(ep);
137  L1MuBMWedgeSorter* ws = new L1MuBMWedgeSorter(*this,sc);
138  if ( L1MuBMTFConfig::Debug(2) ) cout << "creating Wedge Sorter " << sc << endl;
139  m_wsvec.push_back(ws);
140  }
141 
142  // create new muon sorter
143  if ( L1MuBMTFConfig::Debug(2) ) cout << "creating BM Muon Sorter " << endl;
144  m_ms = new L1MuBMMuonSorter(*this);
145 
146 }
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
const L1MuBMWedgeSorter * ws(int id) const
get a pointer to a Wedge Sorter, index [0-11]
def move
Definition: eostools.py:510
std::vector< L1MuBMWedgeSorter * > m_wsvec
Wedge Sorters.
void insert(const L1MuBMSecProcId &, L1MuBMSectorProcessor *sp)
insert a Sector Processor into the container
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
static bool Debug()
tuple cout
Definition: gather_cfg.py:145
Definition: sp.h:21
const L1MuBMEtaProcessor * ep(int id) const
get a pointer to an Eta Processor, index [0-11]
L1MuBMSecProcMap * m_spmap
Sector Processors.
const L1MuBMSectorProcessor * L1MuBMTrackFinder::sp ( const L1MuBMSecProcId id) const

get a pointer to a Sector Processor

Definition at line 380 of file L1MuBMTrackFinder.cc.

References m_spmap, and L1MuBMSecProcMap::sp().

Referenced by L1MuBMSectorProcessor::neighbour(), L1MuBMEtaProcessor::receiveAddresses(), and L1MuBMWedgeSorter::run().

380  {
381 
382  return m_spmap->sp(id);
383 
384 }
L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
return pointer to Sector Processor
L1MuBMSecProcMap * m_spmap
Sector Processors.
const L1MuBMWedgeSorter* L1MuBMTrackFinder::ws ( int  id) const
inline

get a pointer to a Wedge Sorter, index [0-11]

Definition at line 94 of file L1MuBMTrackFinder.h.

References m_wsvec.

Referenced by L1MuBMMuonSorter::run(), and setup().

94 { return m_wsvec[id]; }
std::vector< L1MuBMWedgeSorter * > m_wsvec
Wedge Sorters.

Member Data Documentation

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache
private

Definition at line 127 of file L1MuBMTrackFinder.h.

Referenced by begin(), clear(), end(), getcache(), numberOfTracks(), and run().

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache0
private

Definition at line 126 of file L1MuBMTrackFinder.h.

Referenced by clear(), getcache0(), and run().

std::map<int,int> L1MuBMTrackFinder::eta_map
private
Initial value:
={
{ -32, -119},{ -31, -115},{ -30, -111},{ -29, -107},{ -28, -104},{ -27, -100},{ -26, -96},{ -25, -92},{ -24, -89},{ -23, -85},
{ -22, -81},{ -21, -77},{ -20, -74},{ -19, -70},{ -18, -66},{ -17, -62},{ -16, -59},{ -15, -55},{ -14, -51},{ -13, -47},
{ -12, -44},{ -11, -40},{ -10, -36},{ -9, -32},{ -8, -29},{ -7, -25},{ -6, -21},{ -5, -17},{ -4, -14},{ -3, -10},
{ -2, -6},{ -1, -2},{ 0, 1},{ 1, 5},{ 2, 9},{ 3, 13},{ 4, 16},{ 5, 20},{ 6, 24},{ 7, 28},
{ 8, 31},{ 9, 35},{ 10, 39},{ 11, 43},{ 12, 46},{ 13, 50},{ 14, 54},{ 15, 58},{ 16, 61},{ 17, 65},
{ 18, 69},{ 19, 73},{ 20, 76},{ 21, 80},{ 22, 84},{ 23, 88},{ 24, 91},{ 25, 95},{ 26, 99},{ 27, 103},
{ 28, 106},{ 29, 110},{ 30, 114},{ 31, 118}}

Definition at line 135 of file L1MuBMTrackFinder.h.

Referenced by run().

L1MuBMTFConfig * L1MuBMTrackFinder::m_config = 0
staticprivate

Track Finder configuration.

Definition at line 133 of file L1MuBMTrackFinder.h.

Referenced by config(), L1MuBMTrackFinder(), run(), and ~L1MuBMTrackFinder().

edm::EDGetTokenT<L1MuDTChambPhContainer> L1MuBMTrackFinder::m_DTDigiToken
private

Definition at line 144 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), and run().

std::vector<L1MuBMEtaProcessor*> L1MuBMTrackFinder::m_epvec
private

Eta Processors.

Definition at line 129 of file L1MuBMTrackFinder.h.

Referenced by ep(), L1MuBMTrackFinder(), reset(), run(), setup(), and ~L1MuBMTrackFinder().

L1MuBMMuonSorter* L1MuBMTrackFinder::m_ms
private

BM Muon Sorter.

Definition at line 131 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), ms(), reset(), setup(), and ~L1MuBMTrackFinder().

L1MuBMSecProcMap* L1MuBMTrackFinder::m_spmap
private

Sector Processors.

Definition at line 128 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), reset(), run(), setup(), sp(), and ~L1MuBMTrackFinder().

std::vector<L1MuBMWedgeSorter*> L1MuBMTrackFinder::m_wsvec
private

Wedge Sorters.

Definition at line 130 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), reset(), run(), setup(), ws(), and ~L1MuBMTrackFinder().