1 #ifndef CastorSim_CastorDigiStatistics_h 2 #define CastorSim_CastorDigiStatistics_h 13 float amplitudeThreshold,
14 float expectedPedestal,
15 float binPrevToBinMax,
16 float binNextToBinMax,
20 pedestal_(name +
" pedestal", expectedPedestal, 0.),
42 double pedestal_fC = 0.5 * (digi[0].nominal_fC() + digi[1].nominal_fC());
44 double maxAmplitude = digi[
maxBin_].nominal_fC() - pedestal_fC;
47 double binPrevToBinMax = (digi[
maxBin_ - 1].nominal_fC() - pedestal_fC) / maxAmplitude;
50 double binNextToBinMax = (digi[
maxBin_ + 1].nominal_fC() - pedestal_fC) / maxAmplitude;
void analyze(int detId, double recEnergy)
to be called for each RecHit
CaloValidationStatistics binPrevToBinMax_
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
CaloHitAnalyzer & amplitudeAnalyzer_
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
float amplitudeThreshold_
CaloValidationStatistics pedestal_
void addEntry(float value, float weight=1.)
CastorDigiStatistics(std::string name, int maxBin, float amplitudeThreshold, float expectedPedestal, float binPrevToBinMax, float binNextToBinMax, CaloHitAnalyzer &litudeAnalyzer)
void analyze(const Digi &digi)
CaloValidationStatistics binNextToBinMax_