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...
 
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 modification: G.Karathanasis UoAthens

Definition at line 67 of file L1MuBMTrackFinder.h.

Member Typedef Documentation

container for muon candidates

Definition at line 72 of file L1MuBMTrackFinder.h.

Definition at line 73 of file L1MuBMTrackFinder.h.

Constructor & Destructor Documentation

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

constructor

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

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

destructor

Definition at line 83 of file L1MuBMTrackFinder.cc.

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

83  {
84 
85  delete m_spmap;
86 
87  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
88  while ( it_ep != m_epvec.end() ) {
89  delete (*it_ep);
90  it_ep++;
91  }
92  m_epvec.clear();
93 
94  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
95  while ( it_ws != m_wsvec.end() ) {
96  delete (*it_ws);
97  it_ws++;
98  }
99  m_wsvec.clear();
100 
101  delete m_ms;
102 
103  if ( m_config ) delete m_config;
104  m_config = nullptr;
105 
106 }
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 410 of file L1MuBMTrackFinder.cc.

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

Referenced by ms().

410  {
411 
412  return _cache.begin(bx);
413 
414 }
l1t::RegionalMuonCandBxCollection _cache
const_iterator begin(int bx) const
void L1MuBMTrackFinder::clear ( void  )

Definition at line 424 of file L1MuBMTrackFinder.cc.

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

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

424  {
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
static const L1MuBMTFConfig* L1MuBMTrackFinder::config ( void  )
inlinestatic

return configuration

Definition at line 117 of file L1MuBMTrackFinder.h.

References m_config.

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

Definition at line 417 of file L1MuBMTrackFinder.cc.

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

Referenced by ms().

417  {
418 
419  return _cache.end(bx);
420 
421 }
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 96 of file L1MuBMTrackFinder.h.

References triggerObjects_cff::id, and m_epvec.

Referenced by setup().

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

Definition at line 119 of file L1MuBMTrackFinder.h.

References _cache.

Referenced by L1TMuonBarrelTrackProducer::produce().

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

Definition at line 120 of file L1MuBMTrackFinder.h.

References _cache0.

Referenced by L1TMuonBarrelTrackProducer::produce().

120 { return _cache0; }
l1t::RegionalMuonCandBxCollection _cache0
L1MuBMTrackCollection& L1MuBMTrackFinder::getcache1 ( )
inline

Definition at line 121 of file L1MuBMTrackFinder.h.

References _cache1.

Referenced by L1TMuonBarrelTrackProducer::produce().

121 { return _cache1; }
L1MuBMTrackCollection _cache1
L1MuBMTrackSegPhiCollection& L1MuBMTrackFinder::getcache2 ( )
inline

Definition at line 122 of file L1MuBMTrackFinder.h.

References _cache2.

Referenced by L1TMuonBarrelTrackProducer::produce().

122 { return _cache2; }
L1MuBMTrackSegPhiCollection _cache2
L1MuBMTrackSegEtaCollection& L1MuBMTrackFinder::getcache3 ( )
inline

Definition at line 123 of file L1MuBMTrackFinder.h.

References _cache3.

Referenced by L1TMuonBarrelTrackProducer::produce().

123 { return _cache3; }
L1MuBMTrackSegEtaCollection _cache3
const L1MuBMMuonSorter* L1MuBMTrackFinder::ms ( ) const
inline

get a pointer to the BM Muon Sorter

Definition at line 102 of file L1MuBMTrackFinder.h.

References begin(), clear(), end(), m_ms, and numberOfTracks().

102 { 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 401 of file L1MuBMTrackFinder.cc.

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

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

401  {
402  int num = 0;
403  for (int bx = _cache.getFirstBX(); bx < _cache.getLastBX(); ++bx) {
404  num += _cache.size(bx);
405  }
406  return num;
407 }
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 437 of file L1MuBMTrackFinder.cc.

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

437  {
438  return _cache.size(0);
439 }
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 128 of file L1MuBMTrackFinder.h.

References reset(), and run().

128 { 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 363 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().

363  {
364 
366  while ( it_sp != m_spmap->end() ) {
367  if ( (*it_sp).second ) (*it_sp).second->reset();
368  it_sp++;
369  }
370 
371  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
372  while ( it_ep != m_epvec.end() ) {
373  if ( *it_ep ) (*it_ep)->reset();
374  it_ep++;
375  }
376 
377  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
378  while ( it_ws != m_wsvec.end() ) {
379  if ( *it_ws ) (*it_ws)->reset();
380  it_ws++;
381  }
382 
383  if ( m_ms ) m_ms->reset();
384 
385 }
void reset() override
reset Muon Sorter
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
SPmap::iterator SPmap_iter
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

Definition at line 155 of file L1MuBMTrackFinder.cc.

References _cache, _cache0, _cache1, _cache2, _cache3, funct::abs(), L1MuBMTrack::address(), begin, L1MuBMSecProcMap::begin(), l1t::bmtf, L1MuBMTrack::bx(), L1MuDTChambPhContainer::bxEmpty(), gather_cfg::cout, L1MuBMTFConfig::Debug(), L1MuBMTrack::empty(), end, L1MuBMSecProcMap::end(), L1MuBMTFConfig::getBxMax(), L1MuBMTFConfig::getBxMin(), edm::Event::getByToken(), L1MuDTChambPhContainer::getContainer(), L1MuBMTrack::getTSeta(), L1MuBMTrack::getTSphi(), 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, 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().

155  {
156 
158  int bx_min = L1MuBMTFConfig::getBxMin();
159  int bx_max = L1MuBMTFConfig::getBxMax();
160 
161  //Resize the bx range according to the config file
162  _cache0.setBXRange(bx_min,bx_max);
163  _cache.setBXRange(bx_min,bx_max);
164 
165 
166 
167 // run the barrel Muon Trigger Track Finder
169  e.getByToken(m_DTDigiToken,dttrig);
170  if ( dttrig->getContainer()->empty() ) return;
171 
172  if ( L1MuBMTFConfig::Debug(2) ) cout << endl;
173  if ( L1MuBMTFConfig::Debug(2) ) cout << "**** L1MuBMTrackFinder processing ------****" << endl;
174  if ( L1MuBMTFConfig::Debug(2) ) cout << endl;
175 
176  for ( int bx = bx_min; bx <= bx_max; bx++ ) {
177  if ( dttrig->bxEmpty(bx) ) continue;
178 
179  if ( L1MuBMTFConfig::Debug(2) ) cout << "L1MuBMTrackFinder processing bunch-crossing : " << bx << endl;
180 
181  // reset MTTF
182  reset();
183 
184  // run sector processors
186  while ( it_sp != m_spmap->end() ) {
187  if ( L1MuBMTFConfig::Debug(2) ) cout << "running "
188  << (*it_sp).second->id() << endl;
189  if ( (*it_sp).second ) (*it_sp).second->run(bx,e,c);
190  if ( L1MuBMTFConfig::Debug(2) && (*it_sp).second ) (*it_sp).second->print();
191  it_sp++;
192  }
193 
194  // run eta processors
195  vector<L1MuBMEtaProcessor*>::iterator it_ep = m_epvec.begin();
196  while ( it_ep != m_epvec.end() ) {
197  if ( L1MuBMTFConfig::Debug(2) ) cout << "running Eta Processor "
198  << (*it_ep)->id() << endl;
199  if ( *it_ep ) (*it_ep)->run(bx,e,c);
200  if ( L1MuBMTFConfig::Debug(2) && *it_ep ) (*it_ep)->print();
201  it_ep++;
202  }
203 
204  // read sector processors
205  it_sp = m_spmap->begin();
206  while ( it_sp != m_spmap->end() ) {
207  if ( L1MuBMTFConfig::Debug(2) ) cout << "reading "
208  << (*it_sp).second->id() << endl;
209  for ( int number = 0; number < 2; number++ ) {
210  const L1MuBMTrack* cand = (*it_sp).second->tracK(number);
211 
212  if ( cand && !cand->empty() ) {
213 
215 
216  // max value in LUTs is 117
217  if(cand->hwEta()>-117 || cand->hwEta()<117 )
218  rmc.setHwEta(cand->hwEta());
219  else
220  rmc.setHwEta(-1000);
221 
222  rmc.setHwPt(cand->pt());
223  int abs_add_1 = setAdd(1,cand->address(1));
224  int abs_add_2 = setAdd(2,cand->address(2));
225  int abs_add_3 = setAdd(3,cand->address(3));
226  int abs_add_4 = setAdd(4,cand->address(4));
227 
228  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, cand->spid().wheel() < 0); // this has to be set!
229  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelNum, abs(cand->spid().wheel()) - 1); // this has to be set!
238  rmc.setHwHF(cand->hwHF());
239 
240  rmc.setHwPhi(cand->hwPhi());
241  rmc.setHwSign(cand->hwSign() == 1 ? 0 : 1 );
242  rmc.setHwSignValid(cand->hwSignValid());
243  rmc.setHwQual(cand->hwQual());
245 
246  _cache0.push_back(cand->bx(), rmc);
247  _cache2.insert(std::end(_cache2), std::begin(cand->getTSphi()), std::end(cand->getTSphi()));
248  _cache3.insert(std::end(_cache3), std::begin(cand->getTSeta()), std::end(cand->getTSeta()));
249  }
250  }
251  it_sp++;
252  }
253 
254  // run wedge sorters
255  vector<L1MuBMWedgeSorter*>::iterator it_ws = m_wsvec.begin();
256  while ( it_ws != m_wsvec.end() ) {
257  if ( L1MuBMTFConfig::Debug(2) ) cout << "running Wedge Sorter "
258  << (*it_ws)->id() << endl;
259  if ( *it_ws ) (*it_ws)->run();
260  if ( L1MuBMTFConfig::Debug(2) && *it_ws ) (*it_ws)->print();
261 
262  // store found track candidates in container (cache)
263  if ( (*it_ws)->anyMuonCands() ) {
264  const vector<const L1MuBMTrack*>& mttf_cont = (*it_ws)->tracks();
265 
266  vector<const L1MuBMTrack*>::const_iterator iter;
267  for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) {
268  if(!*iter) continue;
270  rmc.setHwPt((*iter)->hwPt());
271  int abs_add_1 = setAdd(1,(*iter)->address(1));
272  int abs_add_2 = setAdd(2,(*iter)->address(2));
273  int abs_add_3 = setAdd(3,(*iter)->address(3));
274  int abs_add_4 = setAdd(4,(*iter)->address(4));
275 
276  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, (*iter)->spid().wheel() < 0); // this has to be set!
277  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelNum, abs((*iter)->spid().wheel()) - 1); // this has to be set!
286  rmc.setHwHF((*iter)->hwHF());
287 
288  rmc.setHwPhi((*iter)->hwPhi());
289  if((*iter)->hwEta()>-117 || (*iter)->hwEta()<117 )
290  // rmc.setHwEta(eta_map[(*iter)->hwEta()]);
291  rmc.setHwEta((*iter)->hwEta());
292  else
293  rmc.setHwEta(-1000);
294  rmc.setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
295  rmc.setHwSignValid((*iter)->hwSignValid());
296  rmc.setHwQual((*iter)->hwQual());
297  rmc.setTFIdentifiers((*iter)->spid().sector(),l1t::tftype::bmtf);
298 
299  if ( *iter ){
300  _cache.push_back((*iter)->bx(), rmc);
301  _cache1.push_back(**iter);
302  }
303  }
304  }
305 
306  it_ws++;
307 
308  }//end wedge sorting
309 
310  /* // run muon sorter
311  if ( L1MuBMTFConfig::Debug(2) ) cout << "running BM Muon Sorter" << endl;
312  if ( m_ms ) m_ms->run();
313  if ( L1MuBMTFConfig::Debug(2) && m_ms ) m_ms->print();
314 
315 
316  // store found track candidates in container (cache)
317  if ( m_ms->numberOfTracks() > 0 ) {
318  const vector<const L1MuBMTrack*>& mttf_cont = m_ms->tracks();
319  vector<const L1MuBMTrack*>::const_iterator iter;
320  for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) {
321 
322  l1t::RegionalMuonCand rmc;
323  rmc.setHwPt((*iter)->hwPt());
324  int abs_add_1 = setAdd(1,(*iter)->address(1));
325  int abs_add_2 = setAdd(2,(*iter)->address(2));
326  int abs_add_3 = setAdd(3,(*iter)->address(3));
327  int abs_add_4 = setAdd(4,(*iter)->address(4));
328 
329  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelSide, (*iter)->spid().wheel() < 0); // this has to be set!
330  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kWheelNum, abs((*iter)->spid().wheel()) - 1); // this has to be set!
331  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat1, abs_add_1);
332  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat2, abs_add_2);
333  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat3, abs_add_3);
334  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kStat4, abs_add_4);
335  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat1, 0);
336  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat2, 0);
337  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat3, 0);
338  rmc.setTrackSubAddress(l1t::RegionalMuonCand::kSegSelStat4, 0);
339 
340 
341  rmc.setHwPhi((*iter)->hwPhi());
342  if((*iter)->hwEta()>-33 || (*iter)->hwEta()<32 )
343  rmc.setHwEta(eta_map[(*iter)->hwEta()]);
344  else
345  rmc.setHwEta(-1000);
346  rmc.setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
347  rmc.setHwSignValid((*iter)->hwSignValid());
348  rmc.setHwQual((*iter)->hwQual());
349  rmc.setTFIdentifiers((*iter)->spid().sector(),l1t::tftype::bmtf);
350 
351  if ( *iter ){ _cache.push_back((*iter)->bx(), rmc);}
352  }
353  }
354  */
355 
356  }//end of bx loop
357 }
static int getBxMax()
const std::vector< L1MuBMTrackSegEta > & getTSeta() const
return all eta track segments of the muon candidate
Definition: L1MuBMTrack.h:125
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
unsigned int pt() const
get pt-code (5 bits)
Definition: L1MuBMTrack.h:74
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:517
L1MuBMAddressArray address() const
get address-array for this muon candidate
Definition: L1MuBMTrack.h:101
bool bxEmpty(int step) const
const L1MuBMSecProcId & spid() const
return Sector Processor in which the muon candidate was found
Definition: L1MuBMTrack.h:98
SPmap::iterator SPmap_iter
L1MuBMTrackSegEtaCollection _cache3
int sector() const
return sector number
const int hwQual() const
Get quality code.
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
const int hwHF() const
Get HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 1)
void setHwHF(bool bit)
Set HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 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
#define end
Definition: vmac.h:39
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:107
L1MuBMTrackSegPhiCollection _cache2
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)
Phi_Container const * getContainer() const
void setBXRange(int bxFirst, int bxLast)
static bool Debug()
l1t::RegionalMuonCandBxCollection _cache
#define begin
Definition: vmac.h:32
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)
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:95
const std::vector< L1MuBMTrackSegPhi > & getTSphi() const
return all phi track segments of the muon candidate
Definition: L1MuBMTrack.h:116
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 446 of file L1MuBMTrackFinder.cc.

References m_config.

Referenced by run().

446  {
447  unsigned int uadd = rel_add;
448 
449  switch (uadd) {
450  case 0: { rel_add = 8; break; }
451  case 1: { rel_add = 9; break; }
452  case 2: { rel_add = 0; break; }
453  case 3: { rel_add = 1; break; }
454  case 8: { rel_add = 10; break; }
455  case 9: { rel_add = 11; break; }
456  case 10: { rel_add = 2; break; }
457  case 11: { rel_add = 3; break; }
458  case 4: { rel_add = 12; break; }
459  case 5: { rel_add = 13; break; }
460  case 6: { rel_add = 4; break; }
461  case 7: { rel_add = 5; break; }
462  case 15: { rel_add = 15; break; }
463  default: { rel_add = 15; break; }
464  }
465 
466  if (ust!=1) return rel_add;
467 
468  switch (uadd) {
469  case 0: { rel_add = 2; break; }
470  case 1: { rel_add = 1; break; }
471  case 15: { rel_add = 3; break; }
472  default: { rel_add = 3; break; }
473  }
474  return rel_add;
475 }
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(), SimDataFormats::CaloAnalysis::sc, sp(), and ws().

Referenced by L1MuBMTFSetup::L1MuBMTFSetup().

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

get a pointer to a Sector Processor

Definition at line 391 of file L1MuBMTrackFinder.cc.

References m_spmap, and L1MuBMSecProcMap::sp().

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

391  {
392 
393  return m_spmap->sp(id);
394 
395 }
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 99 of file L1MuBMTrackFinder.h.

References triggerObjects_cff::id, and m_wsvec.

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

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

Member Data Documentation

l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache
private
l1t::RegionalMuonCandBxCollection L1MuBMTrackFinder::_cache0
private

Definition at line 132 of file L1MuBMTrackFinder.h.

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

L1MuBMTrackCollection L1MuBMTrackFinder::_cache1
private

Definition at line 134 of file L1MuBMTrackFinder.h.

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

L1MuBMTrackSegPhiCollection L1MuBMTrackFinder::_cache2
private

Definition at line 135 of file L1MuBMTrackFinder.h.

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

L1MuBMTrackSegEtaCollection L1MuBMTrackFinder::_cache3
private

Definition at line 136 of file L1MuBMTrackFinder.h.

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

L1MuBMTFConfig * L1MuBMTrackFinder::m_config = 0
staticprivate

Track Finder configuration.

Definition at line 143 of file L1MuBMTrackFinder.h.

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

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

Definition at line 147 of file L1MuBMTrackFinder.h.

Referenced by L1MuBMTrackFinder(), and run().

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

Eta Processors.

Definition at line 139 of file L1MuBMTrackFinder.h.

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

L1MuBMMuonSorter* L1MuBMTrackFinder::m_ms
private

BM Muon Sorter.

Definition at line 141 of file L1MuBMTrackFinder.h.

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

L1MuBMSecProcMap* L1MuBMTrackFinder::m_spmap
private

Sector Processors.

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

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