I want to be able to quickly use ROOT’s GDML visualisation from the command line.
Traditionally I have done it as so:
std::string testfile = "simple.gdml"
i.e., literally typing it into the root prompt by hand. This is not ideal.
I came up with the following pyROOT script to try and quickly view arbitrary GDML from the command line:
if __name__ == "__main__":
Whilst this looks like it should work, it does in fact not work! Instead I see a blank, frozen canvas. I find ROOT so strange, why doesn’t this work? What am I missing from this recipe? Any alternatives which are known to work that I can try?
February 20, 2018, 4:38pm
Have you mistakenly not defined materials as I had?
When coming from GDML, which does not store visualisation attributes, ROOT invokes TGeoManager::SetDefaultColors(). This loops over volumes and assigns some colours to all volumes, but also makes transparent all volumes for which the density is less than 0.1. This is your case, since you have not defined materials in your file so ROOT assigned an automatic one with 0 density. What you can do before you draw:
also, to draw the original trans…
Since the links no longer render for context here is the original post:
Continuing the discussion from
GDML import doesn't draw:
I just attempted to draw this geometry again with the current master (commit 6a12464be798b421d5) and I’m still getting a blank canvas.
PS what does root-config --git-revision provide?
$ root-config --git-revision
March 6, 2018, 4:38pm
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.