Belle II Software development
CDCFacet.cc
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#include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
9
10#include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHitTriple.h>
11#include <tracking/trackFindingCDC/eventdata/hits/CDCTangent.h>
12#include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit2D.h>
13#include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHit.h>
14#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
15
16#include <tracking/trackFindingCDC/topology/CDCWire.h>
17
18#include <tracking/trackFindingCDC/geometry/UncertainParameterLine2D.h>
19#include <tracking/trackFindingCDC/geometry/ParameterLine2D.h>
20#include <tracking/trackFindingCDC/geometry/Vector2D.h>
21
22#include <tracking/trackFindingCDC/ca/AutomatonCell.h>
23
24using namespace Belle2;
25using namespace TrackFindingCDC;
26
27CDCFacet::CDCFacet(const CDCRLWireHit& startRLWireHit,
28 const CDCRLWireHit& middleRLWireHit,
29 const CDCRLWireHit& endRLWireHit)
30 : CDCRLWireHitTriple(startRLWireHit, middleRLWireHit, endRLWireHit),
31 m_fitLine(),
32 m_automatonCell()
33{
35}
36
37CDCFacet::CDCFacet(const CDCRLWireHit& startRLWireHit,
38 const CDCRLWireHit& middleRLWireHit,
39 const CDCRLWireHit& endRLWireHit,
40 const UncertainParameterLine2D& fitLine)
41 : CDCRLWireHitTriple(startRLWireHit, middleRLWireHit, endRLWireHit),
42 m_fitLine(fitLine),
43 m_automatonCell()
44{
45}
46
48{
51}
52
54{
59}
60
62{
64}
65
67{
69}
70
72{
73 return getFitLine()->closest(getStartWire().getRefPos2D());
74}
75
77{
78 return getFitLine()->closest(getMiddleWire().getRefPos2D());
79}
80
82{
83 return getFitLine()->closest(getEndWire().getRefPos2D());
84}
85
87{
89 getStartRLWireHit().getSignedRefDriftLength() ,
90 getMiddleRLWireHit().getRefPos2D(),
91 getMiddleRLWireHit().getSignedRefDriftLength());
92}
93
95{
97 getStartRLWireHit().getSignedRefDriftLength() ,
98 getEndRLWireHit().getRefPos2D(),
99 getEndRLWireHit().getSignedRefDriftLength());
100}
101
103{
105 getMiddleRLWireHit().getSignedRefDriftLength() ,
106 getEndRLWireHit().getRefPos2D(),
107 getEndRLWireHit().getSignedRefDriftLength());
108}
109
111{
113}
114
116{
118}
119
121{
123}
124
126{
128}
129
131{
133}
134
136{
138}
139
141{
146}
147
149{
154}
155
157{
158 if (getStartWireHit().getAutomatonCell().hasMaskedFlag() or
159 getMiddleWireHit().getAutomatonCell().hasMaskedFlag() or
160 getEndWireHit().getAutomatonCell().hasMaskedFlag()) {
161
163 }
164}
void setMaskedFlag(bool setTo=true)
Sets the masked flag to the given value. Default value true.
void unsetMaskedFlag()
Resets the masked flag to false.
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition: CDCFacet.h:32
void adjustFitLine() const
Adjusts the contained fit line to touch such that it touches the first and third hit.
Definition: CDCFacet.cc:61
ParameterLine2D getStartToEndLine() const
Getter for the tangential line from the first to the third hit.
Definition: CDCFacet.cc:94
CDCRecoHit2D getEndRecoHit2D() const
Getter for the third reconstructed hit.
Definition: CDCFacet.cc:120
void reverse()
Reverses the facet in place including the fit line.
Definition: CDCFacet.cc:47
CDCRecoHit2D getMiddleRecoHit2D() const
Getter for the second reconstructed hit.
Definition: CDCFacet.cc:115
CDCFacet()=default
Default constructor for ROOT.
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCFacet.h:130
UncertainParameterLine2D m_fitLine
Memory for a line fit to the three contained hits.
Definition: CDCFacet.h:137
void setAndForwardMaskedFlag() const
Sets the masked flag of the facet's automaton cell and of the three contained wire hits.
Definition: CDCFacet.cc:148
Vector2D getEndRecoPos2D() const
Getter for the reconstructed position at the third hit on the fit line.
Definition: CDCFacet.cc:81
void unsetAndForwardMaskedFlag() const
Unset the masked flag of the facet's automaton cell and of the three contained wire hits.
Definition: CDCFacet.cc:140
const UncertainParameterLine2D & getFitLine() const
Getter for the contained line fit information.
Definition: CDCFacet.h:61
CDCRecoHit2D getStartRecoHit2D() const
Getter for the first reconstructed hit.
Definition: CDCFacet.cc:110
void invalidateFitLine()
Clear all information in the fit.
Definition: CDCFacet.cc:66
CDCTangent getStartToEnd() const
Getter for the tangential line including the hits from the first to the third hit.
Definition: CDCFacet.cc:130
CDCFacet reversed() const
Constructs the reverse triple from this one.
Definition: CDCFacet.cc:53
CDCTangent getMiddleToEnd() const
Getter for the tangential line including the hits from the second to the third hit.
Definition: CDCFacet.cc:135
void receiveMaskedFlag() const
If one of the contained wire hits is marked as masked this facet is set be masked as well.
Definition: CDCFacet.cc:156
Vector2D getMiddleRecoPos2D() const
Getter for the reconstructed position at the second hit on the fit line.
Definition: CDCFacet.cc:76
ParameterLine2D getStartToMiddleLine() const
Getter for the tangential line from the first to the second hit.
Definition: CDCFacet.cc:86
CDCTangent getStartToMiddle() const
Getter for the tangential line including the hits from the first to the second hit.
Definition: CDCFacet.cc:125
ParameterLine2D getMiddleToEndLine() const
Getter for the tangential line from the second to the third hit.
Definition: CDCFacet.cc:102
Vector2D getStartRecoPos2D() const
Getter for the reconstructed position at the first hit on the fit line.
Definition: CDCFacet.cc:71
Class representing a triple of neighboring wire hits.
const CDCWireHit & getMiddleWireHit() const
Getter for the hit wire of the second oriented wire hit.
void reverse()
Reverses the triple inplace.
const CDCWire & getStartWire() const
Getter for the wire the first oriented wire hit is based on.
const CDCWire & getMiddleWire() const
Getter for the wire the second oriented wire hit is based on.
CDCRLWireHit & getStartRLWireHit()
Getter for the first oriented wire hit.
const CDCWireHit & getEndWireHit() const
Getter for the hit wire of the third oriented wire hit.
const CDCWireHit & getStartWireHit() const
Getter for the hit wire of the first oriented wire hit.
const CDCWire & getEndWire() const
Getter for the wire the third oriented wire hit is based on.
CDCRLWireHit & getEndRLWireHit()
Getter for the third oriented wire hit.
CDCRLWireHit & getMiddleRLWireHit()
Getter for the second oriented wire hit.
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
static CDCRecoHit2D fromRecoPos2D(const CDCRLWireHit &rlWireHit, const Vector2D &recoPos2D, bool snap=true)
Constructs a two dimensional reconstructed hit from an absolute position.
Definition: CDCRecoHit2D.cc:84
Class representing a linear track piece between two oriented wire hits.
Definition: CDCTangent.h:40
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCWireHit.h:286
A line with a support point and tangential vector.
static ParameterLine2D touchingCircles(const Vector2D &fromCenter, double fromSignedRadius, const Vector2D &toCenter, double toSignedRadius)
Constructs a line touching two circles in one point each.
Vector2D closest(const Vector2D &point) const
Gives the position at the closest approach on the line to point.
A parameter line including including an line covariance matrix which is interpreted as located in the...
void reverse()
Reverses the direction of flight represented by this line.
UncertainParameterLine2D reversed() const
Returns a copy of the line corresponding to the reverse direction of travel.
void invalidate()
Sets all line parameters to zero including the covariance matrix.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
Definition: Vector2D.h:32
Abstract base class for different kinds of events.