wavedeform C++ API Reference

template<typename T>
struct cholmod_deleter

Public Types

typedef int (*deleter_t)(T**, cholmod_common *c)

Public Functions

inline cholmod_deleter(deleter_t d, cholmod_common *c)
inline void operator()(T *ptr)

Public Members

cholmod_common *common
deleter_t deleter
class I3Wavedeform : public I3ConditionalModule

Public Functions

I3Wavedeform(const I3Context&)
virtual ~I3Wavedeform()
void Configure()
void Calibration(I3FramePtr frame)
void DAQ(I3FramePtr frame)

Private Functions

I3RecoPulseSeriesPtr GetPulses(const I3WaveformSeries::const_iterator firstWF, const I3WaveformSeries::const_iterator lastWF, const WaveformTemplate &wfTemplate, const I3DOMCalibration &calibration, const double spe_charge)
void FillTemplate(WaveformTemplate &wfTemplate, const I3DOMCalibration &calibration)

Private Members

std::string waveforms_name_
std::string waveform_range_name_
std::string output_name_
double spes_per_bin_
double tolerance_
double noise_threshold_
double basis_threshold_
int atwd_templ_bins_
double atwd_templ_bin_spacing_
int fadc_templ_bins_
double fadc_templ_bin_spacing_
bool deweight_fadc_
bool apply_spe_corr_
bool reduce_
WaveformTemplate oldTemplate_
WaveformTemplate newTemplate_
cholmod_common c
struct rnnls_context

Public Members

cholmod_dense *x
cholmod_dense *Aty
cholmod_dense *rowwork
cholmod_dense *colwork
cholmod_factor *L
cholmod_sparse *update
SuiteSparse_long *P
SuiteSparse_long *Z
long nP
long nZ
long last_free
cholmod_sparse *A
cholmod_dense *y
cholmod_common *c
struct WaveformTemplate

Public Members

std::vector<double> atwd_template[3]
std::vector<double> fadc_template
double atwdFWHMStart[3]
double fadcFWHMStart
double atwdFWHMStop[3]
double fadcFWHMStop
bool filled
namespace detail

Functions

template<typename T>
cholmod_deleter<T>::deleter_t get_deleter(T *object)
template<>
cholmod_deleter<cholmod_dense>::deleter_t get_deleter(cholmod_dense*)
template<>
cholmod_deleter<cholmod_sparse>::deleter_t get_deleter(cholmod_sparse*)
template<typename T>
boost::shared_ptr<T> make_shared(T *ptr, cholmod_common *c)
namespace std

STL namespace.

file I3Wavedeform.cxx
#include <icetray/I3ConditionalModule.h>
#include <dataclasses/I3DOMFunctions.h>
#include <dataclasses/I3TimeWindow.h>
#include <icetray/I3Units.h>
#include <dataclasses/calibration/I3Calibration.h>
#include <dataclasses/calibration/I3DOMCalibration.h>
#include <dataclasses/physics/I3RecoPulse.h>
#include <dataclasses/physics/I3Waveform.h>
#include <dataclasses/status/I3DetectorStatus.h>
#include <dataclasses/status/I3DOMStatus.h>
#include <string>
#include <vector>
#include <utility>
#include <set>
#include <float.h>
#include <cholmod.h>
#include “nnls.h
#include “rnnls.h

Functions

I3_MODULE(I3Wavedeform)
inline double PulseWidth(int source)
inline double PulseMin(int source)
void FillFWHM(double &start, double &stop, const std::vector<double> &data, double spacing, double min)
file lspcg.cxx
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <cholmod.h>
#include <complex>
#include <SuiteSparseQR_C.h>
#include “lspcg.h

Defines

EPSILON

Functions

double truncated_ratio(double s1, double s2)
void pcg_gradient(cholmod_sparse *A, cholmod_dense *y, cholmod_dense *s, cholmod_dense *g, cholmod_common *c)
void pcg_precondition(cholmod_sparse *A, cholmod_dense *x, cholmod_dense *s, cholmod_dense *g, cholmod_dense *v, cholmod_common *c)
double pcg_stepsize(cholmod_dense *y, cholmod_dense *s, cholmod_dense *mu)
cholmod_dense *lspcg(cholmod_sparse *A, cholmod_dense *y, double tolerance, unsigned max_iterations, cholmod_common *c)
file lspcg.h
#include <cholmod.h>

Functions

cholmod_dense *lspcg(cholmod_sparse *A, cholmod_dense *y, double tolerance, unsigned max_iterations, cholmod_common *c)
file nnls.cxx
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <cholmod.h>
#include <complex>
#include <SuiteSparseQR_C.h>
#include “nnls.h

Functions

cholmod_dense *nnls_lawson_hanson(cholmod_sparse *A, cholmod_dense *y, double tolerance, unsigned min_iterations, unsigned max_iterations, unsigned npos, int normaleq, int solve_with_normaleq, int verbose, cholmod_common *c)
cholmod_dense *solve_by_normaleq(cholmod_sparse *Ap, cholmod_dense *y, int nP, cholmod_common *c)
file nnls.h
#include <cholmod.h>

Functions

cholmod_dense *nnls_lawson_hanson(cholmod_sparse *A, cholmod_dense *y, double tolerance, unsigned min_iterations, unsigned max_iterations, unsigned npos, int normaleq, int solve_with_normaleq, int verbose, cholmod_common *c)
cholmod_dense *solve_by_normaleq(cholmod_sparse *Ap, cholmod_dense *y, int nP, cholmod_common *c)
file nnls_wrapper.cxx
#include <icetray/I3Logging.h>
#include <dataclasses/I3Matrix.h>
#include <cholmod.h>
#include “nnls.h

Functions

std::vector<double> nnls_lawson_hanson_wrapper(const I3Matrix &A, const std::vector<double> &y, double tolerance, unsigned min_iterations, unsigned max_iterations, unsigned npos, bool normaleq, bool solve_with_normaleq, bool verbose)

Variables

static boost::shared_ptr<cholmod_common> python_common
file rnnls.cxx
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <float.h>
#include <cholmod.h>
#include <complex>
#include <vector>
#include <set>
#include <algorithm>
#include <SuiteSparseQR_C.h>
#include “rnnls.h

Functions

rnnls_context *rnnls_allocate_context(cholmod_sparse *A, cholmod_dense *y, cholmod_common *c)
void rnnls_free_context(rnnls_context *cxt)
long rnnls_next_free(double tolerance, rnnls_context *cxt)
void rnnls_set_passive(long zidx, rnnls_context *cxt)
void rnnls_set_active(long pidx, rnnls_context *cxt)
int rnnls_solve(rnnls_context *cxt)
void rnnls_sort_P_by_amplitude(rnnls_context *cxt)
int rnnls_find_in_Z(long idx, rnnls_context *cxt)
int rnnls_iterate(double tolerance, rnnls_context *cxt)
cholmod_dense *rnnls(cholmod_sparse *A, cholmod_dense *y, double tolerance, unsigned max_iterations, int verbose, cholmod_common *c)

Variables

double SD_ONE[2] = {1., 0.}
double SD_ZERO[2] = {0., 0.}
double SD_MINUS_ONE[2] = {-1., 0.}
file rnnls.h

Functions

cholmod_dense *rnnls(cholmod_sparse *A, cholmod_dense *y, double tolerance, unsigned max_iterations, int verbose, cholmod_common *c)
dir icetray
dir private
dir wavedeform
dir wavedeform