Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

testwwfit.C

Go to the documentation of this file.
00001 // testwwfit
00002 // Test program to test fitter classes 
00003 // J. Boehme, B. List 3.4.04
00004 
00005 
00006 #include <iostream.h>              // - cout
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 }

Generated on Fri Sep 14 17:38:21 2007 for Kinfit by doxygen 1.3.2