source: MML/trunk/at/simulator/element/user/gwig.h @ 4

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

Initial import--MML version from SOLEIL@2013

File size: 1.8 KB
Line 
1/*
2 *----------------------------------------------------------------------------
3 * Modification Log:
4 * -----------------
5 * .02  2003-04-29      YK Wu, Duke University, wu@fel.duke.edu
6 *                      use scientific notation for constants
7 *
8 * .01  2003-04-28      YK Wu, Duke University, wu@fel.duke.edu
9 *                      header file for gwig.c
10 *----------------------------------------------------------------------------
11 *  Accelerator Physics Group, Duke FEL Lab, www.fel.duke.edu
12*/
13
14#define WHmax 200
15#define GWIG_EPS (1e-6)
16
17static const int Elem_Entrance = 1;
18static const int Elem_Exit =-1;
19
20static const double q_e    = 1.602176462e-19; /* electron charge, [C] */
21static const double m_e    = 9.10938188e-31;  /* electron mass, [kg] */
22static const double clight = 2.99792458e8;    /* speed of light [m/s] */
23static const double r_e    = 2.817940285e-15; /* electron classic radius,[m]*/
24static const double XMC2   = 0.510998902e-03; /* mc^2 in GeV */
25static const double PI     = 3.141592653589793238462643383279502884197e0;
26
27struct gwig{
28  int Pmethod;      /* Integration Method */
29  int PN;           /* Number of integration steps */
30  double E0;        /* Energy of ring, [GeV] */
31  double PB0;       /* B0 in [Tesla] */
32  int Nw;           /* Number of periods */
33  double Lw;        /* Wiggler Period [m] */
34  int NHharm;       /* No. of horizontal harmonics */
35  int NVharm;       /* No. of vertical harmonics */
36  double Aw;        /* Wiggler parameter */
37  double Zw;        /* Longitudinal variable [m] */
38
39  double HCw[WHmax];
40  double VCw[WHmax];
41  double HCw_raw[WHmax];
42  double VCw_raw[WHmax];
43  double Hkx[WHmax];
44  double Hky[WHmax];
45  double Hkz[WHmax];
46  double Htz[WHmax];
47  double Vkx[WHmax];
48  double Vky[WHmax];
49  double Vkz[WHmax];
50  double Vtz[WHmax];
51};
52
Note: See TracBrowser for help on using the repository browser.