Difference: ValidateGeom (5 vs. 6)

Revision 62014-06-23 - DanProtopopescu

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Geometry validation

Changed:
<
<
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.
>
>
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 various tools work.
 
Line: 82 to 82
 

Stress tests

Changed:
<
<
If you don't have that already, then install your own version of ROOT, so that you can customise it. Then go to $ROOTSYS/test and edit stressGeometry.cxx to add a custom entry, in my case a diff shows these changes:
>
>
Go to directory $ROOTSYS/test and edit stressGeometry.cxx to add a custom entry, in my case a diff shows these changes:
 
[protopop@ppelx ECal]$ diff $ROOTSYS/test/stressGeometry.cxx.orig $ROOTSYS/test/stressGeometry.cxx
78c78
Line: 97 to 97
 > 0.4, //clicd
184a188 > {750,750,1000}, // clicd
Added:
>
>
255a260,262 > if(i==4)
> TGeoManager::Import(Form("http://www.ppe.gla.ac.uk/~protopop/clic/%s", fname.Data()));
> else
 
Changed:
<
<
then recompile
>
>
where the original geometry file clicd.root was created with gGeoManager->Export("clicd.root"); after importing it from another format, e.g. GDML (and removing for this example everything but the ECal).

We recompile

 
Added:
>
>
source /afs/phas.gla.ac.uk/data/ilc/software/ilcsoft/v01-17/init_ilcsoft.sh cd $ROOTSYS/test/
 make stressGeometry and run
Changed:
<
<
stressGeometry clicd
>
>
./stressGeometry clicd This will generate a file called clicd_ref_1.root and put it in $ROOTSYS/test/files. This is the reference that will be used for all our subsequent comparisons.

Now let's say we want to compare our newly implemented geometry with the original. We save our new geometry with

gGeoManager->Export("ECal_new.root");
and we put it in the same location as above (http://www.ppe.gla.ac.uk/~protopop/clic/clicd.root), e.g. cp ECal_new.root ~/web/clic/clicd.root

EcalEndcap_zmin_change.png For example, if we have changed EcalEndcap_zmin from 165.70cm to 164.70cm between the two models, we get

[protopop@ppelx test]$ ./stressGeometry clicd
...
Info in <TFile::OpenFromCache>: using local cache copy of http://root.cern.ch/files/clicd_ref_1.root [./files/clicd_ref_1.root]
Reference file http://root.cern.ch/files/clicd_ref_1.root found
 ==>Point 45 differs with diff = 35.4858, x=47.3349, y=4.26597, z=-370.913
    p.nbound=112, p.length=907.019, p.safe=129.087, p.rad=724.119
      nbound=116,   length=907.019,   safe=129.087,   rad=759.605
...
 ==>Point 1057 differs with diff = 63.411, x=-39.6917, y=-27.223, z=166.572
    p.nbound=75, p.length=795.659, p.safe=0.0221592, p.rad=574.564
      nbound=80,   length=795.659,   safe=0.0221592,   rad=637.975
******************************************************************************
*Tree    :TD        : TGeo stress diff                                       *
*Entries :      160 : Total =           10359 bytes  File  Size =       5420 *
*        :          : Tree compression factor =   1.00                       *
******************************************************************************
*Br    0 :p         : x/D:y/D:z/D:theta/D:phi/D:rad[4]/F                     *
*Entries :      160 : Total  Size=       9993 bytes  One basket in memory    *
*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00     *
*............................................................................*
*     stress clicd            found    80 bad points ............. failed
******************************************************************
 
Changed:
<
<
This will generate a reference file called clicd_ref_1.root and put it in $ROOTSYS/test/files.
>
>
The statistics can be adjusted by changing Npoints = 10000; from its default.

Troubleshooting

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

You might have to delete ROOT's local cache of the geometry file (clicd.root in the above example), or simply store it locally in order to make sure the newest version is loaded for comparison with the reference. Once created, the reference remains in $ROOTSYS/test/files/ and you will have to delete it to force the creation of a new one.

 
META FILEATTACHMENT attachment="dumpHits.py.txt" attr="" comment="Script used to extract hit positions from slcio file" date="1402928692" name="dumpHits.py.txt" path="dumpHits.py.txt" size="1300" user="DanProtopopescu" version="1"
META FILEATTACHMENT attachment="ECal1.png" attr="" comment="ECal visualised in geoDisplay" date="1403186454" name="ECal1.png" path="ECal1.png" size="18146" user="DanProtopopescu" version="1"
META FILEATTACHMENT attachment="extrusion.png" attr="" comment="Extrusion detected by CheckOverlaps()" date="1403186506" name="extrusion.png" path="extrusion.png" size="32924" user="DanProtopopescu" version="1"
Added:
>
>
META FILEATTACHMENT attachment="EcalEndcap_zmin_change.png" attr="h" comment="Small change in EcalEndcap_zmin" date="1403515356" name="EcalEndcap_zmin_change.png" path="EcalEndcap_zmin_change.png" size="24158" user="DanProtopopescu" version="2"
 
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