Belle II Software  release-05-02-19
CDCTangent.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHitPair.h>
13 
14 #include <tracking/trackFindingCDC/geometry/ParameterLine2D.h>
15 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
16 
17 #include <iosfwd>
18 
19 namespace Belle2 {
24  namespace TrackFindingCDC {
25  class CDCRecoHit2D;
26  class CDCRLWireHit;
27 
29 
42  class CDCTangent : public CDCRLWireHitPair {
43  public:
45  CDCTangent() = default;
46 
48  explicit CDCTangent(const CDCRLWireHitPair& rlWireHitPair);
49 
51  CDCTangent(const CDCRLWireHit& fromRLWireHit,
52  const CDCRLWireHit& toRLWireHit);
53 
56  CDCTangent(const CDCRLWireHitPair& rlWireHitPair,
57  const ParameterLine2D& line);
58 
60  CDCTangent(const CDCRLWireHit& fromRLWireHit,
61  const CDCRLWireHit& toRLWireHit,
62  const ParameterLine2D& line);
63 
65  const Vector2D& getFromRecoPos2D() const
66  { return getLine().support(); }
67 
69  Vector2D getFromRecoDisp2D() const;
70 
72  Vector2D getToRecoPos2D() const
73  { return getLine().at(1); }
74 
76  Vector2D getToRecoDisp2D() const;
77 
79  const Vector2D& getFlightVec2D() const
80  { return getLine().tangential(); }
81 
83  double getCosFlightDifference(const CDCTangent& tangent) const
84  { return getFlightVec2D().cosWith(tangent.getFlightVec2D()); }
85 
88 
91 
93  void adjustLine();
94 
96  void adjustRLInfo();
97 
102  void reverse();
103 
105  CDCTangent reversed() const;
106 
111  const ParameterLine2D& getLine() const
112  { return m_line; }
113 
114  private:
117  };
118 
120  std::ostream& operator<<(std::ostream& output, const CDCTangent& tangent);
121  }
123 }
Belle2::operator<<
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
Definition: IntervalOfValidity.cc:196
Belle2::TrackFindingCDC::Vector2D
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:37
Belle2::TrackFindingCDC::CDCTangent::getLine
const ParameterLine2D & getLine() const
Getter for the line representation of the line.
Definition: CDCTangent.h:119
Belle2::TrackFindingCDC::CDCTangent::reverse
void reverse()
Reverses the tangent inplace.
Definition: CDCTangent.cc:69
Belle2::TrackFindingCDC::ParameterLine2D::at
Vector2D at(const double parameter) const
Evaluates the line formula at the parameter given.
Definition: ParameterLine2D.h:152
Belle2::TrackFindingCDC::CDCTangent::getFlightVec2D
const Vector2D & getFlightVec2D() const
Getter for the vector from the first to the second touch point.*‍/.
Definition: CDCTangent.h:87
Belle2::TrackFindingCDC::CDCTangent::getFromRecoHit2D
CDCRecoHit2D getFromRecoHit2D() const
Getter for the reconstructed hit on the first oriented wire hit using reconstructed touch point as po...
Definition: CDCTangent.cc:96
Belle2::TrackFindingCDC::CDCTangent::getFromRecoPos2D
const Vector2D & getFromRecoPos2D() const
Getter for the touching point of the tangent to the first drift circle.
Definition: CDCTangent.h:73
Belle2::TrackFindingCDC::ParameterLine2D
A line with a support point and tangential vector.
Definition: ParameterLine2D.h:48
Belle2::TrackFindingCDC::CDCRLWireHitPair::CDCRLWireHitPair
CDCRLWireHitPair()=default
Default constructor for ROOT.
Belle2::TrackFindingCDC::CDCTangent::getToRecoDisp2D
Vector2D getToRecoDisp2D() const
Getter for displacement of the touching point from the second wire in the reference plane.
Definition: CDCTangent.cc:91
Belle2::TrackFindingCDC::CDCTangent::reversed
CDCTangent reversed() const
Same as reverse but returns a copy.
Definition: CDCTangent.cc:80
Belle2::TrackFindingCDC::CDCTangent::getToRecoPos2D
Vector2D getToRecoPos2D() const
Getter for the touching point of the tangent to the second drift circle.
Definition: CDCTangent.h:80
Belle2::TrackFindingCDC::CDCRecoHit2D
Class representing a two dimensional reconstructed hit in the central drift chamber.
Definition: CDCRecoHit2D.h:57
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::CDCTangent
Class representating a linear track piece between two oriented wire hits.
Definition: CDCTangent.h:50
Belle2::TrackFindingCDC::CDCTangent::getFromRecoDisp2D
Vector2D getFromRecoDisp2D() const
Getter for displacement of the touching point from the first wire in the reference plane.
Definition: CDCTangent.cc:86
Belle2::TrackFindingCDC::CDCTangent::CDCTangent
CDCTangent()=default
Default constructor for ROOT.
Belle2::TrackFindingCDC::CDCTangent::adjustRLInfo
void adjustRLInfo()
Adjusts the right left passage information according to the tangent line.
Definition: CDCTangent.cc:60
Belle2::TrackFindingCDC::CDCTangent::getToRecoHit2D
CDCRecoHit2D getToRecoHit2D() const
Getter for the reconstructed hit on the second oriented wire hit using reconstructed touch point as p...
Definition: CDCTangent.cc:101
Belle2::TrackFindingCDC::Vector2D::cosWith
double cosWith(const Vector2D &rhs) const
Definition: Vector2D.h:201
Belle2::TrackFindingCDC::ParameterLine2D::tangential
const Vector2D & tangential() const
Gives the tangential vector of the line.
Definition: ParameterLine2D.h:135
Belle2::TrackFindingCDC::CDCTangent::getCosFlightDifference
double getCosFlightDifference(const CDCTangent &tangent) const
Returns the cosine of the angle between the two flight directions of the tangents.
Definition: CDCTangent.h:91
Belle2::TrackFindingCDC::ParameterLine2D::support
const Vector2D & support() const
Gives the support vector of the line.
Definition: ParameterLine2D.h:146
Belle2::TrackFindingCDC::CDCTangent::m_line
ParameterLine2D m_line
Memory for the line between the two touching points. The first touch point at(0), second at(1).
Definition: CDCTangent.h:124
Belle2::TrackFindingCDC::CDCTangent::adjustLine
void adjustLine()
Adjusts the line to touch the drift circles with the correct right left passage information.
Definition: CDCTangent.cc:52