Convert Geant4 geometry representation of solids and materials into surfaces (triangles) with inside/outside materials for each triangle. This simpler representation is needed in order to bring geometry onto GPU.
Learn details of existing Geant4 geometry functionality, to see what can be reused.
Create Geant4 Collada(widely supported 3D format) exporter. Using a form of geometry representation that can easily be converted to the STL(a very simple 3D format) needed by Chroma.
Collada is in some sense intermediate to VRML2 and GDML, so the new exporter can draw upon those existing exporters.
Alternate workflows for G4 export and mesh conversion
Decided that best to start from Geant4 and develop in that context initially.
Blender GUI is unusable.
Although meshlab can convert VRML2 into STL, this misses the material information.
Meshlab turns out to be extremely slow at loading COLLADA (40 min for full geometry). Even with my fixes as available from bitbucket it is still too slow (10 min). Also MeshLab (and underlying VCGLIB) dependency on Qt makes it difficult to use widely (especially older linux).
Thus best to use MeshLab for visualization only.
Need an easily reproducible installation approach for NuWa+Chroma and its many dependencies http://chroma.bitbucket.org/install/details.html Extending dybinst and NuWa/LCG_Builders presumably the way to go,
- probably the CUDA toolkit needs to be excluded, using the local installs
Chroma is aggressive about versions, how critical these are is unknown
- GEANT4.9.5 or later [lots of work needed to bring all of geant4 up to 4.9.5, maybe just patches for issues?]
- ROOT 5.32 or later
StackAction better than TrackingAction (currently used), advantages:
- “interestingness” optimisation, only propagate OP for interesting events
- delay OP tracks, collecting their parameters then give them back modified to be just before step onto sensitive detector volumes
Need seemless integration with the rest of the reconstruction chain
Drop in replacement for some Geant4 classes which provide the GPU acceleration with minimal disturbance. Perhaps:
- processes/transportation/src/G4Transportation.cc
- geometry/navigation/src/G4TransportationManager.cc
Usual Geant4 API approach of eg providing UserStackingAction requires custom handling. Complications: geometry conversion.