//////////////////////////////////////////////////////////////////// /// \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 #include #include // C++ stuff #include #include class TVector3; class TH1F; class TGraph2D; namespace RAT { 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 BinLog( TAxis *axis, const Double_t non0start=-999. ); 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 ); int fEventCounter; int fInputFibre; // The user is allowed to input the fibre number // Source related information double fSelectAngle; // Maximum angle for fibre // Run related information int fTrigType; // Trigger type, should be EXTASYNC // For the lightpath function double fDistTolerance; bool fRunCheckOK; bool fRunCalcTransitTimes; // Determines if the transittimes were calculated int fTotPMTs; /// Position and direction of the LEDs double fLEDPositionX; double fLEDPositionY; double fLEDPositionZ; double fLEDDirX; double fLEDDirY; double fLEDDirZ; /// transittimes std::vector fTransitTimes; std::vector fLEDIniDir; std::vector fNHitCheck; // Store minimum and maximum number of hits per event int fNHitsMax; int fNHitsMin; // The current run ID std::ostringstream fRunIDString; int fRunID; // 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; TH1F *fTimeDiff; }; } // namespace RAT #endif