Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKTHIN of RBEND disregards E1 and E2 #710

Closed
alatina opened this issue Dec 18, 2018 · 3 comments
Closed

MKTHIN of RBEND disregards E1 and E2 #710

alatina opened this issue Dec 18, 2018 · 3 comments
Assignees
Labels
bug the behaviour is not documented and should be fixed in the code

Comments

@alatina
Copy link
Contributor

alatina commented Dec 18, 2018

When an RBEND passes through MKTHIN, becomes an SBEND with

E1 = ANGLE / 2;
E2 = ANGLE / 2;

which is fine.

But if the user provides the entrance and exit angles, E1 and E2, instead of an SBEND with

E1 = E1 + ANGLE/2;
E2 = E2 + ANGLE/2;

one gets:

E1 = ( ( 0 ) + ANGLE/2);
E2 = ( ( 0 ) + ANGLE/2);

That is, the inputs E1 and E2 are lost

@alatina
Copy link
Contributor Author

alatina commented Dec 18, 2018

option, -debug, -echo;

lmb = 10.;
amb = 0.010;
mb1: rbend, l=lmb, angle=amb, e1 = 1, e2 = 2;

myseq: sequence, l=11, refer=centre;
mb1, at:= 5.5;
endsequence;

beam,energy=1.e6;
use, sequence=myseq;

select, flag=makethin, class=rbend, thick=true;

makethin, sequence=myseq, style=teapot, makedipedge=false;
use, sequence=myseq;

save, sequence=myseq, file="thin.seq";

@alatina
Copy link
Contributor Author

alatina commented Dec 18, 2018

Produces the output:

mb1: sbend,l:=( 10 ) * ( 1.0 / sinc ( 0.01 * 0.5 ) ) ,angle:= 0.01,e1:=( 0 ) + ( ( 0.01 ) * ( 0.5 ) ) ,e2:=( 0 ) + ( ( 0.01 ) * ( 0.5 ) ) ,thick=true;
myseq: sequence, l = 11;
mb1, at = ( 5.5 ) + ( ( ( 10 ) * ( 1.0 / sinc ( 0.01 * 0.5 ) ) ) * ( 0 ) ) ;
endsequence;

@ldeniau ldeniau added the bug the behaviour is not documented and should be fixed in the code label Dec 18, 2018
HelmutCERN added a commit that referenced this issue Dec 18, 2018
@tpersson
Copy link
Contributor

tpersson commented Feb 6, 2019

#717 is now in master

@tpersson tpersson closed this as completed Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the behaviour is not documented and should be fixed in the code
Projects
None yet
Development

No branches or pull requests

4 participants