Next: Change since the last Up: Introduction Previous: General Structure of Input

Here, we show a more complex example which may help after reading the rest of this manual. It is for a - collider. First define two electron beams and two lasers. The electron beams are converted into photons by non-linear Compton scattering with lasers. Then, the back-scattered photons and the spent electrons all come to the collision point.

```!  NLC  Gamma-Gamma Collider
!  Takes 2000 sec on HP workstation at KEK
HEADER  'NLC G-G;    G G;';
SET   photon=1, electron=2, positron=3,
mm=1D-3, micron=1D-6, nm=1D-9, mu0=4*Pi*1D-7,
ee=250D9,  gamma=ee/Emass,  an=0.65D10,  sigz=0.1*mm,
betax=0.5*mm, betay=0.5*mm, emitx=5D-6/gamma, emity=8D-8/gamma,
sigx=Sqrt(emitx*betax), sigy=Sqrt(emity*betay), off=sigy,
laserwl=1.053*micron, pulseE=1.0, lambar=laserwl/(2*Pi),
omegal=Hbarc/lambar, rlx=0.1*mm, rly=0.1*mm, sigt=0.23*mm,
powerd=pulseE*Cvel/[Pi*lambar*sigt*Sqrt(2*Pi*rlx*rly)],
xisq=powerd*mu0*Cvel*(lambar/Emass)^2,   xi=Sqrt(xisq),
eta=omegal*ee/Emass^2, lambda=4*eta,
angle=0.0, dcp=5*mm ;  ! dcp=CP-to-IP distance
SET MsgLevel=1;
PRINT  90*180*an^2/(4*Pi*sigx*sigy)/1D4,
FORMAT=(' Lgeom=',1PD11.4);
BEAM  RIGHT, KIND=electron, NP=5000, AN=an, E0=ee,
TXYS=(0,0,off/2,0),
BETA=(betax,betay), EMIT=(emitx,emity), SIGT=sigz, SPIN=(0,0,-1);
BEAM  LEFT,  KIND=electron, NP=5000, AN=an, E0=ee,
TXYS=(0,0,-off/2,0),
BETA=(betax,betay), EMIT=(emitx,emity), SIGT=sigz, SPIN=(0,0,1);
LASER LEFT, WAVEL=laserwl, POWERD=powerd,
TXYS=(-dcp,0,off/2,-dcp),
E3=(0,-Sin(angle),-Cos(angle)), E1=(1,0,0),
RAYLEIGH=(rlx,rly), SIGT=sigt,  STOKES=(0,1,0) ;
LASER RIGHT, WAVEL=laserwl, POWERD=powerd,
TXYS=(-dcp,0,-off/2,dcp),
E3=(0,-Sin(angle),Cos(angle)), E1=(1,0,0),
RAYLEIGH=(rlx,rly), SIGT=sigt,  STOKES=(0,1,0) ;
LASERQED  COMPTON, NPH=5, XIMAX=1.1*xi, LAMBDAMAX=1.1*lambda ;
LASERQED  BREITW, NPH=5, XIMAX=1.1*xi, ETAMAX=1.1*eta ;
SET MsgLevel=0;  FLAG OFF ECHO;
SET Smesh=sigz/3;
SET  it=0;
PRINT CPUTIME;
PUSH  Time=(-3*sigt-2.5*sigz-dcp,3*sigt+2.5*sigz-dcp,1000);
IF Mod(it,100)=0;
PRINT it, FORMAT=(F6.0,'-th time step'); PRINT STAT, SHORT;
ENDIF;
SET it=it+1;
ENDPUSH;
PRINT CPUTIME;
DRIFT S=0;
PRINT STAT;
PLOT  HIST, RIGHT, KIND=electron, H=En/1D9, HSCALE=(0,250.5,50),
TITLE='Right-Going Electron Energy Spectrum after CP;',
HTITLE='E0e1 (GeV); X X      ;';
PLOT  HIST, LEFT, KIND=electron, H=En/1D9, HSCALE=(0,250.5,50),
TITLE='Left-Going Electron Energy Spectrum after CP;',
HTITLE='E0e1 (GeV); X X      ;';
PLOT  HIST, KIND=photon, H=En/1D9, HSCALE=(0,250.5,50),
TITLE='All Photon Energy Spectrum after CP;',
HTITLE='E0G1 (GeV); XGX      ;'  ;
PLOT  HIST, RIGHT, KIND=photon, GEN=2, H=En/1D9, HSCALE=(0,250.5,50),
PLOT  HIST, RIGHT, KIND=photon, GEN=2, H=En/1D9, HSCALE=(0,250.5,50),
TITLE='Right-Going Primary Photon Energy Spectrum after CP;',
HTITLE='E0G1 (GeV); XGX      ;'  ;
PLOT  HIST, LEFT, KIND=photon, GEN=2, H=En/1D9, HSCALE=(0,250.5,50),
TITLE='Left-Going Primary Photon Energy Spectrum after CP;',
HTITLE='E0G1 (GeV); XGX      ;'  ;
PLOT  SCAT, RIGHT, KIND=photon, GEN=2,
H=X/nm, V=Y/nm,
HSCALE=(-5*sigx/nm,5*sigx/nm),
VSCALE=(-10*sigy/nm,10*sigy/nm),
TITLE='Right-Going Primary Photon IP Spot;',
HTITLE='X (nm);',  VTITLE='Y (nm);' ;
PLOT  SCAT, KIND=photon, RIGHT, GEN=2,
H=En/1D9, V=Sqrt[X^2+Y^2]/nm,
HSCALE=(0,250.5), VSCALE=(0,100),
TITLE='Primary Photon Energy vs. R at IP;',
HTITLE='E0G1 (GeV); XGX      ;',
VTITLE='r (nm);' ;
PLOT  SCAT, KIND=photon, RIGHT, GEN=2,
H=Xi2, V=Sqrt[X^2+Y^2]/nm,
HSCALE=(-1,1), VSCALE=(0,100),
TITLE='Primary Photon Helicity vs. R at IP;',
HTITLE='X021; X X;',
VTITLE='r (nm);' ;
PLOT  SCAT, KIND=photon, RIGHT, GEN=2,
H=En/1D9, V=Xi2,
HSCALE=(0,250.5), VSCALE=(-1,1),
TITLE='Primary Photon Energy vs. Helicity after CP;',
HTITLE='E0G1 (GeV); XGX      ;',
VTITLE='X021; X X;',;
SET MsgLevel=1;
CLEAR  LASER;  CLEAR  LASERQED;
LUMINOSITY  KIND=(electron,electron), W=(0,501D9,50),
WX=(8*sigx/2,16*sigx),WY=(16*sigy,64*sigy), FREP=90*180 ;
LUMINOSITY  KIND=(photon,photon), W=(0,501D9,50);
LUMINOSITY  KIND=(photon,electron), W=(0,501D9,50);
LUMINOSITY  KIND=(photon,positron), W=(0,501D9,50);
LUMINOSITY  KIND=(electron,positron), W=(0,501D9,50);
BBFIELD  NX=32, NY=32, WX=8*sigx, R=sigx/sigy/8,
WXMAX=16*sigx;
CFQED BEAMSTRAHLUNG, POL;
CFQED PAIR, POL;
FLAG OFF SPIN;
SET MsgLevel=0;
SET it=0;
PRINT CPUTIME;
PUSH  Time=(-2.5*sigz,2.5*sigz,300) ;
IF Mod(it,10)=0;
PRINT it, FORMAT=(F6.0,'-th time step');
PRINT STAT, SHORT;
ENDIF;
IF it=150;
PLOT  SCAT, KIND=electron, RIGHT, H=S/micron, V=Y/nm,
HSCALE=(-2.5*sigz/micron,2.5*sigz/micron),
VSCALE=(-50*sigy/nm,50*sigy/nm),
TITLE='Electron at IP;',
HTITLE='S (Mm);   G  ;', VTITLE='Y (nm);' ;
PLOT  BBFIELD, S=0;
ENDIF;
SET it=it+1;
ENDPUSH;
PRINT CPUTIME;
DRIFT S=0;
PLOT LUMINOSITY;
PLOT  SCAT, KIND=electron,
H=En/1D9, V=Sqrt[(Px^2+Py^2)/Ps^2]/mm,
HSCALE=(0,250.5), VSCALE=(0,10),
TITLE='Electron Energy vs. Angle after IP;',
HTITLE='E0e1 (GeV); X X      ;',
VTITLE='Q0e1 (mrad);GX X       ;' ;
STOP;```

Toshiaki Tauchi
Thu Dec 3 17:27:26 JST 1998