// PMTTimeJitterProc.cc // Contact person: James Sinclair - Author // See PMTTimeJitterProc.hh for more details //———————————————————————// #include #include #include #include #include #include #include #include #include using namespace std; using namespace RAT::DS; namespace RAT { PMTTimeJitterProc::PMTTimeJitterProc() : Processor("PMTjitter") { fnHitPMT = 0; fnPMT = 0; fPMTid = 0; fSigma = 0; fJitter = 0; fPMTtime = 0; fFirstEvent = true; } PMTTimeJitterProc::~PMTTimeJitterProc() { // Do nothing } void PMTTimeJitterProc::BeginOfRun( DS::Run& ){ fnPMT = DU::Utility::Get()->GetPMTInfo().GetCount(); TRandom3 rand; rand.SetSeed(7); for (int i=0;i 0){ fSigma = value; cerr << "Sigma: "<< fSigma << endl; } else{ throw ParamInvalid(param, "sigma must be > 0"); } } else{ throw ParamUnknown(param); } } void PMTTimeJitterProc::SetD(const std::string& param, const double value){ if (param == "sigma"){ if (value > 0){ fSigma = value; cerr << "Sigma: "<< fSigma << endl; } else{ throw ParamInvalid(param, "sigma must be > 0"); } } else{ throw ParamUnknown(param); } } Processor::Result PMTTimeJitterProc::DSEvent( DS::Run&, DS::Entry& ds ){ for(size_t iev = 0; iev < ds.GetEVCount(); iev++){ RAT::DS::EV& ev = ds.GetEV(iev); fnHitPMT = ev.GetCalPMTs().GetCount(); for (int i=0;i