CMS 3D CMS Logo

L1MuGMTEtaProjectionUnit.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTEtaProjectionUnit
4 //
5 // Description: GMT Eta Projection Unit
6 //
7 //
8 //
9 // Author :
10 // H. Sakulin CERN EP
11 //
12 // Migrated to CMSSW:
13 // I. Mikulec
14 //
15 //--------------------------------------------------
16 
17 //-----------------------
18 // This Class's Header --
19 //-----------------------
20 
22 //---------------
23 // C++ Headers --
24 //---------------
25 
26 #include <iostream>
27 #include <vector>
28 #include <cmath>
29 
30 //-------------------------------
31 // Collaborating Class Headers --
32 //-------------------------------
33 
39 
41 
42 // --------------------------------
43 // class L1MuGMTEtaProjectionUnit
44 //---------------------------------
45 
46 //----------------
47 // Constructors --
48 //----------------
50  : m_MIAU(miau), m_id(id), m_mu(nullptr) {}
51 
52 //--------------
53 // Destructor --
54 //--------------
56 
57 //--------------
58 // Operations --
59 //--------------
60 
61 //
62 // run eta projection unit
63 //
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 }
103 
104 //
105 // reset eta projection unit
106 //
108  m_mu = nullptr;
109  m_ieta = 0;
110  m_feta = 0.;
111  m_eta_select = (unsigned int)0;
112 }
113 
114 //
115 // print results of eta projection
116 //
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 }
124 
125 //
126 // load 1 muon into eta projection unit
127 //
129  // retrieve muon from MIP & ISO bit assignment unit
130  m_mu = m_MIAU.muon(m_id % 8);
131 }
L1MuGMTEtaProjectionUnit::m_eta_select
TEtaBits m_eta_select
Definition: L1MuGMTEtaProjectionUnit.h:88
mps_fire.i
i
Definition: mps_fire.py:355
MessageLogger.h
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
L1MuGMTConfig::getMIAUEtaProLUT
static L1MuGMTMIAUEtaProLUT * getMIAUEtaProLUT()
Definition: L1MuGMTConfig.h:166
L1MuGMTMipIsoAU::GMT
const L1MuGlobalMuonTrigger & GMT() const
Definition: L1MuGMTMipIsoAU.h:80
L1MuGMTMipIsoAU
Definition: L1MuGMTMipIsoAU.h:51
L1MuGMTMipIsoAU::muon
const L1MuRegionalCand * muon(int idx) const
return input muon (idx: 0..3: DT/CSC, 4..7: RPC)
Definition: L1MuGMTMipIsoAU.h:72
L1MuGMTMipIsoAU.h
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
L1MuGMTConfig.h
L1MuGMTDebugBlock::SetEtaSelBits
void SetEtaSelBits(int idx, unsigned etasel)
Set eta select bits for current bx.
Definition: L1MuGMTDebugBlock.h:78
L1MuGMTEtaProjectionUnit::print
void print() const
print results after eta projection
Definition: L1MuGMTEtaProjectionUnit.cc:117
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
L1MuGMTMIAUEtaProLUT
Definition: L1MuGMTMIAUEtaProLUT.h:38
L1MuGMTEtaProjectionUnit::run
void run()
run eta projection unit
Definition: L1MuGMTEtaProjectionUnit.cc:64
L1MuGMTEtaProjectionUnit::load
void load()
Definition: L1MuGMTEtaProjectionUnit.cc:128
L1MuGMTEtaProjectionUnit::L1MuGMTEtaProjectionUnit
L1MuGMTEtaProjectionUnit(const L1MuGMTMipIsoAU &miau, int id)
constructor
Definition: L1MuGMTEtaProjectionUnit.cc:49
L1MuGMTMIAUEtaProLUT.h
createfilelist.int
int
Definition: createfilelist.py:10
edm::LogVerbatim
Definition: MessageLogger.h:297
L1MuGMTDebugBlock.h
L1MuGMTEtaProjectionUnit::m_id
int m_id
Definition: L1MuGMTEtaProjectionUnit.h:81
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
L1MuGMTEtaProjectionUnit.h
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
L1MuGlobalMuonTrigger.h
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
L1MuGMTEtaProjectionUnit::~L1MuGMTEtaProjectionUnit
virtual ~L1MuGMTEtaProjectionUnit()
destructor
Definition: L1MuGMTEtaProjectionUnit.cc:55
L1MuRegionalCand::charge_packed
unsigned charge_packed() const
return charge packed as in hardware (0=pos, 1=neg)
Definition: L1MuRegionalCand.h:101