/////////////////////////////////////////////////////////////////////// // // Very simple energy fitter, just divides by a constant // // Author: Phil G Jones // Author: Matt Mottram < m.mottram@qmul.ac.uk> -- contact person // // REVISION HISTORY: // 26/04/2011 : P G Jones - New file // 01/05/2012 : P G Jones - Simplify the method now energyLookup exists. // 02/06/2021 : T Kroupova - Add detector state correction // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_SimpleEnergy_ #define __RAT_Method_SimpleEnergy_ #include #include #include namespace RAT { namespace Methods { class SimpleEnergy : public Method { public: virtual std::string GetName() const { return SimpleEnergy::Name(); } static std::string Name() { return std::string( "simpleEnergy" ); } void Initialise( const std::string& param ); void BeginOfRun( DS::Run& run ); void EndOfRun( DS::Run& ) { } virtual DS::FitResult GetBestFit(); private: void ApplyDetectorStateCorrection(double coorActiveChannels, double coorChanEff); //Applies detector state correction to fNhitPerMeV std::string fIndex; // Optional database index to use double fNhitPerMeV; // Standard Nhits per MeV }; } //::Method } //::RAT #endif