Dear Rooters,
I have a question about using TTree::Draw. I’d like to create a 2d plot of a variable held in a tree but with different conditions on the x and y axes (same variable on x and y).
I have attached a script that will produce a simple tree to help illustrate my question (will hopefully work with “> root example.cxx++”).
For example, for event 2 below, I’d like to do fEnergy(detector7) vs fEnergy(detector4) which would plot 8 vs 27.
root [] tv__tree->Show(2)
======> EVENT:2
THits = NULL
THits.fDetector = 2, 7, 3, 4
THits.fEnergy = 4.000000, 8.000000, 9.000000, 27.000000
I’ve not found a way to do this type of plot (unless, obviously, I change the tree structure, which I’d rather not do). Is it possible (I feel I’m missing something obvious!)? I’m running x86 Gentoo with ROOT version 4.03.02.
Thanks,
Jonty.
example.cxx (1.3 KB)