//////////////////////////////////////////////////////////////////// /// \processor PMTTimeJitterProc /// /// \brief Uncalibrate the, to mimic PMT jitter /// /// \author James Sinclair /// /// REVISION HISTORY:\n /// 08 Oct 2015 : J. Sinclar - First version. Smears already-calibrated times. /// /// \details This effectively uncalibrates the PMT hit times, by a given amount (sigma). /// Unlike UnCal which smears pre-calibrated times during the conversion from /// ADC to ns, this smears the post-calibration hit times. Originally developed /// for TELLIE accuracy requirement tests. /// /// Sigma sets the size of the of the Gaussian smearing to be applied.An offset for each PMT is then /// randomly selected from the gaussian once at the start, this off set is then added to every hit /// in the run for each PMT, to mimic the calibration being a bit off for each PMT. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PMTTimeJitterProc__ #define __RAT_PMTTimeJitterProc__ #include #include #include #include #include #include namespace RAT { class PMTTimeJitterProc : public Processor { public: PMTTimeJitterProc(); virtual ~PMTTimeJitterProc(); virtual void SetI(const std::string& param, const int value); virtual void SetD(const std::string& param, const double value); virtual Processor::Result DSEvent( DS::Run& run, DS::Entry& ds ); protected: void BeginOfRun( DS::Run& run ); bool fFirstEvent; int fPMTid; int fnPMT; int fnHitPMT; double fSigma; double fJitter; double fPMTtime; std::map fPMTMap; }; } // namespace RAT #endif