Introduction
The TrkParameters package contains classes to represent the Track's parameters at all points on the track, from the Trk::Perigee parameters, to parameters at various parts of the detector. The parameter classes must also include ErrorMatrices, must reproduce all current functionality, be lightweight and be fast.
For convenience, a list of the (currently available) parameters is reproduced below:
- Trk::AtaCone : contains the parameters on a cone surfaces, defined as \((locphi, locZ, \phi, \theta, q/p)\)
- Trk::AtaCylinder : contains the parameters on a cylinder, defined as \((locR\phi, locZ, \phi, \theta, q/p)\)
- Trk::AtaDisc : contains the parameters on a disc, defined as \((locR, locPhi, \phi, \theta, q/p)\)
- Trk::AtaPlane : contains the parameters on an arbitrary oriented plane, defined as \((R\phi, z, \phi, \theta, q/p)\)
- Trk::AtaStraightLine : contains the parameters at a straight line, defined as \((locR, locZ, \phi, \theta, q/p)\)
- Trk::Perigee : contains the perigee parameters, defined as \((d_0, z_0, \phi_0, \theta, q/p)\)
The internal representation of the five parameters for all inherited classes follows:
- the first two elements are the position on the plane expressed in local coordinates (natural frame of the surface)
- the last represent the momentum by \( (\phi, \theta, q/p) \), where
\( \phi \) is the azimutal angle measured from the x-axis so that the positive x-axis has \( \phi = 0 \), fullfilling that \( \phi \in [-\pi, \pi)\)
\( \theta \) is the polar angle measured from the z-axis so that the positive z-axis has \( \theta = 0 \), fullfilling that \( \theta \in [0,\pi] \)
\( q/p \) is the charge diveded by the magnitude of the momentum
Click on Composite List to see all the classes available in this package.
Outstanding issues are shown in the ToDo list.
Design
In this section, we explain some of the design decisions we've made (which might help to explain the code a bit)
- often an object might have the capability to return other objects, but if these objects are time-consuming to create (for example, matrix inversions), it makes sense to only create them as necessary, and to cache the result. The approach we have taken is to use mutable pointers to these subobjects, which are NULL by default.
- If an object needs to be returned, it is created and assigned to the pointer.
- If it is needed again, no further processing is required ... and the pointer is just reused.
- The best way to understand this is to look at some code: in Trk::AtaCylinder, there is a Trk::AtaCylinder::localPosition method, which returns a Trk::LocalPosition. If you click on the link, you will be able to see that the Trk::LocalPosition is only created once, and only if it is needed.
- When a class returns access to an object it owns it should do so by reference (to make the ownership explicit) UNLESS the object could often be undefined. In which case it should return a const pointer, set to NULL (i.e. 0) whenever the object is void.
- At the moment not much is inlined - this will change when we start work on optimisation
- Trk::LocalParameters are defined in TrkEventPrimitives
Persistification
- Author
- Edwar.nosp@m.d.Mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch, Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch