From 8447870e721dd738bce12b45e732c9cc01dc2595 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Sun, 11 Nov 2018 13:22:18 -0600 Subject: update likelihood function to fit electrons! To characterize the angular distribution of photons from an electromagnetic shower I came up with the following functional form: f(cos_theta) ~ exp(-abs(cos_theta-mu)^alpha/beta) and fit this to data simulated using RAT-PAC at several different energies. I then fit the alpha and beta coefficients as a function of energy to the functional form: alpha = c0 + c1/log(c2*T0 + c3) beta = c0 + c1/log(c2*T0 + c3). where T0 is the initial energy of the electron in MeV and c0, c1, c2, and c3 are parameters which I fit. The longitudinal distribution of the photons generated from an electromagnetic shower is described by a gamma distribution: f(x) = x**(a-1)*exp(-x/b)/(Gamma(a)*b**a). This parameterization comes from the PDG "Passage of particles through matter" section 32.5. I also fit the data from my RAT-PAC simulation, but currently I am not using it, and instead using a simpler form to calculate the coefficients from the PDG (although I estimated the b parameter from the RAT-PAC data). I also sped up the calculation of the solid angle by making a lookup table since it was taking a significant fraction of the time to compute the likelihood function. --- src/likelihood.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/likelihood.h') diff --git a/src/likelihood.h b/src/likelihood.h index b326d5d..7622ffe 100644 --- a/src/likelihood.h +++ b/src/likelihood.h @@ -4,6 +4,8 @@ #include "event.h" #include /* for size_t */ +#define MAX_NPOINTS 1000 + /* Maximum number of PE to consider if the PMT was hit. */ #define MAX_PE 10000 /* Maximum number of PE to consider if the PMT wasn't hit. @@ -35,9 +37,17 @@ #define GTVALID 400.0 #define BETA_MIN 0.8 +/* Number of photons in the range 200 nm - 800 nm generated per MeV of energy + * lost to radiation for electrons. + * + * FIXME: This is just a rough estimate, should use an energy dependent + * quantity from simulation. */ +#define PHOTONS_PER_MEV 400.0 + typedef struct particle { double mass; double range; + double rad; double *x; double *T; size_t n; -- cgit