diff --git a/SimCalorimetry/HcalSimProducers/src/HcalDigiAnalyzer.h b/SimCalorimetry/HcalSimProducers/src/HcalDigiAnalyzer.h deleted file mode 100644 index 21362e42457a3..0000000000000 --- a/SimCalorimetry/HcalSimProducers/src/HcalDigiAnalyzer.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef HcalSimProducers_HcalDigiAnalyzer_h -#define HcalSimProducers_HcalDigiAnalyzer_h - -#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/Framework/interface/one/EDAnalyzer.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" -#include "SimCalorimetry/CaloSimAlgos/interface/CaloHitAnalyzer.h" -#include "SimCalorimetry/HcalSimAlgos/interface/HcalHitFilter.h" -#include "SimCalorimetry/HcalSimAlgos/interface/HcalSimParameterMap.h" -#include "SimCalorimetry/HcalSimAlgos/interface/ZDCHitFilter.h" -#include "SimCalorimetry/HcalSimProducers/src/HcalDigiStatistics.h" -#include - -/** Studies Hcal digis - - \Author Rick Wilkinson, Caltech -*/ - -class HcalDigiAnalyzer : public edm::one::EDAnalyzer<> { -public: - explicit HcalDigiAnalyzer(edm::ParameterSet const &conf); - void analyze(edm::Event const &e, edm::EventSetup const &c) override; - -private: - std::string hitReadoutName_; - HcalSimParameterMap simParameterMap_; - HBHEHitFilter hbheFilter_; - HOHitFilter hoFilter_; - HFHitFilter hfFilter_; - ZDCHitFilter zdcFilter_; - CaloHitAnalyzer hbheHitAnalyzer_; - CaloHitAnalyzer hoHitAnalyzer_; - CaloHitAnalyzer hfHitAnalyzer_; - CaloHitAnalyzer zdcHitAnalyzer_; - HcalDigiStatistics hbheDigiStatistics_; - HcalDigiStatistics hoDigiStatistics_; - HcalDigiStatistics hfDigiStatistics_; - HcalDigiStatistics zdcDigiStatistics_; - - edm::InputTag hbheDigiCollectionTag_; - edm::InputTag hoDigiCollectionTag_; - edm::InputTag hfDigiCollectionTag_; -}; - -#endif diff --git a/SimCalorimetry/HcalSimProducers/src/HcalDigiStatistics.h b/SimCalorimetry/HcalSimProducers/src/HcalDigiStatistics.h deleted file mode 100644 index f652db769c8fe..0000000000000 --- a/SimCalorimetry/HcalSimProducers/src/HcalDigiStatistics.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef HcalSimProducers_HcalDigiStatistics_h -#define HcalSimProducers_HcalDigiStatistics_h - -#include "CalibFormats/CaloObjects/interface/CaloSamples.h" -#include "SimCalorimetry/CaloSimAlgos/interface/CaloHitAnalyzer.h" -#include "SimCalorimetry/CaloSimAlgos/interface/CaloValidationStatistics.h" -#include - -class HcalDigiStatistics { -public: - HcalDigiStatistics(std::string name, - int maxBin, - float amplitudeThreshold, - float expectedPedestal, - float binPrevToBinMax, - float binNextToBinMax, - CaloHitAnalyzer &litudeAnalyzer) - : maxBin_(maxBin), - amplitudeThreshold_(amplitudeThreshold), - pedestal_(name + " pedestal", expectedPedestal, 0.), - binPrevToBinMax_(name + " binPrevToBinMax", binPrevToBinMax, 0.), - binNextToBinMax_(name + " binNextToBinMax", binNextToBinMax, 0.), - amplitudeAnalyzer_(amplitudeAnalyzer) {} - - template - void analyze(const Digi &digi); - -private: - int maxBin_; - float amplitudeThreshold_; - CaloValidationStatistics pedestal_; - CaloValidationStatistics binPrevToBinMax_; - CaloValidationStatistics binNextToBinMax_; - CaloHitAnalyzer &litudeAnalyzer_; -}; - -template -void HcalDigiStatistics::analyze(const Digi &digi) { - pedestal_.addEntry(digi[0].adc()); - pedestal_.addEntry(digi[1].adc()); - - double pedestal_fC = 0.5 * (digi[0].nominal_fC() + digi[1].nominal_fC()); - - double maxAmplitude = digi[maxBin_].nominal_fC() - pedestal_fC; - - if (maxAmplitude > amplitudeThreshold_) { - double binPrevToBinMax = (digi[maxBin_ - 1].nominal_fC() - pedestal_fC) / maxAmplitude; - binPrevToBinMax_.addEntry(binPrevToBinMax); - - double binNextToBinMax = (digi[maxBin_ + 1].nominal_fC() - pedestal_fC) / maxAmplitude; - binNextToBinMax_.addEntry(binNextToBinMax); - - double amplitude = digi[maxBin_].nominal_fC() + digi[maxBin_ + 1].nominal_fC() - 2 * pedestal_fC; - - amplitudeAnalyzer_.analyze(digi.id().rawId(), amplitude); - } -} - -#endif diff --git a/SimCalorimetry/HcalSimProducers/src/HcalHitAnalyzer.h b/SimCalorimetry/HcalSimProducers/src/HcalHitAnalyzer.h deleted file mode 100644 index 5c37f61732b5b..0000000000000 --- a/SimCalorimetry/HcalSimProducers/src/HcalHitAnalyzer.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef HcalSimProducers_HcalHitAnalyzer_h -#define HcalSimProducers_HcalHitAnalyzer_h - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/Framework/interface/one/EDAnalyzer.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" -#include "SimCalorimetry/CaloSimAlgos/interface/CaloHitAnalyzer.h" -#include "SimCalorimetry/HcalSimAlgos/interface/HcalHitFilter.h" -#include "SimCalorimetry/HcalSimAlgos/interface/HcalSimParameterMap.h" -#include "SimCalorimetry/HcalSimAlgos/interface/ZDCHitFilter.h" -#include - -/** Compares HCAL RecHits to SimHit - - \Author Rick Wilkinson, Caltech -*/ - -class HcalHitAnalyzer : public edm::one::EDAnalyzer<> { -public: - explicit HcalHitAnalyzer(edm::ParameterSet const &conf); - void analyze(edm::Event const &e, edm::EventSetup const &c) override; - -private: - HcalSimParameterMap simParameterMap_; - HBHEHitFilter hbheFilter_; - HOHitFilter hoFilter_; - HFHitFilter hfFilter_; - ZDCHitFilter zdcFilter_; - CaloHitAnalyzer hbheAnalyzer_; - CaloHitAnalyzer hoAnalyzer_; - CaloHitAnalyzer hfAnalyzer_; - CaloHitAnalyzer zdcAnalyzer_; - - edm::InputTag hbheRecHitCollectionTag_; - edm::InputTag hoRecHitCollectionTag_; - edm::InputTag hfRecHitCollectionTag_; -}; - -#endif