Sector Bend Fail for 100mrad angles

Issue #21 resolved
Laurie Nevay created an issue

If the angle of a sector bend is too large, the stepper does not seem to be set properly (without throwing an error) and the particle is not guided by the sector bend. There could also be some issue with the number of steps taken inside the sector bend / or this could be a visualisation misrepresentation, where the particle takes apparently 1 step inside the sector bend and comes very close to the beam pipe.

For large angles (not that large though) 0.2 rad, length 3m, the stepper doesn't seem to work and there is a gap between the element before and the sbend. Moreover, the sbend is actually not a sector but a rectangular bend (in geometry only) with the faces cut.

This could be changed in the geometry by using a torus - although this would essentially render the option of an elliptical beam pipe near impossible, or quite complex.

The sbend in the attached zipped example should guide the particle perfectly as the sbend in the lattice is defined by angle.

In the attached example, everything seems ok for angles < 0.1 rad and broken for angles above

Comments (4)

  1. Jochem Snuverink

    Discussed this with Laurie, and we concluded that the main issue is that the sector bends have a straight ellipsoid beampipe instead of a toroidal ellipsoid beampipe. It seems that there is currently no Geant4 element for such a shape.

    One simple solution could be to have a toroidal circular beampipe instead.

  2. Jochem Snuverink

    From mail conversation with Lawrence Deacon:

    Hello,

    One simple workaround is instead of using one long bending magnet, compose your bending magnet of a series of smaller ones. It may be a good idea to incorporate this principle into the source code.

    The limiting factor is not bending angle but bending radius (or angle divided by magnet length).

    One issue is that you have a straight beam pipe geometry but the particles follow a curved path. When this radius of curvature gets too small, they intersect.

    By dividing the magnet up into small sections, the particle path locally appears straight and the beam pipe and particle track do not intersect. Essentially, by dividing the magnet up into small sections you approximate a toroid. This may be fundamentally want the program does with G4Toroid anyway. The advantage with this method is you can have a curved beam pipe of any cross section shape, not just circular.

    This tolerance will also be a function of beam pipe/magnet inner radius. Obviously, if the beam pipe radius is huge then the beam pipe wall and magnet geometry will never intersect.

    In geant the tracking steps do not follow the real trajectory but instead follow a series of "chords". The chord step lengths are recalculated if the trajectory is estimated to intersect with a volume boundary. Therefore, provided that the tracking tolerance parameters e.g. delta intersection etc. are set to small enough values, geant will adjust the chord steps to allow accurate tracking through any geometry.

    Cheers, Lawrence

  3. Jochem Snuverink

    This has been fixed in HighAngleSbend branch by Laurie and me by dividing strong sector bends into separate ones as discussed.

  4. Log in to comment