//////////////////////////////////////////////////////////////////// /// \class RAT::NhitBurstCut /// /// \brief Applying the datacleaning part of Nhit Burst Cut based on /// the LIVETIME_CUT[tpburstcut] 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 Nhit Burst Cut, /// and updating the bitmask accordingly, but does not calculate its livetime. /// the livetime of Nhit Burst Cut is calculated in LivetimeCuts.cc /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_NhitBurstCut__ #define __RAT_NhitBurstCut__ #include #include #include #include #include namespace RAT { class NhitBurstCut : public DataCleaningProc { public: NhitBurstCut() : DataCleaningProc("tpburstcut",1){}; virtual ~NhitBurstCut(){}; 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 burst events cut. It takes in the array //of first event, last event and burst events, determine the livetime //of each burst, and store them for further analysis. bool BurstIdentifier(DS::EV& ev); //NhitBurstCutGTID array: [1]Cut Start Event GTID, [2]Cut End EVent GTID int fNhitBurstCutGTID[2]; //DC bitmask of Nhit Burst Cut int nhitBurstBit; //Contains all First Event of each Nhit Burst std::vector fFirstNhitBurstReadout; //Contains all Last Event of each Nhit Burst std::vector fLastNhitBurstReadout; //Contains all Nhit Burst events. std::vector fNhitBurstReadout; //If Nhit Burst Cut is found. bool foundCut; }; } // namespace RAT #endif