File indexing completed on 2024-04-06 12:26:08
0001 #ifndef DTSegment_DTLinearFit_h
0002 #define DTSegment_DTLinearFit_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include <vector>
0020 #include <iostream>
0021
0022
0023
0024
0025
0026 class DTLinearFit {
0027 public:
0028
0029 DTLinearFit();
0030
0031
0032 ~DTLinearFit();
0033
0034
0035 void fit(const std::vector<float>& x,
0036 const std::vector<float>& y,
0037 int ndat,
0038 const std::vector<float>& sigy,
0039 float& slope,
0040 float& intercept,
0041 double& chi2,
0042 float& covss,
0043 float& covii,
0044 float& covsi) const;
0045
0046
0047 void fitNpar(const int npar,
0048 const std::vector<float>& xfit,
0049 const std::vector<float>& yfit,
0050 const std::vector<int>& lfit,
0051 const std::vector<double>& tfit,
0052 const std::vector<float>& sigy,
0053 float& aminf,
0054 float& bminf,
0055 float& cminf,
0056 float& vminf,
0057 double& chi2fit,
0058 const bool debug) const;
0059
0060
0061 void fit3par(const std::vector<float>& xfit,
0062 const std::vector<float>& yfit,
0063 const std::vector<int>& lfit,
0064 const int nptfit,
0065 const std::vector<float>& sigy,
0066 float& aminf,
0067 float& bminf,
0068 float& cminf,
0069 double& chi2fit,
0070 const bool debug) const;
0071
0072 void fit4Var(const std::vector<float>& xfit,
0073 const std::vector<float>& yfit,
0074 const std::vector<int>& lfit,
0075 const std::vector<double>& tfit,
0076 const int nptfit,
0077 float& aminf,
0078 float& bminf,
0079 float& cminf,
0080 float& vminf,
0081 double& chi2fit,
0082 const bool vdrift_4parfit,
0083 const bool debug) const;
0084
0085 protected:
0086 private:
0087 };
0088 #endif