Geometry validation
Once the desired geometry is implemented in DD4hep, one need a way to compare it with the existing descriptions from Mokka or GeomConverter. This wiki describes several options for doing this. Lots of thanks to Andrei Gheață and Nikiforos Nikiforou for demonstrating how everything works.
Visual validation
First step is of course visual validation.To compare by eye an existing geometry with the newly implemented geometry in DD4hep, one should use the visualisation tools described in the
VisuDet wiki.
Checking overlaps
Shooting particles with Geant4/SLIC
One can shoot particles using
SLIC MC, and save output to a slcio file, then use
anajob
or
dumpevent
to compare hit positions.
To do this, setup
ilcsoft
to get access to
SLIC and the LCIO libraries (for later processing of slcio files). Then create a file, e.g.
particleGun.mac
, containing something like this:
/run/initialize
/generator/select gps
/gps/pos/type Point
/gps/pos/centre 0. 0. 0.
/gps/ang/type iso
/gps/ang/mintheta 90 deg
/gps/ang/maxtheta 90 deg
/gps/ang/minphi 10 deg
/gps/ang/maxphi 10 deg
/gps/ene/type Mono
/gps/ene/mono 99.8944 GeV
/gps/ene/gradient 0
/gps/ene/intercept 1
/gps/particle mu-
/random/seed 123456789
/run/beamOn 1
Run
SLIC, loading the geometry and running this macro:
slic -g geometry.lcdd -m particleGun.mac
This will create a file named
outfile.slcio
. Now run:
anajob outfile.slcio
to see hit counts, or
dumpevent outfile.slcio 1
or use
dumpHits.py
(
attached, modify at will) to print various hit parameters.
Stress tests