//////////////////////////////////////////////////////////////////////// /// \class RAT::PMTVariation /// /// \brief PMT by PMT variation parameters /// /// \author Phil Jones /// \author Ashley R. Back -- contact person /// /// REVISION HISTORY:\n /// 2013-12-18 : P.Jones - Refactor to correctly access the database.\n /// /// \details Returns the relative efficiency of the PMT as normalised /// to the detector average. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_PMTVariation_hh__ #define __RAT_PMTVariation_hh__ #include #include namespace RAT { class PMTVariation { public: /// Singleton class instance /// /// @return pointer to the PMTVariation inline static PMTVariation* Get(); /// Initialise the variation for a new run void BeginOfRun(); /// Get the variation for channel lcn /// /// @param[in] lcn of the channel /// @return the variation of the channel double GetVariation( const int lcn ) const; protected: std::vector fPMTVariation; ///< Relative PMT efficiencies std::string fIndex; /// Prevent usage of methods below PMTVariation() { } PMTVariation( PMTVariation& ); void operator=( PMTVariation& ); }; inline PMTVariation* PMTVariation::Get() { static PMTVariation pmtVariation; return &pmtVariation; } } //::RAT #endif