//////////////////////////////////////////////////////////////////////// /// \class RAT::MultiPathWaterDirection /// /// \brief PMT-likelihood function for water direction fit using MultiPath fitter. /// /// \author Jeff Tseng (contact) /// /// REVISION HISTORY:\n /// 2018-02-06 : J Tseng - new file /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_MultiPathWaterDirection__ #define __RAT_MultiPathWaterDirection__ #include #include #include //#define MULTIPATH_FIXED_SEED namespace RAT { class MultiPathWaterDirection : public VertexFunction { public: /// constuctor MultiPathWaterDirection(); /// return the name virtual std::string GetName() const { return MultiPathWaterDirection::Name(); } /// fitter structure name static std::string Name() { return std::string("multiPathWaterDirection"); } /// called at beginning of run virtual void BeginOfRun( DS::Run& ); /// called at end of run virtual void EndOfRun( DS::Run& ) { } /// initialise the function (when instantiated by MultiPath method) virtual void Initialise( const std::string& param ); /// set seed from a previous result virtual void SetSeed(const DS::FitResult& result); /// set a result from the parameters virtual DS::FitResult MakeResult(const std::vector& pars); /// set the position, which is fixed in this fit void SetVertex(const std::vector& vtx); /// set a starting set of parameters for one iteration virtual std::vector GetStart(); /// calculates the figure of merit for a given PMT and vertex. virtual double Calculate( const std::vector& pmt, const std::vector& par, std::vector& diff ); /// check whether the parameters yield a valid result virtual bool ValidResult(const std::vector& pars); private: /// look up likelihood profile void LAnddLdCosTheta_Ch(double cosTheta, double& L_Ch, double& dLdCosTheta_Ch); /// database table FIT_Ch_Angle std::vector fPDFChAngle; // sPDFAngle_ChFit std::vector fPDFxChAngle; // bin edges std::vector fDerivativeChAngle; // derivative histogram int fEntriesAngle; // number of histogram bins /// drive correction parameters bool fDriveCorEnable; double fDrivePositionScale; double fDriveDirectionScale; /// vertex position (set by SetVertex) std::vector fVertex; #ifdef MULTIPATH_FIXED_SEED double stepd; #endif }; } //::RAT #endif