Skip to main content

Track Reconstruction in Drift Chambers

This page explains how to reconstruct a particle track from position measurements in the individual planes of a drift chamber (DC).

Track Parameters and Measured Coordinates

Let (x,y)(x, y) denote the reconstructed particle position at z=0z=0, and let a= ⁣dx ⁣dza=\dv{x}{z} and b= ⁣dy ⁣dzb=\dv{y}{z} denote the track slopes. We group these four parameters into a vector θ\bm{\theta}:

θ=(xyab)\bm{\theta} = \mqty( x \\ y \\ a \\ b )

At the ii-th plane, located at z=ziz=z_i, the track passes through (xi,yi)(x_i, y_i), where

xi=x+azi,yi=y+bzi.x_i = x + a z_i, \quad y_i = y + b z_i .

Each DC plane measures position along a single axis. Let mim_i denote the coordinate measured in the ii-th plane, and let m\bm{m} be the vector of these measurements. If the measurement axis makes an angle ϕi\phi_i with the xx axis, then mim_i is the projection of (xi,yi)(x_i, y_i) onto that axis:

mi=xicosϕi+yisinϕi=(x+azi)cosϕi+(y+bzi)sinϕim_i = x_i \cos \phi_i + y_i \sin \phi_i = (x + a z_i) \cos \phi_i + (y + b z_i) \sin \phi_i

Note that ϕi\phi_i describes the measurement axis, which is perpendicular to the wire, rather than the wire direction itself. The figure below uses a right-handed coordinate system, with +y+y pointing upward and +z+z into the screen. The gray line represents a sense wire, and the blue arrow shows the measured coordinate mim_i along the axis perpendicular to it.

In practice, a DC records the ID of the wire that registered a hit and the drift time. We convert the drift time to a drift distance did_i and denote the wire's position along the measurement axis by wiw_i. The two possible particle positions are then

mi=wi+sidi,si{1,+1}m_i = w_i + s_i d_i, \qquad s_i \in \{-1,+1\}

The sign sis_i indicates which side of the wire the particle passed on. The drift time alone does not determine sis_i, leaving two possible values of mim_i for each plane. This is the left-right ambiguity discussed later.

Using a matrix HH, we can express the measurements as

m=(m0m1mn1)=(cosϕ0sinϕ0z0cosϕ0z0sinϕ0cosϕ1sinϕ1z1cosϕ1z1sinϕ1cosϕn1sinϕn1zn1cosϕn1zn1sinϕn1)(xyab)=Hθ\bm{m} = \mqty( m_0 \\ m_1 \\ \vdots \\ m_{n-1} ) = \mqty( \cos \phi_0 & \sin \phi_0 & z_0 \cos \phi_0 & z_0 \sin \phi_0 \\ \cos \phi_1 & \sin \phi_1 & z_1 \cos \phi_1 & z_1 \sin \phi_1 \\ \vdots & \vdots & \vdots & \vdots\\ \cos \phi_{n-1} & \sin \phi_{n-1} & z_{n-1} \cos \phi_{n-1} & z_{n-1} \sin \phi_{n-1} \\ ) \mqty( x \\ y \\ a \\ b ) = H \bm{\theta}

Least-Squares Track Fitting

Because a DC has finite measurement resolution, the relation above does not hold exactly for the measured coordinates. We therefore find the least-squares estimate θ^\hat{\bm{\theta}}. We first assume that all planes have the same resolution and give each measurement equal weight. The sum of squared residuals (SSR) is

SSR=i(mipHipθp)2\mathrm{SSR} = \sum_i \qty(m_i - \sum_p H_{ip} \theta_p)^2

and the least-squares solution θ^\hat{\bm{\theta}} satisfies

 ⁣SSR ⁣θqθ=θ^=2iHiq(mipHipθ^p)=0\eval{\pdv{\mathrm{SSR}}{\theta_q}}_{\bm{\theta}=\hat{\bm{\theta}}} = -2 \sum_i H_{iq}\qty( m_i - \sum_p H_{ip} \hat{\theta}_p ) = 0 iHiqmi=piHiqHipθ^p\Rightarrow \sum_i H_{iq} m_i = \sum_p \sum_i H_{iq} H_{ip} \hat{\theta}_p (HTm)q=p(HTH)qpθ^p\Rightarrow \qty(H^\mathsf{T} \bm{m})_q = \sum_p \qty(H^\mathsf{T} H)_{qp} \hat{\theta}_p

This gives the normal equations:

HTm=HTHθ^.H^\mathsf{T} \bm{m} = H^\mathsf{T} H \hat{\bm{\theta}} .

For the rest of this discussion, we write N=HTHN = H^\mathsf{T} H and g=HTm\bm{g} = H^\mathsf{T} \bm{m}. The matrix NN is real and symmetric:

N=HTH=(cosϕ0cosϕ1cosϕn1sinϕ0sinϕ1sinϕn1z0cosϕ0z1cosϕ1zn1cosϕn1z0sinϕ0z1sinϕ1zn1sinϕn1)(cosϕ0sinϕ0z0cosϕ0z0sinϕ0cosϕ1sinϕ1z1cosϕ1z1sinϕ1cosϕn1sinϕn1zn1cosϕn1zn1sinϕn1)=(i(cosϕi)2icosϕisinϕiizi(cosϕi)2izicosϕisinϕiicosϕisinϕii(sinϕi)2izicosϕisinϕiizi(sinϕi)2izi(cosϕi)2izicosϕisinϕii(zicosϕi)2izi2cosϕisinϕiizicosϕisinϕiizi(sinϕi)2izi2cosϕisinϕii(zisinϕi)2)\begin{align*} N &= H^\mathsf{T} H \\ &= \mqty( \cos \phi_0 & \cos \phi_1 & \cdots & \cos \phi_{n-1} \\ \sin \phi_0 & \sin \phi_1 & \cdots & \sin \phi_{n-1} \\ z_0 \cos \phi_0 & z_1 \cos \phi_1 & \cdots & z_{n-1} \cos \phi_{n-1} \\ z_0 \sin \phi_0 & z_1 \sin \phi_1 & \cdots & z_{n-1} \sin \phi_{n-1} ) \mqty( \cos \phi_0 & \sin \phi_0 & z_0 \cos \phi_0 & z_0 \sin \phi_0 \\ \cos \phi_1 & \sin \phi_1 & z_1 \cos \phi_1 & z_1 \sin \phi_1 \\ \vdots & \vdots & \vdots & \vdots\\ \cos \phi_{n-1} & \sin \phi_{n-1} & z_{n-1} \cos \phi_{n-1} & z_{n-1} \sin \phi_{n-1} \\ )\\ &= \mqty( \sum_i (\cos \phi_i)^2 & \sum_i \cos \phi_i \sin \phi_i & \sum_i z_i (\cos \phi_i)^2 & \sum_i z_i \cos \phi_i \sin \phi_i \\ \sum_i \cos \phi_i \sin \phi_i & \sum_i (\sin \phi_i)^2 & \sum_i z_i \cos \phi_i \sin \phi_i & \sum_i z_i (\sin \phi_i)^2 \\ \sum_i z_i (\cos \phi_i)^2 & \sum_i z_i \cos \phi_i \sin \phi_i & \sum_i (z_i \cos \phi_i)^2 & \sum_i z_i^2 \cos \phi_i \sin \phi_i \\ \sum_i z_i \cos \phi_i \sin \phi_i & \sum_i z_i (\sin \phi_i)^2 & \sum_i z_i^2 \cos \phi_i \sin \phi_i & \sum_i (z_i \sin \phi_i)^2 ) \end{align*}

If rank(H)=4\mathrm{rank}(H)=4, then NN is positive definite. Therefore, Nθ^=gN \hat{\bm{\theta}} = \bm{g} can be solved using Cholesky decomposition.

Planes with different resolutions

Let σi2\sigma_i^2 be the measurement variance in the ii-th plane, and define W=diag(1/σi2)W=\operatorname{diag}(1/\sigma_i^2). The weighted least-squares normal equations are then

HTWHθ^=HTWm.H^\mathsf{T} W H\hat{\bm{\theta}} = H^\mathsf{T}W\bm{m} .

If all σi\sigma_i are equal, WW is a constant multiple of the identity matrix, and these equations reduce to the equal-weight form used here.

note

An n×nn \times n real symmetric matrix MM is positive definite if the following holds for any nonzero vector xRnx \in \mathbb{R}^n:

xTMx>0\bm{x}^\mathsf{T} M \bm{x} > 0

It is called positive semidefinite if

xTMx0.\bm{x}^\mathsf{T} M \bm{x} \geq 0 .

In this case, since N=HTHN = H^\mathsf{T}H,

xTNx=xTHTHx=(Hx)T(Hx)=Hx20\bm{x}^\mathsf{T} N \bm{x} = \bm{x}^\mathsf{T} H^\mathsf{T} H \bm{x} = (H\bm{x})^\mathsf{T} (H\bm{x}) = \| H \bm{x} \|^2 \geq 0

so NN is positive semidefinite. If the plane configuration allows the track parameters (x,y,a,b)(x,y,a,b) to be determined uniquely, then rank(H)=4\mathrm{rank}(H)=4 and

Hx2>0\| H\bm{x} \|^2 > 0

for every nonzero x\bm{x}. Thus, NN is real, symmetric, and positive definite. If there are too few hits or the plane configuration does not provide enough independent measurements, then rank(H)<4\mathrm{rank}(H)<4. In that case, NN is singular and positive semidefinite, and standard Cholesky decomposition cannot yield a unique set of track parameters.

Solving with Cholesky Decomposition

Cholesky decomposition factors a positive-definite Hermitian matrix into the product of a lower triangular matrix LL and its conjugate transpose LL^*. It can be regarded as a special case of LU decomposition. Here, NN is real and symmetric, so the conjugate transpose reduces to the transpose:

N=LLT=(l00000l10l1100l20l21l220l30l31l32l33)(l00l10l20l300l11l21l3100l22l32000l33)N = L L^\mathsf{T} = \mqty( l_{00} & 0 & 0 & 0 \\ l_{10} & l_{11} & 0 & 0 \\ l_{20} & l_{21} & l_{22} & 0 \\ l_{30} & l_{31} & l_{32} & l_{33} ) \mqty( l_{00} & l_{10} & l_{20} & l_{30} \\ 0 & l_{11} & l_{21} & l_{31} \\ 0 & 0 & l_{22} & l_{32} \\ 0 & 0 & 0 & l_{33} )

Cholesky decomposition lets us solve Nθ^=gN \hat{\bm{\theta}} = \bm{g} efficiently without explicitly computing a matrix inverse. We will describe how to compute LL later. For now, assume that LL is known and use it to solve the system.

Define an intermediate vector u=LTθ^\bm{u} = L^\mathsf{T} \hat{\bm{\theta}}. Then the equation to solve becomes

Nθ^=LLTθ^=Lu=gN \hat{\bm{\theta}} = L L^\mathsf{T} \hat{\bm{\theta}} = L \bm{u} = \bm{g} (l00000l10l1100l20l21l220l30l31l32l33)(u0u1u2u3)=(g0g1g2g3)\Rightarrow \mqty( l_{00} & 0 & 0 & 0 \\ l_{10} & l_{11} & 0 & 0 \\ l_{20} & l_{21} & l_{22} & 0 \\ l_{30} & l_{31} & l_{32} & l_{33} ) \mqty( u_0 \\ u_1 \\ u_2 \\ u_3 ) = \mqty( g_0 \\ g_1 \\ g_2 \\ g_3 )

Because LL is lower triangular, we can solve for the components of u\bm{u} in order, starting with the first row:

l00u0=g0u0=g0l00l_{00} u_0 = g_0 \quad \Rightarrow \quad u_0 = \frac{g_0}{l_{00}} l10u0+l11u1=g1u1=g1l10u0l11l_{10} u_{0} + l_{11} u_{1} = g_1 \quad \Rightarrow \quad u_1 = \frac{g_1 - l_{10} u_{0}}{l_{11}} l20u0+l21u1+l22u2=g2u2=g2l21u1l20u0l22l_{20} u_{0} + l_{21} u_{1} + l_{22} u_{2} = g_2 \quad \Rightarrow \quad u_2 = \frac{g_2 - l_{21} u_1 - l_{20} u_{0}}{l_{22}} l30u0+l31u1+l32u2+l33u3=g3u3=g3l32u2l31u1l30u0l33l_{30} u_{0} + l_{31} u_{1} + l_{32} u_{2} + l_{33} u_{3} = g_3 \quad \Rightarrow \quad u_3 = \frac{g_3 - l_{32} u_{2} - l_{31} u_1 - l_{30} u_{0}}{l_{33}}

In general,

ui=gij<ilijujliiu_i = \frac{ g_i - \sum_{j<i} l_{ij} u_j }{ l_{ii} }

This is called forward substitution.

With u\bm{u} known, we next solve LTθ^=uL^{\mathsf{T}} \hat{\bm{\theta}} = \bm{u}:

(l00l10l20l300l11l21l3100l22l32000l33)(θ^0θ^1θ^2θ^3)=(u0u1u2u3)\mqty( l_{00} & l_{10} & l_{20} & l_{30} \\ 0 & l_{11} & l_{21} & l_{31} \\ 0 & 0 & l_{22} & l_{32} \\ 0 & 0 & 0 & l_{33} ) \mqty( \hat{\theta}_0 \\ \hat{\theta}_1 \\ \hat{\theta}_2 \\ \hat{\theta}_3 ) = \mqty( u_0 \\ u_1 \\ u_2 \\ u_3 )

This time, we start with the last row and work upward:

l33θ^3=u3θ^3=u3l33l_{33} \hat{\theta}_3 = u_3 \quad \Rightarrow \quad \hat{\theta}_3 = \frac{u_3}{l_{33}} l22θ^2+l32θ^3=u2θ^2=u2l32θ^3l22l_{22} \hat{\theta}_2 + l_{32} \hat{\theta}_3 = u_2 \quad \Rightarrow \quad \hat{\theta}_2 = \frac{u_2 - l_{32} \hat{\theta}_3}{l_{22}} l11θ^1+l21θ^2+l31θ^3=u1θ^1=u1l21θ^2l31θ^3l11l_{11} \hat{\theta}_1 + l_{21} \hat{\theta}_2 + l_{31} \hat{\theta}_3 = u_1 \quad \Rightarrow \quad \hat{\theta}_1 = \frac{u_1 - l_{21} \hat{\theta}_2 - l_{31} \hat{\theta}_3}{l_{11}} l00θ^0+l10θ^1+l20θ^2+l30θ^3=u0θ^0=u0l10θ^1l20θ^2l30θ^3l00l_{00} \hat{\theta}_0 + l_{10} \hat{\theta}_1 + l_{20} \hat{\theta}_2 + l_{30} \hat{\theta}_3 = u_0 \quad \Rightarrow \quad \hat{\theta}_0 = \frac{u_0 - l_{10} \hat{\theta}_1 - l_{20} \hat{\theta}_2 - l_{30} \hat{\theta}_3}{l_{00}}

In general,

θ^i=uij>iljiθ^jlii.\hat{\theta}_i = \frac{ u_i - \sum_{j>i} l_{ji} \hat{\theta}_j }{ l_{ii} }.

This is called back substitution.

Together, these two steps give the least-squares solution θ^\hat{\bm{\theta}}.

Faster Fitting with a Transformation Matrix GG

We could repeat the procedure above for every fit, but we can reduce the work by precomputing a transformation matrix. Recall that the system to solve is

Nθ^=HTm.N\hat{\bm{\theta}} = H^\mathsf{T} \bm{m}.

Solving this for θ^\hat{\bm{\theta}} gives

θ^=N1HTm=Gm.\hat{\bm{\theta}} = N^{-1} H^\mathsf{T} \bm{m} = G \bm{m}.

Here, G=N1HTG = N^{-1} H^\mathsf{T}. Once GG has been computed, each new measurement vector m\bm{m} requires only a matrix-vector multiplication to obtain θ^\hat{\bm{\theta}}. We can compute GG using the Cholesky factor LL.

Since N=LLTN = LL^\mathsf{T},

NG=LLTG=HTNG = LL^\mathsf{T} G = H^\mathsf{T} (l00000l10l1100l20l21l220l30l31l32l33)(l00l10l20l300l11l21l3100l22l32000l33)(G00G01G0n1G10G11G1n1G20G21G2n1G30G31G3n1)=(cosϕ0cosϕ1cosϕn1sinϕ0sinϕ1sinϕn1z0cosϕ0z1cosϕ1zn1cosϕn1z0sinϕ0z1sinϕ1zn1sinϕn1)\begin{align*} \Rightarrow \mqty( l_{00} & 0 & 0 & 0 \\ l_{10} & l_{11} & 0 & 0 \\ l_{20} & l_{21} & l_{22} & 0 \\ l_{30} & l_{31} & l_{32} & l_{33} ) \mqty( l_{00} & l_{10} & l_{20} & l_{30} \\ 0 & l_{11} & l_{21} & l_{31} \\ 0 & 0 & l_{22} & l_{32} \\ 0 & 0 & 0 & l_{33} ) &\mqty( G_{00} & G_{01} & \cdots & G_{0 n-1} \\ G_{10} & G_{11} & \cdots & G_{1 n-1} \\ G_{20} & G_{21} & \cdots & G_{2 n-1} \\ G_{30} & G_{31} & \cdots & G_{3 n-1} ) \\ &= \mqty( \cos \phi_0 & \cos \phi_1 & \cdots & \cos \phi_{n-1} \\ \sin \phi_0 & \sin \phi_1 & \cdots & \sin \phi_{n-1} \\ z_0 \cos \phi_0 & z_1 \cos \phi_1 & \cdots & z_{n-1} \cos \phi_{n-1} \\ z_0 \sin \phi_0 & z_1 \sin \phi_1 & \cdots & z_{n-1} \sin \phi_{n-1} ) \end{align*}

We can therefore compute GG by applying forward and back substitution to each column.

Define UU as

LTG=U=(u0,u1,,un1).L^\mathsf{T} G = U = (\bm{u}_0, \bm{u}_1, \cdots, \bm{u}_{n-1}) .

Since LU=HTLU=H^\mathsf{T}, we obtain UU by solving for each column using forward substitution:

(l00000l10l1100l20l21l220l30l31l32l33)(u0,u1,,un1)=HT\mqty( l_{00} & 0 & 0 & 0 \\ l_{10} & l_{11} & 0 & 0 \\ l_{20} & l_{21} & l_{22} & 0 \\ l_{30} & l_{31} & l_{32} & l_{33} ) (\bm{u}_0, \bm{u}_1, \cdots, \bm{u}_{n-1}) = H^\mathsf{T} Uij={Hj0L00(i=0)Hjik=0i1LikUkjLii(i>0)U_{ij} = \begin{cases} \frac{ H_{j0} }{ L_{00} } & (i=0) \\ \frac{ H_{ji} - \sum_{k=0}^{i-1} L_{ik} U_{kj} }{ L_{ii} } & (i>0) \end{cases}

Next, we obtain GG by back substitution:

LTG=UL^\mathsf{T} G = U (l00l10l20l300l11l21l3100l22l32000l33)(G00G01G0n1G10G11G1n1G20G21G2n1G30G31G3n1)=(u0,u1,,un1)\mqty( l_{00} & l_{10} & l_{20} & l_{30} \\ 0 & l_{11} & l_{21} & l_{31} \\ 0 & 0 & l_{22} & l_{32} \\ 0 & 0 & 0 & l_{33} ) \mqty( G_{00} & G_{01} & \cdots & G_{0 n-1} \\ G_{10} & G_{11} & \cdots & G_{1 n-1} \\ G_{20} & G_{21} & \cdots & G_{2 n-1} \\ G_{30} & G_{31} & \cdots & G_{3 n-1} ) = (\bm{u}_0, \bm{u}_1, \cdots, \bm{u}_{n-1}) Gij={Uijk=i+13LkiGkjLii(i<3)U3jL33(i=3)G_{ij} = \begin{cases} \frac{ U_{ij} - \sum_{k=i+1}^{3} L_{ki} G_{kj} }{ L_{ii} } & (i<3) \\ \frac{ U_{3j} }{ L_{33} } & (i=3) \end{cases}

With GG computed, we obtain the fitted track parameters for a measurement vector m\bm{m} as

θ^=Gm\hat{\bm{\theta}} = G \bm{m}

Cholesky Decomposition Algorithm

There are several algorithms for Cholesky decomposition. Here we use the Cholesky-Crout method, which computes LL one column at a time.

N=LLT=(l00000l10l1100l20l21l220l30l31l32l33)(l00l10l20l300l11l21l3100l22l32000l33)=(l002l00l10l00l20l00l30l00l10l102+l112l10l20+l11l21l10l30+l11l31l00l20l10l20+l11l21l202+l212+l222l20l30+l21l31+l22l32l00l30l10l30+l11l31l20l30+l21l31+l22l32l302+l312+l322+l332)\begin{align*} N &= L L^\mathsf{T} \\ &= \mqty( l_{00} & 0 & 0 & 0 \\ l_{10} & l_{11} & 0 & 0 \\ l_{20} & l_{21} & l_{22} & 0 \\ l_{30} & l_{31} & l_{32} & l_{33} ) \mqty( l_{00} & l_{10} & l_{20} & l_{30} \\ 0 & l_{11} & l_{21} & l_{31} \\ 0 & 0 & l_{22} & l_{32} \\ 0 & 0 & 0 & l_{33} ) \\ &= \mqty( l_{00}^2 & l_{00}l_{10} & l_{00}l_{20} & l_{00}l_{30} \\ l_{00}l_{10} & l_{10}^2+l_{11}^2 & l_{10}l_{20}+l_{11} l_{21} & l_{10}l_{30}+l_{11}l_{31} \\ l_{00}l_{20} & l_{10}l_{20}+l_{11}l_{21} & l_{20}^2+l_{21}^2+l_{22}^2 & l_{20}l_{30}+l_{21}l_{31}+l_{22}l_{32} \\ l_{00}l_{30} & l_{10}l_{30}+l_{11}l_{31} & l_{20}l_{30}+l_{21}l_{31}+l_{22}l_{32} & l_{30}^2+l_{31}^2+l_{32}^2+l_{33}^2 ) \end{align*}

Start with the first column. The (0,0)(0,0) entry gives

N00=l002l00=N00.N_{00} = l_{00}^2 \quad \Rightarrow \quad l_{00} = \sqrt{N_{00}} .

With l00l_{00} known, we obtain l10l_{10}, l20l_{20}, and l30l_{30} from the (1,0)(1,0), (2,0)(2,0), and (3,0)(3,0) entries:

N10=l00l10,N20=l00l20,N30=l00l30.N_{10} = l_{00} l_{10}, \quad N_{20} = l_{00} l_{20}, \quad N_{30} = l_{00} l_{30} . l10=N10N00,l20=N20N00,l30=N30N00.\Rightarrow l_{10} = \frac{N_{10}}{\sqrt{N_{00}}}, \quad l_{20} = \frac{N_{20}}{\sqrt{N_{00}}}, \quad l_{30} = \frac{N_{30}}{\sqrt{N_{00}}}.

This gives the first column:

L=(N00000N10N00?00N20N00??0N30N00???)L = \mqty( \sqrt{N_{00}} & 0 & 0 & 0\\ \frac{N_{10}}{\sqrt{N_{00}}} & ? & 0 & 0\\ \frac{N_{20}}{\sqrt{N_{00}}} & ? & ? & 0\\ \frac{N_{30}}{\sqrt{N_{00}}} & ? & ? & ? )

Next, move to the second column. The (1,1)(1,1) entry gives l11l_{11}:

N11=l102+l112N_{11} = l_{10}^2 + l_{11}^2 l11=N11l102l_{11} = \sqrt{N_{11} - l_{10}^2}

Similarly, the (2,1)(2,1) and (3,1)(3,1) entries give l21l_{21} and l31l_{31}:

N21=l10l20+l11l21,N31=l10l30+l11l31.N_{21} = l_{10}l_{20}+l_{11}l_{21}, \quad N_{31} = l_{10}l_{30}+l_{11}l_{31}. l21=N21l10l20l11,l31=N31l10l30l11.l_{21} = \frac{N_{21} - l_{10}l_{20}}{l_{11}}, \quad l_{31} = \frac{N_{31} - l_{10}l_{30}}{l_{11}} .

Repeating this procedure gives LL.

In general, we first compute the diagonal entry in column jj:

Ljj={N00(j=0)Njjk=0j1Ljk2(j>0)L_{jj} = \begin{cases} \sqrt{ N_{00} } & (j=0) \\ \sqrt{ N_{jj} - \sum_{k=0}^{j-1}L_{jk}^2 } & (j>0) \end{cases}

We then compute the entries below it:

Lij={NijLjj(j=0)Nijk=0j1LikLjkLjj(j>0)L_{ij} = \begin{cases} \frac{ N_{ij} }{ L_{jj} } & (j = 0) \\ \frac{ N_{ij} - \sum_{k=0}^{j-1} L_{ik}L_{jk} }{ L_{jj} } & (j > 0) \end{cases}

Left-Right Ambiguity

The fitting procedure above assumes that m\bm{m} is known. In practice, the drift time gives only the drift distance, leaving two possible positions on opposite sides of the wire. To help resolve this left-right ambiguity, multiwire drift chambers (MWDCs) often use planes whose wire positions are offset by half a cell relative to one another. We now consider how to select the correct combination of left-right assignments.

The simplest approach is to fit a track for every possible combination of left-right assignments and choose the one with the smallest SSR. This is the method used in the existing Artemis code. The pseudocode below illustrates the procedure, assuming that one hit has already been selected in each plane and only the left-right assignments remain unknown. For nn planes, this requires evaluating the SSR for all 2n2^n combinations, making it a bottleneck in DC tracking. Ways to speed up this step will be covered separately.

// A left shift by n bits gives 2^n combinations.
for (unsigned int i = 0; i < (1U << n); ++i) {
for (int p = 0; p != n; ++p) {
// Bit p selects the left-right sign for plane p.
int lr = ((i >> p) & 1) ? 1 : -1;
m[p] = cell_size * (wire_id[p] - center) + drift_length[p] * lr;
}
for (int q = 0; q != 4; ++q) {
theta[q] = inner_product(G[q], m); // theta_hat = Gm
}
const double SSR = calcSSR(m, theta);
if (SSR < minSSR) {
minSSR = SSR;
for (int q = 0; q != 4; ++q) {
best_theta[q] = theta[q];
}
}
}