ATLAS Offline Software
|
#include <JetSignalStateCnv.h>
Public Types | |
enum | CompressionLevel { HIGH, MEDIUM, LOW, NO_COMPRESSION } |
Public Member Functions | |
SignalStateCnv () | |
char | round (double d) const |
char | char_from_ratio (double r) const |
double | ratio_from_char (char c) const |
JetConverterTypes::signalState_pers_t | compress (const JetConverterTypes::momentum &momCal, const JetConverterTypes::momentum &momRaw, CompressionLevel level, MsgStream &msg) const |
JetConverterTypes::momentum | decompress (const JetConverterTypes::signalState_pers_t &ps, JetConverterTypes::momentum momCal, MsgStream &msg) const |
Public Attributes | |
double | m_delta_p |
double | m_step_p |
double | m_delta_m |
double | m_step_m |
double | m_center |
to convert a double into a char
New implementation: Sept. 12th 2008 Rolf Seuster
Still keep the old implementation around - we need this to read old jets. Now, we store the differences as Delta_0 = M_cal / M_raw - 1 Delta_1 = phi_cal - phi_raw Delta_2 = eta_cal - eta_raw Delta_3 = Pt_cal / Pt_raw - 1
These differences will in general be small, so storing them as a semi-float will help. The new functions return a vector<unsigned short> where all deltas are compressed together, a bit simular to EventCommonTPCnv/Compressor. An additional parameter determines the compression, store everything in 2, 3, 4, 6 or 8 short. 2 short == 4 char = 8 bit / delta : 3 exponent, 1 sign, 4 mantissa 3 short == 48 bit = 12 bit / delta : 4 exponent, 1 sign, 7 mantissa 4 short == 64 bit = 16 bit / delta : 5 exponent, 1 sign, 10 mantissa 8 short == 128 bit == 4 floats We can also take into account that: Delta_0/3 are always positive Delta_1 is in [-pi;pi] to improve the precision.
Convert ratio of calibrated and uncalibrated jet quantities into a char. It is assumed that the ratio is in a given range so that he precision loss due to converting a float in a double is small (~0.5 %)
first implementation (before finding better/cleaner way?)
Definition at line 50 of file JetSignalStateCnv.h.
|
inline |
|
inline |
|
inline |
Definition at line 100 of file JetSignalStateCnv.h.
|
inline |
Definition at line 394 of file JetSignalStateCnv.h.
|
inline |
|
inline |
Definition at line 71 of file JetSignalStateCnv.h.
double SignalStateCnv::m_center |
Definition at line 67 of file JetSignalStateCnv.h.
double SignalStateCnv::m_delta_m |
Definition at line 65 of file JetSignalStateCnv.h.
double SignalStateCnv::m_delta_p |
Definition at line 63 of file JetSignalStateCnv.h.
double SignalStateCnv::m_step_m |
Definition at line 66 of file JetSignalStateCnv.h.
double SignalStateCnv::m_step_p |
Definition at line 64 of file JetSignalStateCnv.h.