diff --git a/compact/definitions.xml b/compact/definitions.xml
index a684281bc4..d2a2eb1f54 100644
--- a/compact/definitions.xml
+++ b/compact/definitions.xml
@@ -9,10 +9,17 @@
## World volume
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
## Detector IDs
diff --git a/compact/far_forward/vacuum.xml b/compact/far_forward/vacuum.xml
index ad5c8acab7..6cf43708be 100644
--- a/compact/far_forward/vacuum.xml
+++ b/compact/far_forward/vacuum.xml
@@ -59,6 +59,8 @@
+
+
diff --git a/src/magnetVacuumFF.cpp b/src/magnetVacuumFF.cpp
index 94f915bbba..b124422d4c 100644
--- a/src/magnetVacuumFF.cpp
+++ b/src/magnetVacuumFF.cpp
@@ -99,6 +99,9 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector /* sens *
z_elem_magnet.push_back(pos_z * dd4hep::cm);
}
+ xml_comp_t x_end_of_the_world = x_det.child(_Unicode(end_of_the_world));
+ double end_of_the_world_z = x_end_of_the_world.attr(_Unicode(z));
+
int numMagnets = radii_magnet.size(); //number of actual FF magnets between IP and FF detectors
int numGaps =
numMagnets -
@@ -265,7 +268,7 @@ static Ref_t create_detector(Detector& det, xml_h e, SensitiveDetector /* sens *
int pieceIdx = numMagnets - 1; // last B2PF magnet
std::string piece_name = Form("GapVacuum%d", numGaps + numMagnets + 1);
- double endGapLength = (10000.0 - z_end[pieceIdx]) / cos(rotation_magnet[pieceIdx]);
+ double endGapLength = (end_of_the_world_z - z_end[pieceIdx]) / cos(rotation_magnet[pieceIdx]);
endGapLength =
endGapLength -
4 * radii_magnet[pieceIdx] *
diff --git a/templates/epic.xml.jinja2 b/templates/epic.xml.jinja2
index 687347a0e4..107c2836b9 100644
--- a/templates/epic.xml.jinja2
+++ b/templates/epic.xml.jinja2
@@ -93,10 +93,18 @@
## World Volume
- The world is a simple box, but could be a union of multiple regions.
+ The world is a union of multiple regions.
-
+
+
+
+
+
+
+
+
+