I have temporarily gone back to looking at the analysiscut2 code, because it would be very nice to finalize the set of CHICOS showers we are dealing with.
First I looked through a subset of "Other Possible" showers, comparing old and new TRMS values to see if I could identify anything causing them to differ. Nearly all of the "Other Possible" showers that were found by both programs had very similar TRMS values, with the new one being somewhat lower. This what you would expect if the minimization routine is better than a grid calculation.
| Date | Time | Old TRMS | New TRMS | #NNs | Old Theta/Phi | New Theta/Phi | Notes |
|---|---|---|---|---|---|---|---|
| 01-06-04 | 02:44:07 | 5.80 | 4.54 | 4 | 89.45/75.57 | 89.78/63.65 | |
| 02-07-04 | 20:30:00 | 3.91 | 3.86 | 3 | 89.53/54.57 | 89.83/56.92 | |
| 04-08-04 | 09:28:06 | 8.87 | 5.88 | 3 | 20.42/108.71 | 11.37/0.00 | First theta/phi is better. |
| 05-04-04 | 10:11:11 | 7.34 | 6.27 | 4 | 89.43/80.57 | 90.00/82.35 | |
| 05-08-04 | 16:36:17 | 1.06 | 4.41 | 3-4 | 89.53/125.43 | 1.36/0.00 | One unhealthy NN. |
| 06-19-04 | 03:26:10 | 8.01 | 7.69 | 3 | 89.43/92.43 | 89.40/93.31 | |
| 06-17-04 | 00:23:31 | 6.60 | 6.60 | 3 | 89.45/72.57 | 88.91/73.12 | |
| 06-19-04 | 14:26:33 | 2.46 | 2.01 | 4 | 89.59/45.57 | 66.33/43.44 | |
| 05-27-04 | 17:56:20 | 5.77 | 4.72 | 3 | 58.58/83.64 | 46.04/71.08 | |
| 06-29-04 | 06:43:16 | 5.23 | 7.03 | 4 | 45.06/-66.45 | 6.88/0.00 | Looks ok. Has 2 hits at San Marino. |
Since most of these seemed to agree well, I looked a few "Other Possible" showers that did NOT appear on the new list.
| Date | Time | Old TRMS | New TRMS | Old Theta/Phi | New Theta/Phi | Notes |
|---|---|---|---|---|---|---|
| 01-16-04 | 05:22:13 | 5.09 | -- | 89.89/195.57 | -- | 2 hits at 096 |
| 03-06-04 | 00:51:22 | 8.80 | -- | 89.66/232.57 | -- | Rext fails with version 2.40 |
| 03-21-04 | 00:27:20 | 8.51 | -- | 62.29/-35.08 | -- | 2 at 88 and 5 at 16 |
| 04-01-04 | 14:50:00 | 5.38 | -- | 89.73/28.57 | -- | 2 at 85 |
| 07-01-04 | 02:43:45 | 5.98 | -- | 89.44/99.43 | -- | 2 at 11 |
It seems that having more than 2 hits at a single site is correlated with a higher TRMS value in the new version.
I checked whether this is also true for "Best Candidate" showers:
| Date | Old TRMS | New TRMS | Multiple hits? | Notes |
|---|---|---|---|---|
| 02-03-05 | 2.18 | 3.78 | Y | |
| 03-03-05 | 0.90 | 2.80 | Y | |
| 03-11-05 | 5.81 | 2.99 | N | Lower, as expected |
| 04-03-05 | 0.86 | 0.54 | N | Lower, as expected |
| 05-18-05 | 0.10 | 2.98 | Y | |
| 05-25-05 | 0.19 | 3.53 | Y | |
| 06-01-05 | 1.18 | 7.61 | Y | |
| 06-28-05 | 0.33 | 1.37 | Y | |
| 07-05-05 | 0.10 | 0.10 | Y | Site with multiple hits is last NN |
| 07-09-05 | 0.45 | 1.21 | Y | |
| 07-16-05 | 7.78 | >10 (fails) | N | Does not fit the pattern |
| 07-26-05 | 0.81 | 2.12 | Y | |
| 07-29-05 | 0.40 | 3.44 | Y | |
| 09-20-05 | 2.38 | > 10 (fails) | Y | |
| 09-23-05 | 2.60 | 5.52 | Y |
I reviewed the Nearest Neighbour code and compared it with the daily shower code. The main difference in the way the data is treated seems to be that dailyshower, when compiling nearest neighbor hits, does not average all the hits at a site. Instead it picks out the hit closest to the trigger and uses that point in the TRMS calculation. This is why TRMS values only agree well when there is only one hit at each of the nearest neighbour sites.
I wrote a function which selects the hit closest to t=0 to use as the time for the nearest-neighbour site. While testing this, I noticed some odd data in the nearest-neighbour arrays. See Test output and links. Basically some lines in the NN arrays were gibberish, and some were missing!
This pointed to a problem in constructing the NN arrays. The showers involved were ones that had more than 1 trigger and/or more than 3 neighbours. It turned out that there was a < sign where there should have been a <= sign... The arrays of nearest neighbours were in some cases missing the last element, or failing to overwrite the last element from the neighbours of the previous trigger. Fixing this produced the expected NN arrays.
Re-running the analysiscut2 code with the closest hit (rather than averages) and with the bug fix, some showers that were not being found now appear. The last 3 showers in the second table are now found, and have lower TRMS values than found by dailyshower. The first 2 in that list are still not found. I don't know whether this points to additional problems or not.