From 5fbae8daff7f5212951f215a7dc4da20fe8e05df Mon Sep 17 00:00:00 2001 From: Will Matthews Date: Fri, 12 Jun 2026 12:41:57 +0100 Subject: [PATCH] Increase eta/V lookup table from 20 to 200 points The 20-point linear LUT over [0, 5.3*tau] biased the static transfer curve by 0.5/1.6/2.9% at lam*tau = 3/20/60 against the closed-form renewal model (the residual grows with saturation depth because the microcell age density concentrates where the 0.27*tau grid is coarsest). At 200 points the residual drops to <= 0.1%, the MC noise floor of a 200k-step run; 2000 points buys nothing further. Lookup is an early-exit linear scan, so the runtime cost is negligible. Co-Authored-By: Claude Fable 5 --- src/sipm.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sipm.cpp b/src/sipm.cpp index 779a87d..4b37a0c 100644 --- a/src/sipm.cpp +++ b/src/sipm.cpp @@ -59,7 +59,9 @@ SiPM::SiPM(unsigned long numMicrocell_in, double vbias_in, double vBr_in, double microcellTimes = vector{}; // microcell live time of last detection vector microcellTimes.reserve(numMicrocell + 8); // Prevent issues with free() - LUTSize = 20; // Look Up Table Size + LUTSize = 200; // LUT size: 20 points biased the static transfer curve by up to + // ~3% at deep saturation (linear-interp error in eta/V); 200 keeps + // the bias below the MC noise floor (~0.1%) at negligible cost. tVecLUT.assign(LUTSize, 0.0); // Preallocate LUT Time array pdeVecLUT.assign(LUTSize, 0.0); // Preallocate LUT PDE array vVecLUT.assign(LUTSize, 0.0); // Preallocate LUT Voltage array @@ -86,7 +88,9 @@ SiPM::SiPM(unsigned long numMicrocell_in, double vbias_in, double vBr_in, double microcellTimes = vector{}; // microcell live time of last detection vector microcellTimes.reserve(numMicrocell + 8); // Prevent issues with free() - LUTSize = 20; // Look Up Table Size + LUTSize = 200; // LUT size: 20 points biased the static transfer curve by up to + // ~3% at deep saturation (linear-interp error in eta/V); 200 keeps + // the bias below the MC noise floor (~0.1%) at negligible cost. tVecLUT.assign(LUTSize, 0.0); // Preallocate LUT Time array pdeVecLUT.assign(LUTSize, 0.0); // Preallocate LUT PDE array vVecLUT.assign(LUTSize, 0.0); // Preallocate LUT Voltage array @@ -146,7 +150,9 @@ SiPM::SiPM(vector svars) microcellTimes = vector{}; // microcell live time of last detection vector microcellTimes.reserve(numMicrocell + 8); // Prevent issues with free() - LUTSize = 20; // Look Up Table Size + LUTSize = 200; // LUT size: 20 points biased the static transfer curve by up to + // ~3% at deep saturation (linear-interp error in eta/V); 200 keeps + // the bias below the MC noise floor (~0.1%) at negligible cost. tVecLUT.assign(LUTSize, 0.0); // Preallocate LUT Time array pdeVecLUT.assign(LUTSize, 0.0); // Preallocate LUT PDE array vVecLUT.assign(LUTSize, 0.0); // Preallocate LUT Voltage array