From d3e6db238754e3df898c9cafcbb3dd17ab963184 Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Wed, 24 Aug 2022 17:42:29 -0700 Subject: [PATCH] Fix bug in the coincidence window. Window was in units of ps while the timestamps were converted to ns. Resulting in an effective increase in window of 3 orders of magnitude. Fixed so that now all units are in ns. --- src/evb/EVBApp.cpp | 4 ++-- src/evb/EVBParameters.h | 2 +- src/guidict/EVBMainFrame.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/evb/EVBApp.cpp b/src/evb/EVBApp.cpp index 5951a7a..319ba7a 100644 --- a/src/evb/EVBApp.cpp +++ b/src/evb/EVBApp.cpp @@ -63,7 +63,7 @@ namespace EventBuilder { m_params.workspaceDir = data["WorkspaceDir"].as(); m_params.scalerFile = data["ScalerFile"].as(); m_params.timeShiftFile = data["TimeShiftFile"].as(); - m_params.slowCoincidenceWindow = data["SlowCoincidenceWindow(ps)"].as(); + m_params.slowCoincidenceWindow = data["SlowCoincidenceWindow(ns)"].as(); m_params.runMin = data["MinRun"].as(); m_params.runMax = data["MaxRun"].as(); m_params.bufferSize = data["BufferSize(hits)"].as(); @@ -130,7 +130,7 @@ namespace EventBuilder { yamlStream << YAML::Key << "WorkspaceDir" << YAML::Value << m_params.workspaceDir; yamlStream << YAML::Key << "ScalerFile" << YAML::Value << m_params.scalerFile; yamlStream << YAML::Key << "TimeShiftFile" << YAML::Value << m_params.timeShiftFile; - yamlStream << YAML::Key << "SlowCoincidenceWindow(ps)" << YAML::Value << m_params.slowCoincidenceWindow; + yamlStream << YAML::Key << "SlowCoincidenceWindow(ns)" << YAML::Value << m_params.slowCoincidenceWindow; yamlStream << YAML::Key << "MinRun" << YAML::Value << m_params.runMin; yamlStream << YAML::Key << "MaxRun" << YAML::Value << m_params.runMax; yamlStream << YAML::Key << "BufferSize(hits)" << YAML::Value << m_params.bufferSize; diff --git a/src/evb/EVBParameters.h b/src/evb/EVBParameters.h index 8d22df3..19d096f 100644 --- a/src/evb/EVBParameters.h +++ b/src/evb/EVBParameters.h @@ -12,7 +12,7 @@ namespace EventBuilder { int runMin = 0; int runMax = 0; - double slowCoincidenceWindow = 3.0e6; + double slowCoincidenceWindow = 3.0e3; size_t bufferSize = 2000; }; } diff --git a/src/guidict/EVBMainFrame.cpp b/src/guidict/EVBMainFrame.cpp index ae39acc..30490ba 100644 --- a/src/guidict/EVBMainFrame.cpp +++ b/src/guidict/EVBMainFrame.cpp @@ -60,7 +60,7 @@ EVBMainFrame::EVBMainFrame(const TGWindow* p, UInt_t w, UInt_t h) : NameFrame->AddFrame(ScalerFrame, fhints); TGHorizontalFrame *WindowFrame = new TGHorizontalFrame(InputFrame, w, h*0.1); - TGLabel *slowlabel = new TGLabel(WindowFrame, "Slow Coincidence Window (ps):"); + TGLabel *slowlabel = new TGLabel(WindowFrame, "Slow Coincidence Window (ns):"); fSlowWindowField = new TGNumberEntryField(WindowFrame, SLOWWIND, 0, TGNumberEntry::kNESReal, TGNumberEntry::kNEANonNegative); TGLabel *buflabel = new TGLabel(WindowFrame, "Buffer Size (hits):"); fBufferSizeField = new TGNumberEntryField(WindowFrame, BUFSIZE, 200000, TGNumberEntry::kNESInteger, TGNumberEntry::kNEANonNegative);