#include <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 | ( | ) |
Definition at line 24 of file HcalQIEShape.cc.
{}
float HcalQIEShape::center | ( | unsigned | fAdc | ) | const |
Definition at line 44 of file HcalQIEShape.cc.
References mValues.
Referenced by HcalQIECoder::charge().
void HcalQIEShape::expand | ( | ) | [private] |
Definition at line 26 of file HcalQIEShape.cc.
References i, getHLTprescales::index, mValues, range(), and pileupReCalc_HLTpaths::scale.
Referenced by HcalQIEShape(), and setLowEdges().
{ int scale = 1; for (unsigned range = 1; range < 4; range++) { scale = scale * 5; unsigned index = range * 32; mValues [index] = mValues [index - 2]; // link to previous range for (unsigned i = 1; i < 32; i++) { mValues [index + i] = mValues [index + i - 1] + scale * (mValues [i] - mValues [i - 1]); } } mValues [128] = 2 * mValues [127] - mValues [126]; // extrapolate }
float HcalQIEShape::highEdge | ( | unsigned | fAdc | ) | const |
Definition at line 52 of file HcalQIEShape.cc.
References mValues.
Referenced by HcalQIECoder::adc().
{ if (fAdc < 128) return mValues [fAdc+1]; return 0.; }
unsigned HcalQIEShape::local | ( | unsigned | fAdc | ) | const [inline] |
Definition at line 26 of file HcalQIEShape.h.
{return fAdc & 0x1f;}
float HcalQIEShape::lowEdge | ( | unsigned | fAdc | ) | const |
Definition at line 39 of file HcalQIEShape.cc.
References mValues.
{ if (fAdc < 128) return mValues [fAdc]; return 0.; }
unsigned HcalQIEShape::range | ( | unsigned | fAdc | ) | const [inline] |
Definition at line 25 of file HcalQIEShape.h.
Referenced by HcalQIECoder::charge(), and expand().
{return (fAdc >> 5) & 0x3;}
bool HcalQIEShape::setLowEdge | ( | float | fValue, |
unsigned | fAdc | ||
) | [private] |
Definition at line 57 of file HcalQIEShape.cc.
References mValues.
Referenced by setLowEdges().
{ if (fAdc >= 32) return false; mValues [fAdc] = fValue; return true; }
bool HcalQIEShape::setLowEdges | ( | const float | fValue[32] | ) |
Definition at line 63 of file HcalQIEShape.cc.
References ecalMGPA::adc(), expand(), query::result, and setLowEdge().
float HcalQIEShape::mValues[129] [private] |
Definition at line 31 of file HcalQIEShape.h.
Referenced by center(), expand(), HcalQIEShape(), highEdge(), lowEdge(), and setLowEdge().