13 const int global_event_BX,
18 int sector = in_track.
Sector() - 1;
32 int me1_ch_id = (ptlut_data.
bt_vi[0] == 0 && ptlut_data.
bt_vi[1] != 0) ? ptlut_data.
bt_ci[1]+16 : ptlut_data.
bt_ci[0];
33 int me2_ch_id = ptlut_data.
bt_ci[2];
34 int me3_ch_id = ptlut_data.
bt_ci[3];
35 int me4_ch_id = ptlut_data.
bt_ci[4];
37 int me1_seg_id = (ptlut_data.
bt_vi[0] == 0 && ptlut_data.
bt_vi[1] != 0) ? ptlut_data.
bt_si[1] : ptlut_data.
bt_si[0];
38 int me2_seg_id = ptlut_data.
bt_si[2];
39 int me3_seg_id = ptlut_data.
bt_si[3];
40 int me4_seg_id = ptlut_data.
bt_si[4];
42 auto get_gmt_chamber_me1 = [](
int ch) {
59 auto get_gmt_chamber = [](
int ch) {
73 int EMTF_kBX = (
abs(global_event_BX) % 2048) - 25 + in_track.
BX();
74 if (EMTF_kBX < 0) EMTF_kBX += 2048;
99 for (
const auto& in_track : in_tracks) {
100 int bx = in_track.BX();
102 if (gmtMinBX <= bx && bx <= gmtMaxBX) {
125 int emtfMaxProc = 11;
128 auto sortedCands = std::make_unique<l1t::RegionalMuonCandBxCollection>();
129 sortedCands->clear();
130 sortedCands->setBXRange(minBX, maxBX);
131 for (
int iBX = minBX; iBX <=
maxBX; ++iBX) {
132 for (
int proc = emtfMinProc;
proc <= emtfMaxProc;
proc++) {
134 int cand_proc =
cand->processor();
136 if (cand_proc !=
proc)
continue;
137 sortedCands->push_back(iBX, *
cand);
const_iterator end(int bx) const
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
TrainProcessor *const proc
void sort_uGMT_muons(l1t::RegionalMuonCandBxCollection &cands)
int bunchCrossing() const
void convert(const int global_event_BX, const EMTFTrack &in_track, l1t::RegionalMuonCand &out_cand) const
l1t::EMTFTrackCollection EMTFTrackCollection
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
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)
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)
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
void setBXRange(int bxFirst, int bxLast)
void convert_all(const edm::Event &iEvent, const EMTFTrackCollection &in_tracks, l1t::RegionalMuonCandBxCollection &out_cands) const
void setHwSignValid(int bits)
Set whether charge measurement is valid (0 for high pT muons)
int GMT_charge_valid() const
const_iterator begin(int bx) const
void push_back(int bx, T object)
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))
std::vector< RegionalMuonCand >::const_iterator const_iterator