Skip to content

Patchouligoo/icecube_muonflux_simulator_19Nov15

Repository files navigation

icecube_muonflux_simulator_19Nov15

This project contains 4 parts: multiplemuon_pos.py, correction.py, integration.py and plot.py The wmm_points.exe amd WMM.cof are called in multiplemuon_pos.py

!!!!!! Should create a forlder named "file" in this project before it can be run !!!!!!!

multiplemuon_pos.py:

This file is the main body of the muon flux simulator. It choose 31 energy levels from 1GeV ro 1TeV logly spaced. For each energy level muons are shoot in 28 x 73 bins with evenly spcaed cos theta and phi.

The final output is 31 files corresponding to each energy level, in each file the final result (position, energy, direction and so on) of muon with these initial angles are listed.

!!!!!!!!!!!! The default setup is for positive muon only, after finishing one round, need to manually change the return value of getB() to simulate negative muon !!!!!!!!!!!!!

Then these files will be corrected in correction.py

correction.py

The file generated by the simulation has only position, direction, energy info, and so on and the final position is highly inaccurate, because in the last step the muon will go far away beyond earth surface which causes error in E and distance

So this file will read all files generated by simulator, doing correction on final position and energy, then for each file (each file corresponds to an energy level with 28 rows and 73 columns representing different initial angle), the final dir and energy will be converted to flux

The result for each file is a 28 x 73 matrix representing flux corresponds to the total flux map of a certain initial energy level. for energy step 0.1, 31 files will be generated.

Then they will be used to do numerical integration in integration.py

Integration.py:

This method reads data from corrected flux result from correction.py and doing a numerical integration based on energy to get the total flux of all energy levels The output is the total flux for all energy range, and it is written to another file and will get plotted in plot.py

plot.py:

just read the total flux map and plot it