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
L1MuGMTEtaProjectionUnit Class Reference

#include <L1MuGMTEtaProjectionUnit.h>

Public Member Functions

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

Private Types

typedef std::bitset< 14 > TEtaBits
 

Private Member Functions

void load ()
 

Private Attributes

TEtaBits m_eta_select
 
float m_feta
 
int m_id
 
int m_ieta
 
const L1MuGMTMipIsoAUm_MIAU
 
const L1MuRegionalCandm_mu
 

Detailed Description

L1 Global Muon Trigger Eta projection unit.

Projects a muon from the muon system to the calorimeter or vertex and selects one or more calorimeter regions in eta to be checked for MIP and Isolation.

Definition at line 52 of file L1MuGMTEtaProjectionUnit.h.

Member Typedef Documentation

typedef std::bitset<14> L1MuGMTEtaProjectionUnit::TEtaBits
private

Definition at line 82 of file L1MuGMTEtaProjectionUnit.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 50 of file L1MuGMTEtaProjectionUnit.cc.

50  :
51  m_MIAU(miau), m_id(id), m_mu(0) {
52 
53 }
const L1MuGMTMipIsoAU & m_MIAU
const L1MuRegionalCand * m_mu
L1MuGMTEtaProjectionUnit::~L1MuGMTEtaProjectionUnit ( )
virtual

destructor

Definition at line 58 of file L1MuGMTEtaProjectionUnit.cc.

References reset().

58  {
59 
60  reset();
61 
62 }
void reset()
clear eta projection unit

Member Function Documentation

int L1MuGMTEtaProjectionUnit::id ( void  ) const
inline

return identifier

Definition at line 72 of file L1MuGMTEtaProjectionUnit.h.

References m_id.

bool L1MuGMTEtaProjectionUnit::isSelected ( int  idx) const
inline

return eta select bit (idx: 0..13)

Definition at line 75 of file L1MuGMTEtaProjectionUnit.h.

References customizeTrackingMonitorSeedNumber::idx, and m_eta_select.

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

Definition at line 142 of file L1MuGMTEtaProjectionUnit.cc.

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

Referenced by run().

142  {
143 
144  // retrieve muon from MIP & ISO bit assignment unit
145  m_mu = m_MIAU.muon( m_id % 8 );
146 }
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 L1MuGMTEtaProjectionUnit::print ( void  ) const

print results after eta projection

Definition at line 129 of file L1MuGMTEtaProjectionUnit.cc.

References i, and m_eta_select.

129  {
130 
131  edm::LogVerbatim("GMT_EtaProjection_info") << "Eta select bits: ";
132  for ( int i=0; i<14; i++ ) {
133  edm::LogVerbatim("GMT_EtaProjection_info") << m_eta_select[i] << " ";
134  }
135  edm::LogVerbatim("GMT_EtaProjection_info");
136 }
int i
Definition: DBlmapReader.cc:9
void L1MuGMTEtaProjectionUnit::reset ( void  )

clear eta projection unit

Definition at line 117 of file L1MuGMTEtaProjectionUnit.cc.

References m_eta_select, m_feta, m_ieta, and m_mu.

Referenced by ~L1MuGMTEtaProjectionUnit().

117  {
118 
119  m_mu = 0;
120  m_ieta = 0;
121  m_feta = 0.;
122  m_eta_select = (unsigned int) 0;
123 }
const L1MuRegionalCand * m_mu
void L1MuGMTEtaProjectionUnit::run ( void  )

run eta projection unit

Definition at line 71 of file L1MuGMTEtaProjectionUnit.cc.

References DeDxDiscriminatorTools::charge(), L1MuRegionalCand::charge_packed(), L1MuGlobalMuonTrigger::DebugBlockForFill(), L1MuRegionalCand::empty(), eta(), L1MuRegionalCand::eta_packed(), L1MuGMTConfig::getMIAUEtaProLUT(), L1MuGMTMipIsoAU::GMT(), i, load(), m_eta_select, m_id, m_MIAU, m_mu, RecoTauCleanerPlugins::pt, L1MuRegionalCand::pt_packed(), L1MuGMTDebugBlock::SetEtaSelBits(), and L1MuGMTMIAUEtaProLUT::SpecificLookup_eta_sel().

71  {
72 
73  load();
74  if ( m_mu && ( !m_mu->empty() ) ) {
75 
76  int isFwd = m_id / 16;
77  int lut_id = m_id / 4;
78 
79  // obtain inputs as coded in HW
80  unsigned pt = m_mu->pt_packed();
81  unsigned charge = m_mu->charge_packed();
82  unsigned eta = m_mu->eta_packed();
83 
84  // lookup
86  unsigned eta_sel_bits = ep_lut->SpecificLookup_eta_sel (lut_id, eta, pt, charge);
87 
88  // convert to bit array
89  //
90  // see comments in L1MuGMTMIAUEtaProLUT.cc
91  //
92  m_eta_select = (unsigned) 0;
93 
94  if (isFwd) { // forward
95  for (int i=0; i<5; i++)
96  if ( (eta_sel_bits & (1 << i)) == (unsigned) (1<<i))
97  m_eta_select[i] = 1;
98 
99  for (int i=5; i<10; i++)
100  if ( (eta_sel_bits & (1 << i)) == (unsigned) (1<<i))
101  m_eta_select[i+4] = 1;
102  } else { // barrel
103  for (int i=0; i<10; i++)
104  if ( (eta_sel_bits & (1 << i)) == (unsigned) (1<<i))
105  m_eta_select[i+2] = 1;
106  }
107 
108  // m_MIAU.GMT().DebugBlockForFill()->SetEtaSelBits( m_id, m_eta_select.read(0,14)) ;
110  }
111 }
int i
Definition: DBlmapReader.cc:9
const L1MuGMTMipIsoAU & m_MIAU
virtual bool empty() const
return empty flag
unsigned charge_packed() const
return charge packed as in hardware (0=pos, 1=neg)
unsigned SpecificLookup_eta_sel(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for eta_sel
T eta() const
double charge(const std::vector< uint8_t > &Ampls)
const L1MuGlobalMuonTrigger & GMT() const
const L1MuRegionalCand * m_mu
unsigned eta_packed() const
return eta packed as in hardware
void SetEtaSelBits(int idx, unsigned etasel)
Set eta select bits for current bx.
unsigned pt_packed() const
return pt packed as in hardware
static L1MuGMTMIAUEtaProLUT * getMIAUEtaProLUT()
L1MuGMTDebugBlock * DebugBlockForFill() const
for debug: return the debug block (in order to fill it)

Member Data Documentation

TEtaBits L1MuGMTEtaProjectionUnit::m_eta_select
private

Definition at line 94 of file L1MuGMTEtaProjectionUnit.h.

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

float L1MuGMTEtaProjectionUnit::m_feta
private

Definition at line 92 of file L1MuGMTEtaProjectionUnit.h.

Referenced by reset().

int L1MuGMTEtaProjectionUnit::m_id
private

Definition at line 87 of file L1MuGMTEtaProjectionUnit.h.

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

int L1MuGMTEtaProjectionUnit::m_ieta
private

Definition at line 91 of file L1MuGMTEtaProjectionUnit.h.

Referenced by reset().

const L1MuGMTMipIsoAU& L1MuGMTEtaProjectionUnit::m_MIAU
private

Definition at line 84 of file L1MuGMTEtaProjectionUnit.h.

Referenced by load(), and run().

const L1MuRegionalCand* L1MuGMTEtaProjectionUnit::m_mu
private

Definition at line 89 of file L1MuGMTEtaProjectionUnit.h.

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