ATLAS Offline Software
Loading...
Searching...
No Matches
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
14namespace TrkDriftCircleMath {
15
17 public:
18 ResidualWithLine() = default;
19 ResidualWithLine(const Line& line) : m_transToLine(line) {}
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
This class represents a drift time measurement.
Definition DriftCircle.h:22
double r() const
access to drift radius
Definition DriftCircle.h:86
const LocVec2D & position() const
access to local position
Definition DriftCircle.h:74
Implementation of 2 dimensional vector class.
Definition LocVec2D.h:16
double residual(const DriftCircle &dc) const
double residual(const Cluster &cl) const
double residual(const LocVec2D &pos) const
Function object to check whether two Segments are sub/super sets or different.