Skip to content

FPGATrackSim: implement loading of radius files in region map class

Now that the large port of code from HTTSim (!70389 (merged) and !70669 (merged)) is merged, I wanted to also open a merge request for this small patch which was not ported from HTTSim but is new functionality:

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

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 but conforms with the assumptions made about the structures of these files for the moment).

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 source code (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.

I only implemented this for the first stage, at the moment-- in the future a "second stage radius map" might need to be added as well. Also, we probably will need to add one of these radius files to cvmfs (as we did with the maps and banks); here is an example of one of these files for region 0:

0 291.194 396.617 403.326 559.341 565.626 758.976 765.476 997.654 1004.073 
1 291.155 396.426 402.497 559.472 565.654 759.275 765.471 997.094 1003.385 
2 291.134 396.608 402.750 559.353 565.556 759.261 765.492 997.245 1003.583 
3 291.231 396.466 402.610 559.289 565.568 759.245 765.483 997.204 1003.579 
4 291.254 396.264 402.499 559.215 565.449 759.313 765.621 997.346 1003.539 
5 291.282 397.161 402.686 558.427 564.608 759.558 765.493 997.200 1003.450 
-1 291.192 396.485 402.642 559.311 565.542 759.265 765.513 997.248 1003.557 

CC @jahreda, @tbold

Edited by Benjamin John Rosser

Merge request reports