Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
FastSimulation
Utilities
interface
SimpleHistogramGenerator.h
Go to the documentation of this file.
1
#ifndef SimpleHistogramGenerator_H
2
#define SimpleHistogramGenerator_H
3
15
#include <vector>
16
17
class
RandomEngine
;
18
class
TH1;
19
class
TAxis;
20
21
class
SimpleHistogramGenerator
22
{
23
public
:
24
28
SimpleHistogramGenerator
(TH1 *
histo
,
const
RandomEngine
* engine);
29
31
virtual
~SimpleHistogramGenerator
() {}
32
34
double
generate
()
const
;
35
36
int
binarySearch
(
const
int
&
n
,
37
const
std::vector<double>& array,
38
const
double
&
value
)
const
;
39
40
private
:
41
42
const
RandomEngine
*
random
;
43
45
TH1 *
myHisto
;
46
48
TAxis *
theXaxis
;
49
51
int
nBins
;
52
53
// Limits of integration
54
double
xMin
,
xMax
;
55
56
// Bin width
57
double
binWidth
;
58
60
std::vector<double>
integral
;
61
63
double
nEntries
;
64
65
};
66
#endif
SimpleHistogramGenerator::generate
double generate() const
The random generation.
Definition:
SimpleHistogramGenerator.cc:29
SimpleHistogramGenerator::nEntries
double nEntries
Number of entries.
Definition:
SimpleHistogramGenerator.h:63
SimpleHistogramGenerator::myHisto
TH1 * myHisto
Pointer to the histogram.
Definition:
SimpleHistogramGenerator.h:45
RandomEngine
Definition:
RandomEngine.h:18
relativeConstraints.value
tuple value
Definition:
relativeConstraints.py:54
SimpleHistogramGenerator::xMax
double xMax
Definition:
SimpleHistogramGenerator.h:54
trackerHits.histo
tuple histo
Definition:
trackerHits.py:12
SimpleHistogramGenerator::binWidth
double binWidth
Definition:
SimpleHistogramGenerator.h:57
SimpleHistogramGenerator::integral
std::vector< double > integral
Integral.
Definition:
SimpleHistogramGenerator.h:60
SimpleHistogramGenerator::SimpleHistogramGenerator
SimpleHistogramGenerator(TH1 *histo, const RandomEngine *engine)
Definition:
SimpleHistogramGenerator.cc:8
SimpleHistogramGenerator::binarySearch
int binarySearch(const int &n, const std::vector< double > &array, const double &value) const
Definition:
SimpleHistogramGenerator.cc:44
SimpleHistogramGenerator::theXaxis
TAxis * theXaxis
the axis
Definition:
SimpleHistogramGenerator.h:48
SimpleHistogramGenerator::~SimpleHistogramGenerator
virtual ~SimpleHistogramGenerator()
Default destructor.
Definition:
SimpleHistogramGenerator.h:31
SimpleHistogramGenerator::random
const RandomEngine * random
Definition:
SimpleHistogramGenerator.h:42
SimpleHistogramGenerator::nBins
int nBins
Number of bins.
Definition:
SimpleHistogramGenerator.h:51
n
int n
Definition:
DTDataIntegrityTask.cc:32
SimpleHistogramGenerator::xMin
double xMin
Definition:
SimpleHistogramGenerator.h:54
SimpleHistogramGenerator
Definition:
SimpleHistogramGenerator.h:21
Generated for CMSSW Reference Manual by
1.8.5