Skip to content

Remove Per-Carrier Check for Correct Coordinate Transformation

Simon Spannagel requested to merge remove_g4_check into master

Since the early days we had an additional check for correct coordinate transformation in the code, comparing our global-to-local transformation with the one we get from the Geant4 touchable's navigation history (i.e. a built-up of all transformations from the world volume down to the physical volume we're looking at).

While this is a good thing to check we certainly do not have to do it for every single charge carrier, but it is enough to do it once when building the geometry.

In addition, since the local coordinate system of some Geant4 solids (such as trapezoids) have an axis orientation that does not correspond to our coordinate system (z along sensor thickness), some models (such as RadialStrips) require an additional transformation to play nicely. Up till now, this additional rotation also had to be wired through to the SensitiveDetectorAction to add to the above transformation - not very nice.

This new code runs a single check with a test vector after fully constructing the geometry. I'm not 100% if even that is necessary, because the issue cannot be solved by the user but it is an oversight/issue/major bug in the implementation of the respective detector model. So - is this check useful here, and do we keep it?

Merge request reports