Belle II Software  release-08-01-10
LineSegment2D.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 /* KLM headers. */
12 #include <klm/eklm/geometry/Line2D.h>
13 
14 /* CLHEP headers. */
15 #include <CLHEP/Geometry/Point3D.h>
16 
17 namespace Belle2 {
23  namespace EKLM {
24 
28  class LineSegment2D : public Line2D {
29 
30  public:
31 
38  const HepGeom::Point3D<double>& point2);
39 
44 
51  int findIntersection(const Line2D& line,
52  HepGeom::Point3D<double>* intersection) const;
53 
60  int findIntersection(const LineSegment2D& lineSegment,
61  HepGeom::Point3D<double>* intersection) const;
62 
69  int findIntersection(const Circle2D& circle,
70  HepGeom::Point3D<double> intersections[2]) const;
71 
78  int findIntersection(const Arc2D& arc,
79  HepGeom::Point3D<double> intersections[2]) const;
80 
85  bool tWithinRange(double t) const;
86 
87  };
88 
89  }
90 
92 }
int findIntersection(const Line2D &line, HepGeom::Point3D< double > *intersection) const
Find intersection with a line.
bool tWithinRange(double t) const
Check if t is within the line segment (0 <= t <= 1).
LineSegment2D(const HepGeom::Point3D< double > &point1, const HepGeom::Point3D< double > &point2)
Constructor.
Abstract base class for different kinds of events.