Support Magnetic Fields
Description
For certain studies, magnetic fields are indispensable, it would be nice to support this in Allpix Squared.
Proposal
Write a new unique module MagneticFieldReader
which reads/calculates a magnetic field for the complete setup.
The field inside each sensitive volume should be calculated from the global field and attached to the detector instance.
The implementation of the Lorentz-induced drift should be straight forward in GenericPropagation
, for ProjectionPropagation
we might either exclude the usage (as for nonlinear fields) or find a way to use it still.
When not using a magnetic field, no additional field lookup (yielding zeros) should be necessary in order not to slow down simulation.
Feature checklist
-
new unique module MagneticFieldReader
or similar -
allow different field shapes for setup, orient along global axes -
allow to read more complex field from file (define format, coorinates etc) -
in init()
the geometry is closed and local fields are calculated from global field -
implement Lorentz fore effect in propagation module(s). -
add example/test case with magnetic field (Lorentz angle measurement?) -
update documentation -
cover new module as well as drift behavior by test cases for field reader and propagators.