Draft: Evaluate spatial cuts and residuals based on detector model
This MR comes as a follow-up from the discussions in MR !644 (merged).
It attemps to solve the complication in DUTAssociation
and AlignmentDUTResiduals
modules, where in the case of detector models not natively using cartesian coordinates (e.g. radial detectors use polar coordinates) detector model has to be checked and recalculations are necessary to properly evaluate spatial cuts or residuals in the correct coordinate system. (No such detector model is currently a part of the master
branch and only exist in WIP branches.)
The proposed solution is to evaluate spatial cuts and residuals in "native coordinates" (name is subject to change if something else would be preferred) which are defined via two Detector
(pure virtual) member functions
Detector::getNativePosition(localPosition)
Detector::getNativePosition(column, row)
For pixel detectors (including hexagonal detectors), the native coordinates are identical to local cartesian coordinates, and so these two functions simply call their respective getLocalPosition()
functions, seemingly only adding unnecessary function calls. For detector models using other coordinate systems, however, the local cartesian coordinates can be transformed to a desired system via the getNativePosition()
functions and therefore ensure proper handling of spatial cuts and residuals.