#include <PIDAAlg.h>
Definition at line 26 of file PIDAAlg.h.
util::NormalDistribution::NormalDistribution |
( |
| ) |
|
|
inline |
util::NormalDistribution::NormalDistribution |
( |
float |
max_sigma, |
|
|
float |
step_size |
|
) |
| |
Definition at line 341 of file PIDAAlg.cxx.
344 throw "util::NormalDistribution --- Cannot have zero step size!";
346 const size_t vector_size = (size_t)(max_sigma / step_size);
349 const float AMPLITUDE = 1. / std::sqrt(2*
M_PI);
352 for(
size_t i_step=0; i_step<vector_size; i_step++){
353 float diff = i_step*step_size;
354 fValues[i_step] = AMPLITUDE * std::exp(-0.5*diff*diff);
358 for(
size_t i_step=0; i_step<vector_size; i_step++)
359 fValues[i_step] /= (integral*2);
std::vector< float > fValues
float util::NormalDistribution::getValue |
( |
float |
x | ) |
|
Definition at line 366 of file PIDAAlg.cxx.
374 return fValues[bin_low]*(1-remainder) + remainder*
fValues[bin_low+1];
std::vector< float > fValues
float util::NormalDistribution::fMaxSigma |
|
private |
float util::NormalDistribution::fStepSize |
|
private |
The documentation for this class was generated from the following files: