DD4hep vs DetDesc for CALO with TGeoNavigator
To compare the CALO geometries in DD4hep and DetDesc, I did the following steps:
-
I exported both geometries in GDML files
-
I imported the GDML files into ROOT and performed the validation with two alternative methods:
A) Loop on all the volumes to compare their local coordinates (i.e. the coordinates of each volume in the reference frame of its parent volume), sizes (the vast majority of CALO volumes are boxes) and material.
B) Use the
TGeoNavigator
tool to get the position of the volume faces crossed while navigating the geometries in a straight-line direction. This method can also provide the same information as method (A), but only for the touched volumes. Touching systematically all the CALO volumes is not feasible. I repeated the test in various squared regions of interest, with multiple starting points at various distances from each other.
No error is found with method A. Instead, method B signals discrepancies up to \approx 1~\rm mm
. The actual reason for this discrepancy is not clear to me. A rounding issue could be an option.
The code used for the tests and their outputs are available in the branch dmanuzzi_test_CALO-geometry-validation-issue
of Gauss.
Note: the BeamPipe volumes are not considered.