Support magnetic fields
As addressed in #117 (closed) , supporting magnetic fields is interesting for a wide range of tests.
In this approach, I added a unique module MagneticFieldReader
, to read in a magnetic field. The approach is similar to the implementation of the electric field, although currently only uniform magnetic fields are allowed for. However, with the implementation of the field in the GeometryManager
and the Detector
classes, adding more complex fields should be possible without a full rework of these classes.
In the GeometryManager
and the Detector
classes, the regarding functions to set and read the magnetic field are added.
In the GenericPropagation
module, the Lorentz Drift was enabled. For the ProjectionPropagation
, an enabled magnetic field results an error. Discussion: An option ignore_magnetic_field
could be added to avoid the necessity to use the GenericPropagation
, e.g. for reference tracker, or an attempt of applying a Lorentz Drift to the ProjectionPropagation
could be made.
In the DepositionGeant4
module, the propagation in uniform magnetic fields is implemented.
This fixes #117 (closed)