CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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
11#include "CLHEP/GenericFunctions/AbsFunction.hh"
12#include "CLHEP/GenericFunctions/Parameter.hh"
13namespace Genfun {
14
15 /**
16 * @author
17 * @ingroup genfun
18 */
19 class Rectangular : public AbsFunction {
20
22
23 public:
24
25 // Constructor
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 override;
36 virtual double operator ()(const Argument & a) const override {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;
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 override;
56
57 // Does this function have an analytic derivative?
58 virtual bool hasAnalyticDerivative() const override {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
#define FUNCTION_OBJECT_DEF(classname)
Definition: AbsFunction.hh:143
const Parameter & height() const
Definition: Rectangular.cc:70
const Parameter & x1() const
Definition: Rectangular.cc:62
virtual double operator()(double argument) const override
Definition: Rectangular.cc:30
virtual bool hasAnalyticDerivative() const override
Definition: Rectangular.hh:58
const Parameter & baseline() const
Definition: Rectangular.cc:66
virtual ~Rectangular()
Definition: Rectangular.cc:27
Derivative partial(unsigned int) const override
Definition: Rectangular.cc:85
const Parameter & x0() const
Definition: Rectangular.cc:58
Definition: Abs.hh:14