Wrong bunch information
Summary
Wrong magnitude of rmin
and rmax
in case of OPAL-Cycl.
Steps to reproduce
Run Injector-2 with OPAL-master or OPAL-1.6
What is the current bug behavior?
rmin
and rmax
are scaled by a factor 1000 which yields:
OPAL> * *********************** Bunch information in local frame: ************************
OPAL> * rmax = ( 14.11518 , 22.17745 , 8.35929 ) [um]
OPAL> * rmin = ( -13.28184 , -20.78026 , -8.34465 ) [um]
OPAL> * rms beam size = ( 3.13787 , 4.45083 , 2.06234 ) [mm]
OPAL> * **********************************************************************************
OPAL> * *********************** Bunch information in global frame: ***********************
OPAL> * rmax = ( 355.14915 , 214.51694 , 8.35600 ) [um]
OPAL> * rmin = ( 323.97821 , 178.14940 , -8.34800 ) [um]
OPAL> * rms beam size = ( 3.55602 , 4.12442 , 2.06234 ) [mm]
OPAL> * **********************************************************************************
The bunch position in global frame is R = 392.01 mm
which does not agree with the unit of [um]
. The bunch
is also bigger!
What is the expected correct behavior?
OPAL> * *********************** Bunch information in local frame: ************************
OPAL> * rmax = ( 14.11518 , 22.17745 , 8.35929 ) [mm]
OPAL> * rmin = ( -13.28184 , -20.78026 , -8.34465 ) [mm]
OPAL> * rms beam size = ( 3.13787 , 4.45083 , 2.06234 ) [mm]
OPAL> * **********************************************************************************
and
OPAL> * *********************** Bunch information in global frame: ***********************
OPAL> * rmax = ( 355.14915 , 214.51694 , 8.35600 ) [mm]
OPAL> * rmin = ( 323.97821 , 178.14940 , -8.34800 ) [mm]
OPAL> * rms beam size = ( 3.55602 , 4.12442 , 2.06234 ) [mm]
OPAL> * **********************************************************************************
Possible fixes
Remove lengthUnitConverter
if (OpalData::getInstance()->isInOPALCyclMode()) {
lengthUnitConverter = 0.001;
pathLength = getLPath();
}
rmax_m *= lengthUnitConverter;
rmin_m *= lengthUnitConverter;
Edited by frey_m