37
A review of fast circle and helix fitting R. Fr¨ uhwirth (HEPHY, Vienna, Austria) A. Strandlie (CERN, Geneva, Switzerland) W. Waltenberger (HEPHY, Vienna, Austria) J. Wroldsen (Gjøvik University College, Norway) ACAT 2002, Moscow, 26.6.2002

Circle Fitting Algorithm

  • Upload
    lalitm

  • View
    106

  • Download
    3

Embed Size (px)

DESCRIPTION

Circle regression module with full algo

Citation preview

Page 1: Circle Fitting Algorithm

A review of fast circleand helix fitting

R. Fruhwirth (HEPHY, Vienna, Austria)

A. Strandlie (CERN, Geneva, Switzerland)

W. Waltenberger (HEPHY, Vienna, Austria)

J. Wroldsen (Gjøvik University College, Norway)

ACAT 2002, Moscow, 26.6.2002

Page 2: Circle Fitting Algorithm

Outline

❖ Introduction and background

❖ Circle fitting

❖ Helix fitting

❖ Conclusion

R. Fruhwirth ACAT 2002, Moscow 2

Page 3: Circle Fitting Algorithm

Introduction and background

❏ In a detector embedded in a homogeneous

magnetic field, the particle trajectories are helices.

❏ Examples: Inner trackers in CMS and ATLAS.

❏ LHC track reconstruction methods have to be precise

and fast

❏ The method of choice will very likely depend on the

requirements of the actual physics analysis.

R. Fruhwirth ACAT 2002, Moscow 3

Page 4: Circle Fitting Algorithm

Introduction and background

Track fitting methods can roughly be divided into two

separate categories:

❏ Precise and slow

❏ Approximate and fast

Those of the latter category mainly work for 2D

data — i.e. data either coming from a 2D detector or

projected data from a 3D detector

R. Fruhwirth ACAT 2002, Moscow 4

Page 5: Circle Fitting Algorithm

Introduction and background

The global least-squares method:

❏ Used for many decades in HEP experiments.

❏ Proper treatment of elastic, multiple Coulomb

scattering included in the method during the 70’s.

❏ Close to optimal in precision, but may be

computationally quite expensive with a large

number of measurements and/or a large number

of scattering devices.

R. Fruhwirth ACAT 2002, Moscow 5

Page 6: Circle Fitting Algorithm

Introduction and background

The Kalman filter:

❏ Recursive least-squares estimation.

❏ Therefore suitable for combined track finding

and fitting

❏ Equivalent to global least-squares method

including all correlations between measurements

due to multiple scattering.

❏ Probably the most widely used method today.

R. Fruhwirth ACAT 2002, Moscow 6

Page 7: Circle Fitting Algorithm

Introduction and background

Both the global LS fit and the Kalman filter may need

previous knowledge of the track:

❏ as an expansion point (reference track) of the

linearization procedure,

❏ for the computation of the multiple scattering

covariance matrix.

This is particularly important for tracks with large

curvature (low momentum). Therefore fast

preliminary fits are required.

R. Fruhwirth ACAT 2002, Moscow 7

Page 8: Circle Fitting Algorithm

Circle fitting

Some specialized methods for circle fitting:

❏ Conformal mapping — maps circles through the

origin onto straight lines

❏ Karimaki method — based on an approximate,

explicit solution to the non-linear problem of

circle fitting

❏ Riemann fit — maps circles onto planes in space,

results in exact linear fit in 3D

R. Fruhwirth ACAT 2002, Moscow 8

Page 9: Circle Fitting Algorithm

Circle fitting

Conformal mapping [1]

Inversion in the complex plane:

u =x

x2 + y2 , v =y

x2 + y2

❏ A circle through the origin is mapped on a

straight line.

❏ the impact parameter of the line is inversely

proportional to the radius of the circle.

R. Fruhwirth ACAT 2002, Moscow 9

Page 10: Circle Fitting Algorithm

Circle fitting

❏ A circle with small impact parameter is mapped on

a circle with small curvature (proportional to the

impact parameter to first order).

❏ The latter circle can be approximated by a parabola.

❏ Fast, linear fit of the coefficients of the parabola.

R. Fruhwirth ACAT 2002, Moscow 10

Page 11: Circle Fitting Algorithm

Circle fitting

−1 −0.5 0 0.5 1 1.5 20

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

Original circle Transformed circleApprox. parabola

R. Fruhwirth ACAT 2002, Moscow 11

Page 12: Circle Fitting Algorithm

Circle fitting

Karimaki method [2]

Under the assumption that the impact parameter is

small compared to the radius:

|ε| � ρ

an explicit solution to the non-linear problem can be

found. An additional correction procedure gives very

good final precision.

R. Fruhwirth ACAT 2002, Moscow 12

Page 13: Circle Fitting Algorithm

Circle fitting

The Riemann fit I [3]

Based on a conformal mapping (stereographic

projection) of 2D-measurements to 3D-points on the

Riemann sphere:

xi = Ri cosΦi/(1 + R2i )

yi = Ri sinΦi/(1 + R2i )

zi = R2i /(1 +R2

i )

R. Fruhwirth ACAT 2002, Moscow 13

Page 14: Circle Fitting Algorithm

Circle fitting

−1

−0.5

0

0.5

1

−2

−1.5

−1

−0.5

0

0.5

1

0

0.2

0.4

0.6

0.8

1

R. Fruhwirth ACAT 2002, Moscow 14

Page 15: Circle Fitting Algorithm

Circle fitting

❏ Circles and lines in the plane map uniquely onto

circles on the Riemann sphere.

❏ Since a circle on the Riemann sphere uniquely defines

a plane in space, there is a one-to-one

correspondence between circles and lines in the

plane and planes in space.

R. Fruhwirth ACAT 2002, Moscow 15

Page 16: Circle Fitting Algorithm

Circle fitting

The Riemann fit II [5]

Non-conformal mapping of 2D-measurements to

3D-points on a cylindrical paraboloid:

xi = Ri cosΦi

yi = Ri sinΦi

zi = R2i

This mapping is even simpler.

R. Fruhwirth ACAT 2002, Moscow 16

Page 17: Circle Fitting Algorithm

Circle fitting

❏ Again, points on a circle are mapped on points

lying on a plane (but not on a circle).

❏ Thus, the task of fitting circular arcs in the plane is

transformed into the task of fitting planes in space.

❏ This can be done in a fast and non-iterative manner.

❏ Moreover, there is no need for any track parameter

initialization.

R. Fruhwirth ACAT 2002, Moscow 17

Page 18: Circle Fitting Algorithm

Circle fitting

❏ A plane can be defined by a unit length normal

vector nT = (n1, n2, n3) and a signed distance c

from the origin.

❏ Fitting a plane to N measurements on the sphere or

paraboloid requires finding the minimum of

S =N∑

i=1(c + n1xi + n2yi + n3zi)

2 =N∑

i=1d2

i

with respect to {c, n1, n2, n3}.

R. Fruhwirth ACAT 2002, Moscow 18

Page 19: Circle Fitting Algorithm

Circle fitting

❏ The minimum of S is found by choosing n to be the

eigenvector to the smallest eigenvalue of the

sample covariance matrix of the measurements.

❏ The distance c is given by the fact that the fitted

plane passes through the mean vector of the

measurements.

❏ The fitted parameters can then be transformed back

to the circle parameters in the plane.

R. Fruhwirth ACAT 2002, Moscow 19

Page 20: Circle Fitting Algorithm

Circle fitting

❏ The precision and the speed of the Riemann fit (RF)

has been assessed by a comparison with

✧ a non-linear least-squares fit (NLS),

✧ a global linearized least-squares fit (GLS),

✧ the Kalman filter (KF),

✧ and the conformal mapping (CM).

❏ We show results from a simulation experiment in

the ATLAS Transition radiation Tracker, with about

35 observations per track.

R. Fruhwirth ACAT 2002, Moscow 20

Page 21: Circle Fitting Algorithm

Circle fitting

Method Vrel trel

NLS w/o initialization 1.000 36.3

NLS with initialization 1.000 41.4

GLS w/o initialization 1.001 15.9

GLS with initialization 1.001 21.1

KF w/o initialization 1.001 28.2

KF with initialization 1.001 33.3

CM (parabola fit) 1.582 1.03

RF (circle fit) 1.003 1.00

Red=Baseline

R. Fruhwirth ACAT 2002, Moscow 21

Page 22: Circle Fitting Algorithm

Circle fitting

❏ The RF can be corrected for the non-orthogonal

intersection of the track with the detectors. This is

important for low-momentum tracks, but requires

an iteration.

❏ Formulas for the covariance matrix of the fitted

parameters have been derived [4].

R. Fruhwirth ACAT 2002, Moscow 22

Page 23: Circle Fitting Algorithm

Circle fitting

The RF can also deal with multiple scattering [5]:

❏ The cost function is generalized:

S = dTV −1d

❏ d is the vector containing the distances from the

measurements to the plane.

❏ V is an approximate covariance matrix of these

distances including correlations from multiple

scattering.

R. Fruhwirth ACAT 2002, Moscow 23

Page 24: Circle Fitting Algorithm

Circle fitting

❏ Again, the minimum of S with respect to the plane

parameters defines the fitted plane.

❏ The normal vector of the plane is found in a

similar manner as before — only the building-up

of the sample covariance matrix of the

measurements is slightly modified.

❏ It is not straightforward to generalize any of the

other circle estimators (conformal mapping,

Karimaki) in this way.

R. Fruhwirth ACAT 2002, Moscow 24

Page 25: Circle Fitting Algorithm

Circle fitting

We have performed a simulation experiment in the

ATLAS Inner Detector TRT. Four methods have

been compared:

❏ The generalized Riemann fit

❏ The Kalman filter

❏ The Karimaki method including the diagonal terms

of the covariance matrix

❏ The global least-squares fit without contributions

from multiple scattering in the covariance matrix

R. Fruhwirth ACAT 2002, Moscow 25

Page 26: Circle Fitting Algorithm

Circle fitting

0 1 2 3 4 5 6 7 8 9 100

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

Transversal momentum (GeV/c)

Rel

ativ

e ge

nera

lized

var

ianc

e

Kalman filterRiemann fitKarimakiGlobal least−squares

R. Fruhwirth ACAT 2002, Moscow 26

Page 27: Circle Fitting Algorithm

Helix fitting

The circle fit can be extended to a helix fit by using

the linear relation between the arc length s and z [6].

❏ After the circle fit, the arc length between successive

observations is computed.

❏ A regression of z on s (barrel) or of s on z (forward)

gives the polar angle θ plus an additional coordinate.

❏ In disk type detectors the radial positions of the hits

are predicted from the line fit, and the entire

procedure is repeated.

R. Fruhwirth ACAT 2002, Moscow 27

Page 28: Circle Fitting Algorithm

Helix fitting

We have done a simulation experiment in a simplified

model of the CMS Tracker. Three methods have

been compared:

❏ Riemann Helix fit based on Riemann circle fit

(RHF)

❏ Kalman filter (KF)

❏ Global least-squares fit (GLS)

R. Fruhwirth ACAT 2002, Moscow 28

Page 29: Circle Fitting Algorithm

Helix fitting

Multiple Scattering has been treated on different levels:

Level Covariance matrix of multiple scattering Applies to

0 None All methods

1 Approximate GLS, RHF

2 Exact, but no correlations between projections GLS, RHF

3 Exact, including all correlations GLS, KF

When required (KF or level>0), a reference track has

been computed by a preliminary RHF.

R. Fruhwirth ACAT 2002, Moscow 29

Page 30: Circle Fitting Algorithm

Helix fitting

100

101

102

100

101

102

103

Cylindrical detectors

p [GeV/c]

Rel

ativ

e ge

nvar

Kalman 0 Global 0 Riemann 0

Generalized variance on level 0, relative to the KF on level 3

R. Fruhwirth ACAT 2002, Moscow 30

Page 31: Circle Fitting Algorithm

Helix fitting

Method Level trel

Kalman filter 0 0.98

Global fit 0 0.97

Riemann fit 0 0.70

Timing on level 0, relative to the KF on level 3

R. Fruhwirth ACAT 2002, Moscow 31

Page 32: Circle Fitting Algorithm

Helix fitting

100

101

102

0.9

1

1.1

1.2

1.3

1.4

1.5Cylindrical detectors

p [GeV/c]

Rel

ativ

e ge

nvar

Kalman3 Global 1 Global 2 Global 3 Riemann 1Riemann 2

Generalized variance on level>0, relative to the KF on level 3

R. Fruhwirth ACAT 2002, Moscow 32

Page 33: Circle Fitting Algorithm

Helix fitting

Method Level trel

Kalman filter 3 1.00

Global fit 1 1.08

Global fit 2 1.38

Global fit 3 1.38

Riemann fit 1 0.84

Riemann fit 2 1.16

Timing on level>0, relative to the KF on level 3

R. Fruhwirth ACAT 2002, Moscow 33

Page 34: Circle Fitting Algorithm

Helix fitting

❏ These results have been obtained from the C++

implementation. The program is available from the

authors on request.

❏ For disk detectors the Riemann helix fit is not

competitive as an exact fit, because of the need to

iterate, but still highly suitable as a preliminary

fit for the KF or the GLS.

R. Fruhwirth ACAT 2002, Moscow 34

Page 35: Circle Fitting Algorithm

Conclusions

❏ In the absence of multiple scattering, the

Riemann circle fit is virtually as precise as

either non-linear or linear least-squares

estimators and much faster

❏ In the presence of multiple scattering, the

Riemann circle fit is as precise as the Kalman

filter over a large range of momentum and

superior in precision to similar methods

(Karmaki, Conformal Mapping)

R. Fruhwirth ACAT 2002, Moscow 35

Page 36: Circle Fitting Algorithm

Conclusions

❏ The Riemann helix fit is a viable alternative to

conventional least-squares fits, especially if

multiple scattering can be neglected.

❏ It is highly suitable as a fast approximate fit for

generating a reference track for the Kalman

filter or the global least-squares fit.

R. Fruhwirth ACAT 2002, Moscow 36

Page 37: Circle Fitting Algorithm

References

[1] V. Karimaki, Nucl. Instr. Meth. A 305 (1991) 187

[2] M. Hansroul, H. Jeremie and D. Savard, NIM A 270 (1988) 498

[3] A. Strandlie, J. Wroldsen, R. Fruhwirth and B. Lillekjendlie,

Comp. Phys. Comm. 131 (2000) 95

[4] A. Strandlie and R. Fruhwirth,

Nucl. Instr. Meth. A 480 (2002) 734

[5] A. Strandlie, J. Wroldsen and R. Fruhwirth,

Nucl. Instr. Meth. (in press)

[6] R. Fruhwirth, A. Strandlie and W. Waltenberger,

Nucl. Instr. Meth. (in press)

R. Fruhwirth ACAT 2002, Moscow 37