diff options
author | tlatorre <tlatorre@uchicago.edu> | 2018-09-09 12:00:02 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2018-09-09 12:00:02 -0500 |
commit | 3228ad9f5a57b8e6b1e3c4cdcefce0536c012b92 (patch) | |
tree | aba99bbfe54d9b55d705b969bc76e7027aa06817 /src/sno_charge.c | |
parent | c53794a07381109101f942bceb75329114898cc7 (diff) | |
download | sddm-3228ad9f5a57b8e6b1e3c4cdcefce0536c012b92.tar.gz sddm-3228ad9f5a57b8e6b1e3c4cdcefce0536c012b92.tar.bz2 sddm-3228ad9f5a57b8e6b1e3c4cdcefce0536c012b92.zip |
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.
Diffstat (limited to 'src/sno_charge.c')
-rw-r--r-- | src/sno_charge.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |