Hi, I have been using matlab for a while and here is what i had to do:
let us say that we have a dataset of Nx2 entries(each entry is composed by two scalars) and we want to
- discretize the problem and create a 3D density plot (or a 3D histogram) where X and Y are the discritized coordinates and Z is the frequency
- have the possibility to select a zone on the plot and retrieve the ID of the events which populate it.
To perform this I have written a matlab script which creates a 3D histogram by resolving X and Y in say 100 intervals each, and then it performs an “inventory”: for each bar of the histogram it stores the ID of the events that populate it. (example, say that the region at the upper left contains 3 events and therefore is 3 unit tall. these events are number 23,25 and 100 of the dataset. if you do this for each bar you have what I call “inventory” )
When the user selects the area of the plot, the routine checks which bars are selected and it gives back the ID of all events populating the area.
This unfortunately was a real pain to achieve in matlab, but now it’s done, even it the process is very slow and cumbersome.
My question is : Since I would like to switch to Python+ROOT, is there a better (and smarter) way to achieve this goal in ROOT?
Thanks a lot and sorry for the long post. Any idea or suggestion are truly welcome
cheers,
Emanuele