[Rivet] dividing histos in Rivet

Andy Buckley andy.buckley at ed.ac.uk
Wed Mar 23 09:50:15 GMT 2011


On 22/03/11 20:54, Hannes Jung wrote:
> dear riveties
> 
> I was wondering, whether there is a simple way to divide two histograms in rivet/aida ?
> Just couldn't find it in the manual

Hi Hannes,

To do divisions or other histogram combinations you need to go via the
HistogramFactory, and mix and match histogram paths with histogram
pointers... it's just a bit cumbersome. To avoid getting duplicate
numerator and denominator histograms in the output, I tend to use raw
(non-persistent) LWH histograms for those. You'll find an example (well,
a few examples) in the src/Analyses/MC_GENERIC.cc source file.

This round-about way of combining histograms is an AIDA monstrosity: a
good example of how not to design a histogramming interface! Leif may
know about a neater way to do this with the LWH histograms, whose
interface is less awkward than the AIDA ones (i.e. LWH::Histogram1D
rather than AIDA::IHistogram1D). It's all going to be nicer in Rivet
version 2.0.

Hope that helps,
Andy

-- 
Dr Andy Buckley
SUPA Advanced Research Fellow
Particle Physics Experiment Group, University of Edinburgh

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the Rivet mailing list