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

#include <PeriodicRectangular.hh>

+ Inheritance diagram for Genfun::PeriodicRectangular:

Public Member Functions

 PeriodicRectangular ()
 
 PeriodicRectangular (const PeriodicRectangular &right)
 
virtual ~PeriodicRectangular ()
 
virtual double operator() (double argument) const override
 
virtual double operator() (const Argument &arg) const override
 
Parametera ()
 
Parameterb ()
 
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 PeriodicRectangular.hh.

Constructor & Destructor Documentation

◆ PeriodicRectangular() [1/2]

Genfun::PeriodicRectangular::PeriodicRectangular ( )

Definition at line 12 of file PeriodicRectangular.cc.

12 :
13 _a("Size-of-valley (a)", 1.0, 1.0, 10),
14 _b("Size-of-plateau (b)", 1.0, 1.0, 10),
15 _height("height",1, 0,10)
16{}

◆ PeriodicRectangular() [2/2]

Genfun::PeriodicRectangular::PeriodicRectangular ( const PeriodicRectangular right)

Definition at line 18 of file PeriodicRectangular.cc.

18 :
19AbsFunction(right),
20_a(right._a),
21_b(right._b),
22_height(right._height)
23{
24}

◆ ~PeriodicRectangular()

Genfun::PeriodicRectangular::~PeriodicRectangular ( )
virtual

Definition at line 26 of file PeriodicRectangular.cc.

26 {
27}

Member Function Documentation

◆ a()

Parameter & Genfun::PeriodicRectangular::a ( )

Definition at line 40 of file PeriodicRectangular.cc.

40 {
41 return _a;
42}

◆ b()

Parameter & Genfun::PeriodicRectangular::b ( )

Definition at line 44 of file PeriodicRectangular.cc.

44 {
45 return _b;
46}

◆ hasAnalyticDerivative()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 52 of file PeriodicRectangular.hh.

52{return true;}

◆ height()

Parameter & Genfun::PeriodicRectangular::height ( )

Definition at line 49 of file PeriodicRectangular.cc.

49 {
50 return _height;
51}

◆ operator()() [1/2]

virtual double Genfun::PeriodicRectangular::operator() ( const Argument arg) const
inlineoverridevirtual

Implements Genfun::AbsFunction.

Definition at line 37 of file PeriodicRectangular.hh.

37{return operator() (arg[0]);}
virtual double operator()(double argument) const override

◆ operator()() [2/2]

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

Implements Genfun::AbsFunction.

Definition at line 29 of file PeriodicRectangular.cc.

29 {
30 double xx = x/(_a.getValue()+_b.getValue());
31 xx = xx - floor(xx);
32 if (xx < _a.getValue()/(_a.getValue()+_b.getValue())) {
33 return 0;
34 }
35 else {
36 return _height.getValue();
37 }
38}
virtual double getValue() const
Definition: Parameter.cc:29

Referenced by operator()().

◆ partial()

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

Reimplemented from Genfun::AbsFunction.

Definition at line 64 of file PeriodicRectangular.cc.

64 {
65 assert(index==0);
66 const AbsFunction & fPrime = FixedConstant(0);
67 return Derivative(&fPrime);
68}
FunctionNoop Derivative
Definition: AbsFunction.hh:42

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