//////////////////////////////////////////////////////////////////////// /// \class RAT::PMTSelectors::scintPMTSelector /// /// \brief Select a certain number of PMTs uniformly for high nhit events in /// partial/scintillator phase to boost the fit speed. /// /// \author Jie Hu (contact) /// /// REVISION HISTORY:\n /// 15 May 2018: Jie Hu New file /// /// The selector is invoked with: /// /rat/procset selector "uniformPMTSelector" /// /rat/procset selector.reducePMTto 100 /// /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_PMTSelector_UniformPMTSelector__ #define __RAT_PMTSelector_UniformPMTSelector__ #include #include #include #include #include #include namespace RAT { namespace PMTSelectors { class UniformPMTSelector: public PMTSelector { public: /// Return the name std::string GetName() const { return Name(); } /// Fitter structure name static std::string Name() { return std::string("uniformPMTSelector"); } /// Initialise the selector (by factory) - null in this case virtual void Initialise( const std::string& param ); /// called at beginning of run (inherited from FitterComponent). void BeginOfRun(DS::Run& run); /// called at end of run (inherited from FitterComponent) void EndOfRun(DS::Run& run); /// Set parameter values /// "reducePMTto" : in the partial/scintillator fill, reduce the nhit to a specific /// number to boost up the fit speed void SetI(const std::string& param, int value); /// Main Selector function virtual std::vector GetSelectedPMTs(const std::vector& data, const DS::FitVertex& vertex); protected: size_t fNPMTselect; }; } //::PMTSelectors } //::RAT #endif