On this page

HistogramBin

gammaloop Class

HistogramBin()

Raw statistics and optional coordinate metadata for one histogram bin.

Member details

x_min

Property · read-only
#
x_min: Optional[float]

Lower coordinate edge, or None for a discrete or overflow bin.

x_max

Property · read-only
#
x_max: Optional[float]

Upper coordinate edge, or None for a discrete or underflow bin.

bin_id

Property · read-only
#
bin_id: Optional[int]

Discrete bin identifier, or None for a continuous bin.

label

Property · read-only
#
label: Optional[str]

Optional label of a discrete bin.

entry_count

Property · read-only
#
entry_count: int

Number of event entries accumulated in this bin.

sum_weights

Property · read-only
#
sum_weights: float

Sum of per-sample projected weights for this bin.

sum_weights_squared

Property · read-only
#
sum_weights_squared: float

Sum of squared per-sample projected weights for this bin.

mitigated_fill_count

Property · read-only
#
mitigated_fill_count: int

Number of fills produced by paired boundary-misbinning mitigation.

average

Method
#
average(sample_count: int) -> float

Compute this bin's Monte Carlo mean from its raw weight sum.

Returns

float

sum_weights / sample_count, or zero when sample_count is zero.

Parameters

NameTypeDefaultDescription
sample_countint

Number of statistically independent samples represented by the histogram.

error

Method
#
error(sample_count: int) -> float

Compute the standard error of this bin's Monte Carlo mean.

Returns

float

Sample-mean standard error, or zero when it cannot be estimated reliably.

Parameters

NameTypeDefaultDescription
sample_countint

Number of statistically independent samples represented by the histogram.