Skip to content

Commit 92f2d1c

Browse files
committed
bug in tilts solved; offset to think of to deal you that and the closed orbit (removed for the moment)
1 parent 2ec2d08 commit 92f2d1c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

xcoll/beam_elements/fluka.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ def __init__(self, **kwargs):
226226
import xcoll as xc
227227
to_assign = {}
228228
generic = False
229-
import pdb; pdb.set_trace()
230229
if '_xobject' not in kwargs:
231230
kwargs.setdefault('_tracking', True)
232231
kwargs.setdefault('_acc_ionisation_loss', -1.)

xcoll/scattering_routines/fluka/fluka_input.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,13 @@ def _element_dict_to_fluka(element_dict, dump=False):
157157
elif ee.gap_R is not None:
158158
nsig = ee.gap_R
159159
half_gap = (ee._jaw_LU + ee._jaw_LD - ee._jaw_RU - ee._jaw_RD) / 4
160-
offset = (ee._jaw_LU + ee._jaw_LD + ee._jaw_RU + ee._jaw_RD) / 4
161-
tilt_1 = round(ee.tilt_L, 9)
162-
tilt_2 = round(ee.tilt_R, 9)
163-
# if abs(tilt_1) > 1.e-12 or abs(tilt_2) > 1.e-12:
164-
# raise NotImplementedError(f"Collimator {name}: Tilts are not (yet) supported in FLUKA-Xcoll!")
160+
offset = 0 # (ee._jaw_LU + ee._jaw_LD + ee._jaw_RU + ee._jaw_RD) / 4
161+
162+
tilt_1 = round(ee.tilt_L, 9) if ee.tilt_L is not None else 0.0
163+
tilt_2 = round(ee.tilt_R, 9) if ee.tilt_R is not None else 0.0
164+
165+
if abs(tilt_1) > 1.e-12 or abs(tilt_2) > 1.e-12:
166+
raise NotImplementedError(f"Collimator {name}: Tilts are not (yet) supported in FLUKA-Xcoll!")
165167

166168
if nsig is None:
167169
nsig = 1
@@ -211,6 +213,7 @@ def _fluka_builder(collimator_dict):
211213

212214
with open('linebuilder.log', 'w') as f:
213215
with redirect_stdout(f):
216+
# input_file, coll_dict = fb.fluka_builder(args_fb, auto_accept=True, verbose=True)
214217
input_file, coll_dict = fb.fluka_builder(args_fb, auto_accept=True)
215218

216219
# Restore system state

0 commit comments

Comments
 (0)