CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Private Attributes

L1MuGMTEtaProjectionUnit Class Reference

#include <L1MuGMTEtaProjectionUnit.h>

List of all members.

Public Member Functions

int id () const
 return identifier
bool isSelected (int idx) const
 return eta select bit (idx: 0..13)
 L1MuGMTEtaProjectionUnit (const L1MuGMTMipIsoAU &miau, int id)
 constructor
void print () const
 print results after eta projection
void reset ()
 clear eta projection unit
void run ()
 run eta projection unit
virtual ~L1MuGMTEtaProjectionUnit ()
 destructor

Private Types

typedef std::bitset< 14 > TEtaBits

Private Member Functions

void load ()

Private Attributes

TEtaBits m_eta_select
float m_feta
int m_id
int m_ieta
const L1MuGMTMipIsoAUm_MIAU
const L1MuRegionalCandm_mu

Detailed Description

L1 Global Muon Trigger Eta projection unit.

Projects a muon from the muon system to the calorimeter or vertex and selects one or more calorimeter regions in eta to be checked for MIP and Isolation.

Definition at line 54 of file L1MuGMTEtaProjectionUnit.h.


Member Typedef Documentation

typedef std::bitset<14> L1MuGMTEtaProjectionUnit::TEtaBits [private]

Definition at line 84 of file L1MuGMTEtaProjectionUnit.h.


Constructor & Destructor Documentation

L1MuGMTEtaProjectionUnit::L1MuGMTEtaProjectionUnit ( const L1MuGMTMipIsoAU miau,
int  id 
)

constructor

Definition at line 52 of file L1MuGMTEtaProjectionUnit.cc.

                                                                                      : 
  m_MIAU(miau), m_id(id), m_mu(0) {

}
L1MuGMTEtaProjectionUnit::~L1MuGMTEtaProjectionUnit ( ) [virtual]

destructor

Definition at line 60 of file L1MuGMTEtaProjectionUnit.cc.

References reset().

                                                    { 

  reset();
  
}

Member Function Documentation

int L1MuGMTEtaProjectionUnit::id ( void  ) const [inline]

return identifier

Definition at line 74 of file L1MuGMTEtaProjectionUnit.h.

References m_id.

{ return m_id; }
bool L1MuGMTEtaProjectionUnit::isSelected ( int  idx) const [inline]

return eta select bit (idx: 0..13)

Definition at line 77 of file L1MuGMTEtaProjectionUnit.h.

References customizeTrackingMonitorSeedNumber::idx, and m_eta_select.

{ return m_eta_select[idx]; }
void L1MuGMTEtaProjectionUnit::load ( ) [private]

Definition at line 144 of file L1MuGMTEtaProjectionUnit.cc.

References m_id, m_MIAU, m_mu, and L1MuGMTMipIsoAU::muon().

Referenced by run().

                                    {

  // retrieve muon from MIP & ISO bit assignment unit   
  m_mu = m_MIAU.muon( m_id % 8 );
}
void L1MuGMTEtaProjectionUnit::print ( void  ) const

print results after eta projection

Definition at line 131 of file L1MuGMTEtaProjectionUnit.cc.

References i, and m_eta_select.

                                           {

  edm::LogVerbatim("GMT_EtaProjection_info") << "Eta select bits: ";
  for ( int i=0; i<14; i++ ) {
    edm::LogVerbatim("GMT_EtaProjection_info") << m_eta_select[i] << "  ";
  }
  edm::LogVerbatim("GMT_EtaProjection_info");
}
void L1MuGMTEtaProjectionUnit::reset ( void  )

clear eta projection unit

Definition at line 119 of file L1MuGMTEtaProjectionUnit.cc.

References m_eta_select, m_feta, m_ieta, and m_mu.

Referenced by ~L1MuGMTEtaProjectionUnit().

                                     {

  m_mu = 0;
  m_ieta = 0;
  m_feta = 0.;
  m_eta_select = (unsigned int) 0;
}
void L1MuGMTEtaProjectionUnit::run ( void  )

run eta projection unit

Definition at line 73 of file L1MuGMTEtaProjectionUnit.cc.

References DeDxDiscriminatorTools::charge(), L1MuRegionalCand::charge_packed(), L1MuGlobalMuonTrigger::DebugBlockForFill(), L1MuRegionalCand::empty(), eta(), L1MuRegionalCand::eta_packed(), L1MuGMTConfig::getMIAUEtaProLUT(), L1MuGMTMipIsoAU::GMT(), i, load(), m_eta_select, m_id, m_MIAU, m_mu, L1MuRegionalCand::pt_packed(), L1MuGMTDebugBlock::SetEtaSelBits(), and L1MuGMTMIAUEtaProLUT::SpecificLookup_eta_sel().

                                   {

  load();
  if ( m_mu && ( !m_mu->empty() ) ) {
    
    int isFwd = m_id / 16;
    int lut_id = m_id / 4;

    // obtain inputs as coded in HW
    unsigned pt  = m_mu->pt_packed();
    unsigned charge  = m_mu->charge_packed();
    unsigned eta = m_mu->eta_packed();
    
    // lookup
    L1MuGMTMIAUEtaProLUT* ep_lut = L1MuGMTConfig::getMIAUEtaProLUT();
    unsigned eta_sel_bits = ep_lut->SpecificLookup_eta_sel (lut_id, eta, pt, charge);

    // convert to bit array
    //
    // see comments in L1MuGMTMIAUEtaProLUT.cc
    //
    m_eta_select = (unsigned) 0;
    
    if (isFwd) { // forward
      for (int i=0; i<5; i++)
        if ( (eta_sel_bits & (1 << i))  == (unsigned) (1<<i))
          m_eta_select[i] = 1;
      
      for (int i=5; i<10; i++)
        if ( (eta_sel_bits & (1 << i))  == (unsigned) (1<<i))
          m_eta_select[i+4] = 1;            
    } else { // barrel
      for (int i=0; i<10; i++)
        if ( (eta_sel_bits & (1 << i))  == (unsigned) (1<<i))
          m_eta_select[i+2] = 1;
    }
    
    //    m_MIAU.GMT().DebugBlockForFill()->SetEtaSelBits( m_id, m_eta_select.read(0,14)) ;
    m_MIAU.GMT().DebugBlockForFill()->SetEtaSelBits( m_id, m_eta_select.to_ulong()) ;
  }
}

Member Data Documentation

Definition at line 96 of file L1MuGMTEtaProjectionUnit.h.

Referenced by isSelected(), print(), reset(), and run().

Definition at line 94 of file L1MuGMTEtaProjectionUnit.h.

Referenced by reset().

Definition at line 89 of file L1MuGMTEtaProjectionUnit.h.

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

Definition at line 93 of file L1MuGMTEtaProjectionUnit.h.

Referenced by reset().

Definition at line 86 of file L1MuGMTEtaProjectionUnit.h.

Referenced by load(), and run().

Definition at line 91 of file L1MuGMTEtaProjectionUnit.h.

Referenced by load(), reset(), and run().