+//
+// Linear fit of the clusters attached to the tracklet
+//
+// Parameters :
+// - opt : switch for tilt pad correction of cluster y position. Options are
+// 0 no correction [default]
+// 1 full tilt correction [dz/dx and z0]
+// 2 pseudo tilt correction [dz/dx from pad-chamber geometry]
+//
+// Output :
+// True if successful
+//
+// Detailed description
+//
+// Fit in the xy plane
+//
+// The fit is performed to estimate the y position of the tracklet and the track
+// angle in the bending plane. The clusters are represented in the chamber coordinate
+// system (with respect to the anode wire - see AliTRDtrackerV1::FollowBackProlongation()
+// on how this is set). The x and y position of the cluster and also their variances
+// are known from clusterizer level (see AliTRDcluster::GetXloc(), AliTRDcluster::GetYloc(),
+// AliTRDcluster::GetSX() and AliTRDcluster::GetSY()).
+// If gaussian approximation is used to calculate y coordinate of the cluster the position
+// is recalculated taking into account the track angle. The general formula to calculate the
+// error of cluster position in the gaussian approximation taking into account diffusion and track
+// inclination is given for TRD by:
+// BEGIN_LATEX
+// #sigma^{2}_{y} = #sigma^{2}_{PRF} + #frac{x#delta_{t}^{2}}{(1+tg(#alpha_{L}))^{2}} + #frac{x^{2}tg^{2}(#phi-#alpha_{L})tg^{2}(#alpha_{L})}{12}
+// END_LATEX
+//
+// Since errors are calculated only in the y directions, radial errors (x direction) are mapped to y
+// by projection i.e.
+// BEGIN_LATEX
+// #sigma_{x|y} = tg(#phi) #sigma_{x}
+// END_LATEX
+// and also by the lorentz angle correction
+//
+// Fit in the xz plane
+//
+// The "fit" is performed to estimate the radial position (x direction) where pad row cross happens.
+// If no pad row crossing the z position is taken from geometry and radial position is taken from the xy
+// fit (see below).
+//
+// There are two methods to estimate the radial position of the pad row cross:
+// 1. leading cluster radial position : Here the lower part of the tracklet is considered and the last
+// cluster registered (at radial x0) on this segment is chosen to mark the pad row crossing. The error
+// of the z estimate is given by :
+// BEGIN_LATEX
+// #sigma_{z} = tg(#theta) #Delta x_{x_{0}}/12
+// END_LATEX
+// The systematic errors for this estimation are generated by the following sources:
+// - no charge sharing between pad rows is considered (sharp cross)
+// - missing cluster at row cross (noise peak-up, under-threshold signal etc.).
+//
+// 2. charge fit over the crossing point : Here the full energy deposit along the tracklet is considered
+// to estimate the position of the crossing by a fit in the qx plane. The errors in the q directions are
+// parameterized as s_q = q^2. The systematic errors for this estimation are generated by the following sources:
+// - no general model for the qx dependence
+// - physical fluctuations of the charge deposit
+// - gain calibration dependence
+//
+// Estimation of the radial position of the tracklet
+//
+// For pad row cross the radial position is taken from the xz fit (see above). Otherwise it is taken as the
+// interpolation point of the tracklet i.e. the point where the error in y of the fit is minimum. The error
+// in the y direction of the tracklet is (see AliTRDseedV1::GetCovAt()):
+// BEGIN_LATEX
+// #sigma_{y} = #sigma^{2}_{y_{0}} + 2xcov(y_{0}, dy/dx) + #sigma^{2}_{dy/dx}
+// END_LATEX
+// and thus the radial position is:
+// BEGIN_LATEX
+// x = - cov(y_{0}, dy/dx)/#sigma^{2}_{dy/dx}
+// END_LATEX
+//
+// Estimation of tracklet position error
+//
+// The error in y direction is the error of the linear fit at the radial position of the tracklet while in the z
+// direction is given by the cluster error or pad row cross error. In case of no pad row cross this is given by:
+// BEGIN_LATEX
+// #sigma_{y} = #sigma^{2}_{y_{0}} - 2cov^{2}(y_{0}, dy/dx)/#sigma^{2}_{dy/dx} + #sigma^{2}_{dy/dx}
+// #sigma_{z} = Pad_{length}/12
+// END_LATEX
+// For pad row cross the full error is calculated at the radial position of the crossing (see above) and the error
+// in z by the width of the crossing region - being a matter of parameterization.
+// BEGIN_LATEX
+// #sigma_{z} = tg(#theta) #Delta x_{x_{0}}/12
+// END_LATEX
+// In case of no tilt correction (default in the barrel tracking) the tilt is taken into account by the rotation of
+// the covariance matrix. See AliTRDseedV1::GetCovAt() for details.
+//
+// Author
+// A.Bercuci <A.Bercuci@gsi.de>