CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions
L1MuGMTSortRankUnit Class Reference

#include <L1MuGMTSortRankUnit.h>

Public Member Functions

 L1MuGMTSortRankUnit ()
 constructor More...
 
virtual ~L1MuGMTSortRankUnit ()
 destructor More...
 

Static Public Member Functions

static unsigned getVeryLowQualityLevel (const L1MuRegionalCand *)
 Very low quality bits. More...
 
static bool isDisabled (const L1MuRegionalCand *)
 Diable bit. More...
 
static unsigned sort_rank (const L1MuRegionalCand *)
 Sort Rank Table. More...
 

Detailed Description

L1 Global Muon Trigger Sort Rank Unit.

Return sort rank based on look-up-tables.

Definition at line 43 of file L1MuGMTSortRankUnit.h.

Constructor & Destructor Documentation

L1MuGMTSortRankUnit::L1MuGMTSortRankUnit ( )

constructor

virtual L1MuGMTSortRankUnit::~L1MuGMTSortRankUnit ( )
virtual

destructor

Member Function Documentation

unsigned L1MuGMTSortRankUnit::getVeryLowQualityLevel ( const L1MuRegionalCand muon)
static

Very low quality bits.

Definition at line 73 of file L1MuGMTSortRankUnit.cc.

References L1MuRegionalCand::empty(), stringResolutionProvider_cfi::eta, L1MuRegionalCand::eta_packed(), L1MuGMTConfig::getLFSortRankEtaQLUT(), lumiQueryAPI::q, L1MuRegionalCand::quality_packed(), L1MuGMTLFSortRankEtaQLUT::SpecificLookup_vlq(), and L1MuRegionalCand::type_idx().

Referenced by L1MuGMTMerger::createDTCSCCand(), and L1MuGMTMerger::createRPCCand().

73  {
74 
75  if ( muon == 0 || muon->empty() ) return 0;
76 
77  unsigned lut_idx= muon->type_idx();
78 
79  // obtain inputs as coded in HW
80  unsigned eta = muon->eta_packed();
81  unsigned q = muon->quality_packed();
82 
83  // lookup eta-q
85  return etaq_lut->SpecificLookup_vlq (lut_idx, eta, q);
86 }
virtual bool empty() const
return empty flag
unsigned eta_packed() const
return eta packed as in hardware
unsigned SpecificLookup_vlq(int idx, unsigned eta, unsigned q) const
specific lookup function for vlq
static L1MuGMTLFSortRankEtaQLUT * getLFSortRankEtaQLUT()
unsigned int quality_packed() const
return quality packed as in hardware
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
bool L1MuGMTSortRankUnit::isDisabled ( const L1MuRegionalCand muon)
static

Diable bit.

Definition at line 88 of file L1MuGMTSortRankUnit.cc.

References L1MuRegionalCand::empty(), stringResolutionProvider_cfi::eta, L1MuRegionalCand::eta_packed(), L1MuGMTConfig::getLFSortRankEtaPhiLUT(), phi, L1MuRegionalCand::phi_packed(), L1MuGMTLFSortRankEtaPhiLUT::SpecificLookup_rank_etaphi(), and L1MuRegionalCand::type_idx().

Referenced by L1MuGMTMatcher::lookup_mq(), and L1MuGMTMerger::merge().

88  {
89 
90  if ( muon == 0 || muon->empty() ) return 1;
91 
92  unsigned lut_idx= muon->type_idx();
93 
94  // obtain inputs as coded in HW
95  unsigned eta = muon->eta_packed();
96  unsigned phi = muon->phi_packed();
97 
98  // lookup eta-q
100 
101  return etaphi_lut->SpecificLookup_rank_etaphi (lut_idx, eta, phi) == 3;
102 }
static L1MuGMTLFSortRankEtaPhiLUT * getLFSortRankEtaPhiLUT()
unsigned SpecificLookup_rank_etaphi(int idx, unsigned eta, unsigned phi) const
specific lookup function for rank_etaphi
virtual bool empty() const
return empty flag
unsigned eta_packed() const
return eta packed as in hardware
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
unsigned phi_packed() const
return phi packed as in hardware
unsigned L1MuGMTSortRankUnit::sort_rank ( const L1MuRegionalCand muon)
static

Sort Rank Table.

Definition at line 42 of file L1MuGMTSortRankUnit.cc.

References L1MuRegionalCand::empty(), stringResolutionProvider_cfi::eta, L1MuRegionalCand::eta_packed(), L1MuGMTConfig::getLFSortRankCombineLUT(), L1MuGMTConfig::getLFSortRankEtaPhiLUT(), L1MuGMTConfig::getLFSortRankEtaQLUT(), L1MuGMTConfig::getLFSortRankPtQLUT(), phi, L1MuRegionalCand::phi_packed(), EnergyCorrector::pt, L1MuRegionalCand::pt_packed(), lumiQueryAPI::q, L1MuRegionalCand::quality_packed(), L1MuGMTLFSortRankEtaPhiLUT::SpecificLookup_rank_etaphi(), L1MuGMTLFSortRankEtaQLUT::SpecificLookup_rank_etaq(), L1MuGMTLFSortRankPtQLUT::SpecificLookup_rank_ptq(), L1MuGMTLFSortRankCombineLUT::SpecificLookup_sort_rank(), and L1MuRegionalCand::type_idx().

Referenced by L1MuGMTMerger::createDTCSCCand(), L1MuGMTMerger::createMergedCand(), and L1MuGMTMerger::createRPCCand().

42  {
43 
44  if ( muon == 0 || muon->empty() ) return 0;
45 
46  unsigned lut_idx= muon->type_idx();
47 
48  // obtain inputs as coded in HW
49  unsigned eta = muon->eta_packed();
50  unsigned q = muon->quality_packed();
51  unsigned pt = muon->pt_packed();
52  unsigned phi = muon->phi_packed();
53 
54  // lookup eta-q
56  unsigned rank_etaq = etaq_lut->SpecificLookup_rank_etaq (lut_idx, eta, q);
57 
58  // lookup pt-q
60  unsigned rank_ptq = ptq_lut->SpecificLookup_rank_ptq (lut_idx, q, pt);
61 
62  // lookup etaphi
64  unsigned rank_etaphi = etaphi_lut->SpecificLookup_rank_etaphi (lut_idx, eta, phi);
65 
66  // combine
68  unsigned rank = combine_lut->SpecificLookup_sort_rank (lut_idx, rank_etaq, rank_ptq, rank_etaphi);
69 
70  return rank;
71 }
unsigned SpecificLookup_rank_ptq(int idx, unsigned q, unsigned pt) const
specific lookup function for rank_ptq
static L1MuGMTLFSortRankEtaPhiLUT * getLFSortRankEtaPhiLUT()
unsigned SpecificLookup_rank_etaphi(int idx, unsigned eta, unsigned phi) const
specific lookup function for rank_etaphi
virtual bool empty() const
return empty flag
unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const
specific lookup function for rank_etaq
static L1MuGMTLFSortRankCombineLUT * getLFSortRankCombineLUT()
static L1MuGMTLFSortRankPtQLUT * getLFSortRankPtQLUT()
unsigned eta_packed() const
return eta packed as in hardware
static L1MuGMTLFSortRankEtaQLUT * getLFSortRankEtaQLUT()
unsigned SpecificLookup_sort_rank(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for sort_rank
unsigned int quality_packed() const
return quality packed as in hardware
unsigned pt_packed() const
return pt packed as in hardware
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
unsigned phi_packed() const
return phi packed as in hardware