QLogNormBiExpFit.hh
00001 #ifndef _Q_LOGNORMBIEXPFIT_HH_
00002 #define _Q_LOGNORMBIEXPFIT_HH_
00003
00011 #include "QPulseFitter.hh"
00012
00013 class TH1D;
00014
00015 class QLogNormBiExpFit : public QPulseFitter {
00016 public:
00018 QLogNormBiExpFit();
00019
00020 ~QLogNormBiExpFit() {};
00021
00023 QError Initialize();
00024
00026 QError Fit(const QVector& pulse);
00027
00029 QVector& GetResiduals() {return fResiduals;};
00030
00032 int* GetFitArrows() {return fArrows;};
00033
00035 int* GetConstrain() {return &fConstrain;}
00036
00038 double* GetGoodness() {return &fGoodness;}
00039
00040
00041 private:
00042 void ComputeBaseStat(const QVector& pulse, int first);
00043 void ComputeFitEnd(const QVector& pulse, size_t meansize, double peakperc);
00044 int ComputeExpRange(const QVector& pulse, int bufsize, double peakperc, double fastpeakperc);
00045 int ComputeLgnStart(const QVector& pulse, int bufsize);
00046 void ComputeExpParams(const QVector& pulse);
00047 bool ComputeLgnParams(const QVector& pulse);
00048
00049 double fBaseline;
00050 double fRMS;
00051 double fPeakHeight;
00052 double fLgn_m;
00053 double fLgn_s;
00054 double fLgn_A;
00055 double fExp_A;
00056 double fExp_b;
00057 double fExp_c;
00058 double fExp_b_MAX;
00059 double fGoodness;
00060 double fChiSquare;
00061 int fConstrain;
00062
00063 int fFitStart;
00064 int fFitEnd;
00065 int fExpStart;
00066 int fExpEnd;
00067 int fLgnStart;
00068
00069 QVector fResiduals;
00070 int fArrows[6];
00071 int fFastStatus;
00072
00073 size_t fNPoints;
00074
00075 };
00076
00077 #endif