ATLAS Offline Software
ResidualWithSegment.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DCMATH_RESIDUALWITHSEGMENT_H
6 #define DCMATH_RESIDUALWITHSEGMENT_H
7 
14 
15 namespace TrkDriftCircleMath {
16 
21  public:
24  m_line(segment.line()),
25  m_errorY02(segment.dy0() * segment.dy0()),
26  m_errorPhi2(segment.dtheta() * segment.dtheta()) {}
27 
29  double trackError2(const DriftCircle& dc) const {
30  LocVec2D posInLineFrame = m_transToLine.toLine(dc.position());
31  return m_errorY02 + posInLineFrame.x() * m_errorPhi2;
32  }
33 
35  double trackError2(const Cluster& cl) const {
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  }
45 
46  private:
48  double m_errorY02;
49  double m_errorPhi2;
50  };
51 
52 } // namespace TrkDriftCircleMath
53 
54 #endif
TrkDriftCircleMath::ResidualWithSegment::m_errorPhi2
double m_errorPhi2
Definition: ResidualWithSegment.h:49
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
ResidualWithLine.h
TrkDriftCircleMath::Line::position
const LocVec2D & position() const
Definition: Line.h:65
checkFileSG.line
line
Definition: checkFileSG.py:75
TrkDriftCircleMath::ResidualWithLine
Definition: ResidualWithLine.h:16
TrkDriftCircleMath::ResidualWithSegment::m_errorY02
double m_errorY02
Definition: ResidualWithSegment.h:48
TrkDriftCircleMath::ResidualWithSegment::m_line
Line m_line
Definition: ResidualWithSegment.h:47
TrkDriftCircleMath::ResidualWithSegment::trackError2
double trackError2(const Cluster &cl) const
calculate the track error at the position of a cluster
Definition: ResidualWithSegment.h:35
TrkDriftCircleMath::DriftCircle::position
const LocVec2D & position() const
access to local position
Definition: DriftCircle.h:74
TrkDriftCircleMath
Function object to check whether two Segments are sub/super sets or different.
Definition: IMdtSegmentFinder.h:13
Segment.h
DriftCircle.h
TrkDriftCircleMath::LocVec2D::x
double x() const
Returns the x coordinate of the vector.
Definition: LocVec2D.h:27
TrkDriftCircleMath::DriftCircle
This class represents a drift time measurement.
Definition: DriftCircle.h:22
TrkDriftCircleMath::RotPhi::sinphi
double sinphi() const
Definition: RotPhi.h:26
TrkDriftCircleMath::Segment
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:18
TrkDriftCircleMath::LocVec2D
Implementation of 2 dimensional vector class.
Definition: LocVec2D.h:16
TrkDriftCircleMath::Line
Definition: Line.h:17
TrkDriftCircleMath::TransformToLine::toLineRotation
const RotPhi & toLineRotation() const
rotate local position into line frame
Definition: TransformToLine.h:43
Line.h
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
TrkDriftCircleMath::Cluster
class representing a cluster meaurement
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Cluster.h:22
TrkDriftCircleMath::ResidualWithSegment
class to calculate residual of a hit with a segment and calculate the local track errors
Definition: ResidualWithSegment.h:20
TrkDriftCircleMath::ResidualWithLine::m_transToLine
TransformToLine m_transToLine
Definition: ResidualWithLine.h:37
TrkDriftCircleMath::ResidualWithSegment::trackError2
double trackError2(const DriftCircle &dc) const
calculate the track error at the position of a drift circle
Definition: ResidualWithSegment.h:29
Cluster.h
TrkDriftCircleMath::ResidualWithSegment::ResidualWithSegment
ResidualWithSegment(const Segment &segment)
Definition: ResidualWithSegment.h:22
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
LocVec2D.h
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5