00001 00007 #ifndef BASELINEFINDER_h 00008 #define BASELINEFINDER_h 00009 00010 #include "ChannelModule.hh" 00011 00012 #include <vector> 00036 class BaselineFinder : public ChannelModule 00037 { 00038 public: 00039 BaselineFinder(); 00040 ~BaselineFinder(); 00041 00042 int Initialize(); 00043 int Finalize(); 00044 int Process(ChannelData* chdata); 00045 00046 static const std::string GetDefaultName(){ return "BaselineFinder";} 00047 00048 //parameters 00049 bool fixed_baseline; // use fixed baseline algorithm 00050 bool linear_interpolation; // use few baseline estimates and interpolate 00051 00052 int segment_samps; 00053 int min_valid_samps; 00054 double max_sigma; 00055 double max_sigma_diff; 00056 double max_mean_diff; 00057 00058 int avg_samps; 00059 double max_sigma_factor; 00060 double pulse_threshold; 00061 int cooldown; 00062 int pre_cooldown; 00063 00064 double max_amplitude; 00065 double max_sum_amplitude; 00066 double signal_begin_time; 00067 int pre_samps; 00068 int post_samps; 00069 bool save_interpolations; 00070 double laserwindow_begin_time; 00071 double laserwindow_end_time; 00072 bool laserwindow_freeze; 00073 00074 private: 00075 int FixedBaseline(ChannelData* chdata); 00076 int DriftingBaseline(ChannelData* chdata); 00077 00078 }; 00079 00080 00081 #endif