/////////////////////////////////////////////////////////////////////// // // Time likelihood method // // Author: W Heintzelman -- contact person // // REVISION HISTORY: // 27/06/2013 : W J Heintzelman- New file // 10/09/2013 : K Majumdar - Adding in ability to do asymmetric // errors and errors in Spherical coordinates // 24/02/2015 : R Stainforth - Fixed typo in the assignment of // negative errors // // Requires optimiser, selector, and a pdf // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_TimeLikelihood_ #define __RAT_Method_TimeLikelihood_ #include #include #include #include #include #include #include #include namespace RAT { namespace DS { class FitResult; } namespace Methods { class TimeLikelihood : public SeededMethod, public OptimisedMethod, public PDFMethod, public SelectorMethod { public: // Returns the name of the timeLikelihood method virtual std::string GetName() const { return TimeLikelihood::Name(); } // Returns the name of the timeLikeliHood method static std::string Name() { return std::string( "timeLikelihood" ); } // Initialises the TimeLikelihood method (requires no init string) void Initialise( const std::string& ) { } // Setup the TimeLikelihood method loading from the database void BeginOfRun( DS::Run& ) { } void EndOfRun( DS::Run& ) { } // Sets the seed to the default void DefaultSeed(); // Invokes the method's algorithm virtual DS::FitResult GetBestFit(); // Called by the optimiser to get the starting/seed fit parameter values virtual std::vector GetParams() const; // Called by the optimiser to get the starting/seed fit parameter errors virtual std::vector GetPositiveErrors() const; virtual std::vector GetNegativeErrors() const; // Converts the vector of params into the fFitResult virtual void SetParams( const std::vector& params ); // Converts the vector of errors into the fFitResult virtual void SetPositiveErrors( const std::vector& errors ); virtual void SetNegativeErrors( const std::vector& errors ); // Called by the optimiser to invoke the method algorithm, // optimiser will pass current parameters virtual double operator()( const std::vector& params ); }; } //::Methods } //::RAT #endif