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

If you don't have that already, then install your own version of Root, so that you can customise it.

Topic attachments
I Attachment History Action Size Date Who CommentSorted ascending
Texttxt dumpHits.py.txt r1 manage 1.3 K 2014-06-16 - 14:24 DanProtopopescu Script used to extract hit positions from slcio file
Edit | Attach | Print version | History: r12 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2014-06-19 - DanProtopopescu
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback