CLHEP
2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Theta.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
// $Id:
3
#include "CLHEP/GenericFunctions/Theta.hh"
4
#include "CLHEP/GenericFunctions/FixedConstant.hh"
5
#include <stdexcept>
6
namespace
Genfun
{
7
FUNCTION_OBJECT_IMP
(Theta)
8
9
Theta
::
Theta
()
10
{}
11
12
Theta::~Theta
() {
13
}
14
15
Theta::Theta
(
const
Theta
& right) :
AbsFunction
(right)
16
{ }
17
18
19
double
Theta::operator()
(
double
x)
const
{
20
return
(x>=0) ? 1.0:0.0;
21
}
22
23
24
25
Derivative
Theta::partial
(
unsigned
int
index)
const
{
26
if
(index!=0)
throw
std::runtime_error(
"Theta::Partial: index out of range"
);
27
const
AbsFunction
& fPrime =
FixedConstant
(0.0);
28
return
Derivative
(& fPrime);
29
}
30
31
}
// namespace Genfun
FUNCTION_OBJECT_IMP
#define FUNCTION_OBJECT_IMP(classname)
Definition:
AbsFunction.hh:149
Genfun::AbsFunction
Definition:
AbsFunction.hh:48
Genfun::FixedConstant
Definition:
FixedConstant.hh:23
Genfun::FunctionNoop
Definition:
FunctionNoop.hh:19
Genfun::Theta
Definition:
Theta.hh:18
Genfun::Theta::~Theta
virtual ~Theta()
Definition:
Theta.cc:12
Genfun::Theta::partial
Derivative partial(unsigned int) const override
Definition:
Theta.cc:25
Genfun::Theta::Theta
Theta()
Definition:
Theta.cc:9
Genfun::Theta::operator()
virtual double operator()(double argument) const override
Definition:
Theta.cc:19
Genfun
Definition:
Abs.hh:14
Genfun::Derivative
FunctionNoop Derivative
Definition:
AbsFunction.hh:42
CLHEP-CLHEP_2_4_6_4
GenericFunctions
src
Theta.cc
Generated by
1.9.6