00001
00002
00003
00004
00005
00006 #include <iostream>
00007 using std::cout;
00008 using std::endl;
00009
00010 #include "jbltools/kinfit/JBLHelix.h"
00011 #include "jbltools/kinfit/ThreeVector.h"
00012
00013
00014
00015 int main(int argc, char** argv) {
00016 JBLHelix h1 ( 0.01, 0.23, 1.2, 1.5, 5.0);
00017 JBLHelix h2 (-0.02, 0.20, 1.4, 1.2, 6.0);
00018
00019 for (double s = -314.; s < 314.; s+=50) {
00020 ThreeVector p = h1.getTrajectoryPoint (s);
00021 double sc = h1.getClosestS (p);
00022 cout << "h1: s=" << s << ", p=" << p << ", s_c=" << sc << ", diff=" << s-sc << endl;
00023 }
00024 for (double s = -157.; s < 157.; s+=10) {
00025 ThreeVector p = h2.getTrajectoryPoint (s);
00026 double sc = h2.getClosestS (p);
00027 cout << "h2: s=" << s << ", p=" << p << ", s_c=" << sc << ", diff=" << s-sc << endl;
00028 }
00029
00030 double s01, s11, s02, s12;
00031 h1.getClosestApproach (h2, s01, s11, s02, s12);
00032
00033 return 0;
00034 }