MarlinUtil  1.12.1
LCCylinder.h
1 #ifndef LCCylinder_H
2 #define LCCylinder_H 1
3 
4 // #include "CLHEP/Vector/ThreeVector.h"
5 #include <LCGeometryTypes.h>
6 
12 class LCCylinder {
13 
14 public:
15 
23  LCCylinder(LCVector3D point1,
24  LCVector3D point2,
25  double radius,
26  bool endPlane = false) ;
27 
36  LCCylinder(double radius, LCVector3D point, LCVector3D axis, bool endPlane) ;
37 
41  LCCylinder(const LCCylinder & cylinder) ;
42 
46 
49  LCCylinder & operator=(const LCCylinder & rhs) ;
50 
53  LCVector3D startPoint() const ;
54 
57  LCVector3D endPoint() const ;
58 
61  LCVector3D axisDirection() const ;
62 
65  double length() const ;
66 
69  double radius() const ;
70 
75  double distance(const LCVector3D & point) const ;
76 
87  LCVector3D projectPoint(const LCVector3D & point, int & code) const ;
88 
93  bool isInside(const LCVector3D & point) const ;
94 
97  bool operator==(const LCCylinder & rhs) const ;
98 
101  bool operator!=(const LCCylinder & rhs) const ;
102 
103 protected:
104 
105  double _radius;
106  bool _endPlane;
107 
108  LCVector3D _axisSstartPoint;
109  LCVector3D _axisEndPoint;
110 
111 };
112 
113 #endif /* ifndef LCCylinder_H */
double length() const
length of cylinder axis
Definition: LCCylinder.cc:70
bool operator==(const LCCylinder &rhs) const
Test for equality.
Definition: LCCylinder.cc:206
bool isInside(const LCVector3D &point) const
Checks if a given point is inside the clyinder.
Definition: LCCylinder.cc:192
LCVector3D endPoint() const
end point of cylinder axis
Definition: LCCylinder.cc:60
LCCylinder & operator=(const LCCylinder &rhs)
Assignment.
Definition: LCCylinder.cc:44
~LCCylinder()
Destructor.
Definition: LCCylinder.h:45
double radius() const
Radius of cylinder.
Definition: LCCylinder.cc:75
double distance(const LCVector3D &point) const
Distance of a point to the cylinder.
Definition: LCCylinder.cc:80
LCVector3D startPoint() const
startpoint of cylinder axis
Definition: LCCylinder.cc:55
LCCylinder(LCVector3D point1, LCVector3D point2, double radius, bool endPlane=false)
Constructor from two points and a radius.
Definition: LCCylinder.cc:11
LCVector3D axisDirection() const
orientation of cylinder axis.
Definition: LCCylinder.cc:65
bool operator!=(const LCCylinder &rhs) const
Test for inequality.
Definition: LCCylinder.cc:214
Definition of a LCCylinder describing a geometrical cylinder in 3D space.
Definition: LCCylinder.h:12
LCVector3D projectPoint(const LCVector3D &point, int &code) const
Projection of a point on to the surface of the cylinder.
Definition: LCCylinder.cc:86