00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #if !defined(__CINT__) || defined(__MAKECINT__)
00016
00017 #ifndef ROOT_HFitInterface
00018 #define ROOT_HFitInterface
00019
00020
00021 class TH1;
00022 class THnSparse;
00023 class TF1;
00024 class TF2;
00025 class TGraph;
00026 class TGraphErrors;
00027 class TGraph2D;
00028 class TMultiGraph;
00029 struct Foption_t;
00030
00031 #include "TFitResultPtr.h"
00032
00033 namespace ROOT {
00034
00035 namespace Math {
00036 class MinimizerOptions;
00037 }
00038
00039 namespace Fit {
00040
00041
00042 class FitResult;
00043 class DataRange;
00044 class BinData;
00045 class UnBinData;
00046 class SparseData;
00047
00048 #ifndef __CINT__ // does not link on Windows (why ??)
00049
00050
00051
00052
00053 void FitOptionsMake(const char *option, Foption_t &fitOption);
00054
00055
00056
00057
00058 TFitResultPtr FitObject(TH1 * h1, TF1 *f1, Foption_t & option, const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
00059
00060
00061
00062
00063 TFitResultPtr FitObject(TGraph * gr, TF1 *f1 , Foption_t & option , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
00064
00065
00066
00067
00068 TFitResultPtr FitObject(TMultiGraph * mg, TF1 *f1 , Foption_t & option , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
00069
00070
00071
00072
00073 TFitResultPtr FitObject(TGraph2D * gr, TF1 *f1 , Foption_t & option , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
00074
00075
00076
00077
00078 TFitResultPtr FitObject(THnSparse * s1, TF1 *f1, Foption_t & option, const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
00079 #endif
00080
00081
00082
00083
00084
00085
00086
00087
00088 TFitResultPtr UnBinFit(ROOT::Fit::UnBinData * data, TF1 * f1 , Foption_t & option , const ROOT::Math::MinimizerOptions & moption);
00089
00090
00091
00092
00093
00094 void FillData ( BinData & dv, const TH1 * hist, TF1 * func = 0);
00095
00096
00097
00098
00099
00100 void FillData ( SparseData & dv, const TH1 * hist, TF1 * func = 0);
00101
00102
00103
00104
00105
00106 void FillData ( SparseData & dv, const THnSparse * hist, TF1 * func = 0);
00107
00108
00109
00110
00111
00112 void FillData ( BinData & dv, const THnSparse * hist, TF1 * func = 0);
00113
00114
00115
00116
00117
00118 void FillData ( BinData & dv, const TGraph2D * gr, TF1 * func = 0);
00119
00120
00121
00122
00123
00124
00125 void FillData ( BinData & dv, const TGraph * gr, TF1 * func = 0 );
00126
00127
00128
00129
00130 void FillData ( BinData & dv, const TMultiGraph * gr, TF1 * func = 0);
00131
00132
00133
00134
00135
00136
00137
00138 void InitExpo(const ROOT::Fit::BinData & data, TF1 * f1 );
00139
00140
00141
00142
00143
00144
00145
00146 void InitGaus(const ROOT::Fit::BinData & data, TF1 * f1 );
00147
00148
00149
00150
00151
00152
00153 void Init2DGaus(const ROOT::Fit::BinData & data, TF1 * f1 );
00154
00155
00156
00157
00158 bool GetConfidenceIntervals(const TH1 * h1, const ROOT::Fit::FitResult & r, TGraphErrors * gr, double cl = 0.95);
00159
00160
00161 }
00162
00163 }
00164
00165
00166 #endif
00167
00168
00169 #endif