CLHEP 2.0.4.7 Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

Rectangular.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: Rectangular.hh,v 1.2 2003/09/06 14:04:13 boudreau Exp $
00003 //---------------------Rectangular------------------------------------------//
00004 //                                                                          //
00005 // Class Exponential                                                        //
00006 // Joe Boudreau, Petar Maksimovic, November 1999                            //
00007 //                                                                          //
00008 //--------------------------------------------------------------------------//
00009 #ifndef Rectangular_h
00010 #define Rectangular_h 1
00011 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00012 #include "CLHEP/GenericFunctions/Parameter.hh"
00013 namespace Genfun {
00014 
00019   class Rectangular : public AbsFunction  {
00020 
00021     FUNCTION_OBJECT_DEF(Rectangular)
00022 
00023       public:
00024 
00025     // Constructor
00026     Rectangular();
00027 
00028     // Copy constructor
00029     Rectangular(const Rectangular &right);
00030   
00031     // Destructor
00032     virtual ~Rectangular();
00033   
00034     // Retreive function value
00035     virtual double operator ()(double argument) const;
00036     virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
00037   
00038     // Get the position of the first discontinuity
00039     const Parameter & x0() const; 
00040     Parameter & x0(); 
00041 
00042     // Get the position of the second discontinuity
00043     const Parameter & x1() const; 
00044     Parameter & x1(); 
00045 
00046     // Get the value of the function at its baseline
00047     const Parameter & baseline() const; 
00048     Parameter & baseline(); 
00049 
00050     // Get the value of the function at its top
00051     const Parameter & height() const; 
00052     Parameter & height(); 
00053   
00054     // Derivative.  
00055     Derivative partial (unsigned int) const;
00056 
00057     // Does this function have an analytic derivative?
00058     virtual bool hasAnalyticDerivative() const {return true;}
00059 
00060   private:
00061 
00062     // It is illegal to assign an adjustable constant
00063     const Rectangular & operator=(const Rectangular &right);
00064 
00065     // Here is the decay constant
00066     Parameter _x0;
00067     Parameter _x1;
00068     Parameter _baseline;
00069     Parameter _height;
00070 
00071   };
00072 } // namespace Genfun
00073 #endif

Generated on Thu Jul 1 22:02:30 2010 for CLHEP by  doxygen 1.4.7