DetectorField: Provide Scale Factors as Fractions of Pixel Pitch
Status Quo
Up to now we have initialized the field scale factors for electric fields to {1., 1.}
for all field types apart from MESH
. For MESH
the scale factors are calculated in the ElectricFieldReader
module as scale * pitch
and passed to the DetectorField.
Assessment & Solution
This is inconsistent - as shows with a position dependent CUSTOM
field - because we incorrectly calculate the in-pixel position with scales initialized essentially to 1um
. The solution is to always store the field scale as fraction of the pixel pitch and to multiply with the pitch (a quantity available to DetectorField
wherever necessary.
Bug Severity
This only affects the newly added CUSTOM
field option when used as 3-dimensional, x/y-dependent field.
- For meshes the scales were configured properly as matching the pitch of a single pixel
- All other fields only had
z
dependencies and were therefore not affected by the mis-translation along the x/y axes.