ATLAS Offline Software
Loading...
Searching...
No Matches
TrkDriftCircleMath::ResidualWithSegment Class Reference

class to calculate residual of a hit with a segment and calculate the local track errors More...

#include <ResidualWithSegment.h>

Inheritance diagram for TrkDriftCircleMath::ResidualWithSegment:
Collaboration diagram for TrkDriftCircleMath::ResidualWithSegment:

Public Member Functions

 ResidualWithSegment (const Segment &segment)
double trackError2 (const DriftCircle &dc) const
 calculate the track error at the position of a drift circle
double trackError2 (const Cluster &cl) const
 calculate the track error at the position of a cluster
double residual (const LocVec2D &pos) const
double residual (const DriftCircle &dc) const
double residual (const Cluster &cl) const
void set (const Line &line)

Protected Attributes

TransformToLine m_transToLine

Private Attributes

Line m_line
double m_errorY02
double m_errorPhi2

Detailed Description

class to calculate residual of a hit with a segment and calculate the local track errors

Definition at line 20 of file ResidualWithSegment.h.

Constructor & Destructor Documentation

◆ ResidualWithSegment()

TrkDriftCircleMath::ResidualWithSegment::ResidualWithSegment ( const Segment & segment)
inline

Definition at line 22 of file ResidualWithSegment.h.

22 :
23 ResidualWithLine(segment.line()),
24 m_line(segment.line()),
25 m_errorY02(segment.dy0() * segment.dy0()),
26 m_errorPhi2(segment.dtheta() * segment.dtheta()) {}

Member Function Documentation

◆ residual() [1/3]

double TrkDriftCircleMath::ResidualWithLine::residual ( const Cluster & cl) const
inlineinherited

Definition at line 25 of file ResidualWithLine.h.

25 {
26 // the residual of a cluster is calculated from the point of closest approach and
27 // the angle of the line with the plane
28 double driftRes = residual(cl.position());
29 double sinPhi = m_transToLine.toLineRotation().sinphi();
30 if (sinPhi < 1e-13) sinPhi = 1e-13;
31 return driftRes / sinPhi;
32 }
double residual(const LocVec2D &pos) const
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]

◆ residual() [2/3]

double TrkDriftCircleMath::ResidualWithLine::residual ( const DriftCircle & dc) const
inlineinherited

Definition at line 23 of file ResidualWithLine.h.

23{ return std::abs(residual(dc.position())) - std::abs(dc.r()); }

◆ residual() [3/3]

double TrkDriftCircleMath::ResidualWithLine::residual ( const LocVec2D & pos) const
inlineinherited

Definition at line 21 of file ResidualWithLine.h.

21{ return m_transToLine.toLineY(pos); }

◆ set()

void TrkDriftCircleMath::ResidualWithLine::set ( const Line & line)
inlineinherited

Definition at line 34 of file ResidualWithLine.h.

34{ m_transToLine.set(line); }

◆ trackError2() [1/2]

double TrkDriftCircleMath::ResidualWithSegment::trackError2 ( const Cluster & cl) const
inline

calculate the track error at the position of a cluster

Definition at line 35 of file ResidualWithSegment.h.

35 {
36 double yDistToSegment = cl.position().y() - m_line.position().y();
37
38 double sinPhi = m_transToLine.toLineRotation().sinphi();
39 if (sinPhi < 1e-13) sinPhi = 1e-13;
40 double invSinPhi2 = sinPhi * sinPhi;
41 invSinPhi2 = 1. / invSinPhi2;
42
43 return m_errorY02 * invSinPhi2 + yDistToSegment * yDistToSegment * invSinPhi2 * m_errorPhi2;
44 }

◆ trackError2() [2/2]

double TrkDriftCircleMath::ResidualWithSegment::trackError2 ( const DriftCircle & dc) const
inline

calculate the track error at the position of a drift circle

Definition at line 29 of file ResidualWithSegment.h.

29 {
30 LocVec2D posInLineFrame = m_transToLine.toLine(dc.position());
31 return m_errorY02 + posInLineFrame.x() * m_errorPhi2;
32 }

Member Data Documentation

◆ m_errorPhi2

double TrkDriftCircleMath::ResidualWithSegment::m_errorPhi2
private

Definition at line 49 of file ResidualWithSegment.h.

◆ m_errorY02

double TrkDriftCircleMath::ResidualWithSegment::m_errorY02
private

Definition at line 48 of file ResidualWithSegment.h.

◆ m_line

Line TrkDriftCircleMath::ResidualWithSegment::m_line
private

Definition at line 47 of file ResidualWithSegment.h.

◆ m_transToLine

TransformToLine TrkDriftCircleMath::ResidualWithLine::m_transToLine
protectedinherited

Definition at line 37 of file ResidualWithLine.h.


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