//////////////////////////////////////////////////////////////////////// /// \class RAT::DQPMTProc /// /// \brief Data quality PMT processor /// /// \author Ashley R. Back /// /// REVISION HISTORY:\n /// 2014-11-28 : a.r.back@qmul.ac.uk - Tidied up for FTB processing /// 2016-04-24 : Mark Stringer ms711@sussex.ac.uk - Added CHS check for coverage /// \details Checks calibration status of each PMT for each event.\n /// Then runs several checks of coverage provided by fully calibrated\n /// "usable" PMTs. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_DQPMTProc__ #define __RAT_DQPMTProc__ #include #include #include #include #include #include #include class TFile; class TH2D; class TGraph; namespace RAT { namespace DS { class Run; class Entry; class EV; } namespace DU { class PMTInfo; } } namespace RAT { class DQPMTProc : public DataQualityProc { public: DQPMTProc(); virtual ~DQPMTProc(); virtual void BeginOfRun( DS::Run& run ); struct PanelProp { int type; int coverageThresh; int coverageCount; }; /// Returns area of a cap on a sphere. For use in coverage check 4, not yet implemented. virtual double GetCapArea( const double r, const double a ) const; virtual Processor::Result DSEvent( DS::Run& run, DS::Entry& ds ); /// Fill TH2D coverage map virtual void FillCrateCoverageMap( const int lcn, TH2D* h1 ) const; /// Fill TH1D coverage map virtual void FillCrateCoverageMap( const int lcn, TH1D* h1 ) const; /// Increments coverage counters virtual void UpdateCoverage( const int lcn, const DU::PMTInfo& fPMTInfo ); virtual void EndOfRun( DS::Run& run ); /// Checks coverage counters against coverage check criteria virtual void RunCoverageChecks(); protected: virtual Processor::Result Event( DS::Entry& ds, DS::EV& ev ); DBLinkPtr fGeoPsup; /// fPanelNumbers; /// fPanelTypes; /// fCrateCoverage; /// fPMTCalStatuses; /// fPanels; /// fNeckAreaCoverage; /// fPMTPhi; /// fPMTTheta; ///