CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

L1MuGMTMipIsoAU Class Reference

#include <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< 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.

                                                                         : 
  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) {

  m_muons.reserve(8);
  m_MIP.reserve(8);
  m_ISO.reserve(8);
        
  // reserve MIP and ISO phi and eta projection units
  m_MIP_PPUs.reserve(8);
  m_MIP_EPUs.reserve(8);
  m_ISO_PPUs.reserve(8);
  m_ISO_EPUs.reserve(8);
        
  for (int i=0; i<8; i++) {
    m_MIP_PPUs[i]=new L1MuGMTPhiProjectionUnit (*this, 16 * m_id + i) ;
    m_MIP_EPUs[i]=new L1MuGMTEtaProjectionUnit (*this, 16 * m_id + i) ;
                
    m_ISO_PPUs[i]=new L1MuGMTPhiProjectionUnit (*this, 16 * m_id + 8 + i) ;
    m_ISO_EPUs[i]=new L1MuGMTEtaProjectionUnit (*this, 16 * m_id + 8 + i) ;
  }

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

                                  { 

  reset();
        
  // delete MIP phi projection units    
  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
  for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ )
    delete *p_iter;
  m_MIP_PPUs.clear();
        
  // delete ISO phi projection units    
  for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
    delete *p_iter;
  m_ISO_PPUs.clear();

  // delete MIP eta projection units    
  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
  for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
        delete *e_iter;
  m_MIP_EPUs.clear();
        
  // delete ISO eta projection units    
  for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
        delete *e_iter;
  m_ISO_EPUs.clear();
}

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

                                {
  
  // get isolation bits from PSB
  const L1MuGMTMatrix<bool>& isol = m_gmt.Data()->isolBits();
  
  for ( int imuon = 0; imuon < 8; imuon++ )
    if (m_muons[imuon] && !m_muons[imuon]->empty() ) {
      bool tmpISO=true;
      bool any=false;

      for ( int iphi = 0; iphi < 18; iphi++ )
        for ( int ieta = 0; ieta < 14; ieta++ ) {
          if (m_ISO_PPUs[imuon]->isSelected(iphi) &&
              m_ISO_EPUs[imuon]->isSelected(ieta) ) {
            tmpISO &= isol(ieta, iphi);
            any  = true;
            if ( L1MuGMTConfig::Debug(3) ) edm::LogVerbatim("GMT_MipIso_info") << "L1MuGMTMipIsoAU::assignISO() checking calo region phi=" << 
              iphi << ", eta="  << ieta;
          }
        }
      if (any) m_ISO[imuon] = tmpISO;
      else edm::LogWarning("MipISOProblem") << "L1MuGMTMipIsoAU::assignISO(): no calo region was checked!!"; 

      m_gmt.DebugBlockForFill()->SetIsMIPISO( m_ISO_PPUs[imuon]->id(), m_ISO[imuon]?1:0) ;      
    }
 
}
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().

                                {

  // get MIP bits from PSB
  const L1MuGMTMatrix<bool>& mip = m_gmt.Data()->mipBits();

  for ( int imuon = 0; imuon < 8; imuon++ ) 
    if (m_muons[imuon] && !m_muons[imuon]->empty() ) {
      bool tmpMIP=false;

      for ( int iphi = 0; iphi < 18; iphi++ )
        for ( int ieta = 0; ieta < 14; ieta++ ) {
          if (m_MIP_PPUs[imuon]->isSelected(iphi) &&
              m_MIP_EPUs[imuon]->isSelected(ieta) ) {
            tmpMIP |= mip(ieta, iphi);
            if ( L1MuGMTConfig::Debug(3) ) edm::LogVerbatim("GMT_MipIso_info") << "L1MuGMTMipIsoAU::assignMIP() checking calo region phi=" << 
              iphi << ", eta="  << ieta;
          }
        }
      m_MIP[imuon] = tmpMIP;
      m_gmt.DebugBlockForFill()->SetIsMIPISO( m_MIP_PPUs[imuon]->id(), tmpMIP?1:0) ;      
  }
}
const L1MuGlobalMuonTrigger& L1MuGMTMipIsoAU::GMT ( ) const [inline]

Definition at line 85 of file L1MuGMTMipIsoAU.h.

References m_gmt.

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

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

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

{ return m_ISO[idx]; }
void L1MuGMTMipIsoAU::load ( ) [private]

Definition at line 200 of file L1MuGMTMipIsoAU.cc.

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

Referenced by run().

                           {

  // barrel MIP & ISO assignment unit gets DTBX and barrel RPC muons
  if ( m_id == 0 ) {
    for ( unsigned idt = 0; idt < L1MuGMTConfig::MAXDTBX; idt++ ) {
      m_muons[idt] = m_gmt.Data()->DTBXMuon(idt);
    }
    for ( unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCbarrel; irpc++ ) {
      m_muons[irpc+4] = m_gmt.Data()->RPCMuon(irpc);
    }
  }
  
  // endcap MIP & ISO assignment unit gets CSC and endcap RPC muons
  if ( m_id == 1 ) {  
    for ( unsigned icsc = 0; icsc < L1MuGMTConfig::MAXCSC; icsc++ ) {
      m_muons[icsc] = m_gmt.Data()->CSCMuon(icsc);
    }
    for ( unsigned irpc = 0; irpc < L1MuGMTConfig::MAXRPCendcap; irpc++ ) {
      m_muons[irpc+4] = m_gmt.Data()->RPCMuon(irpc+4);
    }
  }
 
}
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().

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

{ 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 m_ISO, and m_MIP.

Referenced by L1MuGlobalMuonTrigger::produce().

                                  {

  std::stringstream outmip;
  outmip << "Assigned MIP bits : ";
  std::vector<bool>::const_iterator iter;
  for ( iter = m_MIP.begin(); iter != m_MIP.end(); iter++ ) {
    outmip << (*iter) << "  ";
  }
  edm::LogVerbatim("GMT_MipIso_info") << outmip.str();

  std::stringstream outiso;
  outiso << "Assigned ISO bits : ";
  for ( iter = m_ISO.begin(); iter != m_ISO.end(); iter++ ) {
    outiso << (*iter) << "  ";
  }
  edm::LogVerbatim("GMT_MipIso_info") << outiso.str();
}
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().

                            {

  for ( int i = 0; i < 8; i++ ) {  
    m_muons[i] = 0;
    m_MIP[i] = false;
    m_ISO[i] = false;
  }
        
  // reset MIP phi projection units     
  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
  for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ ) {
    (*p_iter)->reset();
  }
        
  // reset ISO phi projection units     
  for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
    (*p_iter)->reset();

  // reset MIP eta projection units     
  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
  for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
    (*e_iter)->reset();
        
  // reset ISO eta projection units     
  for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
    (*e_iter)->reset();
}
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().

                          {

  load();

  // run MIP phi projection units       
  std::vector<L1MuGMTPhiProjectionUnit*>::iterator p_iter;
  for ( p_iter = m_MIP_PPUs.begin(); p_iter != m_MIP_PPUs.end(); p_iter++ )
    (*p_iter)->run();
        
  // run ISO phi projection units       
  for ( p_iter = m_ISO_PPUs.begin(); p_iter != m_ISO_PPUs.end(); p_iter++ )
    (*p_iter)->run();

  // run MIP eta projection units       
  std::vector<L1MuGMTEtaProjectionUnit*>::iterator e_iter;
  for ( e_iter = m_MIP_EPUs.begin(); e_iter != m_MIP_EPUs.end(); e_iter++ )
    (*e_iter)->run();
        
  // run ISO eta projection units       
  for ( e_iter = m_ISO_EPUs.begin(); e_iter != m_ISO_EPUs.end(); e_iter++ )
    (*e_iter)->run();
        
  assignMIP();
  assignISO();
}

Member Data Documentation

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

Definition at line 105 of file L1MuGMTMipIsoAU.h.

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

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

Definition at line 102 of file L1MuGMTMipIsoAU.h.

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

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