Bins themselves contain information about the content, the error and possibly the center of the bin. Bin information is always accessed through interface methods. HTL provides the following types of bin:
class representing bins with weighted data points. By default the gravity center of these bins are the middle or center of the bin.
class representing bins with weighted data points and that know how to determine the gravity center of the bins. This new bin class allows us to have filling time statistics as in the existing histogram package, but without having to compute separate quantities at filling time. The other advantage is that in case of bins with low counting, the information of the bin center is more accurate that the middle of the bin.
Also, Gravity_Bins could provide more accurate information in some cases of non-optimal binning. For instance, if you sample an integer variable in the range [0,20] with a 20 bin histogram over the same interval, the bin center is properly computed at the integer values, while in a traditional histograms they would correspond to the closest half integer.
class representing bins that can average another quantity.
Note that bins only know about their contents. They do not know where they are are located in the histogram to which they belong, nor about their widths or bounds - this information is stored in the partition to which they belong, which also defines the bin layout within a histogram.