//////////////////////////////////////////////////////////////////// /// \class RAT::QvTCut /// /// \brief Flags flashers /// /// \author Richie Bonventre /// \contact Eric Marzec /// /// REVISION HISTORY:\n /// 20 April 2012 : Richie Bonventre - first version /// 13 Nov 2014 : Eric Marzec - Made myself contact person. /// 23 Feb 2015 : Chris Dock - Fixed array out of bounds segmentation fault /// \details This processor attempts to tag flasher by looking /// for events where the maximum charge is many counts away from /// the mean and much earlier than the median time. /// /// /// /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_QvTCut__ #define __RAT_QvTCut__ #include #include #include #include #include namespace RAT { class QvTCut : public DataCleaningProc { public: QvTCut() : DataCleaningProc("qvt",1){}; virtual ~QvTCut(){}; virtual Processor::Result DSEvent(DS::Run& run, DS::Entry& ds); void BeginOfRun(DS::Run&); protected: virtual Processor::Result Event(DS::Entry& ds, DS::EV& ev); int fTimeMode; ///< 0=only calibrated, 1=if bad, put any in curl to late bound, 2=use eca only if bad, 3=use raw if pca and eca bad int fCutMode; ///< 1='or' of qhl and qlx gain cuts, 2='and' of qhl and qlx gain cuts /// 3='or' of qhs and qlx cuts, 4='and' of qhs and qlx /// 5=(qhs 'and' qlx) or (qhl 'and' qlx) double fEarlyCTimeBound; ///< bound relative to median time for cut in nanoseconds double fLateCTimeBound; double fEarlyUTimeBound; double fLateUTimeBound; int fBadTACHigh; int fBadTACLow; int fQHSECAmask; int fQHLECAmask; int fQLXECAmask; int fPCAmask; int fLowTCAL; int fMinPMTs; int fNegativeRail; int fTCurlRaw; int fQHBound; ///< qhl bound relative to average in ped subtracted adc counts int fQLBound; ///< qlx bound relative to average in ped subtracted adc counts ECACal fECACal; }; } // namespace RAT #endif