Warning, file /include/root/HFitInterface.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROOT_HFitInterface
0017 #define ROOT_HFitInterface
0018
0019
0020 class TH1;
0021 class THnBase;
0022 class TF1;
0023 class TF2;
0024 class TGraph;
0025 class TGraphErrors;
0026 class TGraph2D;
0027 class TMultiGraph;
0028 struct Foption_t;
0029
0030 #include "TFitResultPtr.h"
0031
0032 namespace ROOT {
0033
0034 namespace Math {
0035 class MinimizerOptions;
0036 }
0037
0038 namespace Fit {
0039
0040
0041
0042 class FitResult;
0043 class DataRange;
0044 class BinData;
0045 class UnBinData;
0046 class SparseData;
0047
0048 enum class EFitObjectType {
0049 kHistogram,
0050 kGraph
0051 };
0052
0053 enum class EChisquareType {
0054 kNeyman = 0,
0055 kPLikeRatio,
0056 kPearson
0057 };
0058
0059
0060
0061
0062
0063
0064 void FitOptionsMake(EFitObjectType type, const char *option, Foption_t &fitOption);
0065
0066
0067
0068
0069 TFitResultPtr FitObject(TH1 * h1, TF1 *f1, Foption_t & option, const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
0070
0071
0072
0073
0074 TFitResultPtr FitObject(TGraph * gr, TF1 *f1 , Foption_t & option , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
0075
0076
0077
0078
0079 TFitResultPtr FitObject(TMultiGraph * mg, TF1 *f1 , Foption_t & option , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
0080
0081
0082
0083
0084 TFitResultPtr FitObject(TGraph2D * gr, TF1 *f1 , Foption_t & option , const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
0085
0086
0087
0088
0089 TFitResultPtr FitObject(THnBase * s1, TF1 *f1, Foption_t & option, const ROOT::Math::MinimizerOptions & moption, const char *goption, ROOT::Fit::DataRange & range);
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099 TFitResultPtr UnBinFit(ROOT::Fit::UnBinData * data, TF1 * f1 , Foption_t & option , const ROOT::Math::MinimizerOptions & moption);
0100
0101
0102
0103
0104
0105 void FillData ( BinData & dv, const TH1 * hist, TF1 * func = nullptr);
0106
0107
0108
0109
0110
0111 void FillData ( SparseData & dv, const TH1 * hist, TF1 * func = nullptr);
0112
0113
0114
0115
0116
0117 void FillData ( SparseData & dv, const THnBase * hist, TF1 * func = nullptr);
0118
0119
0120
0121
0122
0123 void FillData ( BinData & dv, const THnBase * hist, TF1 * func = nullptr);
0124
0125
0126
0127
0128
0129 void FillData ( BinData & dv, const TGraph2D * gr, TF1 * func = nullptr);
0130
0131
0132
0133
0134
0135
0136 void FillData ( BinData & dv, const TGraph * gr, TF1 * func = nullptr);
0137
0138
0139
0140
0141 void FillData ( BinData & dv, const TMultiGraph * gr, TF1 * func = nullptr);
0142
0143
0144
0145
0146
0147
0148
0149 void InitExpo(const ROOT::Fit::BinData & data, TF1 * f1);
0150
0151
0152
0153
0154
0155
0156
0157 void InitGaus(const ROOT::Fit::BinData & data, TF1 * f1);
0158
0159
0160
0161
0162
0163
0164 void Init2DGaus(const ROOT::Fit::BinData & data, TF1 * f1);
0165
0166
0167
0168
0169 bool GetConfidenceIntervals(const TH1 * h1, const ROOT::Fit::FitResult & r, TGraphErrors * gr, double cl = 0.95);
0170
0171
0172
0173
0174 double Chisquare(const TH1 & h1, TF1 & f1, bool useRange, EChisquareType type);
0175
0176
0177
0178
0179 double Chisquare(const TGraph & h1, TF1 & f1, bool useRange);
0180
0181
0182 }
0183
0184 }
0185
0186
0187 #endif