CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::Rectangular Class Reference

#include <Rectangular.hh>

+ Inheritance diagram for Genfun::Rectangular:

Public Member Functions

 Rectangular ()
 
 Rectangular (const Rectangular &right)
 
virtual ~Rectangular ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &a) const override
 
const Parameterx0 () const
 
Parameterx0 ()
 
const Parameterx1 () const
 
Parameterx1 ()
 
const Parameterbaseline () const
 
Parameterbaseline ()
 
const Parameterheight () const
 
Parameterheight ()
 
Derivative partial (unsigned int) const override
 
virtual bool hasAnalyticDerivative () const override
 
- Public Member Functions inherited from Genfun::AbsFunction
 AbsFunction ()
 
 AbsFunction (const AbsFunction &right)
 
virtual ~AbsFunction ()
 
virtual unsigned int dimensionality () const
 
virtual double operator() (double argument) const =0
 
virtual double operator() (const Argument &argument) const =0
 
virtual AbsFunctionclone () const =0
 
virtual FunctionComposition operator() (const AbsFunction &f) const
 
virtual ParameterComposition operator() (const AbsParameter &p) const
 
Derivative derivative (const Variable &v) const
 
Derivative prime () const
 
virtual bool hasAnalyticDerivative () const
 
virtual Derivative partial (unsigned int) const
 

Detailed Description

Author

Definition at line 19 of file Rectangular.hh.

Constructor & Destructor Documentation

◆ Rectangular() [1/2]

Genfun::Rectangular::Rectangular ( )

Definition at line 11 of file Rectangular.cc.

11 :
12 _x0("x0", -1.0, -10, 0),
13 _x1("x1", 1.0, 0, 10),
14 _baseline("baseline", 0,-10, 10),
15 _height("height",1, -10, 10)
16{}

◆ Rectangular() [2/2]

Genfun::Rectangular::Rectangular ( const Rectangular right)

Definition at line 18 of file Rectangular.cc.

18 :
19AbsFunction(right),
20_x0(right._x0),
21_x1(right._x1),
22_baseline(right._baseline),
23_height(right._height)
24{
25}

◆ ~Rectangular()

Genfun::Rectangular::~Rectangular ( )
virtual

Definition at line 27 of file Rectangular.cc.

27 {
28}

Member Function Documentation

◆ baseline() [1/2]

Parameter & Genfun::Rectangular::baseline ( )

Definition at line 50 of file Rectangular.cc.

50 {
51 return _baseline;
52}

◆ baseline() [2/2]

const Parameter & Genfun::Rectangular::baseline ( ) const

Definition at line 66 of file Rectangular.cc.

66 {
67 return _baseline;
68}

◆ hasAnalyticDerivative()

virtual bool Genfun::Rectangular::hasAnalyticDerivative ( ) const
inlineoverridevirtual

Reimplemented from Genfun::AbsFunction.

Definition at line 58 of file Rectangular.hh.

58{return true;}

◆ height() [1/2]

Parameter & Genfun::Rectangular::height ( )

Definition at line 54 of file Rectangular.cc.

54 {
55 return _height;
56}

◆ height() [2/2]

const Parameter & Genfun::Rectangular::height ( ) const

Definition at line 70 of file Rectangular.cc.

70 {
71 return _height;
72}

◆ operator()() [1/2]

virtual double Genfun::Rectangular::operator() ( const Argument a) const
inlineoverridevirtual

Implements Genfun::AbsFunction.

Definition at line 36 of file Rectangular.hh.

36{return operator() (a[0]);}
virtual double operator()(double argument) const override
Definition: Rectangular.cc:30

◆ operator()() [2/2]

double Genfun::Rectangular::operator() ( double  argument) const
overridevirtual

Implements Genfun::AbsFunction.

Definition at line 30 of file Rectangular.cc.

30 {
31 if (x<_x0.getValue()) {
32 return _baseline.getValue();
33 }
34 else if (x<_x1.getValue()) {
35 return _height.getValue();
36 }
37 else {
38 return _baseline.getValue();
39 }
40}
virtual double getValue() const
Definition: Parameter.cc:29

Referenced by operator()().

◆ partial()

Derivative Genfun::Rectangular::partial ( unsigned int  index) const
overridevirtual

Reimplemented from Genfun::AbsFunction.

Definition at line 85 of file Rectangular.cc.

85 {
86 assert(index==0);
87 const AbsFunction & fPrime = FixedConstant(0);;
88 return Derivative(&fPrime);
89}
FunctionNoop Derivative
Definition: AbsFunction.hh:42

◆ x0() [1/2]

Parameter & Genfun::Rectangular::x0 ( )

Definition at line 42 of file Rectangular.cc.

42 {
43 return _x0;
44}

◆ x0() [2/2]

const Parameter & Genfun::Rectangular::x0 ( ) const

Definition at line 58 of file Rectangular.cc.

58 {
59 return _x0;
60}

◆ x1() [1/2]

Parameter & Genfun::Rectangular::x1 ( )

Definition at line 46 of file Rectangular.cc.

46 {
47 return _x1;
48}

◆ x1() [2/2]

const Parameter & Genfun::Rectangular::x1 ( ) const

Definition at line 62 of file Rectangular.cc.

62 {
63 return _x1;
64}

The documentation for this class was generated from the following files: