#include <HcalQIECoder.h>
Public Member Functions | |
unsigned | adc (const HcalQIEShape &fShape, float fCharge, unsigned fCapId) const |
fC + capid [0..3] -> ADC conversion | |
float | charge (const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const |
ADC [0..127] + capid [0..3] -> fC conversion. | |
HcalQIECoder (unsigned long fId=0) | |
float | offset (unsigned fCapId, unsigned fRange) const |
uint32_t | qieIndex () const |
uint32_t | rawId () const |
void | setOffset (unsigned fCapId, unsigned fRange, float fValue) |
void | setQIEIndex (uint32_t v) |
void | setSlope (unsigned fCapId, unsigned fRange, float fValue) |
float | slope (unsigned fCapId, unsigned fRange) const |
Private Attributes | |
uint32_t | mId |
float | mOffset00 |
float | mOffset01 |
float | mOffset02 |
float | mOffset03 |
float | mOffset10 |
float | mOffset11 |
float | mOffset12 |
float | mOffset13 |
float | mOffset20 |
float | mOffset21 |
float | mOffset22 |
float | mOffset23 |
float | mOffset30 |
float | mOffset31 |
float | mOffset32 |
float | mOffset33 |
unsigned int | mQIEIndex |
float | mSlope00 |
float | mSlope01 |
float | mSlope02 |
float | mSlope03 |
float | mSlope10 |
float | mSlope11 |
float | mSlope12 |
float | mSlope13 |
float | mSlope20 |
float | mSlope21 |
float | mSlope22 |
float | mSlope23 |
float | mSlope30 |
float | mSlope31 |
float | mSlope32 |
float | mSlope33 |
HcalQIECoder::HcalQIECoder | ( | unsigned long | fId = 0 | ) | [inline] |
Definition at line 21 of file HcalQIECoder.h.
unsigned HcalQIECoder::adc | ( | const HcalQIEShape & | fShape, |
float | fCharge, | ||
unsigned | fCapId | ||
) | const |
fC + capid [0..3] -> ADC conversion
Definition at line 27 of file HcalQIECoder.cc.
References newFWLiteAna::bin, HcalQIEShape::highEdge(), mQIEIndex, offset(), and slope().
Referenced by HcalDigiMonitor::beginRun(), HcalCoderDb::fC2adc_(), HcalCoderDb::fCUpgrade2adc_(), and HcalMonitorClient::PlotPedestalValues().
{ // search for the range for (unsigned range = 0; range < 4; range++) { float qieCharge = fCharge * slope (fCapId, range) + offset (fCapId, range); unsigned nbin = 32 * (mQIEIndex+1); // it's just 64 = 2*32 ! unsigned minBin = nbin * range; unsigned maxBin = minBin + nbin - 1; float qieChargeMax = fShape.highEdge (maxBin); if (qieCharge <= qieChargeMax) { for (unsigned bin = minBin; bin <= maxBin; bin++) { if (qieCharge < fShape.highEdge (bin)) { return bin; } } return minBin; // underflow } else if (range == 3) { return ( 4 * nbin - 1); // overflow } } return 0; //should never get here }
float HcalQIECoder::charge | ( | const HcalQIEShape & | fShape, |
unsigned | fAdc, | ||
unsigned | fCapId | ||
) | const |
ADC [0..127] + capid [0..3] -> fC conversion.
Definition at line 22 of file HcalQIECoder.cc.
References HcalQIEShape::center(), offset(), HcalQIEShape::range(), and slope().
Referenced by HcalCoderDb::adc2fC_(), HcalAmplifier::addPedestals(), HcalPedestalsAnalysis::analyze(), getLinearizedADC(), ZSEnergy_impl::keepMe(), HcalDbService::makeHcalCalibration(), HcalDbService::makeHcalCalibrationWidth(), AlCaHOCalibProducer::produce(), and HcaluLUTTPGCoder::update().
float HcalQIECoder::offset | ( | unsigned | fCapId, |
unsigned | fRange | ||
) | const |
Definition at line 50 of file HcalQIECoder.cc.
References getHLTprescales::index, and mOffset00.
Referenced by adc(), HcalQIEDataCheck::analyze(), and charge().
uint32_t HcalQIECoder::qieIndex | ( | ) | const [inline] |
Definition at line 37 of file HcalQIECoder.h.
References mQIEIndex.
Referenced by HcalQIEData::getShape().
{return mQIEIndex;}
uint32_t HcalQIECoder::rawId | ( | ) | const [inline] |
void HcalQIECoder::setOffset | ( | unsigned | fCapId, |
unsigned | fRange, | ||
float | fValue | ||
) |
Definition at line 58 of file HcalQIECoder.cc.
References dtNoiseDBValidation_cfg::cerr, getHLTprescales::index, and mOffset00.
Referenced by HcalDbOnline::getObject().
void HcalQIECoder::setQIEIndex | ( | uint32_t | v | ) | [inline] |
void HcalQIECoder::setSlope | ( | unsigned | fCapId, |
unsigned | fRange, | ||
float | fValue | ||
) |
Definition at line 67 of file HcalQIECoder.cc.
References dtNoiseDBValidation_cfg::cerr, getHLTprescales::index, and mSlope00.
Referenced by HcalDbOnline::getObject().
float HcalQIECoder::slope | ( | unsigned | fCapId, |
unsigned | fRange | ||
) | const |
Definition at line 54 of file HcalQIECoder.cc.
References getHLTprescales::index, and mSlope00.
Referenced by adc(), HcalQIEDataCheck::analyze(), and charge().
uint32_t HcalQIECoder::mId [private] |
Definition at line 41 of file HcalQIECoder.h.
Referenced by rawId().
float HcalQIECoder::mOffset00 [private] |
Definition at line 42 of file HcalQIECoder.h.
Referenced by offset(), and setOffset().
float HcalQIECoder::mOffset01 [private] |
Definition at line 43 of file HcalQIECoder.h.
float HcalQIECoder::mOffset02 [private] |
Definition at line 44 of file HcalQIECoder.h.
float HcalQIECoder::mOffset03 [private] |
Definition at line 45 of file HcalQIECoder.h.
float HcalQIECoder::mOffset10 [private] |
Definition at line 46 of file HcalQIECoder.h.
float HcalQIECoder::mOffset11 [private] |
Definition at line 47 of file HcalQIECoder.h.
float HcalQIECoder::mOffset12 [private] |
Definition at line 48 of file HcalQIECoder.h.
float HcalQIECoder::mOffset13 [private] |
Definition at line 49 of file HcalQIECoder.h.
float HcalQIECoder::mOffset20 [private] |
Definition at line 50 of file HcalQIECoder.h.
float HcalQIECoder::mOffset21 [private] |
Definition at line 51 of file HcalQIECoder.h.
float HcalQIECoder::mOffset22 [private] |
Definition at line 52 of file HcalQIECoder.h.
float HcalQIECoder::mOffset23 [private] |
Definition at line 53 of file HcalQIECoder.h.
float HcalQIECoder::mOffset30 [private] |
Definition at line 54 of file HcalQIECoder.h.
float HcalQIECoder::mOffset31 [private] |
Definition at line 55 of file HcalQIECoder.h.
float HcalQIECoder::mOffset32 [private] |
Definition at line 56 of file HcalQIECoder.h.
float HcalQIECoder::mOffset33 [private] |
Definition at line 57 of file HcalQIECoder.h.
unsigned int HcalQIECoder::mQIEIndex [private] |
Definition at line 74 of file HcalQIECoder.h.
Referenced by adc(), qieIndex(), and setQIEIndex().
float HcalQIECoder::mSlope00 [private] |
Definition at line 58 of file HcalQIECoder.h.
Referenced by setSlope(), and slope().
float HcalQIECoder::mSlope01 [private] |
Definition at line 59 of file HcalQIECoder.h.
float HcalQIECoder::mSlope02 [private] |
Definition at line 60 of file HcalQIECoder.h.
float HcalQIECoder::mSlope03 [private] |
Definition at line 61 of file HcalQIECoder.h.
float HcalQIECoder::mSlope10 [private] |
Definition at line 62 of file HcalQIECoder.h.
float HcalQIECoder::mSlope11 [private] |
Definition at line 63 of file HcalQIECoder.h.
float HcalQIECoder::mSlope12 [private] |
Definition at line 64 of file HcalQIECoder.h.
float HcalQIECoder::mSlope13 [private] |
Definition at line 65 of file HcalQIECoder.h.
float HcalQIECoder::mSlope20 [private] |
Definition at line 66 of file HcalQIECoder.h.
float HcalQIECoder::mSlope21 [private] |
Definition at line 67 of file HcalQIECoder.h.
float HcalQIECoder::mSlope22 [private] |
Definition at line 68 of file HcalQIECoder.h.
float HcalQIECoder::mSlope23 [private] |
Definition at line 69 of file HcalQIECoder.h.
float HcalQIECoder::mSlope30 [private] |
Definition at line 70 of file HcalQIECoder.h.
float HcalQIECoder::mSlope31 [private] |
Definition at line 71 of file HcalQIECoder.h.
float HcalQIECoder::mSlope32 [private] |
Definition at line 72 of file HcalQIECoder.h.
float HcalQIECoder::mSlope33 [private] |
Definition at line 73 of file HcalQIECoder.h.