28 int main(
int argc,
char **argv)
33 unsigned int numberOfEvents;
42 JParser<> zap(
"Example program to test 1D Legendre interpolation of a polynome.");
53 catch(
const exception &error) {
54 FATAL(error.what() << endl);
61 typedef JPolfitFunction1D<
N,
63 JElement2D<double, double>,
65 double> JFunction1D_t;
70 JElement2D<double, double>,
74 const double xmin = -10.0;
75 const double xmax = +10.0;
79 for (
int i = 0; i != grid.getSize(); ++i) {
81 const double x = grid.getX(i);
83 g1[
x]=
f1(x) + (
sigma > 0.0 && gRandom->Rndm() <
P ? gRandom->Gaus(0.0,
sigma) : 0.0);
91 for (JFunction1D_t::const_iterator i =
g1.begin(); i !=
g1.end(); ++i) {
92 DEBUG(
FIXED(12,5) << i->getX() <<
' ' <<
FIXED(12,5) << i->getY() << endl);
96 if (numberOfEvents != 0) {
100 for (
unsigned int i = 0; i != numberOfEvents; ++i) {
102 const double x = gRandom->Uniform(
xmin,
xmax);
103 const double y =
f1(x);
104 const double u =
g1(x);
105 const double v = h1(x);
114 Q[1].print(cout,
false);
Utility class to parse command line options.
Q(UTCMax_s-UTCMin_s)-livetime_s
int main(int argc, char *argv[])
The elements in a collection are sorted according to their abscissa values and a given distance opera...
Auxiliary data structure for floating point format specification.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Utility class to parse command line options.
void copy(const Head &from, JHead &to)
Copy header from from to to.
int numberOfBins
number of bins for average CDF integral of optical module
#define DEBUG(A)
Message macros.
Double_t g1(const Double_t x)
Function.