CLHEP
2.4.6.4
C++ Class Library for High Energy Physics
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
m
n
o
p
q
r
s
t
v
w
z
Functions
b
c
d
e
f
g
h
i
m
n
o
p
q
r
s
t
v
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
a
b
c
e
f
i
j
m
n
o
r
s
t
u
v
w
x
y
z
Related Functions
b
c
d
h
i
o
p
q
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
Variables
m
n
q
r
t
Typedefs
Enumerator
Macros
_
a
c
d
e
f
h
m
n
p
r
s
t
v
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
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