23{
26
27 const double xmin = -10.0;
28 const double xmax = +10.0;
29
31
32 unsigned int numberOfEvents;
36
37 try {
38
39 JParser<> zap(
"Example program to test Legendre polynome.");
40
45
46 zap(argc, argv);
47 }
48 catch(const exception &error) {
49 FATAL(error.what() << endl);
50 }
51
52
54
56
57 const double x = xmin + i * (xmax - xmin) / (
numberOfBins - 1);
58
60 }
61
63 DEBUG(
"data: " <<
FIXED(7,3) << i->first <<
' ' <<
FIXED(7,3) << i->second << endl);
64 }
65
66
67 const size_t N = 3;
68
70
71 for (
size_t n = 0;
n != N + 1; ++
n) {
72 STATUS(
"Legendre: " << setw(2) << n <<
' ' <<
FIXED(7,3) <<
g1[n] << endl);
73 }
74
75 if (numberOfEvents > 0) {
76
78
79 for (unsigned int i = 0; i != numberOfEvents; ++i) {
80
81 const double x = gRandom->Uniform(xmin, xmax);
82 const double y = f1(x);
83 const double z =
g1(x);
84
86 }
87
89 }
90
91 return 0;
92}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Double_t g1(const Double_t x)
Function.
int numberOfBins
number of bins for average CDF integral of optical module
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Base class for Legendre polynome.
Template definition for function evaluation of Legendre polynome.