Hi Everyone,
I’m trying to save data (x,y,r and energy) generated from a Geant4 simulations into a 3D histogram (TH3D). The ‘r’ component of the data holds information pertaining to which of my 10 detectors has a hit occurred in, While x and y specify which position in each specific detector did the hit (‘the energy deposition’) occur.
In my thinking an array of pointers to TH3D would be the way to go. What I think I need is to structure the analysis manager such that I have a number of if - else if conditions which are setup such that depending on the value of parameter ‘r’ (i.e. a number between 0 -9), a new histogram is created or updated (if it already exist). Can anyone or group persons please help my taught process or proffer to me a new one.
h = (TH3D*) gROOT -> FindObject(“h”);
My second question might be stupid but bare with me please.In the expression above, If I have an array of pointer as my object, what changes in the statement above. i.e if I have a loop structure to generate multiple histograms for each of my detectors. In other words, I am confused on how I will be able to pass each of the objects contained in a hypothetical “h[i]” array of pointers to ‘FindObject()’ .
Thank you.