//////////////////////////////////////////////////////////////////////// /// \class RAT::PDFs::Direction2D /// /// \brief 2D PDFs in Cos Angle and Time Residual /// /// \author name Josie Paton /// Will Parker /// /// REVISION HISTORY:\n /// 15/09/2021 : J Paton - New file \n /// 15/05/2022 : W Parker - Modified structure to read probability /// from histogram rather than interpolate /// /// \details Returns probabilities for 2D PDFs using the effective velocity /// transit time routine, and the cos angle between particle direction /// and photon direction. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_PDF_Direction2D__ #define __RAT_PDF_Direction2D__ #include #include #include #include class G4PhysicsOrderedFreeVector; namespace RAT { class FitterPMT; namespace DS { class FitVertex; } namespace PDFs { class Direction2D : public PDF { public: double GetProbability( const FitterPMT& pmt, const DS::FitVertex& vertex ); std::string GetName() const { return Name(); } static std::string Name() { return std::string( "Direction2D" ); } /// Initialise the PDF void Initialise( const std::string& param ); void BeginOfRun( DS::Run& run ); void EndOfRun( DS::Run& run ); void SetS( const std::string& param, const std::string& value ); protected: std::string fIndex; ///Database index std::string fTable; ///Table name std::vector fAV_offset; double fAV_offset_z; double fEnergy;//used to determine which PDF to read fromm ratdb file std::string fTResidPos;//used to determine which PDF to read fromm ratdb file std::string fEventsPos;//used to determine which PDF to read fromm ratdb file TH2D* fPDF; double fTimeWindowMin;//only include hits within this window double fTimeWindowMax; }; } //::PDFs } //::RAT #endif