#include <CondFormats/HcalObjects/interface/HcalQIEShape.h>
Public Member Functions | |
float | center (unsigned fAdc) const |
HcalQIEShape () | |
float | highEdge (unsigned fAdc) const |
unsigned | local (unsigned fAdc) const |
float | lowEdge (unsigned fAdc) const |
unsigned | range (unsigned fAdc) const |
bool | setLowEdges (const float fValue[32]) |
~HcalQIEShape () | |
Private Member Functions | |
void | expand () |
bool | setLowEdge (float fValue, unsigned fAdc) |
Private Attributes | |
float | mValues [129] |
Definition at line 17 of file HcalQIEShape.h.
HcalQIEShape::HcalQIEShape | ( | ) |
HcalQIEShape::~HcalQIEShape | ( | ) |
float HcalQIEShape::center | ( | unsigned | fAdc | ) | const |
Definition at line 44 of file HcalQIEShape.cc.
References mValues.
Referenced by HcalQIECoder::charge().
00044 { 00045 if (fAdc < 128) { 00046 if (fAdc % 32 == 31) return 0.5 * (3 * mValues [fAdc] - mValues [fAdc - 1]); // extrapolate 00047 else return 0.5 * (mValues [fAdc] + mValues [fAdc + 1]); // interpolate 00048 } 00049 return 0.; 00050 }
void HcalQIEShape::expand | ( | ) | [private] |
Definition at line 26 of file HcalQIEShape.cc.
References i, index, mValues, range(), and scale.
Referenced by HcalQIEShape(), and setLowEdges().
00026 { 00027 int scale = 1; 00028 for (unsigned range = 1; range < 4; range++) { 00029 scale = scale * 5; 00030 unsigned index = range * 32; 00031 mValues [index] = mValues [index - 2]; // link to previous range 00032 for (unsigned i = 1; i < 32; i++) { 00033 mValues [index + i] = mValues [index + i - 1] + scale * (mValues [i] - mValues [i - 1]); 00034 } 00035 } 00036 mValues [128] = 2 * mValues [127] - mValues [126]; // extrapolate 00037 }
float HcalQIEShape::highEdge | ( | unsigned | fAdc | ) | const |
Definition at line 52 of file HcalQIEShape.cc.
References mValues.
Referenced by HcalQIECoder::adc().
00052 { 00053 if (fAdc < 128) return mValues [fAdc+1]; 00054 return 0.; 00055 }
unsigned HcalQIEShape::local | ( | unsigned | fAdc | ) | const [inline] |
float HcalQIEShape::lowEdge | ( | unsigned | fAdc | ) | const |
Definition at line 39 of file HcalQIEShape.cc.
References mValues.
00039 { 00040 if (fAdc < 128) return mValues [fAdc]; 00041 return 0.; 00042 }
unsigned HcalQIEShape::range | ( | unsigned | fAdc | ) | const [inline] |
bool HcalQIEShape::setLowEdge | ( | float | fValue, | |
unsigned | fAdc | |||
) | [private] |
Definition at line 57 of file HcalQIEShape.cc.
References mValues.
Referenced by setLowEdges().
00057 { 00058 if (fAdc >= 32) return false; 00059 mValues [fAdc] = fValue; 00060 return true; 00061 }
bool HcalQIEShape::setLowEdges | ( | const float | fValue[32] | ) |
Definition at line 63 of file HcalQIEShape.cc.
References ecalMGPA::adc(), expand(), HLT_VtxMuL3::result, and setLowEdge().
00063 { 00064 bool result = true; 00065 for (int adc = 0; adc < 32; adc++) result = result && setLowEdge (fValue [adc], adc); 00066 expand (); 00067 return result; 00068 }
float HcalQIEShape::mValues[129] [private] |
Definition at line 31 of file HcalQIEShape.h.
Referenced by center(), expand(), HcalQIEShape(), highEdge(), lowEdge(), and setLowEdge().