Belle II Software  release-08-01-10
DedxLine Class Reference

A class to hold the endpoints and slope of a line. More...

#include <LineHelper.h>

Collaboration diagram for DedxLine:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DedxLine()

DedxLine ( )
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.

92 : m_m(0), m_vertical(false) {}
int m_vertical
If the line is vertical, this is set to true.
Definition: LineHelper.h:177
double m_m
Slope of the line.
Definition: LineHelper.h:176

The documentation for this class was generated from the following file: