BmnRoot
Loading...
Searching...
No Matches
BmnHodoResolution.h
Go to the documentation of this file.
1#ifndef BmnHodoResolution_H
2#define BmnHodoResolution_H
3
4#include "TRandom.h"
5
6#include <cmath>
7
9{
10
11struct Kernel
12{
14
16 : stochastic(0)
17 , constant(0)
18 {}
19 Kernel(double stochastic_, double constant_)
20 : stochastic(stochastic_)
21 , constant(constant_)
22 {}
23
24 double sigma(double z2) const { return sqrt(stochastic * stochastic * z2 + constant * constant * z2 * z2); }
25
26 double operator()(double z2) const { return gRandom->Gaus(z2, sigma(z2)); }
27};
28
29} // namespace BmnHodoResolution
30
31#endif // BmnHodoResolution_H
friend F32vec4 sqrt(const F32vec4 &a)
Definition P4_F32vec4.h:34
double sigma(double z2) const
double operator()(double z2) const
Kernel(double stochastic_, double constant_)