Feature #1432

Geometry simulation speed up attempt

Added by Bayes, Ryan about 9 years ago. Updated about 8 years ago.

Target version:
Start date:
12 March 2014
Due date:
% Done:


Estimated time:
New Issue


Loading the simulation of the MICE channel currently takes on the order of 20 minutes using the CDB geometry. This is felt to be due to inefficient handling of the tessellated solids by the MICE modules/G4 interface somehow combined with the number of tessellated solid elements that make put the geometry extracted from the CAD. Two tests have been done in this regard; one test checked the load time of the tessellated solid through a judicious use of output statements and found that the slowdown is due to the placement of the tessellated solids by GEANT, and the second used a stand-alone simulation to check the load time independent of other factors in the MAUS framework which, anecdotally (I don't know if I actually recorded the load time anywhere) takes a fraction of the time.

I plan to test whether the load time may be reduced by using GDML for the definition of the geometry explicitly rather than extracting it from the MICE modules. This will take the form of a new class of the same form as the DetectorConstruction class under the common_cpp/Simulation directory. It looks to me that most of the bureaucracy will be maintained, but the ResetGeometry method will be replaced with a method that appeals to the GDML parser to define the geometry. The majority of the work will be extracting the sensitive detector definitions and visualization attributes from the GDML auxiliary maps in the detector files (the detector files on CDB were written to fulfil this requirement). I believe (again based purely on anecdote) that there are optimizations in the GDML parser that will provide some increase in loading speed for the simulation. Should this not be the case the other avenue is to test a ROOT based geometry definition.


first_gdml_generation.jpg (78.2 KB) first_gdml_generation.jpg Bayes, Ryan, 13 June 2014 17:35

Also available in: Atom PDF