//////////////////////////////////////////////////////////////////////// /// \class RAT::ScintFitter /// /// \brief Scintillator phase fitter /// /// \author Phil Jones \n /// \author Matt Mottram < m.mottram@qmul.ac.uk> -- contact person /// /// REVISION HISTORY: /// - 27/04/2011 : P.Jones - First Revision, new file. /// - 2014-03-29 : P G Jones - Updated lifetime, added BeginOfRun method /// - 2014-07-20 : A Soerenson - Added muon fitting. /// - 2014-09-16 : K Majumdar - Changed energy fitting from Lookup to Functional Form /// - 2014-12-09 : P G Jones - Allow chained PMTSelectors /// - 2015-04-08 : M Mottram - Added BerkeleyAlphaBeta classifier and BiPo classifiers /// - 2015-08-03 : M Mottram - Bug fix for Muon fitters /// - 2016-01-14 : M Mottram - Add SetFOMs /// - 2016-05-19 : M Mottram - Update energy to EnergyRThetaFunctional /// - 2016-07-20 : M Mottram - add nearAVAngular and positionANN /// /// \details Best (as defined by reconstruction group) scint phase fitter /// combination. /// Will FAIL if either position/time or energy components /// throw. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_ScintFitter__ #define __RAT_ScintFitter__ #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 ScintFitter : public Processor { public: ScintFitter(); virtual ~ScintFitter(); /// Called at the beginning of runs to setup the scintFitter /// /// @param[in] run void BeginOfRun( DS::Run& run ); /// Called to invoke the scintFitter /// /// @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 ); /// Called at the end of runs /// /// @param[in] run void EndOfRun( DS::Run& run ); protected: virtual Processor::Result Event( DS::Run& run, DS::EV& ev ); // Sets 'scintFitter' result in EV data structure Processor::Result SetResult( DS::FitResult& scintResult, DS::EV& ev, size_t currentPass ); // Sets 'scintFitter' result in EV data structure for muons (includes direction fit) Processor::Result SetMuonResult( DS::FitResult& scintResult, 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; Methods::Method* fMuonWater; Methods::Method* fMuonScintillator; Methods::Method* fPositionANN; Optimisers::Optimiser* fPowell; Optimisers::Optimiser* fBiPoLikelihoodDiffOptimiser; Optimisers::Optimiser* fGridOptimiser; PMTSelectors::PMTSelector* fNullSelector; PDFs::PDF* fET1D; Methods::Method* fEnergyMethod; Classifiers::Classifier* fITR; Classifiers::Classifier* fQPDT; Classifiers::Classifier* fTimingPeaks; Classifiers::Classifier* fMeanTime; Classifiers::Classifier* fPreTriggerHits; Classifiers::Classifier* fIsoRegions; Classifiers::Classifier* fEarlyTime; Classifiers::Classifier* fBiPoCumulTimeResid; Classifiers::Classifier* fBiPo212LikelihoodDiff; Classifiers::Classifier* fBiPo214LikelihoodDiff; Classifiers::Classifier* fBiPo212Classifier; Classifiers::Classifier* fBiPo214Classifier; Classifiers::Classifier* fBerkeleyAlphaBeta; Classifiers::Classifier* fMuonClassifier; Classifiers::Classifier* fNearAVAngular; size_t fCutOff; ///< Lower limit to which the quad method is an acceptable seed }; } // ::RAT #endif