Accessing global track data

D. Adams
04nov00 1330


Here we describe one way to access global track data. At almost every step there are other choices--see the headers for those options.

The chunk

The first step is to find the chunk containing the global tracks. One must construct an appropriate selector, use it to construct a key and then use the key to extract the chunk from the event:
  const Event& evt = ...          // Get an event from somewhere
  GTrackContentIdSelector sel(401);
  TKey<GTrackChunk> key(sel);
  THandle<GTrackChunk> pchk = key.find(evt);
The selector is constructed from the content ID appropriate for the the type of tracks desired. A table of content ID's may be found in package gtr_find.

The global track chunk is class GTrackChunk.

Global tracks

Global tracks are described by class GTrack.

The list of tracks can be accessed with get_tracks():

GTrackChunk::TrackList gtracks = pchk->get_tracks();
and iterated over in the usual manner:
  for ( GTrackChunk::TrackList::const_iterator itrg=gtracks.begin();
        itrg!=gtracks.end(); ++itrg ) {
    const GTrack& trg = *itrg;

Global track states

The global track includes parameters at each fitted surface, i.e. at each hit. The fit at each such surface is called a state (class GTrackState).

Typically the user wants the state for a particular surface (in our example we choose the surface to be the distance of closest approach, class SurfDCA ). The class D0GTrackPropagator can be used to extract the state at this surface.

Before our track loop, we might define:

  D0GTrackPropagator gprop;
  SurfacePtr pdca(new SurfDCA);
Inside the loop we extract the state at the DCA with
    const GTrackState state = gprop.propagate(trg,pdca);
    assert( state.is_valid() );
    assert( state.fit_status() == GTrackState::OPTIMAL );
We check for possible error in propagation and also check that the fit for this state is optimal. In this example, we handle any errors crudely by throwing an assertion. No doubt, you have a more elegant treatment. The track parameters and errors should not be considered reliable if the fit is not optimal.

The GTrack propagator described here is intended as a replacement for the old GtrTrfPropagator which did not account for material in the detector. There is a separate page which describes that propagator and options for constructing either on from different TRF++ propagators.

Propagators

Track kinematics

The kinematics for this track, i.e. the five track parameters and their error matrix are contained in the ETrack (which inherits from VTrack):
    ETrack tre = state.track();
The meaning of the track parameters depends on the type of surface. We verify that the surface is the DCA and extract the track vector and error matrix:
    assert( tre.get_surface()->get_type() == SurfDCA::get_static_type() );
    const TrackVector& vec = tre.get_vector();
    const TrackError& err = tre.get_error();
and then used the indices defined in the SurfDCA header to extract the value and error for q/pT (charge over transverse momentum in units of e/GeV/c):
    double qoverpt = vec(SurfDCA::IQPT);
    double dqoverpt = sqrt( err(SurfDCA::IQPT,SurfDCA::IQPT) );

In general one should not use TRF++ propagators to propagate these ETrack's to another surface if there is any chance of crossing any material or measurement surfaces. Such propagators are likely to ignore or improperly handle the material or measurements. Instead propagate the original GTrack to the surface and extract the state and ETrack as decribed above. material or correct the errors


dladams@uta.edu