KalTest: A ROOT-based Kalman Filter Package

kaltest-logo.gif

KalTest

Welcome to KalTest home page. KalTest is a Kalman Filter Package written in C++. It is based on ROOT and provides basic libraries for track fitting with Kalman filter technique. The package is distributed with some sample test programs to illustrate their usage.

KalTest Development Team


sphere.gif What's new?

sphere.gif Features

Since the tracking system of a collider detector usually consists of various components such as a vertex detector (VD), an intermediate tracker (IT), a central tracker (CT), etc., which have different shapes and coordinate systems, the software package for Kalman-filter-based track fitting should be able to accommodate a measurement layer with any shape and/or coordinate system. Considering possible extrapolation of a track to an outer tracking device such as a muon detector, it is also desirable that the package can handle site-to-site change of the magnetic field. In order to satisfy these requirements with minimum user-implemented code, we use C++ and exploit its object-oriented features as much as possible. For persistency of data, we rely on ROOT's automatic schema evolution.

Notice that the Kalman filter defines a generic procedure and has a much wider scope than track fitting. This implies necessity for a library of generic abstract base classes (KalLib) that implement the generic algorithm of the Kalman Filter. By inheriting from the generic base classes in KalLib and implementing their pure virtual methods for track fitting purpose, we then realize a Kalman-filter-based track fitter library (KalTrackLib). However, KalTrackLib should not depend on any particular track model or shape or coordinate system of a measurement layer according to the above guideline. We hence separate out geometry classes that provide track model (helix, straight line, ...) and surfaces (cylinder, hyperboloid, flat plane, etc.) as a geometry library (GeomLib). Each of these three class libraries, KalLib, KalTrackLib, and GeomLib are distributed as a subpackage of LEDA (Library Extension for Data Analysis) or KalTest (Kalman filter Test bench).

In this way we can minimize the number of user-implemented classes to the following three:

  • MeasLayer: a measurement layer that multiply inherits from an abstract measurement layer class TVMeasLayer and a shape class derived from TVSurfacein GeomLib.
  • KalDetector: an array class derived from TVKalDetector that holds the user-defined MeasLayers with any shape and/or coordinate system. Notice that this also defines material distributions in the tracker.
  • Hit: a coordinate vector class as defined by the MeasLayer, which inherits from TVTrackHit.

Notice also that track model can change site to site, which allows magnetic field variation along a particle trajectory.

sphere.gif Availability

KalTest development has been developed by the ACFA-sim group. It is now actively being improved and tested in the course of its adoptation to the ILD track reconstruction system. We thank the DESY team, Steve Aplin and Frank Gaede, in particular for their great contributions to the KalTest development.  KalTest is now integrated into the ILC software tools and distributed as a part of "ILCSOFT" from the desy svn server

The latest version is hence available from there. To get the head version, type

$ svn co https://svnsrv.desy.de/public/kaltest/KalTest/trunk

The following is a snap shot.

sphere.gif How to Build KalTest

KalTest is based on ROOT. Install ROOT if you haven't and set ROOTSYS environmental variable accordingly. You then need to set KalTest-related environmental variables by sourcing "setup" in the top directory of the KalTest source tree and make the libraries in it as follows:

$ tar -zxvf KalTest-20111217.tar.gz
$ cd KalTest
$ source ./setup
$ make

This is the traditional way. Now there is another way. You can use "cmake", which is now the standard way of building it in "ilcsoft" tree. Provided that you have "ilcutil" installed in your "ilcsoft" tree, type

$ tar -zxvf KalTest-20121129.tar.gz
$ cd KalTest
$ mkdir build
$ cd build
$ cmake -DILCUTIL_DIR=/path/to/ilcutil -DROOT_DIR=$ROOTSYS ..
$ make install

where "/path/to/ilcutil" should be replaced according to your environment. Optionally you can build examples as

$ cmake -DBUILD_EXAMPLES=1 ..
$ make

sphere.gif How to Run Test Programs

The KalTest package contains the following test programs under examples/kaltest:
cdc : track fitting example for a jet-chamber-like central tracker
ct : track fitting example for a simple cylindrical tracker
hybrid : hybrid track fitting example for VTX+IT(Barell/Fwd/Bwd)+TPC
simple : a simple line fit example using the base kallib libraries only
First build them as follows:

$ pushd examples/kaltest
$ make

This produces a binary exectutable called EXKalTest in the "prod" subsubdirectory of each of the test program subdirectory. In order to run one of them, say "hybrid/prod/EXKalTest", do

$ cd hybrid/prod
$ ./EXKalTest [-b] [# events] [pt in GeV] [t0 in ns]

where "-b" makes the test program to run batch mode without event display. The other test programs, "cdc", "ct", and "simple" have no event display facility and hence no "-b" option.

sphere.gif References

The package contains some reference materials in "doc":

sphere.gif Note

KalTest package has been built and tested on MacOSX 10.7 and Scientific Linux 4.2 with ROOT5.30.02 and the gcc4.x compiler