Belle II Software development
|
A class to hold the endpoints and slope of a line. More...
#include <LineHelper.h>
Public Member Functions | |
DedxLine () | |
A line is definied either by a point and a slope, or by endpoints. | |
DedxLine (const DedxPoint &p, const double slope) | |
Construct a DedxLine from the given DedxPoint and slope. | |
DedxLine (const DedxPoint &p1, const DedxPoint &p2) | |
Construct a DedxLine from two DedxPoints. | |
double | getSlope () const |
Helper function to return the slope. | |
DedxPoint | intersection (const DedxLine &l) |
Find the intersection of this and another line. | |
bool | isVertical () const |
The m_vertical flag is used for the special case of a vertical line. | |
void | setVertical () |
Mark this DedxLine as being vertical. | |
Private Attributes | |
DedxPoint | m_p1 |
First endpoint. | |
DedxPoint | m_p2 |
Second endpoint. | |
double | m_m |
Slope of the line. | |
int | m_vertical |
If the line is vertical, this is set to true. | |
A class to hold the endpoints and slope of a line.
This class is useful in determining the path length of a track through a CDC cell.
Definition at line 83 of file LineHelper.h.
|
inline |
A line is definied either by a point and a slope, or by endpoints.
If a single point is given, both endpoints are given by the same point (length = 0). Default constructor
Definition at line 92 of file LineHelper.h.
Construct a DedxLine from the given DedxPoint and slope.
Definition at line 95 of file LineHelper.h.
Construct a DedxLine from two DedxPoints.
Definition at line 98 of file LineHelper.h.
|
inline |
Find the intersection of this and another line.
Definition at line 112 of file LineHelper.h.
|
inline |
The m_vertical flag is used for the special case of a vertical line.
Definition at line 167 of file LineHelper.h.
|
inline |
|
private |
Slope of the line.
Definition at line 176 of file LineHelper.h.
|
private |
First endpoint.
Definition at line 174 of file LineHelper.h.
|
private |
Second endpoint.
Definition at line 175 of file LineHelper.h.
|
private |
If the line is vertical, this is set to true.
Definition at line 177 of file LineHelper.h.