MINT2
src
Mojito
Chi2Test
HyperBinningMakerSmartLikelihood.cpp
Go to the documentation of this file.
1
#include "
Mint/HyperBinningMakerSmartLikelihood.h
"
2
3
4
HyperBinningMakerSmartLikelihood::HyperBinningMakerSmartLikelihood
(
const
HyperCuboid
& binningRange,
const
HyperPointSet
& data) :
5
HyperBinningMaker
(binningRange, data)
6
{
7
WELCOME_LOG
<<
"Good day from the HyperBinningMakerSmartLikelihood() Constructor"
<<std::endl;
8
}
9
10
void
HyperBinningMakerSmartLikelihood::makeBinning
(){
11
12
int
dimension =
_binningDimensions
.size();
13
14
int
nBins = 0;
15
int
unchanged = 0;
16
17
while
(
smartLikelihoodSplitAll
() != 0){
18
if
(nBins ==
getNumBins
()) unchanged++;
19
else
unchanged = 0;
20
if
(unchanged >= 2.0*dimension)
break
;
21
nBins =
getNumBins
();
22
if
(
s_printBinning
==
true
)
INFO_LOG
<<
"There is now a total of "
<< nBins <<
" bins"
<< std::endl;
23
}
24
25
if
(
s_printBinning
==
true
)
INFO_LOG
<<
"likelihood binning algorithm complete "
<< std::endl;
26
27
}
28
29
HyperBinningMakerSmartLikelihood::~HyperBinningMakerSmartLikelihood
(){
30
GOODBYE_LOG
<<
"Goodbye from the HyperBinningMakerSmartLikelihood() Constructor"
<<std::endl;
31
}
HyperBinningMaker::smartLikelihoodSplitAll
int smartLikelihoodSplitAll()
Definition:
HyperBinningMaker.cpp:799
HyperCuboid
Definition:
HyperCuboid.h:28
INFO_LOG
#define INFO_LOG
Definition:
MessageService.h:160
HyperBinningMaker::s_printBinning
static bool s_printBinning
Definition:
HyperBinningMaker.h:52
HyperBinningMaker::getNumBins
int getNumBins() const
Definition:
HyperBinningMaker.cpp:1152
HyperBinningMakerSmartLikelihood::HyperBinningMakerSmartLikelihood
HyperBinningMakerSmartLikelihood(const HyperCuboid &binningRange, const HyperPointSet &data)
Definition:
HyperBinningMakerSmartLikelihood.cpp:4
HyperBinningMakerSmartLikelihood::makeBinning
virtual void makeBinning()
Definition:
HyperBinningMakerSmartLikelihood.cpp:10
HyperBinningMakerSmartLikelihood::~HyperBinningMakerSmartLikelihood
~HyperBinningMakerSmartLikelihood()
Definition:
HyperBinningMakerSmartLikelihood.cpp:29
GOODBYE_LOG
#define GOODBYE_LOG
Definition:
MessageService.h:162
WELCOME_LOG
#define WELCOME_LOG
Definition:
MessageService.h:158
HyperBinningMaker
Definition:
HyperBinningMaker.h:43
HyperPointSet
Definition:
HyperPointSet.h:31
HyperBinningMakerSmartLikelihood.h
HyperBinningMaker::_binningDimensions
std::vector< int > _binningDimensions
Definition:
HyperBinningMaker.h:90
Generated by
1.8.15