I am new to ROOT. I have been attempting to produce a TH3F 4D histogram using “glcolz” and overlaying a detector geometry using PYROOT.
The bins of the TH3F would represent the position of events. I want to overlay the detector geometry so I can view the location of these events within the detector system and the positional density of them.
I have been able to create the detector geometry using TGeoManager and MakeBoxes. I can plot the geometry successfully on its own.
I can also plot the TH3F on its own.
I have tried plotting them both on the same canvas using the “same” argument on the second draw function however I only see the one plot.
A section of the plotting section of code is below.
Any advice would be greatly appreciated.
Many thanks.
g.SetTopVolume(top)
h = ROOT.TH3F("TH3F", "TH3F", 10, -50, 50, 10, -50, 50, 10, -50, 50)
for ping in pings:
h.Fill(ping[0], ping[1], ping[2])
c = ROOT.TCanvas("c", "c", 1000, 1000)
h.Draw("glcolz")
g.Draw("same")
c.Update()
c.Draw()
I don’t think JSROOT would be a problem…
I don’t have experience in JS or C either and so I’ve been keeping to pyroot for now and I believe using JSROOT for plotting.
I have the “% jsroot on” magic in my Jupiter notebook. I don’t have any problems using it in that sense.