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

GenericFunctions/Rectangular.hh
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: Rectangular.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
3 //---------------------Rectangular------------------------------------------//
4 // //
5 // Class Exponential //
6 // Joe Boudreau, Petar Maksimovic, November 1999 //
7 // //
8 //--------------------------------------------------------------------------//
9 #ifndef Rectangular_h
10 #define Rectangular_h 1
13 namespace Genfun {
14 
19  class Rectangular : public AbsFunction {
20 
22 
23  public:
24 
25  // Constructor
26  Rectangular();
27 
28  // Copy constructor
29  Rectangular(const Rectangular &right);
30 
31  // Destructor
32  virtual ~Rectangular();
33 
34  // Retreive function value
35  virtual double operator ()(double argument) const;
36  virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
37 
38  // Get the position of the first discontinuity
39  const Parameter & x0() const;
40  Parameter & x0();
41 
42  // Get the position of the second discontinuity
43  const Parameter & x1() const;
44  Parameter & x1();
45 
46  // Get the value of the function at its baseline
47  const Parameter & baseline() const;
48  Parameter & baseline();
49 
50  // Get the value of the function at its top
51  const Parameter & height() const;
52  Parameter & height();
53 
54  // Derivative.
55  Derivative partial (unsigned int) const;
56 
57  // Does this function have an analytic derivative?
58  virtual bool hasAnalyticDerivative() const {return true;}
59 
60  private:
61 
62  // It is illegal to assign an adjustable constant
63  const Rectangular & operator=(const Rectangular &right);
64 
65  // Here is the decay constant
66  Parameter _x0;
67  Parameter _x1;
68  Parameter _baseline;
69  Parameter _height;
70 
71  };
72 } // namespace Genfun
73 #endif
virtual bool hasAnalyticDerivative() const
#define FUNCTION_OBJECT_DEF(classname)
const Parameter & x0() const
Definition: Rectangular.cc:57
virtual double operator()(double argument) const
Definition: Rectangular.cc:29
const Parameter & height() const
Definition: Rectangular.cc:69
const Parameter & baseline() const
Definition: Rectangular.cc:65
Derivative partial(unsigned int) const
Definition: Rectangular.cc:74
const Parameter & x1() const
Definition: Rectangular.cc:61