Bad Tracking in Solenoid

Issue #255 resolved
Laurie Nevay created an issue

Currently, the solenoid appears to straighten all particles.

The integrator used is the rodrigues2 integrator for a pure dipole field. However, this doesn't include the edge effects (focussing / defocussing).

We do have a matrix integrator implemented but this is a combination of entrance + middle + exit. This can only be used with 1 step across otherwise the edge effects are applied multiple times.

To fix this, I will reimplement the solenoid matrix into separate thin elements for hard edge effects and then a pure middle part.

I will also check the straightening of the particles. This is most likely an unintended consequence of the special provision for infinitely spiralling particles in dipoles as the radius of the helix of each particle in the solenoid will undoubtedly be much smaller than the beam pipe width (the test used).

Aside from the edge effects, the middle part could be done entirely via the rodrigues2 integrator, so its behaviour should be fixed.

Comments (2)

  1. Laurie Nevay reporter

    I've fixed this now in develop and it'll be in the next release of BDSIM (V1.2). The all-in-one matrix (that wasn't used) has been reimplemented.

    The original matrix was only suitable for a single pass of a solenoid as it included the entrance and exit fringe effects. Knowing this limitation, the Dipole Rodrigues 2 integrator was used in the mean time as the solenoid was not a high priority. However, an unintended consequence was bad tracking due to the anti-spiralling code in that integrator that protects against low energy particles spiralling in strong fields and therefore infinite loops.

    The new solenoid integrator only works on the central part of the solenoid. The edge effects are taken care of using a thin RMatrix integrator.

    Screen Shot 2018-08-22 at 14.33.40.png

  2. Log in to comment