Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,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
Expand Down Expand Up @@ -347,7 +347,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.01
fail-fast: false
steps:
- uses: actions/checkout@v5
Expand All @@ -363,7 +367,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

Expand Down
4 changes: 2 additions & 2 deletions compact/far_backward/beamline_extension_hadron.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
type="BeamPipeChain"
wall_thickness="2*mm">
<pipe id="0" name="Pipe_to_Q1APR"
xcenter="(Hadron_Beampipe_End*sin(CrossingAngle)+Q1APR_StartX)/2." zcenter="(Hadron_Beampipe_End+Q1APR_StartZ)/2."
length="(Hadron_Beampipe_End-Q1APR_StartZ)/cos(CrossingAngle)" theta="CrossingAngle"
xcenter="(Hadron_Beampipe_End*sin(CrossingAngle)+Q1APR_StartX)/2." zcenter="(Hadron_Beampipe_End*cos(CrossingAngle)+Q1APR_StartZ)/2."
length="sqrt((Hadron_Beampipe_End*sin(CrossingAngle)-Q1APR_StartX)^2+(Hadron_Beampipe_End*cos(CrossingAngle)-Q1APR_StartZ)^2)" theta="CrossingAngle"
rout1="Hadron_Beampipe_Rad" rout2="Hadron_Beampipe_Rad">
</pipe>
<pipe id="1" name="Pipe_in_Q1APR"
Expand Down
7 changes: 4 additions & 3 deletions src/BeamPipeChain_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector /
Material m_Vacuum = description.material("Vacuum");
string vis_name = dd4hep::getAttrOrDefault<std::string>(x_det, _Unicode(vis), "BeamPipeVis");
double thickness = getAttrOrDefault<double>(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<string> names;
vector<int> ids;
Expand Down Expand Up @@ -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);
}
Expand Down
Loading