A more realistic geometry for PredictSpaceChargeDistortion

The version of StMagUtilities::PredictSpaceChargeDistortion() which we have been using for many years to calibrate SpaceCharge in the TPC has relied on a very simplified version of the TPC geometry, assuming cicrular pad rows to assign physical positions to hits thrown as dictated by real track topology maps (this has always allowed the flexibility to use this function even without the actual track hits, e.g. when reading event.root files where the hits were not saved, since the track topology map always was). Tracks were also always thrown as if they originated with a momentum vector (pointing) angle of 0 (i.e. along the positive x axis, towards the middle of sectors 3 and 21), while reproducing the longitudinal (z) geometry of the tracks (it was recognized early on that the distortions have a strong z dependence).

In preparation for using GridLeak distortion weights which may vary sector to sector (or be unknown, as is the current status for sectors 3 and 20 due to reduced anode voltage adjacted to the inner/outer gap), it is appropriate to have the tracks thrown in their original azimuthal locations so that the correct sector's distortions are used. I took this opportunity to implement a more accurate TPC padrow geometry model, with locally straight padrows. This would allow consideration of (1) the azimuthal depedence of the GridLeak distortion within sectors, as well as from sector-to-sector for tracks that cross sector boundaries, and (2) the importance of proximity to the inner/out gap (where the GridLeak distortion is most rapidly varying) for hits assigned to nearby padrows (e.g. padrows 12-15).

The results of PredictSpaceChargeDistortion() were never meant to be precise, giving an accurate indication of whether there was either too much or too little distortion correction, but only a reasonably good estimate of the magnitude. These changes should give a more precise estimate of the magnitude, slightly sharpening the width of the distribution when calibrating SpaceCharge.

I was then curious to see whether there were any clear effects from this, so I plotted the mean difference in predicted SpaceCharge vs. angle-within-sector (φ) of the first point on global tracks in a recent heavy ion run (Run 12 UU193 data). I found that I could further bring the observed systematic into focus by restricting to high-pT (above 1.0 GeV/c) tracks, and plotting φQ (where Q is the charge) so that all tracks curve the same direction in this plot (it should actually be φQB, but this data was only RFF, so B doesn't matter):

Same data, but plotted as relative change, instead of absolute (sc2 is the new predction, sc1 is the old):

The right-most bin is empty because at this φ these tracks all curve out of the sector, not registering enough hits to pass track quality cuts PredictSpaceChargeDistortion(). There is an additional pT maximum cut of 2 GeV/c.

There is a clear dependence here. The improved code should give a notably different (better) prediction for tracks away from the sector centers, yielding SpaceCharge values which are a few percent higher.

I took a look at some Run 12 pp200 data also, and the above systematic still shows up very clearly in the relative difference plot, shown below with the same histogram scale as above to highlight that the trends are quantitatively similar in all but the edge bins. The effect isn't as easily seen in the absolute difference plot for pp200 as outliers can affect that plot more easily.

-Gene