//////////////////////////////////////////////////////////////////////// /// \class RAT::PMTSelectors::EarlyHitPMTSelector /// /// \brief Select a certain number of PMTs for high nhit events in /// partial/scintillator phase to boost the fit speed. /// First divide the PSUP sphere into n*n panels by solid angle theta-phi; /// for each panel, select the earliest hit PMT ( after dropping those too /// early by setting a time threshold ). n*n PMTs or less are selected. /// 16*16 panels by default. A shape shifted pdf (dropping the late light /// components) should be used along with this selector. /// /// \author Jie Hu (contact) /// /// REVISION HISTORY:\n /// 15 May 2018: Jie Hu New file /// /// The selector is invoked with: /// /rat/procset selector "earlyHitPMTSelector" /// /rat/procset selector.panels 16 /// /rat/procset selector.fNThresh 100 /// /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_PMTSelector_EarlyHitPMTSelector__ #define __RAT_PMTSelector_EarlyHitPMTSelector__ #include #include #include #include #include #include namespace RAT { namespace PMTSelectors { class EarlyHitPMTSelector: public PMTSelector { public: /// Return the name std::string GetName() const { return Name(); } /// Fitter structure name static std::string Name() { return std::string("earlyHitPMTSelector"); } /// 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: int fNbin; int fNThresh; double fHitTimeThresh; }; } //::PMTSelectors } //::RAT #endif