diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-03-26 16:11:40 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-03-26 16:11:40 -0500 |
commit | c92657e33b81e37eb5851217fcdea8767c183e62 (patch) | |
tree | c63e76ad44959ec81fcfb3b52edf73349be56292 /src/electron.c | |
parent | e4e65e47901f54fec3f8413522eebdd97c6ffe07 (diff) | |
download | sddm-c92657e33b81e37eb5851217fcdea8767c183e62.tar.gz sddm-c92657e33b81e37eb5851217fcdea8767c183e62.tar.bz2 sddm-c92657e33b81e37eb5851217fcdea8767c183e62.zip |
add energy dependent number of shower photons
This commit updates the code to calculate the number of Cerenkov photons from
secondary particles produced in an electromagnetic shower from electrons to use
an energy dependent formula I fit to data simulated with RAT-PAC.
Diffstat (limited to 'src/electron.c')
-rw-r--r-- | src/electron.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/electron.c b/src/electron.c index 957b278..5b4133a 100644 --- a/src/electron.c +++ b/src/electron.c @@ -59,6 +59,29 @@ static gsl_spline *spline_range; static const double ELECTRON_CRITICAL_ENERGY_H2O = 78.33; static const double ELECTRON_CRITICAL_ENERGY_D2O = 78.33; +/* Returns the average number of Cerenkov photons in the range 200-800 nm + * produced by secondary particles in an electron shower. + * + * This comes from fitting the ratio # shower photons/rad loss to the function: + * + * c0 + c1/log(T0*c2 + c3) + * + * I don't really have any good theoretical motivation for this. My initial + * thought was that the number of photons should be roughly proportional to the + * energy lost due to radiation which is why I chose to fit the ratio. This + * ratio turned out to vary from approximately 520 at low energies (10 MeV) to + * a roughly constant value of 420 at higher energies (> 1 GeV). + * + * This functional form just happened to fit the ratio as a function of energy + * pretty well. + * + * `T0` is the initial kinetic energy of the electron in MeV and `rad` is the + * energy lost due to radiation in MeV. */ +double electron_get_shower_photons(double T0, double rad) +{ + return rad*(406.745 + 0.271816/log(5.31309e-05*T0+1.00174)); +} + void electron_get_position_distribution_parameters(double T0, double *a, double *b) { /* Computes the gamma distribution parameters describing the longitudinal |