Histogram filling on collections
At the moment there are two ways of filling histograms, given a collection of values coll
(say obtained through a map
over a collection of objects) and a selection with cut
and weight
:
- Filling one particular value per event, i.e. sth like
for event in tree:
if cut:
hist.fill(coll[0], weight)
- Filling each value of the collection:
for event in tree:
if cut:
for item in coll:
hist.fill(item, weight)
But it's not obvious to me if it's also possible to have different weights for each element of the collection, i.e.:
for event in tree:
if cut:
for item, wgt in zip(coll, weight):
hist.fill(item, wgt)
Is that currently possible?