//////////////////////////////////////////////////////////////////////// /// \class RAT::MultiPathWaterPosition /// /// \brief PMT-likelihood function for water position fit using MultiPath fitter. /// /// \author Jeff Tseng (contact) /// /// REVISION HISTORY:\n /// 2018-02-06 : J Tseng - new file /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_MultiPathWaterPosition__ #define __RAT_MultiPathWaterPosition__ #include #include #include //#define MULTIPATH_FIXED_SEED namespace RAT { class MultiPathWaterPosition : public VertexFunction { public: /// constructor MultiPathWaterPosition(); /// return the name virtual std::string GetName() const { return MultiPathWaterPosition::Name(); } /// fitter structure name static std::string Name() { return std::string("multiPathWater"); } /// 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 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 LAnddLdt_Ch(double& L_Ch, double& dLdt_Ch); /// database table FIT_MULTIPATH std::vector fPDFDataCh; // sPDF_multipathfit std::vector fPDFxCh; // bin edges std::vector fPDFCh; // histogram std::vector fDerivativeCh; // derivative histogram int fEntriesTimeCh; // number of histogram bins double fMaxPMTtRes; // max_PMT_tRes double fPSUPRadius2; // psup_rad, squared double fSpeedOfLightWater; //speed of light in water #ifdef MULTIPATH_FIXED_SEED double step; #endif }; } //::RAT #endif