#include <HcalDigiStatistics.h>
Public Member Functions | |
template<class Digi > | |
void | analyze (const Digi &digi) |
HcalDigiStatistics (std::string name, int maxBin, float amplitudeThreshold, float expectedPedestal, float binPrevToBinMax, float binNextToBinMax, CaloHitAnalyzer &litudeAnalyzer) | |
Private Attributes | |
CaloHitAnalyzer & | amplitudeAnalyzer_ |
float | amplitudeThreshold_ |
CaloValidationStatistics | binNextToBinMax_ |
CaloValidationStatistics | binPrevToBinMax_ |
int | maxBin_ |
CaloValidationStatistics | pedestal_ |
Definition at line 9 of file HcalDigiStatistics.h.
HcalDigiStatistics::HcalDigiStatistics | ( | std::string | name, |
int | maxBin, | ||
float | amplitudeThreshold, | ||
float | expectedPedestal, | ||
float | binPrevToBinMax, | ||
float | binNextToBinMax, | ||
CaloHitAnalyzer & | amplitudeAnalyzer | ||
) | [inline] |
Definition at line 12 of file HcalDigiStatistics.h.
: maxBin_(maxBin), amplitudeThreshold_(amplitudeThreshold), pedestal_(name+" pedestal", expectedPedestal, 0.), binPrevToBinMax_(name+" binPrevToBinMax", binPrevToBinMax, 0.), binNextToBinMax_(name+" binNextToBinMax", binNextToBinMax, 0.), amplitudeAnalyzer_(amplitudeAnalyzer) { }
void HcalDigiStatistics::analyze | ( | const Digi & | digi | ) |
Definition at line 42 of file HcalDigiStatistics.h.
References ecalMGPA::adc(), CaloValidationStatistics::addEntry(), amplitudeAnalyzer_, amplitudeThreshold_, CaloHitAnalyzer::analyze(), binNextToBinMax_, binPrevToBinMax_, maxBin_, and pedestal_.
Referenced by HcalDigiAnalyzerImpl::analyze().
{ pedestal_.addEntry(digi[0].adc()); pedestal_.addEntry(digi[1].adc()); double pedestal_fC = 0.5*(digi[0].nominal_fC() + digi[1].nominal_fC()); double maxAmplitude = digi[maxBin_].nominal_fC() - pedestal_fC; if(maxAmplitude > amplitudeThreshold_) { double binPrevToBinMax = (digi[maxBin_-1].nominal_fC() - pedestal_fC) / maxAmplitude; binPrevToBinMax_.addEntry(binPrevToBinMax); double binNextToBinMax = (digi[maxBin_+1].nominal_fC() - pedestal_fC) / maxAmplitude; binNextToBinMax_.addEntry(binNextToBinMax); double amplitude = digi[maxBin_].nominal_fC() + digi[maxBin_+1].nominal_fC() - 2*pedestal_fC; amplitudeAnalyzer_.analyze(digi.id().rawId(), amplitude); } }
Definition at line 37 of file HcalDigiStatistics.h.
Referenced by analyze().
float HcalDigiStatistics::amplitudeThreshold_ [private] |
Definition at line 33 of file HcalDigiStatistics.h.
Referenced by analyze().
Definition at line 36 of file HcalDigiStatistics.h.
Referenced by analyze().
Definition at line 35 of file HcalDigiStatistics.h.
Referenced by analyze().
int HcalDigiStatistics::maxBin_ [private] |
Definition at line 32 of file HcalDigiStatistics.h.
Referenced by analyze().
Definition at line 34 of file HcalDigiStatistics.h.
Referenced by analyze().