//////////////////////////////////////////////////////////////////////// /// \class RAT::Classifiers::IBDClassiferUnseeded /// /// \brief Classifies an event a possible neutron event from inverse beta decay /// /// \author name Pawel Mekarski /// /// REVISION HISTORY:\n /// 25/04/2016 : Pawel Mekarski - New RAT Classifier /// /// \details Checks to see if a triggered event had another event(s) occur in the /// past set time window O[100s of us]. Returns the number of such events /// that occured. A non-zero return idicated a possible IBD event. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_Classifiers_IBDClassifierUnseeded_ #define __RAT_Classifiers_IBDClassifierUnseeded_ #include #include namespace RAT { namespace Classifiers { class IBDClassifierUnseeded : public Classifier { public: virtual std::string GetName() const { return IBDClassifierUnseeded::Name(); } static std::string Name() { return std::string("IBDClassifierUnseeded"); } void Initialise(const std::string&) {} void BeginOfRun(DS::Run& run); void EndOfRun(DS::Run& run) { } virtual DS::ClassifierResult GetClassification(); double UTtoNanoSeconds(RAT::DS::UniversalTime time); ///< Converts UniversalTime to nanoseconds private: RAT::DS::UniversalTime fTimeWindow; ///< For recording events that occured in this past time window specified RAT::DS::UniversalTime fPreviousEventTime; ///< Stored time of the last event std::vector fEventTimes; ///< Vector containing the times to the last few events that fell within the time window }; } // namespace Classifiers } // namespace RAT #endif