Skip to content

Call FixZeroes() for transformations and phi wedge angles

Guilherme Lima requested to merge lima/fixZeroes into master

This significantly improves agreement of GPU tracking w.r.t. CPU, at least for pathological cases like tracks going right through the surfaces separating two distinct volumes.

In the case I've debugged (cms2018.gdml), a polycone (EEDee) is positioned twice inside the same mother (ENCA), each EEDee covering a 180deg azimuth, one of them with a rotation of -180deg around the z-axis. So both of their phi-wedges are coincident. A track contained in one of those shared surfaces, e.g. (x=0,y,z) happened to be located in each different Dee on CPU vs. GPU.

A detailed debugging showed that the -180.deg rotation matrix had non-diagonal elements of ~O(1.e-15), and that local coordinates for the point had a very small, but positive x in CPU and negative x in GPU.

This commit calls FixZeroes() for the transformation matrices read from the GDML file, and just before using them to place daughters inside a logical volume. It also calls FixZeroes() for the Vector3D objects which define the faces of phi-wedges.

Merge request reports