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 std::shared_ptr< L1MuBMTFConfigm_config
 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 71 of file L1MuBMTrackFinder.h.

Member Typedef Documentation

◆ TFtracks_const_iter

container for muon candidates

Definition at line 74 of file L1MuBMTrackFinder.h.

◆ TFtracks_iter

Definition at line 75 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.

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

61  : _cache0(144, -9, 8), _cache(36, -9, 8) {
62  // set configuration parameters
63  if (not m_config) {
64  auto temp = std::make_shared<L1MuBMTFConfig>(ps);
65  std::shared_ptr<L1MuBMTFConfig> empty;
66  std::atomic_compare_exchange_strong(&m_config, &empty, temp);
67  }
68 
69  if (L1MuBMTFConfig::Debug(1))
70  cout << endl;
71  if (L1MuBMTFConfig::Debug(1))
72  cout << "**** entering L1MuBMTrackFinder ****" << endl;
73  if (L1MuBMTFConfig::Debug(1))
74  cout << endl;
75 
76  m_spmap = new L1MuBMSecProcMap();
77  m_epvec.reserve(12);
78  m_wsvec.reserve(12);
79  m_ms = nullptr;
80 
83 }
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.
l1t::RegionalMuonCandBxCollection _cache0
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
static bool Debug()
l1t::RegionalMuonCandBxCollection _cache
static std::shared_ptr< L1MuBMTFConfig > m_config
Track Finder configuration.
L1MuBMSecProcMap * m_spmap
Sector Processors.
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_mbParamsToken

◆ ~L1MuBMTrackFinder()

L1MuBMTrackFinder::~L1MuBMTrackFinder ( )
virtual

destructor

Definition at line 89 of file L1MuBMTrackFinder.cc.

References m_epvec, m_ms, m_spmap, and m_wsvec.

89  {
90  delete m_spmap;
91 
92  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
93  while (it_ep != m_epvec.end()) {
94  delete (*it_ep);
95  it_ep++;
96  }
97  m_epvec.clear();
98 
99  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
100  while (it_ws != m_wsvec.end()) {
101  delete (*it_ws);
102  it_ws++;
103  }
104  m_wsvec.clear();
105 
106  delete m_ms;
107 }
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
std::vector< L1MuBMWedgeSorter * > m_wsvec
Wedge Sorters.
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
L1MuBMSecProcMap * m_spmap
Sector Processors.

Member Function Documentation

◆ begin()

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

Definition at line 421 of file L1MuBMTrackFinder.cc.

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

421 { return _cache.begin(bx); }
const_iterator begin(int bx) const
l1t::RegionalMuonCandBxCollection _cache

◆ clear()

void L1MuBMTrackFinder::clear ( void  )

Definition at line 425 of file L1MuBMTrackFinder.cc.

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

Referenced by L1TMuonBarrelTrackProducer::produce().

425  {
426  _cache.clear();
427  _cache0.clear();
428  _cache1.clear();
429  _cache2.clear();
430  _cache3.clear();
431 }
L1MuBMTrackSegEtaCollection _cache3
L1MuBMTrackCollection _cache1
L1MuBMTrackSegPhiCollection _cache2
l1t::RegionalMuonCandBxCollection _cache0
void clear()
l1t::RegionalMuonCandBxCollection _cache

◆ config()

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

return configuration

Definition at line 119 of file L1MuBMTrackFinder.h.

References m_config.

119 { return m_config.get(); }
static std::shared_ptr< L1MuBMTFConfig > m_config
Track Finder configuration.

◆ end()

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

Definition at line 423 of file L1MuBMTrackFinder.cc.

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

423 { return _cache.end(bx); }
l1t::RegionalMuonCandBxCollection _cache
const_iterator end(int bx) const

◆ ep()

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

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

Definition at line 98 of file L1MuBMTrackFinder.h.

References triggerObjects_cff::id, and m_epvec.

Referenced by setup().

98 { return m_epvec[id]; }
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.

◆ getcache()

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

Definition at line 121 of file L1MuBMTrackFinder.h.

References _cache.

Referenced by L1TMuonBarrelTrackProducer::produce().

121 { return _cache; }
l1t::RegionalMuonCandBxCollection _cache

◆ getcache0()

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

Definition at line 122 of file L1MuBMTrackFinder.h.

References _cache0.

Referenced by L1TMuonBarrelTrackProducer::produce().

122 { return _cache0; }
l1t::RegionalMuonCandBxCollection _cache0

◆ getcache1()

L1MuBMTrackCollection& L1MuBMTrackFinder::getcache1 ( )
inline

Definition at line 123 of file L1MuBMTrackFinder.h.

References _cache1.

Referenced by L1TMuonBarrelTrackProducer::produce().

123 { return _cache1; }
L1MuBMTrackCollection _cache1

◆ getcache2()

L1MuBMTrackSegPhiCollection& L1MuBMTrackFinder::getcache2 ( )
inline

Definition at line 124 of file L1MuBMTrackFinder.h.

References _cache2.

Referenced by L1TMuonBarrelTrackProducer::produce().

124 { return _cache2; }
L1MuBMTrackSegPhiCollection _cache2

◆ getcache3()

L1MuBMTrackSegEtaCollection& L1MuBMTrackFinder::getcache3 ( )
inline

Definition at line 125 of file L1MuBMTrackFinder.h.

References _cache3.

Referenced by L1TMuonBarrelTrackProducer::produce().

125 { return _cache3; }
L1MuBMTrackSegEtaCollection _cache3

◆ ms()

const L1MuBMMuonSorter* L1MuBMTrackFinder::ms ( ) const
inline

get a pointer to the BM Muon Sorter

Definition at line 104 of file L1MuBMTrackFinder.h.

References m_ms.

104 { return m_ms; }
L1MuBMMuonSorter * m_ms
BM Muon Sorter.

◆ numberOfTracks() [1/2]

int L1MuBMTrackFinder::numberOfTracks ( )

get number of muon candidates found by the barrel MTTF

Definition at line 413 of file L1MuBMTrackFinder.cc.

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

Referenced by L1TMuonBarrelTrackProducer::produce().

413  {
414  int num = 0;
415  for (int bx = _cache.getFirstBX(); bx < _cache.getLastBX(); ++bx) {
416  num += _cache.size(bx);
417  }
418  return num;
419 }
int getLastBX() const
int getFirstBX() const
unsigned size(int bx) const
l1t::RegionalMuonCandBxCollection _cache

◆ 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 436 of file L1MuBMTrackFinder.cc.

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

436 { return _cache.size(0); }
unsigned size(int bx) const
l1t::RegionalMuonCandBxCollection _cache

◆ 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 129 of file L1MuBMTrackFinder.h.

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

129  {
130  reset();
131  run(e, c);
132  }
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
void reset()
reset the barrel MTTF

◆ reset()

void L1MuBMTrackFinder::reset ( void  )

reset the barrel MTTF

Definition at line 379 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().

379  {
381  while (it_sp != m_spmap->end()) {
382  if ((*it_sp).second)
383  (*it_sp).second->reset();
384  it_sp++;
385  }
386 
387  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
388  while (it_ep != m_epvec.end()) {
389  if (*it_ep)
390  (*it_ep)->reset();
391  it_ep++;
392  }
393 
394  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
395  while (it_ws != m_wsvec.end()) {
396  if (*it_ws)
397  (*it_ws)->reset();
398  it_ws++;
399  }
400 
401  if (m_ms)
402  m_ms->reset();
403 }
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
SPmap::iterator SPmap_iter
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.

◆ run()

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

run the barrel MTTF

Definition at line 160 of file L1MuBMTrackFinder.cc.

References _cache, _cache0, _cache1, _cache2, _cache3, funct::abs(), L1MuBMSecProcMap::begin(), l1t::bmtf, simKBmtfDigis_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(), 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().

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

◆ setAdd()

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

Definition at line 442 of file L1MuBMTrackFinder.cc.

Referenced by run().

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

◆ setup()

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

build the structure of the barrel MTTF

Definition at line 116 of file L1MuBMTrackFinder.cc.

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().

116  {
117  // build the barrel Muon Trigger Track Finder
118 
119  if (L1MuBMTFConfig::Debug(1))
120  cout << endl;
121  if (L1MuBMTFConfig::Debug(1))
122  cout << "**** L1MuBMTrackFinder building ****" << endl;
123  if (L1MuBMTFConfig::Debug(1))
124  cout << endl;
125 
126  // create new sector processors
127  for (int wh = -3; wh <= 3; wh++) {
128  if (wh == 0)
129  continue;
130  for (int sc = 0; sc < 12; sc++) {
131  L1MuBMSecProcId tmpspid(wh, sc);
132  L1MuBMSectorProcessor* sp = new L1MuBMSectorProcessor(*this, tmpspid, std::move(iC));
133  if (L1MuBMTFConfig::Debug(2))
134  cout << "creating " << tmpspid << endl;
135  m_spmap->insert(tmpspid, sp);
136  }
137  }
138 
139  // create new eta processors and wedge sorters
140  for (int sc = 0; sc < 12; sc++) {
141  L1MuBMEtaProcessor* ep = new L1MuBMEtaProcessor(*this, sc, std::move(iC));
142  if (L1MuBMTFConfig::Debug(2))
143  cout << "creating Eta Processor " << sc << endl;
144  m_epvec.push_back(ep);
145  L1MuBMWedgeSorter* ws = new L1MuBMWedgeSorter(*this, sc);
146  if (L1MuBMTFConfig::Debug(2))
147  cout << "creating Wedge Sorter " << sc << endl;
148  m_wsvec.push_back(ws);
149  }
150 
151  // create new muon sorter
152  if (L1MuBMTFConfig::Debug(2))
153  cout << "creating BM Muon Sorter " << endl;
154  m_ms = new L1MuBMMuonSorter(*this);
155 }
const L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
get a pointer to a Sector Processor
const L1MuBMWedgeSorter * ws(int id) const
get a pointer to a Wedge Sorter, index [0-11]
const L1MuBMEtaProcessor * ep(int id) const
get a pointer to an Eta Processor, index [0-11]
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
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()
L1MuBMSecProcMap * m_spmap
Sector Processors.
def move(src, dest)
Definition: eostools.py:511

◆ sp()

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

get a pointer to a Sector Processor

Definition at line 408 of file L1MuBMTrackFinder.cc.

References m_spmap, and L1MuBMSecProcMap::sp().

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

408 { return m_spmap->sp(id); }
L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
return pointer to Sector Processor
L1MuBMSecProcMap * m_spmap
Sector Processors.

◆ ws()

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

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

Definition at line 101 of file L1MuBMTrackFinder.h.

References triggerObjects_cff::id, and m_wsvec.

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

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

Member Data Documentation

◆ _cache

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache
private

◆ _cache0

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache0
private

Definition at line 135 of file L1MuBMTrackFinder.h.

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

◆ _cache1

L1MuBMTrackCollection L1MuBMTrackFinder::_cache1
private

Definition at line 137 of file L1MuBMTrackFinder.h.

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

◆ _cache2

L1MuBMTrackSegPhiCollection L1MuBMTrackFinder::_cache2
private

Definition at line 138 of file L1MuBMTrackFinder.h.

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

◆ _cache3

L1MuBMTrackSegEtaCollection L1MuBMTrackFinder::_cache3
private

Definition at line 139 of file L1MuBMTrackFinder.h.

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

◆ m_config

std::shared_ptr< L1MuBMTFConfig > L1MuBMTrackFinder::m_config
staticprivate

Track Finder configuration.

Definition at line 146 of file L1MuBMTrackFinder.h.

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

◆ m_DTDigiToken

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

Definition at line 148 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), and run().

◆ m_epvec

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

Eta Processors.

Definition at line 142 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 149 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), and run().

◆ m_ms

L1MuBMMuonSorter* L1MuBMTrackFinder::m_ms
private

BM Muon Sorter.

Definition at line 144 of file L1MuBMTrackFinder.h.

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

◆ m_spmap

L1MuBMSecProcMap* L1MuBMTrackFinder::m_spmap
private

Sector Processors.

Definition at line 141 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 143 of file L1MuBMTrackFinder.h.

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