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

Theta.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id:
5 #include <stdexcept>
6 namespace Genfun {
8 
10 {}
11 
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