Dear FLUKA experts,
I’m currently working on a rather complex beamline setup in FLUKA, and I’ve run into an issue that I hope you can help me with.
My beamline consists of 3 dipoles and 7 quadrupoles, with a 16° horizontal bending angle. The challenge arises from the fact that the beamline must be installed in an existing tunnel with a ~5° inclination, while the decay tunnel at the end needs to be leveled to the surface. To accommodate this transition, I had to apply a roll to the beamline to ensure proper alignment.
Since FLUKA does not allow nested roto-translations, implementing this was quite challenging, but after several days of work, I believe I managed to get it right. The magnetic fields inside the beam pipe are defined with the correct roto-translation—when I plot them, they appear as expected, and the magnets are positioned correctly in the geometry.
However, I’ve noticed an issue: there seems to be a vertical force component generated by the dipole fields, giving a slight vertical kick to my beam. By the time the beam reaches the last quadrupole, about half of it is lost against the walls of a magnet. This suggests that either the dipole field is not being applied correctly or there is a fundamental issue with how I built the beamline.
I would really appreciate any insights on what might be going wrong. I’m attaching my input file below—specifically, the relevant roto-translations start from QUAD_ROT.
Thanks in advance for your help!
Best regards,
Matteo
PBC_SBN_DESIGN_BDnew.inp (124.6 KB)