-
Notifications
You must be signed in to change notification settings - Fork 2
Inconsistent TOA output data due to cmake #369
Description
TLDR
The TOA, and consequently, the TOT data is not saved in some instances, where the instance is defined by running make without any changes. Tp triggers, meaning that the TOA trigger works, but data is still not saved. My guess is that the problem lies somewhere in the compiler.
Describe the bug
I'm taking TOA and TOT data on all channels, iterating one at a time. When saving data from link 1, the TOA (and consequently TOT) doesn't get saved in some instances. The instance depends entirely on some process that occurs when running make. If the TOA doesn't get saved, I can run make (without doing ANY changes to pflib), and there's a chance that the TOA will now be saved, but there's also a chance that the effect will be the same.
In detail explanation / to reproduce
First, I run the ROC calibration procedure as explained in ROC-calibration-wiki. NOTE! For inv_vref calibration, I run this app/tool/tasks/inv_vref_scan.cxx, and poke the parameter values produced by the csv. The TOT scan requires this bugfix: TOT-bugfix.
Make sure to SAVE the configurations so that you can set them in another run later!
Another note on the aforementioned calibration. The TOA and TOT procedures requires that TOA and TOT data is saved, which it is not if this bug is in effect. Therefore, you might need to re-run make until you get data. You will know if the data is not being saved in the final steps of the TOT scan: when the TOT trimming parameter is being set on link 1, and all TRIM_TOT values are getting set to 63 (max val), then that is most likely due to this bug. Re-run make and try again.
After successfully calibrating the ROC, I run app/tools/tasks/global_calib_scan.cxx, that scans all channels with charge injections, for later plotting TOA and TOT efficiency curves. It is when doing this scan that the bug is clearly apparent.
In this figure I am showing the results from this scan for all channels on link 0:
We can see that the TOA and TOT triggers nicely. In the expected normal case, the results on link 1 should look almost exactly the same, however when I've scanned with this bug, I get this instead:
where we see that Tp is triggering, but no TOA data, and consequently, no TOT data is saved. ADC data is saved just fine.
Environment:
- ZCU: Lund
- pflib version: v3.9.4