CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
Main Page
Namespaces
Classes
Files
File List
File Members
GenericFunctions
src
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)
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
Generated on Sun Jun 17 2012 08:08:28 for CLHEP by
1.8.1.1