CMS 3D CMS Logo

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

L1MuGMTLFSortRankEtaQLUT Class Reference

#include <L1MuGMTLFSortRankEtaQLUT.h>

Inheritance diagram for L1MuGMTLFSortRankEtaQLUT:
L1MuGMTLUT

List of all members.

Public Types

enum  { DT, BRPC, CSC, FRPC }

Public Member Functions

 L1MuGMTLFSortRankEtaQLUT ()
 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_rank_etaq (int idx, unsigned eta, unsigned q) const
 specific lookup function for rank_etaq
unsigned SpecificLookup_vlq (int idx, unsigned eta, unsigned q) const
 specific lookup function for vlq
virtual ~L1MuGMTLFSortRankEtaQLUT ()
 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.

Private Attributes

unsigned m_version
 Private data members (LUT parameters);.

Detailed Description

LFSortRankEtaQ look-up table

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

Definition at line 42 of file L1MuGMTLFSortRankEtaQLUT.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
DT 
BRPC 
CSC 
FRPC 

Definition at line 45 of file L1MuGMTLFSortRankEtaQLUT.h.

{DT, BRPC, CSC, FRPC};

Constructor & Destructor Documentation

L1MuGMTLFSortRankEtaQLUT::L1MuGMTLFSortRankEtaQLUT ( ) [inline]

constuctor using function-lookup

Definition at line 48 of file L1MuGMTLFSortRankEtaQLUT.h.

References InitParameters().

                             : L1MuGMTLUT("LFSortRankEtaQ", 
                                       "DT BRPC CSC FRPC",
                                       "eta(6) q(3)",
                                       "vlq(2) rank_etaq(2)", 7, false) {
    InitParameters();
  } ;
virtual L1MuGMTLFSortRankEtaQLUT::~L1MuGMTLFSortRankEtaQLUT ( ) [inline, virtual]

destructor

Definition at line 56 of file L1MuGMTLFSortRankEtaQLUT.h.

{};

Member Function Documentation

void L1MuGMTLFSortRankEtaQLUT::InitParameters ( ) [private]

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

Definition at line 37 of file L1MuGMTLFSortRankEtaQLUT.cc.

References L1MuGMTConfig::getVersionSortRankEtaQLUT(), and m_version.

Referenced by L1MuGMTLFSortRankEtaQLUT().

virtual unsigned L1MuGMTLFSortRankEtaQLUT::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 L1MuGMTLFSortRankEtaQLUT.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 L1MuGMTLFSortRankEtaQLUT::SpecificLookup ( int  idx,
unsigned  eta,
unsigned  q 
) const [inline]

specific lookup function for entire output field

Definition at line 75 of file L1MuGMTLFSortRankEtaQLUT.h.

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

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

specific lookup function for rank_etaq

Definition at line 67 of file L1MuGMTLFSortRankEtaQLUT.h.

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

Referenced by L1MuGMTSortRankUnit::sort_rank().

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

specific lookup function for vlq

Definition at line 59 of file L1MuGMTLFSortRankEtaQLUT.h.

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

Referenced by L1MuGMTSortRankUnit::getVeryLowQualityLevel().

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

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

Definition at line 81 of file L1MuGMTLFSortRankEtaQLUT.cc.

References L1MuScale::getCenter(), L1MuGMTConfig::getDoOvlRpcAnd(), L1MuTriggerScales::getRegionalEtaScale(), L1MuGMTConfig::getTriggerScales(), and m_version.

Referenced by LookupFunctionPacked().

                                                                                             {
  // idx is DT, BRPC, CSC, FRPC
  // INPUTS:  eta(6) q(3)
  // OUTPUTS: vlq(2) rank_etaq(2) 

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

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

  float etaValue = fabs ( theTriggerScales->getRegionalEtaScale(idx)->getCenter( eta ) );

  //
  // very-low-quality flags
  //
  // 0 .. no VLQ set
  // 1 .. output muon will be quality 2 (disable in single and di-muon trigger)
  // 2 .. output muon will be quality 3 (disable in single-muon trigger only)
  // 3 .. output muon will be quality 4 (disable in di-muon trigger only)

  unsigned vlq = 0;
  
  int vCSC2 = (m_version) & 0xf;
  int vCSC1 = (m_version>>4) & 0xf;
  int vRPC =  (m_version>>8) & 0xf;
  
  // RPC selection
  if (isRPC) {
    if(vRPC == 0) {
      if ( ( q == 0 && ( ( etaValue > 1.04 && etaValue < 1.24 ) || // Q0, high rate, high noise
          ( etaValue > 1.48 ) ) ) ||                // Q0, high rate, high noise
          ( q == 1 && ( ( etaValue > 0.83 && etaValue < 1.04 ) || // Q1, high rate
              ( etaValue > 1.14 && etaValue < 1.24 ) || // Q1, high noise
              ( etaValue > 1.36 ) ) ) ||                // Q1, high rate
              ( q == 2 && ( etaValue > 0.83 && etaValue < 0.93 ) ) )  // Q2, high rate
        vlq = 1;
    }
  }                         
      
  // CSC selection
  if ( idx == 2 ) { // CSC
    if (q == 2) {
      if(vCSC2 == 1) vlq = 2;
      if(vCSC2 == 2) {
        if(etaValue < 1.5 || etaValue > 1.8) vlq = 2; // disable in single-muon trigger only
      }
      if(vCSC2 == 3) {
        if( (etaValue > 1.2 && etaValue < 1.5) || etaValue > 1.8) vlq = 2; // disable in single-muon trigger only
      }
    }
    
    if (q == 1) {
      if(vCSC1 == 0) {
        if(etaValue > 1.2) vlq = 2;   // disable in single-muon trigger only
      }
      if(vCSC1 == 1) {
        if(etaValue > 1.3) vlq = 2;   // disable in single-muon trigger only
      }
    }
  }
    
  if ( L1MuGMTConfig::getDoOvlRpcAnd() ) {
    if ( idx == 0 ) { // DT
      if ( etaValue > 0.91 ) vlq = 1;
    }
    if ( idx == 2 ) { // CSC
      if ( etaValue <  1.06 ) vlq = 1;  
    }
  }

  //
  // Rank contribution from eta and quality
  //

  // by default return maximum 
  // LUT can later be used to reduce the sort rank of certain regions
  unsigned rank_etaq = 3;

  return (vlq << 2)  | rank_etaq;
}

Member Data Documentation

Private data members (LUT parameters);.

Definition at line 100 of file L1MuGMTLFSortRankEtaQLUT.h.

Referenced by InitParameters(), and TheLookupFunction().