Track reco with TBTrack

This is a primer about how to run the TBTrack code on raw .slcio files and how to extract useful information. The status described corresponds to calice_userlib v04-10-02 and calice_reco v04-06-05.

Running the track reconstruction (should be done during reconstruction)

In order to run the tracking code in your Marlin job, you need to launch four processors and load a bunch of conditions data via the ConditionsProcessor. The processors are (in order ):
All four do not need special processor parameters for DESY and CERN. You may want to try FNAL, but it has not been tested, yet.

In the ConditionsProcessor, you need to include these lines:
DBCondHandler DesyTBTrackAlnConstants /cd_calice_beam/TBTrack/AlnConstants HEAD
DBCondHandler DesyTBTrackFitConstants  /cd_calice_beam/TBTrack/FitConstants HEAD
DBCondHandler CernTBTrackAlnConstants /cd_calice_cernbeam/TBTrack/AlnConstants HEAD
DBCondHandler CernTBTrackFitConstants /cd_calice_cernbeam/TBTrack/FitConstants HEAD


The tracking reconstruction will append eight collection to the event, following the name pattern
The last three letters indicate the assumptions/characteristics of the result:
F or B indicates whether the track is projected forward or backward
E or H indicates whether electron or hadron behavior is assumed for multiple scattering
X or Y indicates whether the tracks are in the horizontal or vertical plane
All of these collections contain LCGenericObjects, which need special treatment to make sense (see below)

Access to information

This code snippet illustrates how to extract information from the tracking output. Assume you are interested in the impact point in the X-dimension on the calorimeter front face, which has a given position on Z and a given rotation angle in the ZX plane.
LCEvent* evt;
float frontFacePositionZ;
float angleZX;
LCCollection* col = evt->getCollection( "TBTrackFEX" );  // F is sensible, E is your choice, X is the use case
if ( col->getNumberOfElements() > 0 ){
TBTrack::TrackProjection projX( col->getElementAt( 0 ) );
float impactX = projX.intercept( frontFacePositionZ, angleZX );

Description of data types

This section describes the values stored in the AlnConstants, FitConstants, and SimConstants classes, which are used to interpret tracking conditions data persistently stored as LCGenericObjects. The whole structure foresees up to four drift chambers (layers) of two independent planes for horizontal and vertical measurements, respectively. At DESY and FNAL, all four slots are in use, while the three chambers at CERN by convention have layer 1-3 (rather than 0-2) - layer 0 was reserved for the hodoscope.

Some parameters are foreseen for each chamber individually, in which case eight numbers are stored in the following order:
layer0-x, layer1-x, layer2-x, layer3-x, layer0-y, layer1-y, layer2-y, layer3-y following following encoding pattern:
int isxy;  // is 0 for x and 1 for y
int layer; // is 0-3 for DESY and FNAL, 1-3 for CERN
int id = (layer < 1 ) + isxy;

PLEASE NOTE: this is to some extend guess-work when labeled with question-marks.


holds 25 double values
position meaning
0 tdcUnit [ns/tdc]
1-8 t_0 [ns] once per chamber
9-16 lin_coeff [mm/ns] once per chamber
17-24 quad_coeff [mm/ns^2] once per chamber

The position pos [mm] for each chamber is calculated from the tdc measurement T [tdc] according to:
t [ns] = T * tdcUnit - t_0
pos = lin_coeff * t + quad_coeff * t^2


holds 156 double values
position meaning
0 beam momentum
1 beam origin in z
2-5 beam average, 2x2 values (?)
6-11 beam spread, 2x3 values (?)
12-19 z-position per chamber
20-103 forward scattering, 2x2x21 values (?)
104-143 backward scattering, 2x2x10 values (?)
144-151 point uncertainty per chamber (units?)
152-155 chi2-cut, 4 values (per layer?)


holds 57 double and one integer value. The integer value indicates the beam period (0 for DESY, 1 for CERN, 2 for FNAL). Meaning of doubles:
position meaning
0-24 same as AlnConstants
25-32 hit efficiency per chamber
33-40 smearing parameter per chamber
41-48 noise probability per chamber
49-56 time t_0 per chamber (difference to pos. 1-8?)

-- NielsMeyer - 10 Oct 2008

calculation of track scattering / alignment etc (for experts)


First step is to measure the amount of track scattering in simulated data. Generate electron and pion events at various energies. A mono-energetic beam is fine, and things are a little easier if you use a perfectly parallel pencil beam.

The following lines should be used in the Mokka steering files:

/Mokka/init/globalModelParameter use_tracker true
/Mokka/init/lcioStoreTRKHitMomentum proto

(these includes a fake tracking layer just in front of the ECAL, and stores the momentum of the particle producing each hit.)

Then the TBTrackScatter processor can be used to measure the amount of scattering in the (simulated) beamline at each tracking layer position, and the various correlations between the deviations from layer-to-layer.

-- DanielJeans - 12 Mar 2009

compilation of run periods and run-by-run information

This info needs to get into the database

Digested read of the e-log to define different tracking run periods. Periods defined in terms of time and run numbers. Not guaranteed to be 100% correct.

beam line periods ( previous version here )

Run info for cern runs (compiled by Michele Faucci Gianelli)

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt Run_List_CERN_2006_-_for_DB.txt r1 manage 128.6 K 2009-10-29 - 17:55 UnknownUser run info cern 06
Microsoft Excel Spreadsheetxls Run_List_CERN_2006_-_for_DB.xls r1 manage 364.5 K 2009-10-29 - 17:58 UnknownUser run info cern 06 (xls)
Texttxt Run_List_CERN_2007_-_for_DB.txt r1 manage 48.7 K 2009-10-29 - 17:57 UnknownUser run info cern 07
Microsoft Excel Spreadsheetxls Run_List_CERN_2007_-_for_DB.xls r1 manage 159.5 K 2009-10-29 - 17:58 UnknownUser run info cern 07 (xls)
Texttxt beamtimeline.txt r1 manage 7.4 K 2009-10-29 - 17:31 UnknownUser description of the different beam line periods
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2010-12-16 - unknown
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CALICE All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback