Main definitions for libbpm as well as doxygen intro documentation
These are a number of definitions to make the code run on various systems ( like e.g. win32... ) and some other general definitions used by the library.
Files | |
file | ana_compute_residual.c |
file | ana_def_cutfn.c |
file | ana_get_svd_coeffs.c |
file | ana_set_cutfn.c |
file | bpm_analysis.h |
libbpm analysis routines | |
Defines | |
#define | BPM_GOOD_EVENT |
#define | BPM_BAD_EVENT |
#define | ANA_SVD_TILT |
#define | ANA_SVD_NOTILT |
Functions | |
EXTERN int | ana_set_cutfn (int(*cutfn)(bpmproc_t *proc)) |
EXTERN int | ana_get_svd_coeffs (bpmproc_t **proc, int num_bpms, int num_svd, int total_num_evts, double *coeffs, int mode) |
EXTERN int | ana_compute_residual (bpmproc_t **proc, int num_bpms, int num_evts, double *coeffs, int mode, double *mean, double *rms) |
EXTERN int | ana_def_cutfn (bpmproc_t *proc) |
Variables | |
EXTERN int(* | ana_cutfn )(bpmproc_t *proc) |
#define BPM_GOOD_EVENT |
A good event
Definition at line 28 of file bpm_analysis.h.
Referenced by ana_compute_residual(), ana_def_cutfn(), ana_get_svd_coeffs(), and ana_set_cutfn().
#define BPM_BAD_EVENT |
A bad event
Definition at line 29 of file bpm_analysis.h.
#define ANA_SVD_TILT |
Include tilts in the SVD
Definition at line 31 of file bpm_analysis.h.
Referenced by ana_compute_residual(), and ana_get_svd_coeffs().
#define ANA_SVD_NOTILT |
Don't include tilts in the SVD
Definition at line 32 of file bpm_analysis.h.
EXTERN int ana_set_cutfn | ( | int(*)(bpmproc_t *proc) | cutfn | ) |
Set the cut function
cutfn | a pointer to the cut function with a bpmproc_t as argument |
Definition at line 8 of file ana_set_cutfn.c.
References ana_cutfn, bpm_error(), and BPM_GOOD_EVENT.
EXTERN int ana_get_svd_coeffs | ( | bpmproc_t ** | proc, | |
int | num_bpms, | |||
int | num_svd, | |||
int | total_num_evts, | |||
double * | coeffs, | |||
int | mode | |||
) |
Perform the SVD on the given data and return the coefficients. The index 0 bpmconf is the bpm to be regressed against and the remainder are put into the regression. The coeffs array must be valid up to the number of arguments approapriate to mode.
proc | pointer to the the processed bpm databuffer | |
num_bpms | the number of bpms in the array | |
num_svd | number of svd constants | |
total_num_evts | total number of events in the buffer | |
coeffs | the array of correlation coefficients that is returned | |
mode | mode option: take tilts into account in the SVD ? |
Definition at line 9 of file ana_get_svd_coeffs.c.
References ana_cutfn, ANA_SVD_TILT, BPM_GOOD_EVENT, gsl_matrix_set(), gsl_vector_get(), and gsl_vector_set().
EXTERN int ana_compute_residual | ( | bpmproc_t ** | proc, | |
int | num_bpms, | |||
int | num_evts, | |||
double * | coeffs, | |||
int | mode, | |||
double * | mean, | |||
double * | rms | |||
) |
Calculate the mean and rms of the residual fomr the given events. Note that the mode and svd coefficients must 'match' as with ana_get_svd_coeffs()
proc | pointer to the the processed bpm databuffer | |
num_bpms | the number of bpms in the array | |
num_evts | total number of events in the buffer | |
coeffs | the array of correlation coefficients | |
mode | mode option: take tilts into account in the SVD ? | |
mean | the returned mean | |
rms | the returned rms |
Definition at line 8 of file ana_compute_residual.c.
References ana_cutfn, ANA_SVD_TILT, BPM_GOOD_EVENT, bpmproc::ddc_pos, and bpmproc::ddc_slope.
EXTERN int ana_def_cutfn | ( | bpmproc_t * | proc | ) |
The default cut function if people cut be bothered to do their own :)
proc | the event to decide |
Definition at line 10 of file ana_def_cutfn.c.
References BPM_GOOD_EVENT.
A user cut function to allow cuts to be applied while selecting events for SVD, etc.
Referenced by ana_compute_residual(), ana_get_svd_coeffs(), and ana_set_cutfn().