Closed jgray-19 closed 1 year ago
The following is not longer correct to me
p.t -= _pz(l/m->beta+p.pt) + (m->T-1)l/m->beta;
You need:
p.t -= _pz(l/m->beta+lp.pt) + (m->T-1)*l/m->beta;
Absolutely! I just made a commit that restores l_pz. The "instability" is not a true instability but a case of "bits cancellation" due to the change of sign in the assignment and the swap of (T-1) to take advantage of C++ op= operators. Thus this will vary from run to run depending on the numerical values involved.
I found this version of drift to be more stable for T, specifically the
_pz*(l/m->beta+p.pt) + (m->T-1)*l/m->beta;
calculation