ROOT
6.07/09
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
math
minuit2
test
MnSim
GaussFunction.h
Go to the documentation of this file.
1
// @(#)root/minuit2:$Id$
2
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4
/**********************************************************************
5
* *
6
* Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7
* *
8
**********************************************************************/
9
10
#ifndef MN_GaussFunction_H_
11
#define MN_GaussFunction_H_
12
13
#define _USE_MATH_DEFINES
14
#include <math.h>
15
16
namespace
ROOT
{
17
18
namespace
Minuit2 {
19
20
21
class
GaussFunction
{
22
23
public
:
24
25
GaussFunction
(
double
mean,
double
sig,
double
constant) :
26
fMean
(mean),
fSigma
(sig),
fConstant
(constant) {}
27
28
~GaussFunction
() {}
29
30
double
m
()
const
{
return
fMean
;}
31
double
s
()
const
{
return
fSigma
;}
32
double
c
()
const
{
return
fConstant
;}
33
34
double
operator()
(
double
x
)
const
{
35
36
return
c
()*
exp
(-0.5*(x-
m
())*(x-
m
())/(
s
()*
s
()))/(
sqrt
(2.*
M_PI
)*
s
());
37
}
38
39
private
:
40
41
double
fMean
;
42
double
fSigma
;
43
double
fConstant
;
44
};
45
46
}
// namespace Minuit2
47
48
}
// namespace ROOT
49
50
#endif // MN_GaussFunction_H_
ROOT::Minuit2::GaussFunction::fConstant
double fConstant
Definition:
GaussFunction.h:43
ROOT::Minuit2::GaussFunction::fSigma
double fSigma
Definition:
GaussFunction.h:42
ROOT
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition:
StringConv.hxx:21
ROOT::Minuit2::GaussFunction::operator()
double operator()(double x) const
Definition:
GaussFunction.h:34
sqrt
double sqrt(double)
x
Double_t x[n]
Definition:
legend1.C:17
ROOT::Minuit2::GaussFunction::GaussFunction
GaussFunction(double mean, double sig, double constant)
Definition:
GaussFunction.h:25
ROOT::Minuit2::GaussFunction::s
double s() const
Definition:
GaussFunction.h:31
M_PI
#define M_PI
Definition:
Rotated.cxx:105
ROOT::Minuit2::GaussFunction::fMean
double fMean
Definition:
GaussFunction.h:41
ROOT::Minuit2::GaussFunction::m
double m() const
Definition:
GaussFunction.h:30
ROOT::Minuit2::GaussFunction
Definition:
GaussFunction.h:21
ROOT::Minuit2::GaussFunction::~GaussFunction
~GaussFunction()
Definition:
GaussFunction.h:28
ROOT::Minuit2::GaussFunction::c
double c() const
Definition:
GaussFunction.h:32
exp
double exp(double)