bpmorbit/bpm_orbit.h

Go to the documentation of this file.
00001 
00013 #ifndef BPMORBIT_H__
00014 #define BPMORBIT_H__
00015 
00016 /* -----------------------------------------------------------------------------
00017 // includes
00018 // -------------------------------------------------------------------------- */
00019 #include <math.h>
00020 #include <bpm/bpm_defs.h>
00021 #include <bpm/bpm_interface.h>
00022 
00023 /* -----------------------------------------------------------------------------
00024 // macro definitions
00025 // -------------------------------------------------------------------------- */
00026 
00027 /* -----------------------------------------------------------------------------
00028 // typedefs, enums and other declarations
00029 // -------------------------------------------------------------------------- */
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00038   struct v3 { 
00039     double x; 
00040     double y; 
00041     double z; 
00042   };
00043   
00044 
00049   struct m33 {
00050     double e[3][3]; 
00051   };
00052 
00053 
00054 
00055 /* -----------------------------------------------------------------------------
00056 // function prototypes and declarations
00057 // -------------------------------------------------------------------------- */
00058 
00059 
00075   EXTERN int generate_bpm_orbit( beamconf_t* beam, bpmconf_t* bpm );
00076   
00077 
00078 
00091   EXTERN int generate_corr_scan( bpmconf_t* bpm, beamconf_t* beam, int num_evts,
00092                                  int num_steps, double angle_range, double angle,
00093                                  double z_pos );
00094 
00095   
00108   EXTERN int generate_mover_scan( beamconf_t* beam, int num_evts, int num_steps, 
00109                                   double mover_range, double angle );
00110 
00111   
00112 
00114   void   v_copy(struct v3 *v1, struct v3 *v2);
00115 
00117   double v_mag(struct v3 *v1);
00118 
00120   void   v_scale(struct v3 *v1, double dscale);
00121 
00123   void   v_norm(struct v3 *v1);
00124 
00126   void   v_matmult(struct m33 *m1, struct v3 *v1);
00127 
00129   void   v_add(struct v3 *v1, struct v3 *v2);
00130 
00132   void   v_sub(struct v3 *v1, struct v3 *v2);
00133 
00135   double v_dot(struct v3 *v1, struct v3 *v2);
00136 
00138   void   v_cross(struct v3 *v1, struct v3 *v2);
00139 
00141   void   v_print(struct v3 *v1);
00142 
00144   void   m_rotmat(struct m33 *m1, double alpha, double beta, double gamma);
00145 
00147   void   m_matmult(struct m33 *m, struct m33 *m1, struct m33 *m2);
00148 
00150   void   m_matadd(struct m33 *m1, struct m33 *m2);
00151 
00153   void   m_print(struct m33 *m1);
00154   
00155 #ifdef __cplusplus
00156 }
00157 #endif
00158 
00159 #endif /* #ifndef BPMORBIT_H__ */
00160 /* @} */
00161 /* ================================ end of file ============================= */

Generated on Fri Nov 9 21:17:11 2007 for libbpm by  doxygen 1.5.1