WeightStatistics#

class coffea.analysis_tools.WeightStatistics(sumw=0.0, sumw2=0.0, minw=inf, maxw=-inf, n=0)[source]#

Bases: object

Container for statistics about the weight, including the sum of squared weights and number of entries.

Parameters:
  • sumw (float) – The sum of weights

  • sumw2 (float) – The sum of squared weights

  • minw (float) – The minimum weight

  • maxw (float) – The maximum weight

  • n (int) – The number of entries

Methods Summary

add(other)

Add two WeightStatistics objects together.

identity()

Methods Documentation

add(other)[source]#

Add two WeightStatistics objects together.

Adds the sum of weights, the sum of squared weights, and the number of entries. Takes the minimum and maximum across the two WeightStatistics objects. Modifies this object in place.

Parameters:

other (WeightStatistics) – The other WeightStatistics object to add to this one

identity()[source]#