Navigator gets confused by particles "clipping" volume corners
As originally reported and discussed in https://mattermost.web.cern.ch/acts/pl/qc9mdpiz3pnj5yxmryqimbw88e. Some content copied.
As of v39, bisected to #3449, our EIC material map creation with Examples/Scripts/Python/material_mapping.py has started to error out due to a peculiar navigator error. It seems we have just happen to have a sufficient number of (straight) tracks that clip corners of endcap volumes such that the entry and exit points are within the surface tolerance. The entry is registered, the navigator ends up in the new volume, but can't exit because the exit point is below surface tolerance (Navigator nearLimit). I wonder if others have encountered similar issues.
Here is the navigator log for the offending event (and geometry json). Relevant excerpts near the end:
09:28:17 Navigator VERBOSE Check intersection with surface vol=18|bnd=1
09:28:17 Navigator VERBOSE -> near limit, far limit, distance: 0.0001, 1.79769e+308, 136.642
...
09:28:17 Navigator VERBOSE Check intersection with surface vol=20|bnd=4
09:28:17 Navigator VERBOSE -> near limit, far limit, distance: 0.0001, 1.79769e+308, 136.643
...
09:28:17 Navigator VERBOSE 2 boundary candidates found at path(s): 136.642 136.643
...
09:28:17 Navigator VERBOSE Check intersection with surface vol=18|bnd=1
09:28:17 Navigator VERBOSE -> near limit, far limit, distance: 0.0001, 1.79769e+308, 0
09:28:17 Navigator VERBOSE Intersection is OUTSIDE limit because:
09:28:17 Navigator VERBOSE - intersection path length 0 <= near limit 0.0001
...
09:28:17 Navigator VERBOSE Check intersection with surface vol=20|bnd=4
09:28:17 Navigator VERBOSE -> near limit, far limit, distance: 0.0001, 1.79769e+308, 4.82197e-05
09:28:17 Navigator VERBOSE Intersection is OUTSIDE limit because:
09:28:17 Navigator VERBOSE - intersection path length 4.82197e-05 <= near limit 0.0001
...
09:28:17 Navigator VERBOSE InnerSiTrackerSubAssembly::PositiveEndcap | Unknown state. No target found. Renavigate.
... (try again)
09:28:17 Navigator VERBOSE InnerSiTrackerSubAssembly::sGap | No targets found again, we got really lost! Stop navigation.
This was obtained with the following geometry, and a full log is attached: geometry-map.json material_mapping.log
The close intersections are not within the same volume, i.e. vol=18|bnd=1 vs vol=20|bnd=4. These are:
{
"boundary": 1,
"value": {
"bounds": {
"type": "RadialBounds",
"values": [
34.0,
241.00199999999992,
3.141592653589793,
0.0
]
},
"geo_id": 1297318167659413504,
"material": {
"binUtility": {
"binningdata": [
{
"bins": 1,
"max": 3.1415927410125732,
"min": -3.1415927410125732,
"option": "closed",
"type": "equidistant",
"value": "AxisPhi"
},
{
"bins": 1,
"max": 241.0019989013672,
"min": 34.0,
"option": "open",
"type": "equidistant",
"value": "AxisR"
}
]
},
"mapMaterial": false,
"mappingType": "Default",
"type": "proto"
},
"transform": {
"rotation": null,
"translation": [
0.0,
0.0,
136.0005
]
},
"type": "DiscSurface"
},
"volume": 18
},
and
{
"boundary": 4,
"value": {
"bounds": {
"type": "CylinderBounds",
"values": [
241.00199999999992,
355.42250000499996,
3.141592653589793,
0.0,
0.0,
0.0
]
},
"geo_id": 1442277780665401344,
"material": {
"binUtility": {
"binningdata": [
{
"bins": 1,
"max": 3.1415927410125732,
"min": -3.1415927410125732,
"option": "closed",
"type": "equidistant",
"value": "AxisPhi"
},
{
"bins": 1,
"max": 355.4224853515625,
"min": -355.4224853515625,
"option": "open",
"type": "equidistant",
"value": "AxisZ"
}
]
},
"mapMaterial": false,
"mappingType": "Default",
"type": "proto"
},
"transform": {
"rotation": null,
"translation": null
},
"type": "CylinderSurface"
},
"volume": 20
},
@wdconinc the log does not contain verbose statements from the propagator. These would be useful because they contain the steps taken and current positions. Could you provide these?
Coming back to this, two other pieces of the puzzle (but unfortunately due to point 1 it probably doesn't make sense to add the verbose output of the propagator since that issue is resolved though proper geometry creation).
Removing a 1 um tolerance spacing within our geometry caused one set of these navigation errors to disappear (the one in the InnerSiTrackerSubAssembly above), but caused similar navigation errors in our far forward B0 tracker to appear later (naturally) in the material mapping step.
Debugging the far forward B0 tracker caused us to realize that the boundary volumes are not containing the material layers inside them. Image from ply export below. This kind of ill-formed geometry should not be expected to behave, so we're first trying to improve that.
The reason for this appears to be because these positive endcap layers are off axis, but the cylinder volume builder still uses the simple radial bounds to construct cylinders, which are placed on axis. The amount by which the layers are off axis should likely be included in the cylinder volumes.
The reason for this appears to be because these positive endcap layers are off axis, but the cylinder volume builder still uses the simple radial bounds to construct cylinders, which are placed on axis. The amount by which the layers are off axis should likely be included in the cylinder volumes.
I think this ultimately is what it comes down to: we have a telescope-like geometry in the forward direction that is no possible to include in the Acts geometry since it requires endcap volumes that are not allowed by previous placements of beampipe and inner endcap detectors. Here is the detector in question (pacman-shaped arrangement of silicon detectors, the crosshairs are the beamline, so this sits 25 mrad off to the right):
The off-axis layer for this detector is such that the z-axis goes through it. This means that the cylinder volume around it must have zero inner radius. With the default geometry construction in CylinderGeometryBuilder, we (silently) end up with a geometry that has layers sticking out of cylinder volumes, which is likely (in part) what causes the navigation errors.
I managed to get a reproducible CI log with this issue,
... and I mistakenly close the issue.
The reproducible CI job with propagator debugging is at https://github.com/eic/epic/actions/runs/16684683559/job/47231654948?pr=910. E.g. line 4700 etc.
attaching the log file here so it does not disappear job-logs.txt
relevant lines
2025-08-01T22:27:08.2146865Z 22:27:07 Navigator VERBOSE MiddleSiTrackerSubAssembly::sGap | No boundary candidates found.
2025-08-01T22:27:08.2147391Z 22:27:07 Navigator VERBOSE MiddleSiTrackerSubAssembly::sGap | Boundary targets exhausted. Renavigate.
2025-08-01T22:27:08.2147917Z 22:27:07 Navigator VERBOSE MiddleSiTrackerSubAssembly::sGap | Unknown state. No target found. Renavigate.
2025-08-01T22:27:08.2148531Z 22:27:07 Navigator VERBOSE MiddleSiTrackerSubAssembly::sGap | No targets found again, we got really lost! Stop navigation.
This issue/PR has been automatically marked as stale because it has not had recent activity. The stale label will be removed if any interaction occurs.