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