#include <L1Trigger/GlobalMuonTrigger/src/L1MuGMTPhiProjectionUnit.h>
Public Member Functions | |
int | id () const |
return identifier | |
bool | isSelected (int idx) const |
return phi select bit (idx: 0..17) | |
L1MuGMTPhiProjectionUnit (const L1MuGMTMipIsoAU &miau, int id) | |
constructor | |
void | print () const |
print results after phi projection | |
void | reset () |
clear phi projection unit | |
void | run () |
run phi projection unit | |
virtual | ~L1MuGMTPhiProjectionUnit () |
destructor | |
Private Types | |
typedef std::bitset< 18 > | TPhiBits |
Private Member Functions | |
void | load () |
Private Attributes | |
float | m_fphi |
int | m_id |
int | m_iphi |
const L1MuGMTMipIsoAU & | m_MIAU |
const L1MuRegionalCand * | m_mu |
TPhiBits | m_phi_select |
Projects a muon from the muon system to the calorimeter or vertex and selects one or more calorimeter regions in phi to be checked for MIP and Isolation.
Definition at line 55 of file L1MuGMTPhiProjectionUnit.h.
typedef std::bitset<18> L1MuGMTPhiProjectionUnit::TPhiBits [private] |
Definition at line 85 of file L1MuGMTPhiProjectionUnit.h.
L1MuGMTPhiProjectionUnit::L1MuGMTPhiProjectionUnit | ( | const L1MuGMTMipIsoAU & | miau, | |
int | id | |||
) |
L1MuGMTPhiProjectionUnit::~L1MuGMTPhiProjectionUnit | ( | ) | [virtual] |
destructor
Definition at line 63 of file L1MuGMTPhiProjectionUnit.cc.
References reset().
00063 { 00064 00065 reset(); 00066 00067 }
return identifier
Definition at line 75 of file L1MuGMTPhiProjectionUnit.h.
References m_id.
00075 { return m_id; }
return phi select bit (idx: 0..17)
Definition at line 78 of file L1MuGMTPhiProjectionUnit.h.
References m_phi_select.
00078 { return m_phi_select[idx]; }
print results after phi projection
Definition at line 140 of file L1MuGMTPhiProjectionUnit.cc.
References i, and m_phi_select.
00140 { 00141 00142 edm::LogVerbatim("GMT_PhiProjection_info") << "Phi select bits: "; 00143 for ( int i=0; i<18; i++ ) { 00144 edm::LogVerbatim("GMT_PhiProjection_info") << m_phi_select[i] << " "; 00145 } 00146 edm::LogVerbatim("GMT_PhiProjection_info") << " "; 00147 }
clear phi projection unit
Definition at line 128 of file L1MuGMTPhiProjectionUnit.cc.
References int, m_fphi, m_iphi, m_mu, and m_phi_select.
Referenced by ~L1MuGMTPhiProjectionUnit().
00128 { 00129 00130 m_mu = 0; 00131 m_iphi = 0; 00132 m_fphi = 0.; 00133 m_phi_select = (unsigned int) 0; 00134 }
run phi projection unit
Definition at line 76 of file L1MuGMTPhiProjectionUnit.cc.
References L1MuRegionalCand::charge_packed(), L1MuGlobalMuonTrigger::DebugBlockForFill(), L1MuRegionalCand::empty(), eta, L1MuRegionalCand::eta_packed(), L1MuGMTConfig::getMIAUEtaConvLUT(), L1MuGMTConfig::getMIAUPhiPro1LUT(), L1MuGMTConfig::getMIAUPhiPro2LUT(), L1MuGMTMipIsoAU::GMT(), i, load(), m_id, m_MIAU, m_mu, m_phi_select, phi, L1MuRegionalCand::phi_packed(), L1MuRegionalCand::pt_packed(), L1MuGMTDebugBlock::SetPhiSelBits(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs(), L1MuGMTMIAUEtaConvLUT::SpecificLookup_eta_out(), and L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel().
00076 { 00077 00078 load(); 00079 if (m_mu && ( !m_mu->empty() ) ) { 00080 int lut_id = m_id / 4; 00081 00082 // obtain inputs as coded in HW 00083 unsigned pt = m_mu->pt_packed(); 00084 unsigned charge = m_mu->charge_packed(); 00085 unsigned eta = m_mu->eta_packed(); 00086 unsigned phi = m_mu->phi_packed(); 00087 00088 // split phi in fine and coarse 00089 unsigned phi_fine = phi & ( (1<<3) - 1 ); // lower 3 bits 00090 unsigned phi_coarse = phi >> 3; // upper 5 bits 00091 00092 // eta conversion lookup 00093 L1MuGMTMIAUEtaConvLUT* etaconv_lut = L1MuGMTConfig::getMIAUEtaConvLUT(); 00094 unsigned eta4bit = etaconv_lut->SpecificLookup_eta_out (lut_id, eta); 00095 00096 // phi projection 1 lookups 00097 L1MuGMTMIAUPhiPro1LUT* phipro1_lut = L1MuGMTConfig::getMIAUPhiPro1LUT(); 00098 unsigned cphi_fine = phipro1_lut->SpecificLookup_cphi_fine (lut_id, phi_fine, eta4bit, pt, charge); 00099 unsigned cphi_ofs = phipro1_lut->SpecificLookup_cphi_ofs (lut_id, phi_fine, eta4bit, pt, charge); 00100 00101 // phi projection 2 lookup 00102 L1MuGMTMIAUPhiPro2LUT* phipro2_lut = L1MuGMTConfig::getMIAUPhiPro2LUT(); 00103 unsigned phi_sel_bits = phipro2_lut->SpecificLookup_phi_sel (lut_id, phi_coarse, cphi_fine, cphi_ofs, charge); 00104 00105 // convert to bit array 00106 // 00107 // see comments in L1MuGMTMIAUEtaProLUT.cc 00108 // 00109 m_phi_select = (unsigned) 0; 00110 00111 // shift by 9 bits //FIXME: fix when calo delivers the MIP bits correctly! 00112 for (unsigned int i=0; i<9; i++) 00113 if ( (phi_sel_bits & (1 << i)) == (unsigned) (1<<i)) 00114 m_phi_select[i+9] = 1; 00115 00116 for (unsigned int i=9; i<18; i++) 00117 if ( (phi_sel_bits & (1 << i)) == (unsigned) (1<<i)) 00118 m_phi_select[i-9] = 1; 00119 00120 m_MIAU.GMT().DebugBlockForFill()->SetPhiSelBits( m_id, m_phi_select.to_ulong()) ; 00121 } 00122 }
float L1MuGMTPhiProjectionUnit::m_fphi [private] |
int L1MuGMTPhiProjectionUnit::m_id [private] |
int L1MuGMTPhiProjectionUnit::m_iphi [private] |
const L1MuGMTMipIsoAU& L1MuGMTPhiProjectionUnit::m_MIAU [private] |
const L1MuRegionalCand* L1MuGMTPhiProjectionUnit::m_mu [private] |
Definition at line 97 of file L1MuGMTPhiProjectionUnit.h.
Referenced by isSelected(), print(), reset(), and run().