#include "PIDAAlg.h"
Definition at line 30 of file PIDAAlg.h.
util::NormalDistribution::NormalDistribution |
( |
| ) |
|
|
inline |
util::NormalDistribution::NormalDistribution |
( |
float |
max_sigma, |
|
|
float |
step_size |
|
) |
| |
Definition at line 352 of file PIDAAlg.cxx.
355 if (step_size == 0)
throw "util::NormalDistribution --- Cannot have zero step size!";
357 const size_t vector_size = (size_t)(max_sigma / step_size);
360 const float AMPLITUDE = 1. / std::sqrt(2 * M_PI);
363 for (
size_t i_step = 0; i_step < vector_size; i_step++) {
364 float diff = i_step * step_size;
365 fValues[i_step] = AMPLITUDE * std::exp(-0.5 * diff * diff);
369 for (
size_t i_step = 0; i_step < vector_size; i_step++)
370 fValues[i_step] /= (integral * 2);
std::vector< float > fValues
float util::NormalDistribution::getValue |
( |
float |
x | ) |
|
float util::NormalDistribution::fMaxSigma |
|
private |
float util::NormalDistribution::fStepSize |
|
private |
std::vector<float> util::NormalDistribution::fValues |
|
private |
The documentation for this class was generated from the following files:
- larana/v09_15_05/source/larana/ParticleIdentification/PIDAAlg.h
- larana/v09_15_05/source/larana/ParticleIdentification/PIDAAlg.cxx