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
13
using namespace
std;
14
15
namespace
Genfun
{
16
FUNCTION_OBJECT_IMP
(NonrelativisticBWDistribution)
17
18
19
NonrelativisticBWDistribution
::
NonrelativisticBWDistribution
():
20
_mass("mass", 50, 10, 90),
21
_width ("width", 5, 0, 100)
22
{}
23
24
NonrelativisticBWDistribution::NonrelativisticBWDistribution
(
const
NonrelativisticBWDistribution
& right):
25
AbsFunction
(),
26
_mass(right._mass),
27
_width (right._width)
28
{
29
}
30
31
NonrelativisticBWDistribution::~NonrelativisticBWDistribution
() {
32
}
33
34
double
NonrelativisticBWDistribution::operator()
(
double
x)
const
{
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
42
Parameter
&
NonrelativisticBWDistribution::mass
() {
43
return
_mass;
44
}
45
46
47
Parameter
&
NonrelativisticBWDistribution::width
() {
48
return
_width;
49
}
50
51
52
}
// namespace Genfun
FUNCTION_OBJECT_IMP
#define FUNCTION_OBJECT_IMP(classname)
Definition:
AbsFunction.hh:149
Genfun::AbsFunction
Definition:
AbsFunction.hh:48
Genfun::NonrelativisticBWDistribution
Definition:
NonrelativisticBW.hh:20
Genfun::NonrelativisticBWDistribution::NonrelativisticBWDistribution
NonrelativisticBWDistribution()
Definition:
NonrelativisticBW.cc:19
Genfun::NonrelativisticBWDistribution::mass
Parameter & mass()
Definition:
NonrelativisticBW.cc:42
Genfun::NonrelativisticBWDistribution::width
Parameter & width()
Definition:
NonrelativisticBW.cc:47
Genfun::NonrelativisticBWDistribution::operator()
virtual double operator()(double argument) const override
Definition:
NonrelativisticBW.cc:34
Genfun::NonrelativisticBWDistribution::~NonrelativisticBWDistribution
virtual ~NonrelativisticBWDistribution()
Definition:
NonrelativisticBW.cc:31
Genfun::Parameter
Definition:
Parameter.hh:35
Genfun::Parameter::getValue
virtual double getValue() const
Definition:
Parameter.cc:29
f
void f(void g())
Definition:
excDblThrow.cc:38
Genfun
Definition:
Abs.hh:14
CLHEP-CLHEP_2_4_6_4
GenericFunctions
src
NonrelativisticBW.cc
Generated by
1.9.6