/// \class RAT::RetriggerCut /// /// \brief Applying the datacleaning part of Retrigger cut based on /// the LIVETIME_CUT[retriggercut] table. /// /// \author Aobo Li /// \contact Aobo Li /// /// REVISION HISTORY:\n /// 17 October 2018 : Aobo Li - First Version(with Livetime 2.0) /// /// \details This processor applies the datacleaning part of retrigger cut, /// and updating the bitmask accordingly, but does not calculate its livetime. /// the livetime of retrigger cut is calculated in LivetimeCuts.cc /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_RetriggerCut__ #define __RAT_RetriggerCut__ #include #include #include #include #include namespace RAT { class RetriggerCut: public DataCleaningProc { public: RetriggerCut() : DataCleaningProc("retriggercut",1){}; virtual ~RetriggerCut(){}; virtual Processor::Result DSEvent(DS::Run& run, DS::Entry& ds); void BeginOfRun(DS::Run& run); protected: virtual Processor::Result Event(DS::Entry& ds, DS::EV& ev); //This method identifies retrigger events, and update the first event bit //of each retrigger stream, and store its livetime for further analysis. bool RetriggerIdentifier(DS::EV& ev); //This method check the correspondence of each start event and end event of a cut livetime period. //With this method, we can make sure the start and end pairs in fCutStart and fCutEnd are one-to-one //correspondent. bool CorrespondenceCheck(int eventSet[2], std::vector& firstArray, std::vector& secondArray); //Parameters for applying Retrigger livetime cut: int fRetriggerCutGTID[2]; int firstEventBit; int retriggerBit; bool foundCut; std::vector fFirstRetriggerReadout; std::vector fLastRetriggerReadout; }; } // namespace RAT #endif