Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This speeds up the "boot up" time from ~30 seconds to ~12 seconds.
|
|
|
|
|
|
This commit updates the PMT response bank and absorption lengths for H2O and
D2O based on the values in mcprod which were used for the LETA analysis.
|
|
Doh! I was previously using the tube number variable!
|
|
|
|
|
|
Previously we ignored PMTs which were flagged when computing the expected
number of PE for each PMT, but since we calculate the amount of reflected light
here we need to include even PMTs which are offline (since they still reflect
light).
|
|
To calculate the expected number of photons from reflected light we now
integrate over the track and use the PMT response table to calculate what
fraction of the light is reflected. Previously we were just using a constant
fraction of the total detected light which was faster since we only had to
integrate over the track once, but this should be more accurate.
|
|
|
|
Previously I was interpolating the absorption lengths using interp1d() but that
only works when the x array is uniform. Since the wavelengths are not spaced
uniformly, we have to use the GSL interpolation routines.
|
|
This commit updates the fast likelihood calculation to use the identity
sin(a-b) = sin(a)*cos(b) - cos(a)*sin(b)
to speed up the fast likelihood calculation.
|
|
This commit speeds up the fast likelihood calculation by avoiding calls to
trigonometric functions where possible. Specifically we calculate
sin(a) = sqrt(1-pow(cos(a),2));
instead of
sin(a) = sin(acos(cos(a)));
|
|
|
|
Currently the PDF for scattered light is modelled as a flat distribution
starting at some time t. Previously I was using the mean hit time for all PMTs,
however this should really be a flat distribution in the time *residual* after
the main peak. Therefore, the PDF now starts at the estimated time for direct
photons.
|
|
I accidentally hardcoded the single PE TTS to 1.5 ns in the likelihood
calculation.
|
|
This commit updates the bounds of the track integration in the likelihood
function to integrate up to 1 meter around the point at which the PMT is at the
Cerenkov angle from the track.
This fixes an issue I was seeing where a *very* small change in the fit
paramters would cause the likelihood to jump by a large amount. I eventually
tracked it down to the same issue I was seeing before which I solved by
splitting up the integration into two intervals. However that fix did not seem
to completely fix the issue. Based on initial tests with 500 MeV muons, this
fix seems to do a much better job.
|
|
When testing out the fitter on 500 MeV muons, there was at least one event
which started out at a position very far from the true position. This event had
a secondary electron like ring which is what I suspect caused the fit to start
out in a position far from the true position.
This fix correctly starts the minimization close to the true position. In the
future I should look at updating get_direction() so that it finds the largest
ring direction instead of just doing a weighted average of all the vectors from
the position to the PMTs.
|
|
|
|
This commit updates the likelihood calculation to split up the track integral
into two intervals in some cases. I noticed when fitting some events that the
likelihood value would change drastically for a very small change in the fit
parameters. I eventually tracked it down to the fact that the track integral
was occasionally returning a very small charge for a PMT which should have a
very high charge. This was happening because the region of the track which was
hitting the PMT was very small and the cquad integration routine was completely
skipping it.
The solution to this problem is a bit of a hack, but it seems to work. I first
calculate where along the track (for a straight track) the PMT would be at the
Cerenkov angle from the track. If this point is somewhere along the track then
we split up the integral into two intervals: one going from the start of the
track to this point and the other from the point to the end of the track. Since
the cquad routine always samples points near the end of the intervals this
should prevent it from completely skipping over the point in the track where
the integrand is non-zero.
|
|
|
|
|
|
For some reason the OWL tubes have 9999.00 for the x, y, and z coordinates of
the normal vector in the PMT file. For now, I'm just going to remove them from
the likelihood calculation.
|
|
|
|
|
|
|
|
|
|
This commit adds the ability to run the fit program with the
--skip-second-event flag to only fit the first event after a MAST bank. This
way we avoid fitting secondaries like Michel electrons when fitting MC events.
|
|
the quantum efficiency
|
|
|
|
|
|
|
|
|
|
This commit fixes a potential heap overflow in interp1d() which could occur if
x was very close to the last value in the xp array. The bounds check is now
performed on the index rather than the x values.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit updates the CHARGE_FRACTION value to now represent approximately
the fraction of light reflected from each PMT. It also updates the value to be
closer to the true value based on a couple of fits.
|