26 float expectedPedestal,
27 float binPrevToBinMax,
28 float binNextToBinMax,
54 double pedestal_fC = 0.5 * (digi[0].nominal_fC() + digi[1].nominal_fC());
56 double maxAmplitude = digi[
maxBin_].nominal_fC() - pedestal_fC;
59 double binPrevToBinMax = (digi[
maxBin_ - 1].nominal_fC() - pedestal_fC) / maxAmplitude;
62 double binNextToBinMax = (digi[
maxBin_ + 1].nominal_fC() - pedestal_fC) / maxAmplitude;
87 : hitReadoutName_(
"CastorHits"),
89 castorHitAnalyzer_(
"CASTORDigi", 1., &simParameterMap_, &castorFilter_),
90 castorDigiStatistics_(
"CASTORDigi", 3, 10., 6., 0.1, 0.5, castorHitAnalyzer_),
95 template <
class Collection>
99 edm::LogError(
"CastorDigiAnalyzer") <<
"Could not find Castor Digi Container ";
101 for (
unsigned i = 0;
i < digis->size(); ++
i) {
CastorHitFilter castorFilter_
void analyze(int detId, double recEnergy)
to be called for each RecHit
CaloHitAnalyzer castorHitAnalyzer_
constexpr unsigned int maxBin
CaloValidationStatistics binPrevToBinMax_
#define DEFINE_FWK_MODULE(type)
void analyze(edm::Event const &e, CastorDigiStatistics &statistics, const edm::EDGetTokenT< Collection > &token)
T const * product() const
CastorDigiStatistics castorDigiStatistics_
const edm::EDGetTokenT< CastorDigiCollection > castordigiToken_
Log< level::Error, false > LogError
std::string hitReadoutName_
CastorSimParameterMap simParameterMap_
void fillHits(MixCollection< PCaloHit > &hits)
should be called each event
CaloHitAnalyzer & amplitudeAnalyzer_
float amplitudeThreshold_
CaloValidationStatistics pedestal_
const edm::EDGetTokenT< CrossingFrame< PCaloHit > > castorcfToken_
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)
CastorDigiAnalyzer(edm::ParameterSet const &conf)
uint16_t *__restrict__ uint16_t const *__restrict__ adc
CaloValidationStatistics binNextToBinMax_
void analyze(edm::Event const &e, edm::EventSetup const &c) override