/////////////////////////////////////////////////////////////////////// // // Energy fit using prompt nhits // // Author: name John Walker // // REVISION HISTORY: // 08/06/2016 : J Walker - New file // // This method divides prompt hits by a constant to estimate energy // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_EnergyPromptHits__ #define __RAT_Method_EnergyPromptHits__ #include #include #include #include namespace RAT { namespace Methods { class EnergyPromptHits : public SeededMethod { public: // Returns the method's name virtual std::string GetName() const { return EnergyPromptHits::Name(); } // Returns the method's name static std::string Name() { return std::string( "energyPromptHits" ); } // Initialise the method // // "param" is an optional index in the db to use void Initialise( const std::string& param ); // This will load the tables from the database void BeginOfRun( DS::Run& run ); void EndOfRun( DS::Run& run ); // Calculate and return the best fit for the seed virtual DS::FitResult GetBestFit(); // Set the seed to the default void DefaultSeed(); private: double fWorkingPMTs; // Number of working PMTs at time of coordination std::vector fPromptWindow; // The prompt hit time window std::string fIndex; // Optional index override for the db table - unused at the moment PMTSelectors::PMTSelector* fTimeResidualCut; // Time residual cut PMT selector double fNpromptPerMeV; // Prompt Nhits per MeV }; } //::Method } //::RAT #endif