(This is a follow-up on cms-gem-daq-project/cmsgemos#297)
Brief summary of issue
When analysing scans (SCurves, but possibly others) with non Reed-Muller encoded chipID's, the analysis routine can fail with the following error: OverflowError: unsigned long is less than minimum.
Types of issue
Expected Behavior
SCurves analysis can fail with non Reed-Muller encoded chipID.
Current Behavior
SCurves analysis should perform seamlessly even with non Reed-Muller encoded chipID.
Steps to Reproduce (for bugs)
- Launch
anaUltraScurve.py on a scan with non Reed-Muller encoded chipID's.
- Fails if the chipID MSB is incorrectly readback as
1 for at least one VFAT.
Possible Solution (for bugs)
The root issue comes from the PyROOT type converters, more precisely a hack for the enum types. This is going to be fixed in ROOT 6.19.
Indeed, UInt_t (which is the vfatID branch type) are currently interpreted as signed integers and therefore can represent a negative number if the MSB is set to 1.
Applying this commit on top of ROOT 6.18 (with its dependent commit and a missing include) fixes the issue. Patched RPM's and SRPM can be found here.
Really fixing the issue requires to either deploy a patched version of ROOT or wait for ROOT 6.19. One drawback being that root-numpy is not actively maintained and might not quickly (if at all) support new releases of ROOT.
One hack could be to add 2**32 to negative numbers when the TBranch is supposed to contain 32-bits unsigned integers. This would have to be done everywhere... Another hack could be to store the chipID's as 64-bits unsigned intergers (l) so that the conversion should work as expected.
In the end, I'm not really sure how to best fix the issue. In the meantime, we are working with the patched ROOT version at ULB.
Your Environment
- Version used: 3a5860e
- ROOT version used: 6.18.00