From 3228ad9f5a57b8e6b1e3c4cdcefce0536c012b92 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Sun, 9 Sep 2018 12:00:02 -0500 Subject: fix bug in charge PDF calculation This commit fixes a bug in the charge PDF calculation for n > MAX_PE. The standard deviation should scale like sqrt(n)*qstd where qstd is the standard deviation of the single PE charge distribution. --- src/sno_charge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sno_charge.c b/src/sno_charge.c index faf7826..fe1e553 100644 --- a/src/sno_charge.c +++ b/src/sno_charge.c @@ -93,7 +93,7 @@ double pq(double q, int n) if (n > MAX_PE) { /* Assume the distribution is gaussian by the central limit theorem. */ - return norm(q,n*qmean,qstd); + return norm(q,n*qmean,sqrt(n)*qstd); } if (q < qlo || q > qhi) return 0.0; -- cgit