CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/TrackPropagation/NavGeometry/src/ThreePlaneCrossing.cc

Go to the documentation of this file.
00001 #include "TrackPropagation/NavGeometry/src/ThreePlaneCrossing.h"
00002 #include "TrackPropagation/NavGeometry/src/LinearEquation3.h"
00003 
00004 Plane::GlobalPoint 
00005 ThreePlaneCrossing::crossing( const Plane& a, const Plane& b, 
00006                               const Plane& c) const 
00007 {
00008   typedef Plane::Scalar    T;
00009 
00010   const GlobalVector n1g( a.normalVector());
00011   const GlobalVector n2g( b.normalVector());
00012   const GlobalVector n3g( c.normalVector());
00013 
00014   Basic3DVector<T> n1(n1g.basicVector());
00015   Basic3DVector<T> n2(n2g.basicVector());
00016   Basic3DVector<T> n3(n3g.basicVector());
00017   Basic3DVector<T> rhs( n1.dot( a.position().basicVector()),
00018                         n2.dot( b.position().basicVector()),
00019                         n3.dot( c.position().basicVector()));
00020   LinearEquation3<T> solver;
00021   Plane::GlobalPoint result( solver.solution( n1, n2, n3, rhs));
00022   return result;
00023 }