Differences between YARR and ITSDAQ
Some detailed studies were done to compare scan results between YARR and ITSDAQ. Some of the main findings possibly requiring action are listed below:
- The trimming algorithm is different between YARR and ITSDAQ. In YARR (!490 (closed) ), we scan over TrimDAC and BVT and we optimize the target BVT value such that a maximum number of channels can be trimmed to it. We then select the TrimDAC for each channel such that they get as close as possible to the target. There is also an option to optimize the trim range (BTRANGE), although in practice it is fixed to 6. In the ITSDAQ pedestal trim (code here), BVT and BTRANGE are fixed to 15 and 6, respectively. TrimDAC values are scanned and the optimal ones are taken to be those that lead to an occupancy as close as possible to 50%. In principle, these two approaches should be equivalent, provided the trim target optimized in YARR is close to 15. It was found however, that these targets were higher than 15, leading to higher TrimDAC values. As a test, the YARR algorithm was modified such that the chosen trim target is as close as possible to 15 while still maximizing the number of trimmable channels (see this commit). The results were then found to be very similar between YARR and ITSDAQ. Below are plots showing a comparison of optimal TrimDAC values before and after the modification in the YARR algorithm.
It can also be noted that this modification led to smaller differences in the N-point gain results.
The question is then whether we want to keep the optimization of the target as originally implemented, or if we want to switch to the approach that is closer to ITSDAQ.
- In the N-point gain scan, the conversion of injected charge values from DAC to fC is different between YARR and ITSDAQ. In YARR, a conversion factor of 0.0195 is used (see this line), whereas in ITSDAQ the conversion is hard-coded for each charge, based on simulation (see here). As a test, the same "hard-coded" conversion was in YARR. This led to a reduction in the differences in gain. Below are plots showing the gain distribution for the same module, first without modifying the trimming algorithm or the charge conversion, then modifying only the trimming, then modifying both the trimming and the charge conversion.
The charge conversion issue is addressed in Zhengcheng's MR !584 (merged)
- The noise occupancy scan has many differences between YARR and ITSDAQ. The YARR code is found in MR !497 (closed) and the ITSDAQ code is here. The image below shows a comparison of the noise curves, which is the log of the mean relative occupancy vs threshold squared (note there seems to be a bug in the ENC calculation in ITSDAQ):
Firstly, because this scan uses the results of a previous N-point gain scan, any differences there will translate to different mV to fC conversions. The second difference which significantly affects the scan is the triggering. ITSDAQ sends bursts of 248 triggers with zero spacing, which effectively corresponds to a short trigger burst at 40 MHz. YARR sends trigger commands one-by-one at a frequency of 15kHz (configurable). Hence, the maximum number of triggers can be made much higher in ITSDAQ (64 million) compared to YARR (usually 1 million). The way that error bars are calculated for the noise curve are also different.
YARR:
ITSDAQ:
This leads to the following questions:
- Do we want to implement a functionality in YARR to send bursts of triggers instead of one trigger at a time?
- How do we want to calculate the error bars? Personally, I think it makes more sense to apply binomial statistics to each channel individually rather than the mean, because it's not necessarily a given that the mean will behave in the same way as a single channel. Also, we cannot at the moment use asymmetric error bars as in ITSDAQ, since this is not supported in
GraphErrors
orlmcurve_tyd
. Perhaps it would be worth adding this?