Belle II Software  release-05-02-19
Line2D.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Kirill Chilikin *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 /* KLM headers. */
14 #include <klm/eklm/geometry/Circle2D.h>
15 #include <klm/eklm/geometry/Arc2D.h>
16 
17 /* CLHEP headers. */
18 #include <CLHEP/Geometry/Point3D.h>
19 #include <CLHEP/Geometry/Vector3D.h>
20 
21 namespace Belle2 {
27  namespace EKLM {
28 
32  class Line2D {
33 
34  public:
35 
43  Line2D(double x, double y, double vecx, double vecy);
44 
48  ~Line2D();
49 
54  {
55  return m_Point;
56  }
57 
61  const HepGeom::Vector3D<double>& getVector() const
62  {
63  return m_Vector;
64  }
65 
72  int findIntersection(const Line2D& line,
73  HepGeom::Point3D<double>* intersection) const;
74 
81  int findIntersection(const Circle2D& circle,
82  HepGeom::Point3D<double> intersections[2]) const;
83 
90  int findIntersection(const Arc2D& arc,
91  HepGeom::Point3D<double> intersections[2]) const;
92 
103  int findIntersection(const Line2D& line,
104  HepGeom::Point3D<double>* intersection,
105  double t[2]) const;
106 
107  protected:
108 
117  int findIntersection(const Circle2D& circle,
118  HepGeom::Point3D<double> intersections[2],
119  double t[2], double angles[2]) const;
120 
129  bool* condition, int n) const;
130 
133 
135  HepGeom::Vector3D<double> m_Vector;
136 
137  };
138 
139  }
140 
142 }
Belle2::EKLM::Arc2D
2D arc.
Definition: Arc2D.h:35
Belle2::EKLM::Line2D
2D line.
Definition: Line2D.h:40
Belle2::EKLM::Circle2D
2D circle.
Definition: Circle2D.h:35
Belle2::EKLM::Line2D::m_Point
HepGeom::Point3D< double > m_Point
Initial point.
Definition: Line2D.h:140
Belle2::EKLM::Line2D::getInitialPoint
const HepGeom::Point3D< double > & getInitialPoint() const
Get initial point.
Definition: Line2D.h:61
Belle2::EKLM::Line2D::~Line2D
~Line2D()
Destructor.
Definition: Line2D.cc:25
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::EKLM::Line2D::m_Vector
HepGeom::Vector3D< double > m_Vector
Vector.
Definition: Line2D.h:143
Belle2::EKLM::Line2D::getVector
const HepGeom::Vector3D< double > & getVector() const
Get vector.
Definition: Line2D.h:69
Belle2::EKLM::Line2D::Line2D
Line2D(double x, double y, double vecx, double vecy)
Constructor.
Definition: Line2D.cc:19
Belle2::EKLM::Line2D::selectIntersections
int selectIntersections(HepGeom::Point3D< double > *intersections, bool *condition, int n) const
Select intersections.
Definition: Line2D.cc:134
Belle2::EKLM::Line2D::findIntersection
int findIntersection(const Line2D &line, HepGeom::Point3D< double > *intersection) const
Find intersection with a line.
Definition: Line2D.cc:30
HepGeom::Point3D< double >