CORSIKA: Difference between revisions
(CORSIKA introduction and installation instructions) |
(minor formatting) |
||
Line 1: | Line 1: | ||
[https://www.ikp.kit.edu/corsika/ CORSIKA] ('''CO'''smic '''R'''ay '''SI'''mulations for '''KA'''scade) is a program for detailed simulation of extensive air showers initiated by high energy cosmic ray particles. It has many options and can produce very detailed results. Here we will list just the most important ones, compared to other cosmic-ray generators used in Mu2e: | [https://www.ikp.kit.edu/corsika/ CORSIKA] ('''CO'''smic '''R'''ay '''SI'''mulations for '''KA'''scade) is a program for detailed simulation of extensive air showers initiated by high energy cosmic ray particles. It has many options and can produce very detailed results. Here we will list just the most important ones, compared to other cosmic-ray generators used in Mu2e: | ||
Revision as of 00:18, 27 November 2019
CORSIKA (COsmic Ray SImulations for KAscade) is a program for detailed simulation of extensive air showers initiated by high energy cosmic ray particles. It has many options and can produce very detailed results. Here we will list just the most important ones, compared to other cosmic-ray generators used in Mu2e:
- Elevation can be set at the Fermilab one (226 m) and the particles flux is adjusted automatically accordingly.
- Different models for cosmic shower evolutions can be tested (e.g. FLUKA, GHEISHA).
- No binning effects in the energy spectra of the particles.
- Magnetic field can be set to the value measured at Fermilab (Bx = 19.066 μT, Bz = 50.628 μT).
- Different particles can be used as primaries (protons, helium, heavy nuclei).
The MicroBooNE collaboration has performed a detailed comparison of the CORSIKA and CRY expected fluxes at Fermilab elevation. In particular, the flux of neutrons (protons) with CORSIKA+FLUKA is 3.35x (2.50x) higher than CRY.
CORSIKA installation
The CORSIKA source code is available, previous registration, on the CORSIKA website.
In order to work together with FLUKA, it requires gfortran v8_2_0. Moreover, the FLUFOR
environment variable must be set to gfortran
and the FLUPRO
environment variable must point to the installed FLUKA directory.
The compilation is run by an interactive script called coconut
, which produces the CORSIKA executable in the run
folder. As additional CORSIKA program options you might want to select the option g
(COMPACT particle output file), which produces output files 40x smaller than the default. If you choose the QGSJET as high-energy hadronic model and FLUKA as low-energy hadronic model, the executable will be called corsika77100Linux_QGSJET_fluka
. Thus, the CORSIKA output is created by launching the command:
./corsika77100Linux_QGSJET_fluka < corsika_configuration
The corsika_configuration
file is a text file containing the setup of the cosmic rays we want to simulate. We report here an example:
RUNNR 110001 run number EVTNR 1 number of first shower event NSHOW 2000000 number of showers to generate PRMPAR 14 particle type of prim. particle (14=p) ESLOPE -2.7 slope of primary energy spectrum ERANGE 1.3 100000 energy range of primary (GeV) THETAP 0. 90. range of zenith angle (degree) PHIP -180. 180. range of azimuth angle (degree) SEED 110001 0 0 seed for 1. random number sequence SEED 100110001 0 0 seed for 2. random number sequence QGSJET T 0 QGSJET for high energy & debug level QGSSIG T QGSJET cross-sections enable OBSLEV 228E2 observation level (in cm) MAGNET 19.066 50.628 Earth's mag. field at detector- Bx & Bz (22/09/2014) HADFLG 0 0 0 0 0 2 flags hadr.interact.&fragmentation ECUTS 0.05 0.05 0.05 0.05 energy cuts for particles MUADDI F additional info for muons MUMULT T muon multiple scattering angle ELMFLG F T em. interaction flags (NKG,EGS) STEPFC 1.0 mult. scattering step length fact. RADNKG 200.E2 outer radius for NKG lat.dens.distr. ARRANG 0 rotation of array to north ATMOD 1 U.S. standard atmosphere (1-Linsley; 22-Keilhauer) LONGI F 20. F F longit.distr. & step size & fit & out ECTMAP 1.E2 cut on gamma factor for printout MAXPRT 0 max. number of printed events DIRECT ./ output directory DATBAS F write .dbase file USER srsoleti user DEBUG F 6 F 1000000 debug flag and log.unit for out EXIT terminates input
The output file will be called DAT110001 (where 110001 is the run number RUNNR). The size of the output file is around 100MB for 2000000 primary nucleons, which in turn produce around 6000 showers with at least one particle at Fermilab elevation.
Using CORSIKA in the Mu2e Offline
TODO