#include <L1MuGMTMIAUPhiPro1LUT.h>
Public Types | |
enum | { MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC } |
Public Member Functions | |
L1MuGMTMIAUPhiPro1LUT () | |
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 phi_fine, unsigned eta, unsigned pt, unsigned charge) const |
specific lookup function for entire output field | |
unsigned | SpecificLookup_cphi_fine (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const |
specific lookup function for cphi_fine | |
unsigned | SpecificLookup_cphi_ofs (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const |
specific lookup function for cphi_ofs | |
virtual | ~L1MuGMTMIAUPhiPro1LUT () |
destructor | |
Private Member Functions | |
void | InitParameters () |
Initialize scales, configuration parameters, alignment constants, ... | |
unsigned | TheLookupFunction (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const |
The lookup function - here the functionality of the LUT is implemented. | |
Private Attributes | |
float | m_calo_align |
Private data members (LUT parameters);. |
MIAUPhiPro1 look-up table
this class was automatically generated by L1MuGMTLUT::MakeSubClass()
Definition at line 42 of file L1MuGMTMIAUPhiPro1LUT.h.
anonymous enum |
L1MuGMTMIAUPhiPro1LUT::L1MuGMTMIAUPhiPro1LUT | ( | ) | [inline] |
constuctor using function-lookup
Definition at line 48 of file L1MuGMTMIAUPhiPro1LUT.h.
References InitParameters().
: L1MuGMTLUT("MIAUPhiPro1", "MIP_DT MIP_BRPC ISO_DT ISO_BRPC MIP_CSC MIP_FRPC ISO_CSC ISO_FRPC", "phi_fine(3) eta(4) pt(5) charge(1)", "cphi_fine(1) cphi_ofs(3)", 11, false) { InitParameters(); } ;
virtual L1MuGMTMIAUPhiPro1LUT::~L1MuGMTMIAUPhiPro1LUT | ( | ) | [inline, virtual] |
void L1MuGMTMIAUPhiPro1LUT::InitParameters | ( | ) | [private] |
Initialize scales, configuration parameters, alignment constants, ...
Definition at line 43 of file L1MuGMTMIAUPhiPro1LUT.cc.
Referenced by L1MuGMTMIAUPhiPro1LUT().
{ m_calo_align = 0.; //***FIXME: read from DB or .orcarc }
virtual unsigned L1MuGMTMIAUPhiPro1LUT::LookupFunctionPacked | ( | int | idx, |
unsigned | address | ||
) | const [inline, virtual] |
access to lookup function with packed input and output
Reimplemented from L1MuGMTLUT.
Definition at line 92 of file L1MuGMTMIAUPhiPro1LUT.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 L1MuGMTMIAUPhiPro1LUT::SpecificLookup | ( | int | idx, |
unsigned | phi_fine, | ||
unsigned | eta, | ||
unsigned | pt, | ||
unsigned | charge | ||
) | const [inline] |
specific lookup function for entire output field
Definition at line 79 of file L1MuGMTMIAUPhiPro1LUT.h.
References DeDxDiscriminatorTools::charge(), eta, and L1MuGMTLUT::LookupPacked().
{ std::vector<unsigned> addr(4); addr[0] = phi_fine; addr[1] = eta; addr[2] = pt; addr[3] = charge; return LookupPacked(idx, addr); };
unsigned L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine | ( | int | idx, |
unsigned | phi_fine, | ||
unsigned | eta, | ||
unsigned | pt, | ||
unsigned | charge | ||
) | const [inline] |
specific lookup function for cphi_fine
Definition at line 59 of file L1MuGMTMIAUPhiPro1LUT.h.
References DeDxDiscriminatorTools::charge(), eta, and L1MuGMTLUT::Lookup().
Referenced by L1MuGMTPhiProjectionUnit::run().
unsigned L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs | ( | int | idx, |
unsigned | phi_fine, | ||
unsigned | eta, | ||
unsigned | pt, | ||
unsigned | charge | ||
) | const [inline] |
specific lookup function for cphi_ofs
Definition at line 69 of file L1MuGMTMIAUPhiPro1LUT.h.
References DeDxDiscriminatorTools::charge(), eta, and L1MuGMTLUT::Lookup().
Referenced by L1MuGMTPhiProjectionUnit::run().
unsigned L1MuGMTMIAUPhiPro1LUT::TheLookupFunction | ( | int | idx, |
unsigned | phi_fine, | ||
unsigned | eta, | ||
unsigned | pt, | ||
unsigned | charge | ||
) | const [private] |
The lookup function - here the functionality of the LUT is implemented.
Definition at line 85 of file L1MuGMTMIAUPhiPro1LUT.cc.
References L1MuGMTPhiLUT::dphi(), L1MuScale::getLowEdge(), L1MuTriggerPtScale::getPtScale(), L1MuGMTConfig::getTriggerPtScale(), and M_PI.
Referenced by LookupFunctionPacked().
{ // idx is MIP_DT, MIP_BRPC, ISO_DT, ISO_BRPC, MIP_CSC, MIP_FRPC, ISO_CSC, ISO_FRPC // INPUTS: phi_fine(3) eta(4) pt(5) charge(1) // OUTPUTS: cphi_fine(1) cphi_ofs(3) // const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales(); const L1MuTriggerPtScale* theTriggerPtScale = L1MuGMTConfig::getTriggerPtScale(); int isRPC = idx % 2; int isFWD = idx / 4; int isys = isFWD + 2 * isRPC; // DT, CSC, BRPC, FRPC int isISO = (idx / 2) % 2; 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, isISO, ch_idx, (int) eta, theTriggerPtScale->getPtScale()->getLowEdge(pt) ); // use old LUT, here // theTriggerScales->getPtScale()->getLowEdge(pt) ); // use old LUT, here // calculate phi in calo relative to low edge of start region // == use low edge of muon phi bin as dphi was calculated with this assumption float calophi = phi_fine * 2.5 / 180. * M_PI - dphi - m_calo_align; if (charge == 0 && calophi < 0.) { // plus charge edm::LogWarning("LUTMismatch") << "warning: calo offset goes into wrong direction. charge is plus and calophi < 0deg" << endl << "SYS=" << ( isys==0?"DT":isys==1? "CSC" : isys== 2? "BRPC" : "FRPC" ) << " ISO = " << isISO << " etabin = " << eta << " pval = " << theTriggerPtScale->getPtScale()->getLowEdge(pt) // << " pval = " << theTriggerScales->getPtScale()->getLowEdge(pt) << " charge = " << ( charge==0?"pos":"neg" ) << " phi_fine = " << phi_fine << " calophi(deg) = " << calophi * 180. / M_PI << endl; } else if (charge == 1 && calophi > 20. / 180. * M_PI) { // neg charge edm::LogWarning("LUTMismatch") << "warning: calo offset goes into wrong direction. charge is minus and calophi > 20deg" << endl << "SYS=" << ( isys==0?"DT":isys==1? "CSC" : isys== 2? "BRPC" : "FRPC" ) << " ISO = " << isISO << " etabin = " << eta << " pval = " << theTriggerPtScale->getPtScale()->getLowEdge(pt) // << " pval = " << theTriggerScales->getPtScale()->getLowEdge(pt) << " charge = " << ( charge==0?"pos":"neg" ) << " phi_fine = " << phi_fine << " calophi(deg) = " << calophi * 180. / M_PI << endl; } // which half of calo region int cphi_fine = (int) ( ( calophi + 2. * M_PI ) / ( 10. / 180. * M_PI ) ); cphi_fine %= 2; // shift by one region so that an offset in wrong direction w.r.t. bending becomes possible // (may be necessary to accomodate a calo alignment) if (charge == 1) // neg charge calophi = 20. / 180 * M_PI - calophi; calophi += 20. / 180 * M_PI; if (calophi < 0.) { edm::LogWarning("LUTMismatch") << "warning: calo offset goes into wrong direction by more than 20deg !!!! please correct!" << endl; calophi = 0.; } int cphi_ofs = (int) ( calophi / ( 20. / 180. * M_PI) ); // in 20 deg regions // 0; -1 region; 1 no offset; 2: +1 region , ... 7: +6 regions if (cphi_ofs > 7) { edm::LogWarning("LUTMismatch") << "warning: calo offset is larger than 6 regions !!!! please correct!" << endl; cphi_ofs = 7; } return ( (cphi_fine << 3) + cphi_ofs ); }
float L1MuGMTMIAUPhiPro1LUT::m_calo_align [private] |
Private data members (LUT parameters);.
Definition at line 106 of file L1MuGMTMIAUPhiPro1LUT.h.