1 #ifndef HcalSimProducers_HcalDigiStatistics_h 2 #define HcalSimProducers_HcalDigiStatistics_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 pedestal_
float amplitudeThreshold_
CaloValidationStatistics binPrevToBinMax_
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
CaloValidationStatistics binNextToBinMax_
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
void analyze(const Digi &digi)
void addEntry(float value, float weight=1.)
CaloHitAnalyzer & amplitudeAnalyzer_
HcalDigiStatistics(std::string name, int maxBin, float amplitudeThreshold, float expectedPedestal, float binPrevToBinMax, float binNextToBinMax, CaloHitAnalyzer &litudeAnalyzer)