MINT2
Public Member Functions | Protected Attributes | List of all members
MINT::GaussFct Class Reference

#include <GaussFct.h>

Public Member Functions

double x () const
 
double height () const
 
double mean () const
 
double sigma () const
 
void set_x (double x_in)
 
void set_height (double h)
 
void set_mean (double m)
 
void set_sigma (double s)
 
double getVal () const
 
double getIntegral () const
 
 GaussFct (double x_in, double h, double m, double s)
 
 GaussFct ()
 
virtual ~GaussFct ()
 

Protected Attributes

double _x
 
double _height
 
double _mean
 
double _sigma
 
double _sqrt2pi
 

Detailed Description

Definition at line 8 of file GaussFct.h.

Constructor & Destructor Documentation

◆ GaussFct() [1/2]

GaussFct::GaussFct ( double  x_in,
double  h,
double  m,
double  s 
)

Definition at line 46 of file GaussFct.cpp.

47  : _x(x_in)
48  , _height(h)
49  , _mean(m)
50  , _sigma(s)
51  , _sqrt2pi(sqrt(twopi)){
52 
53 }
static const double s
double _height
Definition: GaussFct.h:11
static const double m
double _sqrt2pi
Definition: GaussFct.h:13
double _sigma
Definition: GaussFct.h:12
static const double twopi
double _x
Definition: GaussFct.h:10
double _mean
Definition: GaussFct.h:12

◆ GaussFct() [2/2]

GaussFct::GaussFct ( )

Definition at line 55 of file GaussFct.cpp.

56  : _x(0)
57  , _height(1./sqrt(twopi))
58  , _mean(0)
59  , _sigma(1)
60  , _sqrt2pi(sqrt(twopi)){
61 
62 }
double _height
Definition: GaussFct.h:11
double _sqrt2pi
Definition: GaussFct.h:13
double _sigma
Definition: GaussFct.h:12
static const double twopi
double _x
Definition: GaussFct.h:10
double _mean
Definition: GaussFct.h:12

◆ ~GaussFct()

virtual MINT::GaussFct::~GaussFct ( )
inlinevirtual

Definition at line 33 of file GaussFct.h.

33 {}

Member Function Documentation

◆ getIntegral()

double GaussFct::getIntegral ( ) const

Definition at line 40 of file GaussFct.cpp.

40  {
41 
42  return height()*_sqrt2pi*sigma();
43 
44 }
double height() const
Definition: GaussFct.cpp:13
double sigma() const
Definition: GaussFct.cpp:19
double _sqrt2pi
Definition: GaussFct.h:13

◆ getVal()

double GaussFct::getVal ( ) const

Definition at line 35 of file GaussFct.cpp.

35  {
36  double dxs = (x()-mean())/sigma();
37  return height() * exp(-0.5*dxs*dxs);
38 }
double height() const
Definition: GaussFct.cpp:13
double mean() const
Definition: GaussFct.cpp:16
double x() const
Definition: GaussFct.cpp:10
double sigma() const
Definition: GaussFct.cpp:19

◆ height()

double GaussFct::height ( ) const

Definition at line 13 of file GaussFct.cpp.

13  {
14  return _height;}
double _height
Definition: GaussFct.h:11

◆ mean()

double GaussFct::mean ( ) const

Definition at line 16 of file GaussFct.cpp.

16  {
17  return _mean;}
double _mean
Definition: GaussFct.h:12

◆ set_height()

void GaussFct::set_height ( double  h)

Definition at line 26 of file GaussFct.cpp.

26  {
27  _height=h;}
double _height
Definition: GaussFct.h:11

◆ set_mean()

void GaussFct::set_mean ( double  m)

Definition at line 29 of file GaussFct.cpp.

29  {
30  _mean = m;}
static const double m
double _mean
Definition: GaussFct.h:12

◆ set_sigma()

void GaussFct::set_sigma ( double  s)

Definition at line 32 of file GaussFct.cpp.

32  {
33  _sigma = s;}
static const double s
double _sigma
Definition: GaussFct.h:12

◆ set_x()

void GaussFct::set_x ( double  x_in)

Definition at line 23 of file GaussFct.cpp.

23  {
24  _x = x_in;}
double _x
Definition: GaussFct.h:10

◆ sigma()

double GaussFct::sigma ( ) const

Definition at line 19 of file GaussFct.cpp.

19  {
20  return _sigma;}
double _sigma
Definition: GaussFct.h:12

◆ x()

double GaussFct::x ( ) const

Definition at line 10 of file GaussFct.cpp.

10  {
11  return _x;}
double _x
Definition: GaussFct.h:10

Member Data Documentation

◆ _height

double MINT::GaussFct::_height
protected

Definition at line 11 of file GaussFct.h.

◆ _mean

double MINT::GaussFct::_mean
protected

Definition at line 12 of file GaussFct.h.

◆ _sigma

double MINT::GaussFct::_sigma
protected

Definition at line 12 of file GaussFct.h.

◆ _sqrt2pi

double MINT::GaussFct::_sqrt2pi
protected

Definition at line 13 of file GaussFct.h.

◆ _x

double MINT::GaussFct::_x
protected

Definition at line 10 of file GaussFct.h.


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