00001
00002
00003
00004
00005
00006 #include <iostream.h>
00007 using std::cout;
00008 using std::endl;
00009
00010 #include "jbltools/kinfit/JetFitObject.h"
00011 #include "jbltools/kinfit/PxConstraint.h"
00012 #include "jbltools/kinfit/PyConstraint.h"
00013 #include "jbltools/kinfit/WWFitter.h"
00014
00015
00016 int main(int argc, char** argv) {
00017
00018
00019 JetFitObject j1 (44., 1.571, 0.087, 5.0, 0.087, 0.1, 0.);
00020 JetFitObject j2 (46., 1.571, 3.220, 5.0, 0.087, 0.1, 0.);
00021 cout << "start four-vector of first jet: " << j1 << endl;
00022 cout << "start four-vector of second jet: " << j2 << endl;
00023
00024 PxConstraint pxc;
00025 pxc.addToFOList (j1);
00026 pxc.addToFOList (j2);
00027
00028 PyConstraint pyc;
00029 pyc.addToFOList (j1);
00030 pyc.addToFOList (j2);
00031
00032 WWFitter fitter;
00033 fitter.addFitObject (j1);
00034 fitter.addFitObject (j2);
00035 fitter.addConstraint (pxc);
00036 fitter.addConstraint (pyc);
00037
00038 double prob = fitter.fit();
00039 cout << "fit probability = " << prob << endl;
00040 cout << "error code: " << fitter.getError() << endl;
00041 cout << "final four-vector of first jet: " << j1 << endl;
00042 cout << "final four-vector of second jet: " << j2 << endl;
00043
00044 return 0;
00045
00046
00047
00048 }