164{
167
168 int numberOfEvents;
170 bool transform;
172
173 try {
174
175 JParser<> zap(
"Example program to test transformable function.");
176
181
183 }
184 catch(const exception &error) {
186 }
187
188 if (numberOfEvents <= 0) {
190 }
191
192
193 const double xmin = 0.1;
194 const double xmax = 1.0;
195 const double dx = (xmax - xmin) / 3;
196
197 function_type h2;
198
199 for (
double x = xmin;
x < xmax + 0.5*
dx;
x +=
dx) {
200
201 const double ymin = -5.0 * xmax;
202 const double ymax = +5.0 * xmax;
204
207 }
208 }
209
210 h2.setExceptionHandler(
new typename function_type::JDefaultResult(
JMATH::zero));
211
212 if (transform) {
213 h2.transform(JTransformer_t());
214 }
215
216 h2.compile();
217
218
223 };
224
225 const double ymin = -5.0 * xmax;
226 const double ymax = +5.0 * xmax;
227
228 for (int i = 0; i != numberOfEvents; ++i) {
229
230 const double x =
gRandom->Uniform(xmin, xmax);
232
233 try {
234
235 const result_type value = h2(x,y);
236
237 const double f = f2(x,y);
238 const double fp = g2(x,y);
239 const double v =
G2(x,y);
240
241 Q[0].
put(value.f - f);
242 Q[1].
put(value.fp - fp);
243 Q[2].
put(value.v - v);
244 }
245 catch(const std::exception& error) {}
246 }
247
248
250
252 for (int i = 0; i != sizeof(Q)/sizeof(Q[0]); ++i) {
254 }
256
258 for (int i = 0; i != sizeof(Q)/sizeof(Q[0]); ++i) {
260 }
262
264 for (int i = 0; i != sizeof(Q)/sizeof(Q[0]); ++i) {
266 }
268 }
269}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int numberOfBins
number of bins for average CDF integral of optical module
const std::string & getTitle() const
Get title.
Template definition of a multi-dimensional oscillation probability interpolation table.
static const JZero zero
Function object to assign zero value.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.