Normally the default D0 propagator described there is the ideal choice. Here we describe some other options for constructing propagators.
Most (all?) users should use the default propagator and can safely ignore what follows here.
Class GTrack describes a global track. It consists of a list of states (GTrackState) consisting of measurements (clusters), misses and fits (ETrack, chisquare) at various points along its trajectory.
Users who want numbers to make calculations will need to extract an ETrack from a GTrack. They must specify their surface and then use a GTrack propagator to extract the GTrack state at that surface. The ETrack is then obtained directly from the GTrack state.
It is possible to propagate ETrack's directly using TRF++ propagators but the ETrack does not not know about the measurements and other features of its parent GTrack and the the parameters and errors in a propagated ETrack will not in general be optimal. One should always go back to the GTrack to obtain the track fit at a different surface.
Global general purpose trf propagators can be obtained as follows:
#include "objstream/ObjTable.hpp"
#include "trfbase/PropagatorPtr.h"
#include "gtrprop/GtrPropPkg.hpp"
GtrPropPkg::initialize();
PropagatorPtr pprop;
ObjTable::Status stat = ObjTable::get_object("gtr_d0prop", pprop);
assert(stat == ObjTable::OK);
The first argument of ObjTable::get_object ("gtr_d0prop" in the above example) defines the name of the global general purpose propagator. Currently, four global trf propagators are available:
| Propagator Name | Interacting? | Magnetic field |
|---|---|---|
| gtr_d0prop | Yes | Non-uniform |
| gtr_d0prop_uniform | Yes | Uniform 2 Tesla |
| gtr_prop | No | Non-uniform |
| gtr_prop_uniform | No | Uniform 2 Tesla |
In the case of the non-uniform field propagators, framework package RunConfigPkg should be linked into the executable (add object file RegisterRunConfigPkg to OBJECTS) and enabled in the framework rcp file (rcp file < run_config_fwk RunConfigPkg>) near the start of the package list.
The interacting, non-uniform field propagatpr ("gtr_d0prop") is equivalent to a default-constructed instance of D0Propagator.
#include "trfbase/PropagatorPtr.h" #include "gtrprop/D0Proagator.hpp" PropagatorPtr pprop ( new D0Propagator );
The non-interacting, uniform field propagator ("gtr_prop_uniform") is equivalent to the propagator obtained from GtrTrfPropagator:
#include "trfbase/PropagatorPtr.h" #include "gtrbase/GtrTrfPropagator.hpp" GtrTrfPropagator trf_prop_maker; PropagatorPtr pprop = trf_prop_maker.get_propagator();
However, in either case it may be preferable to use the global propagators, as this saves time and memory by sharing propagators among different routines. This is especially true with respect to D0Propagator, as D0Propagators are costly to construct.
There are two GTrack propagators: the original GTrackPropagator and the new D0GTrackPropagator. The latter accounts for material in the detector and require the presence of the D0 geometry system. By default the former neglects material interactions.
Both have sensible default constructors and have constructors which take a TRF++ propagator as an argument. Users might want to provide their own TRF++ propagator to use a different field description or to allow surface types not supported by the default. Here we show how to construct GTrack propagators which are equivalent to those provided by the default constructors.
The default constructor for GTrackPropagator uses a non-interacting, uniform magnetic field trf propagator, equivalent to:
#include "trfbase/PropagatorPtr.h" #include "gtrbase/GtrTrfPropagator.hpp" #include "gtrbase/GTackPropagator.hpp" . . . GtrTrfPropagator trf_prop_maker; PropagatorPtr ptrf_prop = trf_prop_maker.get_propagator(); GTrackPropagator gprop(ptrf_prop); . . .
The default constructor for D0GTrackPropagator uses an interacting, non-uniform field propagator, equivalent to:
#include "trfbase/PropagatorPtr.h" #include "gtrbase/GTackPropagator.hpp" #include "gtrprop/D0Propagator.hpp" . . . PropagatorPtr ptrf_d0_prop( new D0Propagator ); GTrackPropagator gprop(ptrf_d0_prop); . . .
It permissible to construct a GTrackPropagator using any TRF++ propagator, including any of the four global general purpose propagator described above. For example, here is code to construct a GTrackPropagator using an interacting, uniform field, TRF++ propagator.
#include "objstream/ObjTable.hpp"
#include "trfbase/PropagatorPtr.h"
#include "gtrprop/GtrPropPkg.hpp"
#include "gtrbase/GTrackPropagator.hpp"
GtrPropPkg::initialize();
PropagatorPtr pprop;
ObjTable::Status stat = ObjTable::get_object("gtr_d0prop_uniform", pprop);
assert(stat == ObjTable::OK);
GTrackPropagator gprop(pprop);
| Object Name | Object Type | Description |
|---|---|---|
| bfield | ObjDouble | Bz used for tracking |
| bfield_actual | ObjDouble | Bz as determined by RunConfigPkg |
| bfield_map | ObjMagField | Full B-field map used for tracking |
| bfield_map_actual | ObjMagField | Full B-field map as determined by RunConfigPkg |
The only reason why bfield and bfield_map might be different than bfield_actual and bfield_map_actual is if the actual field is zero and a non-zero field is being used for track reconstruction (this is the default).
The following examples show how to retrieve Bz at the origin (object bfield) and the full magnetic field map (object bfield_map):
Bz at origin:
#include "objstream/ObjTable.hpp"
#include "trfbase/ObjDoublePtr.h"
#include "gtrbase/GtrFieldPkg.hpp"
GtrFieldPkg::initialize();
ObjDoublePtr pbfield;
ObjTable::Status stat = ObjTable::get_object("bfield", pbfield);
assert(stat == ObjTable::OK);
double bfield = *pbfield;
Full magnetic field map:
#include "objstream/ObjTable.hpp"
#include "trfbase/ObjMagFieldPtr.h"
#include "gtrbase/GtrFieldPkg.hpp"
#include "mag_field/AbstractMagneticField.hpp"
GtrFieldPkg::initialize();
ObjMagFieldPtr pbfmap;
ObjTable::Status stat = ObjTable::get_object("bfield_map", pbfmap);
assert(stat == ObjTable::OK);
const AbstractMagneticField& bfmap = **pbfmap;