#include <L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProLUT.h>
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. |
this class was automatically generated by L1MuGMTLUT::MakeSubClass()
Definition at line 42 of file L1MuGMTLFPhiProLUT.h.
anonymous enum |
L1MuGMTLFPhiProLUT::L1MuGMTLFPhiProLUT | ( | ) | [inline] |
constuctor using function-lookup
Definition at line 48 of file L1MuGMTLFPhiProLUT.h.
References InitParameters().
00048 : L1MuGMTLUT("LFPhiPro", 00049 "DT BRPC CSC FRPC", 00050 "eta(4) pt(5) charge(1)", 00051 "dphi(9)", 10, false) { 00052 InitParameters(); 00053 } ;
virtual L1MuGMTLFPhiProLUT::~L1MuGMTLFPhiProLUT | ( | ) | [inline, virtual] |
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 addr, L1MuGMTLUT::m_Inputs, TheLookupFunction(), and L1MuGMTLUT::u2vec().
00080 { 00081 std::vector<unsigned> addr = u2vec(address, m_Inputs); 00082 return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2]); 00083 00084 };
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 addr, and L1MuGMTLUT::LookupPacked().
00068 { 00069 std::vector<unsigned> addr(3); 00070 addr[0] = eta; 00071 addr[1] = pt; 00072 addr[2] = charge; 00073 return LookupPacked(idx, addr); 00074 };
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 addr, and L1MuGMTLUT::Lookup().
Referenced by L1MuGMTMerger::projectedPhi().
00059 { 00060 std::vector<unsigned> addr(3); 00061 addr[0] = eta; 00062 addr[1] = pt; 00063 addr[2] = charge; 00064 return Lookup(idx, addr) [0]; 00065 };
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(), int, and L1MuSignedPacking< Bits >::packedFromIdx().
Referenced by LookupFunctionPacked().
00059 { 00060 // idx is DT, BRPC, CSC, FRPC 00061 // INPUTS: eta(4) pt(5) charge(1) 00062 // OUTPUTS: dphi(9) 00063 00064 // const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales(); 00065 const L1MuTriggerPtScale* theTriggerPtScale = L1MuGMTConfig::getTriggerPtScale(); 00066 00067 // static bool doProjection = SimpleConfigurable<bool> (false, "L1GlobalMuonTrigger:PropagatePhi" ); 00068 static bool doProjection = L1MuGMTConfig::getPropagatePhi(); 00069 00070 if (!doProjection) return 0; 00071 00072 int isRPC = idx % 2; 00073 int isFWD = idx / 2; 00074 00075 int isys = isFWD + 2 * isRPC; // DT, CSC, BRPC, FRPC 00076 int ch_idx = (charge == 0) ? 1 : 0; // positive charge is 0 (but idx 1) 00077 00078 // currently only support 3-bit eta (3 lower bits); ignore 4th bit 00079 if (eta>7) eta -= 8; 00080 00081 float dphi = L1MuGMTPhiLUT::dphi (isys, 1, ch_idx, (int) eta, 00082 theTriggerPtScale->getPtScale()->getLowEdge(pt) ); // use old LUT, here 00083 // theTriggerScales->getPtScale()->getLowEdge(pt) ); // use old LUT, here 00084 00085 int dphi_int = (int) ( (-dphi + 1.25 / 180. * M_PI + 2* M_PI ) / ( 2.5 / 180. * M_PI ) ) - 144; 00086 00087 L1MuSignedPacking<9> PhiPacking; 00088 return PhiPacking.packedFromIdx(dphi_int); 00089 }