Skip to content
Snippets Groups Projects
Commit 99fd6f46 authored by Benjamin John Rosser's avatar Benjamin John Rosser
Browse files

FPGATrackSim: implement loading of radius files in region map class

The map maker generates a "mean radius" file, which until now has only been used by
the 1D Hough transform tool. Since we need the mean radii in order to do the idealized
coordinate transform, it makes sense to move the loading of this file from the Hough
tool into the map infrastructure.

The radius file format is a list of lines, one per subregion, and one inclusive for
the entire region. Each line has a space-separated list of radii for each logical layer.
Since this breaks things down by subregions I added code to load these files into the
FPGATrackSimRegionMap class, which is used for both the region map and subregion map.

If we only have one region in the region map class, we load the line beginning with "-1"
from the radii file. If we have multiple regions we load them based on the (sub)region
number in the radii file. This is a little awkward; right now it works because we have
a separate rmap file for each region that only ever has one region defined.

The 1D Hough tool now just queries the rmap to look up radii, instead of loading the
file separately. At bank generation time we do the same to find the idealized radii instead
of using the hardcoded values in the constants file (which have now been deleted). The
two other places where this were used were the fit constant bank, and the track fitter,
which meant that the rmap needed to be passed into the track fitter (at the moment it
just gets the plane map class). In the track fitter we store a reference to the entire
radius array on the FPGATrackSimTrack class, and use that when computing idealized
coordinates.
parent 4a51c451
No related branches found
No related tags found
Loading
Showing
with 129 additions and 77 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment