label:PATCH,TYPE=string,APERTURE=real-vector,DX=real,DY=real,DZ=real, DTHETA=real,DPHI=real,DPSI=real;The element PATCH applies a general change to the reference system. PATCH has no effect on the beam, but it causes the beam to be referred to the new coordinate system. It has six real attributes:
As an example consider a simplified model of the separation of the two beams near the interaction region of LHC:
ALPHA=...; // The bend angle in the separator magnets. DISTANCE=...; // The longitudinal distance between the separator magnets. D1:HKICKER,L=0,KICK=ALPHA; D2:HKICKER,L=0,KICK=-ALPHA; DIST:DRIFT,L=DISTANCE; PATCH1:PATCH,DX=DISTANCE*TAN(ALPHA); PATCH2:PATCH,DX=-DISTANCE*TAN(ALPHA); SHARED SEPARATION:LINE=(D1,DIST,D2); RING1:SEQUENCE,...; // beam goes clockwise. ... SEPARATION; PATCH1; // change reference to ... ENDSEQUENCE; RING2:SEQUENCE,...; // beam goes anticlockwise. ... SEPARATION; PATCH2; ... ENDSEQUENCE;The direction of travel of each beam determines the signs of the deflections, the patches change the reference. Note that the common reference between the two separator magnets allows a correct handling of long-distance beam-beam interactions in that area.