//////////////////////////////////////////////////////////////////// /// \class RAT::NeckCut /// /// \brief Flags neckcut events for data cleaning /// /// \author Richie Bonventre /// \contact Eric Marzec /// /// REVISION HISTORY:\n /// 28 July 2011 : Richie Bonventre - first version\n /// 11 Nov 2014 : Matthew Strait - Removed unused variables. /// 13 Nov 2014 : Eric Marzec - Made myself contact person. /// 26 Oct 2017 : T Kaptanoglu - Rewrite most of the code /// /// \details This processor tags events involving the neck tubes. /// if there are too many neck tubes hit or if the neck tubes /// were hit long before the tubes in the bottom of the detector, /// the event fails. /// /// /// /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_NeckCut__ #define __RAT_NeckCut__ #include #include #include #include #include namespace RAT { class NeckCut : public DataCleaningProc { public: NeckCut() : DataCleaningProc("neckcut",1){}; virtual ~NeckCut(){}; virtual Processor::Result DSEvent(DS::Run&, DS::Entry& ds); void BeginOfRun(DS::Run& run); protected: virtual Processor::Result Event(DS::Entry& ds, DS::EV& ev); unsigned int fMinNhit; ///< pass the event if outside these nhit ranges unsigned int fMaxNhit; int fMaxNeck; ///< fail event if this number of neck tubes hit int fModeQ; ///< 2 = ped subtracted charge, 1 = ADC values int fPedMinQ; ///< consider a high charge hit if outside these ranges int fPedMaxQ; int fADCMinQ; int fADCMaxQ; int fModeT; ///< 2= ECA times, 1= ADC value int fCalType; double fTimeDiff; ///< check timing of neck hit double fTacDiff; ECACal fECACal; }; } // namespace RAT #endif