// // pulse_analyser.h // // Class pulse_analyser provides a common set of functions for // evaluating the height of pulses recorded in a digitized time // series from the fADC250 VME module operating in raw mode. // See implementation file pulse_analyzer.cc for details. // // author: richard.t.jones at uconn.edu // version: august 20, 2014 // #ifndef _PULSE_ANALYZER_ #define _PULSE_ANALYZER_ class pulse_analyzer { public: pulse_analyzer(int *fadc_raw, int nchannels, int window_size) : fADC_raw(fadc_raw), fNchannels(nchannels), fWindowSize(window_size) { Init_constants(); } double pheight_trig_pulser(int channel); double pheight_trig_summer(int channel); double pheight_trig_scanning(int channel); double pulse_normalization(); double pedestal_value(int channel); private: int *fADC_raw; // user array [][fNchannels][fWindowSize] int fNchannels; int fWindowSize; double pheight_trig_scanning(int channel, int scan_start, int scan_stop); double fStandardPulseNormFactor; // from pulse integral to "height" int fPulseWindowWidth; // pulse integration window size int fPulseNormChannel; // normalization channel number int fPulseNormPedWindow[2]; // pedestal window for normalization int fPulseNormSigWindow[2]; // signal window for normalization int fPulseNormReference; // reference integral for normalization void Init_constants() { fStandardPulseNormFactor = 11; fPulseWindowWidth = 15; fPulseNormChannel = 0; fPulseNormPedWindow[0] = 0; fPulseNormPedWindow[1] = 99; fPulseNormSigWindow[0] = 100; fPulseNormSigWindow[1] = 199; fPulseNormReference = 31.3e3; } }; #endif // _PULSE_ANALYZER_