CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions

L1MuGMTMIAUEtaConvLUT Class Reference

#include <L1MuGMTMIAUEtaConvLUT.h>

Inheritance diagram for L1MuGMTMIAUEtaConvLUT:
L1MuGMTLUT

List of all members.

Public Types

enum  {
  MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC,
  MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC
}

Public Member Functions

 L1MuGMTMIAUEtaConvLUT ()
 constuctor using function-lookup
virtual unsigned LookupFunctionPacked (int idx, unsigned address) const
 access to lookup function with packed input and output
unsigned SpecificLookup (int idx, unsigned eta_in) const
 specific lookup function for entire output field
unsigned SpecificLookup_eta_out (int idx, unsigned eta_in) const
 specific lookup function for eta_out
virtual ~L1MuGMTMIAUEtaConvLUT ()
 destructor

Private Member Functions

void InitParameters ()
 Initialize scales, configuration parameters, alignment constants, ...
unsigned TheLookupFunction (int idx, unsigned eta_in) const
 The lookup function - here the functionality of the LUT is implemented.

Detailed Description

MIAUEtaConv look-up table

this class was automatically generated by L1MuGMTLUT::MakeSubClass()

Definition at line 42 of file L1MuGMTMIAUEtaConvLUT.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
MIP_DT 
MIP_BRPC 
ISO_DT 
ISO_BRPC 
MIP_CSC 
MIP_FRPC 
ISO_CSC 
ISO_FRPC 

Definition at line 45 of file L1MuGMTMIAUEtaConvLUT.h.


Constructor & Destructor Documentation

L1MuGMTMIAUEtaConvLUT::L1MuGMTMIAUEtaConvLUT ( ) [inline]

constuctor using function-lookup

Definition at line 48 of file L1MuGMTMIAUEtaConvLUT.h.

References InitParameters().

                          : L1MuGMTLUT("MIAUEtaConv", 
                                       "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC",
                                       "eta_in(6)",
                                       "eta_out(4)", 6, true) {
    InitParameters();
  } ;
virtual L1MuGMTMIAUEtaConvLUT::~L1MuGMTMIAUEtaConvLUT ( ) [inline, virtual]

destructor

Definition at line 56 of file L1MuGMTMIAUEtaConvLUT.h.

{};

Member Function Documentation

void L1MuGMTMIAUEtaConvLUT::InitParameters ( ) [private]

Initialize scales, configuration parameters, alignment constants, ...

Definition at line 38 of file L1MuGMTMIAUEtaConvLUT.cc.

Referenced by L1MuGMTMIAUEtaConvLUT().

                                           {
}
virtual unsigned L1MuGMTMIAUEtaConvLUT::LookupFunctionPacked ( int  idx,
unsigned  address 
) const [inline, virtual]

access to lookup function with packed input and output

Reimplemented from L1MuGMTLUT.

Definition at line 76 of file L1MuGMTMIAUEtaConvLUT.h.

References L1MuGMTLUT::m_Inputs, TheLookupFunction(), and L1MuGMTLUT::u2vec().

                                                                          {
    std::vector<unsigned> addr = u2vec(address, m_Inputs);
    return TheLookupFunction(idx ,addr[0]);

  };
unsigned L1MuGMTMIAUEtaConvLUT::SpecificLookup ( int  idx,
unsigned  eta_in 
) const [inline]

specific lookup function for entire output field

Definition at line 66 of file L1MuGMTMIAUEtaConvLUT.h.

References L1MuGMTLUT::LookupPacked().

                                                           {
    std::vector<unsigned> addr(1);
    addr[0] = eta_in;
    return LookupPacked(idx, addr);
  };
unsigned L1MuGMTMIAUEtaConvLUT::SpecificLookup_eta_out ( int  idx,
unsigned  eta_in 
) const [inline]

specific lookup function for eta_out

Definition at line 59 of file L1MuGMTMIAUEtaConvLUT.h.

References L1MuGMTLUT::Lookup().

Referenced by L1MuGMTPhiProjectionUnit::run().

                                                                   {
    std::vector<unsigned> addr(1);
    addr[0] = eta_in;
    return Lookup(idx, addr) [0];
  };
unsigned L1MuGMTMIAUEtaConvLUT::TheLookupFunction ( int  idx,
unsigned  eta_in 
) const [private]

The lookup function - here the functionality of the LUT is implemented.

Definition at line 56 of file L1MuGMTMIAUEtaConvLUT.cc.

References L1MuScale::getCenter(), L1MuGMTConfig::getGMTScales(), L1MuScale::getPacked(), L1MuGMTScales::getReducedEtaScale(), L1MuTriggerScales::getRegionalEtaScale(), L1MuScale::getScaleMax(), L1MuScale::getScaleMin(), L1MuGMTConfig::getTriggerScales(), and L1MuGMTLUT::m_saveFlag.

Referenced by LookupFunctionPacked().

                                                                                 {
  // idx is MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC
  // INPUTS:  eta_in(6)
  // OUTPUTS: eta_out(4) 

  const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales();
  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();

  int isRPC = idx % 2;
  int isFWD = idx / 4;

  int idx_drcr = isFWD * 2 + isRPC;
  
  float etaValue = theTriggerScales->getRegionalEtaScale(idx_drcr)->getCenter( eta_in );

  unsigned eta4bit = 0;
  if ( (isRPC && isFWD && fabs(etaValue) < theGMTScales->getReducedEtaScale(3)->getScaleMin() ) ||
       (isRPC && !isFWD && fabs(etaValue) > theGMTScales->getReducedEtaScale(1)->getScaleMax() )) {
    if(!m_saveFlag) edm::LogWarning("LUTRangeViolation") 
       << "L1MuGMTMIAUEtaConvLUT::TheLookupFunction: RPC " << (isFWD?"fwd":"brl") << " eta value out of range: " << etaValue;
  }
  else 
    eta4bit = theGMTScales->getReducedEtaScale(idx_drcr)->getPacked( etaValue );

  return eta4bit;
}