test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
L1MuGMTPhiProjectionUnit Class Reference

#include <L1MuGMTPhiProjectionUnit.h>

Public Member Functions

int id () const
 return identifier More...
 
bool isSelected (int idx) const
 return phi select bit (idx: 0..17) More...
 
 L1MuGMTPhiProjectionUnit (const L1MuGMTMipIsoAU &miau, int id)
 constructor More...
 
void print () const
 print results after phi projection More...
 
void reset ()
 clear phi projection unit More...
 
void run ()
 run phi projection unit More...
 
virtual ~L1MuGMTPhiProjectionUnit ()
 destructor More...
 

Private Types

typedef std::bitset< 18 > TPhiBits
 

Private Member Functions

void load ()
 

Private Attributes

float m_fphi
 
int m_id
 
int m_iphi
 
const L1MuGMTMipIsoAUm_MIAU
 
const L1MuRegionalCandm_mu
 
TPhiBits m_phi_select
 

Detailed Description

L1 Global Muon Trigger Phi projection unit.

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 53 of file L1MuGMTPhiProjectionUnit.h.

Member Typedef Documentation

typedef std::bitset<18> L1MuGMTPhiProjectionUnit::TPhiBits
private

Definition at line 83 of file L1MuGMTPhiProjectionUnit.h.

Constructor & Destructor Documentation

L1MuGMTPhiProjectionUnit::L1MuGMTPhiProjectionUnit ( const L1MuGMTMipIsoAU miau,
int  id 
)

constructor

Definition at line 54 of file L1MuGMTPhiProjectionUnit.cc.

54  :
55  m_MIAU(miau), m_id(id), m_mu(0) {
56 }
const L1MuGMTMipIsoAU & m_MIAU
const L1MuRegionalCand * m_mu
L1MuGMTPhiProjectionUnit::~L1MuGMTPhiProjectionUnit ( )
virtual

destructor

Definition at line 61 of file L1MuGMTPhiProjectionUnit.cc.

References reset().

61  {
62 
63  reset();
64 
65 }
void reset()
clear phi projection unit

Member Function Documentation

int L1MuGMTPhiProjectionUnit::id ( void  ) const
inline

return identifier

Definition at line 73 of file L1MuGMTPhiProjectionUnit.h.

References m_id.

bool L1MuGMTPhiProjectionUnit::isSelected ( int  idx) const
inline

return phi select bit (idx: 0..17)

Definition at line 76 of file L1MuGMTPhiProjectionUnit.h.

References customizeTrackingMonitorSeedNumber::idx, and m_phi_select.

76 { return m_phi_select[idx]; }
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void L1MuGMTPhiProjectionUnit::load ( )
private

Definition at line 151 of file L1MuGMTPhiProjectionUnit.cc.

References m_id, m_MIAU, m_mu, and L1MuGMTMipIsoAU::muon().

Referenced by run().

151  {
152 
153  // retrieve muon from MIP & ISO bit assignment unit
154  m_mu = m_MIAU.muon( m_id % 8 );
155 }
const L1MuGMTMipIsoAU & m_MIAU
const L1MuRegionalCand * m_mu
const L1MuRegionalCand * muon(int idx) const
return input muon (idx: 0..3: DT/CSC, 4..7: RPC)
void L1MuGMTPhiProjectionUnit::print ( void  ) const

print results after phi projection

Definition at line 138 of file L1MuGMTPhiProjectionUnit.cc.

References i, and m_phi_select.

138  {
139 
140  edm::LogVerbatim("GMT_PhiProjection_info") << "Phi select bits: ";
141  for ( int i=0; i<18; i++ ) {
142  edm::LogVerbatim("GMT_PhiProjection_info") << m_phi_select[i] << " ";
143  }
144  edm::LogVerbatim("GMT_PhiProjection_info") << " ";
145 }
int i
Definition: DBlmapReader.cc:9
void L1MuGMTPhiProjectionUnit::reset ( void  )

clear phi projection unit

Definition at line 126 of file L1MuGMTPhiProjectionUnit.cc.

References m_fphi, m_iphi, m_mu, and m_phi_select.

Referenced by ~L1MuGMTPhiProjectionUnit().

126  {
127 
128  m_mu = 0;
129  m_iphi = 0;
130  m_fphi = 0.;
131  m_phi_select = (unsigned int) 0;
132 }
const L1MuRegionalCand * m_mu
void L1MuGMTPhiProjectionUnit::run ( void  )

run phi projection unit

Definition at line 74 of file L1MuGMTPhiProjectionUnit.cc.

References RecoTauCleanerPlugins::charge, 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(), EnergyCorrector::pt, L1MuRegionalCand::pt_packed(), L1MuGMTDebugBlock::SetPhiSelBits(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs(), L1MuGMTMIAUEtaConvLUT::SpecificLookup_eta_out(), and L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel().

74  {
75 
76  load();
77  if (m_mu && ( !m_mu->empty() ) ) {
78  int lut_id = m_id / 4;
79 
80  // obtain inputs as coded in HW
81  unsigned pt = m_mu->pt_packed();
82  unsigned charge = m_mu->charge_packed();
83  unsigned eta = m_mu->eta_packed();
84  unsigned phi = m_mu->phi_packed();
85 
86  // split phi in fine and coarse
87  unsigned phi_fine = phi & ( (1<<3) - 1 ); // lower 3 bits
88  unsigned phi_coarse = phi >> 3; // upper 5 bits
89 
90  // eta conversion lookup
92  unsigned eta4bit = etaconv_lut->SpecificLookup_eta_out (lut_id, eta);
93 
94  // phi projection 1 lookups
96  unsigned cphi_fine = phipro1_lut->SpecificLookup_cphi_fine (lut_id, phi_fine, eta4bit, pt, charge);
97  unsigned cphi_ofs = phipro1_lut->SpecificLookup_cphi_ofs (lut_id, phi_fine, eta4bit, pt, charge);
98 
99  // phi projection 2 lookup
101  unsigned phi_sel_bits = phipro2_lut->SpecificLookup_phi_sel (lut_id, phi_coarse, cphi_fine, cphi_ofs, charge);
102 
103  // convert to bit array
104  //
105  // see comments in L1MuGMTMIAUEtaProLUT.cc
106  //
107  m_phi_select = (unsigned) 0;
108 
109  // shift by 9 bits //FIXME: fix when calo delivers the MIP bits correctly!
110  for (unsigned int i=0; i<9; i++)
111  if ( (phi_sel_bits & (1 << i)) == (unsigned) (1<<i))
112  m_phi_select[i+9] = 1;
113 
114  for (unsigned int i=9; i<18; i++)
115  if ( (phi_sel_bits & (1 << i)) == (unsigned) (1<<i))
116  m_phi_select[i-9] = 1;
117 
119  }
120 }
int i
Definition: DBlmapReader.cc:9
static L1MuGMTMIAUPhiPro2LUT * getMIAUPhiPro2LUT()
virtual bool empty() const
return empty flag
unsigned charge_packed() const
return charge packed as in hardware (0=pos, 1=neg)
static L1MuGMTMIAUEtaConvLUT * getMIAUEtaConvLUT()
const L1MuGlobalMuonTrigger & GMT() const
unsigned SpecificLookup_cphi_fine(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for cphi_fine
unsigned eta_packed() const
return eta packed as in hardware
unsigned SpecificLookup_phi_sel(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
specific lookup function for phi_sel
unsigned SpecificLookup_cphi_ofs(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for cphi_ofs
const L1MuGMTMipIsoAU & m_MIAU
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
void SetPhiSelBits(int idx, unsigned phisel)
Set phi select bits for current bx.
static L1MuGMTMIAUPhiPro1LUT * getMIAUPhiPro1LUT()
unsigned pt_packed() const
return pt packed as in hardware
const L1MuRegionalCand * m_mu
L1MuGMTDebugBlock * DebugBlockForFill() const
for debug: return the debug block (in order to fill it)
unsigned phi_packed() const
return phi packed as in hardware

Member Data Documentation

float L1MuGMTPhiProjectionUnit::m_fphi
private

Definition at line 93 of file L1MuGMTPhiProjectionUnit.h.

Referenced by reset().

int L1MuGMTPhiProjectionUnit::m_id
private

Definition at line 88 of file L1MuGMTPhiProjectionUnit.h.

Referenced by id(), load(), and run().

int L1MuGMTPhiProjectionUnit::m_iphi
private

Definition at line 92 of file L1MuGMTPhiProjectionUnit.h.

Referenced by reset().

const L1MuGMTMipIsoAU& L1MuGMTPhiProjectionUnit::m_MIAU
private

Definition at line 85 of file L1MuGMTPhiProjectionUnit.h.

Referenced by load(), and run().

const L1MuRegionalCand* L1MuGMTPhiProjectionUnit::m_mu
private

Definition at line 90 of file L1MuGMTPhiProjectionUnit.h.

Referenced by load(), reset(), and run().

TPhiBits L1MuGMTPhiProjectionUnit::m_phi_select
private

Definition at line 95 of file L1MuGMTPhiProjectionUnit.h.

Referenced by isSelected(), print(), reset(), and run().