Home

User`s Manual of CAIN - JLC

image

Contents

1. e 83 2 x K n 113 lt 2 362 n 113 The formula for _ is obtained by replacing x by 1 zx 8 In the case of rejection the polarization of the photon should be changed according to eq 12 En fin 1 08361 9 fin z 6362 Es fin 3 a 1 114 am At T 2 1 a Ko3 dz V3rE Jo Xx x 1 z The error of the formula 110 does not cause any inaccuracy of event generation but causes inefficiency 68 5 10 Incoherent Pair Production In addition to the interactions between a particle and a macro scopic field such as beam strahlung and laser Compton there are particle particle interactions between e e and y that have to be simulated The present version of CAIN include the following processes Breit Wheeler v y gt e tet Bethe Heitler ytet et e7 e Landau Lifshitz e e gt e e e e Bremsstrahlung e e gt e e y These QED processes have relatively large event rates even at high energies The treatment of these incoherent processes in CAIN is slightly different from other coherent processes since the event rates of the former are usually much smaller than the latter e The parent macro particles are not eliminated nor changed after interaction The polarization change described in Sec 5 2 2 is not taken into account e More than one event may be generated in one time step because the change of parent partciles after the firs
2. 27 1 log Yin 128 where y 0 577 is Euler s constant At very high energies the number of virtual photons per electron is O 1 in spite of the small factor a r due to the factor log Yin 5 10 3 Numerical methods When Bethe Heitler and or Landau Lifshitz processes are specified by PPINT command CAIN generates virtual photons in each longitudinal slice at each time step and counts them in the same mesh as that generated by the LUMINOSITY command The number of macro virtual photons is somewhat arbitrary In the present version it is determined such that the weight of the macro virtual photons is equal to the maximum weight of the electrons in the on coming beam not equal to the weight of each parent electron in order to prevent low weight electrons from generating many photons Since the y energy spectrum is approximately proportional to log y y for small y the spectrum becomes almost flat if one chooses log y as the primary variable To account for relatively large y too CAIN adopts the variable instead of y n 5 2 4 Py y1 4c 129 y ep Z n 5 log y Vlog y 4clog y 129 Here c gt 0 is introduced so that the function G 7 defined later is finite It is chosen to be 0 2 but is almost arbitrary provided c 2 0 1 The maximum 7 is 1 a A Nmax 2 toe Umin eE log Ymin F 4c log Yin 130 15 The upper limit y 1 is not regorous The recoil effect must be taken into account wh
3. 1 lt he lt 1 Mis Final photon helicity he ho Detector helicity of the final particles See section 65 of 3 Eeri q E 2 Auz is the effective energy of initial electron in the laser field Oy Final photon angle 0 E jara 2 1 F Mm 0 2a The argument of the Bessel functions in the following expressions mapya 0 Zn 2n 1 1HE Y Un Un Number of photons per unit time is am E 00 Wwe Y ar ho he Ho Pan heie Fen M1 Fan he Fin eff n 1 137 The terms involving h and he simultaneously are ignored i e the correlation of polar ization between final particles is ignored The ultra relativistic approximation has been applied in the terms related to electron helicity he and or he Note that the electron helicity is a Lorentz invariant quantity only in the ultra relativistic limit The sum over the final electron and photon helicities gives 242 00 Ln am E ay da Fin hrheFon 138 W gt Ett Amt The functions Fkn are defined by 1 1 v Te 2 O 1 1 Z Ja 2 21 War E 139 1 vyou 1 0 2 i Pa oa 2 5 7 Lain Ta Jay 140 76 1 v y Fi 1 N 141 v 1 lv l v 2 Fy Fe A P 142 Tepe te Tey ada 24 i uv 1 Tin j 143 5 1 v n Fin Fon Fan Fan are identical to Din Dan Nin Nin divided by 8 in Tsai s paper 5 although the expressions in his paper look much more complicated
4. 2 3 5 RIGHT LEFT Right going or left going If RIGHT LEFT is specified the laser acts only onto the left right going particles to save computing time If omitted acts on both AL Laser wavelength m Paik Peak power density Watt m2 t 1 Y S Laser focal point and the time when the laser pulse comes there m e e e 3 Unit vector e along the direction of laser propagation e ee Unit vector e perpendicular to e e e e with e e xe forms a right handed orthonormal frame e and e need not be normalized exactly and need not be perpendicular to each other ex actly The component parallel to e is subtracted from e by Schmidt orthogonalization 31 02 Rayleigh length in e e direction meter Ten Cut off of transverse tail in units of sigmas Default 2 5 Oe R m s pulse length times velocity of light in power not in field ampli tude assuming Gaussian structure meter Mion Cut off of longitudinal tail in units of sigmas for Gaussian time structure Default 2 5 Tidi Total pulse length for trapezoidal longitudinal structure meter Either one of SIGT or TTOT must be specified 19 Tedge Longitudinal edge length meter for trapezoidal time structure The flat top length is then Tiot 2Tedge Default 0 i e rectangular shape 1 2 3 Stokes parameter defined in the e e e frame Default 0 0 0 See Sec 5 7 1 for more detail 3 5 LASERQED Defines
5. 2z Fe ate e sin 0 h cos 0 1 e JA 82 k h CE 83 w Note that 3 does not appear here because it is based on the scattering plane and there fore disappears after integration over the azimuthal angle The function F Z satisfies 0 lt F lt 1 for any Z and A and is O 1 except when h is close to 1 and A is extremely large The Function F Z is plotted in Fig 6 la DE 1 See i A 107 100 1000 Figure 6 Function F Z for h 0 1 for various values of A The total crosssection for given initial momenta and polarizations is given by E Tiot Aur 5 Fin 84 59 1 4 8 1 8 1 2 a Sea Rees Al ea H A Ni x RATIT AA 145 La spl 85 1 0 L 1 l 1 L L J a N 0 87 yw E Figure 7 Function S F Fint A for h 0 1 as a ls function of A Fine is less y than unity and is O 1 un ies a less h is close to 1 and A ee bx is extremely large id ES i 0 073 4 0 had ar ET Tat PAG 6 1x10 1x10 1x10 1x10 1x10 1x10 1x10 1x10 1x10 A Let us driefly describe the algorithm of event generation 1 Compute Fin and multiply it to Pp Reject if still r gt Po Compute the total event rate M in the given time interval using Gto without the factor Fin Since Fint lt 1 this is an over estimation of the rate If P is too large divide the time interval by an integer N and repeat the following procedure N times Generate a random number r uniform in 0
6. 4b where the upper lower sign applies to w w2 and fu i Hvab f with P being the antisymmetric tensor of rank 4 The classical spin motion of electrons is given by the Thomas BMT equation ja uP FF cos Apt taft ro 6 dS e 1 E T oat DBr a DB a eE xS 33 where a is the coefficient of anomalous magnetic moment and Bz e B e Br B B ex Bxe 34 When the field is very strong a is different from the well known value a 2r O a but is a function of the field strength characterized the parameter Y e T zaV Fp GV Er pxB El 35 The functional form of a Y a 0 is shown in Fig 2 Simple polynomial approximations are used in CAIN 48 Figure 2 Field dependence of the anomalous magnetic mo ment of electron pS os e 1x107 NS 5 4 2 Equation of motion under PUSH command 1x100 1x10 1x10 Solving the equation of motion in PUSH command is much more complicated because of the possible presense of the beam field The equation of motion is in general written in the form dr B B p oa v p nap dp F a r p 36 37 The force F includes the beam field and the external field The p dependence of F comes from vx B although very weak in the case of the beam field Given the initial variables ro po a simple approximation after the time interval At is Fo Pi ry Fy p r F ro po py
7. 1 Reject if r gt Po Otherwise accept Note that the Lorentz transformation of is not needed for the computation of h because gt is Lorentz invariant Also note that input is defined already in the rest frame of electron Only the Lorentz transformation of k is needed Generate two random numbers Z and ra in 0 1 Repeat this step until ra lt F Z is satisfied Once or twice repetition is normally enough unless h is close to 1 and A is very large Compute w from Z Generate the azimuthal angle compute the final polariza tion if needed and go back to the laboratory frame In this step many Lorentz transformations are needed 5 7 3 Quantum Electrodynamics Involving a Strong Laser Field When the laser field is strong the simple formulas of Compton Breit Wheeler can no longer be used The laser strength is characterized by the parameter 86 c AL ger 60 where Az is the laser wavelength 27 in meter m the electron rest mass in eV c c the velocity of light in m s y 4r x 107 and P the power density in Watt m When lt 1 the simple formas are enough but as becomes large the probability of absorbing more than one photon in the laser field cannot be ignored When gt 1 the constant field approximation becomes good If lt O 1 the expansion in terms of the number of absorbed photons n shows good convergence The expansion takes a relatively simple form when the lase
8. 3 0 for nz and ny and 2 5 for n and ne For transverse variables the cut off is done in the action variable which means J e lt n 2 i x y O or 1 There is a subtle problem on how to take into account the Gaussian cut off nz ny nz in the macro particle weight CAIN throws away the random numbers outside this range and generates exactly N macro particles This means some fraction outside the region is moved inside Therefore if the simple weight N N is assigned to macroparticles ig 1 the effective particle density would become slightly larger than the physical value although the sum of the weight is equal to N If one is interested in the quantities related to the density such as luminosities this would cause an overestimation When i 0 default a correction factor is multiplied to the weight such that the real particle density becomes correct In this case the sum of the macro particle weights is less than N When the default n s are adopted for example the correction of the weight amounts to 3 4 In most cases 7 0 will be better Uniform transverse distribution Default is Gaussian x y distribu tion is a uniform ellips with radii 20 20 where 0 Veb j 2 y In this case the beam is parallel in spite the finite emittances are spec ified The emittance and beta are only used to define oz ALPHA and GCUT are not used 15 TUNIFORM EUNIFORM Bs Oy Va Py Ma Ny te de dt Pry CasGy
9. 3 10 WRITE PRINT so saerad eane a aaa e a e a he a A a ai AA ee a a a ee ee Pe ee ee Se bo 2 A va oe ats gira Bk AE SOFIE los 3 8 ne cia Se a Sk ee BSE ee RS ci ee 3 20 HEADER echa aS gcd bh a ek oe Show wad bow a ah oe Gb eo ae bE 3 21 STORE and RESTORE 0000 e a E e en ee OR abr ai E es oe ees ee ch hte one eae ce Merwe he 329 END sos cy he A a es es ee ee 4 Installation 4 Directory Str ctur 2 s ses wa k a a bs Leow 24 bees ee 4 2 System Dependent Subroutines 2 442 245 cits c0 588 bes 4 3 Storage Requirements e s 2 4 es o Be amp Oe Oe EG MEE ee 4A Compil lion ses es eee bol oe e eee ee bot ee SS i Adi RUR WEA a AAA AA A A oe Oe ee Physics and Numerical Methods 5 1 Coordinate aio ee Se in a e ee me ee SE 5 2 Particle Variables ar bey SoS ee a Se ERE S 5 2 1 Arrays for Particles ick eae RO eR ee aa RES 5 2 2 Description of Polarization 2 4 68 2a ee ee eee 5 3 Beam Parameters ooe enr 6 a wp 424 9 6 4 oud Sone de bE ee ee eS 54 Solving Equation of Motion 4 42 62 tfee5 bbe 4 e444 5 4 1 Equation of motion under DRIFT EXTERNAL command 5 4 2 Equation of motion under PUSH command poo Fo o s Joso ee ee He ee Se eee oa bo eee Se ee 5 5 1 Luminosity Integration Algorithm 4 4 lt 6 4 so 4 ew ae wm D2 Polarizati n lis uretra ai 6a A 5 Beam Field 5424 42 6264 pee POR oe ee RES KEE oe OS Oe leas Se eS Eek EO ee Ee SD A Daser Geometiy ss soss ee od t sosa w Ee be
10. 44 45 56 57 60 61 Figure 3 Bin PUE 34 35 38 39 50 51 54 55 bering for luminosity 32 33 36 37 48 49 52 53 i j i sa miep ratio Exam 10 11 14 15 26 27 30 31 ple with n 8 and the 2 3 6 7 double sized bi a 8 9 12 13 24 25 28 29 eae ES 2 3 6 7 18 19 22 23 0 1 4 5 16 17 20 21 If the number of macro particles in any of the neighbouring 4 bins are less than some number Nmin CAIN adopts 5 for both beams then sum these numbers and put the sum into a larger bin 2A 2A For the example in Fig 3 the sum of the bins 12 13 14 and 15 in the figure on the left corresponds to the bin 3 on the right Otherwise add N 1 ya into the luminosity sum This doubling of the bin size is repeated so long as NO lt Nin In order to make this algorithm efficient the bin numbering system is a little complicated Instead of using two indices i y the bins are numbered as in Fig 3 With this numbering the sum of neighbouring bins can be simply written as n n n n n 2 ak Nara Nikt Nik 3 No 41 where N is the number of particles in the k th bin k 0 1 2 n 1 in n x n bin system 5 5 2 Polarization In the present version of CAIN the particles are either photon or electron or positron They all have two polarization eigenstates and can be specified by three real numbers the Stokes parameter 1 2 3 for photons or the polari
11. BeamMatrix Let us take SigX as an example SigX j k j 1l or 2 or 3 k 1 or 2 or 3 returns the horizontal r m s size of right going j 1 or left going j 2 or both j 3 of the photon k 1 or electron k 2 or positron k 3 beam If there is one more argument like SigX j k 50 11 then the particles are restricted to those in the region sy Smesh 2 lt s lt so Smesh 2 The variable Smesh must be defined before BeamMatrix requires two more arguments BeamMatrix a b 7 k s0 1 lt a b lt 8 The returned value is the average of 1 1 where r T X Y S En Px Py Ps for a 1 to 8 In units of m and eV or eV c Test particle variables The coordinates and the energy momentum of the test particles can be retrieved by the functions TestT TestX TestY TestS TestEn TestPx TestPy TestPs The calling sequence is for example TestX name or TestX n where name is the character string for the particle name and n is an expression representing an integer 99 lt n lt 999 See Sec 3 3 for the test particle name Luminosity related function There are functions related to the luminosity Lum LumH LumP LumW LumWbin LumWbinEdge LumWH LumWP LumEE LumEEbin LumEEbinEdge LumEEH LumEEP See Sec 3 9 for definitions for these functions Special functions Bessel function Jp n must be an integer BesJ n x Bessel function J x n must be an integer DBesJ n x Derivative of Bessel function J
12. ENDPUSH will track the beam over the specified time range in 200 steps It is better to turn off the echo before running You can get the transient information e g plot the beam profile during collision by inserting commands PLOT WRITE etc between PUSH and ENDPUSH If you want the bamstrahlung you have to insert 4 CFQED BEAMSTRAHLUNG before PUSH After ENDPUSH you can plot generate TopDrawer input file the ete dif ferential luminosity by PLOT LUMINOSITY KIND 2 3 You can also plot particle distribution For example for plotting the photon KIND 1 energy spectrum PLOT HIST KIND 1 H En 1E9 HSCALE 0 ee 1E9 50 TITLE Beamstrahlung Energy Spectrum HTITLE E0G1 GeV XGX dl H defines the horizontal axis energy in units of GeV You may want various outputs without repeating the time consuming calculation You can do the following After ENDPUSH store all the variables and the particle data STORE FILE aaa WRITE BEAM FILE bbb and restore in another input file RESTORE FILE aaa BEAM FILE bbb PLOT desir E y y collider is more complex Three steps e y conversion of right going electron that of left going electron and y y collision are needed You can do these steps in one job or in separate jobs using STORE WRITE and RESTORE BEAM FILE commands The attached example cain21e in NLCggCP i executes the two conversions and NLCggIP i the collision at the intera
13. LUMINOSITY KIND ky k2 FILE f VLOG PERBIN PERHVAR k1 k2 Define right and left going beams When HELICITY operand has been specified in the LUMINOSITY command all the 5 spectrums unpolarized and 4 combinations of helicities come out in 5 separate plots 33 VLOG Log scale of vertical axis The horizontal axis cannot be log scale PERBIN Luminosity per bin 1 cm sec bin is plotted PERHVAR Luminosity per unit increment of horizontal axis energy is plotted 1 cm sec eV Default is PERBIN More flexible plot is possible with the complicated syntax Syntax PLOT LUMINOSITY KIND ki k2 V f NONEWPAGE VSCALE Ymin Ymax VLOG PERBIN PERHVAR TITLE top_title HTITLE bottom_title VTITLE left_title FILE f f Defines what is plotted You can use the following variables LO unpolarized luminosity Ln n 1 2 3 4 helicity luminosity Lij i j 0 1 2 3 general polarization luminosity These are in units of 1 cm s bin Or 1 cm s eV if PERHVAR is speci fied Ln Lij is allowed when HELICITY ALLPOL has been specified in LUMINOSITY command The operands KIND PERBIN PERHVAR are the same as in the first syntax The rest is the same as in PLOT SCATTER except for V f The titles are automatically created in the first syntax but not in the second Plot charge distribution and beam beam field The charge distribution and the beam field data for beam beam interaction are com
14. Linear polarization of final photons in the linear Compton scattering was wrong 1 3 used to come out as amp 3 Fixed Basic Grammer of the Input Data System of Units MKSA is used throughout The particle energy and momentum are eV and eV c respec 2 1 tively An exception is the luminosity which is expressed in cm sec The time e g the laser pulse length time coordinate of particles etc is always expressed in units of meter by multiplying the velocity of light Following this logic more faithfully CAIN should have adopted the word SYNCHROTRONRADIATION instead of BEAMSTRAHLUNG 2 2 Characters Upper and lower case alphabets are distinguished The following characters have special use se 4p TALES Also the following characters are used in mathematical expressions pa E JO Ss LE tods 2 3 File Lines and Command Blocks The input data is a collection of file lines Upto 256 characters in a line are read in This limitation can be easily changed by modifying the parameter statement in the main program If a character is encountered the whole text after it to the end of the file line is considered as a comment unless the is in a pair of apostrophes Apostrophe pairs must close within a file line except for comment parts Apart from the above two points the concept of file line is irrelevant Therefore for example continuing the two file lines will give the same
15. OY Eb eR e 5 7 2 Linear Compton Scattering lt 4 ooo be 48 SHES 5 7 3 Quantum Electrodynamics Involving a Strong Laser Field oe Beamstrabhl ng 2244424658 2 2B eRe SRR EERE ME RO OL Teast formulas o a serra E ee e a 5 8 2 Algorithm of event generation 0 2000 Og EOI e eR oe A e hee E oe GS CES i a 5 8 4 Enhancement factor of the event rate 5 9 Coherent Pair Creation i 2 4 2s 44 24 See pe ede eG a OO 5 9 1 Basic formulas va eo ee De eee he we os oe 4 oe 5 9 2 Algorithm of event generation 2000 5 10 Incoherent Pair Production o 5 10 1 Breit Wheeler Process lt a ea ep eae eee 5 10 2 Virtual almost real photon approximation 5 10 3 Numerical methods lt o at 2 4 6s eed 6 0 eels ee eee ee Subroutine Package for Nonlinear Laser Interaction All Compton Process es ies ed 655845 428 G54 8 ALL Formul s s gas k Bs och Bae eo ee ESS BO he A A L2 GA oe aso HO cme eH ce eh ke Aw Sh ae GS Al Algorithm e IR AAN AR e Re A 2 Breit Wheeler Process ia sai ma Ad RS ei DR HD A21 WARIS eo ab Sh ee Doe a A22 AI Ss Be a ee ee ee a 39 39 40 40 41 41 42 42 42 42 43 46 48 48 49 50 50 ol 92 56 56 57 60 62 62 62 64 65 66 66 67 69 69 71 72 A23 Algorithm ss sa tee 6 ad Tew Hed A Oe eer 84 1 Introduction CAIN is a stand alone FORTRAN Monte Carlo code for the interaction involving high energy electron positron a
16. Roll angle of the beam in the z y plane radian Polarization vector Default 0 0 0 Note the sign of for left going particles In the case of photon beams these are the Stokes parameter 1 3 The basis vector of the Stokes parameter is e e e 16 where e is the unit vector along the particle momentum el is the unit vector along e e e e and e e xe See Sec 5 3 for rigorous definitions Read particle data from a file Syntax BEAM FILE f filemame N N NAMELIST En File reference number file name Existing file name Must be enclosed by apostrophes Either full path or relative path Note that CAIN is run in the directory cain exec The file is opened with the reference number 99 and is closed immediately after reading Np Maximum number of macro particles to be read in from file If 0 non active Default 0 NAMELIST FORTRAN NAMELIST format Othewise the standard format Reading file stops when one of the following conditions are satisfied e N Reached when N gt 0 e A file line found whose first three characters are END in the case of the standard format Or END TRUE found in the case of the NAMELIST format e End_of_file detected In the case of the standard format the file is assumed to be created by the following FORTRAN statement WRITE 12 16 1X A4 1P12D20 12 KIND GEN NAME WGT 1 TXYS I I 0 3 EP I I 0 3 S
17. Then the expansion of is Ob o A IS m 1 u uo iv Qc 60 T a Es 3 60 62 2 Seeing sinh m 1 u iv On rd a ern re ae Actually there is a finite relation between QZ and Q 1 7 2 m r 2ro MARA Qo e Mw y Ey e 62 r 0 r f The formula converges if u gt uo which corresponds to the region C and B in Fig 5b The truncation of the series is defined by the operand NMOM of the command BBFIELD common to the two types of expansions for simplicity dxdy 61 5 7 Laser 5 7 1 Laser Geometry Define a coordinate system attached to a laser Let e be the unit vector along the direction of propagation and introduce a unit vector el perpendicular to e and another unit vector e e xe The three vectors e e e form an orthonormal frame Define the components of these vectors in the original frame ex ey es as Vir Vio Via em Vay e2 Vao a eb Vaz 63 V31 V3o V33 Then V Vi is a 3 x 3 orthogonal matrix Let 7 be the spatial coordinate in this frame Define the origin of u uz uz as the laser focus and let xo yo 80 be its coordinate in the original frame and ty the time when the laser pulse center passes the origin Introduce a time coordinate 7 whose origin is tg Now the relation between E x Y s and T E n is FH t t 64 E Va Va Vai To n Vie Va Vz Y yo 65 Via Va V33 S SQ 56 A plane wave is written in the form
18. accept 13 d Calculate y using eq 129 and w Ey If LOCAL option is specified stop here and return r 0 0 Otherwise calculate the value of V y from G using eq 132 e Generate a random number r3 0 1 and solve the equation r3 V x V y with respect to x This is done by using a table of inverse function of V f Compute p A 2 y A being the Compton wave length g Generate a random number r4 0 1 and compute the photon coordinate r pcos 2714 psin 2714 74 A Subroutine Package for Nonlinear Laser Interac tion For the nonlinear laser electron and laser gamma interactions CAIN uses the subrou tine package nllsr This appendix is written for the description of the package Some arguments of subroutines haven been modified when installed into CAIN these are not reflected here Also note that the notation of some variables is different Included items in nllsr are e Compton scattering e laser e y and Breit Wheeler scattering y laser e t e7 with nonlinear effects with respect to the laser intensity e The laser is circularly polarized Longitidinal polarization of all the particles except that of the final electron of Compton scattering is included The laser intensity paramater must not be too large because the multiple photon expansion is used When is large the computing time and the storage requirement will be enormous In both the Compton and Breit Wheele
19. e 1 5 Total number of pair electrons per unit time summed over the positron polarization is 242 co 1 zn es gt JT dalGan huh Gon Tel Gon hyGin 152 a E aa Sum over final electron polarization gives 242 00 1 an e UE da Gin hz ho Gan 153 W n l n gt 14 2 72 1 2 1 2 2 2 Gin 2 3 2u pat 2 154 1 u 2 2 1 U 2 2 Gan 2u 1 5 Jn 1 Jasa 156 1 Gan za u 20 44 da m aa 157 These formulas can be obtained from those of Fx by the replacement w gt WwW E gt hie hee tig gt hs ee This implies v gt 1 1 2u Un 4XUn 159 v Un gt Una Zn gt Zn For convenience we have changed the sign as Fin gt Gin Fan gt Pla Fon gt tei Fin gt Gan 160 81 For given x and n the final momenta are given by p zrk ha 2 kr my 4nna 1 x 1 e1 cos ez2sin 161 2 p 1 r k pa k my 4ngx 1 x 1 e1 cos p e2sin d 162 Here is the azimuthal scattering angle in a head on frame and s These vectors satisfy 0 Ese keki kxkzr k k n _ Epvopegh Ky L L _ _Ewapegh hy _ A pis elute koee C ke kp e 0 eye 1 G 1 2 erez 0 16a A 2 2 Usage Initialization Gkn are 3 argument functions In order to avoid discontinuities due to the n photon threshold following variables in addition to are used as the independent variables inste
20. echo etc Sec 3 1 SET Define user variables Sec 3 2 BEAM Define particle beams Sec 3 3 LASER Define lasers Sec 3 4 EXTERNALFIELD Define external static electromagnetic field Sec 3 8 LASERQED Parameters for the laser particle interaction Sec 3 5 CFQED Parameters for the interaction between particles and constant electro magnetic field beamstrahlung and coherent pair creation Sec 3 6 BBFIELD Method of calculation of the beam field Sec 3 7 PPINT Incoherent particle particle interaction Sec 3 10 LUMINOSITY Define what sort of luminosities to be calculated Sec 3 9 LORENTZ Lorentz transformation Sec 3 13 DRIFT Move particles in vaccuum or in external field Sec 3 12 PUSH ENDPUSH Loop of time steps Sec 3 11 DO ENDDO Do loop Sec 3 14 IF ELSE ENDIF If block Sec 3 15 WRITE PRINT Print on screen or on a file Sec 3 16 PLOT Plot using TopDrawer Sec 3 17 CLEAR Clear data or disable commands Sec 3 18 FILE Open close files Sec 3 19 HEADER Define the header for graphic outputs Sec 3 20 STORE RESTORE Save recall variables and luminosity values Sec 3 21 STOP Stop run Sec 3 22 END End of the input file Sec 3 23 The command names may be shortened if not ambiguous Therefore LASERQ is equiv alent to LASERQED This rule applies also to the operand keywords of all commands But does not apply to parameter and function names 2 5 Expressions In the example in Sec 1 1 the right_hand_sides of
21. exclusive choice of one of the items Thus A B means to choose either one of A or B or to omit both Note that and are different The dagger f indicates that the operands to the left of it are positional operands The quantities printed in math font in command syntax can be expressions 13 3 1 FLAG Set flag example FLAG ON ECHO OFF SPIN The keywords ON and OFF act until the opposite one appears ON is the default after FLAG Existing flags ECHO input data echo default 0N SPIN include spin calculation default 0N Sorry spin calculation cannot be avoided in the present version 3 2 SET Defines parameters Syntax SET p a p a p New or old parameter name Upto 16 characters consisting of upper lower case alphabets numericals and underscore _ The first character must not be a numerical Unchangeable predefined parameters Pi Time etc and the predefined function names Sin etc have to be avoided All the predefined parameter names and function names start with an uppercase letter Therefore a user parameter starting with a lower case alphabet will never hit the predefined ones a An expression See Sec 2 5 3 3 BEAM Defines a beam Append particles to the existing list There are two ways to create a beam one by specifying the Twiss parameters etc and the other by reading data from a file Definition by Twiss parameters Note that the beam is defined on a plane s constant r
22. fields 12 The formulas bellow adopt the kinematics in a frame where the incident particle energy is much higher than electron mass and collide with the laser head on Actually CAIN is valid in more general case See Sec A 61 E Minimum energy of the final electron for given n 1 En 5 1 n p ra e 90 Grn Functions involving Bessel functions See Sec A 2 for the definition When NPH gt 1 is specified in LASERQED command the above formulas are used with the terms upto n NPH See Sec A for the algorithm of the event generation 5 8 Beamstrahlung 5 8 1 Basic formulas When the orbit of a high energy electron positron with energy Ey mc is bent by a magnetic field B or by an electric field with the curvature radius p the critical energy of synchrotron radiation is given by 9 AC B E D Tag E TE T ae Pp Ba 91 NI w Esch where Ac is the Compton wavelength Bsen m e 4 4 x 10 Tesla is Schwinger s critical field and Esen cBsen 1 32 x 10 V m The energy spectrum of emitted photons is given by the Sokolov Ternov formula Radiation angle is not included in CAIN All the photons are emitted forward The number of photons per unit time in the interval x dx of the energy fraction x E Ep 1S 5 ar T dW Foodz Foo Kis 3 z Ko 3 z 92 an 00 00 5 3 2 Iz 2 3 2 92 Here a is the fine structure constant and E 1 _ Esp 1E 1 z 93 CE L1 EJ
23. for Breit Wheeler are cvalculated using the virtual photon approximation The circular polarization effect of the initial photons is included in the Breit Wheeler process but all other polarization effects are ignored Particles created by incoherent processes do not contribute in creating the beam field Also note that the parent macro particles do not change by particle particle interaction All these come from the actual situation in linear colliders where the incoherent particles are much less in number compared with the initial particles Syntax Specify virtual photon options PPINT VIRTUALPHOTON LOCAL FIELDSUPPRESSION EMIN Epn LOCAL Flag to adopt local virtual photon i e to ignore the effects due to the finite transverse extent of virtual photons Default is non local FIELDSUPPRESSION Flag to include the virtual photon suppression effect due to strong external fields normally the beam field by the on coming beam This can be effective when LOCAL is not specified See section 3 4 of 6 De fault does not include this effect pe Minimum energy of final electron positron energies in eV Default is twice the rest mass of electron 1 022 E6 This parameter is not directly related to virtual photons but included here because it is common to all the processes The purpose of this parameter is to save computing time The creation of pairs does not take too much computing time but to track extremely low energy pa
24. in the 7 7 coordinate E RE e M7 66 where k 1 X 27 Az is the wave number n is the unit vector along the propagation direction of the wave component and Ey is a complex vector perpendicular to n A laser beam is considered to be a superposition of plane waves with slightly different n and k If the distribution of n around e and that of k are Gaussian and if one ignores the n dependence of Eo the laser field can be approximated by E REg Ae 67 where AO A cee E E i C r yi C B1 y1 0 82 ABi 1 C G1 APB2 1 G2 202 68 where i 1 2 is the Rayleigh length and o is the r m s pulse length The wave front is given by the contour of k If one defines n by kn V kf 8 n is nearly a unit vector and approximated by Ho eb ce ce 69 Vvl d e N nt e cr CRO 79 In CAIN when the relevant particle is at t x y s or at 7 7 in laser coor dinate the laser field is considered to be locally a plane wave with the power density A T n C Ppeak Wave number k and the propagation direction n n There is some problem on the polarization because eq 67 does not exactly satisfy the Maxwell equation For simplicity the basis e e e e n for polarization is defined in the following manner e is the unit vector along e e n n and e n xe This is irrelevant if only the longitudinal polari
25. mesh is used for calculating the field In other regions the methods mentioned above are used A Direct sum of Coulomb force 54 Figure 5 Regions for cal culating the beam field 0 LA 0 A Since the sum is time consuming this is used only in region A where two other methods fail to converge The method is trivial and given by o oa a Uy yy UR ai e However this formula is not accurate when the bin size ratio A A is far from unity It is needed to take average over a bin when the bin is close to the field point x y CAIN makes a table for the Coulomb force by a bin A Ay for faster computation B Harmonic expansion in polar coordinate In the region B the following formula is used 09 ii ar y 2 om 69 ee l x iy n mle E dray 56 Here ro is ae introduced for avoiding overflow underflow The formula is valid for r y gt r where Tmas w2 we 2 is the maximum radius of the mesh region max C Harmonic expansion in elliptic coordinate When w gt wy otherwise exchange x and y the elliptic coordinate u v defined by x f coshucosu cosh u iv x iy f y fsinh usin v u gt 0 0 lt v lt 2r an 55 is used Here f is chosen as w w2 2 58 The maximum of the radial like coordinate u in the mesh region is 1 Wy W joe gt 59 uo 2 08 We Wy which is taken at the four corners
26. must not be identical to some keyword Here however there is an inconsistency of grammer If you define a parameter with the name ST for example PRINT ST may be understood as printing the parameter or printing the statistics unless the keyword PARAMETER is explicitly written This can be avoided by writing PRINT ST because ST is not a keyword but is an expression actually identical to ST 4 A known bug WRITE i 1 2 FORMAT nothing will not work as you expect in FORTRAN 31 3 17 PLOT Plot using TopDrawer Histogram of particle data Syntax PLOT HIST NONEWPAGE RIGHT LEFT KIND k k k2 GENERATION reln INCP H f HSCALE min maz gt NMbin HLOG VLOG TITLE head_title HTITLE bottom_title VTITLE left_title FILE f NONEWPAGE Do not insert NEWFRAME of TopDrawer so that the figure is written on the previous plot on the same file This makes sense when the new plot has the same scale as the previous plot RIGHT LEFT Select right left going particles only k k1 k2 Select photons k 1 electrons k 2 positrons k 3 only rel Relational operator One of lt gt lt gt lt gt lt gt gt lt n Generation Select particles whose generation satisfies the relation ngen rel Ws INCP Include particles created by incoherent incoherent processes only Otherwise normal particles only Ta An expression defining the horizont
27. only Maximum probability of events per one time step If the computed probability exceeds Pmax CAIN of present version stops with a message Defines a function in order to enhance a part of spectrum It is defined as an expression containing Y as the final energy parameter 0 lt Y lt 1 Its value must be gt 1 for 0 lt Y lt 1 Generally speaking Y close to 1 generates low energy charged particles For example 20 ENH 1 Step Y 0 8 Y 0 8 x 10 will enhance the events with Y gt 0 8 by a factor upto 3 at Y 1 In the program the real spectrum function is multiplied by fenn and when an event is generated the created particles are asigned a weight 1 fenh Note that fenn slightly larger than 1 is useless even harmful because a small fraction 1 1 fenn of the parent particle will remain as a macro particle causing a waste of computing time In the example above fenn 1 exactly for Y lt 0 8 This function is used only during the initialization by LASERQED command Therefore if the expression contains user defined parameters their values at the time of LASERQED command are used Changing them afterwards will not affect the computation See Sec 5 7 3 and Appendix A for more detail 3 6 CFQED Constant Field QED i e the beamstrahlung and coherent pair creation Both the effects of the beam field and the external field are included The angular distribution of the final particles is not included When the polarization f
28. particles respectively The crosssections for four possible helicity combinations are Oo 900 Tt 930 903 033 04 000 030 003 033 45 y O00 930 903 033 O0 O00 930 903 033 The number of events is written as N o lLi 0 ja po Oy Ly 0 L 46 with L4 Lo L30 Los Las L Lo L30 Los Las 47 L4 Lo L30 Loz L33 Las 3 Loo L30 Los L33 The total luminosity is Loy Note that the helicity is 2 for photons Thus if both beams are photons the above expression becomes 2 Loo Loo Loz L22 L Lo L Loz 22 48 L4 Lo L Loz 22 L 4 Loo L Loz L22 The helicity luminosity is calculated by LUMINOSITY command by specifying the operand HELICITY If you want all 16 combinations or the linear polarization effects you need to specify ALLPOL operand For electrons the expression 47 is not exact because the helicity is defined as C p p rather than 5 6 Beam Field One of the basic assumptions of CAIN is that the most particles in the beams have high energy and are almost either right or left going This assumption leads to the following facts 52 e A field due to a particle is almost concentrated in a transverse plane with the same s coordinate of the particle because of the Lorentz contraction e If the e
29. range in eV and ny is the number of bins If Wmin Wmaz is not given the center of mass spectrum is not calculated Default for npj is 50 Wj Nbin Define the center of mass energy bins in the case of non equal spaced bins Nain is the number of bins Wo is the lower edge of the first bin and W is the upper edge of the last bin np must be gt 3 in order to distinguish from the equal space case Eimin Eimas a Eten Earn AN 2 D differential luminosity dL dE dE Emis Eimas is the range in eV and njpin is the number of bins j 1 for right going beam and j 2 for left going beam Both or none of E1 and E2 have to be specified If none is specified 2 D luminosity is not calculated Default for ni bin is 50 Eij Nibin 1 2 Define non equal spaced bins Similar to the case of the center of mass energy Wy Wy Full horizontal vertical width of the mesh region m The origin is adjusted automatically from time to time Wam Wym Maximum width of the mesh region m If not given w w is used throughout If given an increased size upto Wim Wym is used when a significant particle fraction gets out of the mesh region defined by wz Wy The number of mesh points is determined automatically HELICITY Calculate luminosity for every combination of helicity ALLPOL Calculate luminosity for all possible 16 combinations of the spins see Sec 5 5 2 for detail 23 All the LUMINOSITY commands m
30. region when the tail gets out of the laser region If you use PUSH command you have to track the beam till the end of the magnetic field region Instead you can do more elegantly BEAM Define electron beam LASER Define laser LASERQED Define laser QED parameters PUSH Start push without magnetic field ENDPUSH End push EXTERNALFIELD Define external field DRIFT S s3 Pull back the beam to the plane s3 DRIFT S 54 EXTERNALFIELD Calculate the field effects 21 3 13 LORENTZ Coordinate transformation shift of origin rotation Lorentz transformation of particle coordinate energy momentum polarization etc Using this command you can trans form a collision at an angle into a head on collision Syntax LORENTZ TXYS At Av Ay As ANGLE BETAGAMMA AXIS 07 0y 05 EV eur vy vs NOBEAM RIGHT LEFT KIND k k1 k2 EXTERNALFIELD LASER At Az Ay As Shift of origin m Spacial rotation angle radian rotation of the coordinate axis Pa Lorentz boost parameter 3 x y Boost of the coordinate axis ax 4y as Unit vector along the rotation axis Need not be normalized exactly Cun Cuy Cvs Unit vector along the boost direction Need not be normalized exactly NOBEAM No transformation of particles If specified RIGHT LEFT KIND operands are ignored RIGHT LEFT Select right or left going particles only If omitted both are trans forme
31. some operands are written in the form of mathematical expressions In general expression is a mathematical expression which is almost identical to FORTRAN floating expression It may contain e Literal numbers such as 2 2 0 3E 5 etc To indicate the exponent any of E e D d Q q may be used Note that there is no integer expression so that 2 is identical to 2 0 e Operators Note that power is indicated by instead of e Parenthesis 4 Must match e Pre defined parameters There are three types of predefined parameters The first type is the universal constants that never change Pi E Euler Deg Cvel Hbar Hbarc Emass Echarge Reclass LambdaC FinStrC T E 2S Euler s constant yg 0 577 0 0174 7 180 You can write e g 10 Deg where the randian unit is required Velocity of light m sec Planck s constant Joule sec Planck s constant times the velocity of light eV m Electron mass eV c Elementary charge Coulomb Classical electron radius m Compton wavelength m Fine structure constant The second type is the parameters whose values are determined by the program Users cannot change their values but can refer to T X Y S Running variables for particle coordinate m En Px Py Ps Running variables for energy momentum eV eV c The energy SX Sy 9S is En but not E Electron positron spin Helicity may be written approximat
32. the center of mass frame The latter is given by w w k w 1 ka w 2w wi w2 e3 70 where w k are the energy momentum of the photons in the original frame The value of sin 0 should be computed from b sinh z 9 A sin 0 _ _ sin gt 0 b2 cosh z 20 rather than from cos 0 because the latter is usually very close to unity when w is much larger than the electron rest mass f Then the momentum of the electron in the original frame is calculated by 1 pc pe 1 k 1 k P 5 Jka ka Pit E a 122 2w Wy We 2w where k k ky Note that 1 plc w must be computed from e cosh z in order to avoid round off errors g The momentum of positron is computed from the momentum conservation 5 10 2 Virtual almost real photon approximation To treat the Bethe Heitler Landau Lifshitz and the Bremsstrahlung processes the so called almost real photon approximation or equivalent photon approximation or Weizacker Williams approximation is employed An electron is accompanied by virtual photons which look like real photons at ultra relativistic limit They interact with on coming real or virtual photons incoherently Thus the Bethe Heitler and Landau Lifshitz processes above are reduced to the Breit Wheeler process and the Bremsstrahlung to the Compton process Bethe Heitler y e Het Landau Lifshitz yy 9 gt eT Het Bremsstrahlung e yYoe y wh
33. the method and parameters for the calculation of the interaction between lasers and particles Syntax LASERQED COMPTON BREITWHEELER NPH n NY n NXI ng NLAMBDA n NQ n XIMAX max LAMBDAMAX Amas ETAMAX max PMAX Pmas gt ENHANCEFUNCTION fenns COMPTON BREITWHEELER Specifies which parameters to define here Nph me RA 3 max Aa Nmax Pmax Tihs Maximum number of laser photons to be absorbed in one process If lt 0 turn off Compton or Breit Wheeler If 0 use linear Compton Breit Wheeler formula If gt 1 use nonlinear formula Note that npa 0 and npn 1 are different The former is the limit of 0 which contains np 1 term only whereas the latter is a truncation of the exact series with respect to npa When npa 0 none of the variables ny ne NA Ng maz Amaz mus are needed When npn gt 1 only longitudinal polarization is considered and the lasers must be circularly polarized by 100 i e amp 3 0 amp 1 Number of abscissa for final energy Default 20 Number of abscissa for parameter Default 20 Number of abscissa for A parameter Applies to Compton case only De fault 20 Number of abscissa for g parameter Applies tp Breit Wheeler case only De fault 50 Maximum value of for the table Maximum value of for the table Applies to Compton case only Maximum value of 7 for the table Applies to Breit Wheeler case
34. x Modified Bessel function K and its integral In all the following functions the last argument k must be 1 or 2 When k 2 the output is the function multiplied by e The last argument may be omitted equivalent to k 1 BesK v x k Modified Bessel function K x x gt 0 DBesK v x k Derivative of the modified Bessel function K x x gt 0 BesK13 1 k Modified Bessel function Xy 3 w a gt 0 BesK23 1 k Modified Bessel function Ka 3 x gt 0 BesKi13 x k Integral of Modified Bessel function Ki y3 x gt 0 See eq 94 for the definition of Ki BesKi53 x k Integral of Modified Bessel function Kis 3 x gt 0 Functions for beamstrahlung and coherent pair creation 12 FuncBS 1 Y Beamstrahlung function Foo defined in eq 92 x 0 lt x lt 1 is the photon energy in units of the initial electron energy Y gt 0 FuncCP x x Spectrum function Fop of coherent pair creation defined in eq 108 x 0 lt x lt 1 is the positron energy in units of the initial photon energy x gt 0 IMtFCP y 0 Integral of FuncCP x x over 0 lt x lt 1 The total rate of coherent pair creation is given by multiplying by am vV3T Ez See Sec 5 9 k must be 1 or 2 can be omitted if 1 If k 2 the function is multiplied by exp 8 3 x 3 Commands A command in general has the following structure command_name OPr OP2 ud OPn A command name is a string consisting of upper case roman letters a
35. 16 characters con sisting of upper lower case alphabets numericals and underscore _ The first character must not be a numerical e Predefined functions such as Int Nint Sgn Step Abs Frac Sqrt Exp Log Log10 Cos Sin Tan ArcSin ArcCos ArcTan Cosh Sinh Tanh ArcSinh ArcCosh ArcTanh Gamma Mod Atan2 Min Max Defintions are the same as in standard FORTRAN except Sgn and Step Sente L 0 1 for x gt 0 x 0 xz lt 0 Step x 1 0 for x gt 0 x lt 0 Enclose the argument by or or Separate arguments by if there are more than one argument Mod Atan2 Min Max Number of arguments for Min and Max is arbitrary There are functions of other type which are defined for CAIN See the next sub section Sec 2 6 2 6 CAIN functions In addition to the predefined functions of general use such as Sin and Cos there are other special functions intrinsic to CAIN There is one limitation on the arguments of the CAIN functions the arguments must not contain any CAIN functions due to the problem of FORTRAN recursive call Beam statistics functions Firstly the number of particles that of macro particles the average coordinates energy momentum and their r m s values of the beam at the given moment are retrieved by NParticle NMacro AvrT AvrX AvrY AvrS SigT SigX SigY Sigs AvrEn AvrPx AvrPy AvrPs SigEn SigPx SigPy SigPs BeamMatrix The calling sequence is common to these functions except
36. 22 27 28 EXTERNALFIELD clear 36 fast Fourier transformation 53 FILE 37 file close 37 file open 37 file rewind 37 fine structure constant 10 FLAG 14 FuncBS 13 62 FuncCP 13 67 generation 17 32 42 harmonic expansion 55 HEADER 37 helicity 23 24 IF 29 incoherent pair creation 25 69 incoherent pair creation clear 36 installation of CAIN 39 IntFCP 13 67 Landau Lifshitz 71 LASER 19 28 LASER clear 36 laser geometry 56 LASERQED 20 LASERQED clear 36 log scale 32 34 longitudinal coordinate s 42 longitudinal mesh 22 53 LORENTZ 18 28 Lorentz transformation 28 LUMINOSITY 23 LUMINOSITY clear 36 luminosity function 12 24 luminosity integration 50 modified Bessel function 12 nonlinear QED 75 Planck s constant 10 PLOT 32 Poisson equation 53 polarization luminosity 51 polarization vector 16 17 42 43 positional operand 13 PPINT 25 predefined function 11 predefined parameter 9 PRINT 29 print parameters 31 PUSH 18 26 random number 11 Rayleigh length 19 57 relational operator 8 13 29 32 RESTORE 37 rotation 28 running CAIN 41 running variable 10 32 Schwinger s critical field 62 SET 14 shift of origin 28 Smesh 11 22 24 53 Sokolov Ternov formula 62 SPIN 14 standard format 17 30 statistics of beam 30 Stokes parameter 16 17 20 42 STOP 38 STORE 37 tar 39 test particle 12 18 Thomas precess
37. 44 si where 8 16 2 mer 1 m z ATRA PT 5 PAIPG OP In order to make the spectrum function flatter CAIN introduces the variable y 1 lt y lt 1 instead of x E E 0 lt x lt 1 _1 soi y b Ie E y 23 1 m 0 y oe f 111 The spectrum function with respect to y then becomes dW i 7 p ear o ca x 2 FY x F Uie Kapi d y 2 E where y 2 is used because the range of y is 2 The constant T T 61 5 6 2 3 112 C3 1 35286 67 Figure 11 Function F y x 3 as a function of y for three values of yx 0 3 2 40 and tor Ey 0 1 The parameter x is indicated by the line mode and 3 is by crosses no cross for 3 0 F y x 3 2 0 0 T T T T 7 T T T T T T T T T T T 0 0 0 2 0 4 0 6 0 8 1 0 is chosen so that F lt 1 for any y x s F y X 3 is plotted in Fig 11 Now the event generation goes as 1 2 3 4 Compute x and reject if x lt 0 05 the rate is too small Generate a uniform random number 0 lt p lt 1 and compute po c3WappAt 1 2 3 Reject if p gt po 4 Generate another uniform random numbers 0 lt q lt 1 and 1 lt y lt 1 and compute F Instead of q one can also use p po 5 Reject if q gt F 6 Accept and compute x from eq 111 and Ey E E 1 x F 7 Compute the final polarization of e from x 1 2x 1 1 1 Fop Ko 3 3 zuez 7 Kis
38. 6 There may be one more directory out0 containing the outputs from example data 7 Or from the ftp site ftp 1cdev kek jp pub Yokoya manual cain21e ps gz 39 4 2 System Dependent Subroutines There are two subroutines which are system dependent They are all in the directory cain21e source local CLOCK1 returns the cpu time in seconds from any origin for printing cputime only JOBDAT job date and time in 20 byte character string for printing header only Following is the source at KEK HP work station TIME and DATE are KEK HP system functions and SECOND is given by a C program SUBROUTINE CLOCK1 T SUBROUTINE JOBDAT JOBTIM IMPLICIT NONE CHARACTER 20 JOBTIM REAL 8 T SECOND CALL TIME JOBTIM 1 8 T SECOND JOBTIM 9 9 RETURN CALL DATE JOBTIM 10 18 END JOBTIM 19 20 RETURN END 4 3 Storage Requirements A compressed array method has been used in ABEL but this was given up in CAIN because it makes inter lab collaboration in programming very hard In CAIN dimensions of large arrays are given by parameter statements Major ones are the following The given numbers are those in the present version You can change them and re compile all the files MXY in include bbcom h For the mesh of beam beam force Upto MXYxMXY bins 48xMXY 0 75MB MXY 128 MMX MMY in bb bbfpack bbpkcm inc Also for beam beam force Upto MMXxMMY bins 40xMMXxMMY 0 62MB MMX MMY 128 It is better to set MXY MMX MMY MMM in inclu
39. E EE TE Tlr E Ep E Ep 1 x is the final electron energy K the modified Bessel function and Ki is its integral Ki e I K z dz 94 The function F 0 is available as a CAIN function FuncBS and so are some of the K s and Ki s See Sec 2 6 5 8 2 Algorithm of event generation The random number generation using the acception rejection method is applicable when the distribution function is everywhere finite and is most efficient when the function is flat 62 Since the function Foo is infinite at E 0 the following variable y is introduced in CAIN instead of the photon energy fraction x in order to make the distribution function finite and relatively flat Ty t gt gt lt a lt 1 95 ee Perl 95 The number of photons during a time interval At in the photon energy range y y dy is then given by dny poG Y y dy 96 where _ O 1 ayAt yAt At E 97 A BAD p p Ac Esch 1 47 de 9 G T y O En Co zz 2 3 98 The function G Y y is less than or equal to unity for any Y and y It is plotted in Fig 8 Figure 8 Function G Y y for various values of Y Unpolarized case only gt x oO The photon generation in CAIN proceeds in the following way 1 Calculate po for given field electron energy and time interval At 13 The definition of y has changed since ABEL and CAIN2 1b in order to keep high efficiency even when Y is ex
40. FoAt ro v po v p At F ri p po 4 Fo Fi At To 3lv py v p At The error of r by these formulas is estimated by r ify iip Aur 49 If this is not small enough divide the interval At by an integer ng Note that dr At because F F is proportional to At The total error after multiplied by the number of intervals na is proportional to 1 n3 However the above prescription is not really enough when there are extremely low energy particles e g those from incoherent pair creation It often happens that na so determined bocomes over several hundreds In such a case the above error estimation may not be accurate at all When ny is too large CAIN tries the fourth order Runge Kutta integration Starting from the whole interval At it is divided by 2 at each step until the difference becomes small enough This method is a little better than the simple formulas above but is still time consuming So the users should be aware that incoherent pair creation is expensive 5 5 Luminosity 5 5 1 Luminosity Integration Algorithm Let us denote the position velocity distribution function of j th beam j 1 2 at time t by n r v t It is normalized such that f jdrdv is the total number of particles in the j th beam The luminosity per crossing is in general given by J vy v2 v1 Xv r V1 t 2lr va t drdvidvodt 38 If all the particles in the j th beam are ultrarelativistic and
41. Gs density dashed curve and the simulated density solid for ij 0 and 1 Figure 1 Physical charge r f a J L l5 g Uniform t distribution Default is Gaussian The full length is 2 304 GCUTT is not used Uniform E distribution Default is Gaussian The full relative energy spread is 2 30 GCUTE is not used Angle offset radian The right and left going beams have the same sign of slope when there is a crossing angle Default 0 0 Crab angle 0x y 0t radian Positive when the bunch tail has larger x y When the full crossing angle in the horizontal plane is eross and this is to be compensated by the crab angle the SLOPE and CRAB parameters should be SLOPE 0 ross 2 CRAB eross 2 for both right going and left going beams If you are not confident after beam definition try for example DRIFT T t0 dt PLOT SCAT H S V X HSCALE smin smax VSCALE xmin xmax HTITLE S m VTITLE X m DRIFT T t0 PLOT SCAT NONEWPAGE H S V X HSCALE smin smax VSCALE xmin xmax DRIFT T t0 dt PLOT SCAT NONEWPAGE H S V X HSCALE smin smax VSCALE xmin xmax with appropriate definitions of t0 smin etc The DRIFT command trans ports the beam to the plane t constant snap shot NONEWPAGE operand suppresses page break so that the s 2 profiles at different times appear on the same page Eta function m Derivative of eta function Coherent energy slope from bunch head to tail 1 m
42. MLM Number of s Ay LMMAX x 1 MLM l 0 MLM TT XIMAX Maximum LMMAX Maximum A LENHCP Flag to apply a rate enhancement function ENHCPF Enhancement function name declared external Used when LENHCP gt 1 IRTN Return code A second call of NLCPST will replace the parameters and the arrays created in the first call The enhancement function if needed has to be defined as FUNCTION ENHCPF Y REAL 8 ENHCPF Y ENHCPF RETURN END The enhancement function has to be a function of y v v 0 lt y lt 1 only and it must be gt 1 for all y The probability functions Fkn are multiplied by ENHCPF y Note that y close to 1 represents events with high energy photons and hence low energy recoil electrons See NLCPGN for how the enhancement should be treated in the simulation Possible errors IRTN 1000 Memory insufficient You have to reduce MY xMPHxMXIxMLM or in crease the parameter MW in the FORTRAN source IRTN 1001 to 1004 Either one of MY MPH MXI MLM is too large IRTN 1100 The enhancement function less than 1 at some y Event generation After initialization an event can be generated by CALL NLCPGN PE1 WL NL HE1 HL PD DT PMAX IRR NPH PE2 HE2 PG HG PROB WGT IRTN Input variables PE1 Array of dimension 0 3 Initial electron 4 momentum eV c WL Laser photon energy eV NL Array of dimension 3 Unit vector along the laser direction HE1 Initial electron helicity 1 lt HE1 lt 1 HL La
43. Once x and n are given the final momentuma are given in any frame by k xp ha 2x ke maq mas 1 ef coso e sin o 144 Iu p Og po pp p Pein ae ki k 145 Here is the azimuthal angle in a head on frame therefore its distribution is uniform in 0 27 and e and ef are given by 0 Envan e p ky pxkzr p k ds pxk ga m L PARLU pPI 146 i A i pkr e2x Ekr pwr p kr 20 where e P is the completely anti symmetric tensor e 3 1 These vectors satisfy pej kre 0 ese L 1 12 e1 2 Q 147 The vector e in eq 146 is ill defined when p and k are colinear in the original frame In such a case the spatial part of ef is an arbitrary unit vector perpendicular to kz A 1 2 Usage Initialization First you must initialize the event generators i e create a table of the functions Fin and F n They are three argument functions In the program A and y v v 0 lt y lt 1 are used as the independent variables To initialize the generators you must specify the range and number of mesh points for these variables The present version allows to enhance the probability of a part of spectrum See below CALL NLCPST MY MPH MXI MLM XIMAX LMMAX LENHOP ENHCPF IRTN MY Number of y s i th y point is y i MY i 0 MY MPH Maximum number of laser photons n 0 MPH MXI Number of s Es XIMAX x j MXI j 0 MXI
44. PIN I I 1 3 Here NAME is blanck unless the particle is a test particle or a lost particle or an incoherent pair particle WGT is the number of real particles expressed by one macro particle and GEN is an integer expressing the generation 1 for the initial particles 2 for secondaries etc SPIN is the polarization vector for electron positron and the Stokes parameter for photons The file can also be MATHEMATICA style automatically detected The format string is I1 15 A4 12 1PD19 12 In the case of the NAMELIST format the namelist BEAMIN must be inserted for each particle amp BEAMIN KIND 2 GEN 1 PNAME gt WGT 0 0 TXYS 0 0 0 0 0 0 0 0 EP 0 0 0 0 0 0 1 0 SPIN 0 0 0 0 0 0 END FALSE SKIP FALSE amp END 17 Here the r h s show the number of data the data type and the default The last component of EP i e P must not be zero All the particles must be either right or left going Actually the particle energy is calculated from yp m The input data is not used If the first character of PNAME is T the particle is treated as a test particle The test particle name must be unique PNAME should be blanck for normal particles If SKIP TRUE the present data is omitted If END TRUE the present data and all the following data are ignored Comments in NAMELIST statements follow the local rule on the platform To modify the file data shift of origin
45. This defines the right going electron KIND 2 with the bunch population 1 x 10 energy 500GeV bunch length 100m etc Note that every command must end with a semicolon You can use variables and mathematical expressions see Sec 2 5 For example if you prefer normalized emittance you may write SET ee 500E9 gamma ee Emass emitx 3D 6 gamma emity 3D 8 gamma betax 1E 2 betay 1E 4 sigx Sqrt emitx betax sigy Sqrt emity betay BEAM RIGHT KIND 2 NP 10000 AN 1E10 EO ee SIGT 1E 4 BETA betax betay EMIT emitx emity Emass is a reserved variable and Sqrt is a predefined function sigx and sigy are defined for later use If you like millimeter instead of meter you may say SET mm 1E 3 sigz 0 1 mm BEAM SIGT sigz Now you know how to define the positron KIND 3 beam Obviously BEAM LEFT KIND 3 will do For calculating the beam beam force you need to tell CAIN about the mesh SET Smesh sigz 2 BBFIELD NX 32 NY 32 WX 8 sigx R sigx sigy 2 The definition of the longitudinal mesh Smesh may look bizzarre This is because the same mesh is used for luminosity calculation For computing the ete luminosity you have to say for example LUMINOSITY KIND 2 3 W 0 2 ee 50 WX 8 sigx WY 8 sigy FREP 90 150 if the rep rate is 90 bunches times 150Hz WX and WY define the mesh region See Sec 3 9 Now you are ready to start the collision FLAG OFF ECHO PUSH Time 2 5 sigz 2 5 sigz 200
46. Thomas BMT equation e Polarization dependence of the beamstrahlung and the coherent pair creation has been included e The kinematics in nonlinear QED subroutines was improved so as to accept non relativistic electrons positrons e The final polarization of electron in the nonlinear Compton scattering was added e Polarization change in linear and nonlinear QED beamstrahlung and coherent pair creation processes when event generation is rejected is now taken into account e Incoherent ete pair creation by Breit Wheeler Bethe Heitler and Landau Lifshitz processes has been added e Luminosity with full polarization information including linear polarization can be computed e Differential luminosities with unequal space energy bins are introduced New entries on user interface e Following pre defined variables have been added Kind Gen e Following pre defined functions have been added Min Max AvrT AvrX AvrY AvrS SigT SigX SigY Sigs AvrEn AvrPx AvrPy AvrPs SigEn SigPx SigPy SigPs TestT TestX TestY TestS TestEn TestPx TestPy TestPs LumP LumWP LumWbin LumWbinEdge LumEE LumEEbin LumEEbinEdge LumEEH LumEEP BesJ DBesJ BesK13 BesK23 BesKi13 BesKi53 FuncBS FuncCP IntFCP Do type sequence in PRINT WRITE command became possible Maximum number of characters of user parameters is increased to 16 Also the underscore _ is allowed in parameter names The flags for beamstrahlung and
47. User s Manual of CAIN Version 2 le Nov 1 1999 Contents 1 Introduction 1 1 General Structure of Input Data co ee eee See ee ee 1 2 Change since the last version CAIN2 1b 1 3 History until the last version CAIN2 1b Basic Grammer of the Input Data 2 1 System of Units e 2 campera e aoee a oe Be ea we Re OR 22 Characters s te ot ee on a te ca e ala oi athe od ar a an 2 3 File Lines and Command Blocks 00000000084 2A Commands ana a ee ce aa eb ee o a 20 o o 6 bce ec 6 owe oS oe Se A SEAeASSEASSS ELSES 20 CAIN TUBCUONS es e oie ew Rw AE a ee a a Commands dle FLAG see amp B rr ara eo es Se A ee A ed en OR ak ap at Soa ay el cp oe ees Go oa ee AS ee ee se eee ee Bo BRA ostra ek het Sok Boston Sok esa eee do Ber ate at Se te Ore GASER sir 2 hie da e ee e e ee ee a Se ko JUASERQED sasa ateo a a feck Sele Roe BR cee wo wee A Uhre 3 0 CERED ce tor oa ee a ee he ee Be Be ee GS See eo oe 3 BBFIFLD zisa cede ga ced ee eee be ee be eee eee aa 3 0 EXTERNALFIELD os poe aca 000 aoi Ge ee ea eee Ra mE be Ee ee Ee 39 LUMINOSITY e es pedo 4266445 nds eRe ee EH ORE owe eS SIPPIE e oe ee ee ee Oe BS Oe ES bee ee ee 3 11 PUSH ENDPUSH 44 cc 4 b e 44 644 Yee ek Sew a d oe r d giel Ol DRAVET ohare Moe eo woe Sk ee Be A ae a cae e JLS LORENTZ 906 2 4 4 96 03 o 3 Sa oe Oe we ee ee SEE SSO 3 14 DO ENDDO sii io koe ele a Ma aR SD Oe Pe ee A 3 15 IF ELSE ENDIF suso se dd
48. ad of 7 x q Defined by q 7 1 The n photon threshold is given by q gt 1 n Y Defined by x 4 44 1 1 uny 0 lt y lt 1 represents electrons with energy 2 lt w 2 and 1 lt y lt 0 those gt w 2 Since Gin and G3 are even functions of y only the part y gt 0 is tabulated Now the initialization is done by CALL NLBWST MY MPH MXI MQ XIMAX ETAMAX LENHBW ENHBWF IRTN MY MPH MXI MQ XIMAX ETAMAX LENHBW ENHBWF IRTN Number of y s i th y point is y MY i 0 MY Maximum number of laser photons n 0 MPH Number of s XIMAX x j MXI j 0 MXT Number of q s Non equally spaced MQ points are selected in 1 MPH lt q lt ETAMAX Maximum Maximum 7 Must satisfy ETAMAX gt 1 MPH Otherwise no pair creation is possible Flag to apply a rate enhancement function Enhancement function name declared external Used when LENHCP gt 1 Return code 82 The parameters MY MPH MXI can be different from those for nlcpst A second call of NLBWST will replace the parameters and the arrays created in the first call The enhancement function if needed has to be defined as FUNCTION ENHBWF Y REAL 8 ENHBWF Y ENHBWF RETURN END The enhancement function has to be a function of y 1 2x 4 1 1 un 1 lt y lt 1 only and it must be an even function of y and gt 1 for all y Actually only the part 0 lt y lt 1isused The probab
49. adding zero in the extended region and carry out FFT This still means a periodic charge distribution as depicted in Fig 4 However if we use the kernel matrix with zero padded in the extended region Gij 0 if nz lt i lt 2n or ny lt i lt 2n the field due to the ghost charges will never reach the real charge region because their horizontal vertical distance is larger than Wa wy Thus the potential in the region W wy is calculated correctly although incorrect in the extended region The obtained values of the potential are those at cell centers They are interpolated by 2 dimensional cubic spline and differentiated to get O Ox and 09 0y Outside the mesh region When a charged particle gets out of the mesh region the field created by it is ignored in CAIN2 1e However the force by the other beam is taken into account even if the particle is outside the mesh region of the other beam To this end CAIN2 1e adopts three methods namely A direct Coulomb force by the charge distribution in the mesh B harmonic expansion in polar coordinate and C harmonic expansion in elliptic coordinate Let wz Wy be the total width of the mesh region If it is close to a square or more precisely if 0 8 lt w w lt 1 25 the whole region is divided into three regions O A B as depicted in Fig 5a If the mesh region is far from square the whole region is divided into four O A B C as in Fig 5b In the region O the
50. al variable Following running variables can be used See Sec 2 5 T X Y S En Px Py Ps Sx Sy Ss Xi1 Xi2 Xi3 Kind Gen For example H Sqrt Px 2 Py 2 Ps 2 1E6 defines the orbit angle in micro radians Lmin Tmax Nbin Minimum and maximum of the horizontal scale and the number of bins If omitted the minimum and maximum in the particle data are used 100 min imas and Mo 90 HLOG VLOG Log scale of horizontal and vertical axes When HLOG is specified Lmin and Zmar Must be specified explicitly The binning interval will be equal in log scale top_title etc Title string Must be enclosed by a pair of apostrophes Topdrawer ey case string can be specified by using as the delimitor like TITLE E0G1 XGX for writing E It is recommended to put also at the end as in this example to avoid writing unnecessary blanck characters a Output file reference number Default TDFile Scatter plot of particle data 32 Syntax PLOT SCATTER NONEWPAGE RIGHT LEFT KIND k k k2 GENERATION reln INCP H f V fy HSCALE mim Umar VSCALE Ymin Ymax HLOG VLOG MAXNP Mng gt TITLE top title HTITLE bottom title VTITLE left_title FILE f Ja An expression defining the vertical variable Ymin Ymax Minimum and maximum of the vertical scale ias Maximum number of points to be plotted in order to save the plotting time Randoml
51. ated forms of logical expressions including and or are not ready yet Syntax ELSE ENDIF a b Expressions rel A relational operator One of lt gt lt gt lt gt lt gt gt lt Do not forget 3 16 WRITE PRINT Write some data The only difference between WRITE and PRINT is the default destination which is OutFile for WRITE and MsgFile for PRINT Therefore they are identical if FILE operand is specified Another difference is that errors in reading the command cause abnormal termination for WRITE whereas the command is ignored for PRINT Write the macro particle data Syntax WRITE BEAM FILE f filemame APPEND RIGHT LEFT KIND k INCP SHORT MATHEMATICA 29 BEAM n filename APPEND SHORT Write beam data File reference number See above for default New or old file name Must be enclosed by apostrophes Either full path or relative path Note that CAIN is run in the directory cain exec When filename is specified the input file reference number is ignored and the file is opened with the reference number 98 Append in an existing file Ignored if does not exist Short format which fits to a wide screen METHEMATICA MATHEMATICA style format Use standard format see Sec 3 3 if none of the avobe two are specified RIGHT LEFT Write only either right going or left going particles Default both INCP Write particles created by inc
52. ather than on the t constant plane snap shot Thus e g the bunch length is a spread in t rather than in s Syntax BEAM RIGHT LEFT KIND k AN N NP N EO Ep TXYS t 2 y 8 BETA B B ALPHA 07 04 EMIT ex y SIGT 0 SIGE 0 GCUT n n GCUTT n GCUTE n GAUSSWEIGHT i ELLIPTIC TUNIFORM EUNIFORM SLOPE 0 4y CRAB _ y ETA n2 sy ETAPRIME 7 9 ESLOPE de dt XYROLL zy SPIN E Lu shel al 14 RIGHT LEFT Specify whether the beam is right going or left going k N Np Eo t T Y S Bx By Oz Oly Ex Ey Ot Te Na My Nt Me ELLIPTIC Particle species 1 for photon 2 for electron 3 for positron If you cannot remember these codes you can do SET photon 1 electron 2 positron 3 BEAM RIGHT KIND electron Number of real particles Number of macro particles Beam energy eV Location of the reference point and the time when the beam center comes there In units of meter This is the point where the Twiss parameters are to be defined Default 0 0 0 0 Beta functions m Alpha functions Default 0 0 The sign of a is positive when the beam is going to diverge whichever the beam is right going or left going R m s geometric emittance rad m Deafault 0 0 R m s bunch length m Default 0 Relative r m s energy spread Default 0 Gaussian tail cutoff in units of corresponding sigmas The default values are
53. ation vector is Cil wAt fAt Cf no trans I WR CDAS 12 45 The average final polarization over the whole ensemble with and without transition is then given by Cr 1 gt w T F Ci At C hastens F farw T FENG A Cons i lg f w HC JAt 13 If one can ignore the change of energy momentum during the transition the evolution of the polarization is described by the differential equation dg g f u HE 14 Polarization effects included in CAIN The present version of CAIN does not include all the polarization effects The following table shows what effects are included In any case the correlation of polarization between final particles is not taken into account initial et laser final e final y Beamstrahlung e mer y LT LT LT Linear laser Compton e laser e y LT LT LT LT Nonlinear laser Compton e n laser e y L L L L initial y laser final e Coherent pair y set te7 LT LT Linear laser Breit Wheeler y laser et e7 LT LT LT Nonlinear laser Breit Wheeler y n laser et e7 L L L initial final pair Incoherent Breit Wheeler y y e er L N Incoherent Bethe Heitler yte etet e7 N N Incoherent Landau Lifshitz e e e e e e7 N N initial final Bremsstrahlung et e et e y N N L Longitudinal spin of electron positron or circular polarization of photon T Transverse spin of electron positron or linear polarization of photon L 100 cir
54. ccording to w f Once I is decided the final polarization is definitely without using random numbers given by _ IM ALG eens WL FEY This expression does not satisfy 1 If one does not allow a macro particle in a mixed state one has to choose a pure state by using random numbers The macro particles which did not make transition must carefully be treated One might say their final polarization is equal to but this is not correct because of the selection effect due to the term f The probability that a transion does not occur in a time interval At is 1 w f At where the underlines indicates quantities integrated over the whole kinetic range of I Consider an ensemble one macro particle of N real particles having the polarization vector Cia a 1 2 N Each of these is a unit vector ia 1 and the average over the ensemble is Cia Let us arbitrarily take the quatization axis e The probability in the state e is 1 e 2 and the non transition probability is 1 w f e At Therefore the sum of the final polarization along e over the ensemble is 1 eC 22 9 1 w f e At X le iall wAt f eAt Ne 1 wAt f At 11 The axis e is arbitrary Therefore the sum of the final polarization vector is given by the above expression with e taken away The total number of particles without transition is N 1 w f At Thus the final polariz
55. ck at cain21e tar gz Then you get cain2le tar gz about 375kB 2 gunzip it you get cain2le tar It is a tar ed file Move it to an appropriate directory on UNIX 3 untar it by tar xvf cain2le tar Then a new directory cain21e overwritten if already exists will be created under the current directory This new directory contains five subdirectories exec in out source doc The directory doc contains a file readme You can also download the manual you are reading from the same home page gzip ed postscript file manual cain21e ps gz 7 4 1 Directory Structure Everything is in a directory named cain21e The directory structure is shown below cain21e source control main main program reading input data deciph character manipulation to read input eval package to evaluate expressions basic basic physics routines physics bb ca entrance to bbfpack bbfpack subroutine package for beam field beamst beamstrahlung coherent pair extfld external field lum luminosity integration laser lsrmain entrance to nllsr gies linear and nonlinear laser QED ppint incoherent particle particle interaction local system dependent subroutines topdraw topdrawer util special functions etc util2 histogram scatter plot etc include common blocks exec load module shell scripts in input data out outputs doc documents 5 Or directly to the ftp site ftp lcdev kek jp pub Yokoya cain2le tar gz y P Jp P y g
56. coherent pair creation which had been defined in the BBFIELD command were moved to a new command CFQED constant field QED This is more logical becuase CAIN computes these phenomenon due to the external fields too Acoording to this change CFQED operand was added to CLEAR command Except for this change input data files prepared for CAIN2 1b can be used for CAIN2 1e New commands STORE and RESTORE were added You can store the variables and the luminosity data for later jobs Command PLOT FUNCTION was added Bugs already fixed in the present version 2 2 1 There was a bug in CLEAR BEAM command when applied during a PUSH ENDPUSH loop Fixed A bug was found in the file source physics bb bbmain bbkick f in solving the equation of motion under the beam beam force It is a kind of double counting of the beam beam effect Fixed Several bugs were found in DRIFT EXTERNAL command Fixed There was a miss spelled variable in subroutine EVUFN in the directory source control deciph This has been overlooked because of missing IMPLICIT NONE Not very harmful Fixed Total helicity luminosity was not calculated although differential helicity luminosity was A bug in physics lum dlumcal f Fixed PRINT WRITE command did not correctly understand the KIND operand Fixed The polarization sign of the final positron in the subroutine for linear Breit Wheeler process source physics laser nllsr lnbwgn f was wrong Corrected
57. ction is 2 m ay rro 6 118 where i a r r a a a 102 142 sinh b 5 3h 119 where a w m b p m a b 1 Events are generated by the following algorithm using inverse function a Compute w p a b G and o for given initial parameters reject if a lt 1 i e below threshold and calculate the event probability for the given time step _ WIW Opw At ow Vo where w and wy are the weights of initial photons number of real photons divided by that of macro photons w the weight of the pair to be created At the time interval and V the volume in which the macro phtons are located b If P is too large say gt 0 1 divide the interval At and P by an integer naiw and repeat the following procedure Naiv times c Generate a random number r 0 1 Reject if r gt P d Generate another random number r2 1 1 and solve the equation 2a h 1 ty E al da 1 la 2 h h sinh z cosh z r a G 120 with respect to z Here z is defined by c cos a b tanh z 0 lt z lt sinh b The left hand side is the integral of f from 0 to c The sign of c cos 0 is determined by the sign of ro e Generate another random number r3 0 27 and compute the transverse compo nent of electron momentum by p psin 0 e cos ez sin 121 where e and eg are arbitrary unit vectors perpendicular to ez the unit vector along the initial photon momentum in
58. ction point For the conversion you define the lasers in addition to the initial electron beam 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 See Sec 3 4 for the meaning of the key words The type of laser electron and laser y interactions has to be specified by LASERQED command LASERQED COMPTON NPH 5 XIMAX 1 1 xi LAMBDAMAX 1 1 lambda LASERQED BREITW NPH 5 XIMAX 1 1 xi ETAMAX 1 1 eta The PUSH ENDPUSH loop is the same as in the ete example After ENDPUSH write all the particle data by WRITE BEAM FILE or if you do not want to include e e collision write the photon data selectively by WRITE BEAM KIND 1 FILE Then read this file in the next job and simulate the y y collision See Sec 2 for the basic grammer of the input data See Sec 2 4 for a list of all the available commands 1 2 Change since the last version CAIN2 1b There has been a version CAIN2 1d but the changes since then are only bug fixes Here we list up the changes since CAIN2 1b e Unequal mesh of energy for differential luminosity has been introduced 1 3 History until the last version CAIN2 1b New entries on physics e 2D differential luminosity d dE dEz added e Lorentz transformation of lasers has been added e Field strength dependence of the anomalous magnetic moment of electron is taken into account in solving the
59. cular polarization only N Not computed No change for existing particles zero for created particles Irrelevant 5 3 Beam Parameters The BEAM command makes it possible to define a beam in terms of the conventional Twiss parameters A beam is defined by many parameters described in Sec 3 3 Here we will give formulas how to generate a beam using these parameters An important point is that the beam is defined on a plane s constant rather than t constant Thus the longitudinal structure of the beam appears as the time structure Note that t is larger at the bunch tail The parameters are 46 to To Yo So Reference point of the Twiss parameters m Eo Reference energy eV Bey Axy Nay Ney Twiss parameters Cag Geometric emittance rad m on R m s bunch length m Te R m s relative energy spread Ng Ny Nt Ne Gaussian tail cut off Bos ig Orbit slope rad Pa Wy Crab angle rad Day Beam roll in the 2 y plane rad de dt Coherent energy slope 1 m First generate particle variables in usual accelerator coordinate ti orr Ey OTa de dt t 8 1 2ezU1Pg COS P1 y Ma 1 Y 1 2 yU2By COS P2 MyE1 1 1 2 U1 By 0 cos p1 sin yi nE als la where r r2 is a Gaussian random number of zero mean and unit standard deviation cut at ni ne u 1 2 is a random number of exponential distribution x e cut at u n 2 n 2 and gj a uniform random numbe
60. d k Select only particles of kind k If omitted all species are transformed EXTERNALFIELD Lorentz transformation of external field transformation of the field strength and the boundary LASER Lorentz transformation of lasers The three types of transformations are carried out in the order of the input keywords TXYS ANGLE BETAGAMMA With one LORENTZ command each transformation can be specified at most once Note that for any type the transformation is that of the coordinate axis rather than the particles themselves Thus for example if you say TXYS 0 0 0 1 then the s coordinate of the particles decreases by 1 meter 3 14 DO ENDDO Do loop Can be nested Two forms are possible Syntax form 1 DO REPEAT n n Number of repetition Can be an expression evaluated when entering the loop n gt 0 n 0 causes a jump to ENDDO n lt 0 causes an abnormal term 28 Syntax form 2 DO WHILE a rel b a b Expressions rel A relational operator One of lt gt lt gt lt gt lt gt gt The loop is repeated so long as the condition is satified The check is made at the time of DO command The values of expressions are REAL 8 If you want integers for definiteness use Nint or Int End of do loop is Syntax ENDDO Do not forget 3 15 IF ELSE ENDIF Define if block Can be nested Note that THEN is not needed The ELSE clause may be absent More complic
61. de lumcom h For the mesh of luminosity Upto 2 x 2 bins 152x270 2 4MB MMM 7 MWLUM in include lumcom h Store differential luminosity 8xMWLUM 1 6MB MWLUM 200000 MP in include beamcm h Maximum number of macro particles including pho tons electrons positrons test particles right going and left going Actual maximum number is 90 of MP because 10 is reserved for newly created particles in one time step 192xMP 19 2MB MP 100000 8 The older version used to have a system dependent random number routine It was replaced by a new one which is believed to be system independent Please tell the programmer if you have any trouble in compiling source util rand f 40 MVPH in include beamcm h Maximum number of virtual photons in a time step in an s slice SOXMVPH 0 8MB MVPH 10000 MTSTP in include tstpcm h Store the history of test particles MTSTP is the maximum number of the number of time steps times the number of test particles 100xMTSTP 0 5MB MTSTP 5000 The sum is about 30MB The size of the load module is about 0 8MB 4 4 Compilation The directory cain21e exec contains a csh script file make which can be used when your system is UNIX though the script might be system dependent Otherwise you have to write a compile command by yourself make works only when the current directory is cain21e exec You can modify it so that it works anywhere The only problem is that CAIN does not know in whic
62. do commands between PUSH and ENDPUSH once If n lt 0 CAIN stops at PUSH with an error message rather than at ENDPUSH 3 12 DRIFT Drift the particles to a certain time or to a certain s coordinate Syntax DRIFT T t DT At S s RIGHT LEFT KIND k k k2 EXTERNALFIELD ty Drift until Time t meter At Drift over time interval At meter S1 Drift to s coordinate s meter In any of the three cases T DT and S the particles may go backwards in time depending on the parameters RIGHT LEFT Drift right or left going particles only k Drift only particles of kind k EXTERNALFILED Take into account the external field When there is only external field without beam interaction DRIFT EXTERNAL is much better more accurate and faster than the PUSH command The difference is that DRIFT EXTERNAL uses an exact solution in a constant field whereas PUSH carries out step by step integration and that PUSH accepts only t as the independent variable while DRIFT also allows s as in most accelerator program codes How to use DRIFT EXTERNAL may be understood by the following example Suppose that the region s lt s lt sa is shined by a laser An electron beam comes from the left and goes through the laser region to created back scattered photons and subsequently goes through a magnetic field region s3 lt s lt s4 If the interval sa s3 is shorter than the bunch length the bunch head is already in the field
63. ds the probability is very high for any Y owing to the choice of the variable y 5 8 3 Polarization Polarization effects have been added since CAIN2 1 In order to describe polarizations let us introduce an orthonormal basis vector e1 ez e Here e is the unit vector along the initial electron velocity e the unit vector along the direction of the transverse component of acceleration and es e xej If the acceleration is due to a transverse magnetic field e2 is the unit vector along the magnetic field times the sign of charge The transition rate from the initial electron polarization to the final polarization Cf with the photon Stokes parameter based on the basis vector e1 2 is dW ao x Ft Crp K4 3 2 Ci 7 Kusles Ty 2 E m v i ev E Ki E Ey ev Cien Ko 3 99 64 1 Kuala Cot 7 Say klere Kojs Fuster 5 where Foo is defined in eq 92 and the argument of the Bessel functions is z We omitted the terms involving Cf and simultaneously which means to ignore the correlation of polarization between the final electron and photon See Sec 5 2 2 for the meaning of bars on Cf and The radiation energy spectrum summed over the final polarization is given by eq 92 with Foo replaced by Fo Foo xK js ez i 100 Since the function G Y y with Foo replaced by Fo has still the above mentioned property the same algorithm of generating the
64. e Beam Beam Interaction in Linear Colliders KEK report 85 9 Oct 1985 3 2 3 3 V B Berestetskii E M Lifshitz and L P Pitaevskii Quantum Electrodynamics volume 4 of Course of theoretical Physics second edition translated Pergamon Press 45 58 58 58 58 76 4 H A Tolhoek Rev Mod Phys 28 1956 277 58 5 Y S Tsai SLAC PUB 5924 Nov 1992 77 6 T Tauchi K Yokoya and P Chen Part Acc 41 1993 29 25 85 Index virtual photon 71 almost real photon 71 anomalous magnetic moment 48 BBFIELD 22 34 BBFIELD clear 36 BEAM 14 beam field 22 52 beam function 11 beamstrahlung 21 62 BEAMSTRAHLUNG clear 36 Bessel function 12 Bethe Heitler process 71 BMT equation 6 44 48 Breit Wheeler process 20 61 69 75 80 CAIN function 11 CFQED 21 classical electron radius 10 CLEAR 35 coherent pair creation 21 66 coherent pair creation clear 36 command 8 13 command terminator 8 comment 8 compilation of CAIN 41 Compton scattering 20 57 61 75 Compton wavelength 10 crab angle 16 47 crossing angle 16 dagger f 13 differential luminosity 23 24 directory of CAIN file 39 DO 28 DRIFT 27 ECHO 14 elliptic coordinate 55 elliptic distribution 15 ELSE 29 emittance 15 47 END 38 43 ENDDO 28 endfile 37 ENDIF 29 ENDPUSH 26 enhancement of event rate 20 26 78 82 equivalent photon approximation 71 expression 9 31 EXTERNALFIELD
65. e Compton case The sum of GINT k n MY l over n does not make sense because the result would be a quite discontinuos function of and q which makes the interpolation inaccurate However for given q the sum from n n q to MPH is continuous where n q is the minimum integer which does not exceed 1 q Thus the sum over n n to MPH is stored in GALL k n 7 l For given initial condition calculate and q Then interpolate GALL k n q 7 l for j and l and calculate the total probability P by summing for appropriate polarization am E At P Co x GALL GALL GALLp 1 GALL 2 Co W 165 84 Generate a uniform random number r and reject an event if r gt P In this case the helicity of the photon should change to hy 1 Pi hPa Perales pP gt Ps Co x GALL k 1 2 166 If r lt P decide to create a pair The number of laser photons to absorb is determined from GINT x n MY l as in the Compton case To determine the electron energy generate another random number ra in the range 1 1 Then y 0 lt y lt 1 is determined from r2 as in the Compton case Adopt y instead of y if r lt 0 The helicity of electron is given by hL Gon F hy Gin E tl 167 Gin hi hy Gan The positron momentum is calculated by the momentum conservation and the helicity from the above formula with y replaced by y References 1 K Yokoya A Computer Simulation Code for th
66. e E HECHAS PLATE AG CA 73 See Sec 5 2 2 for the meaning of the bars on and The omitted terms are products of three and four among E ED and ge Actually we need the terms x x and C x x but they are not found in literature The functions introduced in the above expression are Fo ia 42 sin 0 F sin 0 74 Ww w Fi 2c0s0 Fo z cos 6 F33 1 cos 0 75 wh w 1 1 f 7 1 cos 6 k cos 8 k f gt a cos 0 k k cos0 76 g f sin wHo ee oe A P ee ee 77 ginal G I 1 cos 0 Wain 2 1 4 coso a n n n ww Se n n 9 n n nxn 8 nxn Ww w taoa a k 8 nw mn sin 0 2 cos 0 i a 78 Actually 3 adopts left handed basis after collision so that the first and the second components of amp are and in 3 Our EL is not 1 3 but 1 Eb 3 The term G is given in eq 4 6 in 4 58 These formulas are used in their exact forms in CAIN Summation over the final polarization and the azimuthal angle gives the differential crosssection with respect to the final photon energy w Introducing the variables Z inplace of w by Z Dy O lt 2 lt 1 z log w u Ly log 1 A 79 cos 1 2 e 1 A 80 we write the differential crossection as do Ly 4rr F z 1 E Smi ARG 81 where SN 1 2z SF a2
67. e the same input file as in the previous run go suffices TopDrawer output will be written on cain21e out example tdr OutFile on cain21e out example and OutFile2 on cain21e out example out2 If you want a submit job please write an approproate shell script by yourself 41 5 Physics and Numerical Methods 5 1 Coordinate One of the basic assumptions of CAIN is that the main part i e the part which con tributes to the beam field dominantly of the high energy beams consists of either almost right going or left going particles The longitudinal coordinate s is the right going direc tion The reason s is used instead of z is only historical since ABEL The x and y axes are perpendicular to s and x y s forms a right handed orthonormal frame The time coordinate t is always multiplied by the velocity of light In contrast to ABEL CAIN does not use the longitudinal coordinate z1 z2 attached to the beams 5 2 Particle Variables 5 2 1 Arrays for Particles All the particles photons electrons positrons carry the following variables TXYS 1 i 0 1 2 3 Particle coordinates in meter Note that in contrast to ABEL the time and the s coordinates are also defined for each particle During tracking by PUSH ENDPUSH command all the particles have basically the same time coordinate an exception is the particles just created whereas in some cases e g after defined by BEAM command after DRIFT S s command etc they have dif
68. ed by using semicolon as delimiter like HEADER JLC EOCM1 500GeV X X aa If header_string is not written the header is cleared 3 21 STORE and RESTORE Store restore the current variables or the luminosity data in from a file Syntax STORE LUMINOSITY FILE fname Syntax RESTORE LUMINOSITY FILE fname LUMINOSITY Store restore luminosity data If not specified store restore variables fname File name Need not be enclosed by apostrophes if the name does not include parenthesis comma and semicolon The file is opened with the unit number 98 and is closed after read ing writing If the file name is omitted the standard name stdstfl dat for variables and stdstolum dat for luminosity both in exec direc tory is used The file is written in ascii format but do not try to edit it No protection against wrong formats 37 When STORE is called all the variables are written in a file At the time of RESTORE there can be three kinds of variables except for unchangeable ones those already defined and appear in the file already defined but do not appear in the file and undefined vari ables The first kind variables are overwritten The second ones are kept not eliminated and the last ones are added When STORE LUMINOSITY is called all the luminosity data at that time will be written in the specified file When RESTORE LUMINOSITY is invoked all the luminosity data in the pre
69. ely as Ss Sgn Ps Xi1 Xi2 Xi3 Photon Stokes parameters 2 amp 3 Kind Gen Time Ln Lij W Particle species 1 2 3 for photon electron positron Particle generation Running variables for global time coordinate m n 0 1 2 3 4 i j 0 1 2 3 Luminosity values used in PLOT LUMINOSITY command Center of mass energy used in PLOT LUMINOSITY command The third type is those whose names are predefined with default values and which the user can change by SET command such as MsgFile Outfile OutFile2 TDFile MsgLevel File reference number for echo error messages and default desti nation of PRINT command default 6 File reference number for voluminous outputs The default desti nation of WRITE command default 12 Other print output Not used default 12 TopDrawer file number default 8 Message level default 0 i e error messages only 2The input file number is set to 5 If you want to change it see the variable RDFL in the file cain21e source control main initlz f 10 Rand Random number seed Positive odd integer other than 1 default 12345 You can reset random number at any time Debug Debug parameter for the programmer If you set Debug gt 2 call and return from major subroutines are announced default 0 Smesh Longitudinal mesh size m for the calculation of beam beam field luminosity etc No default value e User defined parameters Those defined by SET command Upto
70. en y is large 72 1 004 o 0 95 l 0 90 L Figure 12 Function G 7 F defined in eq 132 It is 2 e close to unity because only 5 0501 t large region is impor tant G 0 is finite and de 0 757 3 pends on the parameter c G 0 lt 1 if c gt 0 1035 oer F Here c 0 2 is adopted ae 0 60 q 1x10 1x10 1x10 1x10 1x10 n Now the spectrum with respect to 7 is dn G n dn 131 T with N ecT G n V y 132 On AO 132 For 0 lt y lt co G n lt 1 and close to 1 except for the small 7 region which is umimportant in practice Thus Q Nmazx Q n lt G n dn lt Mmas T JO T 133 For given 7 or y the distribution of x is proportional to dV x V y and therefore can be random generated by using inverse function V V The algorithm is as follows a From the given parameters compute Ymin max and Q Mmaz T W R where w is the weight of virtual photon to be created Po is the expected number of macro virtual photons If Po is not small enough say gt 0 1 divide it by an integer N and repeat the following steps N times b Generate a uniform random number r 0 1 Reject if r gt Po Otherwise redefine r by r Po c Generate a random number ra 0 1 define 7 remax and calculate G n from a table Reject if r gt G The probability to be rejected here is small because G is close to unity Otherwise
71. ensity matrix Let us express an elec tron positron state by a two component spinor y The 2x2 density matrix p is defined as py P 14 1 2 1 where f denotes the Hermitian conjugate and is the average over a particle ensemble Since p is Hermitian and its trace is unity by normalization p can be written as pPO 1 0 Trace pa yoy 2 where is the Pauli matrices The 3 vector is called polarization vector In the case of pure states p can be represented by a superposition of spin up down states Py P C4p4 C Y lef 1 3 With the standard representation of the Pauli matrices A nn can be written as R G Wee G lel let 5 43 and its length is unity 1 CAIN allows lt 1 so that each macro particle is in a mixed state representing an ensemble of particles having almost the same energy momentum and space time coordinate If one observes the particle spin with the quantization axis e e 1 the probability to be found in the spin e state is given by 1 e 2 The polarization vector obeys the Thomas BMT equation 33 in the absense of quantum phenomena Convention for photon polarization A similar way is used for photon polarization too The polarization vector 3 vector normalized as e 1 is orthogonal to the photon momentum k It can be represented by the components along two unit vectors e and e perpendicular to k The th
72. ere y is a virtual photon Let the electron energy be E my y gt 1 The number of virtual photons with energy w and transverse momentum q is given by adw 1 q dq dn gt S m 123 TU T q 2 2 lal where a is the fine structure constant For given w the typical transverse momentum is very small q w y so that it is not important in collision kinematics but instead the finite transverse extent 1 q can bring about significant effects In the transverse configuration space the above expression becomes d dpa K up w dra TU y Po p amp 1 m 124 where r is the transverse coordinate with respect to the parent electron p r and K the modified Bessel function 71 The transverse momentum cut off q S m or p Z 1 m is somewhat umbiguous It should depend on the momentum transfer of the whole process This dependence is ignored in CAIN because the virtual photons are generated independently from the following processes and because it does not much affect the low energy pairs The lower limit w ji of the integration over w is in our case determined by the pair creation threshold Let us introduce dimensionless variables y w E Ymin Wmin E and z wp y The total number of the virtual photons is given by api dy fe n a K2 x 2adx 125 2f vw 126 with V a 2 Ko x Ko x K7 a 127 When Ymin lt 1 the total number is n log ymin 2log 2
73. event weight is always 1 if initialized with LENHBW 0 When WGTF 1 actually lt 1 each of the final pair should be asigned the weight wo x WGT and the initial photon still be retained with the weight wo x 1 WGT where wo is the weight of the initial photon before the event When WGT 1 the initial photon should be eliminated Possible errors IRTN 1000 Initialization nit yet done IRTN 1001 is larger than XIMAX IRTN 1002 7 is larger than ETAMAX IRTN 100 The total rate exceeds PMAX Useful subroutines Realx8 function NLBWFN KK K NPH XI ETA X returns the value of the function Gin y x where k K n NPH X1I n ETA and x X e w The first argument KK selects either the direct calculation using a Bessel function routine KK 1 or use interpolation of the stored table KK 2 In the latter case initialization must be done in advance and K must be 1 or 3 A 2 3 Algorithm Because of the threshold behavior the algorithm is slightly different from that for the Compton process The mesh for q cannot be equally spaced Select q s such that all the threshold points 1 n n Amin Amin 1 MPH Nin integer part of 1 ETAMAX are included that q are equally spaced between successive thresholds and that the spaces are not very diffrent Thus the total number of q s may not exactly equal to MQ The functions stored in the array GG k n i j l are Gin k 1 and G3 k 2 The integral GINT k n i 7 l is calculated as in th
74. ever too many macro photons are created causing the memory overflow or the statistics is too poor due to a small number of macro photons To solve this problem a variable WENHANCEMENT wWenp is introduced in the CFQED command 65 When Wenn gt 1 more macro photons are created They have the weight smaller than that of the parent electron positron by the factor 1 wen However the recoil of electron positron is taken into account only with the probability 1 wen so that their statistical property does not depend on Wenp When Wenn lt 1 the event generation goes the same as in the case Wenn l but the final photons are stored in the memory only with the probability Wenn The recoil of electron positron is taken into acount regardless the photon is stored or not Thus if there is no bug Wen does not cause any physical change 5 9 Coherent Pair Creation 5 9 1 Basic formulas When a high energy photon goes through a strong transverse field it can create a real electron positron pair This process is known as coherent pair creation and is character ized by the parameter E B Ey me Been me Esch 105 where E is the energy of the initial photon Bsen and Esen are defined in eq 91 The probability of the process is exponentially small x e78 40 when y is small Let us denote the energy and polarization vector of initial photon and final positron electron by E Ey Ey E E and The trans
75. ferent t but same S Also note that in contrast to ABEL s coordinate does not simply change as sy ct but changes according to the instantaneous longitudinal velocity so that longitudinal mixing may occur for low energy or large angle particles EP i i 0 1 2 3 Energy momentum in units of eV eV c SPIN 1 i 1 2 3 The polarization component Sv Sy Ss for electrons positrons and the Stokes parameter 2 3 for photons Sy Sy Ss is defined as usual in particle s rest frame Therefore it aquires the Thomas precession under Lorentz transformation by LORENTZ command For defining the Stokes parameter one needs a set of orthonormal basis vectors e e Y e with the third vector e parallel to the momentum In CAIN the first vector el is taken to be the unit vector along e e e e and e e xe This is ill defined when the momentum is exactly parallel to the x axis but this possibility is simply ignored Except for large angle photons e e e is almost equal to ez ey ez for right going photons and e e e for left going photons See the next subsection for more detail on the polarization GEN Generation When a particle is generated by BEAM command by Twiss parameters etc GEN 1 Created particles such as beamstrahlung photons have GEN larger by one than that of the parent particle This is also true for 42 the spent parents GEN of the secondary particles due to pa
76. for Lorentz transformation so that the collision looks head on The lasers can go any direction The present version accepts only constant external fields The interactions that can be treated by the present version CAIN2 1e are e Classical interaction orbit deformation due to the Coulomb field e Luminosity between e et y e Synchrotron radiation beamstrahlung and pair creation by high energy photons coherent pair creation due to the beam field e Interaction of high energy photon or electron positron beams with laser field in cluding the nonlinear effect of the field strength e Classical and quantum interactions with a constant external field e Incoherent e e pair creation by photons electrons and positrons e In almost all interactions the polarization effects can be included 1 1 General Structure of Input Data In this section we briefly describe the structure of input data CAIN is not intended for interactive jobs because the computing time is normally more than several minutes Every intruction to the program is given in the input data Two cases a simple ete collision and a 7 7 collider are given here as examples For more detail look at the sections for each command and the example input data files in the directory cain21e in Consider a simple e e collision You have first to define the two beams BEAM RIGHT KIND 2 NP 10000 AN 1E10 EO 500E9 SIGT 1E 4 BETA 1E 2 1E 4 EMIT 3E 12 3E 14
77. h directory you put him When you compile all the source files you say make all and when compiling only the files you changed you should just say make When make all stopped due to a compilation error Cmake will be enough next time because make all touches all the files at the beginning Before doing this you have to do one thing to specify the compiler option because it is quite system dependent There is a csh envioronment variable foption in the file make It is passed to Makefiles in each directory You need to change it for your system Because of this you cannot simply make in each directory without calling make Hopefully an empty compiler option will do In an old version of CAIN directories for include files were specified by a compiler option I Since this turned out to be system dependent the include statements in all the FORTRAN files in the present version contains the directory names by relative paths You must not therefore change the directory structure 4 5 Run All the input data have to be written in the directory cain21e in with file names having the extension i The file set sent to you has some example data see the doc readme file The directory cain21e exec contains a csh script file go for execution As make it works only when the current directory is cain21e exec When you want to run CAIN with the input data example i for example you would say go example without i If you us
78. have almost the same velocity vj v 1 then the expression is simplified as 1 cosg f mr t no r t drdt 39 where is the polar angle between v and v2 and n r t is the number density of the j th beam CAIN uses this formula with 7 ignoring the velocity distribution and the crossing angle The integration is done by introducing the time step size At longitudinal slice width As transverse mesh size A and A Summing the number of particles in each bin the luminosity is given by L L C N A AyAsAy 40 lay lyy Ls N te La by sts yd where C is an appropriate normalization factor and NY iyisi 18 the number of particles of the beam j in the bin is 1y 1s A problem is how to determine the transverse size of the bin A and A is mainly determined by the dynamics they are actually specified by the user If the bin is too large detail of the distribution is lost whereas if too small statistical error becomes large because each bin will contain only a small number of macro particles CAIN adopts the following way At first determine the size of the whole transverse region wz wy such that most particles are contained there Then divide this region into as many bins n x n as allowed by the storage requirement n must be a power of 2 CAIN uses n 128 and count the number of particles in each bin for both beams NY k 0 1 2 n 1 50 42 43 46 47 58 59 62 63 40 41
79. he weight wo for the final photon and electron Return code Initialization not yet done is larger than XIMAX A is larger than LMMAX The total rate exceeds PMAX A 1 3 Algorithm The functions Fi k 1 2 are stored in a 5 dimensional array FF k n i j 1 n 1 MPH 0 MY j 0 MXI 1 0 MLM The integral over y from 0 to y is stored in FINT k n 7 7 1 The integral over the full range 0 lt y lt 1 is then FINT k n MY 7 1 For integration the trapezondal rule is used which means the function Fy is approximated by a piecewise linear function The sum of FINT k n MY j l over n is stored in FALL k j For a given initial condition calculate the parameters and A and find FALL by 2 dimensional interpolation The asterisk x indicates the appropriate sum over the initial 79 polarization i e FALL FALL 1 hy h FALL 2 Then calculate the total probability P eq 138 times the time interval DT 2 2At Pore q PEA 148 Eeft Generate a uniform random number r in the interval 0 1 If r lt P decide to emit a photon and otherwise reject If rejected the helicity of the electron should be changed according to eq 12 to h 1 P hP he new MOI A P Co x FALL k 1 2 149 If accepted decide how many laser photons to absorb To do so sum up FINT x n MY 7 l from n 1 ton n until the sum becomes larger than r Then n will be the number of photons Once n is deter
80. ility functions G are multiplied by ENHBWF y Note that y close to 1 represents events with a large unbalance of energy between final electron and positron See NLBWGN for how the weight should be treated in the simulation Possible errors IRTN 1000 Memory insufficient You have to reduce MYxMPHxMXIXxMQ or in crease the parameter MW in the FORTRAN source IRTN 1001 to 1004 Either one of MY MPH MXI MQ is too large IRTN 1100 The enhancement function less than 1 at some y Event generation An event is generated by NLBWGN PG HG WL NL HL PD DT PMAX IRR NPH PELE HELE PPOS HPOS PROB WGT IRTN Input variables PG Array of dimension 0 3 Initial high energy photon 4 momentum eV c HG Photon helicity 1 lt HG lt 1 WL Laser photon energy eV NL Array of dimension 3 Unit vector along the laser direction HL Laser helicity 1 or 1 PD Laser power density Watt m2 DT Time interval times the velocity of light meter PMAX Maximum probability of pair creation in DT Same as in NLCPGN IRR Random number seed Output variables NPH If 4 0 number of absorbed laser photons If 0 no pair creation PELE Array of dimension 0 3 4 momentum of final electron 83 HELE Helicity of final electron PPOS Array of dimension 0 3 4 momentum of final positron HPOS Helicity of final positron PROB Calculated event probability Same as in NLCPGN WGT Event weight Same as in NLCPGN IRTN Return code The
81. ion 42 Thomas BMT equation 6 44 48 Time 10 18 26 time coordinate t 42 44 transverse mesh 23 50 uniform distribution 16 UNIX 39 user defined parameter 11 14 velocity of light 10 Weizacker Williams approximation 71 WRITE 29 zero padding 54
82. irs in a strong beam field is very expensive The worst ones are the pair particles having the sign of charge opposite to that of the on coming beam because they are trapped in the strong field region If you are not interested in them you can eliminate them during the PUSH loop as CLEAR BEAM INCP RIGHT KIND 2 CLEAR BEAM INCP LEFT KIND 3 if the right left going beam is electron positron Syntax Specify individual processes PPINT BW BH LL BREMSSTRAHLUNG RIGHT LEFT ENHANCE fenn 25 BW BH LL BREMSSTRAHLUNG Specify one of Breit Wheeer Bethe Heitler Landau Lifshitz and Bremsstrahlung interactions If more than one of these are needed apply PPINT command repeatedly No default RIGHT LEFT Applies to Bethe Heitler and Bremsstrahlung The Bethe Heitler process has two possible combinations namely y e and e y RIGHT LEFT option specifies the photon is right going or left going or both Default is both The Bremsstrahlung is treated as the interaction between real e and a virtual photon Therefore it also has two possible combinations This operand specifies which beam is the real particle leak Event rate enhancement factor It is unity when the number of created macro pairs is the same as the expected number of real pairs i e the weight of the pair particle is 1 fenn Default fenn 0 1 In using ABEL one had to define the minimum scattering angle and minimum transverse momentum This was d
83. ite space time coordinate but rather is a straight trajectory a world line which passes the space time point t x y s At the time when the PUSH command is executed they are first pulled to the intercept on t to plane where ty is the starting time of the PUSH loop When a BEAM command is inserted within a PUSH loop the particles are taken to the corresponding time t Time However it is safer not to insert BEAM command within PUSH 18 loop unless you know well what is going on One exception is the test particles which in some cases you want to create during a PUSH loop for example to see the behavior of a low energy particle created during interaction If you do not want them to be time shifted in such cases you can define the TXYS operand as TXYS Time where Time is the PUSH running time present time 3 4 LASER Defines a laser There can be upto 5 lasers but this can easily be increased parameter MLSR in source include lasrcm h One LASER command defines one laser Note that lasers if there are more than one act incoherently Their interference effects cannot be included in the present version The longitudinal time pulse shape can be Gaussian or trapezoidal but the transverse is Gaussian only Syntax LASER RIGHT LEFT WAVELENGTH A POWERDENSITY Pyeak TXYS t 2 y 5 E3 e oe e E1 e el er RAYLEIGH 81 82 GCUT naz SIGT 0 TTOT T506 GCUTT necut TEDGE Teage STOKES 1
84. ition rate is obtained by the following replacement in the formula 99 E gt Ey Eo f DD EX dE gt EGdE sis da E1 amp o amp 2 E o E Se 106 Tal By Be x06 Ignoring the terms related to the polarization correlation between the final electron and positron we obtain om dE EE E_ ae Al Tp a E 41 37 E2 CP 2 363 2E E_ 2 3 Cy JE2 K1 3 2 Fe a pa Ky 3 e1 1 e283 Fz at l 107 dW where Fcp is defined as E E Fop Ki 3 K9 3 108 K is the modified Bessel function and Ki is defined in eq 94 Their arguments are 7 defined in eq 106 The transition rate summed over the final polarization is am dE V3nE2 66 dW Fcp K 3 amp 3 109 Figure 10 Function Fop K2 3 amp 3 for three val ues of x The solid dot dash and dashed curves are for 0 1 1 re spectively The curves for 3 0 are normalized such that J FopdE E 1 and those for 4 0 are drawn with the same scale as the corresponding 3 0 curves Fop Ko 3 amp 3 The function Fop K2 3 3 is plotted in Fig 10 as a function of E E The function Fcp is available as a CAIN function FuncCP and its integral over 0 lt E E lt 1 as IntFCP See Sec 2 6 5 9 2 Algorithm of event generation The total rate for given is approximately am x EsX We Wop 4 Ue ama ea ps 0 m E x 3 e la x 3c1 3 50231
85. lag see below is on all the polarization effects longitudinal and transverse spin of electron positron and linear and circular polarization of photon are included Syntax CFQED BEAMSTRAHLUNG PAIRCREATION Jf POLARIZATION PMAX Pmax gt WENHANCE Wenp gt BEAMSTRAHLUNG PAIRCREATION Specifies which parameters to define here Only one of these may be specified by one CFQED command POLARIZATION Flag to take into account all the polarization effect default No Pmazx Wenh Note that the flag SPIN FLAG command must also be on for polarization calculation Maximum probability of events per one time step Default 0 1 When the probability exceeds pmax CAIN stops with a message Enhancement factor of radiation rate 0 lt Wenn When Wenn 1 default macro photons are created such that Mmacroy Tmacroe Nrealy Nreale When Wenn gt 1 lt 1 macro photons are created more less by the factor Wenn each having less more weight When Wenn 0 no photon is created but the recoil of electron is taken into account This operand is introduced in order to avoid poor statistics due to too less macro photons or memory overflow due to too many macro photons See Sec 5 8 and Sec 5 9 for the formulas and algorithm and for more detail on the enhancement factor 21 3 7 BBFIELD Define the parameters for the calculation of beam beam field Syntax BBFIELD R r Wri Wgr2 Waim1 Wxm2 Mo My mo
86. lectric field is E the magnetic field is given by B ce xE where es is the unit vector along the s axis c the velocity of light and the upper lower sign is for the field created by the right left goin beam In contrast to ABEL CAIN does not assume that all the particles have the above property Some particles may have low energies and large angles with respect to the s axis CAIN will work unless the sum of their weight becomes a significant fraction of the beam The equation of motion under the Lorentz force is integrated with possible low energies and large angles taken into account The calculation of the beam electric field is done in the following way First cut the right left going particles into longitudinal slices the width As is defined by the parameter Smesh Within each slice the following Poisson equation is solved ome Tg 49 AG x y 270 2 y E As where m is the electron mass in units of eV c re the classical electron radius in meters Po x y is the charge divided by the elementary charge per unit transverse area then E is given in units of V m For each slice and for each of right and left going beams a region x w 2 Y y 2 is selected where e Ye is the center of mass and w wy is the width determined by the input parameters The field created by the particles outside this region is ignored Let us name this region O O Fast Fourier Transformation In the region O the Poi
87. ll not cause a serious problem For lasers e axis must be specified explicitly Polarization related processes In any process involving polarizations the transition rate or crosssection is given by multiplying the density matrices and by taking the trace Therefore the expressions for the rates are bilinear forms for each polarization vector initial final electron positron or 44 photon The final polarization needs some comments The transition rate is written in general as w 5 far w 9 8 where represents the final energy momentum variables and w and g are functions of I The vector itself is not the final polarization Its direction is defined by the setup of the detectors What the term g means is that if one observes the spin direction e e 1 the probability to be found in the state te is given by 4 f dl w g e The final energy momentum distribution is determined by w J For given I the final polarization vector is see 3 page 254 C 9g 1 w00 9 Now consider a process involving initial and final electrons summing over other pos sible particles The transition rate is written as aw 5 far w 3 lt 97 GHG 10 where the subscripts and f denote initial and final variables 7 represents transpose and H isa 3x3 matrix For given the final energy momentum distribution is determined by w f In a Monte Carlo algorithm I is decided by using random numbers a
88. lt 3 0 lt s2 lt 3 See Sec 5 5 2 for definition cm sec bin LumFE k ki ni n2 2 D differential luminosity d dE dE for the bin n1 n2 cm sec bin LumEEbin k k 1 n Bin center eV of the n th bin of E l 1 or Ez l 2 If n 0 the number of bins is returned Error if n lt 0 or n is larger than the number of bins LumEEbinEdge k k 1 n Bin edge of the n th bin of E 1 1 or Ez l 2 See LumWbinEdge for the definition of n LumEEH k k n1 n2 h 2 D differential helicity luminosity LumEEP k kj 1 2 51 82 2 D differential polarization luminosity These functions can be included in expressions Thus you can write the computed lumi nosity on a file In particular the only way to retrieve the 2 D luminosity d dE dEz is to use the above functions because PLOT LUMINOSITY command cannot plot it KEK TopDrawer cannot draw 3 D plot So for example to write e e luminosity say SET mi LumEEbin 2 3 1 0 m2 LumEEbin 2 3 2 0 WRITE LumEE 2 3 n1 n2 n1 1 m1 n2 1 m2 FORMAT If you are satisfied with a pre defined format you can use PRINT WRITE LUMINOSITY command 24 3 10 PPINT Incoherent particle particle interaction such as incoherent pair creation and bremsstrahlung The following processes are included Breit Wheeler v y gt e e Bethe Heitler y e e 4 e e Landau Lifshitz e e gt e e e et Bremsstrahlung Ce ep ey All the processes except
89. m WX Wei WX 0071 Wy2J WXMAX Wam1 WXMAX Wai Wzm2 NX N 4 NY n PSIZE A mi NMOM R mom Horizontal width of the mesh in meters for right and left going beams If wz is not specified wz2 Wz is adopted No default for wy If WXMAX is given the with of the mesh region can vary in the range W2 Wxm When the beam fraction outside the range defined by WX and R is significant Note Wem gt We Aspect ratio w nz Wwy ny of the horizontal to vertical mesh size This is common to right and left going beams No default Number of horizontal and vertical bins Present version uses Fast Fourier Transformation so that a power of 2 is the best choice Other numbers are also allowed but those of the form 2 or 3 x 2 or 5 x 2 are recommended Default 32 Macro particle size in units of the bin size Macro particles are treated as a rectangular of uniform distribution Must be 0 lt A lt 1 Default 1 For x y points outside the mesh region a harmonic expansion using the elliptic coordinate is used The parameter Nmom specifies the truncation of harmonics Nmom 0 takes only the total charge term and Rmom lt 0 ignores the field outside Default 10 Note that the particles outside mesh region receive the beam beam kick unless Nmom lt 0 but the field created by them is not taken into account See Sec 5 6 for more detail Note that the longitudinal mesh size which is common to beam beam field a
90. mined the photon energy is determined by f dy FF r2 x FINT 0 where r is another uniform random number The left hand side is known for the mesh point of y i e FINT k n MY j l Since we approximate Fkn by a piecewise linear function of y the left hand side is a quadratic function between successive y s Thus inverse interpolation with respect to 1 by solving a quadratic equation gives the photon energy to be emitted The helicities of the final photon and electron are calculated from h 2 hr Fn heFsn 150 Fin F hrheFon Kelly ar Fin T hi Fon hn Emn a 151 Fin hrheFon Z for n n This is done by directly calling a Bessel function routine A 2 Breit Wheeler Process A 2 1 Formulas k kL p p 4momenta of the initial photon laser photon final electron and positron w wy Energies of the initial photon laser photon final electron and positron Laser intensity parameter n Laser energy parameter 7 k k 2m wrw m n Number of absorbed laser photons y p k k k w 0 lt x lt l1 u u 1 4x 1 x x 4 1 4 1 1 u 1 lt u lt ov tn Maximum u for given n un nn 1 80 Tn Yn 11 4 1 1 u May Initial photon helicity hr Laser helicity he Final electron helicity he Detector helicity of the final electron Oe Final electron angle Uh m 1 7 1 2 ama 1 2 1 8 La The argument of the Bessel functions in the following expressions
91. nd luminosity calculations has to be defined by the parameter Smesh by the SET command Its value at the time when PUSH started is used thoughout the PUSH loop 3 8 EXTERNALFIELD Define external field The present version allows only a constant field over an interval bordered by two parallel planes Syntax EXTERNALFIELD lS s182 V C 6 6 SEE o a B B By Bs Sj Cj Ej Define the range of the field as s1 lt CY CyY CS lt So Must be s lt s2 Default s oo s2 00 and cz cy s 0 0 1 Electric field components in units of V m Default 0 0 0 22 B Magnetic field components in units of Tesla Default 0 0 0 3 9 LUMINOSITY Define the transverse mesh size number of bins etc for luminosity calculation One luminosity command is needed for each combination of particles y e7 e right going and left going Thus there can be at most 9 LUMINOSITY commands Syntax LUMINOSITY KIND k k FREP fe W Wmin sW mge Mii W Wo Wi y VW ngad al Els Ermm Eimar l Mitin s EIS Eo Er 1 Emina E2 Emin E2marl nmin JE2 B20 E213 E2norin WX Wal Wam gt WY 0 0ym HELICITY ALLPOL kr ki Particle species of right and left going beams feg Repetition frequency Hz Used for the luminosity scale only De fault 1Hz Wmin Wmaz Nbin Parameters for differential luminosity with respect to the center of mass energy W Winin Wmax is the
92. nd numbers only There must be one or more than one blanck characters after a command_name before the first operand op is an operand having either one of the following forms a kwd b expr c kwd rel expr d expr rel expr Here rel is a relational operator which is either one of lt gt lt gt lt gt lt gt gt lt kwd is a keywaod i e a string consisting of upper case roman letters only which is predefined for each command expr is a mathematical expression described in Sec 2 5 An operand of the form a is a flag type operand In some commands the first operand must be a positional operand of the flag type For example DO command must be either DO WHILE or DO REPEAT In such a case the after the keyword may be omitted There is no ambiguity because keywords do not contain blanck characters in contrast to expressions FLAG command is special in that all the commas may be omitted because all the operands are type a The right hand side of type c can be expr expr or can be a character string for some operands Now let us describe the each command in detail When describing the command formats in this manual the type faced characters are those to be typed in the input data as it is The variable names in the FORTRAN source also appear in type face The items embraced by square brackets may be omitted in some cases and the vertical stroke indicates an
93. nd photons Originally it started with the name ABEL 1 in 1984 for the beam beam interaction in e e linear colliders At that time the main concern was the beam deformation due to the Coulomb field and the synchrotron radi ation beamstrahlung Later the pair creation by particle particle collision was added and it was renamed to CAIN when the interaction with laser beams radiation by elec trons positrons and pair creation by photons in a strong laser field was added for the y y colliders CAIN home page is located at http www acc theory kek jp members cain The first version CAIN1 1 2 which is a combined program of modified ABEL and a laser QED code is limited because it cannot handle the laser interaction and the ete interaction simultaneously and does not accept mixed ete beams To overcome these problems CAIN2 0 was written from scratch It now allows any mixture of e e y and lasers and multiple stage interactions The input data format has been refreshed completely The physical objects which appear in the present version CAIN2 1e are two particle beams lasers and external fields Each of the two beams may consist of high energy electrons positrons and photons One of the beams may be absent A basic assumption is that each beam must be a beam i e most particles in each beam go almost parallel CAIN assumes the two beams go opposite direction For the case they make a large angle you can apply CAIN command
94. oherent processes defined by PPINT com mand Otherwise normal particles only If you want both execute the command twice Write only photon k 1 or electron k 2 or positron k 3 selectively Default all Write the beam statistics data Syntax PRINT STATISTICS INCP SHORT LONG FILE f APPEND STATISTICS Write beam global data such as number of particles r m s size etc SHORT LONG INCP tn Print only the number of macro and real particles If none of SHORT and LONG is specified print average and r m s of t x y s and E pz Py Ps as well as the average spin components Print max and min in addition to the standard items Include incoherent particles only Otherwise normal particles only If you want both execute the command twice File reference number See above for default Write the calculated luminosity Syntax PRINT LUMINOSITY KIND k k2 FILE f APPEND LUMINOSITY Write calculated luminosity specified by k1 k2 30 ky ke Define right and left going beams All the luminosities differential and polarization defined by the LUMINOSITY command will be printed The print format is complicated Just try Ta File reference number See above for default Write the values of parameters and expressions Syntax PRINT PARAMETER FILE f z l zol 73 FORMAT fmt PARAMETER Write values of predefined or user defined parameters
95. or expressions Can be omitted Ta File reference number See above for default iy Expressions It is safer to enclose each expression by or or It is also possible to write a do type sequence of the form almost like FORTRAN yi s s Un 1211 322 13 where y s are expressions i is a user parameter name need not be de fined by SET command 11 i2 and 13 are expressions for initial final and increment values of i If 3 is omitted 73 1 is adopted Note that 71 12 and 3 are considered to be integers Nint is applied Do type sequence may be nested as in FORTRAN The do control vari able must not duplicate of course Duplication within the sequence is checked but possible interference with variables outside PRINT or WRITE is not checked fmt Fortran format Must be enclosed by CAIN does not check the grammer so that a wrong format will cause an abnormal term by your computer system Note that all the expressions are REAL 8 You can not use l format If format is not specified printed as expression value by 1PD15 8 one line for each If format is given but there is no expression to be printed the format is executed as in FORTRAN For example WRITE FORMAT nothing will cause nothing be printed Unfortunately the grammer of CAIN does not allow an un paired apos trophe so that for example 1H will cause an error 3 There is no such a rule that a user parameter name
96. owed by a space of length l2 followed by a line l3 etc The whole pattern is repeated For example LINEMODE 0 1 0 1 will cause a dashed line If LINEMODE is not defined or only l is specified a solid line is plotted Other operands are the same as for the histogram You can plot many functions in a frame by using NONEWPAGE option 3 18 CLEAR Clear disable the beam laser etc The first operand is a positional keyword Clear particles Syntax CLEAR BEAM TESTPARTICLE INCP RIGHT LEFT KIND k k k2 TESTPARTICLE Clear test particles INCP Clear particles created by incoherent processes defined by PPINT If none of TESTPARTICLE and INCP is specified normal particles are elimi nated Therefore if you want to eliminate all you need CLEAR command twice CLEAR BEAM TESTPARTICLE INCP CLEAR BEAM RIGHT LEFT Clear right or left going particles only Default both k k k2 Clear photon k 1 or electron 2 or positron 3 only Turn off lasers 35 Syntax CLEAR LASER Turn off LASERQED Syntax CLEAR LASERQED Jf COMPTON BREITWHEELER Clear parameters for the laser QED If either one of COMPTON or BREITWHEELER is specified the other one is not turned off Clear luminosity Syntax CLEAR LUMINOSITY Clear luminosity integrals as well as the definitions of luminosities Note that the contents of luminosity integrals are cleared whenever the PUSH command s
97. photon energy can be used G T y is slightly larger when e2 1 but still G T y lt 1 For the given radiation energy E Ep the polarizations of the final electron and photon are calculated by the prescription described in Sec 5 2 2 Thus 2 Cr a Fis Riper Z 7 eu evKinys ergJedK 101 _ z Bigs _ 22 23 Kg 2 _ Kays EKiysle2 Ci i lt a Fy e1 i E2 2 1 x Fo e Cu s R 102 In the case when the event generation is rejected the polarization of the electron must be changed according to eq 12 Qam P E naval ek jalzhda 103 0 In storage rings the electron polarization builds up slowly along the direction of the magnetic field This effect comes from the difference between the coefficient of and see eq 14 2 e a l zx m 1 2 K4 3 104 When Y is small lt 10 in storage rings each term on the left hand side is proportional to Y whereas the right hand side is Y because of cancellation CAIN cannot reproduce such slow buildup even if the computing time allows because the approximate polyno mials adopted do not have that accuracy They are enough however for beam beam problems 5 8 4 Enhancement factor of the event rate CAIN normally produces macro photons such that the expected number of macro photons per macro electron is equal to the expected number of real photons per real electron In some cases how
98. puted at each time step for each longitudinal slice but they are not kept in the memory They can be plotted only at the time moment and for the slice which is being proccessed Thus this command is to be inserted during PUSH loop The slice is specified by the S operand Syntax PLOT BBFIELD S s S s e O A FILE fn 5 Si Define the s coordinate Plot for the slice which contains one of s s Upto 5 s s can be specified Plot a function Syntax PLOT FUNCTION NONEWPAGE H f V f PARAMETER name RANGE x1 1 2 N XLOG HSCALE min Uma VSCALE Ymin Ymax HLOG VLOG LINEMODE l l2 TITLE top title HTITLE bottom title VTITLE left title PILES fh 34 Joy Define the function to be plotted in the parameterized form They should normally contain the variable defined by the PARAMETER command name Name of the parameter to vary Must satisfy the constraints as a user defined variable and must not be the pre defined names If you want to plot the sine function for example you would say PLOT FUNCTION PARAMETER x RANGE 0 2 Pi H x V Sin x HSCALE 0 2 PI VSCALE 1 1 TLT Define the range of the parameter x 4 12 n Number of points 1 in the range x1 22 Default n 100 XLOG Divide the range uniformly in log scale Otherwise linear l1 l2 Define the line mode meaning a line segment of length J in units of inches foll
99. r in 0 27 These variables are then transformed to to t q y Finally the energy momentum is given by ee o bas eta a X Oy sin Pay COS dzy Y E Eo Eoe1 E2 m2 Pe EN TF aa ya Pr ps a Py lps y t Go a aa S y T y 25 26 27 28 where is for right going beam and for left going note that right left appears only here and m is the relevant particle mass in units of eV c 47 5 4 Solving Equation of Motion Under the PUSH command the equation of particle motion is solved step by step with the Time as the independent variable The time step size is determined automatically for each particle Smaller step size is used for low energy particles On the other hand an exact solution is used in the case of DRIFT EXTERNAL command which uses either the time or s as the independent variable 5 4 1 Equation of motion under DRIFT EXTERNAL command The present version of CAIN accepts a constant external field only The covariant form of the equation of motion dx 1 dp e p F p 29 drm dr m 2 where 7 is the proper time and F the electromagnetic field tensor can be solved exactly when the field is constant The eigenvalues of the matrix f eF m is given by 41 and w 2 where wi Vive 4 a wy iy Va 4b a 30 with E B 31 2 2 a E Bd 3 Then the solution is 1 sinh wT w w1 wz V a
100. r is circularly polarized by 100 The present version accepts such case only In the case of the nonlinear Compton process e laser e 7 the number of emitted photons per unit time can be expanded in the form 2 2 00 Wn _ T T W EN dw 1 hehe Fin hal he he Fon hehe Esn T h hi Fan 7 heFan n 1 87 E w Energy of the initial electron and final photon he hr Helicity of the initial electron and laser 1 lt he lt 1 hy 1 he hy Detector helicity of the final electron and photon Wn Maximum photon energy when n laser photons are absorbed n n E n 1 2 nA 88 A Laser energy parameter 4w E m wy laser photon energy Fin Functions involving Bessel functions See Sec A 1 for the definition The photon emission angle is uniquely determined from n and w The formula for the nonlinear Breit Wheeler process y laser e e can be written in a similar form The total number of pair electrons per unit time summed over the positron polarization is am e w En W 5 dE Gin hrhyGsn helht Gon hyGan 89 20 42 n En w E Energy of the initial photon and final electron h he Initial photon helicity and detector helicity of the final electron n Laser energy parameter 7 wrw m wg laser photon energy lM This should be treated by the CFQED command If users want EXTERNALFIELD command will be rewritten so as to accept varying
101. r processes the laser field intensity is charac terized by the parameter v a a a AAA 134 m where m the electron rest mass in eV c and a is the vector potential 4 vector of the laser field When the laser is circularly polarized completely is a constant and is given in terms of the laser power density as g Y ge 135 where Az is the laser wavelength 27 in meter c the velocity of light in m s op 4r x 10 and P the power density in Watt m A 1 Compton Process A 1 1 Formulas In the following is an approximation in the frame where the initial electron and laser collide head on and the electron is ultra relativistic p krp k 4momenta of initial electron laser photon final electron and emitted pho ton respectively E w E w Energies of initial electron laser photon final electron and emitted photon respectively A Laser energy parameter 2k p m 4w m 75 n Number of absorbed laser photon The kinetic relation q nkf q k holds exactly Here q is defined as 2 2 Et A 1 E4 m 136 p p is replaced by p for q and is called quasimomentum x k ki pkr 2w 0 lt a lt 1 v v z 1 x x v 1 v 0 lt v lt dv 1 v dz Un Maximum v for given n Up nA 1 ta Maximum z for given n n Un 1 Un ndA 1 nA hz Laser helicity 1 or 1 Meta Initial and final electron helicities
102. ree vectors eV e k k form a right handed orthonormal basis The density matrix is defined as pi e ei e e 6 This is Hermitian with unit trace as in the case of electron density matrix so that it can be written as p 1 14 amp 0 E Trace p0 7 The 3 vector is called the Stokes parameter In the standard representation of the Pauli matrices the three components of have the meaning amp Linear polarization along the direction e e v2 gt 0 or eV e v2 lt 0 z Circular polarization E3 Linear polarization along the direction e 3 gt 0 or e lt 0 The linear polarization can also be written as 3 cos 26 and z sin 2 rz gt 0 where z is the magnitude of linear polarization and modulo 7 is the angle of the polarization plane measured from the e axis counterclockwise Completely polarized states have 1 A single photon is always in a completely polarized state Mixed states may have amp lt 1 In contrast to the case of electron positron the polarization of a photon with a given momentum cannot be defined by the three numbers one has to define the e axis The most general way is that every macro photon carries its own e axis but this is too much redundant CAIN adopts the convention that e is parallel to e e k k where k is the photon momentum This is ill defined when k is parallel to e but it wi
103. results and the end of a command must explicitly said by semicolon without relying on the end of line The whole text after comment part is eliminated is divided into command blocks The end of a command block is indicated by a semicolon If is inside a pair of apostrophes it is not considered to be a command terminator Each command block has the following structure command_name operand operand operand After the command_name before the first operand there must be at least one blanck character unless there is no operand Operands are separated by a comma and the number of blancks before and after is arbitrary In some commands can be replaced by one or more blancks Unless stated in each command description in the next section the order of operands is arbitrary An operand is either a single keyword or of the form keyword relational_operator right_hand_side A keyword is an alphanumerical string predefined for each command The relational operator is either one of lt gt lt gt lt gt lt gt gt lt The right_hand side is just a number or an expression to be explained later or of the form expression expression expression The parenthesis may be replaced by or 4 pr 2 4 Commands As stated above each command block must start with a command name The present version has the following commands FLAG On off flags
104. rotation etc can be done to some extent by using the command LORENTZ Test particles Definition of test particles can also be done by BEAM command One BEAM command is needed for each test particle The number of test particles times the number of PUSH time steps must be less than 5000 parameter MTSTP in the file cain source include tstpcm h Test particles do not create a field but feel a field They do not interact with lasers and do not create particles such as beamstrahlung incoherent pair etc Therefore test photon does not make sense Coordinates and energy momentum of test particles can be refered to at any time by functions TestT etc See Sec 2 6 Syntax BEAM TESTPARTICLE NAME n name KIND k TXYS t x y s P Pps PysPs 5 n name A test particle must have a name consisting of upto 3 characters The name left adjusted must be enclosed by a pair of apostrophes It can also be specified by an integer 99 lt n lt 999 which is converted to a decimal character string right adjusted Thus NAME 1 and NAME 1 is identical In the computer one character T is added at the top Thus NAME 999 becomes T999 k Particle specie t T Y S Location of the test particle m Pr Py Ps 3 momentum eV c ps must not be zero i e either right going or left going What is actually defined by the particle variables t x y s and E pz Py ps is not a particle at a defin
105. rticle particle interaction such as incoherent pairs is the sum of GENs of the parents In this case GENs of the parents do not change WGT Weight Number of real particles represented by the macro particle NAME 4 byte character string Normally blanks The test particles have Tnnn where nnn is a three digit number NAME of the particles created by inco herent particle particle interactions starts with I For example IBW IBH ILL for the pairs created by incoherent Breit Wheeler Bethe Heitler Landau Lifshitz processes respectively 5 2 2 Description of Polarization Convention for electron positron polarization In most applications one is interested in the helicity states Therefore one possible way of expressing the electron positron spin is to store the information whether each macro particle is in the helicity h 1 state of 1 state The unpolarized state is represented by an equal number of macro particles with h 1 and 1 The spin may flip at the interactions such as laser Compton scattering and beamstrahlung However this simple way cannot be applied to our case because for example a pure transverse polarization may become longitudinal during the precession in a magnetic field beam beam field or external field In order to include such classical precession effects the phase relation between the up and down components of the spinor is important This problem can be solved by using the d
106. sent run is erased and replaced by the data in the file These two commands are introduced for convenience in splitting a job into two jobs for calculation and for output For example if you expect a long job but do not know what is to be printed plotted You write WRITE BEAM FILE beam_file STORE STORE LUMINOSITY near the end of the long job Then you can print plot the beam in the next job by BEAM FILE beam_file RESTORE RESTORE LUMINOSITY PLOT ias Here in the PLOT command you can use the variables you defined in the previous job If you want different plots you can repeat the second job However keep in mind that these commands are not intended to split a job at arbitrary point Only the user variables luminosity data and particle data can be transfered to later jobs by STORE RESTORE and WRITE BEAM commands 3 22 STOP Stop CAIN run 3 23 END Indicates the end of input data If absent added at the end of file At the beginning of CAIN run the input file is read through until END or end of file and the command structure command names and the terminator is checked Thus the grammer beyond END is not checked in contrast to STOP 38 4 Installation The present version CAIN 2 1e is working on a UNIX system It should be very easy to install CAIN2 1e in other UNIX system To obtain CAIN by anonymous ftp 1 Go to the CAIN home page http www acc theory kek jp members cain and cli
107. ser helicity 1 or 1 PD Laser power density Watt m2 DT Time interval times velocity of light meter 78 PMAX IRR Maximum radiation probability in the given time interval If the proba bility exceeds PMAX return with IRTN 100 without event generation You need to reduce the time interval DT If you set for example PMAX 0 1 then you are ignoring the probability PMAX 0 01 of two and more events within DT A smaller PMAX is safer but more time consuming Random number seed Output variables NPH PEZ HE2 PG HG PROB WGT IRTN Possible errors IRTN 1000 IRTN 1001 IRTN 1002 IRTN 100 If 0 one event is created with NPH laser photon absorption If 0 no radiation following variables are meaningless Array of dimension 0 3 Final electron 4 momentum eV c Final electron helicity 1 lt HE2 lt 1 Array of dimension 0 3 Final photon 4 momentum eV c Final photon helicity 1 lt HG lt 1 Calculated event probability When an error occurs with IRTN 100 you have to multiply DT at least by a factor PROB PMAX Weight factor of the event It is always 1 if LENH 0 at the initialization If not equal to 1 then you should asign a weight woxWGT for the final photon end electron and let the initial electron survive with the weight wo X 1 WGT where wo is the weight of the initial electron before the event If WGT 1 you should eliminate the initial electron and asign t
108. sson equation is solved using the FFT Eq 49 can formally be solved as 2A r J G r r p r dr G r log r 50 Divide this region by na x ny grid Within each cell i j i 1 ne j 1 ny the the density p x y is approximated by Q AzAy where As wz nz Ay Wy Ny and Qij is the total charge in the cell Qij mlz y daxdy 51 fas in mesh ij where x yj is the cell center coordinate Then eq 50 becomes a sum over the cells su Y Gerr Quy 52 it at 2 oJ The kernel matrix G has to be calculated by taking average over the source cell log ai 2 y y Jandy 53 1 ENE 3 AzA x y in cell i j 2 53 Figure 4 Doubled re gion for FFT The solid frame indicates the dou o bled region for FFT and its left bottom quadrant is the charge region wy X wy The region hatched by solid lines is the real charge Blas region and that by dot ted lines the ghost charge due to the periodicity of Fourier transformation This averaging is important when A A is far from unity The convolution in eq 52 can be done efficiently by using FFT However if we apply FFT for the finite region wy wy instead of the infinite region in eq 50 we would be assuming a periodic charge distribution i e the charge distribution in Wr Wy is infinitely repeated To avoid this problem we use the following trick First double the region to 2w 2w by p
109. t event need not be taken into account In contrast to ABEL CAIN does not assume the particles are ultra relativistic Therefore unless the beam beam field created by the pair particles becomes significant their trajectories are correctly calculated Note however that only the beam field due to the on coming beam is taken into account in the present version The beam field in the same beam may have significant effects on low energy particles Among the four QED processes above the Breit Wheeler process is treated as a funda mental process Others are reduced to the former or to the Compton process in the case of Bremsstrahlung by using the virtual photon approximation As for the polarization only the circular polarization of initial photons in the direct non virtual Breit Wheeler process is taken into account 5 10 1 Breit Wheeler Process The differential crosssection with respect to the scattering angle of the final electron in the center of mass frame is given by dozy am p st rt fo foh 115 dc area Lo f2 with w pc 1 mm NY 11 1 __ 116 fo w pe t3 wW pe 116 wW pc 2m fz ae pe 1 w prc ae where 69 w p Energy and momentum of final electron in the center of mass frame Cc Cosine of the scattering angle 0 of the final electron in the center of mass frame h Product of circular polarizations of the two initial photons The total crossse
110. tarts Thus if you do another PUSH without CLEAR LUMINOSITY the luminosity command will be still active and the integration starts from scratch Turn off beam beam field Syntax CLEAR BBFIELD Turn off the external field Syntax CLEAR EXTERNALFIELD Turn off CFQED Syntax CLEAR CFQED BEAMSTRAHLUNG COHERENTPAIR If none of BEAMSTRAHLUNG and COHERENTPAIR is specified both is turned off Turn off PPINT Syntax CLEAR PPINT Turn of particle particle interaction defined by PPINT command Note that this does not mean to eliminate particles already created 36 3 19 FILE Open close rewind a file The first operand is positional Syntax FILE OPEN CLOSE REWIND ENDFILE UNIT ny STATUS status NAME fname nf Logical file number No default status For OPEN one of NEW OLD SCRATCH UNKNOWN Default UNKNOWN For CLOSE one of KEEP DELETE Default KEEP Not used for REWIND and ENDFILE Need not be enclosed by apostrophes fname File name Used for OPEN only Need not be enclosed by apostrophes if the name does not include parenthesis comma and semicolon 3 20 HEADER Define the header for TopDrawer plots Effective until next HEADER command appears Syntax HEADER header_string header_string Character string Upto 120 characters Strings delimited by commas like string stringa are concatenated The case string for Top Drawer can be defin
111. tremely large 14 This must be much smaller than 1 Otherwise the probability of emitting more than one photon during At cannot be ignored The maximum po is defined by the keyword PMAX When Y is very large Po is suppressed by the factor 1 4T However in defining At by the number of steps in PUSH command so as to make po small enough you have to omit this factor because the energy of some electrons can be much smaller after first radiation 63 Figure 9 The acception probability in the step 6 as a function of Y The solid line is the unpolar 0 6 7 F FG T y dy ized case The dot dash and 0 4 F dotted lines are polarized cases with e2 1 and 7 0 24 L 1 respectively 0 0 T T T i 1 ix10 1x107 1x10 1x10 1x10 1x10 2 3 4 5 Calculate G T y A polynomial approximation is used for Ky 3 and Kis 3 The relative error is less than 1074 Generate one random number p which is uniform in 0 1 If p gt po reject emitting a photon Otherwise Generate one more random number y uniform in 0 1 6 If p gt poG T y reject emitting a photon Otherwise 7 Emit a photon whose energy is given by eq 95 The cases when accepted in 3 but rejected in 6 cause a waste of time because the calculation of G Y y is the most time consuming The probability to be accepted in 6 is plotted in Fig 9 is given by le G Y y dy and is plotted as a function of Y One fin
112. ue to the ultra relativistic approximation employed there CAIN does not need these parameters 3 11 PUSH ENDPUSH Define the time step loop of tracking Tracking is done by a pair of commands instead of one single command in order to allow users to take action such as print plot insert test particles etc at arbitrary time steps Syntax PUSH Time to tf n any commands ENDPUSH to t Start and end time multiplied by velocity of light of tracking meter Note the spelling of Time which contains lower case alphabet in contrast to other operand keywords consisting of upper case letters only In fact Time is a pre defined variable name Therefore you can for example print its current value during PUSH loop by PRINT Time FORMAT ne Number of time steps gt 0 Actual control of the loop is done in the following way e Before the first time step all the particles are made to drift to t ty by straight lines e At the PUSH command of j th loop j 0 1 mz the time variable Time is set to t to At where At ts tp n e Execute commands between PUSH and ENDPUSH e Control comes to ENDPUSH If j lt n make tracking beam beam beamstrahlung laser interaction etc for the time step t lt Time lt tj41 26 e If j lt m returns to PUSH Note that the commands between PUSH and ENDPUSH are executed n 1 times If n 0 the actions taken are to drift all particles to t and to
113. ust have the same value of wz Wy Wem Wym and frep Specify them at the first LUMINOSITY command Note that the longitudinal mesh size which is common to beam beam field and lumi nosity calculations has to be defined by the parameter Smesh by the SET command The luminosity is actually computed by the PUSH ENDPUSH loop The calculated lumi nosity can be referred to by the following functions If during the loop the accumulated luminosity upto that moment is returned Lun k ky Luminosity of KIND k k in units of cm sec LumH k k h Helicity luminosity helicity combination h 1 h 2 h 3 h 4 h 0 will give the total luminosity Lum k ky em sec LumP k k 51 82 Polarization luminosity 0 lt s lt 3 0 lt s2 lt 3 See Sec 5 5 2 for definition cem sec LumW k k n Differential luminosity in the n th bin cm sec bin LumWbin k k n Bin center eV of the n th bin If n 0 the number of bins is returned Error if n lt 0 or n is larger than the number of bins LumWbinEdge k k n Bin edge eV of the n th bin 0 lt n lt number of bins n 0 is the lower edge of the first bin and n number of bis is the upper edge of the highest bin Error if n lt 0 or n is larger than the number of bins LumWH k kj n h Differential helicity luminosity cm sec bin LumWP k ki n 51 52 Differential polarization luminosity 0 lt s
114. y selected Default plot all points Other operands are the same as for the histogram Plot the test particle data Syntax PLOT TESTPARTICLE RIGHT LEFT A KIND k ki ke y H f V fys HSCALE E mins Emas a VSCALE mins man a TITLE top_title al HTITLE bottom_title VTITLE left_title sl FILE Other operands are the same as for the scatter plot Note that the information of the test particle history is stored in contrast to normal particles Thus you can say for example H T to see the trajectory as a function of time The plot may show apparently unphysical features when you apply DRIFT command DRIFT command may be used to pull particles to a certain position or time This does not corresponds to a physical motion Even in such cases test particle coordinates are stored at the end of DRIFT command Moreover in contrast to the PUSH command step by step information of test particles during DRIFT command is not stored because DRIFT command calculates particle trajectories by a single step using exact analytic formulas Plot the differential luminosity The differential luminosity w r t the center of mass energy can be plotted if defined by LUMINOSITY command and calculated by PUSH command Only the 1 D differential lu minosity d dW is plotted 2 D differential luminosity dL dE dE is not plotted because the TopDrawer available at KEK HP station is not capable of 3 D plot Syntax PLOT
115. zation is needed The Lorentz transformation is a little complicated because eq 67 is far from a covari ant form The particle coordinates and the external fields are transformed immediately when LORENTZ command is invoked and the transformation parameters are forgotten In the case of lasers the transformation is not done immediately but instead the transforma tion parameters are stored When the laser is called at every time step for each particle the particle coordinates are Lorentz transformed back to the frame where the laser was defined and the calculated parameters A w e W eY e are transformed to the current Lorentz frame Therefore the Lorentz transformation is a little time consuming 5 7 2 Linear Compton Scattering When the parameter NPH 0 is specified in LASERQED command the formulas of linear Compton scattering are used Let us define the following variables in the rest frame of the initial electron 97 wu Initial laser and final energies of the photon EE Initial laser and final momenta of the photon 0 9 Polar and azimuthal scattering angle of the photon dQ Solid angle sin ddo m w dw d EM Eg Photon Stokes parameters before and after collision as defined in 3 page 361 The range of w is given by To SS 122 71 The Compton relation is 1 1 1 a cos 0 72 wh w m The crosssection is given by eq 87 22 in 3 a 4 P F F3 T ae am z ES Ta E rae Wm alo 0 3 3 3 11 22 3363 a
116. zation vector s Cy s for elec trons positrons Let us denote the three numbers in general by s s1 S2 53 Then the crossection of a particular interaction integrated over a given final state energy momentum and polarization is in general written in the form 3 o 5 sige a 42 i j 0 where R and L represent the right and left going particles and sy 1 for notational convenience The number of events N during a beam collision is obtained by integrating eq 42 with an appropriate factor over the momentum the interaction volume and time N J dr dtdp dp of 43 where f is the particle density functions with kinematic factors and is found in eq 38 Since s and s depend on the particles in general we get different coefficients from 5l term to term of eq 42 Thus the number of events is written in the form 3 N 5 Orj Lija Loj Ja dt dp dp sP f 44 t j 0 When the right and left going beams are primary beams the polarization is often uniform i e independent of energy momentum and space time to a good approximation In such a case L j is simply given by Laa where Loo is the total luminosity and st is the polarization vectors of the beams Then the number of events is Lo where a is given by eq 44 with beam polarization value gn plugged in Let us consider the helicity component in electron electron collision The helicity is approximately and for right and left going

Download Pdf Manuals

image

Related Search

Related Contents

Titanic uzytkownika v6_14 EN  説明書 - pb ピービー  用品類パンフレット(中学校)  MANUAL DEL OPERADOR  BEDIENUNGSANLEITUNG - LS Funkalarm Anlagen  Samsung GT-C3303K Hướng dẫn sử dụng  PV16  取扱説明書 - ダイエンジニアリング  Samsung SMART CAMERA WB855F Užívateľská príručka  スライド 1  

Copyright © All rights reserved.
Failed to retrieve file