#include <SimCalorimetry/CastorSim/plugins/CastorDigiStatistics.h>
Public Member Functions | |
template<class Digi> | |
void | analyze (const Digi &digi) |
CastorDigiStatistics (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 CastorDigiStatistics.h.
CastorDigiStatistics::CastorDigiStatistics | ( | std::string | name, | |
int | maxBin, | |||
float | amplitudeThreshold, | |||
float | expectedPedestal, | |||
float | binPrevToBinMax, | |||
float | binNextToBinMax, | |||
CaloHitAnalyzer & | amplitudeAnalyzer | |||
) | [inline] |
Definition at line 12 of file CastorDigiStatistics.h.
00019 : maxBin_(maxBin), 00020 amplitudeThreshold_(amplitudeThreshold), 00021 pedestal_(name+" pedestal", expectedPedestal, 0.), 00022 binPrevToBinMax_(name+" binPrevToBinMax", binPrevToBinMax, 0.), 00023 binNextToBinMax_(name+" binNextToBinMax", binNextToBinMax, 0.), 00024 amplitudeAnalyzer_(amplitudeAnalyzer) 00025 { 00026 }
void CastorDigiStatistics::analyze | ( | const Digi & | digi | ) | [inline] |
Definition at line 42 of file CastorDigiStatistics.h.
References ecalMGPA::adc(), CaloValidationStatistics::addEntry(), amplitudeAnalyzer_, amplitudeThreshold_, CaloHitAnalyzer::analyze(), binNextToBinMax_, binPrevToBinMax_, maxBin_, and pedestal_.
Referenced by CastorDigiAnalyzerImpl::analyze().
00042 { 00043 pedestal_.addEntry(digi[0].adc()); 00044 pedestal_.addEntry(digi[1].adc()); 00045 00046 00047 double pedestal_fC = 0.5*(digi[0].nominal_fC() + digi[1].nominal_fC()); 00048 00049 00050 double maxAmplitude = digi[maxBin_].nominal_fC() - pedestal_fC; 00051 00052 if(maxAmplitude > amplitudeThreshold_) { 00053 00054 double binPrevToBinMax = (digi[maxBin_-1].nominal_fC() - pedestal_fC) 00055 / maxAmplitude; 00056 binPrevToBinMax_.addEntry(binPrevToBinMax); 00057 00058 00059 double binNextToBinMax = (digi[maxBin_+1].nominal_fC() - pedestal_fC) 00060 / maxAmplitude; 00061 binNextToBinMax_.addEntry(binNextToBinMax); 00062 00063 double amplitude = digi[maxBin_].nominal_fC() 00064 + digi[maxBin_+1].nominal_fC() 00065 - 2*pedestal_fC; 00066 00067 00068 amplitudeAnalyzer_.analyze(digi.id().rawId(), amplitude); 00069 00070 } 00071 }
float CastorDigiStatistics::amplitudeThreshold_ [private] |
int CastorDigiStatistics::maxBin_ [private] |