//////////////////////////////////////////////////////////////////////// /// \class RAT::MultiPathScint /// /// \brief PMT-likelihood function for scintillator position fit /// using MultiPath fitter. /// /// \author Jie Hu (contact) /// /// REVISION HISTORY:\n /// 2018-06-15 : J Hu - new file /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_MultiPathScint__ #define __RAT_MultiPathScint__ #include #include #include //#define MULTIPATH_FIXED_SEED namespace RAT { class MultiPathScint : public VertexFunction { public: /// constructor MultiPathScint(); /// return the name virtual std::string GetName() const { return MultiPathScint::Name(); } /// fitter structure name static std::string Name() { return std::string("multiPathScint"); } /// 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(double& L, double& dLdt); void LAnddLdtScint(double& L, double& dLdt); /// 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 std::vector fPDFDataScint; // sPDF_scint std::vector fPDFxScint; // bin edges std::vector fPDFScint; // histogram std::vector fDerivativeScint; // derivative histogram int fEntriesTime; // number of histogram bins double fMaxPMTtRes; // max_PMT_tRes double fBoundary; //boundary tolerance double fPSUPRadius; double fPSUPRadius2; // psup_rad, squared double fAVRadiusOuter; // outer radius, 6060 mm double fAVRadius; // inner radius, 6005 mm double fNeckRadiusOuter; // outer radius of neck double fNeckRadius; // inner radius of neck double fZoff; // z offset of AV to the PSUP bool fNeckpathEnable; // enable neck path calculation double fZneckLo; // bottom of the neck in z position double fSpeedOfLightScint; //speed of light in scintillator double fSpeedOfLightWater; //speed of light in water double fWaterRI; double fScintRI; #ifdef MULTIPATH_FIXED_SEED double step; #endif }; } //::RAT #endif