Feature #1631

MAUS Geometry Material Navigator

Added by Hunt, Christopher over 9 years ago. Updated over 9 years ago.

Global Reconstruction
Target version:
Start date:
02 March 2015
Due date:
% Done:


Estimated time:
New Issue


In MAUS there is the functionality to obtain a field value at any point in the loaded geometry. Can we do the same with materials?

Geant4 provides a G4Navigator class which can be used to step through the loaded geometry. All we need is a nice wrapper to hide the boring stuff and we can investigate the material at any given point.

This will useful for the Global reconstruction, debugging geometries and geometry interfaces, and any code that requires some material effects.


Updated by Hunt, Christopher over 9 years ago

  • Target version changed from Future MAUS release to MAUS-v0.9.4

Currently testing some implementation of this. I have so far modified:

- Added Utils/MAUSGeometryNavigator which wraps the G4Navigator.
- Globals and Globals manager to store a MAUSGeometryNavigator.
- DetectorConstruction to return the root physical volume, required for initialisation.

I decided to modify the globals so that we can access the G4Navigator outside of a MAUS run. So, I also added PyMaterial.{hh,cc} files to py_cpp so that python scripts can also step through the loaded geometry. Seems to be working however any feedback/improvements are welcome.

Possible improvements include using the navigator to perform intelligent stepping (I think that's possible) and having the option of a MC and Recon navigators, but that would require two geant4 geometries to be initialised in memory. Thoughts on these ideas are welcome.


Updated by Rogers, Chris over 9 years ago

Very nice.

A point of bureaucracy: Historically, all the Geant4 interfaces have gone in src/common_cpp/Simulation. I would keep Geant4 interfaces there. The interface should be through the Simulation/MAUSGeant4Manager. It keeps everything in one place, but does add a level of indirection.


Updated by Hunt, Christopher over 9 years ago

Moved the navigator class to the Simulation directory, although I quite like the idea of leaving the GeometryNavigator object in globals, rather than hiding it in MAUSGeant4Manager as this makes it very similar to the way we access field information, and it's not actually a required part of the geant4 simulation.

I would be happy to move it, if that is more correct within MAUS, I'm just quite fond of making it behave similarly to the MCFieldConstructor, especially if I/someone adds in a ReconGeometryNavigator, as well as an MCGeometryNavigator.


Updated by Rogers, Chris over 9 years ago

Fair enough. At least all of the G4 includes stay in "Simulation" directory (so if someone doesn't want G4, they can still build the rest of the library with not too much fiddling).

Also available in: Atom PDF