00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "Math/GenVector/Translation3D.h"
00018 #include "Math/GenVector/Plane3D.h"
00019 #include "Math/GenVector/PositionVector3D.h"
00020
00021 #include <cmath>
00022 #include <algorithm>
00023
00024
00025
00026
00027 namespace ROOT {
00028
00029 namespace Math {
00030
00031
00032 typedef Translation3D::Vector XYZVector;
00033 typedef PositionVector3D<Cartesian3D<double> > XYZPoint;
00034
00035
00036
00037
00038
00039 Plane3D Translation3D::operator() (const Plane3D & plane) const
00040 {
00041
00042 XYZVector n = plane.Normal();
00043
00044
00045 double d = plane.HesseDistance();
00046 XYZPoint p( - d * n.X() , - d *n.Y(), -d *n.Z() );
00047 return Plane3D ( operator() (n), operator() (p) );
00048 }
00049
00050 std::ostream & operator<< (std::ostream & os, const Translation3D & t)
00051 {
00052
00053
00054
00055 double m[3];
00056 t.GetComponents(m, m+3);
00057 os << "\n" << m[0] << " " << m[1] << " " << m[2] << "\n";
00058 return os;
00059 }
00060
00061 }
00062 }