CMS 3D CMS Logo

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 ()
 
L1MuBMTrackCollectiongetcache1 ()
 
L1MuBMTrackSegPhiCollectiongetcache2 ()
 
L1MuBMTrackSegEtaCollectiongetcache3 ()
 
 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 const 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
 
L1MuBMTrackCollection _cache1
 
L1MuBMTrackSegPhiCollection _cache2
 
L1MuBMTrackSegEtaCollection _cache3
 
edm::EDGetTokenT< L1MuDTChambPhContainerm_DTDigiToken
 
std::vector< L1MuBMEtaProcessor * > m_epvec
 Eta Processors. More...
 
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcdm_mbParamsToken
 
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 = nullptr
 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 modification: G.Karathanasis UoAthens

Definition at line 69 of file L1MuBMTrackFinder.h.

Member Typedef Documentation

◆ TFtracks_const_iter

container for muon candidates

Definition at line 72 of file L1MuBMTrackFinder.h.

◆ TFtracks_iter

Definition at line 73 of file L1MuBMTrackFinder.h.

Constructor & Destructor Documentation

◆ L1MuBMTrackFinder()

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

constructor

Definition at line 60 of file L1MuBMTrackFinder.cc.

61  : _cache0(144, -9, 8), _cache(36, -9, 8) {
62  // set configuration parameters
63  if (m_config == nullptr)
64  m_config = new L1MuBMTFConfig(ps);
65 
66  if (L1MuBMTFConfig::Debug(1))
67  cout << endl;
68  if (L1MuBMTFConfig::Debug(1))
69  cout << "**** entering L1MuBMTrackFinder ****" << endl;
70  if (L1MuBMTFConfig::Debug(1))
71  cout << endl;
72 
73  m_spmap = new L1MuBMSecProcMap();
74  m_epvec.reserve(12);
75  m_wsvec.reserve(12);
76  m_ms = nullptr;
77 
80 }

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

◆ ~L1MuBMTrackFinder()

L1MuBMTrackFinder::~L1MuBMTrackFinder ( )
virtual

destructor

Definition at line 86 of file L1MuBMTrackFinder.cc.

86  {
87  delete m_spmap;
88 
89  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
90  while (it_ep != m_epvec.end()) {
91  delete (*it_ep);
92  it_ep++;
93  }
94  m_epvec.clear();
95 
96  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
97  while (it_ws != m_wsvec.end()) {
98  delete (*it_ws);
99  it_ws++;
100  }
101  m_wsvec.clear();
102 
103  delete m_ms;
104 
105  if (m_config)
106  delete m_config;
107  m_config = nullptr;
108 }

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

Member Function Documentation

◆ begin()

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

Definition at line 422 of file L1MuBMTrackFinder.cc.

422 { return _cache.begin(bx); }

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

◆ clear()

void L1MuBMTrackFinder::clear ( void  )

Definition at line 426 of file L1MuBMTrackFinder.cc.

426  {
427  _cache.clear();
428  _cache0.clear();
429  _cache1.clear();
430  _cache2.clear();
431  _cache3.clear();
432 }

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

Referenced by L1TMuonBarrelTrackProducer::produce().

◆ config()

static const L1MuBMTFConfig* L1MuBMTrackFinder::config ( void  )
inlinestatic

return configuration

Definition at line 117 of file L1MuBMTrackFinder.h.

117 { return m_config; }

References m_config.

◆ end()

L1MuBMTrackFinder::TFtracks_const_iter L1MuBMTrackFinder::end ( int  bx)

Definition at line 424 of file L1MuBMTrackFinder.cc.

424 { return _cache.end(bx); }

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

◆ ep()

const L1MuBMEtaProcessor* L1MuBMTrackFinder::ep ( int  id) const
inline

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

Definition at line 96 of file L1MuBMTrackFinder.h.

96 { return m_epvec[id]; }

References triggerObjects_cff::id, and m_epvec.

Referenced by setup().

◆ getcache()

l1t::RegionalMuonCandBxCollection& L1MuBMTrackFinder::getcache ( )
inline

Definition at line 119 of file L1MuBMTrackFinder.h.

119 { return _cache; }

References _cache.

Referenced by L1TMuonBarrelTrackProducer::produce().

◆ getcache0()

l1t::RegionalMuonCandBxCollection& L1MuBMTrackFinder::getcache0 ( )
inline

Definition at line 120 of file L1MuBMTrackFinder.h.

120 { return _cache0; }

References _cache0.

Referenced by L1TMuonBarrelTrackProducer::produce().

◆ getcache1()

L1MuBMTrackCollection& L1MuBMTrackFinder::getcache1 ( )
inline

Definition at line 121 of file L1MuBMTrackFinder.h.

121 { return _cache1; }

References _cache1.

Referenced by L1TMuonBarrelTrackProducer::produce().

◆ getcache2()

L1MuBMTrackSegPhiCollection& L1MuBMTrackFinder::getcache2 ( )
inline

Definition at line 122 of file L1MuBMTrackFinder.h.

122 { return _cache2; }

References _cache2.

Referenced by L1TMuonBarrelTrackProducer::produce().

◆ getcache3()

L1MuBMTrackSegEtaCollection& L1MuBMTrackFinder::getcache3 ( )
inline

Definition at line 123 of file L1MuBMTrackFinder.h.

123 { return _cache3; }

References _cache3.

Referenced by L1TMuonBarrelTrackProducer::produce().

◆ ms()

const L1MuBMMuonSorter* L1MuBMTrackFinder::ms ( ) const
inline

get a pointer to the BM Muon Sorter

Definition at line 102 of file L1MuBMTrackFinder.h.

102 { return m_ms; }

References m_ms.

◆ numberOfTracks() [1/2]

int L1MuBMTrackFinder::numberOfTracks ( )

get number of muon candidates found by the barrel MTTF

Definition at line 414 of file L1MuBMTrackFinder.cc.

414  {
415  int num = 0;
416  for (int bx = _cache.getFirstBX(); bx < _cache.getLastBX(); ++bx) {
417  num += _cache.size(bx);
418  }
419  return num;
420 }

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

Referenced by L1TMuonBarrelTrackProducer::produce().

◆ numberOfTracks() [2/2]

int L1MuBMTrackFinder::numberOfTracks ( int  bx)

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

Definition at line 437 of file L1MuBMTrackFinder.cc.

437 { return _cache.size(0); }

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

◆ reconstruct()

virtual void L1MuBMTrackFinder::reconstruct ( const edm::Event e,
const edm::EventSetup c 
)
inlineprivatevirtual

run Track Finder and store candidates in cache

Definition at line 127 of file L1MuBMTrackFinder.h.

127  {
128  reset();
129  run(e, c);
130  }

References c, MillePedeFileConverter_cfg::e, reset(), and run().

◆ reset()

void L1MuBMTrackFinder::reset ( void  )

reset the barrel MTTF

Definition at line 380 of file L1MuBMTrackFinder.cc.

380  {
382  while (it_sp != m_spmap->end()) {
383  if ((*it_sp).second)
384  (*it_sp).second->reset();
385  it_sp++;
386  }
387 
388  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
389  while (it_ep != m_epvec.end()) {
390  if (*it_ep)
391  (*it_ep)->reset();
392  it_ep++;
393  }
394 
395  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
396  while (it_ws != m_wsvec.end()) {
397  if (*it_ws)
398  (*it_ws)->reset();
399  it_ws++;
400  }
401 
402  if (m_ms)
403  m_ms->reset();
404 }

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

Referenced by reconstruct(), and run().

◆ run()

void L1MuBMTrackFinder::run ( const edm::Event e,
const edm::EventSetup c 
)

run the barrel MTTF

Definition at line 161 of file L1MuBMTrackFinder.cc.

161  {
163  int bx_min = L1MuBMTFConfig::getBxMin();
164  int bx_max = L1MuBMTFConfig::getBxMax();
165 
166  //Resize the bx range according to the config file
167  _cache0.setBXRange(bx_min, bx_max);
168  _cache.setBXRange(bx_min, bx_max);
169 
170  // run the barrel Muon Trigger Track Finder
172  e.getByToken(m_DTDigiToken, dttrig);
173  if (dttrig->getContainer()->empty())
174  return;
175 
176  if (L1MuBMTFConfig::Debug(2))
177  cout << endl;
178  if (L1MuBMTFConfig::Debug(2))
179  cout << "**** L1MuBMTrackFinder processing ------****" << endl;
180  if (L1MuBMTFConfig::Debug(2))
181  cout << endl;
182 
183  for (int bx = bx_min; bx <= bx_max; bx++) {
184  if (dttrig->bxEmpty(bx))
185  continue;
186 
187  if (L1MuBMTFConfig::Debug(2))
188  cout << "L1MuBMTrackFinder processing bunch-crossing : " << bx << endl;
189 
190  // reset MTTF
191  reset();
192 
193  // run sector processors
195  while (it_sp != m_spmap->end()) {
196  if (L1MuBMTFConfig::Debug(2))
197  cout << "running " << (*it_sp).second->id() << endl;
198  if ((*it_sp).second)
199  (*it_sp).second->run(bx, e, c);
200  if (L1MuBMTFConfig::Debug(2) && (*it_sp).second)
201  (*it_sp).second->print();
202  it_sp++;
203  }
204 
205  // run eta processors
206  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
207  while (it_ep != m_epvec.end()) {
208  if (L1MuBMTFConfig::Debug(2))
209  cout << "running Eta Processor " << (*it_ep)->id() << endl;
210  if (*it_ep)
211  (*it_ep)->run(bx, e, c);
212  if (L1MuBMTFConfig::Debug(2) && *it_ep)
213  (*it_ep)->print();
214  it_ep++;
215  }
216 
217  // read sector processors
218  it_sp = m_spmap->begin();
219  while (it_sp != m_spmap->end()) {
220  if (L1MuBMTFConfig::Debug(2))
221  cout << "reading " << (*it_sp).second->id() << endl;
222  for (int number = 0; number < 2; number++) {
223  const L1MuBMTrack* cand = (*it_sp).second->tracK(number);
224 
225  if (cand && !cand->empty()) {
227 
228  // max value in LUTs is 117
229  if (cand->hwEta() > -117 || cand->hwEta() < 117)
230  rmc.setHwEta(cand->hwEta());
231  else
232  rmc.setHwEta(-1000);
233 
234  rmc.setHwPt(cand->pt());
235  int abs_add_1 = setAdd(1, cand->address(1));
236  int abs_add_2 = setAdd(2, cand->address(2));
237  int abs_add_3 = setAdd(3, cand->address(3));
238  int abs_add_4 = setAdd(4, cand->address(4));
239 
240  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, cand->spid().wheel() < 0); // this has to be set!
242  abs(cand->spid().wheel()) - 1); // this has to be set!
251  rmc.setHwHF(cand->hwHF());
252 
253  rmc.setHwPhi(cand->hwPhi());
254  rmc.setHwSign(cand->hwSign() == 1 ? 0 : 1);
255  rmc.setHwSignValid(cand->hwSignValid());
256  rmc.setHwQual(cand->hwQual());
257  rmc.setTFIdentifiers(cand->spid().sector(), l1t::tftype::bmtf);
258 
259  _cache0.push_back(cand->bx(), rmc);
260  _cache2.insert(std::end(_cache2), std::begin(cand->getTSphi()), std::end(cand->getTSphi()));
261  _cache3.insert(std::end(_cache3), std::begin(cand->getTSeta()), std::end(cand->getTSeta()));
262  }
263  }
264  it_sp++;
265  }
266 
267  // run wedge sorters
268  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
269  while (it_ws != m_wsvec.end()) {
270  if (L1MuBMTFConfig::Debug(2))
271  cout << "running Wedge Sorter " << (*it_ws)->id() << endl;
272  if (*it_ws)
273  (*it_ws)->run();
274  if (L1MuBMTFConfig::Debug(2) && *it_ws)
275  (*it_ws)->print();
276 
277  // store found track candidates in container (cache)
278  if ((*it_ws)->anyMuonCands()) {
279  const vector<const L1MuBMTrack*>& mttf_cont = (*it_ws)->tracks();
280 
281  vector<const L1MuBMTrack*>::const_iterator iter;
282  for (iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++) {
283  if (!*iter)
284  continue;
286  rmc.setHwPt((*iter)->hwPt());
287  int abs_add_1 = setAdd(1, (*iter)->address(1));
288  int abs_add_2 = setAdd(2, (*iter)->address(2));
289  int abs_add_3 = setAdd(3, (*iter)->address(3));
290  int abs_add_4 = setAdd(4, (*iter)->address(4));
291 
293  (*iter)->spid().wheel() < 0); // this has to be set!
295  abs((*iter)->spid().wheel()) - 1); // this has to be set!
304  rmc.setHwHF((*iter)->hwHF());
305 
306  rmc.setHwPhi((*iter)->hwPhi());
307  if ((*iter)->hwEta() > -117 || (*iter)->hwEta() < 117)
308  // rmc.setHwEta(eta_map[(*iter)->hwEta()]);
309  rmc.setHwEta((*iter)->hwEta());
310  else
311  rmc.setHwEta(-1000);
312  rmc.setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
313  rmc.setHwSignValid((*iter)->hwSignValid());
314  rmc.setHwQual((*iter)->hwQual());
315  rmc.setTFIdentifiers((*iter)->spid().sector(), l1t::tftype::bmtf);
316 
317  if (*iter) {
318  _cache.push_back((*iter)->bx(), rmc);
319  _cache1.push_back(**iter);
320  }
321  }
322  }
323 
324  it_ws++;
325 
326  } //end wedge sorting
327 
328  /* // run muon sorter
329  if ( L1MuBMTFConfig::Debug(2) ) cout << "running BM Muon Sorter" << endl;
330  if ( m_ms ) m_ms->run();
331  if ( L1MuBMTFConfig::Debug(2) && m_ms ) m_ms->print();
332 
333 
334  // store found track candidates in container (cache)
335  if ( m_ms->numberOfTracks() > 0 ) {
336  const vector<const L1MuBMTrack*>& mttf_cont = m_ms->tracks();
337  vector<const L1MuBMTrack*>::const_iterator iter;
338  for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) {
339 
340  l1t::RegionalMuonCand rmc;
341  rmc.setHwPt((*iter)->hwPt());
342  int abs_add_1 = setAdd(1,(*iter)->address(1));
343  int abs_add_2 = setAdd(2,(*iter)->address(2));
344  int abs_add_3 = setAdd(3,(*iter)->address(3));
345  int abs_add_4 = setAdd(4,(*iter)->address(4));
346 
347  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, (*iter)->spid().wheel() < 0); // this has to be set!
348  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelNum, abs((*iter)->spid().wheel()) - 1); // this has to be set!
349  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat1, abs_add_1);
350  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat2, abs_add_2);
351  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat3, abs_add_3);
352  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat4, abs_add_4);
353  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat1, 0);
354  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat2, 0);
355  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat3, 0);
356  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat4, 0);
357 
358 
359  rmc.setHwPhi((*iter)->hwPhi());
360  if((*iter)->hwEta()>-33 || (*iter)->hwEta()<32 )
361  rmc.setHwEta(eta_map[(*iter)->hwEta()]);
362  else
363  rmc.setHwEta(-1000);
364  rmc.setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
365  rmc.setHwSignValid((*iter)->hwSignValid());
366  rmc.setHwQual((*iter)->hwQual());
367  rmc.setTFIdentifiers((*iter)->spid().sector(),l1t::tftype::bmtf);
368 
369  if ( *iter ){ _cache.push_back((*iter)->bx(), rmc);}
370  }
371  }
372  */
373 
374  } //end of bx loop
375 }

References _cache, _cache0, _cache1, _cache2, _cache3, funct::abs(), L1MuBMSecProcMap::begin(), l1t::bmtf, l1GtPatternGenerator_cfi::bx, L1MuDTChambPhContainer::bxEmpty(), c, gather_cfg::cout, L1MuBMTFConfig::Debug(), MillePedeFileConverter_cfg::e, L1MuBMSecProcMap::end(), mps_fire::end, L1MuBMTFConfig::getBxMax(), L1MuBMTFConfig::getBxMin(), L1MuDTChambPhContainer::getContainer(), 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_mbParamsToken, m_spmap, m_wsvec, contentValuesFiles::number, BXVector< T >::push_back(), reset(), 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(), and l1t::RegionalMuonCand::setTrackSubAddress().

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

◆ setAdd()

int L1MuBMTrackFinder::setAdd ( int  ust,
int  rel_add 
)
inline

Definition at line 443 of file L1MuBMTrackFinder.cc.

443  {
444  unsigned int uadd = rel_add;
445 
446  switch (uadd) {
447  case 0: {
448  rel_add = 8;
449  break;
450  }
451  case 1: {
452  rel_add = 9;
453  break;
454  }
455  case 2: {
456  rel_add = 0;
457  break;
458  }
459  case 3: {
460  rel_add = 1;
461  break;
462  }
463  case 8: {
464  rel_add = 10;
465  break;
466  }
467  case 9: {
468  rel_add = 11;
469  break;
470  }
471  case 10: {
472  rel_add = 2;
473  break;
474  }
475  case 11: {
476  rel_add = 3;
477  break;
478  }
479  case 4: {
480  rel_add = 12;
481  break;
482  }
483  case 5: {
484  rel_add = 13;
485  break;
486  }
487  case 6: {
488  rel_add = 4;
489  break;
490  }
491  case 7: {
492  rel_add = 5;
493  break;
494  }
495  case 15: {
496  rel_add = 15;
497  break;
498  }
499  default: {
500  rel_add = 15;
501  break;
502  }
503  }
504 
505  if (ust != 1)
506  return rel_add;
507 
508  switch (uadd) {
509  case 0: {
510  rel_add = 2;
511  break;
512  }
513  case 1: {
514  rel_add = 1;
515  break;
516  }
517  case 15: {
518  rel_add = 3;
519  break;
520  }
521  default: {
522  rel_add = 3;
523  break;
524  }
525  }
526  return rel_add;
527 }

Referenced by run().

◆ setup()

void L1MuBMTrackFinder::setup ( edm::ConsumesCollector &&  iC)

build the structure of the barrel MTTF

Definition at line 117 of file L1MuBMTrackFinder.cc.

117  {
118  // build the barrel Muon Trigger Track Finder
119 
120  if (L1MuBMTFConfig::Debug(1))
121  cout << endl;
122  if (L1MuBMTFConfig::Debug(1))
123  cout << "**** L1MuBMTrackFinder building ****" << endl;
124  if (L1MuBMTFConfig::Debug(1))
125  cout << endl;
126 
127  // create new sector processors
128  for (int wh = -3; wh <= 3; wh++) {
129  if (wh == 0)
130  continue;
131  for (int sc = 0; sc < 12; sc++) {
132  L1MuBMSecProcId tmpspid(wh, sc);
133  L1MuBMSectorProcessor* sp = new L1MuBMSectorProcessor(*this, tmpspid, std::move(iC));
134  if (L1MuBMTFConfig::Debug(2))
135  cout << "creating " << tmpspid << endl;
136  m_spmap->insert(tmpspid, sp);
137  }
138  }
139 
140  // create new eta processors and wedge sorters
141  for (int sc = 0; sc < 12; sc++) {
142  L1MuBMEtaProcessor* ep = new L1MuBMEtaProcessor(*this, sc, std::move(iC));
143  if (L1MuBMTFConfig::Debug(2))
144  cout << "creating Eta Processor " << sc << endl;
145  m_epvec.push_back(ep);
146  L1MuBMWedgeSorter* ws = new L1MuBMWedgeSorter(*this, sc);
147  if (L1MuBMTFConfig::Debug(2))
148  cout << "creating Wedge Sorter " << sc << endl;
149  m_wsvec.push_back(ws);
150  }
151 
152  // create new muon sorter
153  if (L1MuBMTFConfig::Debug(2))
154  cout << "creating BM Muon Sorter " << endl;
155  m_ms = new L1MuBMMuonSorter(*this);
156 }

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

Referenced by L1MuBMTFSetup::L1MuBMTFSetup().

◆ sp()

const L1MuBMSectorProcessor * L1MuBMTrackFinder::sp ( const L1MuBMSecProcId id) const

get a pointer to a Sector Processor

Definition at line 409 of file L1MuBMTrackFinder.cc.

409 { return m_spmap->sp(id); }

References m_spmap, and L1MuBMSecProcMap::sp().

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

◆ ws()

const L1MuBMWedgeSorter* L1MuBMTrackFinder::ws ( int  id) const
inline

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

Definition at line 99 of file L1MuBMTrackFinder.h.

99 { return m_wsvec[id]; }

References triggerObjects_cff::id, and m_wsvec.

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

Member Data Documentation

◆ _cache

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache
private

◆ _cache0

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache0
private

Definition at line 133 of file L1MuBMTrackFinder.h.

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

◆ _cache1

L1MuBMTrackCollection L1MuBMTrackFinder::_cache1
private

Definition at line 135 of file L1MuBMTrackFinder.h.

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

◆ _cache2

L1MuBMTrackSegPhiCollection L1MuBMTrackFinder::_cache2
private

Definition at line 136 of file L1MuBMTrackFinder.h.

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

◆ _cache3

L1MuBMTrackSegEtaCollection L1MuBMTrackFinder::_cache3
private

Definition at line 137 of file L1MuBMTrackFinder.h.

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

◆ m_config

L1MuBMTFConfig * L1MuBMTrackFinder::m_config = nullptr
staticprivate

Track Finder configuration.

Definition at line 144 of file L1MuBMTrackFinder.h.

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

◆ m_DTDigiToken

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

Definition at line 146 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), and run().

◆ m_epvec

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

Eta Processors.

Definition at line 140 of file L1MuBMTrackFinder.h.

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

◆ m_mbParamsToken

edm::ESGetToken<L1TMuonBarrelParams, L1TMuonBarrelParamsRcd> L1MuBMTrackFinder::m_mbParamsToken
private

Definition at line 147 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), and run().

◆ m_ms

L1MuBMMuonSorter* L1MuBMTrackFinder::m_ms
private

BM Muon Sorter.

Definition at line 142 of file L1MuBMTrackFinder.h.

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

◆ m_spmap

L1MuBMSecProcMap* L1MuBMTrackFinder::m_spmap
private

Sector Processors.

Definition at line 139 of file L1MuBMTrackFinder.h.

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

◆ m_wsvec

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

Wedge Sorters.

Definition at line 141 of file L1MuBMTrackFinder.h.

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

L1MuBMSecProcMap::begin
SPmap_iter begin()
return iterator which points to the first entry of the container
Definition: L1MuBMSecProcMap.h:60
l1t::RegionalMuonCand::kStat2
Definition: RegionalMuonCand.h:16
L1MuBMTrackFinder::m_ms
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
Definition: L1MuBMTrackFinder.h:142
l1t::bmtf
Definition: RegionalMuonCandFwd.h:8
L1MuBMWedgeSorter
Definition: L1MuBMWedgeSorter.h:45
l1t::RegionalMuonCand::kWheelNum
Definition: RegionalMuonCand.h:14
L1MuBMEtaProcessor
Definition: L1MuBMEtaProcessor.h:62
l1t::RegionalMuonCand::kSegSelStat4
Definition: RegionalMuonCand.h:22
l1t::RegionalMuonCand::kSegSelStat1
Definition: RegionalMuonCand.h:19
L1MuBMTrackFinder::ws
const L1MuBMWedgeSorter * ws(int id) const
get a pointer to a Wedge Sorter, index [0-11]
Definition: L1MuBMTrackFinder.h:99
l1t::RegionalMuonCand::setHwSign
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))
Definition: RegionalMuonCand.h:136
L1MuBMTrackFinder::reset
void reset()
reset the barrel MTTF
Definition: L1MuBMTrackFinder.cc:380
L1MuBMSecProcId
Definition: L1MuBMSecProcId.h:40
L1MuBMTrackFinder::ep
const L1MuBMEtaProcessor * ep(int id) const
get a pointer to an Eta Processor, index [0-11]
Definition: L1MuBMTrackFinder.h:96
L1MuBMTrackFinder::m_mbParamsToken
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_mbParamsToken
Definition: L1MuBMTrackFinder.h:147
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuBMSecProcMap::insert
void insert(const L1MuBMSecProcId &, L1MuBMSectorProcessor *sp)
insert a Sector Processor into the container
Definition: L1MuBMSecProcMap.cc:77
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
l1t::RegionalMuonCand::kStat4
Definition: RegionalMuonCand.h:18
l1t::RegionalMuonCand::kStat3
Definition: RegionalMuonCand.h:17
L1MuBMTrackFinder::_cache3
L1MuBMTrackSegEtaCollection _cache3
Definition: L1MuBMTrackFinder.h:137
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
edm::Handle< L1MuDTChambPhContainer >
L1MuBMTFConfig::getBxMax
static int getBxMax()
Definition: L1MuBMTFConfig.h:59
L1MuBMSectorProcessor
Definition: L1MuBMSectorProcessor.h:54
L1MuDTChambPhContainer
Definition: L1MuDTChambPhContainer.h:33
L1MuBMSecProcMap::end
SPmap_iter end()
return iterator which points to the one-past-last entry of the container
Definition: L1MuBMSecProcMap.h:63
L1MuDTChambPhContainer::getContainer
Phi_Container const * getContainer() const
Definition: L1MuDTChambPhContainer.cc:41
BXVector::getFirstBX
int getFirstBX() const
L1MuBMTrackFinder::m_wsvec
std::vector< L1MuBMWedgeSorter * > m_wsvec
Wedge Sorters.
Definition: L1MuBMTrackFinder.h:141
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
L1MuBMTrackFinder::_cache1
L1MuBMTrackCollection _cache1
Definition: L1MuBMTrackFinder.h:135
l1t::RegionalMuonCand::setTFIdentifiers
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
Definition: RegionalMuonCand.cc:5
mps_fire.end
end
Definition: mps_fire.py:242
l1t::RegionalMuonCand::kStat1
Definition: RegionalMuonCand.h:15
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
L1MuBMMuonSorter::reset
void reset() override
reset Muon Sorter
Definition: L1MuBMMuonSorter.cc:121
L1MuBMTFConfig::Debug
static bool Debug()
Definition: L1MuBMTFConfig.h:52
BXVector::clear
void clear()
l1t::RegionalMuonCand::setHwPt
void setHwPt(int bits)
Set compressed pT as transmitted by hardware LSB = 0.5 (9 bits)
Definition: RegionalMuonCand.h:126
BXVector::begin
const_iterator begin(int bx) const
l1t::RegionalMuonCand::setHwHF
void setHwHF(bool bit)
Set HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 1)
Definition: RegionalMuonCand.h:142
L1MuBMTrackFinder::run
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
Definition: L1MuBMTrackFinder.cc:161
BXVector::end
const_iterator end(int bx) const
L1MuBMTrackFinder::m_epvec
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
Definition: L1MuBMTrackFinder.h:140
l1t::RegionalMuonCand::setHwEta
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
Definition: RegionalMuonCand.h:134
cand
Definition: decayParser.h:32
L1MuBMTrack
Definition: L1MuBMTrack.h:49
L1MuBMTFConfig::getBxMin
static int getBxMin()
Definition: L1MuBMTFConfig.h:58
L1MuBMSecProcMap::sp
L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
return pointer to Sector Processor
Definition: L1MuBMSecProcMap.cc:65
l1t::RegionalMuonCand::kSegSelStat2
Definition: RegionalMuonCand.h:20
L1MuBMTrackFinder::setAdd
int setAdd(int ust, int rel_add)
Definition: L1MuBMTrackFinder.cc:443
l1t::RegionalMuonCand::kSegSelStat3
Definition: RegionalMuonCand.h:21
l1t::RegionalMuonCand::kWheelSide
Definition: RegionalMuonCand.h:13
L1MuBMTrackFinder::m_config
static L1MuBMTFConfig * m_config
Track Finder configuration.
Definition: L1MuBMTrackFinder.h:144
l1t::RegionalMuonCand::setTrackSubAddress
void setTrackSubAddress(bmtfAddress subAddress, int value)
Set a part of the muon candidates track address; specialised for BMTF.
Definition: RegionalMuonCand.h:152
l1t::RegionalMuonCand::setHwQual
void setHwQual(int bits)
Set compressed quality code as transmitted by hardware (4 bits)
Definition: RegionalMuonCand.h:140
L1MuBMTrackFinder::_cache0
l1t::RegionalMuonCandBxCollection _cache0
Definition: L1MuBMTrackFinder.h:133
l1t::RegionalMuonCand::setHwSignValid
void setHwSignValid(int bits)
Set whether charge measurement is valid (0 for high pT muons)
Definition: RegionalMuonCand.h:138
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:33
L1MuBMTFConfig::getBMDigiInputTag
static edm::InputTag getBMDigiInputTag()
Definition: L1MuBMTFConfig.h:49
L1MuBMTrackFinder::_cache
l1t::RegionalMuonCandBxCollection _cache
Definition: L1MuBMTrackFinder.h:134
L1MuBMTrackFinder::_cache2
L1MuBMTrackSegPhiCollection _cache2
Definition: L1MuBMTrackFinder.h:136
eostools.move
def move(src, dest)
Definition: eostools.py:511
L1MuBMMuonSorter
Definition: L1MuBMMuonSorter.h:45
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
L1MuBMSecProcMap::SPmap_iter
SPmap::iterator SPmap_iter
Definition: L1MuBMSecProcMap.h:42
L1MuBMTFConfig::setDefaultsES
void setDefaultsES(const L1TMuonBarrelParams &)
Definition: L1MuBMTFConfig.cc:84
L1MuBMSecProcMap
Definition: L1MuBMSecProcMap.h:39
BXVector::size
unsigned size(int bx) const
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1MuBMTrackFinder::m_DTDigiToken
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
Definition: L1MuBMTrackFinder.h:146
l1t::RegionalMuonCand::setHwPhi
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
Definition: RegionalMuonCand.h:132
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
L1MuBMTFConfig
Definition: L1MuBMTFConfig.h:39
BXVector::setBXRange
void setBXRange(int bxFirst, int bxLast)
BXVector::getLastBX
int getLastBX() const
L1MuDTChambPhContainer::bxEmpty
bool bxEmpty(int step) const
Definition: L1MuDTChambPhContainer.cc:43
BXVector::push_back
void push_back(int bx, T object)
l1t::RegionalMuonCand
Definition: RegionalMuonCand.h:8
L1MuBMTrackFinder::sp
const L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
get a pointer to a Sector Processor
Definition: L1MuBMTrackFinder.cc:409
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
L1MuBMTrackFinder::m_spmap
L1MuBMSecProcMap * m_spmap
Sector Processors.
Definition: L1MuBMTrackFinder.h:139