7 _nLocalBins(_limits.getDimension(), nLocalBins)
12 WELCOME_LOG <<
"Hello from the UniformBinning() Constructor";
18 _nLocalBins(nLocalBins)
23 WELCOME_LOG <<
"Hello from the UniformBinning() Constructor";
48 for (
int i = 0; i < dimension; i++){
49 binNumber += localBinNumbers.at(i)*multiplier;
61 if ( globalBinNumber >= nBins || globalBinNumber < 0 ){
62 ERROR_LOG <<
"UniformBinning::getLocalBinNumbers - The global bin number you have given is out of range = " << globalBinNumber << std::endl;
67 std::vector<int> localBinNums(dimension, -1.0);
69 int multiplier = nBins;
71 for (
int i = dimension - 1; i >= 0; i--){
75 int localBinNum = floor(
double(globalBinNumber)/
double(multiplier));
77 globalBinNumber -= multiplier*localBinNum;
79 localBinNums.at(i) = localBinNum;
91 double width = (high - low)/nbins;
93 return low + width*localBinNum;
102 double width = (high - low)/nbins;
104 return low + width*(localBinNum + 1.0);
158 double width = (high - low)/nbins;
160 return floor( val - low )/width;
virtual TString filename() const
virtual void setDimension(int dimension)
const int & getDimension() const
void setBinningType(TString binningType)
const HyperPoint & getHighCorner() const
const int & getDimension() const
const double & at(int i) const
const HyperPoint & getLowCorner() const