The aim of this activity is to provide example and whenever possible, reusable code for the FLUGG application in
the context of FLUKA-Geant4 test beam validations.
The package consists of three independent elements:
- Geometry construction using GDML - A special GDMLDetectorConstruction class has been implemented which reads the
and instanciates the Geant4 geometry.
- Hits creation and management - The core functionality related to hit creation and management has been implemented in
HitsManager class. It is a singleton with a static 'GetInstance' method.
HitsManager methods can be called from FORTRAN through a set of wrappers. The resetting of the container before each event is done
from USREIN routine.
The starting point, as far as hit creation is concerned, is the MGDRAW routine.
The MREG variable is checked there to see whether the particle is currently in one of the 'sensitive volumes'. If the condition
is satisfied, the addHitToContainer method of HitsManager is called through the appropriate wrapper. The addHitToContainer method
takes also care of combining several energy deposition done by the same particle in the same volume (when approaching the boundary
or the tracking cut) into one single 'hit'. The hits are stored in the HitContainer (vector).
- Hits persistency - The hits persistency is done using ROOT
I/O through a special singleton class (RootIO) that
has been implemented. Reflex dictionary is created at the build time for hit and HitContainer classes which allows then to
store those objects using ROOT I/O. The saving of hits is triggered after each event by a call from USREOU routine.
Contact: Witek Pokorski and/or