CMS 3D CMS Logo

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 49 of file L1MuGMTEtaProjectionUnit.h.

Member Typedef Documentation

◆ TEtaBits

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

Definition at line 76 of file L1MuGMTEtaProjectionUnit.h.

Constructor & Destructor Documentation

◆ L1MuGMTEtaProjectionUnit()

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

constructor

Definition at line 49 of file L1MuGMTEtaProjectionUnit.cc.

50  : m_MIAU(miau), m_id(id), m_mu(nullptr) {}

◆ ~L1MuGMTEtaProjectionUnit()

L1MuGMTEtaProjectionUnit::~L1MuGMTEtaProjectionUnit ( )
virtual

destructor

Definition at line 55 of file L1MuGMTEtaProjectionUnit.cc.

55 { reset(); }

References reset().

Member Function Documentation

◆ id()

int L1MuGMTEtaProjectionUnit::id ( void  ) const
inline

return identifier

Definition at line 67 of file L1MuGMTEtaProjectionUnit.h.

67 { return m_id; }

References m_id.

◆ isSelected()

bool L1MuGMTEtaProjectionUnit::isSelected ( int  idx) const
inline

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

Definition at line 70 of file L1MuGMTEtaProjectionUnit.h.

70 { return m_eta_select[idx]; }

References charmTagsComputerCvsB_cfi::idx, and m_eta_select.

◆ load()

void L1MuGMTEtaProjectionUnit::load ( )
private

Definition at line 128 of file L1MuGMTEtaProjectionUnit.cc.

128  {
129  // retrieve muon from MIP & ISO bit assignment unit
130  m_mu = m_MIAU.muon(m_id % 8);
131 }

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

Referenced by run().

◆ print()

void L1MuGMTEtaProjectionUnit::print ( void  ) const

print results after eta projection

Definition at line 117 of file L1MuGMTEtaProjectionUnit.cc.

117  {
118  edm::LogVerbatim("GMT_EtaProjection_info") << "Eta select bits: ";
119  for (int i = 0; i < 14; i++) {
120  edm::LogVerbatim("GMT_EtaProjection_info") << m_eta_select[i] << " ";
121  }
122  edm::LogVerbatim("GMT_EtaProjection_info");
123 }

References mps_fire::i, and m_eta_select.

◆ reset()

void L1MuGMTEtaProjectionUnit::reset ( void  )

clear eta projection unit

Definition at line 107 of file L1MuGMTEtaProjectionUnit.cc.

107  {
108  m_mu = nullptr;
109  m_ieta = 0;
110  m_feta = 0.;
111  m_eta_select = (unsigned int)0;
112 }

References createfilelist::int, m_eta_select, m_feta, m_ieta, and m_mu.

Referenced by ~L1MuGMTEtaProjectionUnit().

◆ run()

void L1MuGMTEtaProjectionUnit::run ( )

run eta projection unit

Definition at line 64 of file L1MuGMTEtaProjectionUnit.cc.

64  {
65  load();
66  if (m_mu && (!m_mu->empty())) {
67  int isFwd = m_id / 16;
68  int lut_id = m_id / 4;
69 
70  // obtain inputs as coded in HW
71  unsigned pt = m_mu->pt_packed();
72  unsigned charge = m_mu->charge_packed();
73  unsigned eta = m_mu->eta_packed();
74 
75  // lookup
77  unsigned eta_sel_bits = ep_lut->SpecificLookup_eta_sel(lut_id, eta, pt, charge);
78 
79  // convert to bit array
80  //
81  // see comments in L1MuGMTMIAUEtaProLUT.cc
82  //
83  m_eta_select = (unsigned)0;
84 
85  if (isFwd) { // forward
86  for (int i = 0; i < 5; i++)
87  if ((eta_sel_bits & (1 << i)) == (unsigned)(1 << i))
88  m_eta_select[i] = true;
89 
90  for (int i = 5; i < 10; i++)
91  if ((eta_sel_bits & (1 << i)) == (unsigned)(1 << i))
92  m_eta_select[i + 4] = true;
93  } else { // barrel
94  for (int i = 0; i < 10; i++)
95  if ((eta_sel_bits & (1 << i)) == (unsigned)(1 << i))
96  m_eta_select[i + 2] = true;
97  }
98 
99  // m_MIAU.GMT().DebugBlockForFill()->SetEtaSelBits( m_id, m_eta_select.read(0,14)) ;
101  }
102 }

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

Member Data Documentation

◆ m_eta_select

TEtaBits L1MuGMTEtaProjectionUnit::m_eta_select
private

Definition at line 88 of file L1MuGMTEtaProjectionUnit.h.

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

◆ m_feta

float L1MuGMTEtaProjectionUnit::m_feta
private

Definition at line 86 of file L1MuGMTEtaProjectionUnit.h.

Referenced by reset().

◆ m_id

int L1MuGMTEtaProjectionUnit::m_id
private

Definition at line 81 of file L1MuGMTEtaProjectionUnit.h.

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

◆ m_ieta

int L1MuGMTEtaProjectionUnit::m_ieta
private

Definition at line 85 of file L1MuGMTEtaProjectionUnit.h.

Referenced by reset().

◆ m_MIAU

const L1MuGMTMipIsoAU& L1MuGMTEtaProjectionUnit::m_MIAU
private

Definition at line 78 of file L1MuGMTEtaProjectionUnit.h.

Referenced by load(), and run().

◆ m_mu

const L1MuRegionalCand* L1MuGMTEtaProjectionUnit::m_mu
private

Definition at line 83 of file L1MuGMTEtaProjectionUnit.h.

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

L1MuGMTEtaProjectionUnit::m_eta_select
TEtaBits m_eta_select
Definition: L1MuGMTEtaProjectionUnit.h:88
mps_fire.i
i
Definition: mps_fire.py:355
L1MuGMTEtaProjectionUnit::m_mu
const L1MuRegionalCand * m_mu
Definition: L1MuGMTEtaProjectionUnit.h:83
L1MuGMTEtaProjectionUnit::m_ieta
int m_ieta
Definition: L1MuGMTEtaProjectionUnit.h:85
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
L1MuGlobalMuonTrigger::DebugBlockForFill
L1MuGMTDebugBlock * DebugBlockForFill() const
for debug: return the debug block (in order to fill it)
Definition: L1MuGlobalMuonTrigger.h:87
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
L1MuGMTConfig::getMIAUEtaProLUT
static L1MuGMTMIAUEtaProLUT * getMIAUEtaProLUT()
Definition: L1MuGMTConfig.h:166
L1MuGMTMipIsoAU::GMT
const L1MuGlobalMuonTrigger & GMT() const
Definition: L1MuGMTMipIsoAU.h:80
L1MuGMTMipIsoAU::muon
const L1MuRegionalCand * muon(int idx) const
return input muon (idx: 0..3: DT/CSC, 4..7: RPC)
Definition: L1MuGMTMipIsoAU.h:72
L1MuGMTEtaProjectionUnit::m_feta
float m_feta
Definition: L1MuGMTEtaProjectionUnit.h:86
L1MuRegionalCand::empty
virtual bool empty() const
return empty flag
Definition: L1MuRegionalCand.h:50
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1MuGMTEtaProjectionUnit::reset
void reset()
clear eta projection unit
Definition: L1MuGMTEtaProjectionUnit.cc:107
L1MuGMTEtaProjectionUnit::m_MIAU
const L1MuGMTMipIsoAU & m_MIAU
Definition: L1MuGMTEtaProjectionUnit.h:78
L1MuGMTDebugBlock::SetEtaSelBits
void SetEtaSelBits(int idx, unsigned etasel)
Set eta select bits for current bx.
Definition: L1MuGMTDebugBlock.h:78
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuGMTMIAUEtaProLUT
Definition: L1MuGMTMIAUEtaProLUT.h:38
L1MuGMTEtaProjectionUnit::load
void load()
Definition: L1MuGMTEtaProjectionUnit.cc:128
createfilelist.int
int
Definition: createfilelist.py:10
edm::LogVerbatim
Definition: MessageLogger.h:297
L1MuGMTEtaProjectionUnit::m_id
int m_id
Definition: L1MuGMTEtaProjectionUnit.h:81
L1MuRegionalCand::eta_packed
unsigned eta_packed() const
return eta packed as in hardware
Definition: L1MuRegionalCand.h:95
L1MuRegionalCand::pt_packed
unsigned pt_packed() const
return pt packed as in hardware
Definition: L1MuRegionalCand.h:89
L1MuGMTMIAUEtaProLUT::SpecificLookup_eta_sel
unsigned SpecificLookup_eta_sel(int idx, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for eta_sel
Definition: L1MuGMTMIAUEtaProLUT.h:57
L1MuRegionalCand::charge_packed
unsigned charge_packed() const
return charge packed as in hardware (0=pos, 1=neg)
Definition: L1MuRegionalCand.h:101