To find the energy lost in one turn, one must first find the closed orbit using for example:
CALL FIND_ORBIT_x(als,X,wrapped_state,1.0e-5_dp,fibre1=1)During the tracking, PTC stores the energy regained in GeV at every RF cavity. To get the total energy lost (or regained), one calls:
GET_LOSS(R,energy,deltap)deltap is the of PTC at the first fibre. N.B. In PTC the reference momentum can be different for each magnet: PTC has energy patches as well.