Belle II Software development
Line2D.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/Circle2D.h>
13#include <klm/eklm/geometry/Arc2D.h>
14
15/* CLHEP headers. */
16#include <CLHEP/Geometry/Point3D.h>
17#include <CLHEP/Geometry/Vector3D.h>
18
19namespace Belle2 {
25 namespace EKLM {
26
30 class Line2D {
31
32 public:
33
41 Line2D(double x, double y, double vecx, double vecy);
42
46 ~Line2D();
47
52 {
53 return m_Point;
54 }
55
59 const HepGeom::Vector3D<double>& getVector() const
60 {
61 return m_Vector;
62 }
63
70 int findIntersection(const Line2D& line,
71 HepGeom::Point3D<double>* intersection) const;
72
79 int findIntersection(const Circle2D& circle,
80 HepGeom::Point3D<double> intersections[2]) const;
81
88 int findIntersection(const Arc2D& arc,
89 HepGeom::Point3D<double> intersections[2]) const;
90
101 int findIntersection(const Line2D& line,
102 HepGeom::Point3D<double>* intersection,
103 double t[2]) const;
104
105 protected:
106
115 int findIntersection(const Circle2D& circle,
116 HepGeom::Point3D<double> intersections[2],
117 double t[2], double angles[2]) const;
118
127 bool* condition, int n) const;
128
131
133 HepGeom::Vector3D<double> m_Vector;
134
135 };
136
137 }
138
140}
int findIntersection(const Line2D &line, HepGeom::Point3D< double > *intersection) const
Find intersection with a line.
Definition: Line2D.cc:28
int selectIntersections(HepGeom::Point3D< double > *intersections, bool *condition, int n) const
Select intersections.
Definition: Line2D.cc:132
const HepGeom::Vector3D< double > & getVector() const
Get vector.
Definition: Line2D.h:59
~Line2D()
Destructor.
Definition: Line2D.cc:23
const HepGeom::Point3D< double > & getInitialPoint() const
Get initial point.
Definition: Line2D.h:51
HepGeom::Point3D< double > m_Point
Initial point.
Definition: Line2D.h:130
HepGeom::Vector3D< double > m_Vector
Vector.
Definition: Line2D.h:133
Abstract base class for different kinds of events.