ATLAS Offline Software
ResidualWithLine.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_RESIDUALWITHLINE_H
6 #define DCMATH_RESIDUALWITHLINE_H
7 
13 
14 namespace TrkDriftCircleMath {
15 
17  public:
18  ResidualWithLine() = default;
20 
21  double residual(const LocVec2D& pos) const { return m_transToLine.toLineY(pos); }
22 
23  double residual(const DriftCircle& dc) const { return std::abs(residual(dc.position())) - std::abs(dc.r()); }
24 
25  double residual(const Cluster& cl) const {
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  }
33 
34  void set(const Line& line) { m_transToLine.set(line); }
35 
36  protected:
38  };
39 
40 } // namespace TrkDriftCircleMath
41 
42 #endif
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
checkFileSG.line
line
Definition: checkFileSG.py:75
TrkDriftCircleMath::ResidualWithLine
Definition: ResidualWithLine.h:16
TransformToLine.h
TrkDriftCircleMath::DriftCircle::position
const LocVec2D & position() const
access to local position
Definition: DriftCircle.h:74
TrkDriftCircleMath::ResidualWithLine::residual
double residual(const LocVec2D &pos) const
Definition: ResidualWithLine.h:21
TrkDriftCircleMath
Function object to check whether two Segments are sub/super sets or different.
Definition: IMdtSegmentFinder.h:13
DriftCircle.h
TrkDriftCircleMath::ResidualWithLine::ResidualWithLine
ResidualWithLine(const Line &line)
Definition: ResidualWithLine.h:19
TrkDriftCircleMath::DriftCircle
This class represents a drift time measurement.
Definition: DriftCircle.h:22
TrkDriftCircleMath::DriftCircle::r
double r() const
access to drift radius
Definition: DriftCircle.h:86
TrkDriftCircleMath::TransformToLine::set
void set(const Line &line)
Definition: TransformToLine.h:28
TrkDriftCircleMath::TransformToLine
Definition: TransformToLine.h:15
TrkDriftCircleMath::RotPhi::sinphi
double sinphi() const
Definition: RotPhi.h:26
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
TrkDriftCircleMath::ResidualWithLine::ResidualWithLine
ResidualWithLine()=default
Line.h
TrkDriftCircleMath::Cluster
class representing a cluster meaurement
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Cluster.h:22
TrkDriftCircleMath::ResidualWithLine::residual
double residual(const Cluster &cl) const
Definition: ResidualWithLine.h:25
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
TrkDriftCircleMath::ResidualWithLine::residual
double residual(const DriftCircle &dc) const
Definition: ResidualWithLine.h:23
Cluster.h
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
LocVec2D.h
TrkDriftCircleMath::ResidualWithLine::set
void set(const Line &line)
Definition: ResidualWithLine.h:34