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