bpmsimulation/bpm_simulation.h

Go to the documentation of this file.
00001 /*
00002   libbpm - BPM signal processing/simulation library
00003   Copyright (C) 2006-07 Bino Maiheu (bino@hep.ucl.ac.uk)
00004   
00005   This program is free software; you can redistribute it and/or modify
00006   it under the terms of the GNU General Public License as published by
00007   the Free Software Foundation; either version 2 of the License, or
00008   (at your option) any later version.
00009   
00010   This program is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013   GNU General Public License for more details.
00014   
00015   You should have received a copy of the GNU General Public License
00016   along with this program; if not, write to the Free Software
00017   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA 
00018 */
00019 
00032 #ifndef BPMSIM_H__
00033 #define BPMSIM_H__
00034 
00035 /* -----------------------------------------------------------------------------
00036 // includes
00037 // -------------------------------------------------------------------------- */
00038 #include <math.h>
00039 #include <bpm/bpm_defs.h>
00040 #include <bpm/bpm_interface.h>
00041 #include <bpm/bpm_wf.h>
00042 #include <bpm/bpm_nr.h>
00043 #include <bpm/bpm_dsp.h>
00044 
00045 /* -----------------------------------------------------------------------------
00046 // macro definitions
00047 // -------------------------------------------------------------------------- */
00048 
00049 /* -----------------------------------------------------------------------------
00050 // typedefs, enums and other declarations
00051 // -------------------------------------------------------------------------- */
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055 /* -----------------------------------------------------------------------------
00056 // function prototypes and declarations
00057 // -------------------------------------------------------------------------- */
00058 
00059 
00060   // bino's new routines for absim...
00061   EXTERN int generate_bpmsignal( bpmconf_t *bpm, beamconf_t *beam, doublewf_t *RF );
00062 
00063   EXTERN int add_mode_response( complexwf_t *RF, bpmconf_t *bpm, bpmmode_t *mode, 
00064                                 beamconf_t *beam );
00065 
00066   EXTERN complex_t get_mode_amplitude( bpmconf_t *bpm, bpmmode_t *mode, 
00067                                        beamconf_t *beam );
00068 
00069 
00070 
00071 
00072 
00073 
00074   //EXTERN int generate_monopole( bpmconf_t*, beamconf_t*, bpmsignal_t* );
00075 
00076   //EXTERN int generate_dipole( bpmconf_t*, beamconf_t*, bpmsignal_t* );
00077 
00078   //EXTERN int generate_diode( bpmconf_t*, beamconf_t*, bpmsignal_t* );
00079 
00093   EXTERN int get_dipole_amp( double bunchcharge, double bunchlength,
00094                              double pos, double possens,
00095                              double slope, double slopesens,
00096                              double tilt, double tiltsens,
00097                              complex_t *Amp );
00098 
00107   EXTERN int get_monopole_amp( double bunchcharge, double bunchlength,
00108                              double chargesens,
00109                              complex_t *Amp );
00110 
00117   EXTERN int add_excitation( double ttrig, doublewf_t *RF );
00118 
00127   EXTERN int get_mode_response( doublewf_t *excitation,
00128                        double freq, double Qvalue,
00129                        complexwf_t *response );
00130 
00138   EXTERN int add_waveforms( complexwf_t *RF, complexwf_t *TEMP, complex_t f );
00139 
00146   EXTERN int add_amplnoise( double amplnoise, complexwf_t *IF );
00147 
00161   EXTERN int digitise( doublewf_t *IF, int nbits, double range_min, double range_max,
00162                        double clock_jitter, double digi_noise, unsigned int ipmode, 
00163                        intwf_t *wf );
00164 
00165 #ifdef __cplusplus
00166 }
00167 #endif
00168 
00169 #endif /* #ifndef BPMINTERFACE_H__ */
00170 
00171 /* ================================ end of file ============================= */

Generated on Thu Jan 10 10:18:04 2008 for libbpm by  doxygen 1.5.1