alignment_system (under construction!) alignment_system components:
The NewTrack class inherits from GTrack and thus encompasses all the functionality of a GTrack. A NewTrack can be constructed from a list of states (just like a GTrack), or from a pointer to a GTrack.

The NewTrack class has some functionality that the GTrack class does not have (or at least may not have available in an easy-to-use way):

double charge():       returns the charge of the track.
double pT():           returns the pT of the track.
void momentum(...):    returns the total momentum
                       and uncertainty on the total momentum.
int nstates():         returns # of states associated with the track.
void get_pca(...):     returns the track PCA relative to some 3D point.
                       Takes into account the magnetic field within the
                       solenoid volume, and lack of magnetic field outside it.
double get_chi(...):   returns the chi^2 of predicted track position
                       relative to some 3D point.
                       Takes into account the magnetic field within the
                       solenoid volume, and lack of magnetic field outside it.
int nprop2cyl(...):    returns 3D point of track intersection with a cylinder
                       of radius R and half width zhalf.  
                       Takes into account the magnetic field within the
                       solenoid volume, and lack of magnetic field outside it.
void find_MCpart(...): finds the MCparticle in the event that most closely
                       matches the track parameters of the NewTrack
void find_McTrack(..): finds the McTrack in the event that most closely
                       matches the track parameters of the NewTrack
compare2gtrack(...):   does a chi^2 comparison of the track parameters of
                       and input GTrack to those of the NewTrack
void find_vertex(..):  finds the 3D position of the intersection of two
                       tracks.  Either does this by simply looking
                       for r/phi intersection, then getting chi^2
                       from z match of the tracks at that point, or it
                       can do a constrained fit for the vertex...whichever
                       the user wants.

And of course, because the NewTrack inherits from GTrack, you can propagate it just like a GTrack and apply all the usual GTrack methods, if you so desire.


Another useful class in alignment_system is the NewAssoc class. It is instantiated with an event, and a pointer to a GTrack in that event. The NewAssoc class has methods which return all kinds of information associated with the GTrack, such as the positions of the SMT, CFT and Muon hits that appear to be associated with the track, and the position and energies of the calorimeter cells that are associated. It is somewhat (but not quite) like a ChargedParticle in this sense.
There is also a method available to get the mean dE/dx associated with the track. The mean dE/dx is calculated from the nmeas dE/dx measurements along the track, where the highest 30% of the measurements are thrown away (along with the lowest measurement), and the mean is calculated from the remaining measurements. The calculation takes into account path length corrections, and also corrects for the fact that dE/dx measurements from the p and n sides of the silicon layers are correlated.

In alignment_system/test there is a framework program called New_test.cpp which reads in reco'd events and tests the NewTrack and NewAssoc methods. The file alignment_system/test/New_utils.cpp contains examples of how to use the NewTrack and NewAssoc classes. It fills an hbook file with ntuples with track info and hit info.
The paw macro track.kumac in alignment_system/test/display reads in the hbook files and overlays the hits over the tracks (it is, in essence, a very simple 2D event display).