CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

RelativisticBW.cc
Go to the documentation of this file.
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(RelativisticBWDistribution)
16 
17 
19  _mass("mass", 50, 10, 90),
20  _width ("width", 5, 0, 100)
21 {}
22 
23  RelativisticBWDistribution::RelativisticBWDistribution(const RelativisticBWDistribution & right):
24  AbsFunction(),
25  _mass(right._mass),
26  _width (right._width)
27 {
28 }
29 
31 }
32 
34  double M=_mass.getValue();
35  double G=_width.getValue();
36  double g=sqrt(M*M*(M*M+G*G));
37  double k = 2.0*sqrt(2.0)*M*G*g/M_PI/sqrt(M*M+g);
38  double f = k/((x-M)*(x-M)*(x+M)*(x+M)+M*M*G*G);
39  return f;
40 
41 }
42 
44  return _mass;
45 }
46 
47 
49  return _width;
50 }
51 
52 
53 } // namespace Genfun
Genfun::Parameter::getValue
virtual double getValue() const
Definition: Parameter.cc:27
Genfun::AbsFunction
Definition: CLHEP/GenericFunctions/AbsFunction.hh:48
g
int g(shared_ptr< X >)
Definition: testSharedPtrConvertible.cc:46
Genfun::RelativisticBWDistribution::~RelativisticBWDistribution
virtual ~RelativisticBWDistribution()
Definition: RelativisticBW.cc:30
Genfun::RelativisticBWDistribution::operator()
virtual double operator()(double argument) const
Definition: RelativisticBW.cc:33
Genfun::RelativisticBWDistribution
Definition: CLHEP/GenericFunctions/RelativisticBW.hh:20
RelativisticBW.hh
f
void f(void g())
Definition: excDblThrow.cc:38
Variable.hh
Genfun::RelativisticBWDistribution::width
Parameter & width()
Definition: RelativisticBW.cc:48
Genfun::RelativisticBWDistribution::mass
Parameter & mass()
Definition: RelativisticBW.cc:43
Genfun::Parameter
Definition: CLHEP/GenericFunctions/Parameter.hh:35
x
any side effects of that construction would occur twice The semantics of throw x
Definition: whyZMthrowRethrows.txt:37
k
long k
Definition: JamesRandomSeeding.txt:29
FUNCTION_OBJECT_IMP
#define FUNCTION_OBJECT_IMP(classname)
Definition: CLHEP/GenericFunctions/AbsFunction.hh:156
Genfun
Definition: CLHEP/GenericFunctions/Abs.hh:14