CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1MuGMTMipIsoAU Class Reference

#include <L1MuGMTMipIsoAU.h>

Public Member Functions

const L1MuGlobalMuonTriggerGMT () const
 
int id () const
 return identifier (0: barrel, 1: endcap) More...
 
bool ISO (int idx) const
 return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC) More...
 
 L1MuGMTMipIsoAU (const L1MuGlobalMuonTrigger &gmt, int id)
 constructor More...
 
bool MIP (int idx) const
 return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC) More...
 
const L1MuRegionalCandmuon (int idx) const
 return input muon (idx: 0..3: DT/CSC, 4..7: RPC) More...
 
void print () const
 print results after MIP & ISO bit assignment More...
 
void reset ()
 clear MIP & ISO bit assignment unit More...
 
void run ()
 run GMT MIP & ISO bit assignment unit More...
 
virtual ~L1MuGMTMipIsoAU ()
 destructor More...
 

Private Member Functions

void assignISO ()
 
void assignMIP ()
 
void load ()
 

Private Attributes

const L1MuGlobalMuonTriggerm_gmt
 
int m_id
 
std::vector< bool > m_ISO
 
std::vector< L1MuGMTEtaProjectionUnit * > m_ISO_EPUs
 
std::vector< L1MuGMTPhiProjectionUnit * > m_ISO_PPUs
 
std::vector< bool > m_MIP
 
std::vector< L1MuGMTEtaProjectionUnit * > m_MIP_EPUs
 
std::vector< L1MuGMTPhiProjectionUnit * > m_MIP_PPUs
 
std::vector< const L1MuRegionalCand * > m_muons
 

Detailed Description

L1 Global Muon Trigger MIP and ISO bit Assignment Unit.

It projects muons form the muon system to the calorimeter or vertex in order to assign a MIP (minimum ionizing particle) and an ISO (isolation) bit to each muon candidate.

there is 1 barrel MIP & ISO bit Assignment unit and 1 endcap MIP & ISO bit Assignment unit

Definition at line 51 of file L1MuGMTMipIsoAU.h.

Constructor & Destructor Documentation

L1MuGMTMipIsoAU::L1MuGMTMipIsoAU ( const L1MuGlobalMuonTrigger gmt,
int  id 
)

constructor

Definition at line 53 of file L1MuGMTMipIsoAU.cc.

References mps_fire::i, m_id, m_ISO, m_ISO_EPUs, m_ISO_PPUs, m_MIP, m_MIP_EPUs, m_MIP_PPUs, and m_muons.

54  : m_gmt(gmt), m_id(id), m_muons(8), m_MIP(8), m_ISO(8), m_MIP_PPUs(8), m_MIP_EPUs(8), m_ISO_PPUs(8), m_ISO_EPUs(8) {
55  m_muons.reserve(8);
56  m_MIP.reserve(8);
57  m_ISO.reserve(8);
58 
59  // reserve MIP and ISO phi and eta projection units
60  m_MIP_PPUs.reserve(8);
61  m_MIP_EPUs.reserve(8);
62  m_ISO_PPUs.reserve(8);
63  m_ISO_EPUs.reserve(8);
64 
65  for (int i = 0; i < 8; i++) {
66  m_MIP_PPUs[i] = new L1MuGMTPhiProjectionUnit(*this, 16 * m_id + i);
67  m_MIP_EPUs[i] = new L1MuGMTEtaProjectionUnit(*this, 16 * m_id + i);
68 
69  m_ISO_PPUs[i] = new L1MuGMTPhiProjectionUnit(*this, 16 * m_id + 8 + i);
70  m_ISO_EPUs[i] = new L1MuGMTEtaProjectionUnit(*this, 16 * m_id + 8 + i);
71  }
72 }
std::vector< L1MuGMTPhiProjectionUnit * > m_ISO_PPUs
std::vector< bool > m_ISO
std::vector< bool > m_MIP
std::vector< const L1MuRegionalCand * > m_muons
std::vector< L1MuGMTPhiProjectionUnit * > m_MIP_PPUs
const L1MuGlobalMuonTrigger & m_gmt
std::vector< L1MuGMTEtaProjectionUnit * > m_ISO_EPUs
std::vector< L1MuGMTEtaProjectionUnit * > m_MIP_EPUs
L1MuGMTMipIsoAU::~L1MuGMTMipIsoAU ( )
virtual

destructor

Definition at line 77 of file L1MuGMTMipIsoAU.cc.

References m_ISO_EPUs, m_ISO_PPUs, m_MIP_EPUs, m_MIP_PPUs, and reset().

77  {
78  reset();
79 
80  // delete MIP phi projection units
81  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
82  for (p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++)
83  delete *p_iter;
84  m_MIP_PPUs.clear();
85 
86  // delete ISO phi projection units
87  for (p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++)
88  delete *p_iter;
89  m_ISO_PPUs.clear();
90 
91  // delete MIP eta projection units
92  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
93  for (e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++)
94  delete *e_iter;
95  m_MIP_EPUs.clear();
96 
97  // delete ISO eta projection units
98  for (e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++)
99  delete *e_iter;
100  m_ISO_EPUs.clear();
101 }
std::vector< L1MuGMTPhiProjectionUnit * > m_ISO_PPUs
void reset()
clear MIP & ISO bit assignment unit
std::vector< L1MuGMTPhiProjectionUnit * > m_MIP_PPUs
std::vector< L1MuGMTEtaProjectionUnit * > m_ISO_EPUs
std::vector< L1MuGMTEtaProjectionUnit * > m_MIP_EPUs

Member Function Documentation

void L1MuGMTMipIsoAU::assignISO ( )
private

Definition at line 238 of file L1MuGMTMipIsoAU.cc.

References any(), L1MuGlobalMuonTrigger::Data(), L1MuGMTConfig::Debug(), L1MuGlobalMuonTrigger::DebugBlockForFill(), relativeConstraints::empty, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, L1MuGMTPSB::isolBits(), m_gmt, m_ISO, m_ISO_EPUs, m_ISO_PPUs, m_muons, and L1MuGMTDebugBlock::SetIsMIPISO().

Referenced by GMT(), and run().

238  {
239  // get isolation bits from PSB
240  const L1MuGMTMatrix<bool>& isol = m_gmt.Data()->isolBits();
241 
242  for (int imuon = 0; imuon < 8; imuon++)
243  if (m_muons[imuon] && !m_muons[imuon]->empty()) {
244  bool tmpISO = true;
245  bool any = false;
246 
247  for (int iphi = 0; iphi < 18; iphi++)
248  for (int ieta = 0; ieta < 14; ieta++) {
249  if (m_ISO_PPUs[imuon]->isSelected(iphi) && m_ISO_EPUs[imuon]->isSelected(ieta)) {
250  tmpISO &= isol(ieta, iphi);
251  any = true;
252  if (L1MuGMTConfig::Debug(3))
253  edm::LogVerbatim("GMT_MipIso_info")
254  << "L1MuGMTMipIsoAU::assignISO() checking calo region phi=" << iphi << ", eta=" << ieta;
255  }
256  }
257  if (any)
258  m_ISO[imuon] = tmpISO;
259  else
260  edm::LogWarning("MipISOProblem") << "L1MuGMTMipIsoAU::assignISO(): no calo region was checked!!";
261 
262  m_gmt.DebugBlockForFill()->SetIsMIPISO(m_ISO_PPUs[imuon]->id(), m_ISO[imuon] ? 1 : 0);
263  }
264 }
std::vector< L1MuGMTPhiProjectionUnit * > m_ISO_PPUs
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:40
std::vector< bool > m_ISO
static bool Debug()
const L1MuGMTPSB * Data() const
return pointer to PSB
std::vector< const L1MuRegionalCand * > m_muons
const L1MuGlobalMuonTrigger & m_gmt
void SetIsMIPISO(int idx, unsigned ismipiso)
Set MIP/ISO bits for current bx.
std::vector< L1MuGMTEtaProjectionUnit * > m_ISO_EPUs
L1MuGMTDebugBlock * DebugBlockForFill() const
for debug: return the debug block (in order to fill it)
const L1MuGMTMatrix< bool > & isolBits() const
return isolation bits
Definition: L1MuGMTPSB.h:88
void L1MuGMTMipIsoAU::assignMIP ( )
private

Definition at line 213 of file L1MuGMTMipIsoAU.cc.

References L1MuGlobalMuonTrigger::Data(), L1MuGMTConfig::Debug(), L1MuGlobalMuonTrigger::DebugBlockForFill(), relativeConstraints::empty, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, m_gmt, m_MIP, m_MIP_EPUs, m_MIP_PPUs, m_muons, L1MuGMTPSB::mipBits(), and L1MuGMTDebugBlock::SetIsMIPISO().

Referenced by GMT(), and run().

213  {
214  // get MIP bits from PSB
215  const L1MuGMTMatrix<bool>& mip = m_gmt.Data()->mipBits();
216 
217  for (int imuon = 0; imuon < 8; imuon++)
218  if (m_muons[imuon] && !m_muons[imuon]->empty()) {
219  bool tmpMIP = false;
220 
221  for (int iphi = 0; iphi < 18; iphi++)
222  for (int ieta = 0; ieta < 14; ieta++) {
223  if (m_MIP_PPUs[imuon]->isSelected(iphi) && m_MIP_EPUs[imuon]->isSelected(ieta)) {
224  tmpMIP |= mip(ieta, iphi);
225  if (L1MuGMTConfig::Debug(3))
226  edm::LogVerbatim("GMT_MipIso_info")
227  << "L1MuGMTMipIsoAU::assignMIP() checking calo region phi=" << iphi << ", eta=" << ieta;
228  }
229  }
230  m_MIP[imuon] = tmpMIP;
231  m_gmt.DebugBlockForFill()->SetIsMIPISO(m_MIP_PPUs[imuon]->id(), tmpMIP ? 1 : 0);
232  }
233 }
static bool Debug()
std::vector< bool > m_MIP
const L1MuGMTPSB * Data() const
return pointer to PSB
std::vector< const L1MuRegionalCand * > m_muons
std::vector< L1MuGMTPhiProjectionUnit * > m_MIP_PPUs
const L1MuGlobalMuonTrigger & m_gmt
void SetIsMIPISO(int idx, unsigned ismipiso)
Set MIP/ISO bits for current bx.
L1MuGMTDebugBlock * DebugBlockForFill() const
for debug: return the debug block (in order to fill it)
std::vector< L1MuGMTEtaProjectionUnit * > m_MIP_EPUs
const L1MuGMTMatrix< bool > & mipBits() const
return minimum ionizing bits
Definition: L1MuGMTPSB.h:91
const L1MuGlobalMuonTrigger& L1MuGMTMipIsoAU::GMT ( ) const
inline

Definition at line 80 of file L1MuGMTMipIsoAU.h.

References assignISO(), assignMIP(), load(), and m_gmt.

Referenced by L1MuGMTEtaProjectionUnit::run(), and L1MuGMTPhiProjectionUnit::run().

80 { return m_gmt; };
const L1MuGlobalMuonTrigger & m_gmt
int L1MuGMTMipIsoAU::id ( void  ) const
inline

return identifier (0: barrel, 1: endcap)

Definition at line 69 of file L1MuGMTMipIsoAU.h.

References m_id.

69 { return m_id; }
bool L1MuGMTMipIsoAU::ISO ( int  idx) const
inline

return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC)

Definition at line 78 of file L1MuGMTMipIsoAU.h.

References training_settings::idx, and m_ISO.

Referenced by L1MuGMTMerger::createDTCSCCand(), L1MuGMTMerger::createMergedCand(), and L1MuGMTMerger::createRPCCand().

78 { return m_ISO[idx]; }
std::vector< bool > m_ISO
void L1MuGMTMipIsoAU::load ( )
private

Definition at line 188 of file L1MuGMTMipIsoAU.cc.

References L1MuGMTPSB::CSCMuon(), L1MuGlobalMuonTrigger::Data(), L1MuGMTPSB::DTBXMuon(), irpc, m_gmt, m_id, m_muons, L1MuGMTConfig::MAXCSC, L1MuGMTConfig::MAXDTBX, L1MuGMTConfig::MAXRPCbarrel, L1MuGMTConfig::MAXRPCendcap, and L1MuGMTPSB::RPCMuon().

Referenced by GMT(), and run().

188  {
189  // barrel MIP & ISO assignment unit gets DTBX and barrel RPC muons
190  if (m_id == 0) {
191  for (unsigned idt = 0; idt < L1MuGMTConfig::MAXDTBX; idt++) {
192  m_muons[idt] = m_gmt.Data()->DTBXMuon(idt);
193  }
194  for (unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCbarrel; irpc++) {
195  m_muons[irpc + 4] = m_gmt.Data()->RPCMuon(irpc);
196  }
197  }
198 
199  // endcap MIP & ISO assignment unit gets CSC and endcap RPC muons
200  if (m_id == 1) {
201  for (unsigned icsc = 0; icsc < L1MuGMTConfig::MAXCSC; icsc++) {
202  m_muons[icsc] = m_gmt.Data()->CSCMuon(icsc);
203  }
204  for (unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCendcap; irpc++) {
205  m_muons[irpc + 4] = m_gmt.Data()->RPCMuon(irpc + 4);
206  }
207  }
208 }
const L1MuRegionalCand * CSCMuon(int index) const
get CSC muon
Definition: L1MuGMTPSB.cc:238
const L1MuGMTPSB * Data() const
return pointer to PSB
const L1MuRegionalCand * RPCMuon(int index) const
get RPC muon
Definition: L1MuGMTPSB.cc:224
int irpc
static const unsigned int MAXCSC
Definition: L1MuGMTConfig.h:85
static const unsigned int MAXDTBX
Definition: L1MuGMTConfig.h:85
static const unsigned int MAXRPCendcap
Definition: L1MuGMTConfig.h:85
std::vector< const L1MuRegionalCand * > m_muons
const L1MuRegionalCand * DTBXMuon(int index) const
get DTBX muon
Definition: L1MuGMTPSB.cc:231
const L1MuGlobalMuonTrigger & m_gmt
static const unsigned int MAXRPCbarrel
Definition: L1MuGMTConfig.h:85
bool L1MuGMTMipIsoAU::MIP ( int  idx) const
inline

return select matrix (idx 0..3: DT/CSC, idx 4..7: RPC)

Definition at line 75 of file L1MuGMTMipIsoAU.h.

References training_settings::idx, and m_MIP.

Referenced by L1MuGMTMerger::createDTCSCCand(), L1MuGMTMerger::createMergedCand(), and L1MuGMTMerger::createRPCCand().

75 { return m_MIP[idx]; }
std::vector< bool > m_MIP
const L1MuRegionalCand* L1MuGMTMipIsoAU::muon ( int  idx) const
inline

return input muon (idx: 0..3: DT/CSC, 4..7: RPC)

Definition at line 72 of file L1MuGMTMipIsoAU.h.

References training_settings::idx, and m_muons.

Referenced by L1MuGMTEtaProjectionUnit::load(), and L1MuGMTPhiProjectionUnit::load().

72 { return m_muons[idx]; }
std::vector< const L1MuRegionalCand * > m_muons
void L1MuGMTMipIsoAU::print ( void  ) const

print results after MIP & ISO bit assignment

Definition at line 168 of file L1MuGMTMipIsoAU.cc.

References m_ISO, and m_MIP.

Referenced by L1MuGlobalMuonTrigger::produce().

168  {
169  std::stringstream outmip;
170  outmip << "Assigned MIP bits : ";
171  std::vector<bool>::const_iterator iter;
172  for (iter = m_MIP.begin(); iter != m_MIP.end(); iter++) {
173  outmip << (*iter) << " ";
174  }
175  edm::LogVerbatim("GMT_MipIso_info") << outmip.str();
176 
177  std::stringstream outiso;
178  outiso << "Assigned ISO bits : ";
179  for (iter = m_ISO.begin(); iter != m_ISO.end(); iter++) {
180  outiso << (*iter) << " ";
181  }
182  edm::LogVerbatim("GMT_MipIso_info") << outiso.str();
183 }
std::vector< bool > m_ISO
std::vector< bool > m_MIP
void L1MuGMTMipIsoAU::reset ( void  )

clear MIP & ISO bit assignment unit

Definition at line 138 of file L1MuGMTMipIsoAU.cc.

References mps_fire::i, m_ISO, m_ISO_EPUs, m_ISO_PPUs, m_MIP, m_MIP_EPUs, m_MIP_PPUs, and m_muons.

Referenced by L1MuGlobalMuonTrigger::reset(), and ~L1MuGMTMipIsoAU().

138  {
139  for (int i = 0; i < 8; i++) {
140  m_muons[i] = nullptr;
141  m_MIP[i] = false;
142  m_ISO[i] = false;
143  }
144 
145  // reset MIP phi projection units
146  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
147  for (p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++) {
148  (*p_iter)->reset();
149  }
150 
151  // reset ISO phi projection units
152  for (p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++)
153  (*p_iter)->reset();
154 
155  // reset MIP eta projection units
156  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
157  for (e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++)
158  (*e_iter)->reset();
159 
160  // reset ISO eta projection units
161  for (e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++)
162  (*e_iter)->reset();
163 }
std::vector< L1MuGMTPhiProjectionUnit * > m_ISO_PPUs
std::vector< bool > m_ISO
std::vector< bool > m_MIP
std::vector< const L1MuRegionalCand * > m_muons
std::vector< L1MuGMTPhiProjectionUnit * > m_MIP_PPUs
std::vector< L1MuGMTEtaProjectionUnit * > m_ISO_EPUs
std::vector< L1MuGMTEtaProjectionUnit * > m_MIP_EPUs
void L1MuGMTMipIsoAU::run ( )

run GMT MIP & ISO bit assignment unit

Definition at line 110 of file L1MuGMTMipIsoAU.cc.

References assignISO(), assignMIP(), load(), m_ISO_EPUs, m_ISO_PPUs, m_MIP_EPUs, and m_MIP_PPUs.

Referenced by L1MuGlobalMuonTrigger::produce().

110  {
111  load();
112 
113  // run MIP phi projection units
114  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
115  for (p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++)
116  (*p_iter)->run();
117 
118  // run ISO phi projection units
119  for (p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++)
120  (*p_iter)->run();
121 
122  // run MIP eta projection units
123  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
124  for (e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++)
125  (*e_iter)->run();
126 
127  // run ISO eta projection units
128  for (e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++)
129  (*e_iter)->run();
130 
131  assignMIP();
132  assignISO();
133 }
std::vector< L1MuGMTPhiProjectionUnit * > m_ISO_PPUs
std::vector< L1MuGMTPhiProjectionUnit * > m_MIP_PPUs
std::vector< L1MuGMTEtaProjectionUnit * > m_ISO_EPUs
std::vector< L1MuGMTEtaProjectionUnit * > m_MIP_EPUs

Member Data Documentation

const L1MuGlobalMuonTrigger& L1MuGMTMipIsoAU::m_gmt
private

Definition at line 88 of file L1MuGMTMipIsoAU.h.

Referenced by assignISO(), assignMIP(), GMT(), and load().

int L1MuGMTMipIsoAU::m_id
private

Definition at line 89 of file L1MuGMTMipIsoAU.h.

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

std::vector<bool> L1MuGMTMipIsoAU::m_ISO
private

Definition at line 94 of file L1MuGMTMipIsoAU.h.

Referenced by assignISO(), ISO(), L1MuGMTMipIsoAU(), print(), and reset().

std::vector<L1MuGMTEtaProjectionUnit*> L1MuGMTMipIsoAU::m_ISO_EPUs
private

Definition at line 100 of file L1MuGMTMipIsoAU.h.

Referenced by assignISO(), L1MuGMTMipIsoAU(), reset(), run(), and ~L1MuGMTMipIsoAU().

std::vector<L1MuGMTPhiProjectionUnit*> L1MuGMTMipIsoAU::m_ISO_PPUs
private

Definition at line 99 of file L1MuGMTMipIsoAU.h.

Referenced by assignISO(), L1MuGMTMipIsoAU(), reset(), run(), and ~L1MuGMTMipIsoAU().

std::vector<bool> L1MuGMTMipIsoAU::m_MIP
private

Definition at line 93 of file L1MuGMTMipIsoAU.h.

Referenced by assignMIP(), L1MuGMTMipIsoAU(), MIP(), print(), and reset().

std::vector<L1MuGMTEtaProjectionUnit*> L1MuGMTMipIsoAU::m_MIP_EPUs
private

Definition at line 97 of file L1MuGMTMipIsoAU.h.

Referenced by assignMIP(), L1MuGMTMipIsoAU(), reset(), run(), and ~L1MuGMTMipIsoAU().

std::vector<L1MuGMTPhiProjectionUnit*> L1MuGMTMipIsoAU::m_MIP_PPUs
private

Definition at line 96 of file L1MuGMTMipIsoAU.h.

Referenced by assignMIP(), L1MuGMTMipIsoAU(), reset(), run(), and ~L1MuGMTMipIsoAU().

std::vector<const L1MuRegionalCand*> L1MuGMTMipIsoAU::m_muons
private

Definition at line 91 of file L1MuGMTMipIsoAU.h.

Referenced by assignISO(), assignMIP(), L1MuGMTMipIsoAU(), load(), muon(), and reset().