Belle II Software development
CDCTangent Class Reference

Class representing a linear track piece between two oriented wire hits. More...

#include <CDCTangent.h>

Inheritance diagram for CDCTangent:
CDCRLWireHitPair

Public Member Functions

 CDCTangent ()=default
 Default constructor for ROOT.
 
 CDCTangent (const CDCRLWireHitPair &rlWireHitPair)
 Construct a tangent from a pair of oriented wire hits.
 
 CDCTangent (const CDCRLWireHit &fromRLWireHit, const CDCRLWireHit &toRLWireHit)
 Construct a tangent from two oriented wire hits.
 
 CDCTangent (const CDCRLWireHitPair &rlWireHitPair, const ParameterLine2D &line)
 Construct a tangent from a pair of oriented wire hits taking the given tangential line instead of a computed one.
 
 CDCTangent (const CDCRLWireHit &fromRLWireHit, const CDCRLWireHit &toRLWireHit, const ParameterLine2D &line)
 Construct a tangent from two oriented wire hits taking the given tangential line instead of a computed one.
 
const Vector2DgetFromRecoPos2D () const
 Getter for the touching point of the tangent to the first drift circle.
 
Vector2D getFromRecoDisp2D () const
 Getter for displacement of the touching point from the first wire in the reference plane.
 
Vector2D getToRecoPos2D () const
 Getter for the touching point of the tangent to the second drift circle.
 
Vector2D getToRecoDisp2D () const
 Getter for displacement of the touching point from the second wire in the reference plane.
 
const Vector2DgetFlightVec2D () const
 Getter for the vector from the first to the second touch point.*‍/.
 
double getCosFlightDifference (const CDCTangent &tangent) const
 Returns the cosine of the angle between the two flight directions of the tangents.
 
CDCRecoHit2D getFromRecoHit2D () const
 Getter for the reconstructed hit on the first oriented wire hit using reconstructed touch point as position.
 
CDCRecoHit2D getToRecoHit2D () const
 Getter for the reconstructed hit on the second oriented wire hit using reconstructed touch point as position.
 
void adjustLine ()
 Adjusts the line to touch the drift circles with the correct right left passage information.
 
void adjustRLInfo ()
 Adjusts the right left passage information according to the tangent line.
 
void reverse ()
 Reverses the tangent inplace.
 
CDCTangent reversed () const
 Same as reverse but returns a copy.
 
const ParameterLine2DgetLine () const
 Getter for the line representation of the line.
 
CDCRLWireHitPair getAlias () const
 Returns the aliased version of this oriented wire hit pair.
 
bool operator== (const CDCRLWireHitPair &other) const
 Equality comparison based the two oriented wire hits.
 
bool operator< (const CDCRLWireHitPair &other) const
 Total ordering relation based on the from oriented wire hit first and the to oriented wire hit second.
 
CDC::WireNeighborKind getNeighborKind () const
 Getter for the WireNeighborKind of the two underlying wires.
 
CDC::ISuperLayer getISuperLayer () const
 Getter for the common superlayer id of the pair.
 
CDC::EStereoKind getStereoKind () const
 Getter for the common stereo type of the superlayer of the pair.
 
bool isAxial () const
 Indicator if the underlying wires are axial.
 
const CDC::CDCWiregetFromWire () const
 Getter for the wire the first oriented wire hit is based on.
 
const CDC::CDCWiregetToWire () const
 Getter for the wire the second oriented wire hit is based on.
 
bool hasWire (const CDC::CDCWire &wire) const
 Indicator if any of the two oriented wire hits is based on the given wire.
 
const CDCWireHitgetFromWireHit () const
 Getter for the hit wire of the first oriented wire hit.
 
const CDCWireHitgetToWireHit () const
 Getter for the hit wire of the second oriented wire hit.
 
bool hasWireHit (const CDCWireHit &wirehit) const
 Indicator if any of the two oriented wire hits is based on the given wire hit.
 
ERightLeft getFromRLInfo () const
 Getter for the right left passage information of the first oriented wire hit.
 
ERightLeft getToRLInfo () const
 Getter for the right left passage information of the second oriented wire hit.
 
CDCRLWireHitgetFromRLWireHit ()
 Getter for the first oriented wire hit.
 
const CDCRLWireHitgetFromRLWireHit () const
 Constant getter for the first oriented wire hit.
 
CDCRLWireHitgetToRLWireHit ()
 Getter for the second oriented wire hit.
 
const CDCRLWireHitgetToRLWireHit () const
 Constant getter for the second oriented wire hit.
 
void setFromRLWireHit (const CDCRLWireHit &fromRLWireHit)
 Setter for the first oriented wire hit.
 
void setToRLWireHit (const CDCRLWireHit &toRLWireHit)
 Setter for the second oriented wire hit.
 
void setFromRLInfo (ERightLeft fromRLInfo)
 Setter for the right left passage information of the first oriented wire hit.
 
void setToRLInfo (ERightLeft toRLInfo)
 Setter for the right left passage information of the second oriented wire hit.
 
int getICluster () const
 Getter for the cluster id.
 
void setICluster (int iCluster)
 Setter for the cluster id.
 

Protected Attributes

CDCRLWireHit m_fromRLWireHit
 Memory for the reference to the first oriented wire hit.
 
CDCRLWireHit m_toRLWireHit
 Memory for the reference to the second oriented wire hit.
 
int m_iCluster = -1
 Memory for the cluster id of this facet.
 

Private Attributes

ParameterLine2D m_line
 Memory for the line between the two touching points. The first touch point at(0), second at(1).
 

Detailed Description

Class representing a linear track piece between two oriented wire hits.

A tangent is an approximation of the possible trajectory between two oriented wire hits. The approximation is obtained by constructing a tangent between two drift circles of the wire hits (in the reference xy projection).
Generally maximal four tangents are possible. So to uniquely define a tangent we have to give additional information how it passes relative to the drift circles. This right left passage information indicates if the related wire hit should lie to the right of to the left of the tangent. The four possible combinations are then
(ERightLeft::c_Right, ERightLeft::c_Right), (ERightLeft::c_Right, ERightLeft::c_Left),
(ERightLeft::c_Left, ERightLeft::c_Right), (ERightLeft::c_Left,ERightLeft::c_Left).
To represent the tangent this class uses a ParameterLine2D. The touch points to the two drift circles are located at(0) for the first and at(1) for the second. The tangent has therefore a sense of what is forward and can be reversed if necessary. Generally tangents are only a good approximation between neighboring wire hits.

Definition at line 40 of file CDCTangent.h.

Constructor & Destructor Documentation

◆ CDCTangent() [1/4]

CDCTangent ( const CDCRLWireHitPair & rlWireHitPair)
explicit

Construct a tangent from a pair of oriented wire hits.

Definition at line 24 of file CDCTangent.cc.

24 :
25 CDCRLWireHitPair(rlWireHitPair), m_line()
26{
27 adjustLine();
28}
CDCRLWireHitPair()=default
Default constructor for ROOT.
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
void adjustLine()
Adjusts the line to touch the drift circles with the correct right left passage information.
Definition CDCTangent.cc:50

◆ CDCTangent() [2/4]

CDCTangent ( const CDCRLWireHit & fromRLWireHit,
const CDCRLWireHit & toRLWireHit )

Construct a tangent from two oriented wire hits.

Definition at line 30 of file CDCTangent.cc.

31 :
32 CDCRLWireHitPair(fromRLWireHit, toRLWireHit), m_line()
33{
34 adjustLine();
35}

◆ CDCTangent() [3/4]

CDCTangent ( const CDCRLWireHitPair & rlWireHitPair,
const ParameterLine2D & line )

Construct a tangent from a pair of oriented wire hits taking the given tangential line instead of a computed one.

Definition at line 37 of file CDCTangent.cc.

38 :
39 CDCRLWireHitPair(rlWireHitPair),
40 m_line(line)
41{}

◆ CDCTangent() [4/4]

CDCTangent ( const CDCRLWireHit & fromRLWireHit,
const CDCRLWireHit & toRLWireHit,
const ParameterLine2D & line )

Construct a tangent from two oriented wire hits taking the given tangential line instead of a computed one.

Definition at line 43 of file CDCTangent.cc.

45 :
46 CDCRLWireHitPair(fromRLWireHit, toRLWireHit),
47 m_line(line)
48{}

Member Function Documentation

◆ adjustLine()

void adjustLine ( )

Adjusts the line to touch the drift circles with the correct right left passage information.

Definition at line 50 of file CDCTangent.cc.

51{
53 static_cast<double>(getFromRLInfo()) * getFromRLWireHit().getRefDriftLength(),
54 getToRLWireHit().getRefPos2D(),
55 static_cast<double>(getToRLInfo()) * getToRLWireHit().getRefDriftLength());
56}
CDCRLWireHit & getToRLWireHit()
Getter for the second oriented wire hit.
ERightLeft getFromRLInfo() const
Getter for the right left passage information of the first oriented wire hit.
CDCRLWireHit & getFromRLWireHit()
Getter for the first oriented wire hit.
ERightLeft getToRLInfo() const
Getter for the right left passage information of the second oriented wire hit.
static ParameterLine2D touchingCircles(const Vector2D &fromCenter, double fromSignedRadius, const Vector2D &toCenter, double toSignedRadius)
Constructs a line touching two circles in one point each.

◆ adjustRLInfo()

void adjustRLInfo ( )

Adjusts the right left passage information according to the tangent line.

Definition at line 58 of file CDCTangent.cc.

59{
60 ERightLeft newFromRLInfo = getLine().isRightOrLeft(getFromRLWireHit().getRefPos2D());
61 setFromRLInfo(newFromRLInfo);
62
63 ERightLeft newToRLInfo = getLine().isRightOrLeft(getToRLWireHit().getRefPos2D());
64 setToRLInfo(newToRLInfo);
65}
void setFromRLInfo(ERightLeft fromRLInfo)
Setter for the right left passage information of the first oriented wire hit.
void setToRLInfo(ERightLeft toRLInfo)
Setter for the right left passage information of the second oriented wire hit.
const ParameterLine2D & getLine() const
Getter for the line representation of the line.
Definition CDCTangent.h:109
ERightLeft isRightOrLeft(const Vector2D &point) const
Return if the point given is right or left of the line.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Definition ERightLeft.h:25

◆ getAlias()

CDCRLWireHitPair getAlias ( ) const
inherited

Returns the aliased version of this oriented wire hit pair.

Definition at line 50 of file CDCRLWireHitPair.cc.

51{
53}
CDCRLWireHitPair getAlias() const
Returns the aliased version of this oriented wire hit pair.
int getICluster() const
Getter for the cluster id.

◆ getCosFlightDifference()

double getCosFlightDifference ( const CDCTangent & tangent) const
inline

Returns the cosine of the angle between the two flight directions of the tangents.

Definition at line 81 of file CDCTangent.h.

82 { return getFlightVec2D().cosWith(tangent.getFlightVec2D()); }

◆ getFlightVec2D()

const Vector2D & getFlightVec2D ( ) const
inline

Getter for the vector from the first to the second touch point.*‍/.

Definition at line 77 of file CDCTangent.h.

78 { return getLine().tangential(); }

◆ getFromRecoDisp2D()

Vector2D getFromRecoDisp2D ( ) const

Getter for displacement of the touching point from the first wire in the reference plane.

Definition at line 84 of file CDCTangent.cc.

85{
87}
const ROOT::Math::XYVector & getRefPos2D() const
The two dimensional reference position of the underlying wire.
const Vector2D & getFromRecoPos2D() const
Getter for the touching point of the tangent to the first drift circle.
Definition CDCTangent.h:63

◆ getFromRecoHit2D()

CDCRecoHit2D getFromRecoHit2D ( ) const

Getter for the reconstructed hit on the first oriented wire hit using reconstructed touch point as position.

Definition at line 94 of file CDCTangent.cc.

95{
97}
static CDCRecoHit2D fromRecoPos2D(const CDCRLWireHit &rlWireHit, const Vector2D &recoPos2D, bool snap=true)
Constructs a two dimensional reconstructed hit from an absolute position.

◆ getFromRecoPos2D()

const Vector2D & getFromRecoPos2D ( ) const
inline

Getter for the touching point of the tangent to the first drift circle.

Definition at line 63 of file CDCTangent.h.

64 { return getLine().support(); }

◆ getFromRLInfo()

ERightLeft getFromRLInfo ( ) const
inlineinherited

Getter for the right left passage information of the first oriented wire hit.

Definition at line 141 of file CDCRLWireHitPair.h.

142 {
143 return getFromRLWireHit().getRLInfo();
144 }

◆ getFromRLWireHit() [1/2]

CDCRLWireHit & getFromRLWireHit ( )
inlineinherited

Getter for the first oriented wire hit.

Definition at line 153 of file CDCRLWireHitPair.h.

154 {
155 return m_fromRLWireHit;
156 }

◆ getFromRLWireHit() [2/2]

const CDCRLWireHit & getFromRLWireHit ( ) const
inlineinherited

Constant getter for the first oriented wire hit.

Definition at line 165 of file CDCRLWireHitPair.h.

166 {
167 return m_fromRLWireHit;
168 }

◆ getFromWire()

const CDC::CDCWire & getFromWire ( ) const
inlineinherited

Getter for the wire the first oriented wire hit is based on.

Definition at line 105 of file CDCRLWireHitPair.h.

106 {
107 return getFromRLWireHit().getWire();
108 }

◆ getFromWireHit()

const CDCWireHit & getFromWireHit ( ) const
inlineinherited

Getter for the hit wire of the first oriented wire hit.

Definition at line 123 of file CDCRLWireHitPair.h.

124 {
125 return getFromRLWireHit().getWireHit();
126 }

◆ getICluster()

int getICluster ( ) const
inlineinherited

Getter for the cluster id.

Definition at line 195 of file CDCRLWireHitPair.h.

196 {
197 return m_iCluster;
198 }

◆ getISuperLayer()

CDC::ISuperLayer getISuperLayer ( ) const
inlineinherited

Getter for the common superlayer id of the pair.

Definition at line 86 of file CDCRLWireHitPair.h.

87 {
88 CDC::ISuperLayer result = getFromRLWireHit().getISuperLayer();
89 return result == getToRLWireHit().getISuperLayer() ? result : CDC::ISuperLayerUtil::c_Invalid;
90 }

◆ getLine()

const ParameterLine2D & getLine ( ) const
inline

Getter for the line representation of the line.

The line stretches between the two the touch point. The first touch point is at(0) the second at(1).

Definition at line 109 of file CDCTangent.h.

110 { return m_line; }

◆ getNeighborKind()

WireNeighborKind getNeighborKind ( ) const
inlineinherited

Getter for the WireNeighborKind of the two underlying wires.

Definition at line 33 of file CDCRLWireHitPair.cc.

34{
36}
WireNeighborKind getNeighborKind(const CDCWire &wire) const
Returns gives the kind of neighborhood relation from this wire to the given wire.
Definition CDCWire.cc:139
const CDC::CDCWire & getFromWire() const
Getter for the wire the first oriented wire hit is based on.
const CDC::CDCWire & getToWire() const
Getter for the wire the second oriented wire hit is based on.

◆ getStereoKind()

CDC::EStereoKind getStereoKind ( ) const
inlineinherited

Getter for the common stereo type of the superlayer of the pair.

Definition at line 93 of file CDCRLWireHitPair.h.

94 {
95 return CDC::ISuperLayerUtil::getStereoKind(getISuperLayer());
96 }

◆ getToRecoDisp2D()

Vector2D getToRecoDisp2D ( ) const

Getter for displacement of the touching point from the second wire in the reference plane.

Definition at line 89 of file CDCTangent.cc.

90{
92}
Vector2D getToRecoPos2D() const
Getter for the touching point of the tangent to the second drift circle.
Definition CDCTangent.h:70

◆ getToRecoHit2D()

CDCRecoHit2D getToRecoHit2D ( ) const

Getter for the reconstructed hit on the second oriented wire hit using reconstructed touch point as position.

Definition at line 99 of file CDCTangent.cc.

◆ getToRecoPos2D()

Vector2D getToRecoPos2D ( ) const
inline

Getter for the touching point of the tangent to the second drift circle.

Definition at line 70 of file CDCTangent.h.

71 { return getLine().at(1); }

◆ getToRLInfo()

ERightLeft getToRLInfo ( ) const
inlineinherited

Getter for the right left passage information of the second oriented wire hit.

Definition at line 147 of file CDCRLWireHitPair.h.

148 {
149 return getToRLWireHit().getRLInfo();
150 }

◆ getToRLWireHit() [1/2]

CDCRLWireHit & getToRLWireHit ( )
inlineinherited

Getter for the second oriented wire hit.

Definition at line 159 of file CDCRLWireHitPair.h.

160 {
161 return m_toRLWireHit;
162 }

◆ getToRLWireHit() [2/2]

const CDCRLWireHit & getToRLWireHit ( ) const
inlineinherited

Constant getter for the second oriented wire hit.

Definition at line 171 of file CDCRLWireHitPair.h.

172 {
173 return m_toRLWireHit;
174 }

◆ getToWire()

const CDC::CDCWire & getToWire ( ) const
inlineinherited

Getter for the wire the second oriented wire hit is based on.

Definition at line 111 of file CDCRLWireHitPair.h.

112 {
113 return getToRLWireHit().getWire();
114 }

◆ getToWireHit()

const CDCWireHit & getToWireHit ( ) const
inlineinherited

Getter for the hit wire of the second oriented wire hit.

Definition at line 129 of file CDCRLWireHitPair.h.

130 {
131 return getToRLWireHit().getWireHit();
132 }

◆ hasWire()

bool hasWire ( const CDC::CDCWire & wire) const
inlineinherited

Indicator if any of the two oriented wire hits is based on the given wire.

Definition at line 117 of file CDCRLWireHitPair.h.

118 {
119 return getFromRLWireHit().isOnWire(wire) or getToRLWireHit().isOnWire(wire);
120 }

◆ hasWireHit()

bool hasWireHit ( const CDCWireHit & wirehit) const
inlineinherited

Indicator if any of the two oriented wire hits is based on the given wire hit.

Definition at line 135 of file CDCRLWireHitPair.h.

136 {
137 return getFromRLWireHit().hasWireHit(wirehit) or getToRLWireHit().hasWireHit(wirehit);
138 }

◆ isAxial()

bool isAxial ( ) const
inlineinherited

Indicator if the underlying wires are axial.

Definition at line 99 of file CDCRLWireHitPair.h.

100 {
101 return getStereoKind() == CDC::EStereoKind::c_Axial;
102 }

◆ operator<()

bool operator< ( const CDCRLWireHitPair & other) const
inlineinherited

Total ordering relation based on the from oriented wire hit first and the to oriented wire hit second.

Definition at line 61 of file CDCRLWireHitPair.h.

62 {
63 return getICluster() < other.getICluster() or
64 (getICluster() == other.getICluster() and
65 (getFromRLWireHit() < other.getFromRLWireHit() or
66 (getFromRLWireHit() == other.getFromRLWireHit() and
67 getToRLWireHit() < other.getToRLWireHit())));
68 }

◆ operator==()

bool operator== ( const CDCRLWireHitPair & other) const
inlineinherited

Equality comparison based the two oriented wire hits.

Definition at line 51 of file CDCRLWireHitPair.h.

52 {
53 return getFromRLWireHit() == other.getFromRLWireHit() and
54 getToRLWireHit() == other.getToRLWireHit();
55 }

◆ reverse()

void reverse ( )

Reverses the tangent inplace.

Swaps the to wire hits, reverses the left right information and exchanges the two touch points of the line

Definition at line 67 of file CDCTangent.cc.

68{
70
71 //reverse the direction of flight
72 m_line.reverse();
73
74 //adjust the support point to be now at the other wirehit touch position
75 m_line.passiveMoveAtBy(-1);
76}
void reverse()
Reverses the oriented wire hit pair inplace.

◆ reversed()

CDCTangent reversed ( ) const

Same as reverse but returns a copy.

Definition at line 78 of file CDCTangent.cc.

79{
82}
CDCRLWireHitPair reversed() const
Constructs a oriented wire hit pair that is the reverse of this one.
CDCTangent()=default
Default constructor for ROOT.
static ParameterLine2D throughPoints(const Vector2D &start, const Vector2D &end)
Static constructor for a line between to points.

◆ setFromRLInfo()

void setFromRLInfo ( ERightLeft fromRLInfo)
inherited

Setter for the right left passage information of the first oriented wire hit.

Definition at line 55 of file CDCRLWireHitPair.cc.

56{
57 m_fromRLWireHit.setRLInfo(fromRLInfo);
58}
CDCRLWireHit m_fromRLWireHit
Memory for the reference to the first oriented wire hit.

◆ setFromRLWireHit()

void setFromRLWireHit ( const CDCRLWireHit & fromRLWireHit)
inlineinherited

Setter for the first oriented wire hit.

Definition at line 177 of file CDCRLWireHitPair.h.

178 {
179 m_fromRLWireHit = fromRLWireHit;
180 }

◆ setICluster()

void setICluster ( int iCluster)
inlineinherited

Setter for the cluster id.

Definition at line 201 of file CDCRLWireHitPair.h.

202 {
203 m_iCluster = iCluster;
204 }

◆ setToRLInfo()

void setToRLInfo ( ERightLeft toRLInfo)
inherited

Setter for the right left passage information of the second oriented wire hit.

Definition at line 60 of file CDCRLWireHitPair.cc.

61{
62 m_toRLWireHit.setRLInfo(toRLInfo);
63}
CDCRLWireHit m_toRLWireHit
Memory for the reference to the second oriented wire hit.

◆ setToRLWireHit()

void setToRLWireHit ( const CDCRLWireHit & toRLWireHit)
inlineinherited

Setter for the second oriented wire hit.

Definition at line 183 of file CDCRLWireHitPair.h.

184 {
185 m_toRLWireHit = toRLWireHit;
186 }

Member Data Documentation

◆ m_fromRLWireHit

CDCRLWireHit m_fromRLWireHit
protectedinherited

Memory for the reference to the first oriented wire hit.

Definition at line 208 of file CDCRLWireHitPair.h.

◆ m_iCluster

int m_iCluster = -1
protectedinherited

Memory for the cluster id of this facet.

Definition at line 214 of file CDCRLWireHitPair.h.

◆ m_line

ParameterLine2D m_line
private

Memory for the line between the two touching points. The first touch point at(0), second at(1).

Definition at line 114 of file CDCTangent.h.

◆ m_toRLWireHit

CDCRLWireHit m_toRLWireHit
protectedinherited

Memory for the reference to the second oriented wire hit.

Definition at line 211 of file CDCRLWireHitPair.h.


The documentation for this class was generated from the following files: