///////////////////////////////////////////////////////////////////////// // Conditional return on the nhit value of any secondary event. // Returns OKTRUE if the event has no secondary with nhits>fMinNhits // or OKFALSE if not. // // Author: J. R. Wilson // // REVISION HISTORY: // 2015-11-13 : J Wilson - new revision // ////////////////////////////////////////////////////////////////////////// #ifndef __RAT_SecondaryNhitsProc__ #define __RAT_SecondaryNhitsProc__ #include namespace RAT { class SecondaryNhitsProc : public Processor { public: // Create a new cut processor which cuts events which have no PMT hits SecondaryNhitsProc() : Processor("SecondaryNhitsProc"), fMaxNHits(0) { }; // Destroy the processor virtual ~SecondaryNhitsProc() { }; // Applies the nhit command // // param should be nhit // value should be the minimum value // throws ParamUnknown if param is not nhit // throws ParamInvalid if value is not >=0 virtual void SetI( const std::string& param, const int value ); // Process the event // // Conditional on the number of hits // // run: Data structure for the run // ds: Data structure for the event // returns OKTRUE if the hits > fMinHits or OKFALSE if not virtual Processor::Result DSEvent( DS::Run& run, DS::Entry& ds ); protected: unsigned int fMaxNHits; // Maximum number of nhits of secondary to return true }; } // namespace RAT #endif