CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions

L1MuGMTLFPhiProLUT Class Reference

#include <L1MuGMTLFPhiProLUT.h>

Inheritance diagram for L1MuGMTLFPhiProLUT:
L1MuGMTLUT

List of all members.

Public Types

enum  { DT, BRPC, CSC, FRPC }

Public Member Functions

 L1MuGMTLFPhiProLUT ()
 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 pt, unsigned charge) const
 specific lookup function for entire output field
unsigned SpecificLookup_dphi (int idx, unsigned eta, unsigned pt, unsigned charge) const
 specific lookup function for dphi
virtual ~L1MuGMTLFPhiProLUT ()
 destructor

Private Member Functions

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

Detailed Description

LFPhiPro look-up table

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

Definition at line 42 of file L1MuGMTLFPhiProLUT.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
DT 
BRPC 
CSC 
FRPC 

Definition at line 45 of file L1MuGMTLFPhiProLUT.h.

{DT, BRPC, CSC, FRPC};

Constructor & Destructor Documentation

L1MuGMTLFPhiProLUT::L1MuGMTLFPhiProLUT ( ) [inline]

constuctor using function-lookup

Definition at line 48 of file L1MuGMTLFPhiProLUT.h.

References InitParameters().

                       : L1MuGMTLUT("LFPhiPro", 
                                       "DT BRPC CSC FRPC",
                                       "eta(4) pt(5) charge(1)",
                                       "dphi(9)", 10, false) {
    InitParameters();
  } ;
virtual L1MuGMTLFPhiProLUT::~L1MuGMTLFPhiProLUT ( ) [inline, virtual]

destructor

Definition at line 56 of file L1MuGMTLFPhiProLUT.h.

{};

Member Function Documentation

void L1MuGMTLFPhiProLUT::InitParameters ( ) [private]

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

Definition at line 42 of file L1MuGMTLFPhiProLUT.cc.

Referenced by L1MuGMTLFPhiProLUT().

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

access to lookup function with packed input and output

Reimplemented from L1MuGMTLUT.

Definition at line 80 of file L1MuGMTLFPhiProLUT.h.

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

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

  };
unsigned L1MuGMTLFPhiProLUT::SpecificLookup ( int  idx,
unsigned  eta,
unsigned  pt,
unsigned  charge 
) const [inline]

specific lookup function for entire output field

Definition at line 68 of file L1MuGMTLFPhiProLUT.h.

References DeDxDiscriminatorTools::charge(), eta, and L1MuGMTLUT::LookupPacked().

                                                                                      {
    std::vector<unsigned> addr(3);
    addr[0] = eta;
    addr[1] = pt;
    addr[2] = charge;
    return LookupPacked(idx, addr);
  };
unsigned L1MuGMTLFPhiProLUT::SpecificLookup_dphi ( int  idx,
unsigned  eta,
unsigned  pt,
unsigned  charge 
) const [inline]

specific lookup function for dphi

Definition at line 59 of file L1MuGMTLFPhiProLUT.h.

References DeDxDiscriminatorTools::charge(), eta, and L1MuGMTLUT::Lookup().

Referenced by L1MuGMTMerger::projectedPhi().

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

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

Definition at line 59 of file L1MuGMTLFPhiProLUT.cc.

References L1MuGMTPhiLUT::dphi(), L1MuScale::getLowEdge(), L1MuGMTConfig::getPropagatePhi(), L1MuTriggerPtScale::getPtScale(), L1MuGMTConfig::getTriggerPtScale(), M_PI, and L1MuSignedPacking< Bits >::packedFromIdx().

Referenced by LookupFunctionPacked().

                                                                                                         {
  // idx is DT, BRPC, CSC, FRPC
  // INPUTS:  eta(4) pt(5) charge(1)
  // OUTPUTS: dphi(9) 

//  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
  const L1MuTriggerPtScale* theTriggerPtScale = L1MuGMTConfig::getTriggerPtScale();

  //  static bool doProjection = SimpleConfigurable<bool> (false, "L1GlobalMuonTrigger:PropagatePhi" );
  static bool doProjection = L1MuGMTConfig::getPropagatePhi();

  if (!doProjection) return 0;

  int isRPC = idx % 2;
  int isFWD = idx / 2;
      
  int isys = isFWD + 2 * isRPC; // DT, CSC, BRPC, FRPC
  int ch_idx = (charge == 0) ? 1 : 0; // positive charge is 0 (but idx 1)

  // currently only support 3-bit eta (3 lower bits); ignore 4th bit
  if (eta>7) eta -= 8;

  float dphi =  L1MuGMTPhiLUT::dphi (isys, 1, ch_idx, (int) eta, 
     theTriggerPtScale->getPtScale()->getLowEdge(pt) );  // use old LUT, here
  // theTriggerScales->getPtScale()->getLowEdge(pt) );  // use old LUT, here
  
  int dphi_int = (int) ( (-dphi + 1.25 / 180. * M_PI + 2* M_PI ) / ( 2.5 / 180. * M_PI ) ) - 144;
    
  L1MuSignedPacking<9> PhiPacking;
  return PhiPacking.packedFromIdx(dphi_int);
}