//////////////////////////////////////////////////////////////////// /// \class RAT::PCATellieMonitorProc /// /// \brief Processor for monitoring PCA TELLIE data /// /// \author Freija Descamps (fbdescamps@lbl.gov) /// /// REVISION HISTORY: /// /// 07/2014 : F. Descamps - First version, only TELLIE now /// /// \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); protected: virtual Processor::Result Event( DS::Entry& ds, DS::EV& ev ); int Save1DHisto(TH1F *histogram, const std::string &axisTitle); int SaveTGraph2D(TGraph2D *graph, const std::string &title); int fEventCounter; int fInputFiber; // The user is allowed to input the fiber number // Source related information double fSelectAngle; // Maximum angle for fiber // 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; }; } // namespace RAT #endif