/////////////////////////////////////////////////////////////////////// // // Direction fitting using Hough transform (code ported from Gene's // methods). // // Author: Gene Beier // Author: Matthew Mottram -- contact person // // REVISION HISTORY: // - 2015-10-19: M. Mottram, first revision // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_HoughDirection__ #define __RAT_Method_HoughDirection__ #include #include #include namespace RAT { namespace DS { class FitResult; } namespace Methods { class HoughDirection: public SeededMethod, public SelectorMethod { public: // Return the name of the method virtual std::string GetName() const { return HoughDirection::Name(); } // Return the name of the method static std::string Name() { return std::string( "houghDirection" ); } // Initialise the method void Initialise( const std::string& ); // Parameter setting functions void SetI(const std::string& param, const int value); void SetD(const std::string& param, const double value); // Begin of run to get current light path calculator void BeginOfRun( DS::Run& ); // End of run is empty void EndOfRun( DS::Run& ) { } // Set the seed to the default one void DefaultSeed(); // Invokes the method's algorithm virtual DS::FitResult GetBestFit(); private: int fNLoop; // number of steps used to generate the Hough transform int fNBinsPhi; // bins in phi in the Hough histogram int fNBinsTheta; // bins in theta in the Hough histogram double fPhotonWavelength; // [nm] double fPathAccuracy; // the accuracy of the light path [mm] DU::LightPathCalculator fLightPathCalculator; // light path calculator for a given run }; } } #endif