Belle II Software  release-08-01-10
CDCTangent.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 #pragma once
9 
10 #include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHitPair.h>
11 
12 #include <tracking/trackFindingCDC/geometry/ParameterLine2D.h>
13 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
14 
15 #include <iosfwd>
16 
17 namespace Belle2 {
22  namespace TrackFindingCDC {
23  class CDCRecoHit2D;
24  class CDCRLWireHit;
25 
27 
40  class CDCTangent : public CDCRLWireHitPair {
41  public:
43  CDCTangent() = default;
44 
46  explicit CDCTangent(const CDCRLWireHitPair& rlWireHitPair);
47 
49  CDCTangent(const CDCRLWireHit& fromRLWireHit,
50  const CDCRLWireHit& toRLWireHit);
51 
54  CDCTangent(const CDCRLWireHitPair& rlWireHitPair,
55  const ParameterLine2D& line);
56 
58  CDCTangent(const CDCRLWireHit& fromRLWireHit,
59  const CDCRLWireHit& toRLWireHit,
60  const ParameterLine2D& line);
61 
63  const Vector2D& getFromRecoPos2D() const
64  { return getLine().support(); }
65 
68 
71  { return getLine().at(1); }
72 
74  Vector2D getToRecoDisp2D() const;
75 
77  const Vector2D& getFlightVec2D() const
78  { return getLine().tangential(); }
79 
81  double getCosFlightDifference(const CDCTangent& tangent) const
82  { return getFlightVec2D().cosWith(tangent.getFlightVec2D()); }
83 
86 
89 
91  void adjustLine();
92 
94  void adjustRLInfo();
95 
100  void reverse();
101 
103  CDCTangent reversed() const;
104 
109  const ParameterLine2D& getLine() const
110  { return m_line; }
111 
112  private:
115  };
116 
118  std::ostream& operator<<(std::ostream& output, const CDCTangent& tangent);
119  }
121 }
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Definition: CDCRLWireHit.h:41
Class representing a two dimensional reconstructed hit in the central drift chamber.
Definition: CDCRecoHit2D.h:47
Class representating a linear track piece between two oriented wire hits.
Definition: CDCTangent.h:40
void adjustRLInfo()
Adjusts the right left passage information according to the tangent line.
Definition: CDCTangent.cc:58
CDCTangent()=default
Default constructor for ROOT.
void reverse()
Reverses the tangent inplace.
Definition: CDCTangent.cc:67
Vector2D getToRecoDisp2D() const
Getter for displacement of the touching point from the second wire in the reference plane.
Definition: CDCTangent.cc:89
double getCosFlightDifference(const CDCTangent &tangent) const
Returns the cosine of the angle between the two flight directions of the tangents.
Definition: CDCTangent.h:81
ParameterLine2D m_line
Memory for the line between the two touching points. The first touch point at(0), second at(1).
Definition: CDCTangent.h:114
const Vector2D & getFlightVec2D() const
Getter for the vector from the first to the second touch point.*‍/.
Definition: CDCTangent.h:77
Vector2D getFromRecoDisp2D() const
Getter for displacement of the touching point from the first wire in the reference plane.
Definition: CDCTangent.cc:84
Vector2D getToRecoPos2D() const
Getter for the touching point of the tangent to the second drift circle.
Definition: CDCTangent.h:70
const ParameterLine2D & getLine() const
Getter for the line representation of the line.
Definition: CDCTangent.h:109
CDCRecoHit2D getToRecoHit2D() const
Getter for the reconstructed hit on the second oriented wire hit using reconstructed touch point as p...
Definition: CDCTangent.cc:99
const Vector2D & getFromRecoPos2D() const
Getter for the touching point of the tangent to the first drift circle.
Definition: CDCTangent.h:63
void adjustLine()
Adjusts the line to touch the drift circles with the correct right left passage information.
Definition: CDCTangent.cc:50
CDCRecoHit2D getFromRecoHit2D() const
Getter for the reconstructed hit on the first oriented wire hit using reconstructed touch point as po...
Definition: CDCTangent.cc:94
CDCTangent reversed() const
Same as reverse but returns a copy.
Definition: CDCTangent.cc:78
A line with a support point and tangential vector.
const Vector2D & support() const
Gives the support vector of the line.
Vector2D at(const double parameter) const
Evaluates the line formula at the parameter given.
const Vector2D & tangential() const
Gives the tangential vector of the line.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:35
double cosWith(const Vector2D &rhs) const
Definition: Vector2D.h:199
std::ostream & operator<<(std::ostream &output, const IntervalOfValidity &iov)
Abstract base class for different kinds of events.