Closed arnaualba closed 4 years ago
Note that for this calculation I assume that totalDist_ is longer than the undulator (or array of undulators). So the end point is somewhere after the last undulator
Hi Arna, thanks for the correction. I think your implementation is better. I will just merge your pull request.
The current calculation of
mesh_.totalTime_
from amesh_.totalDist_
given by the user, overestimates the necessary time, and the tail of the bunch ends much further downstream than the actual giventotalDist_
:For the implementation in OPAL it really is necessary that the bunch's tail ends at
totalDist_
in the lab frame, or very close to it. I propose a different way to calculate the total time. It is more accurate. I have attached a small note describing the derivationcomputeTime.pdf