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.
 
WireNeighborKind getNeighborKind () const
 Getter for the WireNeighborKind of the two underlying wires.
 
ISuperLayer getISuperLayer () const
 Getter for the common superlayer id of the pair.
 
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 CDCWiregetFromWire () const
 Getter for the wire the first oriented wire hit is based on.
 
const CDCWiregetToWire () const
 Getter for the wire the second oriented wire hit is based on.
 
bool hasWire (const 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 49 of file CDCRLWireHitPair.cc.

50{
52}
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()); }
const Vector2D & getFlightVec2D() const
Getter for the vector from the first to the second touch point.*‍/.
Definition: CDCTangent.h:77
double cosWith(const Vector2D &rhs) const
Definition: Vector2D.h:187

◆ 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(); }
const Vector2D & tangential() const
Gives the tangential vector of the line.

◆ 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 Vector2D & 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.
Definition: CDCRecoHit2D.cc:84

◆ 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(); }
const Vector2D & support() const
Gives the support vector of the line.

◆ getFromRLInfo()

ERightLeft getFromRLInfo ( ) const
inlineinherited

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

Definition at line 137 of file CDCRLWireHitPair.h.

138 {
139 return getFromRLWireHit().getRLInfo();
140 }
ERightLeft getRLInfo() const
Getter for the right left passage information.
Definition: CDCRLWireHit.h:234

◆ getFromRLWireHit() [1/2]

CDCRLWireHit & getFromRLWireHit ( )
inlineinherited

Getter for the first oriented wire hit.

Definition at line 149 of file CDCRLWireHitPair.h.

150 {
151 return m_fromRLWireHit;
152 }
CDCRLWireHit m_fromRLWireHit
Memory for the reference to the first oriented wire hit.

◆ getFromRLWireHit() [2/2]

const CDCRLWireHit & getFromRLWireHit ( ) const
inlineinherited

Constant getter for the first oriented wire hit.

Definition at line 161 of file CDCRLWireHitPair.h.

162 {
163 return m_fromRLWireHit;
164 }

◆ getFromWire()

const CDCWire & getFromWire ( ) const
inlineinherited

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

Definition at line 101 of file CDCRLWireHitPair.h.

102 {
103 return getFromRLWireHit().getWire();
104 }
const CDCWire & getWire() const
Getter for the wire the oriented hit associated to.

◆ getFromWireHit()

const CDCWireHit & getFromWireHit ( ) const
inlineinherited

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

Definition at line 119 of file CDCRLWireHitPair.h.

120 {
121 return getFromRLWireHit().getWireHit();
122 }
const CDCWireHit & getWireHit() const
Getter for the wire hit associated with the oriented hit.
Definition: CDCRLWireHit.h:192

◆ getICluster()

int getICluster ( ) const
inlineinherited

Getter for the cluster id.

Definition at line 191 of file CDCRLWireHitPair.h.

192 {
193 return m_iCluster;
194 }
int m_iCluster
Memory for the cluster id of this facet.

◆ getISuperLayer()

ISuperLayer getISuperLayer ( ) const
inlineinherited

Getter for the common superlayer id of the pair.

Definition at line 82 of file CDCRLWireHitPair.h.

83 {
84 ISuperLayer result = getFromRLWireHit().getISuperLayer();
85 return result == getToRLWireHit().getISuperLayer() ? result : ISuperLayerUtil::c_Invalid;
86 }
ISuperLayer getISuperLayer() const
Getter for the superlayer id.
static const ISuperLayer c_Invalid
Constant making an invalid superlayer id.
Definition: ISuperLayer.h:65

◆ 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 32 of file CDCRLWireHitPair.cc.

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

◆ getStereoKind()

EStereoKind getStereoKind ( ) const
inlineinherited

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

Definition at line 89 of file CDCRLWireHitPair.h.

90 {
92 }
ISuperLayer getISuperLayer() const
Getter for the common superlayer id of the pair.
static EStereoKind getStereoKind(ISuperLayer iSuperLayer)
Returns the stereo kind of the super layer.
Definition: ISuperLayer.cc:26

◆ 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); }
Vector2D at(const double parameter) const
Evaluates the line formula at the parameter given.

◆ getToRLInfo()

ERightLeft getToRLInfo ( ) const
inlineinherited

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

Definition at line 143 of file CDCRLWireHitPair.h.

144 {
145 return getToRLWireHit().getRLInfo();
146 }

◆ getToRLWireHit() [1/2]

CDCRLWireHit & getToRLWireHit ( )
inlineinherited

Getter for the second oriented wire hit.

Definition at line 155 of file CDCRLWireHitPair.h.

156 {
157 return m_toRLWireHit;
158 }
CDCRLWireHit m_toRLWireHit
Memory for the reference to the second oriented wire hit.

◆ getToRLWireHit() [2/2]

const CDCRLWireHit & getToRLWireHit ( ) const
inlineinherited

Constant getter for the second oriented wire hit.

Definition at line 167 of file CDCRLWireHitPair.h.

168 {
169 return m_toRLWireHit;
170 }

◆ getToWire()

const CDCWire & getToWire ( ) const
inlineinherited

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

Definition at line 107 of file CDCRLWireHitPair.h.

108 {
109 return getToRLWireHit().getWire();
110 }

◆ getToWireHit()

const CDCWireHit & getToWireHit ( ) const
inlineinherited

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

Definition at line 125 of file CDCRLWireHitPair.h.

126 {
127 return getToRLWireHit().getWireHit();
128 }

◆ hasWire()

bool hasWire ( const CDCWire wire) const
inlineinherited

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

Definition at line 113 of file CDCRLWireHitPair.h.

114 {
115 return getFromRLWireHit().isOnWire(wire) or getToRLWireHit().isOnWire(wire);
116 }
bool isOnWire(const CDCWire &wire) const
Checks if the oriented hit is associated with the give wire.
Definition: CDCRLWireHit.h:168

◆ 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 131 of file CDCRLWireHitPair.h.

132 {
133 return getFromRLWireHit().hasWireHit(wirehit) or getToRLWireHit().hasWireHit(wirehit);
134 }
bool hasWireHit(const CDCWireHit &wirehit) const
Checks if the oriented hit is associated with the give wire hit.
Definition: CDCRLWireHit.h:198

◆ isAxial()

bool isAxial ( ) const
inlineinherited

Indicator if the underlying wires are axial.

Definition at line 95 of file CDCRLWireHitPair.h.

96 {
97 return getStereoKind() == EStereoKind::c_Axial;
98 }
EStereoKind getStereoKind() const
Getter for the common stereo type of the superlayer of the pair.

◆ 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 57 of file CDCRLWireHitPair.h.

58 {
59 return getICluster() < other.getICluster() or
60 (getICluster() == other.getICluster() and
61 (getFromRLWireHit() < other.getFromRLWireHit() or
62 (getFromRLWireHit() == other.getFromRLWireHit() and
63 getToRLWireHit() < other.getToRLWireHit())));
64 }

◆ operator==()

bool operator== ( const CDCRLWireHitPair other) const
inlineinherited

Equality comparison based the two oriented wire hits.

Definition at line 47 of file CDCRLWireHitPair.h.

48 {
49 return getFromRLWireHit() == other.getFromRLWireHit() and
50 getToRLWireHit() == other.getToRLWireHit();
51 }

◆ 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
73
74 //adjust the support point to be now at the other wirehit touch position
76}
void reverse()
Reverses the oriented wire hit pair inplace.
void reverse()
Reverses the tangential vector inplace.
void passiveMoveAtBy(const double delta)
Moves the support point by the given amount of the parameter in the forward direction.

◆ 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 54 of file CDCRLWireHitPair.cc.

55{
56 m_fromRLWireHit.setRLInfo(fromRLInfo);
57}
void setRLInfo(const ERightLeft rlInfo)
Setter for the right left passage information.
Definition: CDCRLWireHit.h:240

◆ setFromRLWireHit()

void setFromRLWireHit ( const CDCRLWireHit fromRLWireHit)
inlineinherited

Setter for the first oriented wire hit.

Definition at line 173 of file CDCRLWireHitPair.h.

174 {
175 m_fromRLWireHit = fromRLWireHit;
176 }

◆ setICluster()

void setICluster ( int  iCluster)
inlineinherited

Setter for the cluster id.

Definition at line 197 of file CDCRLWireHitPair.h.

198 {
199 m_iCluster = iCluster;
200 }

◆ setToRLInfo()

void setToRLInfo ( ERightLeft  toRLInfo)
inherited

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

Definition at line 59 of file CDCRLWireHitPair.cc.

60{
61 m_toRLWireHit.setRLInfo(toRLInfo);
62}

◆ setToRLWireHit()

void setToRLWireHit ( const CDCRLWireHit toRLWireHit)
inlineinherited

Setter for the second oriented wire hit.

Definition at line 179 of file CDCRLWireHitPair.h.

180 {
181 m_toRLWireHit = toRLWireHit;
182 }

Member Data Documentation

◆ m_fromRLWireHit

CDCRLWireHit m_fromRLWireHit
protectedinherited

Memory for the reference to the first oriented wire hit.

Definition at line 204 of file CDCRLWireHitPair.h.

◆ m_iCluster

int m_iCluster = -1
protectedinherited

Memory for the cluster id of this facet.

Definition at line 210 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 207 of file CDCRLWireHitPair.h.


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