Skip to content
Snippets Groups Projects

FPGATrackSim: implement loading of radius files in region map class

Merged Benjamin John Rosser requested to merge brosser/athena:FPGATrackSimRadiusLoader into main
  1. May 22, 2024
    • Benjamin John Rosser's avatar
      FPGATrackSim: implement loading of radius files in region map class · 99fd6f46
      Benjamin John Rosser authored
      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.
      99fd6f46
Loading