Belle II Software development
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/trackingUtilities/eventdata/hits/CDCRLWireHitPair.h>
11
12#include <tracking/trackingUtilities/geometry/ParameterLine2D.h>
13#include <framework/geometry/VectorUtil.h>
14
15#include <Math/Vector2D.h>
16
17#include <iosfwd>
18
19namespace Belle2 {
24 namespace TrackingUtilities {
25 class CDCRLWireHit;
26 class CDCRecoHit2D;
27
29
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 ROOT::Math::XYVector& getFromRecoPos2D() const
66 { return getLine().support(); }
67
69 ROOT::Math::XYVector getFromRecoDisp2D() const;
70
72 ROOT::Math::XYVector getToRecoPos2D() const
73 { return getLine().at(1); }
74
76 ROOT::Math::XYVector getToRecoDisp2D() const;
77
79 const ROOT::Math::XYVector& getFlightVec2D() const
80 { return getLine().tangential(); }
81
83 double getCosFlightDifference(const CDCTangent& tangent) const
84 { return VectorUtil::CosPhi(getFlightVec2D(), tangent.getFlightVec2D()); }
85
88
91
93 void adjustLine();
94
96 void adjustRLInfo();
97
102 void reverse() override;
103
105 CDCTangent reversed() const;
106
112 { return m_line; }
113
114 private:
117 };
118
120 std::ostream& operator<<(std::ostream& output, const CDCTangent& tangent);
121 }
123}
CDCRLWireHitPair()=default
Default constructor for ROOT.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Class representing a two dimensional reconstructed hit in the central drift chamber.
Class representing a linear track piece between two oriented wire hits.
Definition CDCTangent.h:42
void adjustRLInfo()
Adjusts the right left passage information according to the tangent line.
Definition CDCTangent.cc:57
CDCTangent()=default
Default constructor for ROOT.
const ROOT::Math::XYVector & getFromRecoPos2D() const
Getter for the touching point of the tangent to the first drift circle.
Definition CDCTangent.h:65
double getCosFlightDifference(const CDCTangent &tangent) const
Returns the cosine of the angle between the two flight directions of the tangents.
Definition CDCTangent.h:83
ParameterLine2D m_line
Memory for the line between the two touching points. The first touch point at(0), second at(1).
Definition CDCTangent.h:116
ROOT::Math::XYVector getFromRecoDisp2D() const
Getter for displacement of the touching point from the first wire in the reference plane.
Definition CDCTangent.cc:83
const ROOT::Math::XYVector & getFlightVec2D() const
Getter for the vector from the first to the second touch point.*‍/.
Definition CDCTangent.h:79
CDCRecoHit2D getToRecoHit2D() const
Getter for the reconstructed hit on the second oriented wire hit using reconstructed touch point as p...
Definition CDCTangent.cc:98
ROOT::Math::XYVector getToRecoDisp2D() const
Getter for displacement of the touching point from the second wire in the reference plane.
Definition CDCTangent.cc:88
void reverse() override
Reverses the tangent inplace.
Definition CDCTangent.cc:66
void adjustLine()
Adjusts the line to touch the drift circles with the correct right left passage information.
Definition CDCTangent.cc:49
CDCRecoHit2D getFromRecoHit2D() const
Getter for the reconstructed hit on the first oriented wire hit using reconstructed touch point as po...
Definition CDCTangent.cc:93
const ParameterLine2D & getLine() const
Getter for the line representation of the line.
Definition CDCTangent.h:111
CDCTangent reversed() const
Same as reverse but returns a copy.
Definition CDCTangent.cc:77
ROOT::Math::XYVector getToRecoPos2D() const
Getter for the touching point of the tangent to the second drift circle.
Definition CDCTangent.h:72
A line with a support point and tangential vector.
const ROOT::Math::XYVector & support() const
Gives the support vector of the line.
const ROOT::Math::XYVector & tangential() const
Gives the tangential vector of the line.
ROOT::Math::XYVector at(const double parameter) const
Evaluates the line formula at the parameter given.
Abstract base class for different kinds of events.