//////////////////////////////////////////////////////////////////////// /// \class RAT::Classifiers::ITR /// /// \brief Calculates the ITR for an event /// /// \author name Eric Marzec /// /// REVISION HISTORY:\n /// 07/05/2013 : Eric Marzec - New file /// 05/22/2017 : J Caravaca - Add ability to use selectors /// 09/01/2020 : Logan Lebanowski - Properly account for partial fill /// /// \details Gives the ITR for an event, that is, the ratio of PMT hit /// time residuals that fall within the in-time window to those /// that fall without. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_Classifiers_ITR_ #define __RAT_Classifiers_ITR_ #include #include #include #include namespace RAT { namespace DS { class FitResult; } namespace Classifiers { class ITR : public SeededClassifier, public SelectorClassifier { public: virtual std::string GetName() const { return ITR::Name(); } static std::string Name() { return std::string( "ITR" ); } void Initialise( const std::string& ); void BeginOfRun(DS::Run& run); void EndOfRun(DS::Run&) { } virtual DS::ClassifierResult GetClassification(); /// Set the seed to default void DefaultSeed(); /// Set the seed from seed void SetSeed( const DS::FitResult& seed ); private: std::string fIndex; ///< Optional database index TVector3 fEventPos; double fEventTime; double fUpperTimeLimit; double fLowerTimeLimit; DU::TimeResidualCalculator fTRCalc; ///< Time residual calculator for a given run DS::FitVertex fSeedVertex; bool fPartialFlag; }; } //::Classifier } //::RAT #endif