CMS 3D CMS Logo

L1MuGMTMipIsoAU Class Reference

L1 Global Muon Trigger MIP and ISO bit Assignment Unit. More...

#include <L1Trigger/GlobalMuonTrigger/src/L1MuGMTMipIsoAU.h>

List of all members.

Public Member Functions

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

Private Member Functions

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

Private Attributes

const L1MuGlobalMuonTriggerm_gmt
int m_id
std::vector< boolm_ISO
std::vector
< L1MuGMTEtaProjectionUnit * > 
m_ISO_EPUs
std::vector
< L1MuGMTPhiProjectionUnit * > 
m_ISO_PPUs
std::vector< boolm_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.

00055                                                                          : 
00056   m_gmt(gmt), m_id(id), m_muons(8), m_MIP(8), m_ISO(8),
00057   m_MIP_PPUs(8), m_MIP_EPUs(8), m_ISO_PPUs(8), m_ISO_EPUs(8) {
00058 
00059   m_muons.reserve(8);
00060   m_MIP.reserve(8);
00061   m_ISO.reserve(8);
00062         
00063   // reserve MIP and ISO phi and eta projection units
00064   m_MIP_PPUs.reserve(8);
00065   m_MIP_EPUs.reserve(8);
00066   m_ISO_PPUs.reserve(8);
00067   m_ISO_EPUs.reserve(8);
00068         
00069   for (int i=0; i<8; i++) {
00070     m_MIP_PPUs[i]=new L1MuGMTPhiProjectionUnit (*this, 16 * m_id + i) ;
00071     m_MIP_EPUs[i]=new L1MuGMTEtaProjectionUnit (*this, 16 * m_id + i) ;
00072                 
00073     m_ISO_PPUs[i]=new L1MuGMTPhiProjectionUnit (*this, 16 * m_id + 8 + i) ;
00074     m_ISO_EPUs[i]=new L1MuGMTEtaProjectionUnit (*this, 16 * m_id + 8 + i) ;
00075   }
00076 
00077 }

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

00082                                   { 
00083 
00084   reset();
00085         
00086   // delete MIP phi projection units    
00087   std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
00088   for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ )
00089     delete *p_iter;
00090   m_MIP_PPUs.clear();
00091         
00092   // delete ISO phi projection units    
00093   for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
00094     delete *p_iter;
00095   m_ISO_PPUs.clear();
00096 
00097   // delete MIP eta projection units    
00098   std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
00099   for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
00100         delete *e_iter;
00101   m_MIP_EPUs.clear();
00102         
00103   // delete ISO eta projection units    
00104   for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
00105         delete *e_iter;
00106   m_ISO_EPUs.clear();
00107 }


Member Function Documentation

void L1MuGMTMipIsoAU::assignISO (  )  [private]

Definition at line 254 of file L1MuGMTMipIsoAU.cc.

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

Referenced by run().

00254                                 {
00255   
00256   // get isolation bits from PSB
00257   const L1MuGMTMatrix<bool>& isol = m_gmt.Data()->isolBits();
00258   
00259   for ( int imuon = 0; imuon < 8; imuon++ )
00260     if (m_muons[imuon] && !m_muons[imuon]->empty() ) {
00261       bool tmpISO=true;
00262       bool any=false;
00263 
00264       for ( int iphi = 0; iphi < 18; iphi++ )
00265         for ( int ieta = 0; ieta < 14; ieta++ ) {
00266           if (m_ISO_PPUs[imuon]->isSelected(iphi) &&
00267               m_ISO_EPUs[imuon]->isSelected(ieta) ) {
00268             tmpISO &= isol(ieta, iphi);
00269             any  = true;
00270             if ( L1MuGMTConfig::Debug(3) ) edm::LogVerbatim("GMT_MipIso_info") << "L1MuGMTMipIsoAU::assignISO() checking calo region phi=" << 
00271               iphi << ", eta="  << ieta;
00272           }
00273         }
00274       if (any) m_ISO[imuon] = tmpISO;
00275       else edm::LogWarning("MipISOProblem") << "L1MuGMTMipIsoAU::assignISO(): no calo region was checked!!"; 
00276 
00277       m_gmt.DebugBlockForFill()->SetIsMIPISO( m_ISO_PPUs[imuon]->id(), m_ISO[imuon]?1:0) ;      
00278     }
00279  
00280 }

void L1MuGMTMipIsoAU::assignMIP (  )  [private]

Definition at line 227 of file L1MuGMTMipIsoAU.cc.

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

Referenced by run().

00227                                 {
00228 
00229   // get MIP bits from PSB
00230   const L1MuGMTMatrix<bool>& mip = m_gmt.Data()->mipBits();
00231 
00232   for ( int imuon = 0; imuon < 8; imuon++ ) 
00233     if (m_muons[imuon] && !m_muons[imuon]->empty() ) {
00234       bool tmpMIP=false;
00235 
00236       for ( int iphi = 0; iphi < 18; iphi++ )
00237         for ( int ieta = 0; ieta < 14; ieta++ ) {
00238           if (m_MIP_PPUs[imuon]->isSelected(iphi) &&
00239               m_MIP_EPUs[imuon]->isSelected(ieta) ) {
00240             tmpMIP |= mip(ieta, iphi);
00241             if ( L1MuGMTConfig::Debug(3) ) edm::LogVerbatim("GMT_MipIso_info") << "L1MuGMTMipIsoAU::assignMIP() checking calo region phi=" << 
00242               iphi << ", eta="  << ieta;
00243           }
00244         }
00245       m_MIP[imuon] = tmpMIP;
00246       m_gmt.DebugBlockForFill()->SetIsMIPISO( m_MIP_PPUs[imuon]->id(), tmpMIP?1:0) ;      
00247   }
00248 }

const L1MuGlobalMuonTrigger& L1MuGMTMipIsoAU::GMT (  )  const [inline]

Definition at line 85 of file L1MuGMTMipIsoAU.h.

References m_gmt.

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

00085 { return 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.

00074 { 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().

00083 { return m_ISO[idx]; }

void L1MuGMTMipIsoAU::load ( void   )  [private]

Definition at line 200 of file L1MuGMTMipIsoAU.cc.

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

Referenced by run().

00200                            {
00201 
00202   // barrel MIP & ISO assignment unit gets DTBX and barrel RPC muons
00203   if ( m_id == 0 ) {
00204     for ( unsigned idt = 0; idt < L1MuGMTConfig::MAXDTBX; idt++ ) {
00205       m_muons[idt] = m_gmt.Data()->DTBXMuon(idt);
00206     }
00207     for ( unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCbarrel; irpc++ ) {
00208       m_muons[irpc+4] = m_gmt.Data()->RPCMuon(irpc);
00209     }
00210   }
00211   
00212   // endcap MIP & ISO assignment unit gets CSC and endcap RPC muons
00213   if ( m_id == 1 ) {  
00214     for ( unsigned icsc = 0; icsc < L1MuGMTConfig::MAXCSC; icsc++ ) {
00215       m_muons[icsc] = m_gmt.Data()->CSCMuon(icsc);
00216     }
00217     for ( unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCendcap; irpc++ ) {
00218       m_muons[irpc+4] = m_gmt.Data()->RPCMuon(irpc+4);
00219     }
00220   }
00221  
00222 }

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

00080 { return m_MIP[idx]; }

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 L1MuGMTPhiProjectionUnit::load(), and L1MuGMTEtaProjectionUnit::load().

00077 { return m_muons[idx]; } 

void L1MuGMTMipIsoAU::print ( void   )  const

print results after MIP & ISO bit assignment

Definition at line 178 of file L1MuGMTMipIsoAU.cc.

References iter, m_ISO, and m_MIP.

Referenced by L1MuGlobalMuonTrigger::produce().

00178                                   {
00179 
00180   std::stringstream outmip;
00181   outmip << "Assigned MIP bits : ";
00182   std::vector<bool>::const_iterator iter;
00183   for ( iter = m_MIP.begin(); iter != m_MIP.end(); iter++ ) {
00184     outmip << (*iter) << "  ";
00185   }
00186   edm::LogVerbatim("GMT_MipIso_info") << outmip.str();
00187 
00188   std::stringstream outiso;
00189   outiso << "Assigned ISO bits : ";
00190   for ( iter = m_ISO.begin(); iter != m_ISO.end(); iter++ ) {
00191     outiso << (*iter) << "  ";
00192   }
00193   edm::LogVerbatim("GMT_MipIso_info") << outiso.str();
00194 }

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

00146                             {
00147 
00148   for ( int i = 0; i < 8; i++ ) {  
00149     m_muons[i] = 0;
00150     m_MIP[i] = false;
00151     m_ISO[i] = false;
00152   }
00153         
00154   // reset MIP phi projection units     
00155   std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
00156   for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ ) {
00157     (*p_iter)->reset();
00158   }
00159         
00160   // reset ISO phi projection units     
00161   for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
00162     (*p_iter)->reset();
00163 
00164   // reset MIP eta projection units     
00165   std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
00166   for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
00167     (*e_iter)->reset();
00168         
00169   // reset ISO eta projection units     
00170   for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
00171     (*e_iter)->reset();
00172 }

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

00116                           {
00117 
00118   load();
00119 
00120   // run MIP phi projection units       
00121   std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
00122   for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ )
00123     (*p_iter)->run();
00124         
00125   // run ISO phi projection units       
00126   for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
00127     (*p_iter)->run();
00128 
00129   // run MIP eta projection units       
00130   std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
00131   for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
00132     (*e_iter)->run();
00133         
00134   // run ISO eta projection units       
00135   for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
00136     (*e_iter)->run();
00137         
00138   assignMIP();
00139   assignISO();
00140 }


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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:55 2009 for CMSSW by  doxygen 1.5.4