CMS 3D CMS Logo

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

Member Typedef Documentation

◆ TPhiBits

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

Definition at line 77 of file L1MuGMTPhiProjectionUnit.h.

Constructor & Destructor Documentation

◆ L1MuGMTPhiProjectionUnit()

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

constructor

Definition at line 54 of file L1MuGMTPhiProjectionUnit.cc.

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

◆ ~L1MuGMTPhiProjectionUnit()

L1MuGMTPhiProjectionUnit::~L1MuGMTPhiProjectionUnit ( )
virtual

destructor

Definition at line 60 of file L1MuGMTPhiProjectionUnit.cc.

60 { reset(); }

References reset().

Member Function Documentation

◆ id()

int L1MuGMTPhiProjectionUnit::id ( void  ) const
inline

return identifier

Definition at line 68 of file L1MuGMTPhiProjectionUnit.h.

68 { return m_id; }

References m_id.

◆ isSelected()

bool L1MuGMTPhiProjectionUnit::isSelected ( int  idx) const
inline

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

Definition at line 71 of file L1MuGMTPhiProjectionUnit.h.

71 { return m_phi_select[idx]; }

References heavyIonCSV_trainingSettings::idx, and m_phi_select.

◆ load()

void L1MuGMTPhiProjectionUnit::load ( )
private

Definition at line 140 of file L1MuGMTPhiProjectionUnit.cc.

140  {
141  // retrieve muon from MIP & ISO bit assignment unit
142  m_mu = m_MIAU.muon(m_id % 8);
143 }

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

Referenced by run().

◆ print()

void L1MuGMTPhiProjectionUnit::print ( void  ) const

print results after phi projection

Definition at line 129 of file L1MuGMTPhiProjectionUnit.cc.

129  {
130  edm::LogVerbatim("GMT_PhiProjection_info") << "Phi select bits: ";
131  for (int i = 0; i < 18; i++) {
132  edm::LogVerbatim("GMT_PhiProjection_info") << m_phi_select[i] << " ";
133  }
134  edm::LogVerbatim("GMT_PhiProjection_info") << " ";
135 }

References mps_fire::i, and m_phi_select.

◆ reset()

void L1MuGMTPhiProjectionUnit::reset ( void  )

clear phi projection unit

Definition at line 119 of file L1MuGMTPhiProjectionUnit.cc.

119  {
120  m_mu = nullptr;
121  m_iphi = 0;
122  m_fphi = 0.;
123  m_phi_select = (unsigned int)0;
124 }

References createfilelist::int, m_fphi, m_iphi, m_mu, and m_phi_select.

Referenced by ~L1MuGMTPhiProjectionUnit().

◆ run()

void L1MuGMTPhiProjectionUnit::run ( )

run phi projection unit

Definition at line 69 of file L1MuGMTPhiProjectionUnit.cc.

69  {
70  load();
71  if (m_mu && (!m_mu->empty())) {
72  int lut_id = m_id / 4;
73 
74  // obtain inputs as coded in HW
75  unsigned pt = m_mu->pt_packed();
76  unsigned charge = m_mu->charge_packed();
77  unsigned eta = m_mu->eta_packed();
78  unsigned phi = m_mu->phi_packed();
79 
80  // split phi in fine and coarse
81  unsigned phi_fine = phi & ((1 << 3) - 1); // lower 3 bits
82  unsigned phi_coarse = phi >> 3; // upper 5 bits
83 
84  // eta conversion lookup
86  unsigned eta4bit = etaconv_lut->SpecificLookup_eta_out(lut_id, eta);
87 
88  // phi projection 1 lookups
90  unsigned cphi_fine = phipro1_lut->SpecificLookup_cphi_fine(lut_id, phi_fine, eta4bit, pt, charge);
91  unsigned cphi_ofs = phipro1_lut->SpecificLookup_cphi_ofs(lut_id, phi_fine, eta4bit, pt, charge);
92 
93  // phi projection 2 lookup
95  unsigned phi_sel_bits = phipro2_lut->SpecificLookup_phi_sel(lut_id, phi_coarse, cphi_fine, cphi_ofs, charge);
96 
97  // convert to bit array
98  //
99  // see comments in L1MuGMTMIAUEtaProLUT.cc
100  //
101  m_phi_select = (unsigned)0;
102 
103  // shift by 9 bits //FIXME: fix when calo delivers the MIP bits correctly!
104  for (unsigned int i = 0; i < 9; i++)
105  if ((phi_sel_bits & (1 << i)) == (unsigned)(1 << i))
106  m_phi_select[i + 9] = true;
107 
108  for (unsigned int i = 9; i < 18; i++)
109  if ((phi_sel_bits & (1 << i)) == (unsigned)(1 << i))
110  m_phi_select[i - 9] = true;
111 
113  }
114 }

References ALCARECOTkAlJpsiMuMu_cff::charge, L1MuRegionalCand::charge_packed(), L1MuGlobalMuonTrigger::DebugBlockForFill(), L1MuRegionalCand::empty(), PVValHelper::eta, L1MuRegionalCand::eta_packed(), L1MuGMTConfig::getMIAUEtaConvLUT(), L1MuGMTConfig::getMIAUPhiPro1LUT(), L1MuGMTConfig::getMIAUPhiPro2LUT(), L1MuGMTMipIsoAU::GMT(), mps_fire::i, load(), m_id, m_MIAU, m_mu, m_phi_select, phi, L1MuRegionalCand::phi_packed(), DiDispStaMuonMonitor_cfi::pt, L1MuRegionalCand::pt_packed(), L1MuGMTDebugBlock::SetPhiSelBits(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs(), L1MuGMTMIAUEtaConvLUT::SpecificLookup_eta_out(), and L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel().

Member Data Documentation

◆ m_fphi

float L1MuGMTPhiProjectionUnit::m_fphi
private

Definition at line 87 of file L1MuGMTPhiProjectionUnit.h.

Referenced by reset().

◆ m_id

int L1MuGMTPhiProjectionUnit::m_id
private

Definition at line 82 of file L1MuGMTPhiProjectionUnit.h.

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

◆ m_iphi

int L1MuGMTPhiProjectionUnit::m_iphi
private

Definition at line 86 of file L1MuGMTPhiProjectionUnit.h.

Referenced by reset().

◆ m_MIAU

const L1MuGMTMipIsoAU& L1MuGMTPhiProjectionUnit::m_MIAU
private

Definition at line 79 of file L1MuGMTPhiProjectionUnit.h.

Referenced by load(), and run().

◆ m_mu

const L1MuRegionalCand* L1MuGMTPhiProjectionUnit::m_mu
private

Definition at line 84 of file L1MuGMTPhiProjectionUnit.h.

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

◆ m_phi_select

TPhiBits L1MuGMTPhiProjectionUnit::m_phi_select
private

Definition at line 89 of file L1MuGMTPhiProjectionUnit.h.

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

mps_fire.i
i
Definition: mps_fire.py:428
L1MuGMTConfig::getMIAUEtaConvLUT
static L1MuGMTMIAUEtaConvLUT * getMIAUEtaConvLUT()
Definition: L1MuGMTConfig.h:165
L1MuGMTPhiProjectionUnit::reset
void reset()
clear phi projection unit
Definition: L1MuGMTPhiProjectionUnit.cc:119
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
L1MuRegionalCand::phi_packed
unsigned phi_packed() const
return phi packed as in hardware
Definition: L1MuRegionalCand.h:86
L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs
unsigned SpecificLookup_cphi_ofs(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for cphi_ofs
Definition: L1MuGMTMIAUPhiPro1LUT.h:67
L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel
unsigned SpecificLookup_phi_sel(int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const
specific lookup function for phi_sel
Definition: L1MuGMTMIAUPhiPro2LUT.h:57
L1MuGMTPhiProjectionUnit::m_phi_select
TPhiBits m_phi_select
Definition: L1MuGMTPhiProjectionUnit.h:89
L1MuGlobalMuonTrigger::DebugBlockForFill
L1MuGMTDebugBlock * DebugBlockForFill() const
for debug: return the debug block (in order to fill it)
Definition: L1MuGlobalMuonTrigger.h:101
L1MuGMTPhiProjectionUnit::m_fphi
float m_fphi
Definition: L1MuGMTPhiProjectionUnit.h:87
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
L1MuGMTMipIsoAU::GMT
const L1MuGlobalMuonTrigger & GMT() const
Definition: L1MuGMTMipIsoAU.h:80
L1MuGMTPhiProjectionUnit::m_id
int m_id
Definition: L1MuGMTPhiProjectionUnit.h:82
L1MuGMTMipIsoAU::muon
const L1MuRegionalCand * muon(int idx) const
return input muon (idx: 0..3: DT/CSC, 4..7: RPC)
Definition: L1MuGMTMipIsoAU.h:72
L1MuGMTMIAUEtaConvLUT
Definition: L1MuGMTMIAUEtaConvLUT.h:38
L1MuRegionalCand::empty
virtual bool empty() const
return empty flag
Definition: L1MuRegionalCand.h:50
PVValHelper::eta
Definition: PVValidationHelpers.h:70
L1MuGMTPhiProjectionUnit::m_iphi
int m_iphi
Definition: L1MuGMTPhiProjectionUnit.h:86
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuGMTConfig::getMIAUPhiPro2LUT
static L1MuGMTMIAUPhiPro2LUT * getMIAUPhiPro2LUT()
Definition: L1MuGMTConfig.h:168
createfilelist.int
int
Definition: createfilelist.py:10
L1MuGMTDebugBlock::SetPhiSelBits
void SetPhiSelBits(int idx, unsigned phisel)
Set phi select bits for current bx.
Definition: L1MuGMTDebugBlock.h:75
DDAxes::phi
L1MuGMTPhiProjectionUnit::load
void load()
Definition: L1MuGMTPhiProjectionUnit.cc:140
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
L1MuGMTMIAUPhiPro1LUT
Definition: L1MuGMTMIAUPhiPro1LUT.h:38
L1MuGMTPhiProjectionUnit::m_mu
const L1MuRegionalCand * m_mu
Definition: L1MuGMTPhiProjectionUnit.h:84
L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine
unsigned SpecificLookup_cphi_fine(int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const
specific lookup function for cphi_fine
Definition: L1MuGMTMIAUPhiPro1LUT.h:57
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
L1MuGMTMIAUPhiPro2LUT
Definition: L1MuGMTMIAUPhiPro2LUT.h:38
L1MuGMTMIAUEtaConvLUT::SpecificLookup_eta_out
unsigned SpecificLookup_eta_out(int idx, unsigned eta_in) const
specific lookup function for eta_out
Definition: L1MuGMTMIAUEtaConvLUT.h:57
L1MuGMTConfig::getMIAUPhiPro1LUT
static L1MuGMTMIAUPhiPro1LUT * getMIAUPhiPro1LUT()
Definition: L1MuGMTConfig.h:167
L1MuRegionalCand::charge_packed
unsigned charge_packed() const
return charge packed as in hardware (0=pos, 1=neg)
Definition: L1MuRegionalCand.h:101
L1MuGMTPhiProjectionUnit::m_MIAU
const L1MuGMTMipIsoAU & m_MIAU
Definition: L1MuGMTPhiProjectionUnit.h:79