Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
This commit updates get_absorption_length_snoman_d2o() and
get_absorption_length_h2o() to use absorption lengths from SNOMAN. Currently
I'm just using the values from prod/media.dat but there are other media files
in that directory that have values that seem to be actually measured using
in-situ measurements (for example media_qoca_*.dat). I'm not 100% sure which
ones to use so I am adding the default ones for now.
|
|
|
|
get_path_length()
|
|
|
|
This commit adds a function called get_path_length() which computes the path
length inside and outside a sphere for a line segment between two points. This
will be useful for calculating the photon absorption for paths which cross the
AV and for computing the time of flight of photons from a track to a PMT.
|
|
|
|
This commit updates the calculation of the muon kinetic energy as a function of
distance along the track. Previously I was using an approximation from the PDG,
but it doesn't seem to be very accurate and won't generalize to the case of
electrons. The kinetic energy is now calculated using the tabulated values of
dE/dx as a function of energy.
|
|
This commit makes sure that when we conolve the single PE charge distribution
with a gaussian we integrate starting at zero since the PDF is zero for q < 0.
|
|
|
|
This commit fixes a bug in interp1d() which would cause the function to read
past the end of the arrays if the interpolation point was equal to the last
point in the xp array.
|
|
|
|
|
|
|
|
|
|
|
|
This commit adds the function ln() to compute log(n) for integer n. It uses a
lookup table for n < 100 to speed things up.
|
|
Previously to avoid computing P(q,t|n)*P(n|mu) for large n when they were very
unlikely I was using a precomputed maximum n value based only on the expected
number of PE. However, this didn't take into account P(q|n).
This commit updates the likelihood function to dynamically decide when to quit
computing these probabilities when the probability for a given n divided by the
most likely probability is less than some threshold.
This threshold is currently set to 10**(-10) which means we quit calculating
these probabilities when the probability is 10 million times less likely than
the most probable value.
|
|
|
|
|
|
minimization phase
|
|
|
|
|
|
|
|
This commit adds the absorption length to the likelihood calculation. For now
I'm just using a single number independent of wavelength. I should update this
in the future to actually use the absorption lengths as measured by SNO and
then calculate an overall absorption length weighted by the Cerenkov spectrum
and the PMT quantum efficiency.
|
|
|
|
This commit adds code to read in the PMT response from the PMTR bank from
SNOMAN. This file was used for the grey disk model in SNOMAN and was created
using a full 3D simulation of the PMT and concentrator. Since the PMT response
in SNOMAN included the quantum efficiency of the PMT, we have to divide that
out to get just the PMT response independent of the quantum efficiency.
I also updated the likelihood calculation to use the pmt response. Currently
the energy is being fit too high which I think will improve when we update the
solid angle calculation to use the radius of the concentrator instead of the
PMT.
|
|
This commit adds a fast function to calculate the expected number of PE at a
PMT without numerically integrating over the track. This calculation is *much*
faster than integrating over the track (~30 ms compared to several seconds) and
so we use it during the "quick" minimization phase of the fit to quickly find
the best position.
|
|
This commit fixes a bug in the charge PDF calculation for n > MAX_PE. The
standard deviation should scale like sqrt(n)*qstd where qstd is the standard
deviation of the single PE charge distribution.
|
|
|
|
This commit updates path_eval() to calculate theta0 using the residual
scattering RMS for a truncated KL expansion. Since there isn't a nice closed
form solution for this, we instead compute a rough approximation by evaluating
the residual scattering RMS at the center of the track.
|
|
|
|
|