Can't see geometry attributes for volumes with the pick tool

Hi all,

I am running a project on a new computer and am not able to see the geometry attributes for touchables that I’ve seen using the OpenGLStoredQt visualization tool on the previous machine I ran this project on. I don’t have this issue when I run the B1 example though, I just can’t tell what is different or what my project is missing.

For context, I see all volumes in the Scene tree, I can show them or hide them, change their color etc… But when I choose the picking tool and click on a volume in the drawing, I am not able to see the geometry attributes like material density, material name, and more.

I did not have this problem on the previous machine I used for this project, I simply copied it over, ran cmake again and make to build and compile. I was able to run a small number of particles to and looked at the output in Root, so everything looks good there. I just need to build up a new geometry and like to use the pick tool to confirm I have material definitions, sizes and placements correct.

Thanks!
Andrea

1 Like

Hi Andrea

It’s good to know you found the picking tool useful but I’m sorry to hear it’s not working for you on your new machine. I can confirm it’s working for me on my development version of Geant4 (which in all likelihood means in Geant4 11.0 too) on Mac 10.15.7 with Qt 5.15.2. What operating systems, Geant4 versions and Qt versions are involved (previous and current)? It’s very puzzling it works on one machine but not another.

When you first click the pick icon a pop-up window opens and that’s where the information is written, Is it that you see the window but nothing ever gets written to it or is it that the window never appears at all? (In the latter case, check that the window is not simply being hidden behind the bigger GUI window.)

There are other ways to get information. You can see your geometry hierarchy with /vis/drawTree. You can find a volume with /vis/touchable/findPath, and then use the information provided to /vis/set/touchable and see the properties with /vis/touchable/dump. A bit long-winded but it gets you there.

John

Well, I can successfully use the picking tool when I run the B1 example on this same machine, so I am able to see the picking window. I’m wondering if there is something in my project’s code that is turning this off? The picking window just says “No object selected”.

For the past versions I am not sure of. I probably ran it on G4 v10.6 or prior on the other machine, can’t remember the Qt version but the OS was Ubuntu. I am currently using v 11 of Geant4 on this machine now on Ubuntu 20.04.3 LTS and the Qt version is 5.12.8.

I was able to successfully dump this data for a given solid, but it is certainly a longer process and I have to scroll through a large amount of surface info to get to material info. So this works fine, but I would still love to figure out what is going on with the point tool.

Thanks,
Andrea

1 Like

I also notice that when I run the B1 example, and use the picking tool, the first click I see this output in the output within the viewer:

  /vis/viewer/set/picking true
You may need to issue "/vis/viewer/update".
  /vis/viewer/refresh
  /vis/set/touchable World 0 Envelope 0 Shape1 0
# /vis/touchable/set/colour 0 0 0 0

After the first click I don’t see additional output in ther viewer while I still have the picking tool but my terminal updates as I click different solids and I see those solids in the picking window:

Volume:  World 0 Envelope 0 1
Volume:  World 0 Envelope 0 Shape2 0 1
Volume:  World 0 Envelope 0 3
Volume:  World 0 Envelope 0 1
Volume:  World 0 Envelope 0 Shape2 0 1
Volume:  World 0 Envelope 0 3
Volume:  World 0 Envelope 0 1

When I run my own example, however, every click results in updated output in the viewer. This is the same output I see in my terminal and I don’t see the volumes output in the terminal or in the picking window.

  /vis/viewer/set/picking true
You may need to issue "/vis/viewer/update".
  /vis/viewer/refresh
  /vis/set/touchable World 0 LabSpace 0
# /vis/touchable/set/colour 0 0 0 0
  /vis/set/touchable World 0 LabSpace 0
# /vis/touchable/set/colour 0 0 0 0
  /vis/set/touchable World 0 LabSpace 0
# /vis/touchable/set/colour 0 0 0 0
  /vis/set/touchable World 0 LabSpace 0
# /vis/touchable/set/colour 0 0 0 0

So confused…

Hi Andrea

Sorry to be so slow getting back to you.

I too am trying to understand what is happening. In the picking window I get

Volume:  World 0 Envelope 0 Shape1 0
Volume:  World 0 Envelope 0

which can be opened to get information. In the terminal I get

Volume:  World 0 Envelope 0 Shape1 0 1
Volume:  World 0 Envelope 0 3
/vis/set/touchable World 0 Envelope 0 Shape1 0
/vis/set/touchable World 0 Envelope 0 Shape2 0
Volume:  World 0 Envelope 0 Shape1 0 1
Volume:  World 0 Envelope 0 3
/vis/set/touchable World 0 Envelope 0 Shape2 0
/vis/set/touchable World 0 Envelope 0 Shape2 0

(I left out the # /vis/touchable/set/colour 1 1 1 1 lines.) At this point in time I do not understand why the terminal output has the extra 1 or 3 on the end, but I can look into that and I’m sure there’s a good explanation.

With yours, you get some output in the terminal and the picking window, but no Volume: lines.

OK. Here are some thoughts:

  • There has to be something to click on. Easiest if surfaces are drawn (/vis/viewer/set/style surface), or be careful to click exactly on a line in wireframe mode. In B1, both Envelope and Shape2 are drawn in surface mode.
  • To get picking output the graphical database has to be filled with the relevant information. This requires picking to be activated before building the database. So after requesting picking, perhaps a /vis/viewer/rebuild is required. (Perhaps Geant4 should do this automatically after picking is requested.)
  • To get the relevant information for trajectories you have to specify smooth and/or rich - /vis/scene/add/trajectories smooth rich. B1/vis.mac has smooth.

Let us know how you get on.

John