ROOT
6.07/01
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
math
minuit2
test
MnSim
FlatRandomGen.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_FlatRandomGen_H_
11
#define MN_FlatRandomGen_H_
12
13
#include <cmath>
14
15
namespace
ROOT {
16
17
namespace
Minuit2 {
18
19
20
class
FlatRandomGen
{
21
22
public
:
23
24
FlatRandomGen
() :
fMean
(0.5),
fDelta
(0.5) {}
25
26
FlatRandomGen
(
double
mean,
double
delta) :
fMean
(mean),
fDelta
(delta) {}
27
28
~FlatRandomGen
() {}
29
30
double
Mean
()
const
{
return
fMean
;}
31
32
double
Delta
()
const
{
return
fDelta
;}
33
34
double
operator()
()
const
{
35
return
2.*
Delta
()*(std::rand()/
double
(RAND_MAX) - 0.5) +
Mean
();
36
}
37
38
private
:
39
40
double
fMean
;
41
double
fDelta
;
42
};
43
44
}
// namespace Minuit2
45
46
}
// namespace ROOT
47
48
#endif //MN_FlatRandomGen_H_
ROOT::Minuit2::FlatRandomGen
Definition:
FlatRandomGen.h:20
double
double
Definition:
RooCFunction2Binding.cxx:40
ROOT::Minuit2::FlatRandomGen::fDelta
double fDelta
Definition:
FlatRandomGen.h:41
ROOT::Minuit2::FlatRandomGen::Mean
double Mean() const
Definition:
FlatRandomGen.h:30
ROOT::Minuit2::FlatRandomGen::fMean
double fMean
Definition:
FlatRandomGen.h:40
ROOT::Minuit2::FlatRandomGen::Delta
double Delta() const
Definition:
FlatRandomGen.h:32
ROOT::Minuit2::FlatRandomGen::~FlatRandomGen
~FlatRandomGen()
Definition:
FlatRandomGen.h:28
ROOT::Minuit2::FlatRandomGen::operator()
double operator()() const
Definition:
FlatRandomGen.h:34
ROOT::Minuit2::FlatRandomGen::FlatRandomGen
FlatRandomGen()
Definition:
FlatRandomGen.h:24
ROOT::Minuit2::FlatRandomGen::FlatRandomGen
FlatRandomGen(double mean, double delta)
Definition:
FlatRandomGen.h:26