MINT2
Mint
UniformBinning.h
Go to the documentation of this file.
1
17
#ifndef UNIFORMBINNING_HH
18
#define UNIFORMBINNING_HH
19
20
// HyperPlot includes
21
#include "
Mint/MessageService.h
"
22
#include "
Mint/HyperPoint.h
"
23
#include "
Mint/HyperPointSet.h
"
24
#include "
Mint/HyperCuboid.h
"
25
#include "
Mint/HyperVolume.h
"
26
#include "
Mint/RootPlotter1D.h
"
27
#include "
Mint/RootPlotter2D.h
"
28
#include "
Mint/HyperName.h
"
29
#include "
Mint/BinningBase.h
"
30
#include "
Mint/LoadingBar.h
"
31
#include "
Mint/CachedVar.h
"
32
33
34
// Root includes
35
#include "TRandom3.h"
36
#include "TH1D.h"
37
#include "TH2D.h"
38
#include "TMath.h"
39
40
// std includes
41
#include <algorithm>
42
#include <sstream>
43
44
class
UniformBinning
:
public
BinningBase
{
45
46
private
:
47
48
HyperCuboid
_limits
;
49
std::vector<int>
_nLocalBins
;
50
51
public
:
52
53
UniformBinning
(
HyperCuboid
limits,
int
nLocalBins);
54
UniformBinning
(
HyperCuboid
limits, std::vector<int> nLocalBins);
55
56
virtual
~UniformBinning
();
57
58
int
getNumLocalBins
(
int
dimension)
const
;
59
60
int
getGlobalBinNumber
( std::vector<int> localBinNumbers )
const
;
61
std::vector<int>
getLocalBinNumbers
(
int
globalBinNumber )
const
;
62
63
int
getLocalBinNumber
(
int
dim,
double
val)
const
;
64
std::vector<int>
getLocalBinNumbers
(
const
HyperPoint
& coords)
const
;
65
66
double
getLowBinEdgeLocal
(
int
dim,
int
localBinNum)
const
;
67
double
getHighBinEdgeLocal
(
int
dim,
int
localBinNum)
const
;
68
69
HyperPoint
getLowCorner
(
int
globalBinNum)
const
;
70
HyperPoint
getHighCorner
(
int
globalBinNum)
const
;
71
72
/* Virtual functions that need to implemented from BinningBase */
73
/* These will be implemented in the derived classes */
74
75
virtual
void
load
(TString
filename
, TString option =
"READ"
);
76
virtual
BinningBase
*
clone
()
const
;
77
78
virtual
void
save
(TString
filename
)
const
;
79
virtual
void
save
()
const
;
80
81
virtual
void
mergeBinnings
(
const
BinningBase
& other );
82
83
virtual
int
getNumBins
()
const
;
84
virtual
int
getBinNum
(
const
HyperPoint
& coords)
const
;
85
86
virtual
HyperVolume
getBinHyperVolume
(
int
binNumber)
const
;
87
88
virtual
HyperPoint
getAverageBinWidth
()
const
;
89
virtual
HyperCuboid
getLimits
()
const
;
90
91
92
93
};
94
95
96
97
#endif
98
UniformBinning::getHighBinEdgeLocal
double getHighBinEdgeLocal(int dim, int localBinNum) const
Definition:
UniformBinning.cpp:97
BinningBase::filename
virtual TString filename() const
Definition:
BinningBase.cpp:57
HyperCuboid
Definition:
HyperCuboid.h:28
RootPlotter1D.h
UniformBinning::getBinHyperVolume
virtual HyperVolume getBinHyperVolume(int binNumber) const
Definition:
UniformBinning.cpp:182
UniformBinning::getBinNum
virtual int getBinNum(const HyperPoint &coords) const
Definition:
UniformBinning.cpp:176
MessageService.h
HyperVolume.h
UniformBinning::getNumLocalBins
int getNumLocalBins(int dimension) const
Definition:
UniformBinning.cpp:28
UniformBinning
Definition:
UniformBinning.h:44
UniformBinning::getAverageBinWidth
virtual HyperPoint getAverageBinWidth() const
Definition:
UniformBinning.cpp:189
HyperName.h
HyperPoint
Definition:
HyperPoint.h:26
UniformBinning::_limits
HyperCuboid _limits
Definition:
UniformBinning.h:48
UniformBinning::getGlobalBinNumber
int getGlobalBinNumber(std::vector< int > localBinNumbers) const
Definition:
UniformBinning.cpp:41
UniformBinning::getLimits
virtual HyperCuboid getLimits() const
Definition:
UniformBinning.cpp:199
BinningBase
Definition:
BinningBase.h:27
UniformBinning::save
virtual void save() const
Definition:
UniformBinning.cpp:143
LoadingBar.h
UniformBinning::getLowBinEdgeLocal
double getLowBinEdgeLocal(int dim, int localBinNum) const
Definition:
UniformBinning.cpp:86
UniformBinning::getHighCorner
HyperPoint getHighCorner(int globalBinNum) const
Definition:
UniformBinning.cpp:117
UniformBinning::getLocalBinNumbers
std::vector< int > getLocalBinNumbers(int globalBinNumber) const
Definition:
UniformBinning.cpp:57
UniformBinning::UniformBinning
UniformBinning(HyperCuboid limits, int nLocalBins)
The only constructor.
Definition:
UniformBinning.cpp:5
HyperVolume
Definition:
HyperVolume.h:27
CachedVar.h
HyperCuboid.h
UniformBinning::getLocalBinNumber
int getLocalBinNumber(int dim, double val) const
Definition:
UniformBinning.cpp:153
UniformBinning::~UniformBinning
virtual ~UniformBinning()
Definition:
UniformBinning.cpp:203
RootPlotter2D.h
UniformBinning::clone
virtual BinningBase * clone() const
Definition:
UniformBinning.cpp:133
UniformBinning::getLowCorner
HyperPoint getLowCorner(int globalBinNum) const
Definition:
UniformBinning.cpp:108
HyperPoint.h
UniformBinning::getNumBins
virtual int getNumBins() const
Definition:
UniformBinning.cpp:32
UniformBinning::_nLocalBins
std::vector< int > _nLocalBins
Definition:
UniformBinning.h:49
BinningBase.h
HyperPointSet.h
UniformBinning::mergeBinnings
virtual void mergeBinnings(const BinningBase &other)
Definition:
UniformBinning.cpp:147
UniformBinning::load
virtual void load(TString filename, TString option="READ")
Definition:
UniformBinning.cpp:126
Generated by
1.8.15