Physics Validation: 2 of N

Author

Marc Paterno

Published

February 14, 2024

Purpose

This document shows some comparisons of the output of PDFasSimPAR depending upon the implementation of the fast_acos function. We consider 4 different cases:

  1. The original algorithm, as of tag v09_38_06.
  2. The hastings_acos4 algorithm
  3. The hastings_acos5 algorithm
  4. The standard library “exact” algorithm for the \(acos\) function.

I have verified that the SimPhotonsLite objects output by PDFastSimPAR are reproducible; the dumped data from different executions of the original code are identical. In addition, the output from using the hastings_acos algorithm are identical to the output of the original code.

Comparisons of counts of photons on channels

The most direct comparison of these data is a plot of the correlation between the output when using each of the approximate algorithms with the output when using the exact algorithm. This is shown in Figure 1.

Figure 1: Correlation of the number of photons per channel for each channel and event. The horizontal axis always shows the exact (acosd) implementation; the panels show one of hastings_acos_4, hastings_acos_5, or the original fast_acos implementation. The correlation is very high for each case, making the result difficult to discriminate in this plot.

We can try to observe more structure by looking at deviations from exact corrlation, as a function of the count of photons resulting from the exact algorithm. This is shown in Figure 2.

Figure 2: Deviation from exact corrlation in the number of photons per channel for each channel and each event. The distribution seems to be the thinnest for acos5, and widest for orig, but the effect is small.

If we bin these data in \(x\) (the number of photons found when using the acosd algorithm), we can show a box-and-whisker plot for each bin, which shows how the width of the distribution varies:

Figure 3: Deviation from exact corrlation in the number of photons per channel for each channel and each event, binned by the value of acosd. This shows the variation in the spread of the distributions as it varies with acosd.

This plot still does not make it easy to observe the variation in width of the distrubtion and how it varies with the value of acosd.

Figure 4: Spread of the values shown in the box plot bins in Figure 3. The line labeled do corresponds to the results using the original fast_acos algorithm; d4 corresponds to hastings_acos4 and d5 corresponds to hastings_acos5. From this we can more clearly see that the hastings_acos5 algorithm yields the smallest variances from the exact algorith, and that the difference between the original algorithm and hastings_acos4 are small.

The gross distribution of the number of photons observed per channel does not show any significant differences for the different algorithms. These distributions are shown in Figure 5.

Figure 5: Distribution of the number of photons per channel for each channel and event. Note the log axes for both axes. The label at the top of each panel shows the algorithm corresponding to that distribution. The distributions differ very little.

Comparisons of detailed measurement data

I am not sure how to sensibly characterize this great bulk of data, without subjecting it to the complex reconstruction algorithms used to process SimPhotonsLite objects. One simple thing to do is to look at the channel in the event with the largest number of photons observed: event 6, channel 108. These data are shown in Figure 6.

Figure 6: Signal in event 6, channel 108, the busiest channel in the set of events. Tne scale of noise and location of possible signal peaks are similar for all algorithms.

Each of these signal forms shows a large peak on the far right side. We can zoom in to show the more detailed structure; this is shown in Figure 7.

Figure 7: Main peak region for the signal in event 6, channel 108, the busiest channel in the set of events. The location and shape of the peaks are very similar, but the details of the noise varies.