//////////////////////////////////////////////////////////////////////// /// \class RAT::PMTSelectors::StraightTimeResidualCut /// /// \brief Selects PMTs based on hit time residual, /// \brief using only the straight line path between the /// \brief vertex and the PMT (i.e., neglecting detailed /// \brief light path calculation). /// /// \author Jeff Tseng (contact) /// /// REVISION HISTORY:\n /// 6 Feb 2018: J Tseng New file /// /// \details Default cut is interval (-50, +50) ns relative to the mode. /// Obtains water refraction index from FIT_MULTIPATH.ratdb (water_RI). /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_PMTSelector_StraightTimeResidualCut__ #define __RAT_PMTSelector_StraightTimeResidualCut__ #include #include #include #include #include #include namespace RAT { namespace PMTSelectors { class StraightTimeResidualCut : public PMTSelector { public: /// Return the name std::string GetName() const { return Name(); } /// Fitter structure name static std::string Name() { return std::string("straightTimeResidualCut"); } /// Initialise the selector (by factory) - null in this case virtual void Initialise(const std::string& param); // return low time cut relative to time residual (ns) double GetLowCut() const { return fLowCut; } // return high time cut relative to time residual (ns) double GetHighCut() const { return fHighCut; } /// called at beginning of run (inherited from FitterComponent). void BeginOfRun(DS::Run& run); /// called at end of run (inherited from FitterComponent) void EndOfRun(DS::Run& run); /// Set parameter values /// "lowLimit" : low time cut relative to time residual (ns) /// "highLimit": high time cut relative to time residual (ns) void SetD(const std::string& param, double value); /// Main Selector function virtual std::vector GetSelectedPMTs(const std::vector& data, const DS::FitVertex& vertex); protected: double fLowCut; // low time cut relative to time residual of 0ns double fHighCut; // high time cut relative to time residual of 0ns double fSpeedOfLightWater; // speed of light in water (mm/ns) }; } //::PMTSelectors } //::RAT #endif