/*! * @file SPeakMon.h * @author Dan Saunders, on behalf of the SoLid collaboration. * @date 17 Feb 2016 */ #ifndef SPeakMon_h_ #define SPeakMon_h_ #include "SAlgorithms/ISAlgorithm.h" #include "SAlgorithms/SHLT/SPeakFinder.h" //! Monitor for peaks. class SPeakMon : public ISAlgorithm { private: //! Time isolation window (in ns). Useful for gain finding plots. double m_htimeIsolationWindow; TH1D * h_tBetween; TH1D * h_amplitude_zoom; TH1D * h_shortIntegral_zoom; TH1D * h_amplitudeTimeIsolated_zoom; TH1D * h_shortIntegralTimeIsolated_zoom; // Per channel versions. std::vector * h_amplitudes_zoom; std::vector * h_shortIntegrals_zoom; std::vector * h_amplitudesTimeIsolated_zoom; std::vector * h_shortIntegralsTimeIsolated_zoom; // Integral vs amplitudes plots (including zoomed version with finer binning). TH2D * h_integralVsAmplitude; TH2D * h_integralVsAmplitude_zoom; TH2D * h_amplitudeVsChannel; TH2D * h_amplitudeVsChannel_zoom; public: SPeakMon(SDetector * dtr, SClipboard * cb); ~SPeakMon(); void initialize(); void execute(); void finalize(); // Setters and getters _______________________________________________________ double htimeIsolationWindow() {return m_htimeIsolationWindow;} //! Get the pedestal zoomed amplitude histo of channel TH1D* AmplitudeZoom(uint ChanNum) {return h_amplitudes_zoom->at(ChanNum);} //! Get the pedestal zoomed, time isolated amplitude histo of channel TH1D* AmplitudeTimeIsoZoom(uint ChanNum) {return h_amplitudesTimeIsolated_zoom->at(ChanNum);} //! Get the pedestal zoomed integral histo of channel TH1D* IntegralZoom(uint ChanNum) {return h_shortIntegrals_zoom->at(ChanNum);} //! Get the pedestal zoomed, time isolated integral histo of channel TH1D* IntegralTimeIsoZoom(uint ChanNum) {return h_shortIntegralsTimeIsolated_zoom->at(ChanNum);} }; #endif /* SPeakMon_h_ */