Belle II Software
release-08-01-10
|
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. More... | |
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.