CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions

L1MuGMTLFMergeRankEtaQLUT Class Reference

#include <L1MuGMTLFMergeRankEtaQLUT.h>

Inheritance diagram for L1MuGMTLFMergeRankEtaQLUT:
L1MuGMTLUT

List of all members.

Public Types

enum  { DT, BRPC, CSC, FRPC }

Public Member Functions

 L1MuGMTLFMergeRankEtaQLUT ()
 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, unsigned q) const
 specific lookup function for entire output field
unsigned SpecificLookup_flag (int idx, unsigned eta, unsigned q) const
 specific lookup function for flag
unsigned SpecificLookup_rank_etaq (int idx, unsigned eta, unsigned q) const
 specific lookup function for rank_etaq
virtual ~L1MuGMTLFMergeRankEtaQLUT ()
 destructor

Private Member Functions

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

Detailed Description

LFMergeRankEtaQ look-up table

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

Definition at line 42 of file L1MuGMTLFMergeRankEtaQLUT.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
DT 
BRPC 
CSC 
FRPC 

Definition at line 45 of file L1MuGMTLFMergeRankEtaQLUT.h.

{DT, BRPC, CSC, FRPC};

Constructor & Destructor Documentation

L1MuGMTLFMergeRankEtaQLUT::L1MuGMTLFMergeRankEtaQLUT ( ) [inline]

constuctor using function-lookup

Definition at line 48 of file L1MuGMTLFMergeRankEtaQLUT.h.

References InitParameters().

                              : L1MuGMTLUT("LFMergeRankEtaQ", 
                                       "DT BRPC CSC FRPC",
                                       "eta(6) q(3)",
                                       "flag(1) rank_etaq(7)", 8, false) {
    InitParameters();
  } ;
virtual L1MuGMTLFMergeRankEtaQLUT::~L1MuGMTLFMergeRankEtaQLUT ( ) [inline, virtual]

destructor

Definition at line 56 of file L1MuGMTLFMergeRankEtaQLUT.h.

{};

Member Function Documentation

void L1MuGMTLFMergeRankEtaQLUT::InitParameters ( ) [private]

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

Definition at line 38 of file L1MuGMTLFMergeRankEtaQLUT.cc.

Referenced by L1MuGMTLFMergeRankEtaQLUT().

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

access to lookup function with packed input and output

Reimplemented from L1MuGMTLUT.

Definition at line 86 of file L1MuGMTLFMergeRankEtaQLUT.h.

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

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

  };
unsigned L1MuGMTLFMergeRankEtaQLUT::SpecificLookup ( int  idx,
unsigned  eta,
unsigned  q 
) const [inline]

specific lookup function for entire output field

Definition at line 75 of file L1MuGMTLFMergeRankEtaQLUT.h.

References eta(), L1MuGMTLUT::LookupPacked(), and lumiQueryAPI::q.

                                                                    {
    std::vector<unsigned> addr(2);
    addr[0] = eta;
    addr[1] = q;
    return LookupPacked(idx, addr);
  };
unsigned L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_flag ( int  idx,
unsigned  eta,
unsigned  q 
) const [inline]

specific lookup function for flag

Definition at line 59 of file L1MuGMTLFMergeRankEtaQLUT.h.

References eta(), L1MuGMTLUT::Lookup(), and lumiQueryAPI::q.

Referenced by L1MuGMTMerger::merge_rank().

                                                                         {
    std::vector<unsigned> addr(2);
    addr[0] = eta;
    addr[1] = q;
    return Lookup(idx, addr) [0];
  };
unsigned L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_rank_etaq ( int  idx,
unsigned  eta,
unsigned  q 
) const [inline]

specific lookup function for rank_etaq

Definition at line 67 of file L1MuGMTLFMergeRankEtaQLUT.h.

References eta(), L1MuGMTLUT::Lookup(), and lumiQueryAPI::q.

Referenced by L1MuGMTMerger::merge_rank().

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

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

Definition at line 45 of file L1MuGMTLFMergeRankEtaQLUT.cc.

References L1MuScale::getCenter(), L1MuTriggerScales::getRegionalEtaScale(), L1MuGMTConfig::getTriggerScales(), and lumiQueryAPI::q.

Referenced by LookupFunctionPacked().

                                                                                              {
  // idx is DT, BRPC, CSC, FRPC
  // INPUTS:  eta(6) q(3)
  // OUTPUTS: flag(1) rank_etaq(7) 

  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();

  //  int isRPC = idx % 2;
  //  int isFWD = idx / 2;
 
  float etaValue = theTriggerScales->getRegionalEtaScale(idx)->getCenter( eta );
  
  
  unsigned flag = 0;
  switch (idx) {
  case 0: // DT
    if ( (q==1 || q==4 || q==6 || q==7) ||
               ( (q==2 || q==3) && (fabs(etaValue) < 0.9) ) ) flag=1;
    break;
  case 1: // bRPC
    if (q==0) flag=1; 
    break;  
  case 2: // CSC
    if ( (q==2 || fabs(etaValue) < 1.2) || 
         q==3) flag =1; 
    break; 
  case 3: // fRPC
    if (q==3) flag =1;
  }

  // use local quality as rank
  unsigned rank_etaq = q;
  // add 1 to RPC in order to promote it in case of equality (should go with the fix in L1MuGMTMerger.cc)
  if( idx==1 || idx==3 ) rank_etaq++;
  // in the overlap region promote RPC
  if( (idx==1 || idx==3) && (fabs(etaValue)>1. && fabs(etaValue)<1.23) ) rank_etaq=7;

  return flag << 7 | rank_etaq;
}