CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
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
6
#if (defined __STRICT_ANSI__) || (defined _WIN32)
7
#ifndef M_PI
8
#define M_PI 3.14159265358979323846
9
#endif // M_PI
10
#endif // __STRICT_ANSI__
11
12
using namespace
std;
13
14
namespace
Genfun {
15
FUNCTION_OBJECT_IMP
(NonrelativisticBWDistribution)
16
17
18
NonrelativisticBWDistribution
::
NonrelativisticBWDistribution
():
19
_mass("mass", 50, 10, 90),
20
_width ("width", 5, 0, 100)
21
{}
22
23
NonrelativisticBWDistribution::NonrelativisticBWDistribution(
const
NonrelativisticBWDistribution
& right):
24
AbsFunction
(),
25
_mass(right._mass),
26
_width (right._width)
27
{
28
}
29
30
NonrelativisticBWDistribution::~NonrelativisticBWDistribution
() {
31
}
32
33
double
NonrelativisticBWDistribution::operator()
(
double
x)
const
{
34
double
M=_mass.
getValue
();
35
double
G=_width.
getValue
()/2.0;
36
double
f
= (1.0/M_PI)*G/((x-M)*(x-M) +G*G);
37
return
f
;
38
39
}
40
41
Parameter
&
NonrelativisticBWDistribution::mass
() {
42
return
_mass;
43
}
44
45
46
Parameter
&
NonrelativisticBWDistribution::width
() {
47
return
_width;
48
}
49
50
51
}
// namespace Genfun
Generated on Mon May 6 2013 04:04:11 for CLHEP by
1.8.1.2