Running the new-TEM Tracking in Brunel v28r2

 

Brunel v28r2 and the new Track Event Model (TEM)

Brunel v28r2 is the last Brunel version (built with LHCb v19r3) which reads RTTC data corresponding to an ideal and aligned detector. It still uses the CLHEP packages.

Waiting for the 2006 data challenge DC'06, this is the version where one can for the moment test reconstruction algorithms and in particular the tracking sequence running with the new Track Event Model.

Brunel v28r2 actually runs the tracking in the old TEM. This page explains a simple procedure to be able to run in this same Brunel a tracking sequence set-up for all the pattern recognition and fitting algorithms that use the new TEM.

The next version of Brunel that includes fully the tracking running only with the new TEM will be totally backwards incompatible and built atop LHCb v20r0; the latter will also include the migration from CLHEP to MathCore and the LHCb namespaces for all the LHCb event model classes.

The actual reconstruction is set up in Brunel via the options file Reco.opts in the RecSys package: this file defines for instance the tracking sequence (pattern recognition and fitting), and the RICH, Calorimeter and Muon reconstruction phases. It is included in the main options file Brunel.opts that resides in Brunel/v28r2/options. For our purpose the main idea is to replace this Reco.opts file by an equivalent file where only the tracking phase has been modified. All the necessary steps are described below. Some explanations about the new TrackSys package are also given at the bottom of this page.

Getting a consistent set of TrackXxx packages:
This is the first necessary step: do a recursive check out of the package to getpack all the necessary TrackXxx and a couple of other necessary packages:
   cd ~/cmtuser
   getpack -r Tr/TrackSys v1r0
This will get version v1r0 of TrackSys *and* the whole consistent set of TrackXxx packages needed ... (At this level ignore all warning messages from the checkout.)

You now have the following packages:

To build all the packages in one go:
   cd ~/cmtuser/Tr/TrackSys/v1r0/cmt
   cmt config
   source setup.(c)sh 
   cmt broadcast make
You should now have all these libraries built.

Setting-up in Brunel the Tracking phase in the new TEM
There are a series of simple steps to follow in order to be able to run in Brunel a tracking phase using the new TEM.

Start by
   cd ~/cmtuser/Rec/Brunel/v28r2/
In the requirements file introduce:
   use    TrackSys   v1r0   Tr

It is crucial to introduce this line before the line "use LHCb v19r3", otherwise Brunel will get confused with versions of e.g. LHCbKernel defined elsewhere and will not be able to resolve certain symbols!

In the Brunel.opts options file replace the include statement
   #include "$RECSYSROOT/options/Reco.opts"
by the include statement
   #include "$TRACKSYSROOT/options/BrunelReco.opts"
This new options file leaves unchanged the RICH, Calorimeter and Muon reconstruction phases but replaces the standard tracking sequence (using the old TEM) with a sequence that uses the new TEM and is as close as possible to the standard sequence.

Note: as the clone killing is not set-up to run, no Tracks are produced in the "/Event/Rec/Track/Best" container. To avoid errors, the RICH has to be switched off, since it expects Tracks at this location. In fact also the Calorimeter and Muon reconstruction phases have been switched off in the set up of BrunelReco.opts in TrackSys.
As a consequence, one needs to comment out everything that uses information produced in these phases that have been switched off. The fastest option is to comment out in v200507.opts the line

   //ApplicationMgr.OutStream += { "DstWriter" };
, otherwise missing containers will again throw an error; and to comment out in Brunel.opts a few phase lines, as shown below:

   ApplicationMgr.TopAlg += { "ProcessPhase/Init",
                              "ProcessPhase/Reco"
                              //"ProcessPhase/Relations",
                              //"ProcessPhase/Moni",
                              //"ProcessPhase/Check",
                              //"ProcessPhase/Output"
                            };
And that should be all! The rest is standard, e.g.:
   cd ~/cmtuser/Rec/Brunel/v28r2/cmt
   cmt config
   source setup.(c)sh 
   cmt make
   cd ../job
   ./Brunel.job v200507
 
The TrackSys Package

TrackSys is a very simple package that defines the consistent set of TrackXxx packages to run in Brunel the tracking reconstruction phase in the new Track Event Model.

This is rather handy on the one hand; on the other hand it is absolutely necessary if one wants to run the new-TEM tracking compliant with LHCb v19r3, as there is no Brunel version built with all these TrackXxx packages.

It consists of the requirements file and a series of ".opts" files in the options directory. These are:

BrunelReco.opts is the main options file. It includes the others in the correct way and is the only file that needs to be included in the Brunel.opts file in order to get the tracking reconstruction phase run.