//////////////////////////////////////////////////////////////////////////////// /// \class RAT::DU::LightPathFitter /// /// \brief LightPath fitter abstract interface. //////////////////////////////////////////////////////////////////////////////// #ifndef __RAT_DU_LightPathFitter__ #define __RAT_DU_LightPathFitter__ #include #include #include #include namespace RAT { namespace DU { class LightPathFitter : public TObject { public: LightPathFitter() { } /// Attempt to fit a light path, from the start of the given path object /// to the end of the path. The starting point will be used as an exact /// location, but the end may not be as specified (how the end is determined /// if it's not the same is dependent on the algorithm). Also, if the /// end point is used exactly, the ending region type is copied from the /// argument. /// /// @param[in] startPath The beginning and (prospective) end of the path. /// @param[out] startPath The path will be modified. /// @return A reference to the modified light path. virtual LightPath& Fit(LightPath& startPath) const = 0; /// Calculate the solid angle for this path, as subtended at the start point by the PMT /// at the end point of the light path. /// /// @param[in] lightPath The fitted light path. If input is invalid, a fit will be performed. /// @param[in] pmtNorm The PMT-bucket normal vector (pointing IN, towards the AV) /// @param[in] nVal The nVal-sided polygon superimposed onto the PMT bucket for the calculation. /// Use nVal == 0 for spherical cap approximation, otherwise nVal must be > 2. /// @param[out] cosThetaAvg The average cos(theta) of the incident path on the PMT bucket face. // Will be <= -999.0 for invalid path. /// /// @return Solid angle, or something < 0 for invalid path. virtual Double_t GetSolidAngle(const LightPath& lightPath, const TVector3& pmtNorm, UInt_t nVal, Double_t& cosThetaAvg) const = 0; ClassDefNV( LightPathFitter, 0 ); }; // class LightPathFitter } // namespace DU } // namespace RAT #endif