27 September 2004 to 1 October 2004
Interlaken, Switzerland
Europe/Zurich timezone

Self-Filling Histograms: An object-oriented analysis framework

30 Sep 2004, 16:50
Jungfrau (Interlaken, Switzerland)


Interlaken, Switzerland

oral presentation Track 2 - Event processing Event Processing


Dr J. LIST (University of Wuppertal)


Analyses in high-energy physics often involve the filling of large amounts of histograms from n-tuple like data structures, e.g. RooT trees. Even when using an object-oriented framework like RooT, a the user code often follows a functional programming approach, where booking, application of cuts, calculation of weights and histogrammed quantities and finally the filling of the histogram is performed separately in different places of the program. We will present a set of RooT based histogram classes that allow to define the histogrammed quantity, its weight and the cuts to be applied at the time of booking. We use lightweight function object classes to define plotted quantities and cut conditions; the "self-filling" histograms hold references to these objects, and evaluate them in a fill method that thus needs no parameters. The use of function objects rather than strings to define plotted quantities and cuts permits error detection at compile rather than run time, and allows the implementation of caching mechanisms if costly computations are to be performed. Arithmetic and logical expressions are implemented by operator overloading. Histograms can be grouped in collections. We apply the visitor pattern to perform operations like filling, writing, fitting or attribute setting on such a group, without having to extend the collection class each time a new functionality is needed. Although developed within the object oriented analysis framework of the H1 experiment, this toolkit can be used on any RooT tree.

Primary authors

Dr B. List (ETH Zurich) Dr J. LIST (University of Wuppertal)

Presentation materials