CMS 3D CMS Logo

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

L1MuGMTPhiProjectionUnit Class Reference

#include <L1MuGMTPhiProjectionUnit.h>

List of all members.

Public Member Functions

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

Private Types

typedef std::bitset< 18 > TPhiBits

Private Member Functions

void load ()

Private Attributes

float m_fphi
int m_id
int m_iphi
const L1MuGMTMipIsoAUm_MIAU
const L1MuRegionalCandm_mu
TPhiBits m_phi_select

Detailed Description

L1 Global Muon Trigger Phi projection unit.

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

Definition at line 55 of file L1MuGMTPhiProjectionUnit.h.


Member Typedef Documentation

typedef std::bitset<18> L1MuGMTPhiProjectionUnit::TPhiBits [private]

Definition at line 85 of file L1MuGMTPhiProjectionUnit.h.


Constructor & Destructor Documentation

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

constructor

Definition at line 56 of file L1MuGMTPhiProjectionUnit.cc.

                                                                                      : 
  m_MIAU(miau), m_id(id), m_mu(0) {
}
L1MuGMTPhiProjectionUnit::~L1MuGMTPhiProjectionUnit ( ) [virtual]

destructor

Definition at line 63 of file L1MuGMTPhiProjectionUnit.cc.

References reset().

                                                    { 

  reset();
  
}

Member Function Documentation

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

return identifier

Definition at line 75 of file L1MuGMTPhiProjectionUnit.h.

References m_id.

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

return phi select bit (idx: 0..17)

Definition at line 78 of file L1MuGMTPhiProjectionUnit.h.

References UserOptions_cff::idx, and m_phi_select.

{ return m_phi_select[idx]; }
void L1MuGMTPhiProjectionUnit::load ( ) [private]

Definition at line 153 of file L1MuGMTPhiProjectionUnit.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 L1MuGMTPhiProjectionUnit::print ( void  ) const

print results after phi projection

Definition at line 140 of file L1MuGMTPhiProjectionUnit.cc.

References i, and m_phi_select.

                                           {

  edm::LogVerbatim("GMT_PhiProjection_info") << "Phi select bits: ";
  for ( int i=0; i<18; i++ ) {
    edm::LogVerbatim("GMT_PhiProjection_info") << m_phi_select[i] << "  ";
  }
  edm::LogVerbatim("GMT_PhiProjection_info") << " ";
}
void L1MuGMTPhiProjectionUnit::reset ( void  )

clear phi projection unit

Definition at line 128 of file L1MuGMTPhiProjectionUnit.cc.

References m_fphi, m_iphi, m_mu, and m_phi_select.

Referenced by ~L1MuGMTPhiProjectionUnit().

                                     {

  m_mu = 0;
  m_iphi = 0;
  m_fphi = 0.;
  m_phi_select = (unsigned int) 0;
}
void L1MuGMTPhiProjectionUnit::run ( void  )

run phi projection unit

Definition at line 76 of file L1MuGMTPhiProjectionUnit.cc.

References DeDxDiscriminatorTools::charge(), L1MuRegionalCand::charge_packed(), L1MuGlobalMuonTrigger::DebugBlockForFill(), L1MuRegionalCand::empty(), eta(), L1MuRegionalCand::eta_packed(), L1MuGMTConfig::getMIAUEtaConvLUT(), L1MuGMTConfig::getMIAUPhiPro1LUT(), L1MuGMTConfig::getMIAUPhiPro2LUT(), L1MuGMTMipIsoAU::GMT(), i, load(), m_id, m_MIAU, m_mu, m_phi_select, phi, L1MuRegionalCand::phi_packed(), L1MuRegionalCand::pt_packed(), L1MuGMTDebugBlock::SetPhiSelBits(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs(), L1MuGMTMIAUEtaConvLUT::SpecificLookup_eta_out(), and L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel().

                                   {

  load();
  if (m_mu && ( !m_mu->empty() ) ) {
    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();
    unsigned phi = m_mu->phi_packed();

    // split phi in fine and coarse
    unsigned phi_fine = phi & ( (1<<3) - 1 ); // lower 3 bits
    unsigned phi_coarse = phi >> 3; // upper 5 bits

    // eta conversion lookup
    L1MuGMTMIAUEtaConvLUT* etaconv_lut = L1MuGMTConfig::getMIAUEtaConvLUT();
    unsigned eta4bit = etaconv_lut->SpecificLookup_eta_out (lut_id, eta);
    
    // phi projection 1 lookups
    L1MuGMTMIAUPhiPro1LUT* phipro1_lut = L1MuGMTConfig::getMIAUPhiPro1LUT();
    unsigned cphi_fine = phipro1_lut->SpecificLookup_cphi_fine (lut_id, phi_fine, eta4bit, pt, charge);
    unsigned cphi_ofs  = phipro1_lut->SpecificLookup_cphi_ofs  (lut_id, phi_fine, eta4bit, pt, charge);

    // phi projection 2 lookup
    L1MuGMTMIAUPhiPro2LUT* phipro2_lut = L1MuGMTConfig::getMIAUPhiPro2LUT();
    unsigned phi_sel_bits = phipro2_lut->SpecificLookup_phi_sel (lut_id, phi_coarse, cphi_fine, cphi_ofs, charge);

    // convert to bit array
    //
    // see comments in L1MuGMTMIAUEtaProLUT.cc
    //
    m_phi_select = (unsigned) 0;
    
    //  shift by 9 bits  //FIXME: fix when calo delivers the MIP bits correctly!
    for (unsigned int i=0; i<9; i++)
      if ( (phi_sel_bits & (1 << i))  == (unsigned) (1<<i))
        m_phi_select[i+9] = 1;
    
    for (unsigned int i=9; i<18; i++)
      if ( (phi_sel_bits & (1 << i))  == (unsigned) (1<<i))
        m_phi_select[i-9] = 1;
    
    m_MIAU.GMT().DebugBlockForFill()->SetPhiSelBits( m_id, m_phi_select.to_ulong()) ;
  }
}

Member Data Documentation

Definition at line 95 of file L1MuGMTPhiProjectionUnit.h.

Referenced by reset().

Definition at line 90 of file L1MuGMTPhiProjectionUnit.h.

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

Definition at line 94 of file L1MuGMTPhiProjectionUnit.h.

Referenced by reset().

Definition at line 87 of file L1MuGMTPhiProjectionUnit.h.

Referenced by load(), and run().

Definition at line 92 of file L1MuGMTPhiProjectionUnit.h.

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

Definition at line 97 of file L1MuGMTPhiProjectionUnit.h.

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