trees of variable structure?

From: troy d. straszheim <>
Date: Wed, 5 Jan 2005 12:57:55 +0100

Hi roottalk, I am wondering how to best provide data to root (create TTrees) in the following situation:

I have an analysis chain that produces, from event to event, varying numbers of results of various structure. As a simple example, event 1 might contain particle A and C, event 2 particles A B and C, and event 3 particle A and B:

event particles
----- ---------

1     A   C
2     A B C
3     A B

The processing chain contains a root-tree-module at the end which traverses this data structure and fills a tree, creating a branch-per-particle.

The set of all possible particles is large and the branch names should vary depending on how they were produced. It is not possible to determine at the beginning of processing that the tree should have one branch for A, one for B, and one for C. Furthermore, if one did somehow determine a catchall structure for the tree, it is not clear to me how one would indicate, for instance that in event 1 the data for particle B is undefined.

The users' goals are to be able to plot the zenith of particles B and C against one another, but only in events where both particles B and C were produced. Another example would be to plot all the C's that were produced.

I'm wondering what other options there might be. Could one, for instance, make one tree per particle, adding an eventnumber to each tree, make these trees friends of one another, and then plot, somehow? Would this introduce an expensive search as the treeplayer matches the eventnumbers in the two particles?

Any thoughts would be greatly appreciated,

troy d. straszheim Received on Wed Jan 05 2005 - 13:12:59 MET

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:04 MET