|
[Rivet] dividing histos in RivetAndy Buckley andy.buckley at ed.ac.ukThu Mar 24 13:11:19 GMT 2011
The distinction is that the AIDA interfaces and the Rivet bookHistogram1D etc. insist in putting the histogram into the output "tree" and manipulating it by that pathname. If you don't want to output the numerator and denominator histograms, then creating them without using the AIDA interface results in them not being put in the tree and hence not being written into the output: mush easier than deleting temporary histograms from the tree after the division. But if you *want* to keep the numerator and denominator histograms, then just create them all via the AIDA/book* methods. I hope that explains it, and even more so I hope that it will be an historical curiosity before too long :) Andy On 24/03/11 05:15, Hannes Jung wrote: > Hi Andy > > thanks a lot. > This example did help indeed. > BTW, is there any reason, why I have to book still a AIDA histo, to get the LWH histos in the output, or am I doing something weird ? > Anyway, at the end I got the histos.. > > Cheers > Hannes > > On 23.03.2011, at 10:50, Andy Buckley wrote: > >> 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. >> > > *********************************************************************** > Hannes Jung > Email: Hannes.Jung at cern.ch > mobile :+49 40 8998 93741 > http://www.desy.de/~jung > Tel: +49 (0) 40 8998 3741 (DESY) > Tel: +41 22 76 71691 (CERN) > CERN - PH > 40-3 B11 > CH-1211 Genève 23 > Switzerland > *********************************************************************** > > > > > > > > > -- 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 |