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.
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.
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.slcioto see hit counts, or
dumpevent outfile.slcio 1or use
dumpHits.py
(attached, modify at will) to print various hit parameters.
If you don't have that already, then install your own version of Root, so that you can customise it.
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
dumpHits.py.txt | r1 | manage | 1.3 K | 2014-06-16 - 14:24 | DanProtopopescu | Script used to extract hit positions from slcio file |