42 JParser<> zap(
"Test program for position fit.");
53 catch(
const exception &error) {
54 FATAL(error.what() << endl);
58 TH1D hx(
"hx", NULL, 101, -1.0, +1.0);
59 TH1D hy(
"hy", NULL, 101, -1.0, +1.0);
60 TH1D hz(
"hz", NULL, 101, -1.0, +1.0);
67 for (
int i = 0; i != numberOfEvents; ++i) {
75 for (
int j = 0;
j != numberOfAxes; ++
j) {
77 const double x = gRandom->Gaus(0.0,
sigma);
78 const double y = gRandom->Gaus(0.0,
sigma);
79 const double z = gRandom->Gaus(0.0,
sigma);
81 const double dx = gRandom->Uniform(-1, +1);
82 const double dy = gRandom->Uniform(-1, +1);
83 const double dz = gRandom->Uniform(-1, +1);
92 hx.Fill(vertex.getX() -
result.getX());
93 hy.Fill(vertex.getY() -
result.getY());
94 hz.Fill(vertex.getZ() -
result.getZ());
96 Qx.put(vertex.getX() -
result.getX());
97 Qy.put(vertex.getY() -
result.getY());
98 Qz.put(vertex.getZ() -
result.getZ());
111 out << hx << hy << hz;
117 ASSERT(numberOfEvents > 0);
119 ASSERT(fabs(Qx.getMean()) <= precision);
120 ASSERT(fabs(Qy.getMean()) <= precision);
121 ASSERT(fabs(Qz.getMean()) <= precision);
123 ASSERT(Qx.getSTDev() <= precision);
124 ASSERT(Qy.getSTDev() <= precision);
125 ASSERT(Qz.getSTDev() <= precision);
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Linear fit of crossing point (position) between axes (objects with position and direction).
Data structure for vector in three dimensions.
Data structure for normalised vector in three dimensions.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).