//////////////////////////////////////////////////////////////////////// /// \class RAT::Classifiers::BiPoCumulTimeResid /// /// \brief: Classifies post-reconstruction as In-Window BiPo-Coincidence /// /// \author name: Krish Majumdar /// /// REVISION HISTORY: /// 26/10/2013 : Krish Majumdar - new file /// 29/01/2014 : Krish Majumdar - added parameters to plot the distribution /// 13/02/2014 : Krish Majumdar - changes as requested for Pull Request /// 24/04/2015 : Matt Mottram - updated initialisation to dynamically load material /// 30/04/2015 : Matt Mottram - added failover to default material PDF /// 09/02/2015 : Matt Mottram - update default material /// /// \details Uses the Normalised Cumulative Time Residuals distribution /// to classify events as either pileup BiPo coincidence events /// or not. The classifier returns the gamma value resulting /// from a KS test between the 130Te and events distributions. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_Classifiers_BiPoCumulTimeResid_ #define __RAT_Classifiers_BiPoCumulTimeResid_ #include #include #include #include namespace RAT { namespace DS { class FitResult; } namespace Classifiers { class BiPoCumulTimeResid : public SeededClassifier { public: virtual std::string GetName() const { return BiPoCumulTimeResid::Name(); } static std::string Name() { return std::string("BiPoCumulTimeResid"); } void Initialise(const std::string& param); void BeginOfRun(DS::Run& run); void EndOfRun(DS::Run&) { } void DefaultSeed(); void SetSeed(const DS::FitResult& seed); virtual DS::ClassifierResult GetClassification(); private: std::string fIndex; ///< Required index double fMinTimeResidual; ///< The minimum time residual to be considered in the Cumulative Time Residuals distribution double fMaxTimeResidual; ///< The maximum time residual to be considered in the Cumulative Time Residuals distribution std::vector fCumulativeFractions; ///< Vector of cumulative time residual probabilities for SIGNAL events TVector3 fEventPosition; ///< The fitted event position, used for calculating the event's time residuals double fEventTime; ///< The fitted event time, used for calculating the event's time residuals DU::LightPathCalculator fLightPath; ///< Light path calculator for a given run }; } //::Classifier } //::RAT #endif