CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | 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 ()
 
const L1MuBMTFConfigconfig () const
 return configuration More...
 
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...
 
L1MuBMSectorProcessorsp (const L1MuBMSecProcId &)
 
const L1MuBMWedgeSorterws (int id) const
 get a pointer to a Wedge Sorter, index [0-11] More...
 
virtual ~L1MuBMTrackFinder ()
 destructor 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
 
L1MuBMTFConfig m_config
 Track Finder configuration. More...
 
edm::EDGetTokenT< L1MuDTChambPhContainerm_DTDigiToken
 
std::vector< std::unique_ptr< L1MuBMEtaProcessor > > m_epvec
 Eta Processors. More...
 
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcdm_mbParamsToken
 
L1MuBMMuonSorter m_ms
 BM Muon Sorter. More...
 
unsigned long long m_recordCache = 0
 
L1MuBMSecProcMap m_spmap
 Sector Processors. More...
 
std::vector< std::unique_ptr< L1MuBMWedgeSorter > > m_wsvec
 Wedge Sorters. 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 57 of file L1MuBMTrackFinder.cc.

References config(), gather_cfg::cout, Debug, L1MuBMTFConfig::getBMDigiInputTag(), m_DTDigiToken, m_epvec, m_mbParamsToken, m_wsvec, eostools::move(), and setup().

58  : _cache0(144, -9, 8), _cache(36, -9, 8), m_ms(*this), m_config(ps) {
59  if (config().Debug(1))
60  cout << endl;
61  if (config().Debug(1))
62  cout << "**** entering L1MuBMTrackFinder ****" << endl;
63  if (config().Debug(1))
64  cout << endl;
65 
66  m_epvec.reserve(12);
67  m_wsvec.reserve(12);
68 
71  setup(std::move(iC));
72 }
std::vector< std::unique_ptr< L1MuBMEtaProcessor > > m_epvec
Eta Processors.
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
L1MuBMTFConfig m_config
Track Finder configuration.
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
std::vector< std::unique_ptr< L1MuBMWedgeSorter > > m_wsvec
Wedge Sorters.
edm::InputTag getBMDigiInputTag() const
const L1MuBMTFConfig & config() const
return configuration
l1t::RegionalMuonCandBxCollection _cache0
l1t::RegionalMuonCandBxCollection _cache
L1MuBMMuonSorter m_ms
BM Muon Sorter.
void setup(edm::ConsumesCollector &&)
build the structure of the barrel MTTF
const bool Debug
def move(src, dest)
Definition: eostools.py:511
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_mbParamsToken

◆ ~L1MuBMTrackFinder()

L1MuBMTrackFinder::~L1MuBMTrackFinder ( )
virtual

destructor

Definition at line 78 of file L1MuBMTrackFinder.cc.

78 {}

Member Function Documentation

◆ begin()

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

Definition at line 378 of file L1MuBMTrackFinder.cc.

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

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

◆ clear()

void L1MuBMTrackFinder::clear ( void  )

Definition at line 382 of file L1MuBMTrackFinder.cc.

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

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

382  {
383  _cache.clear();
384  _cache0.clear();
385  _cache1.clear();
386  _cache2.clear();
387  _cache3.clear();
388 }
L1MuBMTrackSegEtaCollection _cache3
L1MuBMTrackCollection _cache1
L1MuBMTrackSegPhiCollection _cache2
l1t::RegionalMuonCandBxCollection _cache0
void clear()
l1t::RegionalMuonCandBxCollection _cache

◆ config()

const L1MuBMTFConfig& L1MuBMTrackFinder::config ( void  ) const
inline

◆ end()

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

Definition at line 380 of file L1MuBMTrackFinder.cc.

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

380 { 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 99 of file L1MuBMTrackFinder.h.

References EcalPhiSymFlatTableProducers_cfi::id, and m_epvec.

Referenced by reset(), run(), and setup().

99 { return m_epvec[id].get(); }
std::vector< std::unique_ptr< L1MuBMEtaProcessor > > m_epvec
Eta Processors.

◆ getcache()

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

Definition at line 122 of file L1MuBMTrackFinder.h.

References _cache.

Referenced by L1TMuonBarrelTrackProducer::produce().

122 { return _cache; }
l1t::RegionalMuonCandBxCollection _cache

◆ getcache0()

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

Definition at line 123 of file L1MuBMTrackFinder.h.

References _cache0.

Referenced by L1TMuonBarrelTrackProducer::produce().

123 { return _cache0; }
l1t::RegionalMuonCandBxCollection _cache0

◆ getcache1()

L1MuBMTrackCollection& L1MuBMTrackFinder::getcache1 ( )
inline

Definition at line 124 of file L1MuBMTrackFinder.h.

References _cache1.

Referenced by L1TMuonBarrelTrackProducer::produce().

124 { return _cache1; }
L1MuBMTrackCollection _cache1

◆ getcache2()

L1MuBMTrackSegPhiCollection& L1MuBMTrackFinder::getcache2 ( )
inline

Definition at line 125 of file L1MuBMTrackFinder.h.

References _cache2.

Referenced by L1TMuonBarrelTrackProducer::produce().

125 { return _cache2; }
L1MuBMTrackSegPhiCollection _cache2

◆ getcache3()

L1MuBMTrackSegEtaCollection& L1MuBMTrackFinder::getcache3 ( )
inline

Definition at line 126 of file L1MuBMTrackFinder.h.

References _cache3.

Referenced by L1TMuonBarrelTrackProducer::produce().

126 { return _cache3; }
L1MuBMTrackSegEtaCollection _cache3

◆ ms()

const L1MuBMMuonSorter& L1MuBMTrackFinder::ms ( ) const
inline

get a pointer to the BM Muon Sorter

Definition at line 105 of file L1MuBMTrackFinder.h.

References m_ms.

105 { 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 370 of file L1MuBMTrackFinder.cc.

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

Referenced by L1TMuonBarrelTrackProducer::produce().

370  {
371  int num = 0;
372  for (int bx = _cache.getFirstBX(); bx < _cache.getLastBX(); ++bx) {
373  num += _cache.size(bx);
374  }
375  return num;
376 }
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 393 of file L1MuBMTrackFinder.cc.

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

393 { 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 130 of file L1MuBMTrackFinder.h.

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

130  {
131  reset();
132  run(e, c);
133  }
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 339 of file L1MuBMTrackFinder.cc.

References ep(), m_epvec, m_ms, m_spmap, m_wsvec, L1MuBMMuonSorter::reset(), L1MuBMWedgeSorter::reset(), L1MuBMSectorProcessor::reset(), L1MuBMEtaProcessor::reset(), sp(), and ws().

Referenced by reconstruct(), and run().

339  {
340  for (auto& sp : m_spmap) {
341  if (sp.second) {
342  sp.second->reset();
343  }
344  }
345 
346  for (auto& ep : m_epvec) {
347  if (ep) {
348  ep->reset();
349  }
350  }
351 
352  for (auto& ws : m_wsvec) {
353  if (ws) {
354  ws->reset();
355  }
356  }
357 
358  m_ms.reset();
359 }
std::vector< std::unique_ptr< L1MuBMEtaProcessor > > m_epvec
Eta Processors.
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]
std::vector< std::unique_ptr< L1MuBMWedgeSorter > > m_wsvec
Wedge Sorters.
virtual void reset()
reset the Eta Processor
void reset()
reset Muon Sorter
void reset()
reset Wedge Sorter
L1MuBMMuonSorter m_ms
BM Muon Sorter.
void reset()
reset the Sector Processor
L1MuBMSecProcMap m_spmap
Sector Processors.

◆ run()

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

run the barrel MTTF

Definition at line 126 of file L1MuBMTrackFinder.cc.

References _cache, _cache0, _cache1, _cache2, _cache3, funct::abs(), L1MuBMWedgeSorter::anyMuonCands(), l1t::bmtf, nano_mu_digi_cff::bx, L1MuDTChambPhContainer::bxEmpty(), DummyCfis::c, config(), gather_cfg::cout, Debug, L1MuBMTFConfig::Debug(), MillePedeFileConverter_cfg::e, ep(), L1MuBMTFConfig::getBxMax(), L1MuBMTFConfig::getBxMin(), L1MuDTChambPhContainer::getContainer(), L1MuBMWedgeSorter::id(), L1MuBMEtaProcessor::id(), L1MuBMSectorProcessor::id(), 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_recordCache, m_spmap, m_wsvec, ConfigBuilder::number, L1MuBMWedgeSorter::print(), L1MuBMSectorProcessor::print(), L1MuBMEtaProcessor::print(), BXVector< T >::push_back(), reset(), L1MuBMWedgeSorter::run(), L1MuBMSectorProcessor::run(), L1MuBMEtaProcessor::run(), 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(), sp(), L1MuBMSectorProcessor::tracK(), L1MuBMWedgeSorter::tracks(), and ws().

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

126  {
127  auto presentCacheID = c.get<L1TMuonBarrelParamsRcd>().cacheIdentifier();
128  if (m_recordCache != presentCacheID) {
129  m_recordCache = presentCacheID;
131  }
132  int bx_min = config().getBxMin();
133  int bx_max = config().getBxMax();
134 
135  //Resize the bx range according to the config file
136  _cache0.setBXRange(bx_min, bx_max);
137  _cache.setBXRange(bx_min, bx_max);
138 
139  // run the barrel Muon Trigger Track Finder
141  e.getByToken(m_DTDigiToken, dttrig);
142  if (dttrig->getContainer()->empty())
143  return;
144 
145  if (config().Debug(2))
146  cout << endl;
147  if (config().Debug(2))
148  cout << "**** L1MuBMTrackFinder processing ------****" << endl;
149  if (config().Debug(2))
150  cout << endl;
151 
152  for (int bx = bx_min; bx <= bx_max; bx++) {
153  if (dttrig->bxEmpty(bx))
154  continue;
155 
156  if (config().Debug(2))
157  cout << "L1MuBMTrackFinder processing bunch-crossing : " << bx << endl;
158 
159  // reset MTTF
160  reset();
161 
162  // run sector processors
163  for (auto& sp : m_spmap) {
164  if (config().Debug(2))
165  cout << "running " << sp.second->id() << endl;
166  if (sp.second)
167  sp.second->run(bx, e, c);
168  if (config().Debug(2) && sp.second)
169  sp.second->print();
170  }
171 
172  // run eta processors
173  for (auto& ep : m_epvec) {
174  if (config().Debug(2) && ep)
175  cout << "running Eta Processor " << ep->id() << endl;
176  if (ep)
177  ep->run(bx, e, c);
178  if (config().Debug(2) && ep)
179  ep->print();
180  }
181 
182  // read sector processors
183  for (auto& sp : m_spmap) {
184  if (config().Debug(2))
185  cout << "reading " << sp.second->id() << endl;
186  for (int number = 0; number < 2; number++) {
187  const L1MuBMTrack& cand = sp.second->tracK(number);
188 
189  if (!cand.empty()) {
191 
192  // max value in LUTs is 117
193  if (cand.hwEta() > -117 || cand.hwEta() < 117)
194  rmc.setHwEta(cand.hwEta());
195  else
196  rmc.setHwEta(-1000);
197 
198  rmc.setHwPt(cand.pt());
199  int abs_add_1 = setAdd(1, cand.address(1));
200  int abs_add_2 = setAdd(2, cand.address(2));
201  int abs_add_3 = setAdd(3, cand.address(3));
202  int abs_add_4 = setAdd(4, cand.address(4));
203 
204  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, cand.spid().wheel() < 0); // this has to be set!
206  abs(cand.spid().wheel()) - 1); // this has to be set!
215  rmc.setHwHF(cand.hwHF());
216 
217  rmc.setHwPhi(cand.hwPhi());
218  rmc.setHwSign(cand.hwSign() == 1 ? 0 : 1);
219  rmc.setHwSignValid(cand.hwSignValid());
220  rmc.setHwQual(cand.hwQual());
221  rmc.setTFIdentifiers(cand.spid().sector(), l1t::tftype::bmtf);
222 
223  _cache0.push_back(cand.bx(), rmc);
224  _cache2.insert(std::end(_cache2), std::begin(cand.getTSphi()), std::end(cand.getTSphi()));
225  _cache3.insert(std::end(_cache3), std::begin(cand.getTSeta()), std::end(cand.getTSeta()));
226  }
227  }
228  }
229 
230  // run wedge sorters
231  for (auto& ws : m_wsvec) {
232  if (config().Debug(2))
233  cout << "running Wedge Sorter " << ws->id() << endl;
234  if (ws)
235  ws->run();
236  if (config().Debug(2) && ws)
237  ws->print();
238 
239  // store found track candidates in container (cache)
240  if (ws->anyMuonCands()) {
241  const vector<const L1MuBMTrack*>& mttf_cont = ws->tracks();
242 
243  vector<const L1MuBMTrack*>::const_iterator iter;
244  for (iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++) {
245  if (!*iter)
246  continue;
248  rmc.setHwPt((*iter)->hwPt());
249  int abs_add_1 = setAdd(1, (*iter)->address(1));
250  int abs_add_2 = setAdd(2, (*iter)->address(2));
251  int abs_add_3 = setAdd(3, (*iter)->address(3));
252  int abs_add_4 = setAdd(4, (*iter)->address(4));
253 
255  (*iter)->spid().wheel() < 0); // this has to be set!
257  abs((*iter)->spid().wheel()) - 1); // this has to be set!
266  rmc.setHwHF((*iter)->hwHF());
267 
268  rmc.setHwPhi((*iter)->hwPhi());
269  if ((*iter)->hwEta() > -117 || (*iter)->hwEta() < 117)
270  // rmc.setHwEta(eta_map[(*iter)->hwEta()]);
271  rmc.setHwEta((*iter)->hwEta());
272  else
273  rmc.setHwEta(-1000);
274  rmc.setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
275  rmc.setHwSignValid((*iter)->hwSignValid());
276  rmc.setHwQual((*iter)->hwQual());
277  rmc.setTFIdentifiers((*iter)->spid().sector(), l1t::tftype::bmtf);
278 
279  if (*iter) {
280  _cache.push_back((*iter)->bx(), rmc);
281  _cache1.push_back(**iter);
282  }
283  }
284  }
285  } //end wedge sorting
286 
287  /* // run muon sorter
288  if ( config().Debug(2) ) cout << "running BM Muon Sorter" << endl;
289  if ( m_ms ) m_ms.run();
290  if ( config().Debug(2) && m_ms ) m_ms.print();
291 
292 
293  // store found track candidates in container (cache)
294  if ( m_ms.numberOfTracks() > 0 ) {
295  const vector<const L1MuBMTrack*>& mttf_cont = m_ms.tracks();
296  vector<const L1MuBMTrack*>::const_iterator iter;
297  for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) {
298 
299  l1t::RegionalMuonCand rmc;
300  rmc.setHwPt((*iter)->hwPt());
301  int abs_add_1 = setAdd(1,(*iter)->address(1));
302  int abs_add_2 = setAdd(2,(*iter)->address(2));
303  int abs_add_3 = setAdd(3,(*iter)->address(3));
304  int abs_add_4 = setAdd(4,(*iter)->address(4));
305 
306  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, (*iter)->spid().wheel() < 0); // this has to be set!
307  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelNum, abs((*iter)->spid().wheel()) - 1); // this has to be set!
308  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat1, abs_add_1);
309  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat2, abs_add_2);
310  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat3, abs_add_3);
311  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat4, abs_add_4);
312  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat1, 0);
313  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat2, 0);
314  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat3, 0);
315  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat4, 0);
316 
317 
318  rmc.setHwPhi((*iter)->hwPhi());
319  if((*iter)->hwEta()>-33 || (*iter)->hwEta()<32 )
320  rmc.setHwEta(eta_map[(*iter)->hwEta()]);
321  else
322  rmc.setHwEta(-1000);
323  rmc.setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
324  rmc.setHwSignValid((*iter)->hwSignValid());
325  rmc.setHwQual((*iter)->hwQual());
326  rmc.setTFIdentifiers((*iter)->spid().sector(),l1t::tftype::bmtf);
327 
328  if ( *iter ){ _cache.push_back((*iter)->bx(), rmc);}
329  }
330  }
331  */
332 
333  } //end of bx loop
334 }
std::vector< std::unique_ptr< L1MuBMEtaProcessor > > m_epvec
Eta Processors.
const L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
get a pointer to a Sector Processor
const L1MuBMSecProcId & id() const
return Sector Processor identifier
const L1MuBMWedgeSorter * ws(int id) const
get a pointer to a Wedge Sorter, index [0-11]
L1MuBMTFConfig m_config
Track Finder configuration.
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
int id() const
return Wedge Sorter identifier (0-11)
const L1MuBMEtaProcessor * ep(int id) const
get a pointer to an Eta Processor, index [0-11]
void print() const
print results after sorting
virtual void run(int bx, const edm::Event &e, const edm::EventSetup &c)
run the Eta Processor
void run()
run Wedge Sorter
L1MuBMTrack const & tracK(int id) const
return muon candidate, index [0,1]
const std::vector< const L1MuBMTrack * > & tracks() const
return vector of muon candidates
std::vector< std::unique_ptr< L1MuBMWedgeSorter > > m_wsvec
Wedge Sorters.
L1MuBMTrackSegEtaCollection _cache3
int getBxMax() const
void print() const
print muon candidates found by the Sector Processor
void setDefaultsES(const L1TMuonBarrelParams &)
L1MuBMTrackCollection _cache1
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
unsigned long long m_recordCache
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)
int id() const
return Eta Processor identifier (0-11)
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)
const L1MuBMTFConfig & config() const
return configuration
l1t::RegionalMuonCandBxCollection _cache0
bool Debug() const
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
Phi_Container const * getContainer() const
void setBXRange(int bxFirst, int bxLast)
void print() const
print muon candidates found by the Eta Processor
l1t::RegionalMuonCandBxCollection _cache
bool anyMuonCands() const
return number of muon candidates
int setAdd(int ust, int rel_add)
int getBxMin() const
void setHwSignValid(int bits)
Set whether charge measurement is valid (0 for high pT muons)
void run(int bx, const edm::Event &e, const edm::EventSetup &c)
run the Sector Processor
const bool Debug
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 399 of file L1MuBMTrackFinder.cc.

Referenced by run().

399  {
400  unsigned int uadd = rel_add;
401 
402  switch (uadd) {
403  case 0: {
404  rel_add = 8;
405  break;
406  }
407  case 1: {
408  rel_add = 9;
409  break;
410  }
411  case 2: {
412  rel_add = 0;
413  break;
414  }
415  case 3: {
416  rel_add = 1;
417  break;
418  }
419  case 8: {
420  rel_add = 10;
421  break;
422  }
423  case 9: {
424  rel_add = 11;
425  break;
426  }
427  case 10: {
428  rel_add = 2;
429  break;
430  }
431  case 11: {
432  rel_add = 3;
433  break;
434  }
435  case 4: {
436  rel_add = 12;
437  break;
438  }
439  case 5: {
440  rel_add = 13;
441  break;
442  }
443  case 6: {
444  rel_add = 4;
445  break;
446  }
447  case 7: {
448  rel_add = 5;
449  break;
450  }
451  case 15: {
452  rel_add = 15;
453  break;
454  }
455  default: {
456  rel_add = 15;
457  break;
458  }
459  }
460 
461  if (ust != 1)
462  return rel_add;
463 
464  switch (uadd) {
465  case 0: {
466  rel_add = 2;
467  break;
468  }
469  case 1: {
470  rel_add = 1;
471  break;
472  }
473  case 15: {
474  rel_add = 3;
475  break;
476  }
477  default: {
478  rel_add = 3;
479  break;
480  }
481  }
482  return rel_add;
483 }

◆ setup()

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

build the structure of the barrel MTTF

Definition at line 87 of file L1MuBMTrackFinder.cc.

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

Referenced by L1MuBMTrackFinder().

87  {
88  // build the barrel Muon Trigger Track Finder
89 
90  if (config().Debug(1))
91  cout << endl;
92  if (config().Debug(1))
93  cout << "**** L1MuBMTrackFinder building ****" << endl;
94  if (config().Debug(1))
95  cout << endl;
96 
97  // create new sector processors
98  for (int wh = -3; wh <= 3; wh++) {
99  if (wh == 0)
100  continue;
101  for (int sc = 0; sc < 12; sc++) {
102  L1MuBMSecProcId tmpspid(wh, sc);
103  auto sp = std::make_unique<L1MuBMSectorProcessor>(*this, tmpspid, std::move(iC));
104  if (config().Debug(2))
105  cout << "creating " << tmpspid << endl;
106  m_spmap.insert(tmpspid, std::move(sp));
107  }
108  }
109 
110  // create new eta processors and wedge sorters
111  for (int sc = 0; sc < 12; sc++) {
112  auto ep = std::make_unique<L1MuBMEtaProcessor>(*this, sc, std::move(iC));
113  if (config().Debug(2))
114  cout << "creating Eta Processor " << sc << endl;
115  m_epvec.push_back(std::move(ep));
116  auto ws = std::make_unique<L1MuBMWedgeSorter>(*this, sc);
117  if (config().Debug(2))
118  cout << "creating Wedge Sorter " << sc << endl;
119  m_wsvec.push_back(std::move(ws));
120  }
121 }
std::vector< std::unique_ptr< L1MuBMEtaProcessor > > m_epvec
Eta Processors.
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]
std::vector< std::unique_ptr< L1MuBMWedgeSorter > > m_wsvec
Wedge Sorters.
void insert(const L1MuBMSecProcId &, std::unique_ptr< L1MuBMSectorProcessor > sp)
insert a Sector Processor into the container
const L1MuBMTFConfig & config() const
return configuration
bool Debug() const
const bool Debug
L1MuBMSecProcMap m_spmap
Sector Processors.
def move(src, dest)
Definition: eostools.py:511

◆ sp() [1/2]

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

get a pointer to a Sector Processor

Definition at line 364 of file L1MuBMTrackFinder.cc.

References m_spmap, and L1MuBMSecProcMap::sp().

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

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

◆ sp() [2/2]

L1MuBMSectorProcessor * L1MuBMTrackFinder::sp ( const L1MuBMSecProcId id)

Definition at line 365 of file L1MuBMTrackFinder.cc.

References m_spmap, and L1MuBMSecProcMap::sp().

365 { 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 102 of file L1MuBMTrackFinder.h.

References EcalPhiSymFlatTableProducers_cfi::id, and m_wsvec.

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

102 { return m_wsvec[id].get(); }
std::vector< std::unique_ptr< L1MuBMWedgeSorter > > m_wsvec
Wedge Sorters.

Member Data Documentation

◆ _cache

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache
private

◆ _cache0

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache0
private

Definition at line 136 of file L1MuBMTrackFinder.h.

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

◆ _cache1

L1MuBMTrackCollection L1MuBMTrackFinder::_cache1
private

Definition at line 138 of file L1MuBMTrackFinder.h.

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

◆ _cache2

L1MuBMTrackSegPhiCollection L1MuBMTrackFinder::_cache2
private

Definition at line 139 of file L1MuBMTrackFinder.h.

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

◆ _cache3

L1MuBMTrackSegEtaCollection L1MuBMTrackFinder::_cache3
private

Definition at line 140 of file L1MuBMTrackFinder.h.

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

◆ m_config

L1MuBMTFConfig L1MuBMTrackFinder::m_config
private

Track Finder configuration.

Definition at line 147 of file L1MuBMTrackFinder.h.

Referenced by config(), and run().

◆ m_DTDigiToken

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

Definition at line 150 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), and run().

◆ m_epvec

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

Eta Processors.

Definition at line 143 of file L1MuBMTrackFinder.h.

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

◆ m_mbParamsToken

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

Definition at line 151 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), and run().

◆ m_ms

L1MuBMMuonSorter L1MuBMTrackFinder::m_ms
private

BM Muon Sorter.

Definition at line 145 of file L1MuBMTrackFinder.h.

Referenced by ms(), and reset().

◆ m_recordCache

unsigned long long L1MuBMTrackFinder::m_recordCache = 0
private

Definition at line 149 of file L1MuBMTrackFinder.h.

Referenced by run().

◆ m_spmap

L1MuBMSecProcMap L1MuBMTrackFinder::m_spmap
private

Sector Processors.

Definition at line 142 of file L1MuBMTrackFinder.h.

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

◆ m_wsvec

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

Wedge Sorters.

Definition at line 144 of file L1MuBMTrackFinder.h.

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