/*! * @file SOnlineNeutronID.h * @author Dan Saunders, on behalf of the SoLid collaboration. * @date Halloween 2016 */ #ifndef SOnlineNeutronID_h_ #define SOnlineNeutronID_h_ #include "SAlgorithms/ISAlgorithm.h" //! Online neutron ID examples. class SOnlineNeutronID : public ISAlgorithm { private: TH1D * h_tot; TH1D * h_IonA; TH1D * h_nPeaks; //! Samples to use for tot. int m_totSampleWindow; //! Threshold used for finding the time over threshold. int m_totThreshold; //! Time window for counting peaks in nPeaks (rolling). double m_nPeaksHtimeWindow; public: SOnlineNeutronID(SDetector * dtr, SClipboard * cb); ~SOnlineNeutronID(); void findIonA(SEvent * event); void findTot(SEvent * event); void findNpeaks(SEvent * event); void initialize(); void execute(); void finalize(); }; #endif /* SOnlineNeutronID_h_ */