Skip to content

Commit 2ec2d08

Browse files
committed
reincluded collimators shift when closed orbit is not None
1 parent d51a611 commit 2ec2d08

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

xcoll/scattering_routines/fluka/track.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ def track(coll, particles):
5353
+ "FLUKA.\nIn any case, please stop and restart the FlukaEngine now.")
5454

5555
_drift(coll, particles, -coll.length_front)
56+
if coll.co is not None: # FLUKA collimators are centered; need to shift
57+
dx = coll.co[1][0]
58+
dy = coll.co[1][1]
59+
particles.x -= dx
60+
particles.y -= dy
5661
track_core(coll, particles)
62+
if coll.co is not None:
63+
particles.x += dx
64+
particles.y += dy
5765
_drift(coll, particles, -coll.length_back)
5866

5967

0 commit comments

Comments
 (0)