G4Exception in sbend

Issue #73 resolved
William Shields created an issue

Issue with this line in gmad file:

BM1: sbend, angle=0.1847, l=0.4441;

Terminal outputs this error:

-------- EEEE ------- G4Exception-START -------- EEEE ------- *** G4Exception : GeomSolids0002 issued by : G4CutTubs::G4CutTubs() Invalid Low or High Normal to Z plane; Crossing Cutted Planes. Invalid Norm to Z plane ((-0.0131925,0,-0.999913) and (-0.0131925,0,0.999913)) in solid: BM1_1_of_7_ro_solid *** Fatal Exception *** core dump *** -------- EEEE -------- G4Exception-END --------- EEEE -------

Produced when beampipeRadius wasn't specified (no options file included). When option file is included, exception doesn't occur.

Comments (2)

  1. Laurie Nevay

    This is due to the entrance and exit faces of the cylindrical magnet or magnet container overlapping due to a strong angle for a short length of magnet, with a large diameter.

    This can be avoided with more realistic diameters of the magnet by setting the outerDiameter general option or for that one element.

    We should however, protect against this and exit safely with a meaningful warning rather than a Geant4 exception. I will introduce a test for this with sbends and rbends.

  2. Laurie Nevay

    Fixed with commit #4de088b. Increased the tolerance when calculating maximum possible read out volume radius without having overlapping entrance and exit faces - required for G4CutTubs.

  3. Log in to comment