source: MML/trunk/machine/SOLEIL/StorageRing/insertions/IDStarter/idKicks2FldInt.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 525 bytes
Line 
1function [i1, i2] = idKicks2FldInt(vKicks, x_or_z_pos, idLen, idKickOfst, elecEn_GeV)
2
3m = 9.10953447E-31; % Mass of electron in kg
4e = 1.602189246E-19; % Charge of electron in Coulomb
5c = 2.99792458E+08; % Speed of light in m/s
6
7gam = elecEn_GeV/(0.511e-03);
8
9cf = 10000.*m*c*gam/e; % To obtain results in [G*m], [G*m^2]
10if strcmp(x_or_z_pos, 'z') ~= 0
11    cf = -cf;
12end
13
14i1 = cf*(vKicks(1) + vKicks(2));
15
16distBwKicks = idLen - 2*idKickOfst;
17i2 = 0.5*cf*((idLen + distBwKicks)*vKicks(1) + (idLen - distBwKicks)*vKicks(2));
18
Note: See TracBrowser for help on using the repository browser.