Material issues (and likely tracking issues) near the end of the TPC

There is an undocumented difference between tracking in ROOT/TGeo and Geant 3 which has an impact on our material budget, and is likely to have an impact on track reconstruction, near the end of the TPC.  The difference is in the way that so-called "MANY" volumes are handled.  When two volumes overlap, G3 and ROOT attempt to determine unambiguosly which volume a point is in by looking at the depth of the volume in the geometry tree, and whether the "MANY" flag is set.  The documentation for both states that the deepest "MANY" volume takes precedence.  The ROOT code adds one more condition... it subtracts off the "virtuality" of the volume. i.e. it counts the number of distinct instances of TGeoMedium between the candidate volume and the first "ONLY" volume, and subtracts that number.  Thus, a different volume may be selected when tracking through a ROOT geometry if several "virtual" volumes have been declared along the way.

In the TPC geometry we introduced several media by hand because we know that some of the medium parameters (most notably dE/dx and maximum step size) are not properly calculated in ROOT.  This produced the side effect of introducing tracking differences between the original AgSTAR geometries and the geometries exported from AgML back to AgSTAR.  It is also possible (likely) that the conventions used in creating a ROOT geometry from the AgML original will result in these same tracking differences.  Some additional testing will be necessary, and a full valdidation of the geometries should follow.