#include <Lut.h>
Public Member Functions | |
void | DSPtoIEEE32 (short DSPmantissa, short DSPexp, float *f) |
int | get_k (int addr) |
int | get_x (int addr) |
void | IEEE32toDSP (float f, short *DSPmantissa, short *DSPexp) |
Lut (DTConfigLUTs *conf, int ntc) | |
Lut () | |
void | setForTestBeam (int station, int board, int traco) |
~Lut () | |
Public Attributes | |
float | m_d |
int | m_ST |
int | m_wheel |
float | m_Xcn |
Private Attributes | |
DTConfigLUTs * | _conf_luts |
float | m_pitch_d_ST |
Class for computing single Traco LUT from given parameters
Lut::Lut | ( | DTConfigLUTs * | conf, |
int | ntc | ||
) |
Definition at line 10 of file Lut.cc.
References _conf_luts, DTConfigLUTs::BTIC(), CELL_PITCH, gather_cfg::cout, DTConfigLUTs::D(), m_d, m_pitch_d_ST, m_ST, m_wheel, m_Xcn, DTConfigLUTs::Wheel(), and DTConfigLUTs::Xcn().
: _conf_luts(conf) { // set parameters from configuration m_d = _conf_luts->D(); m_ST = _conf_luts->BTIC(); m_wheel = _conf_luts->Wheel(); m_Xcn = _conf_luts->Xcn() - (CELL_PITCH * 4.0 * (float)(ntc-1) * (float) m_wheel); m_pitch_d_ST = CELL_PITCH / m_ST; std::cout<< "Lut::Lut -> m_d " << m_d << " m_ST " << m_ST << " m_wheel " << m_wheel << " m_Xcn " << m_Xcn << " ntc " << ntc << std::endl; return; }
void Lut::DSPtoIEEE32 | ( | short | DSPmantissa, |
short | DSPexp, | ||
float * | f | ||
) |
int Lut::get_k | ( | int | addr | ) |
Definition at line 95 of file Lut.cc.
References ANGRESOL, CELL_PITCH, i, m_ST, m_wheel, SL_D, and ExpressReco_HICollisions_FallBack::x.
Referenced by DTTracoChip::calculateAngles().
int Lut::get_x | ( | int | addr | ) |
Definition at line 109 of file Lut.cc.
References a, b, i, m_d, m_pitch_d_ST, m_wheel, m_Xcn, POSRESOL, SL_DIFF, and ExpressReco_HICollisions_FallBack::x.
Referenced by DTTracoChip::calculateAngles().
void Lut::IEEE32toDSP | ( | float | f, |
short * | DSPmantissa, | ||
short * | DSPexp | ||
) |
void Lut::setForTestBeam | ( | int | station, |
int | board, | ||
int | traco | ||
) |
Definition at line 27 of file Lut.cc.
References m_d, m_ST, m_Xcn, and relativeConstraints::station.
{ // set parameters from fixed values for MB1 nd MB3 (used in Testbeams 2003 2004) int nStat = station; int nBoard = board; int nTraco = traco; float tracoPos[50]; if( nStat ==1 ){ tracoPos[ 0] = -120.19; tracoPos[ 1] = -103.39; tracoPos[ 2] = -86.59; tracoPos[ 3] = -69.80; tracoPos[10] = -52.99; tracoPos[11] = -36.19; tracoPos[12] = -19.39; tracoPos[13] = -2.59; tracoPos[20] = 14.20; tracoPos[21] = 31.00; tracoPos[22] = 47.80; tracoPos[23] = 64.60; tracoPos[30] = 81.40; m_d = 431.175; m_ST = 31; float m_Xc = tracoPos[ ( nBoard * 10 ) + nTraco ]; float m_Xn = +39.0; m_Xcn = m_Xn - m_Xc; //m_stsize = m_CELL_PITCH / m_ST; //m_distp2 = 0.5 + ( 2.0 * m_CELL_H * m_ST / m_CELL_PITCH ); } if( nStat ==3){ tracoPos[ 0] = -165.45; tracoPos[ 1] = -148.65; tracoPos[ 2] = -131.85; tracoPos[ 3] = -115.05; tracoPos[10] = -98.25; tracoPos[11] = -81.45; tracoPos[12] = -64.65; tracoPos[13] = -47.85; tracoPos[20] = -31.05; tracoPos[21] = -14.25; tracoPos[22] = 2.54; tracoPos[23] = 19.34; tracoPos[30] = 36.14; tracoPos[31] = 52.94; tracoPos[32] = 69.74; tracoPos[33] = 86.54; tracoPos[40] = 103.34; tracoPos[41] = 120.14; tracoPos[42] = 136.94; tracoPos[43] = 153.74; m_d = 512.47; m_ST = 31; float m_Xc = tracoPos[ ( nBoard * 10 ) + nTraco ]; float m_Xn = -21.0; m_Xcn = m_Xn - m_Xc; //m_stsize = m_CELL_PITCH / m_ST; //m_distp2 = 0.5 + ( 2.0 * m_CELL_H * m_ST / m_CELL_PITCH ); } return; }
DTConfigLUTs* Lut::_conf_luts [private] |
float Lut::m_d |
Definition at line 52 of file Lut.h.
Referenced by get_x(), Lut(), and setForTestBeam().
float Lut::m_pitch_d_ST [private] |
int Lut::m_ST |
Definition at line 54 of file Lut.h.
Referenced by get_k(), Lut(), and setForTestBeam().
float Lut::m_Xcn |
Definition at line 53 of file Lut.h.
Referenced by get_x(), Lut(), and setForTestBeam().