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 52 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.

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

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

80  {
81 
82  reset();
83 
84  // delete MIP phi projection units
85  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
86  for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ )
87  delete *p_iter;
88  m_MIP_PPUs.clear();
89 
90  // delete ISO phi projection units
91  for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
92  delete *p_iter;
93  m_ISO_PPUs.clear();
94 
95  // delete MIP eta projection units
96  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
97  for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
98  delete *e_iter;
99  m_MIP_EPUs.clear();
100 
101  // delete ISO eta projection units
102  for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
103  delete *e_iter;
104  m_ISO_EPUs.clear();
105 }
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 252 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 GMT(), and run().

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

Definition at line 225 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 GMT(), and run().

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

Definition at line 83 of file L1MuGMTMipIsoAU.h.

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

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

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

return identifier (0: barrel, 1: endcap)

Definition at line 72 of file L1MuGMTMipIsoAU.h.

References m_id.

72 { 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 81 of file L1MuGMTMipIsoAU.h.

References training_settings::idx, and m_ISO.

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

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

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

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

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

78 { 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 75 of file L1MuGMTMipIsoAU.h.

References training_settings::idx, and m_muons.

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

75 { 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 176 of file L1MuGMTMipIsoAU.cc.

References m_ISO, and m_MIP.

Referenced by L1MuGlobalMuonTrigger::produce().

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

clear MIP & ISO bit assignment unit

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

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

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

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

int L1MuGMTMipIsoAU::m_id
private

Definition at line 92 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 97 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 103 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 102 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 96 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 100 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 99 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 94 of file L1MuGMTMipIsoAU.h.

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