1 #ifndef CastorSim_CastorDigiStatistics_h
2 #define CastorSim_CastorDigiStatistics_h
15 float expectedPedestal,
16 float binPrevToBinMax,
17 float binNextToBinMax,
21 pedestal_(name+
" pedestal", expectedPedestal, 0.),
47 double pedestal_fC = 0.5*(digi[0].nominal_fC() + digi[1].nominal_fC());
50 double maxAmplitude = digi[
maxBin_].nominal_fC() - pedestal_fC;
54 double binPrevToBinMax = (digi[
maxBin_-1].nominal_fC() - pedestal_fC)
59 double binNextToBinMax = (digi[
maxBin_+1].nominal_fC() - pedestal_fC)
63 double amplitude = digi[
maxBin_].nominal_fC()
int adc(sample_type sample)
get the ADC sample (12 bits)
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_
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_