58 : _cache0(144, -9, 8), _cache(36, -9, 8), m_ms(*this), m_config(ps) {
62 cout <<
"**** entering L1MuBMTrackFinder ****" << endl;
93 cout <<
"**** L1MuBMTrackFinder building ****" << endl;
98 for (
int wh = -3; wh <= 3; wh++) {
101 for (
int sc = 0; sc < 12; sc++) {
103 auto sp = std::make_unique<L1MuBMSectorProcessor>(*
this, tmpspid,
std::move(iC));
105 cout <<
"creating " << tmpspid << endl;
111 for (
int sc = 0; sc < 12; sc++) {
112 auto ep = std::make_unique<L1MuBMEtaProcessor>(*
this, sc,
std::move(iC));
114 cout <<
"creating Eta Processor " << sc << endl;
116 auto ws = std::make_unique<L1MuBMWedgeSorter>(*
this, sc);
118 cout <<
"creating Wedge Sorter " << sc << endl;
148 cout <<
"**** L1MuBMTrackFinder processing ------****" << endl;
152 for (
int bx = bx_min;
bx <= bx_max;
bx++) {
157 cout <<
"L1MuBMTrackFinder processing bunch-crossing : " <<
bx << endl;
165 cout <<
"running " <<
sp.second->
id() << endl;
175 cout <<
"running Eta Processor " <<
ep->
id() << endl;
185 cout <<
"reading " <<
sp.second->
id() << endl;
193 if (
cand.hwEta() > -117 ||
cand.hwEta() < 117)
233 cout <<
"running Wedge Sorter " <<
ws->
id() << endl;
241 const vector<const L1MuBMTrack*>& mttf_cont =
ws->
tracks();
243 vector<const L1MuBMTrack*>::const_iterator iter;
244 for (iter = mttf_cont.begin(); iter != mttf_cont.end(); iter++) {
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));
255 (*iter)->spid().wheel() < 0);
257 abs((*iter)->spid().wheel()) - 1);
269 if ((*iter)->hwEta() > -117 || (*iter)->hwEta() < 117)
274 rmc.
setHwSign((*iter)->hwSign() == 1 ? 0 : 1);
400 unsigned int uadd = rel_add;
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 numberOfTracks()
get number of muon candidates found by the barrel MTTF
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
L1MuBMSectorProcessor * sp(const L1MuBMSecProcId &) const
return pointer to Sector 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
const_iterator begin(int bx) const
unsigned size(int bx) const
void insert(const L1MuBMSecProcId &, std::unique_ptr< L1MuBMSectorProcessor > sp)
insert a Sector Processor into the container
edm::InputTag getBMDigiInputTag() const
void print() const
print muon candidates found by the Sector Processor
L1MuBMTrackFinder(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
constructor
void setDefaultsES(const L1TMuonBarrelParams &)
L1MuBMTrackCollection _cache1
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.
unsigned long long m_recordCache
TFtracks_const_iter begin(int bx)
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)
void setHwHF(bool bit)
Set HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 1)
bool bxEmpty(int step) const
L1MuBMTrackSegPhiCollection _cache2
void run(const edm::Event &e, const edm::EventSetup &c)
run the barrel MTTF
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
void reset()
reset Wedge Sorter
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
Phi_Container const * getContainer() const
TFtracks_const_iter end(int bx)
void setBXRange(int bxFirst, int bxLast)
l1t::RegionalMuonCandBxCollection _cache
bool anyMuonCands() const
return number of muon candidates
const_iterator end(int bx) const
l1t::RegionalMuonCandBxCollection::const_iterator TFtracks_const_iter
container for muon candidates
int setAdd(int ust, int rel_add)
L1MuBMMuonSorter m_ms
BM Muon Sorter.
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
void run(int bx, const edm::Event &e, const edm::EventSetup &c)
run the Sector Processor
void reset()
reset the Sector Processor
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
edm::ESGetToken< L1TMuonBarrelParams, L1TMuonBarrelParamsRcd > m_mbParamsToken