Skip to content

FPGATrackSim: Fix sign of FPGATrackSimHit::getEtaModule return value

This function returns the eta module of a hit, which is stored internally as a signed integer-- because hits on the negative eta side of the detector have negative eta modules. However the actual function was declared as unsigned... so it would be returning the unsigned representation of the negative integer.

I think that in the actual codebase we were always implicitly casting this back to an integer (by e.g. int eta = hit.getEtaModule()), which is why it didn't get noticed sooner. We noticed it when preparing test vectors from the ROOT output of FPGATrackSim (which stores these classes in a TTree, and Python code is used to load the objects and spit out FPGA-friendly formats). This should be fixed.

CC @tbold, @jahreda, @jaoliver, @acamplan

Merge request reports