From 932a3c5c7749e1a423fe2487ebb641c58c8b2087 Mon Sep 17 00:00:00 2001 From: Tracy Usher Date: Wed, 9 Jul 2025 08:14:22 -0700 Subject: [PATCH 1/3] The full pedestal was not getting output to the RawDigit object, only the final correction. This modification should give the full pedestal (which was specifically requested by the online monitor folks). --- icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc b/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc index ffd08ab21..be41b157b 100644 --- a/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc +++ b/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc @@ -692,7 +692,7 @@ void DaqDecoderICARUSTPCwROI::processSingleFragment(size_t ConcurrentRawDigitCol::iterator newObjItr = concurrentRawDigitCol.emplace_back(channel,wvfm.size(),wvfm); - newObjItr->SetPedestal(localPedestal,localFullRMS); + newObjItr->SetPedestal(decoderTool->GetPedestal()[chanIdx]+localPedestal,localFullRMS); // And, finally, the ROIs const icarus_signal_processing::VectorBool& chanROIs = decoderTool->getROIVals()[chanIdx]; From 9ca540f2915f6ea6247a4592b98194a89a329796 Mon Sep 17 00:00:00 2001 From: Tracy Usher Date: Wed, 9 Jul 2025 08:31:11 -0700 Subject: [PATCH 2/3] oops --- icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc b/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc index be41b157b..77e2a73b0 100644 --- a/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc +++ b/icaruscode/Decode/DaqDecoderICARUSTPCwROI_module.cc @@ -692,7 +692,7 @@ void DaqDecoderICARUSTPCwROI::processSingleFragment(size_t ConcurrentRawDigitCol::iterator newObjItr = concurrentRawDigitCol.emplace_back(channel,wvfm.size(),wvfm); - newObjItr->SetPedestal(decoderTool->GetPedestal()[chanIdx]+localPedestal,localFullRMS); + newObjItr->SetPedestal(decoderTool->getPedestalVals()[chanIdx]+localPedestal,localFullRMS); // And, finally, the ROIs const icarus_signal_processing::VectorBool& chanROIs = decoderTool->getROIVals()[chanIdx]; From 08e64b88f1b8ea9f9a2a905b2d19654233fe8dfe Mon Sep 17 00:00:00 2001 From: Tracy Usher Date: Thu, 10 Jul 2025 11:17:19 -0700 Subject: [PATCH 3/3] Correct pedestal to account for running the low frequency correction --- icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc b/icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc index c5e590b24..c9cb45d9e 100644 --- a/icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc +++ b/icaruscode/Decode/DecoderTools/TPCNoiseFilter1D_tool.cc @@ -379,7 +379,7 @@ void TPCNoiseFilter1DMC::process_fragment(detinfo::DetectorClocksData const&, std::copy(dataArray[idx].begin(),dataArray[idx].end(),rawDataVec.begin()); - Eigen::Vector2f meanPos; + Eigen::Vector2f meanPos({0.,0.}); Eigen::Matrix2f eigenVectors {{0.,0.},{0.,0.}}; Eigen::Vector2f eigenValues {0.,0.}; @@ -395,6 +395,9 @@ void TPCNoiseFilter1DMC::process_fragment(detinfo::DetectorClocksData const&, fNumTruncBins[idx], fRangeBins[idx]); + // Make sure we correct for low frequency offset if it was run + fPedestalVals[idx] += meanPos[1]; + if (fRemoveBadRMS && (fFullRMSVals[idx] < 2.5 || fFullRMSVals[idx] > 40.)) std::fill(fSelectVals[idx].begin(),fSelectVals[idx].end(),true); // Convolve with a filter function