Muon propagation code in Java

The latest version of MMC is available here.

Algorithm and formulae of MMC are discussed in the documents below:

 

Links to web pages of my collaborators discussing MMC (and comparisons to other codes):

 

New plots/results

Interpolation errors depend on the number of parametrization grid points used for evaluation of the interpolated value (g=2-6, 5 by default). This plot illustrates the precision of the method for different g. Another plot compares final energy distributions for the "frejus type" test with g=5 and g=3.

MMC was compared with MUM for the same settings (vcut=0.05-0.001, g=3 - same as the only one available in MUM) for both Standard Rock and Water. MMC was found to be 2-3 times slower than MUM. MMC was written in an object-oriented language (Java) while MUM was written in FORTRAN.

The algorithm of MMC is quite efficient; some of the difference in speed with MUM comes from our choice not to invert parametrization tables, but to search these tables for the closest value of the probability function (and then interpolate in the neighborhood of the found value), whereas MUM pre-inverts the tables and also uses rejection method, which does not require such inversion, but rather uses pre-computed comparison function. The so chosen interpolation scheme in MMC is more generic, better fits into the object-oriented design of the program, is used everywhere in the code and allows easy interpolation of new cross sections and effects.

When using the default setting of g=5, MMC slows down a factor of 1.5-1.7. With all extra options enabled (continuous randomization, Moliere scattering, precise time of flight calculation, stopped muon decay treatment, LPM effect and ALLM parametrization), when incorporated into the AMANDA mc chain, MMC is about as fast as mudedx (loh). Turning some of these extra features off and/or reducing g speeds up the program 10-50%. Another 10-20% increase in speed can be achieved by replacing all double precision variables used in MMC by floats.

IBM Java was found to be 1.2-2 times faster than SUN Java (two times faster for Amanda, less than that for Frejus). When used in the AMANDA mc chain, execution time of mmc with IBM Java with all extra features on is about half that of mudedx (loh) and 10-20% faster than mudedx (lip). At the same time, MMC does the calculation much more precisely and reproduces the spectrum of secondary tracks a lot better than either loh or lip. The number of tracks produced my MMC is quite a bit larger than produced by mudedx (either option), which means that it actually has to do more work than its counterparts. The difference in spectra comes mostly from the inability of mudedx to describe low energy secondaries correctly.

These plots (1 and 2) compare final energy distributions of 500000 100 TeV muons propagated through 1 km of Water, calculated by MMC and MUM with the same parametrizations of all cross sections and value of vcut (1.e-3).

The following several plots describe propagation of taus in Frejus Rock:

The average range of taus was evaluated for both completely continuous (vcut=1.) and stochastic (vcut=1.e-3) treatments. It can be seen that there is no noticeable difference in continuous and stochastic treatments for tau energies up to 1.e11 GeV, therefore the fastest option vcut=1. could be used without affecting the calculation precision (unless the secondaries need to be accounted for).

 

Some more (older) links

 

This is a link to the Massively Parallel Network Computing Java server called Symphony, installed on this computer. Symphony was developed by Dr. Volker-H. Winterer at the University of Freiburg. Please note that for the Java applet to be running on your side, a Java server has to be active on mine.

 

Discussion

To compare the results of parametrized with non-parametrized versions, i made a couple of runs on my computer (parametrized, took about 30 seconds), and on the millennium cluster (non-parametrized, about 300 processors, 10-12 hours each run). On the following plots a solid blue line shows exact results with no parametrizations and a red dashed line shows results with parametrizations.

dE/dx=a+bE

In order to get reproducible values of a and b for the fit of the above formula to the pure continuous energy losses plot, first a region of the fit is selected. To do that a fit to the plot of energy losses is done for varing starting energy and fixed reasonable (the one that's in the "good" region) ending energy, and the good (reasonable arbitraty) starting energy and varing end energy. The "good" region is selected by finding the biggest interval of interesting energies in which Chi^2 plot has the least number of features (or, rather, none of the features that we would not expect when fitting to a linear function). In all fits the errors were chosen to be 1% of the function value. Please consider that MUM can only handle energies of muon from 10 GeV to 10^9 GeV. When the energies are from outside this region MUM spits a lot of warning messages which i ignored when making these plots.

mc/mediuma, GeV/mweda, GeV/mweb, 1/mwedb, 1/mweChi^2
mmc/frejus rock0.231310.21579e-30.42927e-30.14411e-68.827
mmc/ice0.259580.22881e-30.35709e-30.12084e-613.58
mum/frejus rock0.221370.20234e-30.44167e-30.16805e-616.70
mum/ice0.257900.22213e-30.36970e-30.14236e-626.90

In order to compare the energy loss approximation coefficients more directly, here is the table of values of a and b for the fits made inside the same energy interval for both models.

mc/mediuma, GeV/mweda, GeV/mweb, 1/mwedb, 1/mweChi^2
mmc/frejus rock0.232340.20810e-30.42321e-30.16738e-65.354
mmc/ice0.260910.22130e-30.35060e-30.14019e-67.587
mum/frejus rock0.221890.20253e-30.43917e-30.17344e-613.80
mum/ice0.258620.22232e-30.36695e-30.14678e-621.76

To investigate the effect of stochastical processes, we have propagated muons with energies from 120 MeV to 1e11 GeV (in steps of 2%, 1387 energy points altogether) to the point of their disappearance in bunches of 10000 particles per given initial energy. Final distance was averaged and the resulting dependence E_i(x_f) was fitted to the solution of the dE/dx=a+bE equation: x_f=log(1+E_i*b/a)/b. Errors on the averages of x were assumed gaussian. Another contribution would be deviation from our approximation, but since it is not known, it was omitted. Chi2 were therefore overestimated. This assumption is the better, the bigger the initial energy. Here is a plot that illustrates this (same for ice). Green line corresponds to the value of x evaluated with the table above, and red line is evaluated using a and b from the table below.

mc/mediuma, GeV/mweda, GeV/mweb, 1/mwedb, 1/mweChi^2
mmc/frejus rock0.224170.96412e-30.50533e-30.24789e-5792.6
mmc/ice0.251990.29896e-20.41601e-30.61952e-591.73

It is obvious that the inclusion of stochastical processes into consideration leads on general to bigger energy losses than with only continuous processes and the center of gravity of the muon beam travels to a smaller distance.

a and b errors

Since we don't know the errors related to the deviations from the functional form, we can evaluate them by scaling to get Chi2=1. Here are the tables of above results with scaled errors. (rse = relative systematic errors).

mc/mediuma, GeV/mweb, 1.e-3 1/mwerse
mmc/frejus rock0.23131±0.000070.42927±0.000053.0%
mmc/ice0.25958±0.000060.35709±0.000033.7%
mum/frejus rock0.22137±0.000050.44167±0.000044.1%
mum/ice0.25790±0.000040.36970±0.000035.2%

And the same for the fits made inside the same energy interval for both models.

mc/mediuma, GeV/mweb, 1.e-3 1/mwerse
mmc/frejus rock0.23234±0.000090.42321±0.000072.3%
mmc/ice0.26091±0.000080.35060±0.000052.8%
mum/frejus rock0.22189±0.000050.43917±0.000053.7%
mum/ice0.25862±0.000050.36695±0.000034.7%

Apparently, the errors in the fits for a and b are much smaller than the variation of found values of a and b as we change the region of the fit. Therefore, to compare the results of different MCs one should choose the same fit scopes.

In the fitting of the average final distance vs initial muon energy with stochastical losses we have both gaussian errors of the evaluation of the average as well as unknown systematic(?) errors of the linear fit to the unknown function.

mc/mediuma, GeV/mweb, 1.e-3 1/mwerse
mmc/frejus rock0.22086±0.000480.50508±0.000682.4%
mmc/ice0.24894±0.000510.41546±0.000572.4%

 

Precision of interpolation scheme used by MMC for different g