CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
NonrelativisticBW.cc
Go to the documentation of this file.
1#include "CLHEP/GenericFunctions/NonrelativisticBW.hh"
2#include "CLHEP/GenericFunctions/Variable.hh"
3#include <assert.h>
4#include <cmath>
5#include <iostream>
6
7#if (defined __STRICT_ANSI__) || (defined _WIN32)
8#ifndef M_PI
9#define M_PI 3.14159265358979323846
10#endif // M_PI
11#endif // __STRICT_ANSI__
12
13using namespace std;
14
15namespace Genfun {
16FUNCTION_OBJECT_IMP(NonrelativisticBWDistribution)
17
18
20 _mass("mass", 50, 10, 90),
21 _width ("width", 5, 0, 100)
22{}
23
26 _mass(right._mass),
27 _width (right._width)
28{
29}
30
32}
33
35 double M=_mass.getValue();
36 double G=_width.getValue()/2.0;
37 double f = (1.0/M_PI)*G/((x-M)*(x-M) +G*G);
38 return f;
39
40}
41
43 return _mass;
44}
45
46
48 return _width;
49}
50
51
52} // namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
Definition: AbsFunction.hh:149
virtual double operator()(double argument) const override
virtual double getValue() const
Definition: Parameter.cc:29
void f(void g())
Definition: excDblThrow.cc:38
Definition: Abs.hh:14