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
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