60 _cache0(144,-9,8),_cache(36, -9, 8) {
85 vector<L1MuBMEtaProcessor*>::iterator it_ep =
m_epvec.begin();
86 while ( it_ep !=
m_epvec.end() ) {
92 vector<L1MuBMWedgeSorter*>::iterator it_ws =
m_wsvec.begin();
93 while ( it_ws !=
m_wsvec.end() ) {
123 for (
int wh = -3; wh <= 3; wh++ ) {
124 if ( wh == 0 )
continue;
125 for (
int sc = 0;
sc < 12;
sc++ ) {
134 for (
int sc = 0;
sc < 12;
sc++ ) {
174 for (
int bx = bx_min; bx <= bx_max; bx++ ) {
175 if ( dttrig->
bxEmpty(bx) )
continue;
186 << (*it_sp).second->id() << endl;
187 if ( (*it_sp).second ) (*it_sp).second->run(bx,e,c);
193 vector<L1MuBMEtaProcessor*>::iterator it_ep =
m_epvec.begin();
194 while ( it_ep !=
m_epvec.end() ) {
196 << (*it_ep)->id() << endl;
197 if ( *it_ep ) (*it_ep)->run(bx,e,c);
206 << (*it_sp).second->id() << endl;
207 for (
int number = 0; number < 2; number++ ) {
210 if ( cand && !cand->
empty() ) {
252 vector<L1MuBMWedgeSorter*>::iterator it_ws =
m_wsvec.begin();
253 while ( it_ws !=
m_wsvec.end() ) {
255 << (*it_ws)->id() << endl;
256 if ( *it_ws ) (*it_ws)->run();
260 if ( (*it_ws)->anyMuonCands() ) {
261 const vector<const L1MuBMTrack*>& mttf_cont = (*it_ws)->tracks();
263 vector<const L1MuBMTrack*>::const_iterator iter;
264 for ( iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++ ) {
268 int abs_add_1 =
setAdd(1,(*iter)->address(1));
269 int abs_add_2 =
setAdd(2,(*iter)->address(2));
270 int abs_add_3 =
setAdd(3,(*iter)->address(3));
271 int abs_add_4 =
setAdd(4,(*iter)->address(4));
286 if((*iter)->hwEta()>-117 || (*iter)->hwEta()<117 )
291 rmc.
setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
361 if ( (*it_sp).second ) (*it_sp).second->reset();
365 vector<L1MuBMEtaProcessor*>::iterator it_ep =
m_epvec.begin();
366 while ( it_ep !=
m_epvec.end() ) {
367 if ( *it_ep ) (*it_ep)->reset();
371 vector<L1MuBMWedgeSorter*>::iterator it_ws =
m_wsvec.begin();
372 while ( it_ws !=
m_wsvec.end() ) {
373 if ( *it_ws ) (*it_ws)->reset();
439 unsigned int uadd = rel_add;
442 case 0: { rel_add = 8;
break; }
443 case 1: { rel_add = 9;
break; }
444 case 2: { rel_add = 0;
break; }
445 case 3: { rel_add = 1;
break; }
446 case 8: { rel_add = 10;
break; }
447 case 9: { rel_add = 11;
break; }
448 case 10: { rel_add = 2;
break; }
449 case 11: { rel_add = 3;
break; }
450 case 4: { rel_add = 12;
break; }
451 case 5: { rel_add = 13;
break; }
452 case 6: { rel_add = 4;
break; }
453 case 7: { rel_add = 5;
break; }
454 case 15: { rel_add = 15;
break; }
455 default: { rel_add = 15;
break; }
458 if (ust!=1)
return rel_add;
461 case 0: { rel_add = 2;
break; }
462 case 1: { rel_add = 1;
break; }
463 case 15: { rel_add = 3;
break; }
464 default: { rel_add = 3;
break; }
const_iterator end(int bx) const
L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
return pointer to Sector Processor
edm::EDGetTokenT< L1MuDTChambPhContainer > m_DTDigiToken
unsigned int pt() const
get pt-code (5 bits)
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
int numberOfTracks()
get number of muon candidates found by the barrel MTTF
unsigned size(int bx) const
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
L1MuBMMuonSorter * m_ms
BM Muon Sorter.
L1MuBMAddressArray address() const
get address-array for this muon candidate
bool bxEmpty(int step) const
const L1MuBMSecProcId & spid() const
return Sector Processor in which the muon candidate was found
SPmap::iterator SPmap_iter
const L1MuBMWedgeSorter * ws(int id) const
get a pointer to a Wedge Sorter, index [0-11]
int sector() const
return sector number
const int hwQual() const
Get quality code.
L1MuBMTrackFinder(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
constructor
virtual void reset()
reset Muon Sorter
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
TFtracks_const_iter begin(int bx)
static edm::InputTag getBMDigiInputTag()
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.
const L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
get a pointer to a Sector Processor
Abs< T >::type abs(const T &t)
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
void insert(const L1MuBMSecProcId &, L1MuBMSectorProcessor *sp)
insert a Sector Processor into the container
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
int bx() const
get the bunch crossing for this muon candidate
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
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)
TFtracks_const_iter end(int bx)
std::vector< L1MuBMEtaProcessor * > m_epvec
Eta Processors.
void setDefaultsES(const edm::EventSetup &c)
Phi_Container const * getContainer() const
void setBXRange(int bxFirst, int bxLast)
l1t::RegionalMuonCandBxCollection _cache
l1t::RegionalMuonCandBxCollection::const_iterator TFtracks_const_iter
container for muon candidates
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)
void setup(edm::ConsumesCollector &&)
build the structure of the barrel MTTF
SPmap_iter end()
return iterator which points to the one-past-last entry of the container
const_iterator begin(int bx) const
bool empty() const
is it an empty muon candidate?
const L1MuBMEtaProcessor * ep(int id) const
get a pointer to an Eta Processor, index [0-11]
L1MuBMSecProcMap * m_spmap
Sector Processors.
void push_back(int bx, T object)
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))
virtual ~L1MuBMTrackFinder()
destructor
void reset()
reset the barrel MTTF
int wheel() const
return wheel number