//////////////////////////////////////////////////////////////////////// /// \class RAT::PMTSelectors::ModeCut /// /// \brief Select PMT hits relative to the mode of the hit time distribution. /// \brief Based on MedianCut class. /// /// \author W. Heintzelman -- contact person /// /// REVISION HISTORY:\n /// 19 June 2013: W. Heintzelman New file \n /// /// \details Default cut is interval (-50, +50) ns relative to the mode /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_PMTSelector_ModeCut__ #define __RAT_PMTSelector_ModeCut__ #include #include #include #include #include namespace RAT { namespace PMTSelectors { class ModeCut : public PMTSelector { public: /// Return the Name std::string GetName() const { return Name(); }; /// Fitter structure name static std::string Name() { return std::string( "modeCut" ); } /// Initialise the selector void Initialise( const std::string& param ); ///< Option string void BeginOfRun( DS::Run& ) { } void EndOfRun( DS::Run& ) { } /// Set non-standard cut interval values void SetD( const std::string& param, double value ); void SetI( const std::string& param, int value); /// Main Selector function std::vector GetSelectedPMTs( const std::vector& data,///< PMT data const DS::FitVertex& vertex ///< Vertex of interest ); /// Return mode double GetModeTime(const std::vector& data); /// Return lower and upper cut limits double GetLowCut() { return fLowCut;} double GetHighCut() { return fHighCut;} protected: double fLowCut; ///< In ns double fHighCut; ///< In ns // limit of the time domain for the in-time window int fLowDomainLimit; ///< In integer ns int fHighDomainLimit; ///< In integer ns }; } //::PMTSelectors } //::RAT #endif