|
|
Go to the documentation of this file.
96 for (
int i = 0;
i < 4;
i++) {
101 std::vector<L1MuGMTExtendedCand*>::iterator iter;
117 std::vector<L1MuGMTExtendedCand*>::const_iterator iter;
119 if (*iter && !(*iter)->empty())
173 unsigned HaloOverwritesMatched = 1;
176 for (
int i = 0;
i < 4;
i++) {
178 int match_idx = pairM.
rowAny(
i);
180 int csc_is_halo = (
m_id == 1) && (
dtcsc_mu[
i]->finehalo_packed() == 1);
182 if ((match_idx != -1) &&
183 (!(csc_is_halo && HaloOverwritesMatched)))
195 for (
int j = 0;
j < 4;
j++) {
197 int match_idx = pairM.
colAny(
j);
199 if (match_idx == -1) {
210 std::vector<L1MuGMTExtendedCand*>::const_iterator icand;
248 if ((
m_id == 1) && (
dtcsc_mu[idx_dtcsc]->finehalo_packed() == 1))
298 return ((MMconfig & 32) == 32) || (((MMconfig & 8) == 8) && by_rank) || (((MMconfig & 4) == 4) && by_pt) ||
299 (((MMconfig & 2) == 2) && by_combi);
325 int newphi =
mu->phi_packed() + dphi;
331 return (
unsigned)newphi;
335 unsigned sysign =
mu->charge_packed();
337 if (
mu->charge_valid_packed() == 0)
356 int selected_by_rank =
abs(merge_rank_dtcsc) >=
abs(merge_rank_rpc);
357 int selected_by_pt =
dtcsc_mu[idx_dtcsc]->pt_packed() <=
rpc_mu[idx_rpc]->pt_packed();
362 int selected_by_combi = (merge_rank_dtcsc < 0 && merge_rank_rpc < 0) ? selected_by_rank : selected_by_pt;
374 if (
selectDTCSC(MMConfig_phi, selected_by_rank, selected_by_pt, selected_by_combi))
387 if ((
m_id == 1) ||
dtcsc_mu[idx_dtcsc]->finehalo_packed())
392 if (
selectDTCSC(MMConfig_eta, selected_by_rank, selected_by_pt, selected_by_combi))
408 if (
selectDTCSC(MMConfig_pt, selected_by_rank, selected_by_pt, selected_by_combi))
418 unsigned sy_sign = 0;
422 if (
rpc_mu[idx_rpc]->charge_valid_packed() == 1 &&
dtcsc_mu[idx_dtcsc]->charge_valid_packed() == 0)
427 if (
selectDTCSC(MMConfig_charge, selected_by_rank, selected_by_pt, selected_by_combi))
439 bool mip_bit =
false;
446 mip_bit = mip_bit_dtcsc && mip_bit_rpc;
448 mip_bit = mip_bit_dtcsc || mip_bit_rpc;
450 if (
selectDTCSC(MMConfig_MIP, selected_by_rank, selected_by_pt, selected_by_combi))
451 mip_bit = mip_bit_dtcsc;
453 mip_bit = mip_bit_rpc;
461 bool iso_bit =
false;
468 iso_bit = iso_bit_dtcsc && iso_bit_rpc;
470 iso_bit = iso_bit_dtcsc || iso_bit_rpc;
472 if (
selectDTCSC(MMConfig_ISO, selected_by_rank, selected_by_pt, selected_by_combi))
473 iso_bit = iso_bit_dtcsc;
475 iso_bit = iso_bit_rpc;
486 if (
selectDTCSC(MMConfig_SRK, selected_by_rank, selected_by_pt, selected_by_combi))
507 if (
muon ==
nullptr ||
muon->empty())
510 unsigned lut_idx =
muon->type_idx();
513 unsigned eta =
muon->eta_packed();
514 unsigned q =
muon->quality_packed();
515 unsigned pt =
muon->pt_packed();
516 unsigned phi =
muon->phi_packed();
535 int rank_signed = rank;
static L1MuGMTRegMMConfigPt * getRegMMConfigPt()
int colAny(int c) const
is any element in column c > 0 ? return index or -1
static const unsigned int MAXCSC
void createDTCSCCand(int idx_dtcsc)
unsigned SpecificLookup_pt_mixed(int idx, unsigned pt_dtcsc, unsigned pt_rpc) const
specific lookup function for pt_mixed
static const unsigned int MAXRPCendcap
void setMIP(bool mip)
set min ionizing bit for muon candidate
static L1MuGMTLFEtaConvLUT * getLFEtaConvLUT()
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
void setDTCSCIndex(unsigned int idxdtcsc)
set index of contributing DT/CSC muon
static L1MuGMTRegSortRankOffset * getRegSortRankOffset()
std::vector< const L1MuRegionalCand * > rpc_mu
void createMergedCand(int idx_dtcsc, int idx_rpc)
unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const
specific lookup function for rank_etaq
unsigned SpecificLookup_flag(int idx, unsigned eta, unsigned q) const
specific lookup function for flag
static const unsigned int MAXRPCbarrel
unsigned SpecificLookup_rank_etaphi(int idx, unsigned eta, unsigned phi) const
specific lookup function for rank_etaphi
static const unsigned int MAXDTBX
std::vector< L1MuGMTExtendedCand * > m_MuonCands
static L1MuGMTLFPhiProEtaConvLUT * getLFPhiProEtaConvLUT()
void setRPCIndex(unsigned int idxrpc)
set index of contributing RPC muon
const L1MuGMTMatrix< bool > & pairM() const
return pair matrix
static L1MuGMTLFMergeRankEtaPhiLUT * getLFMergeRankEtaPhiLUT()
const bool cancelMyChipMuon(int idx) const
return cancel bit for DT (m_id==0 || m_id==3) or CSC (m_id==1 || m_id==2) muon
const uint32_t *__restrict__ Quality * quality
const L1MuScale * getPhiScale() const
get the phi scale
static L1MuGMTRegMMConfigMIP * getRegMMConfigMIP()
static L1MuGMTLFMergeRankCombineLUT * getLFMergeRankCombineLUT()
int selectDTCSC(unsigned MMconfig, int by_rank, int by_pt, int by_combi) const
static const L1MuTriggerScales * getTriggerScales()
static unsigned sort_rank(const L1MuRegionalCand *)
Sort Rank Table.
int doSpecialMerge(unsigned MMconfig) const
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
static L1MuGMTLFMergeRankEtaQLUT * getLFMergeRankEtaQLUT()
int rowAny(int r) const
is any element in row r > 0 ? return index or -1
virtual ~L1MuGMTMerger()
destructor
const L1MuGMTPSB * Data() const
return pointer to PSB
static L1MuGMTRegMMConfigISO * getRegMMConfigISO()
const L1MuGMTMatcher * Matcher(int id) const
return pointer to Matcher
void setChargePacked(unsigned ch)
set packed charge/synchronization word of muon candidate (0=POS, 1=NEG, 2=UNDEF, 3=SYNC)
void print() const
print results after selection
int doANDMerge(unsigned MMconfig) const
static L1MuGMTRegMMConfigCharge * getRegMMConfigCharge()
unsigned projectedPhi(const L1MuRegionalCand *mu) const
const L1MuGlobalMuonTrigger & m_gmt
unsigned SpecificLookup_eta_gmt(int idx, unsigned eta_regional) const
specific lookup function for eta_gmt
const L1MuScale * getPtScale() const
get the Pt scale
const L1MuGMTCancelOutUnit * CancelOutUnit(int id) const
return pointer to Cancel Out Unit
void setBx(int bx)
set bunch crossing identifier
static L1MuGMTLFMergeRankPtQLUT * getLFMergeRankPtQLUT()
static bool isDisabled(const L1MuRegionalCand *)
Diable bit.
bool MIP(int idx) const
return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC)
void setQuality(unsigned quality)
set quality of muon candidate
bool ISO(int idx) const
return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC)
static L1MuGMTRegMMConfigEta * getRegMMConfigEta()
unsigned SpecificLookup_rank_ptq(int idx, unsigned q, unsigned pt) const
specific lookup function for rank_ptq
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
void setEtaPacked(unsigned eta)
set packed eta-code of muon candidate
const L1MuGMTMipIsoAU * MipIsoAU(int id) const
return pointer to MIP & ISO bit assignment unit
void setRank(unsigned int rank)
set rank
unsigned SpecificLookup_merge_rank(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for merge_rank
unsigned getValue(int idx)
get Value
int merge_rank(const L1MuRegionalCand *) const
Merge Rank Table.
std::vector< const L1MuRegionalCand * > dtcsc_mu
L1MuGMTMerger(const L1MuGlobalMuonTrigger &gmt, int id)
constructor
static L1MuGMTRegMMConfigSRK * getRegMMConfigSRK()
int idxFromPacked(unsigned packed) const override
get the value from the packed notation (+/-)
unsigned SpecificLookup_dphi(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for dphi
const L1MuRegionalCand * RPCMuon(int index) const
get RPC muon
Log< level::Info, true > LogVerbatim
static L1MuGMTLFPhiProLUT * getLFPhiProLUT()
const L1MuRegionalCand * CSCMuon(int index) const
get CSC muon
const bool cancelOtherChipMuon(int idx) const
return cancel bit for barrel RPC (m_id==2) or forward RPC (m_id==3) muon
void createRPCCand(int idx_rpc)
void setRPCBit(unsigned int rpcbit)
set RPC bit (1=RPC, 0=DT/CSC or matched)
unsigned sysign(const L1MuRegionalCand *mu) const
static L1MuGMTLFPtMixLUT * getLFPtMixLUT()
Abs< T >::type abs(const T &t)
unsigned convertedEta(const L1MuRegionalCand *mu) const
const L1MuRegionalCand * DTBXMuon(int index) const
get DTBX muon
static const L1MuTriggerPtScale * getTriggerPtScale()
void setIsolation(bool isol)
set isolation of muon candidate
static unsigned getVeryLowQualityLevel(const L1MuRegionalCand *)
Very low quality bits.
void setFwdBit(unsigned int fwdbit)
set forward bit (1=forward, 0=barrel)
static L1MuGMTRegMMConfigPhi * getRegMMConfigPhi()
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
void setPhiPacked(unsigned phi)
set packed phi-code of muon candidate