26{
29
30 double precision;
32
33 try {
34
36
39
41 }
42 catch(const exception& error) {
44 }
45
46 string option = "";
47
48 if (option.find('S') == string::npos) {
49 option += 'S';
50 }
51
52 if (
debug < debug_t && option.find(
'Q') == string::npos) {
53 option += "Q";
54 }
55
56
58
59
60 struct {
62 double z;
64 { 100.0, 10.0 },
65 { 0.0, 10.0 }
66 };
67
68
69 for (
int i = 0; i !=
sizeof(
data)/
sizeof(data[0]); ++i) {
70
71 const double y =
data[i].y;
72 const double z =
data[i].z;
73
74 h1.SetBinContent(1, y);
75 h1.SetBinError (1, z);
76
77 {
79
80 TF1 f1("f1", "[0]");
81
83
84 f1.SetParLimits(0, 0.0, 0.0);
86
88
90
92 <<
FIXED(7,3) << f1.GetParameter(0) <<
" +/- "
93 <<
FIXED(7,3) << f1.GetParError (0) <<
" "
95 << (
result->IsParameterBound(0) ?
" *** bound *** " :
"")
98 }
99 {
101
102 TF1 f1("f1", "[0]");
103
106
108
110
112 <<
FIXED(7,3) << f1.GetParameter(0) <<
" +/- "
113 <<
FIXED(7,3) << f1.GetParError (0) <<
" "
114 << (
result->IsParameterBound(0) ?
" *** bound *** " :
"")
117
121 ASSERT(fabs(f1.GetParameter(0) - y) < f1.GetParError(0));
122 }
123 {
125
126 TF1 f1("f1", "[0]");
127
131
133
136
138
140
142 <<
FIXED(7,3) << f1.GetParameter(0) <<
" +/- "
143 <<
FIXED(7,3) << f1.GetParError (0) <<
" "
144 << (
result->IsParameterBound(0) ?
" *** bound *** " :
"")
147
151 ASSERT(fabs(f1.GetParameter(0) - parameter.value) < precision);
152 ASSERT(fabs(f1.GetParError (0)) < precision);
153 }
154 {
156
157 TF1 f1("f1", "[0]");
158
162
164
167
169
171
173 <<
FIXED(7,3) << f1.GetParameter(0) <<
" +/- "
174 <<
FIXED(7,3) << f1.GetParError (0) <<
" "
175 << (
result->IsParameterBound(0) ?
" *** bound *** " :
"")
178
182 ASSERT(fabs(f1.GetParameter(0) - parameter.value) < precision);
183 ASSERT(fabs(f1.GetParError (0)) < precision);
184 }
185 {
187
188 TF1 f1("f1", "[0]");
189
192
195
197
199
201
203 <<
FIXED(7,3) << f1.GetParameter(0) <<
" +/- "
204 <<
FIXED(7,3) << f1.GetParError (0) <<
" "
205 << (
result->IsParameterBound(0) ?
" *** bound *** " :
"")
208
212 ASSERT(fabs(f1.GetParameter(0) - y) < f1.GetParError(0));
213 }
214 }
215
216 return 0;
217}
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool fixParameter(TF1 &f1, const JFitParameter_t ¶meter)
Fix fit parameter.
bool setParameter(TF1 &f1, const JFitParameter_t ¶meter)
Set fit parameter.
bool isParameterFixed(const TF1 &f1, const Int_t index)
Check if fit parameter is fixed.
bool releaseParameter(TF1 &f1, const Int_t index)
Release fit parameter.
Auxiliary data structure for floating point format specification.
Auxiliary data structure for a parameter index and its value.