Skip to content

getbrho wrong Energy parameter #6

@oscarxblanco

Description

@oscarxblanco

Dear all,

there is an issue with the expression to calculate brho in

brho = (10/2.99792458) * sqrt((Energy+E0).^2 - E0.^2);

The variable Energy refers to the total beam energy as it is obtained from the Energy parameter in AT, and used as such in AT expressions to calculate the energy loss per turn. See for example in atsummary line :

eloss=1.0e9*Cgamma/2/pi*smm.e0.^4*smm.integrals(2); % eV

https://github.com/atcollab/at/blob/66a7c92af28bed5900891b9c4fcbf6fae169e1a0/atmat/atphysics/ParameterSummaryFunctions/atsummary.m#L86

Therefore the expression should be :

 brho = (10/2.99792458) * sqrt((Energy).^2 - E0.^2)

It seems to me that the author of this line was expecting Energy to return something else. There is misleading warning commented on top claiming that the kinetic energy is used, however, this expression is still wrong even in that case as momentum and energy differ by a second order correction in a Taylor expansion of PC = E * sqrt(1 - (E0/E)^2), where here below the quotient E0/E expressed as x :

(%i1) taylor(sqrt(1-x^2),x,0,2);
                                     2
                                    x
(%o1)/T/                        1 - -- + . . .
                                    2

For a 3 GeV machine, the difference between Energy and momentum*speed_of_light for an electron is on the order of 10^-8, while, this expression introduces and error on the order of 10^-4, a non-negligible effect when considering precise magnetic fields.

Please, let me know if I have misunderstood something or if you find this to be an error as I think it is.
Best regards,
o

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions