|
[Rivet] Question concerning histogramsAndy Buckley andy.buckley at ed.ac.ukWed Sep 21 13:40:34 BST 2011
On 21/09/11 12:38, Hendrik Hoeth wrote: > Thus spake Martin Stoll (martin at particle.uni-karlsruhe.de): > >> (In fact I want to fill my histogram with the ratio of the entries of >> two other ones.) > > If you want to divide two histograms, have a look e.g. at the finalize() > method in STAR_2006_S6500200.cc. Ah, I think I understand better now: you're doing a manual histogram division and trying to write the results (where the bin width factor has cancelled) into a *histogram*? This idea of a histogram as a binned object whose values and errors can just be set to desired values is one of those great gifts that ROOT has given to the world! AIDA has two distinct data types for that -- a "histogram" has bin contents, heights, etc. based on its aggregated fill history, while a "data point set" is the thing whose x/y values and errors can be set arbitrarily. So you can either set the divided values directly on a DPS obtained via bookDataPointSet(...), or (easier, or at least more standard) use the division method that Hendrik pointed at. 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 |