BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
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
8namespace BmnHodoResolution
9{
10
11struct Kernel
12{
13 double stochastic, constant;
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
R__EXTERN TRandom * gRandom
RVec< PromoteType< T > > sqrt(const RVec< T > &v)
double sigma(double z2) const
double operator()(double z2) const
Kernel(double stochastic_, double constant_)