//////////////////////////////////////////////////////////////////// /// \class RAT::PCATellieMonitorProc /// /// \brief Processor for monitoring PCA TELLIE data /// /// \author Martti Nirkko (since 2017) /// /// REVISION HISTORY: /// /// 07/2014 : F. Descamps - First version, only TELLIE now /// 01/2019 : M. Nirkko - Major improvements to plots and checks /// /// \detail This processor checks the PCA-TELLIE quality of data /// and outputs .png files (which can be used on /// the snoplus monitoring page) and a .ratdb file that /// summarizes the run quality. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PCATellieMonitorProc__ #define __RAT_PCATellieMonitorProc__ // RAT stuff #include #include // C++ stuff #include #include class TVector3; class TH1F; class TGraph2D; namespace RAT { namespace DS { class Entry; class EV; class Run; } namespace DU { class ChanHWStatus; class PMTInfo; class PMTCalStatus; class GroupVelocity; } class PCATellieMonitorProc : public Processor { public: PCATellieMonitorProc(); virtual ~PCATellieMonitorProc(); virtual void BeginOfRun( DS::Run& run ); virtual Processor::Result DSEvent( DS::Run& run, DS::Entry& ds ); virtual void SetI( const std::string& param, const int value ); virtual void Smooth( TGraph* g, TGraph* h, int width ); protected: virtual Processor::Result Event( DS::Entry& ds, DS::EV& ev ); int Save1DHisto( TH1F *histogram, const std::string &axisTitle, const bool logX=false ); int SaveTGraph2D( TGraph2D *graph, const std::string &title ); // Global parameters const double LAMBDA; const double ENERGY; const double LOCALITY; // The current run ID std::ostringstream fRunIDString; int fRunID; int fLastSubRunIndex; std::vector fSubRunNumbers; ///Array of the subrun numbers std::vector fFibres; /// fTransitTimes; std::vector fFibreIniDir; // Check nhit variation over time std::vector fNHitCheck; std::vector< std::vector > fNHitCheckPerSubrun; // Store minimum and maximum number of hits per event int fNHitsMax; int fNHitsMin; // Keep track of how many times a PMT was hit std::vector fHitCountCentral; // nPMTs std::vector fHitCount; // nPMTs // histograms TH1F *fQHSCal; TH1F *fQHLCal; TH1F *fQHSUnCal; TH1F *fQHLUnCal; TH1F *fTimeCal; TH1F *fTimeUnCal; TH1F *fTimeResidual; TH2F *fTimeVsAng; // Links to RAT data utilities const DU::PMTInfo& pmtList; const DU::ChanHWStatus& chs; const DU::PMTCalStatus& pmtStatus; const DU::GroupVelocity& grpVel; DU::LightPathCalculator lightPath; size_t fPSUPSystemId; }; } // namespace RAT #endif