CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
RelativisticBW.cc
Go to the documentation of this file.
1#include "CLHEP/GenericFunctions/RelativisticBW.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(RelativisticBWDistribution)
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();
37 double g=sqrt(M*M*(M*M+G*G));
38 double k = 2.0*sqrt(2.0)*M*G*g/M_PI/sqrt(M*M+g);
39 double f = k/((x-M)*(x-M)*(x+M)*(x+M)+M*M*G*G);
40 return f;
41
42}
43
45 return _mass;
46}
47
48
50 return _width;
51}
52
53
54} // namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
Definition: AbsFunction.hh:149
virtual double getValue() const
Definition: Parameter.cc:29
virtual double operator()(double argument) const override
void f(void g())
Definition: excDblThrow.cc:38
Definition: Abs.hh:14
int g(shared_ptr< X >)