/////////////////////////////////////////////////////////////////////// // // Dual direction and position PDF (combines result from two separate // distributions) // // Author: Matt Mottram -- contact person // // REVISION HISTORY: // - 26/04/2011 : M Mottram - New file // - 2014-12-09 : P G Jones - Allow chained PMTSelectors // - 2015-08-03 : M Mottram - Updates from code review // // Requires Seeding, optimising and a pdf // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_PositionTimeDirectionLikelihood__ #define __RAT_Method_PositionTimeDirectionLikelihood__ #include #include #include #include #include #include namespace RAT { namespace DS { class FitResult; } namespace Methods { class PositionTimeDirectionLikelihood : public SeededMethod, public OptimisedMethod, public PDFMethod, public SelectorMethod { public: // Virtual destructor virtual ~PositionTimeDirectionLikelihood() {} // Returns the name of the positionTimeDirectionLikelihood method virtual std::string GetName() const { return PositionTimeDirectionLikelihood::Name(); } // Returns the name of the positionTimeDirectionLikelihood method static std::string Name() { return std::string( "positionTimeDirectionLikelihood" ); } // Set options for the positionTimeDirectionLikelihood method virtual void SetI( const std::string& param, const int value ); // Initialises the positionTimeDirection likelihood method (requires no init string) void Initialise( const std::string& ); // Does nothing currently // 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 params to optimise virtual std::vector GetParams() const; // Called by the optimiser to get the starting/seed errors to optimise virtual std::vector GetPositiveErrors() const; // Called by the optimiser to get the starting/seed errors to optimise 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 ); // Converts the vector of errors into the fFitResult 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 ); private: bool fPolarDirection; // Run using cartesian (default) or polar coordinates for direction }; } //::Methods } //::RAT #endif