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 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 54 of file L1MuGMTMipIsoAU.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 55 of file L1MuGMTMipIsoAU.cc.

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

55  :
56  m_gmt(gmt), m_id(id), m_muons(8), m_MIP(8), m_ISO(8),
58 
59  m_muons.reserve(8);
60  m_MIP.reserve(8);
61  m_ISO.reserve(8);
62 
63  // reserve MIP and ISO phi and eta projection units
64  m_MIP_PPUs.reserve(8);
65  m_MIP_EPUs.reserve(8);
66  m_ISO_PPUs.reserve(8);
67  m_ISO_EPUs.reserve(8);
68 
69  for (int i=0; i<8; i++) {
70  m_MIP_PPUs[i]=new L1MuGMTPhiProjectionUnit (*this, 16 * m_id + i) ;
71  m_MIP_EPUs[i]=new L1MuGMTEtaProjectionUnit (*this, 16 * m_id + i) ;
72 
73  m_ISO_PPUs[i]=new L1MuGMTPhiProjectionUnit (*this, 16 * m_id + 8 + i) ;
74  m_ISO_EPUs[i]=new L1MuGMTEtaProjectionUnit (*this, 16 * m_id + 8 + i) ;
75  }
76 
77 }
int i
Definition: DBlmapReader.cc:9
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 82 of file L1MuGMTMipIsoAU.cc.

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

82  {
83 
84  reset();
85 
86  // delete MIP phi projection units
87  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
88  for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ )
89  delete *p_iter;
90  m_MIP_PPUs.clear();
91 
92  // delete ISO phi projection units
93  for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
94  delete *p_iter;
95  m_ISO_PPUs.clear();
96 
97  // delete MIP eta projection units
98  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
99  for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
100  delete *e_iter;
101  m_MIP_EPUs.clear();
102 
103  // delete ISO eta projection units
104  for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
105  delete *e_iter;
106  m_ISO_EPUs.clear();
107 }
std::vector< L1MuGMTPhiProjectionUnit * > m_ISO_PPUs
void reset()
clear MIP &amp; 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 254 of file L1MuGMTMipIsoAU.cc.

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

Referenced by run().

254  {
255 
256  // get isolation bits from PSB
257  const L1MuGMTMatrix<bool>& isol = m_gmt.Data()->isolBits();
258 
259  for ( int imuon = 0; imuon < 8; imuon++ )
260  if (m_muons[imuon] && !m_muons[imuon]->empty() ) {
261  bool tmpISO=true;
262  bool any=false;
263 
264  for ( int iphi = 0; iphi < 18; iphi++ )
265  for ( int ieta = 0; ieta < 14; ieta++ ) {
266  if (m_ISO_PPUs[imuon]->isSelected(iphi) &&
267  m_ISO_EPUs[imuon]->isSelected(ieta) ) {
268  tmpISO &= isol(ieta, iphi);
269  any = true;
270  if ( L1MuGMTConfig::Debug(3) ) edm::LogVerbatim("GMT_MipIso_info") << "L1MuGMTMipIsoAU::assignISO() checking calo region phi=" <<
271  iphi << ", eta=" << ieta;
272  }
273  }
274  if (any) m_ISO[imuon] = tmpISO;
275  else edm::LogWarning("MipISOProblem") << "L1MuGMTMipIsoAU::assignISO(): no calo region was checked!!";
276 
277  m_gmt.DebugBlockForFill()->SetIsMIPISO( m_ISO_PPUs[imuon]->id(), m_ISO[imuon]?1:0) ;
278  }
279 
280 }
std::vector< L1MuGMTPhiProjectionUnit * > m_ISO_PPUs
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:91
void L1MuGMTMipIsoAU::assignMIP ( )
private

Definition at line 227 of file L1MuGMTMipIsoAU.cc.

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

Referenced by run().

227  {
228 
229  // get MIP bits from PSB
230  const L1MuGMTMatrix<bool>& mip = m_gmt.Data()->mipBits();
231 
232  for ( int imuon = 0; imuon < 8; imuon++ )
233  if (m_muons[imuon] && !m_muons[imuon]->empty() ) {
234  bool tmpMIP=false;
235 
236  for ( int iphi = 0; iphi < 18; iphi++ )
237  for ( int ieta = 0; ieta < 14; ieta++ ) {
238  if (m_MIP_PPUs[imuon]->isSelected(iphi) &&
239  m_MIP_EPUs[imuon]->isSelected(ieta) ) {
240  tmpMIP |= mip(ieta, iphi);
241  if ( L1MuGMTConfig::Debug(3) ) edm::LogVerbatim("GMT_MipIso_info") << "L1MuGMTMipIsoAU::assignMIP() checking calo region phi=" <<
242  iphi << ", eta=" << ieta;
243  }
244  }
245  m_MIP[imuon] = tmpMIP;
246  m_gmt.DebugBlockForFill()->SetIsMIPISO( m_MIP_PPUs[imuon]->id(), tmpMIP?1:0) ;
247  }
248 }
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:94
const L1MuGlobalMuonTrigger& L1MuGMTMipIsoAU::GMT ( ) const
inline

Definition at line 85 of file L1MuGMTMipIsoAU.h.

References m_gmt.

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

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

return identifier (0: barrel, 1: endcap)

Definition at line 74 of file L1MuGMTMipIsoAU.h.

References m_id.

74 { 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 83 of file L1MuGMTMipIsoAU.h.

References m_ISO.

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

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

Definition at line 200 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 run().

200  {
201 
202  // barrel MIP & ISO assignment unit gets DTBX and barrel RPC muons
203  if ( m_id == 0 ) {
204  for ( unsigned idt = 0; idt < L1MuGMTConfig::MAXDTBX; idt++ ) {
205  m_muons[idt] = m_gmt.Data()->DTBXMuon(idt);
206  }
207  for ( unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCbarrel; irpc++ ) {
208  m_muons[irpc+4] = m_gmt.Data()->RPCMuon(irpc);
209  }
210  }
211 
212  // endcap MIP & ISO assignment unit gets CSC and endcap RPC muons
213  if ( m_id == 1 ) {
214  for ( unsigned icsc = 0; icsc < L1MuGMTConfig::MAXCSC; icsc++ ) {
215  m_muons[icsc] = m_gmt.Data()->CSCMuon(icsc);
216  }
217  for ( unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCendcap; irpc++ ) {
218  m_muons[irpc+4] = m_gmt.Data()->RPCMuon(irpc+4);
219  }
220  }
221 
222 }
const L1MuRegionalCand * CSCMuon(int index) const
get CSC muon
Definition: L1MuGMTPSB.cc:252
const L1MuGMTPSB * Data() const
return pointer to PSB
const L1MuRegionalCand * RPCMuon(int index) const
get RPC muon
Definition: L1MuGMTPSB.cc:232
int irpc
static const unsigned int MAXCSC
Definition: L1MuGMTConfig.h:91
static const unsigned int MAXDTBX
Definition: L1MuGMTConfig.h:91
static const unsigned int MAXRPCendcap
Definition: L1MuGMTConfig.h:90
std::vector< const L1MuRegionalCand * > m_muons
const L1MuRegionalCand * DTBXMuon(int index) const
get DTBX muon
Definition: L1MuGMTPSB.cc:242
const L1MuGlobalMuonTrigger & m_gmt
static const unsigned int MAXRPCbarrel
Definition: L1MuGMTConfig.h:90
bool L1MuGMTMipIsoAU::MIP ( int  idx) const
inline

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

Definition at line 80 of file L1MuGMTMipIsoAU.h.

References m_MIP.

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

80 { 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 77 of file L1MuGMTMipIsoAU.h.

References m_muons.

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

77 { 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 178 of file L1MuGMTMipIsoAU.cc.

References m_ISO, and m_MIP.

Referenced by L1MuGlobalMuonTrigger::produce().

178  {
179 
180  std::stringstream outmip;
181  outmip << "Assigned MIP bits : ";
182  std::vector<bool>::const_iterator iter;
183  for ( iter = m_MIP.begin(); iter != m_MIP.end(); iter++ ) {
184  outmip << (*iter) << " ";
185  }
186  edm::LogVerbatim("GMT_MipIso_info") << outmip.str();
187 
188  std::stringstream outiso;
189  outiso << "Assigned ISO bits : ";
190  for ( iter = m_ISO.begin(); iter != m_ISO.end(); iter++ ) {
191  outiso << (*iter) << " ";
192  }
193  edm::LogVerbatim("GMT_MipIso_info") << outiso.str();
194 }
std::vector< bool > m_ISO
std::vector< bool > m_MIP
void L1MuGMTMipIsoAU::reset ( void  )

clear MIP & ISO bit assignment unit

Definition at line 146 of file L1MuGMTMipIsoAU.cc.

References 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().

146  {
147 
148  for ( int i = 0; i < 8; i++ ) {
149  m_muons[i] = 0;
150  m_MIP[i] = false;
151  m_ISO[i] = false;
152  }
153 
154  // reset MIP phi projection units
155  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
156  for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ ) {
157  (*p_iter)->reset();
158  }
159 
160  // reset ISO phi projection units
161  for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
162  (*p_iter)->reset();
163 
164  // reset MIP eta projection units
165  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
166  for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
167  (*e_iter)->reset();
168 
169  // reset ISO eta projection units
170  for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
171  (*e_iter)->reset();
172 }
int i
Definition: DBlmapReader.cc:9
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 ( void  )

run GMT MIP & ISO bit assignment unit

Definition at line 116 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().

116  {
117 
118  load();
119 
120  // run MIP phi projection units
121  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
122  for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ )
123  (*p_iter)->run();
124 
125  // run ISO phi projection units
126  for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
127  (*p_iter)->run();
128 
129  // run MIP eta projection units
130  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
131  for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
132  (*e_iter)->run();
133 
134  // run ISO eta projection units
135  for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
136  (*e_iter)->run();
137 
138  assignMIP();
139  assignISO();
140 }
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 93 of file L1MuGMTMipIsoAU.h.

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

int L1MuGMTMipIsoAU::m_id
private

Definition at line 94 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 99 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 105 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 104 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 98 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 102 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 101 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 96 of file L1MuGMTMipIsoAU.h.

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