/////////////////////////////////////////////////////////////////////// // // Reconstructs point-like event using quadruplets of hits. // // Author: Ian Coulter -- contact person // Author: Matthew Strait -- contact person // // Revision History: // 13 Nov 2014: Matt Strait - Fixed shadowed variable warning // 23 Mar 2015: Matt Mottram - Fail method if no valid points in // quad cloud. // 24 Apr 2015: Matt Strait - Variety of small fixes suggested // by code review. // // Fits a point-like event by choosing many combinations of four PMT // hits and calculating the analytic solution for where the light must // have come from. The answer is the median of these solutions in // each of x,y,z and t. A constant speed of light is assumed, and no // consideration is given to anything other than straight line paths for // the light. This method is primarily used for providing a starting // position ("seed") for other fitters, but can also provide good-enough // fast reconstruction for online processes. // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_Quad__ #define __RAT_Method_Quad__ #include #include #include #include namespace RAT { namespace Methods { class Quad : public SelectorMethod { public: // Returns "quad" virtual std::string GetName() const { return Quad::Name(); } // Returns "quad" static std::string Name() { return std::string( "quad" ); } // Nothing to initialise here void Initialise(const std::string&) { } // Reads constants from the database to get Quad ready to run void BeginOfRun( DS::Run& run ); void EndOfRun( DS::Run& ) { } // Runs the algorithm and returns the answer. virtual DS::FitResult GetBestFit(); private: // Overall effective speed of light double fLightSpeed; // Maximum number of successfully generated points unsigned int fNumQuadPoints; // Maximum total number of tries at generating a point unsigned int fLimitQuadPoints; // Whether to calculate the reconstructed time bool fCalcTime; // Whether to calculate the errors on time and position bool fCalcErrors; }; } //::Method } //::RAT #endif