29 int main(
int argc, 
char **argv)
 
   41     JParser<> zap(
"Test program for vertex fit.");
 
   51   catch(
const exception& error) {
 
   52     FATAL(error.what() << endl);
 
   59   TH1D hx(
"hx", NULL, 101, -1.0, +1.0);
 
   60   TH1D hy(
"hy", NULL, 101, -1.0, +1.0);
 
   61   TH1D hz(
"hz", NULL, 101, -1.0, +1.0);
 
   62   TH1D ht(
"ht", NULL, 101, -1.0, +1.0);
 
   74   if (inputFile != 
"") {
 
   76     ifstream in(inputFile.c_str());
 
   78     for (
double x, y, z; in >> x >> y >> z; ) {
 
   79       detector.push_back(JVector3D(x,y,z));
 
   86     for (
double x = -50.0; x < 100.0; x += 100.0) {
 
   87       for (
double y = -50.0; y < 100.0; y += 100.0) {
 
   88         for (
double z = -50.0; z < 100.0; z += 100.0) {
 
   89           detector.push_back(JVector3D(x,y,z));
 
   96   typedef JVertex3D   JHit_t;
 
   98   const double xmin = -1.0;
 
   99   const double xmax = +1.0;
 
  101   const double tmin = -1.0;
 
  102   const double tmax = +1.0;
 
  105   for (
int i = 0; i != numberOfEvents; ++i) {
 
  109     const double x = gRandom->Uniform(xmin, xmax);
 
  110     const double y = gRandom->Uniform(xmin, xmax);
 
  111     const double z = gRandom->Uniform(xmin, xmax);
 
  112     const double t = gRandom->Uniform(tmin, tmax);
 
  114     JVertex3D vertex(JVector3D(x,y,z), t);
 
  128     for (JDetector_t::const_iterator pos = detector.begin(); pos != detector.end(); ++pos) {
 
  129       data.push_back(JHit_t(*pos, vertex.getT(*pos)));
 
  144     JEstimator<JPoint4D> result(data.begin(), data.end());
 
  146     hx.Fill(vertex.getX() - result.getX());
 
  147     hy.Fill(vertex.getY() - result.getY());
 
  148     hz.Fill(vertex.getZ() - result.getZ());
 
  149     ht.Fill(vertex.getT() - result.getT());
 
  151     Qx.put(vertex.getX() - result.getX());
 
  152     Qy.put(vertex.getY() - result.getY());
 
  153     Qz.put(vertex.getZ() - result.getZ());
 
  154     Qt.put(vertex.getT() - result.getT());
 
  168     out << hx << hy << hz << ht;
 
  174   ASSERT(numberOfEvents > 0);
 
  176   ASSERT(Qx.getMean() <= precision);
 
  177   ASSERT(Qy.getMean() <= precision);
 
  178   ASSERT(Qz.getMean() <= precision);
 
  179   ASSERT(Qt.getMean() <= precision);
 
  181   ASSERT(Qx.getSTDev() <= precision);
 
  182   ASSERT(Qy.getSTDev() <= precision);
 
  183   ASSERT(Qz.getSTDev() <= precision);
 
  184   ASSERT(Qt.getSTDev() <= precision);
 
Utility class to parse command line options. 
 
#define ASSERT(A)
Assert macro. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
General purpose messaging. 
 
Linear fit of JFIT::JPoint4D. 
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])