#include <L1MuGMTMIAUPhiPro2LUT.h>
Public Types | |
enum | { MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC } |
Public Member Functions | |
L1MuGMTMIAUPhiPro2LUT () | |
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 cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const |
specific lookup function for entire output field | |
unsigned | SpecificLookup_phi_sel (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const |
specific lookup function for phi_sel | |
virtual | ~L1MuGMTMIAUPhiPro2LUT () |
destructor | |
Private Member Functions | |
void | InitParameters () |
Initialize scales, configuration parameters, alignment constants, ... | |
unsigned | TheLookupFunction (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const |
The lookup function - here the functionality of the LUT is implemented. | |
Private Attributes | |
int | m_IsolationCellSizePhi |
Private data members (LUT parameters);. |
MIAUPhiPro2 look-up table
this class was automatically generated by L1MuGMTLUT::MakeSubClass()
Definition at line 43 of file L1MuGMTMIAUPhiPro2LUT.h.
anonymous enum |
L1MuGMTMIAUPhiPro2LUT::L1MuGMTMIAUPhiPro2LUT | ( | ) | [inline] |
constuctor using function-lookup
Definition at line 49 of file L1MuGMTMIAUPhiPro2LUT.h.
References InitParameters().
: L1MuGMTLUT("MIAUPhiPro2", "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC", "cphi_start(5) cphi_fine(1) cphi_ofs(3) charge(1)", "phi_sel(18)", 11, false) { InitParameters(); } ;
virtual L1MuGMTMIAUPhiPro2LUT::~L1MuGMTMIAUPhiPro2LUT | ( | ) | [inline, virtual] |
void L1MuGMTMIAUPhiPro2LUT::InitParameters | ( | ) | [private] |
Initialize scales, configuration parameters, alignment constants, ...
Definition at line 35 of file L1MuGMTMIAUPhiPro2LUT.cc.
References L1MuGMTConfig::getIsolationCellSizePhi(), and m_IsolationCellSizePhi.
Referenced by L1MuGMTMIAUPhiPro2LUT().
virtual unsigned L1MuGMTMIAUPhiPro2LUT::LookupFunctionPacked | ( | int | idx, |
unsigned | address | ||
) | const [inline, virtual] |
access to lookup function with packed input and output
Reimplemented from L1MuGMTLUT.
Definition at line 83 of file L1MuGMTMIAUPhiPro2LUT.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] ,addr[3]); };
unsigned L1MuGMTMIAUPhiPro2LUT::SpecificLookup | ( | int | idx, |
unsigned | cphi_start, | ||
unsigned | cphi_fine, | ||
unsigned | cphi_ofs, | ||
unsigned | charge | ||
) | const [inline] |
specific lookup function for entire output field
Definition at line 70 of file L1MuGMTMIAUPhiPro2LUT.h.
References DeDxDiscriminatorTools::charge(), and L1MuGMTLUT::LookupPacked().
{ std::vector<unsigned> addr(4); addr[0] = cphi_start; addr[1] = cphi_fine; addr[2] = cphi_ofs; addr[3] = charge; return LookupPacked(idx, addr); };
unsigned L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel | ( | int | idx, |
unsigned | cphi_start, | ||
unsigned | cphi_fine, | ||
unsigned | cphi_ofs, | ||
unsigned | charge | ||
) | const [inline] |
specific lookup function for phi_sel
Definition at line 60 of file L1MuGMTMIAUPhiPro2LUT.h.
References DeDxDiscriminatorTools::charge(), and L1MuGMTLUT::Lookup().
Referenced by L1MuGMTPhiProjectionUnit::run().
unsigned L1MuGMTMIAUPhiPro2LUT::TheLookupFunction | ( | int | idx, |
unsigned | cphi_start, | ||
unsigned | cphi_fine, | ||
unsigned | cphi_ofs, | ||
unsigned | charge | ||
) | const [private] |
The lookup function - here the functionality of the LUT is implemented.
Definition at line 51 of file L1MuGMTMIAUPhiPro2LUT.cc.
References i, m_IsolationCellSizePhi, and evf::evtn::offset().
Referenced by LookupFunctionPacked().
{ // idx is MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC // INPUTS: cphi_start(5) cphi_fine(1) cphi_ofs(3) charge(1) // OUTPUTS: phi_sel(18) // this LUT generates the 18 phi-select bits for the 18 Calo regions if (cphi_start > 17) return 0; int isISO = (idx / 2) % 2; int offset = ( int(cphi_ofs) - 1 ) * ( (charge==0) ? 1 : -1 ); int center_region = ( 18 + int(cphi_start) + offset ) % 18; // for MIP bit assignment, only one region is selected unsigned phi_select_word = 1 << center_region; // for ISOlation bit assignment, multiple regions can be selected according to the IsolationCellSize if (isISO) { int imin = center_region - ( m_IsolationCellSizePhi-1 ) / 2; int imax = center_region + ( m_IsolationCellSizePhi-1 ) / 2; // for even number of isolation cells check the fine grain info if (m_IsolationCellSizePhi%2 == 0) { if ( cphi_fine==1 ) imax++; else imin--; } for (int i=imin; i<=imax; i++ ) phi_select_word |= 1 << ( (i+18) % 18 ); } return phi_select_word; }
int L1MuGMTMIAUPhiPro2LUT::m_IsolationCellSizePhi [private] |
Private data members (LUT parameters);.
Definition at line 97 of file L1MuGMTMIAUPhiPro2LUT.h.
Referenced by InitParameters(), and TheLookupFunction().