/////////////////////////////////////////////////////////////////////// // // Smear a fitted position, direction, or energy result // // Author: Morgan Askins // // REVISION HISTORY: // 11-01-2017 : M Askins - Initial commit // // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_SmearResult_ #define __RAT_Method_SmearResult_ #include #include #include #include #include #include #include #include #include #include namespace RAT { namespace Methods { class SmearResult : public SeededMethod { public: // Smearing types enum SmearType { energy, position, posx, posy, posz, posr, postheta, posphi, direction }; SmearResult(); virtual std::string GetName() const { return Name(); } static std::string Name() { return std::string( "smearResult" ); } void Initialise( const std::string& ); void BeginOfRun( DS::Run& ); void EndOfRun( DS::Run& ); void SetD(const std::string& param, const double value); void SetS(const std::string& param, const std::string& value); virtual DS::FitResult GetBestFit(); // Sets the seed to the default void DefaultSeed(); // IsApplied methods return status of fApplied inline bool IsAppliedPosition(){ return fAppliedPosition; } inline bool IsAppliedDirection(){ return fAppliedDirection; } inline bool IsAppliedEnergy(){ return fAppliedEnergy; } // SetApplied sets the current method of smearing void SetActivePosition(); void SetActiveDirection(); void SetActiveEnergy(); private: // fApplied statements set at intialization. Decides if smearing should occur bool fAppliedPosition; bool fAppliedDirection; bool fAppliedEnergy; void SetApplied(const std::string& param); std::map< std::string, SmearType > fStringToTypeMap; std::map< SmearType, std::string > fTypeToStringMap; SmearType fCurrentSmear; std::map fMapOfSmears; std::map fMapOfFunctions; std::map fMapOfLo; std::map fMapOfHi; }; } //::Method } //::RAT #endif