MarlinUtil  1.12.1
LCLine3D.h
1 #ifndef LCLine3D_H
2 #define LCLine3D_H 1
3 
4 // #include "CLHEP/Vector/ThreeVector.h"
5 #include <LCGeometryTypes.h>
6 #include <LCPlane3D.h>
7 
13 class LCLine3D {
14 
15 public:
16 
20  LCLine3D();
21 
27  LCLine3D(const LCVector3D & point, const LCVector3D & direction) ;
28 
35  LCLine3D(const LCVector3D & point,
36  const LCVector3D & direction,
37  const LCVector3D & reference) ;
38 
46  LCLine3D(double d0, double phi0, double z0, double tanLambda) ;
47 
56  LCLine3D(double d0, double phi0, double z0, double tanLambda,
57  const LCVector3D & reference) ;
58 
62  LCLine3D(const LCLine3D & line) ;
63 
66  ~LCLine3D() {}
67 
74  bool set(const LCVector3D & point,
75  const LCVector3D & direction,
76  const LCVector3D & reference) ;
77 
86  bool set(double d0, double phi0, double z0, double tanLambda,
87  const LCVector3D & reference) ;
88 
91  LCLine3D & operator=(const LCLine3D & rhs) ;
92 
98  LCVector3D position(const double s = 0) const ;
99 
102  LCVector3D direction() const ;
103 
108  double distance(const LCVector3D & point) const ;
109 
114  double projectPoint(const LCVector3D & point) const ;
115 
118  bool operator==(const LCLine3D & rhs) const ;
119 
122  bool operator!=(const LCLine3D & rhs) const ;
123 
127  double intersectionWithPlane(const LCPlane3D plane, bool& pointExists) const ;
128 
129 protected:
130 
131  LCVector3D _point;
132  LCVector3D _direction;
133  LCVector3D _reference;
134 };
135 
136 std::ostream & operator << (std::ostream &os, const LCLine3D &l) ;
137 
138 #endif /* ifndef LCLine3D_H */
bool operator==(const LCLine3D &rhs) const
Test for equality.
Definition: LCLine3D.cc:144
LCVector3D direction() const
Direction of the line.
Definition: LCLine3D.cc:118
LCVector3D position(const double s=0) const
Position is the point of the line after a distance s.
Definition: LCLine3D.cc:113
double projectPoint(const LCVector3D &point) const
Projection of a point on to the line.
Definition: LCLine3D.cc:128
LCLine3D & operator=(const LCLine3D &rhs)
Assignment.
Definition: LCLine3D.cc:104
LCLine3D()
Standard constructor: Initializes a line along the x-axis.
Definition: LCLine3D.cc:9
bool set(const LCVector3D &point, const LCVector3D &direction, const LCVector3D &reference)
set the Parameters for a line using a point and a direction.
Definition: LCLine3D.cc:46
bool operator!=(const LCLine3D &rhs) const
Test for inequality.
Definition: LCLine3D.cc:151
double intersectionWithPlane(const LCPlane3D plane, bool &pointExists) const
Pathlength at closest intersection point with plane - undefined if pointExists==false.
Definition: LCLine3D.cc:158
Definition of a LCLine3D describing a geometrical line in 3D space.
Definition: LCLine3D.h:13
Definition of a LCPlane3D describing a geometrical plane in 3D space.
Definition: LCPlane3D.h:12
~LCLine3D()
Destructor.
Definition: LCLine3D.h:66
double distance(const LCVector3D &point) const
Distance of a point to the line.
Definition: LCLine3D.cc:123