Belle II Software  release-05-01-25
CDCFacet.cc
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 #include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHitTriple.h>
13 #include <tracking/trackFindingCDC/eventdata/hits/CDCTangent.h>
14 #include <tracking/trackFindingCDC/eventdata/hits/CDCRecoHit2D.h>
15 #include <tracking/trackFindingCDC/eventdata/hits/CDCRLWireHit.h>
16 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
17 
18 #include <tracking/trackFindingCDC/topology/CDCWire.h>
19 
20 #include <tracking/trackFindingCDC/geometry/UncertainParameterLine2D.h>
21 #include <tracking/trackFindingCDC/geometry/ParameterLine2D.h>
22 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
23 
24 #include <tracking/trackFindingCDC/ca/AutomatonCell.h>
25 
26 using namespace Belle2;
27 using namespace TrackFindingCDC;
28 
29 CDCFacet::CDCFacet(const CDCRLWireHit& startRLWireHit,
30  const CDCRLWireHit& middleRLWireHit,
31  const CDCRLWireHit& endRLWireHit)
32  : CDCRLWireHitTriple(startRLWireHit, middleRLWireHit, endRLWireHit),
33  m_fitLine(),
34  m_automatonCell()
35 {
36  adjustFitLine();
37 }
38 
39 CDCFacet::CDCFacet(const CDCRLWireHit& startRLWireHit,
40  const CDCRLWireHit& middleRLWireHit,
41  const CDCRLWireHit& endRLWireHit,
42  const UncertainParameterLine2D& fitLine)
43  : CDCRLWireHitTriple(startRLWireHit, middleRLWireHit, endRLWireHit),
44  m_fitLine(fitLine),
45  m_automatonCell()
46 {
47 }
48 
50 {
53 }
54 
56 {
61 }
62 
64 {
66 }
67 
69 {
71 }
72 
74 {
75  return getFitLine()->closest(getStartWire().getRefPos2D());
76 }
77 
79 {
80  return getFitLine()->closest(getMiddleWire().getRefPos2D());
81 }
82 
84 {
85  return getFitLine()->closest(getEndWire().getRefPos2D());
86 }
87 
89 {
91  getStartRLWireHit().getSignedRefDriftLength() ,
92  getMiddleRLWireHit().getRefPos2D(),
93  getMiddleRLWireHit().getSignedRefDriftLength());
94 }
95 
97 {
99  getStartRLWireHit().getSignedRefDriftLength() ,
100  getEndRLWireHit().getRefPos2D(),
101  getEndRLWireHit().getSignedRefDriftLength());
102 }
103 
105 {
107  getMiddleRLWireHit().getSignedRefDriftLength() ,
108  getEndRLWireHit().getRefPos2D(),
109  getEndRLWireHit().getSignedRefDriftLength());
110 }
111 
113 {
115 }
116 
118 {
120 }
121 
123 {
125 }
126 
128 {
130 }
131 
133 {
135 }
136 
138 {
140 }
141 
143 {
148 }
149 
151 {
156 }
157 
159 {
160  if (getStartWireHit().getAutomatonCell().hasMaskedFlag() or
161  getMiddleWireHit().getAutomatonCell().hasMaskedFlag() or
162  getEndWireHit().getAutomatonCell().hasMaskedFlag()) {
163 
165  }
166 }
Belle2::TrackFindingCDC::CDCWireHit::getAutomatonCell
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCWireHit.h:294
Belle2::TrackFindingCDC::CDCFacet::setAndForwardMaskedFlag
void setAndForwardMaskedFlag() const
Sets the masked flag of the facet's automaton cell and of the three contained wire hits.
Definition: CDCFacet.cc:150
Belle2::TrackFindingCDC::CDCFacet::getStartToEndLine
ParameterLine2D getStartToEndLine() const
Getter for the tangential line from the first to the third hit.
Definition: CDCFacet.cc:96
Belle2::TrackFindingCDC::CDCFacet::getStartRecoPos2D
Vector2D getStartRecoPos2D() const
Getter for the reconstructed position at the first hit on the fit line.
Definition: CDCFacet.cc:73
Belle2::TrackFindingCDC::CDCFacet::getMiddleRecoHit2D
CDCRecoHit2D getMiddleRecoHit2D() const
Getter for the second reconstucted hit.
Definition: CDCFacet.cc:117
Belle2::TrackFindingCDC::UncertainParameterLine2D::invalidate
void invalidate()
Sets all line parameters to zero including the covariance matrix.
Definition: UncertainParameterLine2D.h:134
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getStartWire
const CDCWire & getStartWire() const
Getter for the wire the first oriented wire hit is based on.
Definition: CDCRLWireHitTriple.h:170
Belle2::TrackFindingCDC::ParameterLine2D::touchingCircles
static ParameterLine2D touchingCircles(const Vector2D &fromCenter, double fromSignedRadius, const Vector2D &toCenter, double toSignedRadius)
Constructs a line touching two circles in one point each.
Definition: ParameterLine2D.cc:19
Belle2::TrackFindingCDC::CDCFacet::getAutomatonCell
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCFacet.h:140
Belle2::TrackFindingCDC::Vector2D
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:37
Belle2::TrackFindingCDC::CDCRLWireHitTriple::reverse
void reverse()
Reverses the triple inplace.
Definition: CDCRLWireHitTriple.cc:81
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getStartWireHit
const CDCWireHit & getStartWireHit() const
Getter for the hit wire of the first oriented wire hit.
Definition: CDCRLWireHitTriple.h:212
Belle2::TrackFindingCDC::CDCRecoHit2D::fromRecoPos2D
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:88
Belle2::TrackFindingCDC::CDCFacet::getStartToMiddle
CDCTangent getStartToMiddle() const
Getter for the tangential line including the hits from the first to the second hit.
Definition: CDCFacet.cc:127
Belle2::TrackFindingCDC::AutomatonCell::unsetMaskedFlag
void unsetMaskedFlag()
Resets the masked flag to false.
Definition: AutomatonCell.h:222
Belle2::TrackFindingCDC::CDCFacet::getStartRecoHit2D
CDCRecoHit2D getStartRecoHit2D() const
Getter for the first reconstucted hit.
Definition: CDCFacet.cc:112
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getEndWireHit
const CDCWireHit & getEndWireHit() const
Getter for the hit wire of the third oriented wire hit.
Definition: CDCRLWireHitTriple.h:224
Belle2::TrackFindingCDC::CDCRLWireHitTriple
Class representing a triple of neighboring wire hits.
Definition: CDCRLWireHitTriple.h:45
Belle2::TrackFindingCDC::ParameterLine2D
A line with a support point and tangential vector.
Definition: ParameterLine2D.h:48
Belle2::TrackFindingCDC::CDCFacet::getStartToEnd
CDCTangent getStartToEnd() const
Getter for the tangential line including the hits from the first to the third hit.
Definition: CDCFacet.cc:132
Belle2::TrackFindingCDC::CDCFacet::adjustFitLine
void adjustFitLine() const
Adjusts the contained fit line to touch such that it touches the first and third hit.
Definition: CDCFacet.cc:63
Belle2::TrackFindingCDC::UncertainParameterLine2D::reversed
UncertainParameterLine2D reversed() const
Returns a copy of the line corresponding to the reverse direction of travel.
Definition: UncertainParameterLine2D.h:151
Belle2::TrackFindingCDC::CDCFacet::m_fitLine
UncertainParameterLine2D m_fitLine
Memory for a line fit to the three contained hits.
Definition: CDCFacet.h:147
Belle2::TrackFindingCDC::CDCFacet::unsetAndForwardMaskedFlag
void unsetAndForwardMaskedFlag() const
Unset the masked flag of the facet's automaton cell and of the three contained wire hits.
Definition: CDCFacet.cc:142
Belle2::TrackFindingCDC::AutomatonCell::setMaskedFlag
void setMaskedFlag(bool setTo=true)
Sets the masked flag to the given value. Default value true.
Definition: AutomatonCell.h:216
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getMiddleWireHit
const CDCWireHit & getMiddleWireHit() const
Getter for the hit wire of the second oriented wire hit.
Definition: CDCRLWireHitTriple.h:218
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getEndWire
const CDCWire & getEndWire() const
Getter for the wire the third oriented wire hit is based on.
Definition: CDCRLWireHitTriple.h:182
Belle2::TrackFindingCDC::CDCFacet::getMiddleToEnd
CDCTangent getMiddleToEnd() const
Getter for the tangential line including the hits from the second to the third hit.
Definition: CDCFacet.cc:137
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::CDCFacet::getStartToMiddleLine
ParameterLine2D getStartToMiddleLine() const
Getter for the tangential line from the first to the second hit.
Definition: CDCFacet.cc:88
Belle2::TrackFindingCDC::CDCRLWireHit
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Definition: CDCRLWireHit.h:51
Belle2::TrackFindingCDC::CDCTangent
Class representating a linear track piece between two oriented wire hits.
Definition: CDCTangent.h:50
Belle2::TrackFindingCDC::ParameterLine2D::closest
Vector2D closest(const Vector2D &point) const
Gives the position at the closest approach on the line to point.
Definition: ParameterLine2D.h:255
Belle2::TrackFindingCDC::CDCFacet::CDCFacet
CDCFacet()=default
Default constructor for ROOT.
Belle2::TrackFindingCDC::CDCFacet::reversed
CDCFacet reversed() const
Constructs the reverse tiple from this one.
Definition: CDCFacet.cc:55
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getMiddleWire
const CDCWire & getMiddleWire() const
Getter for the wire the second oriented wire hit is based on.
Definition: CDCRLWireHitTriple.h:176
Belle2::TrackFindingCDC::CDCFacet::getEndRecoPos2D
Vector2D getEndRecoPos2D() const
Getter for the reconstructed position at the third hit on the fit line.
Definition: CDCFacet.cc:83
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getMiddleRLWireHit
CDCRLWireHit & getMiddleRLWireHit()
Getter for the second oriented wire hit.
Definition: CDCRLWireHitTriple.h:243
Belle2::TrackFindingCDC::CDCFacet::receiveMaskedFlag
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:158
Belle2::TrackFindingCDC::CDCFacet::invalidateFitLine
void invalidateFitLine()
Clear all information in the fit.
Definition: CDCFacet.cc:68
Belle2::TrackFindingCDC::CDCFacet
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition: CDCFacet.h:42
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getEndRLWireHit
CDCRLWireHit & getEndRLWireHit()
Getter for the third oriented wire hit.
Definition: CDCRLWireHitTriple.h:249
Belle2::TrackFindingCDC::CDCFacet::getMiddleToEndLine
ParameterLine2D getMiddleToEndLine() const
Getter for the tangential line from the second to the third hit.
Definition: CDCFacet.cc:104
Belle2::TrackFindingCDC::UncertainParameterLine2D::reverse
void reverse()
Reverses the direction of flight represented by this line.
Definition: UncertainParameterLine2D.h:144
Belle2::TrackFindingCDC::UncertainParameterLine2D
A parameter line including including an line covariance matrix which is interpreted as located in the...
Definition: UncertainParameterLine2D.h:34
Belle2::TrackFindingCDC::CDCRLWireHitTriple::getStartRLWireHit
CDCRLWireHit & getStartRLWireHit()
Getter for the first oriented wire hit.
Definition: CDCRLWireHitTriple.h:237
Belle2::TrackFindingCDC::CDCFacet::getMiddleRecoPos2D
Vector2D getMiddleRecoPos2D() const
Getter for the reconstructed position at the second hit on the fit line.
Definition: CDCFacet.cc:78
Belle2::TrackFindingCDC::CDCFacet::getFitLine
const UncertainParameterLine2D & getFitLine() const
Getter for the contained line fit information.
Definition: CDCFacet.h:71
Belle2::TrackFindingCDC::CDCFacet::getEndRecoHit2D
CDCRecoHit2D getEndRecoHit2D() const
Getter for the third reconstucted hit.
Definition: CDCFacet.cc:122
Belle2::TrackFindingCDC::CDCFacet::reverse
void reverse()
Reverses the facet inplace including the fit line.
Definition: CDCFacet.cc:49