MINT2
Public Member Functions | Private Attributes | List of all members
HyperBinningMakerMint Class Reference

#include <HyperBinningMakerMint.h>

Inheritance diagram for HyperBinningMakerMint:
HyperBinningMaker

Public Member Functions

 HyperBinningMakerMint (const HyperCuboid &binningRange, const HyperPointSet &data, int startingDim=0)
 
virtual void makeBinning ()
 
 ~HyperBinningMakerMint ()
 
- Public Member Functions inherited from HyperBinningMaker
 HyperBinningMaker (const HyperCuboid &binningRange, const HyperPointSet &data)
 
 HyperBinningMaker (const HyperBinning &binning, const HyperPointSet &data)
 
void setBinningDimensions (std::vector< int > dims)
 
void addShadowHyperPointSet (const HyperPointSet &data)
 
void setSeed (int seed)
 
void useSnapToGrid (bool val)
 
void setGridMultiplier (HyperPoint &multipliers)
 
void setGridMultiplier (double multiplier)
 
void useEventWeights (bool val=true)
 
void setMinimumBinContent (double val)
 
void setShadowMinimumBinContent (double val)
 
void setMinimumEdgeLength (double val)
 
void setMinimumEdgeLength (HyperPoint val)
 
void setHyperFunction (HyperFunction *fnc)
 Set the HyperFunction - only used by some binning Algs. More...
 
void drawAfterEachIteration (TString path)
 
void updateFromExistingHyperBinning (const HyperBinning &binning)
 
void setNames (HyperName names)
 
int & getGlobalVolumeStatus (int volumeNumber)
 
int & getDimensionSpecificVolumeStatus (int volumeNumber, int dimension)
 
const int & getGlobalVolumeStatus (int volumeNumber) const
 
const int & getDimensionSpecificVolumeStatus (int volumeNumber, int dimension) const
 
int getNumContinueBins (int dimension=-1) const
 
int getNumBins () const
 
int getNumHyperVolumes () const
 
int split (int volumeNumber, int dimension, double splitPoint)
 
HyperCuboid splitBelowPoint (int dim, double splitPoint, const HyperCuboid &original, bool noSnapToGrid=false) const
 
HyperCuboid splitAbovePoint (int dim, double splitPoint, const HyperCuboid &original, bool noSnapToGrid=false) const
 
double getSumOfWeights (const HyperPointSet &hyperPointSet) const
 
double getWeight (const HyperPoint &hyperPoint) const
 
bool isValidBinningDimension (int dimension)
 
virtual bool passFunctionCriteria (HyperCuboid &cuboid1, HyperCuboid &cuboid2)
 
HyperPointSet filterHyperPointSet (const HyperPointSet &hyperPointSet, const HyperCuboid &hyperCuboid, bool print=false) const
 
void addBin (const HyperCuboid &hyperCuboid, const HyperPointSet &hyperPointSet, const HyperPointSet &shadowHyperPointSet, int status)
 
void setDimSpecStatusFromMinBinWidths (int volumeNumber)
 
void updateGlobalStatusFromDimSpecific (int volumeNumber)
 
bool snapToGrid (const HyperCuboid &cuboid, int dimension, double &splitCoord) const
 
virtual void startedAlgorithm ()
 
virtual void startedIteration ()
 
void drawCurrentState (TString path) const
 
virtual void finishedIteration ()
 
virtual void finishedAlgorithm ()
 
HyperBinningMemRes getHyperVolumeBinning () const
 
HyperHistogramgetHyperBinningHistogram () const
 
HyperHistogramgetShadowHyperBinningHistogram () const
 
HyperHistogramgetRatioHyperBinningHistogram () const
 
virtual ~HyperBinningMaker ()
 destructor More...
 
double countEventsBelowSplitPoint (int binNumber, int dimension, double splitPoint) const
 
double countEventsInHyperCuboid (const HyperPointSet &hyperPointSet, const HyperCuboid &hyperCuboid) const
 
double countShadowEventsBelowSplitPoint (int binNumber, int dimension, double splitPoint) const
 
double findSmartSplitPoint (int binNumber, int dimension, double dataFraction) const
 
int smartSplit (int binNumber, int dimension, double dataFraction)
 
int smartSplitAll (int dimension, double dataFraction)
 
int smartSplitAllRandomise (double dataFraction=0.5)
 
int smartMultiSplit (int binNumber, int dimension, int parts)
 
int smartMultiSplit (int binNumber, int dimension)
 
int smartMultiSplitAll (int dimension)
 
double findSmartSplitPointInt (int binNumber, int dimension, double dataFraction) const
 
int smartSplitInt (int binNumber, int dimension, double dataFraction)
 
int smartSplitAllInt (int dimension, double dataFraction)
 
int splitAll (int dimension, double splitPoint)
 
int splitAllRandomise (double splitPoint=0.5)
 
int likelihoodSplit (int binNumber)
 
int likelihoodSplitAll ()
 
int smartLikelihoodSplit (int binNumber)
 
int smartLikelihoodSplitAll ()
 
void getSplitToMinNeg2LLH (double &split, double &sig, int binNumber, int dimension, bool useConstraints=true)
 
void getDimWithLargestSplitSignificance (int &dim, double &split, int binNumber, bool useConstraints=true)
 
TH1D * scanSig (int binNumber, int dimension, int nbins, bool useConstraints=true)
 
double neg2LLH (int binNumber, int dimension, double splitPoint, bool useConstraints=true)
 
double nullNeg2LLH (int binNumber)
 

Private Attributes

int _startingDim
 

Additional Inherited Members

- Static Public Member Functions inherited from HyperBinningMaker
static void setOutputLevel (bool val)
 
- Protected Attributes inherited from HyperBinningMaker
std::vector< HyperCuboid_hyperCuboids
 
std::vector< std::vector< int > > _linkedBins
 
std::vector< HyperPointSet_hyperPointSets
 
std::vector< HyperPointSet_shadowHyperPointSets
 
std::vector< int > _status
 
std::vector< std::vector< int > > _dimSpecificStatus
 
std::vector< int > _binningDimensions
 
bool _shadowAdded
 
bool _useEventWeights
 
double _minimumBinContent
 
double _shadowMinimumBinContent
 
HyperPoint _minimumEdgeLength
 
TRandom * _random
 
bool _drawAlgorithm
 
TString _drawAlgorithmDir
 
int _iterationNum
 
HyperName _names
 
HyperFunction_func
 
bool _snapToGrid
 
HyperPoint _gridMultiplier
 
- Static Protected Attributes inherited from HyperBinningMaker
static bool s_printBinning = true
 

Detailed Description

HyperPlot, Author: Sam Harnew, sam.h.nosp@m.arne.nosp@m.w@gma.nosp@m.il.c.nosp@m.om , Date: Dec 2015

Algorithm to adaptively create a HyperVolumeBinning for a specific HyperPointSet, taking limits from a HyperCuboid.

It first splits all bins in the 'startingDim' so that each bin is half its size. It then splits all the resulting bins in the dimension 'startingDim + 1' using the same method. This process iterates until the minimum bin content or minimum bin widths have been reached.

Definition at line 30 of file HyperBinningMakerMint.h.

Constructor & Destructor Documentation

◆ HyperBinningMakerMint()

HyperBinningMakerMint::HyperBinningMakerMint ( const HyperCuboid binningRange,
const HyperPointSet data,
int  startingDim = 0 
)

Constructor that initiates the base class HyperBinningMaker

Definition at line 4 of file HyperBinningMakerMint.cpp.

4  :
5  HyperBinningMaker(binningRange, data),
6  _startingDim(startingDim)
7 {
8  WELCOME_LOG << "Good day from the HyperBinningMakerMint() Constructor"<<std::endl;
9  //makeBinning(startingDim);
10 }
#define WELCOME_LOG

◆ ~HyperBinningMakerMint()

HyperBinningMakerMint::~HyperBinningMakerMint ( )

Destructor

Definition at line 39 of file HyperBinningMakerMint.cpp.

39  {
40  GOODBYE_LOG << "Goodbye from the HyperBinningMakerMint() Constructor" <<std::endl;
41 }
#define GOODBYE_LOG

Member Function Documentation

◆ makeBinning()

void HyperBinningMakerMint::makeBinning ( )
virtual

run the algorithm

Implements HyperBinningMaker.

Definition at line 12 of file HyperBinningMakerMint.cpp.

12  {
13 
14  int dimension = _binningDimensions.size();
15 
16  int splitDim = _startingDim;
17  if (splitDim >= dimension) splitDim = 0;
18 
19  int nBins = 0;
20  int unchanged = 0;
21 
22  if (s_printBinning == true) INFO_LOG << "Splitting all bins in dimension " << _binningDimensions.at(splitDim) <<std::endl;
23 
24  while ( splitAll(_binningDimensions.at(splitDim), 0.5) != 0){
25  if (nBins == getNumBins()) unchanged++;
26  else unchanged = 0;
27  if (unchanged >= dimension) break;
28  nBins = getNumBins();
29  if (s_printBinning == true) INFO_LOG << "There is now a total of " << nBins << " bins" << std::endl;
30  splitDim++;
31  if( splitDim == dimension ) splitDim = 0;
32  if (s_printBinning == true) INFO_LOG << "Trying to split all bins in dimension " << _binningDimensions.at(splitDim) <<std::endl;
33  }
34 
35  if (s_printBinning == true) INFO_LOG << "Mint binning algorithm complete " <<std::endl;
36 
37 }
#define INFO_LOG
static bool s_printBinning
int splitAll(int dimension, double splitPoint)
std::vector< int > _binningDimensions

Member Data Documentation

◆ _startingDim

int HyperBinningMakerMint::_startingDim
private

the dimension to start splitting from

Definition at line 34 of file HyperBinningMakerMint.h.


The documentation for this class was generated from the following files: