Esempio n. 1
0
    def get_nbins(self, binsiz, xmin, xmax):

        #number of bins for a given bin size

        nbins = int(TMath.Ceil((xmax - xmin) / binsiz))  #round-up value
        xmax = xmin + float(binsiz * nbins)  # move max up to pass the bins

        return nbins, xmax
Esempio n. 2
0
def get_nbins(binsiz, xmin, xmax):

    nbins = int(TMath.Ceil((xmax - xmin) / binsiz))  #round-up value
    xmax = xmin + float(binsiz * nbins)  # move max up to pass the bins

    return nbins, xmax