ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Attributes | List of all members
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 More...
 
double trackError2 (const Cluster &cl) const
 calculate the track error at the position of a cluster More...
 
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  }

◆ 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.

◆ 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:
TrkDriftCircleMath::ResidualWithSegment::m_errorPhi2
double m_errorPhi2
Definition: ResidualWithSegment.h:49
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TrkDriftCircleMath::Line::position
const LocVec2D & position() const
Definition: Line.h:65
checkFileSG.line
line
Definition: checkFileSG.py:75
TrkDriftCircleMath::ResidualWithSegment::m_errorY02
double m_errorY02
Definition: ResidualWithSegment.h:48
TrkDriftCircleMath::ResidualWithSegment::m_line
Line m_line
Definition: ResidualWithSegment.h:47
TrkDriftCircleMath::ResidualWithLine::residual
double residual(const LocVec2D &pos) const
Definition: ResidualWithLine.h:21
TrkDriftCircleMath::TransformToLine::set
void set(const Line &line)
Definition: TransformToLine.h:28
TrkDriftCircleMath::RotPhi::sinphi
double sinphi() const
Definition: RotPhi.h:26
TrkDriftCircleMath::TransformToLine::toLineRotation
const RotPhi & toLineRotation() const
rotate local position into line frame
Definition: TransformToLine.h:43
TrkDriftCircleMath::ResidualWithLine::ResidualWithLine
ResidualWithLine()=default
TrkDriftCircleMath::LocVec2D::y
double y() const
Returns the y coordinate of the vector.
Definition: LocVec2D.h:29
TrkDriftCircleMath::TransformToLine::toLine
LocVec2D toLine(const LocVec2D &pos) const
Definition: TransformToLine.h:20
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
TrkDriftCircleMath::TransformToLine::toLineY
double toLineY(const LocVec2D &pos) const
Definition: TransformToLine.h:24
TrkDriftCircleMath::ResidualWithLine::m_transToLine
TransformToLine m_transToLine
Definition: ResidualWithLine.h:37
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5