//////////////////////////////////////////////////////////////////////// /// \class RAT::PartialFitter /// /// \brief Partial scintillator phase fitter /// /// \author Richie Bonventre /// /// REVISION HISTORY: /// - 27/04/2011 : R.Bonventre - First Revision, new file. /// - 2014-03-29 : P G Jones - Updated lifetime, added BeginOfRun method /// - 2014-12-09 : P G Jones - Allow chained PMTSelectors /// - 2015-05-06 : M Mottram - Use partialEnergy method with energyFunctional seed /// - 2016-01-14 : M Mottram - Add SetFOMs /// - 2016-05-19 : M Mottram - Update energySeed to EnergyRThetaFunctional /// /// \details Best (as defined by reconstruction group) partial scint phase fitter /// combination. /// Will FAIL if either position/time or energy components /// throw. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_PartialFitter__ #define __RAT_PartialFitter__ #include namespace RAT { namespace DS { class EV; } namespace Methods { class Method; } namespace PDFs { class PDF; } namespace Optimisers { class Optimiser; } namespace PMTSelectors { class PMTSelector; } namespace Classifiers { class Classifier; } namespace DS{ class FitResult; } class PartialFitter : public Processor { public: PartialFitter(); virtual ~PartialFitter(); /// Called at the beginning of runs to setup the partialFitter /// /// @param[in] run void BeginOfRun( DS::Run& run ); /// Called at the end of runs /// /// @param[in] run void EndOfRun( DS::Run& run ); /// Called to invoke the partialFitter /// /// @param[in, out] run Data structure for the run /// @param[in, out] ds Data structure for the event virtual Processor::Result DSEvent( DS::Run& run, DS::Entry& ds ); protected: virtual Processor::Result Event( DS::Run& run, DS::EV& ev ); Processor::Result SetResult( DS::FitResult& partialResult, DS::EV& ev, size_t currentPass); // Default fitters may have subroutines that set the same FOM name for different parameters // Add a prefix for the FOM name in the final result to distinguish them. void SetFOMs( DS::FitResult& fitResult, const DS::FitResult& partialResult, const std::string& prefix ); Methods::Method* fQuadSeed; Methods::Method* fPositionTime; Optimisers::Optimiser* fPowell; PMTSelectors::PMTSelector* fNullSelector; PDFs::PDF* fET1D; Methods::Method* fEnergySeed; Methods::Method* fPartialEnergy; size_t fCutOff; ///< Lower limit to which the quad method is an acceptable seed }; } // ::RAT #endif