Commit e70e78a1 authored by Simone Liuzzo's avatar Simone Liuzzo

+ebs/orm like +sy/orm uses Class field to discrimnate Response behaviour

parent 09dc7f1c
......@@ -12,14 +12,19 @@ function resp = orm(ring,plane,stidx,bpmidx)
persistent sleh slev
if isempty(sleh)
sleh.CorrectorPass=@hcorrector;
sleh.BndMPoleSymplectic4Pass=@hmultipole;
sleh.StrMPoleSymplectic4Pass=@hmultipole;
sleh.QuadMPoleFringePass=@hquadmotion;
slev.CorrectorPass=@vcorrector;
slev.BndMPoleSymplectic4Pass=@vmultipole;
slev.StrMPoleSymplectic4Pass=@vmultipole;
slev.QuadMPoleFringePass=@vquadmotion;
sleh.Corrector=@hcorrector;
sleh.Bend=@hmultipole;
sleh.Sextupole=@hmultipole;
sleh.Multipole=@hmultipole;
sleh.Octupole=@hmultipole;
sleh.Quadrupole=@hquadmotion;
slev.Corrector=@vcorrector;
slev.Bend=@vmultipole;
slev.Sextupole=@vmultipole;
slev.Multipole=@vmultipole;
slev.Octupole=@vmultipole;
slev.Quadrupole=@vquadmotion;
end
if islogical(stidx)
......@@ -31,9 +36,9 @@ resp=cat(2,res{:});
function r=horbit(idst,kick)
elsave=ring{idst};
ring{idst}=sleh.(elsave.PassMethod)(elsave,-0.5*kick);
ring{idst}=sleh.(elsave.Class)(elsave,-0.5*kick);
orbp=findsyncorbit(ring,0,bpmidx);
ring{idst}=sleh.(elsave.PassMethod)(elsave,+0.5*kick);
ring{idst}=sleh.(elsave.Class)(elsave,+0.5*kick);
orbm=findsyncorbit(ring,0,bpmidx);
ring{idst}=elsave;
r=(orbp(1,:)-orbm(1,:))'/kick;
......@@ -41,9 +46,9 @@ resp=cat(2,res{:});
function r=vorbit(idst,kick)
elsave=ring{idst};
ring{idst}=slev.(elsave.PassMethod)(elsave,-0.5*kick);
ring{idst}=slev.(elsave.Class)(elsave,-0.5*kick);
orbp=findsyncorbit(ring,0,bpmidx);
ring{idst}=slev.(elsave.PassMethod)(elsave,+0.5*kick);
ring{idst}=slev.(elsave.Class)(elsave,+0.5*kick);
orbm=findsyncorbit(ring,0,bpmidx);
ring{idst}=elsave;
r=(orbp(3,:)-orbm(3,:))'/kick;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment