GeneralBrokenLines
V020104
gblpy

For a track with an initial trajectory from a prefit of the (2D, 4D or 5D) measurements (internal seed) or an external prediction (external seed) the description of multiple scattering is added by offsets in a local system. Along the initial trajectory points are defined with can describe a measurement or a (thin) scatterer or both. The refit provides corrections to the local track parameters (in the local system) and the corresponding covariance matrix at any of those points. Nondiagonal covariance matrices will be diagonalized internally. Outliers can be downweighted by use of Mestimators. At one point the measurements can be omitted from the refit to calculate unbiased residuals.
A position measurement is in a plane defined by two directions. Along one direction the measurement precision may be zero, defining a 1D measurement in the other direction.
The broken lines trajectory is defined by (2D) offsets at the first and last point and all points with a scatterer. The prediction for a measurement is obtained by interpolation of the enclosing offsets and for triplets of adjacent offsets kink angles are determined. This requires for all points the jacobians for propagation to the previous and next offset.
Additional local or global parameters can be added and the trajectories can be written to special binary files for calibration and alignment with MillepedeII. (V. Blobel, NIM A, 566 (2006), pp. 513).
The conventions for the coordinate systems follow: Derivation of Jacobians for the propagation of covariance matrices of track parameters in homogeneous magnetic fields A. Strandlie, W. Wittek, NIM A, 566 (2006) 687698.
The source code is available at the DESY SVN server, see: https://www.wiki.terascale.de/index.php/GeneralBrokenLines
traj = GblTrajectory()
point = GblPoint(jacobian)
point.addMeasurement(..)
point.addLocals(..)
point.addGlobals(..)
point.addScatterer(..)
label = traj.addPoint(point)
traj.addExternalSeed(..)
[..] = traj.fit()
[..] = traj.getResults(label)
[..] = traj.getMeasResults(label)
[..] = traj.getScatResults(label)
traj.milleOut(..)
Alternatively trajectories can by read from MP binary files and fitted. As the points on the initial trajectory are not stored in this files results at points (corrections, covariance matrix) are not available and omission of measurements from a point is not possible.
Technical examples are given in gbltst.py, an example silicon tracker in gblsit.py.
 V. Blobel, C. Kleinwort, F. Meier, Fast alignment of a complex tracking detector using advanced track models, Computer Phys. Communications (2011), doi:10.1016/j.cpc.2011.03.017