-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsim.h
executable file
·60 lines (50 loc) · 2.09 KB
/
sim.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
enum eltype {offset,vdc1_11,endcap,rf,cnt_eltype};
enum axis {X,Y,Z,cnt_axis};
enum fit {offsetfit,ampfit,cnt_fit};
#define maxionanz 2
extern EXPORT void Auswertung(int stepEval);
extern EXPORT void oldAuswertung(int stepEval);
class EXPORT Kibblesim{
public:
double lebenszeit[maxionanz];
int simnum;
Kibblesim();
~Kibblesim();
void LaserXYZ(double v[maxionanz][3], double deltat);
void Laser(double v[maxionanz][3], double deltat, int axis);
void Freeze(double t, double v[maxionanz][3]);
void FreezeRad(double t, double v[maxionanz][3]);
void FreezeAx(double t, double v[maxionanz][3]);
void Squeeze(double t, double v[maxionanz][3], double x[maxionanz][3], double a[maxionanz][3], double deltat);
void TestSqueezeKick(double v[maxionanz][3],double v12[maxionanz][3],double x[maxionanz][3],double &t, double h);
void NoiseHeat();
void Restart(double &t);
int Signum(double zahl);
double RandomReal(double min, double max);
double RandomGauss(double mean, double sigma);
double RandomExp(double tau);
void PhaseScramble(double v[maxionanz][3], double x[maxionanz][3], double a[maxionanz][3]);
void StepSqueeze(double v[maxionanz][3],double v12[maxionanz][3],double x[maxionanz][3],double t,double h);
void Force(double t,double x[maxionanz][3], double v[maxionanz][3],double a[maxionanz][3], double v12[maxionanz][3],double phi);
void ForcePseudo(double t,double x[maxionanz][3], double v[maxionanz][3],double a[maxionanz][3], double v12[maxionanz][3],double phi);
void propagateForwardVerlet(double &t,int n,double x[maxionanz][3],double v[maxionanz][3],double *rms=0,int *iternum=0);
void GetStartPositions(double t,double x[maxionanz][3], double v[maxionanz][3]);
void initSim();
void Sim();
double trapFreq(int axis,int anzosci);
double scatterCount();
double rfvoltage;
double rfvoltageX;
double a[maxionanz][3];
double x[maxionanz][3];
double v[maxionanz][3];
double v12[maxionanz][3];
double xtemp[maxionanz][3];
double vtemp[maxionanz][3];
double t;
double t0;
double phi;
double HCphi;
int simstepsMT;
double h;
};