diff --git a/.github/workflows/linux-eic-shell.yml b/.github/workflows/linux-eic-shell.yml index 47069df0be..303e365a1b 100644 --- a/.github/workflows/linux-eic-shell.yml +++ b/.github/workflows/linux-eic-shell.yml @@ -303,7 +303,7 @@ jobs: strategy: matrix: option: ['m'] #, 's'] # FIXME - detector_config: [epic_craterlake] # FIXME + detector_config: [epic_craterlake, epic_ip6_extended] # FIXME fail-fast: false steps: - uses: actions/checkout@v5 @@ -356,7 +356,11 @@ jobs: - build strategy: matrix: - detector_config: [epic_craterlake] + include: + - detector_config: epic_craterlake + tolerance_mm: 0.1 + - detector_config: epic_ip6_extended + tolerance_mm: 0.1 fail-fast: false steps: - uses: actions/checkout@v5 @@ -372,7 +376,7 @@ jobs: setup: install/bin/thisepic.sh run: | mkdir -p doc - python scripts/checkOverlaps.py -c ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml | tee doc/overlap_check_geant4.out + python scripts/checkOverlaps.py -t ${{ matrix.tolerance_mm }} -c ${DETECTOR_PATH}/${{ matrix.detector_config }}.xml | tee doc/overlap_check_geant4.out noverlaps="$(grep -c GeomVol1002 doc/overlap_check_geant4.out || true)" if [[ "${noverlaps}" -gt "0" ]] ; then echo "${noverlaps} overlaps found!" && false ; fi diff --git a/compact/far_backward/beamline_extension_hadron.xml b/compact/far_backward/beamline_extension_hadron.xml index 6f52c61a85..adea244ea8 100644 --- a/compact/far_backward/beamline_extension_hadron.xml +++ b/compact/far_backward/beamline_extension_hadron.xml @@ -49,8 +49,8 @@ type="BeamPipeChain" wall_thickness="2*mm"> (x_det, _Unicode(vis), "BeamPipeVis"); double thickness = getAttrOrDefault(x_det, _Unicode(wall_thickness), 0); - double bendRadius = 0.00001; //Small bend radius to allow the construction of toruses + double bendRadius = 0.00001 * mm; //Small bend radius to allow the construction of toruses vector names; vector ids; @@ -94,12 +94,13 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector / // If there is an bend in the pipe, calculate the length reduction of the pipe and joint length for (uint i = 1; i < thetas.size(); i++) { + // Start at the join between the first two pipes ending at the join between the last two pipes N-1 - if (thetas[i - 1] == thetas[i]) { + double bendAngle = thetas[i] - thetas[i - 1]; + if (std::abs(bendAngle) < 0.01 * mrad) { bendLengths.push_back(0); } else // Correct for tubes, not yet cones so imperfect { - double bendAngle = thetas[i] - thetas[i - 1]; double bendLength = abs(rOuters1[i] * tan(bendAngle / 2)); bendLengths.push_back(bendLength + bendRadius); } diff --git a/src/CylindricalMagnetChain_geo.cpp b/src/CylindricalMagnetChain_geo.cpp index 607a575f96..f423647cd0 100644 --- a/src/CylindricalMagnetChain_geo.cpp +++ b/src/CylindricalMagnetChain_geo.cpp @@ -42,7 +42,9 @@ static Ref_t create_magnet(Detector& description, xml_h e, SensitiveDetector /* double rout = getAttrOrDefault(magnet, _Unicode(rout), 0); // -- yoke - Tube yoke_tube(rin, rout, 0.5 * length); + // Factor of 1.01 is to avoid overlap with small bends before/after the main inner tube + // The magnets here are placeholders and may be replaced with more detailed geometries later + Tube yoke_tube(rin * 1.01, rout, 0.5 * length); Volume v_yoke("v_yoke_" + name, yoke_tube, m_Iron); v_yoke.setVisAttributes(description.visAttributes(vis_name));