Corsika EAS Generation

Fabrizio Coccetti

29/4/2015 1 Intro

• CORSIKA ( SImulations for KAscade) is a detailed Monte Carlo program to study the evolution and properties of extensive air showers in the atmosphere. • The CORSIKA program allows to simulate interactions and decays of nuclei, , muons, , and photons in the atmosphere up to energies of some 1020 eV.

29/4/2015 2 Energy Range

• CORSIKA is primarily designed to simulate EAS in the energy range 1011 eV to 1020 eV. • The code contains parameterizations and approximations which are valid only for a limited range of some arguments. • The energies are total energies and include the particle rest mass.

29/4/2015 3 Coordinate system in CORSIKA.

29/4/2015 4 Configuration at compile time

• Version: corsika-74005 • 64bit mode • high energy hadronic interaction model: QGSJET 01C (enlarged commons) • low energy hadronic interaction model: GHEISHA 2002d (double precision) • detector geometry: horizontal flat detector array

29/4/2015 5 High-energy Hadronic Interactions

• High-energy hadronic interactions may be treated by one of the models: The Dual Parton Model DPMJET, the simple Monte Carlo generator HDPM which is inspired by the Dual Parton Model and tries to reproduce relevant kinematical distributions being measured, the quark- gluon-string model QGSJET01, the mini-jet model SIBYLL, or VENUS.

29/4/2015 6 High-energy Hadronic Interactions CPU Time (ELMFLG off) • QGSJET needs ~3 times more CPU time than HDPM (time depends also on other parameters) • VENUS needs ~15 times more CPU time than HDPM • Energy Limits • HDPM is considered good model if the energy of the primary is < 108 GeV • VENUS: is considered good model if the energy of the primary is < 2 · 107 GeV

29/4/2015 7 Low-energy Hadronic Interactions

• The low-energy hadronic interactions are simulated alternatively with one of the codes: FLUKA which is a very refined model with many details of nuclear effects, GHEISHA that is a well approved detector Monte Carlo program in the energy region up to some hundred GeV, or UrQMD which describes microscopically the low energetic - nucleus collisions.

29/4/2015 8 Cross Sections

• For all models the hadronic interaction cross- sections at higher and lower energies are adopted according to the used model.

29/4/2015 9 Interactions of electrons and photons

The interactions of electrons and photons can be treated either with the adapted EGS4 code following each particle and its reactions explicitly, or using the analytic NKG formulae to obtain densities at selected locations and the total number of electrons at up to 10 observation levels.

29/4/2015 10 Note on Electromagnetic Interactions

It must be emphasized that at the highest electron and γ-energies above 1017 eV the NKG option does not contain the Landau-Pomeranchuk-Migdal effect (which is added to EGS4) which may alter the shower development by the decrease of the pair formation and bremsstrahlung cross-sections with increasing energy. Therefore the analytical NKG treatment deviates more and more from results gained by the EGS4 option

29/4/2015 11 ELM Comparison CPU time

altitude = 0 m primary = p theta = 20o same random seeds

29/4/2015 12 ELM Comparison Mu number

altitude = 0 m primary = p theta = 20o same random seeds

29/4/2015 13 ELM Comparison CPU time

altitude = 0 m primary = p theta = 20o same random seeds

29/4/2015 14 ELM Comparison Mu number

altitude = 0 m primary = p theta = 20o same random seeds

29/4/2015 15 Using Fluka

• Fluka has several dependencies: – libc.so.6(GLIBC_2.14)(64bit) – libgfortran.so.3(GFORTRAN_1.4)(64bit) – libquadmath.so.0()(64bit) • Scientific Linux 6.2 does not work out of the box. Noferini made it work at CNAF. • Simulation done on a Scientific Linux 7

29/4/2015 16 Fluka vs Gheisha comparison

CPU time

altitude = 0 m primary = p theta = 20o same random seeds

29/4/2015 17 Fluka vs Gheisha comparison

Mu number

altitude = 0 m primary = p theta = 20o same random seeds

29/4/2015 18 Fluka file size (1)

Size (bytes) vs Energy (GeV) 1E+10

1E+09

100000000

10000000

1000000

100000

10000 1.00E+00 1.00E+01 1.00E+02 1.00E+03 1.00E+04 1.00E+05 1.00E+06 1.00E+07 1.00E+08

29/4/2015 19 Fluka file size (2)

Energy (GeV) Size (bytes) Size 1.E0 22940 23k 1.E1 22940 23k 1.E2 22940 23k 1.E3 22940 23k 1.E4 45880 46k 1.E5 344100 336K 1.E6 8418980 8.0M 1.E7 344145880 328M 1.E8 2668151400 2.5G

29/4/2015 20 ECUTS

ECUTS ELCUT(i), i=1... 4 The low energy cut-off of the particle kinetic energy.

Defaults = 0.3, 0.3, 0.003, 0.003 (GeV) Hadrons, Muons, Electrons, Photons (and π0)

For nuclei ELCUT is applied to the energy per nucleon.

29/4/2015 21 Zenith Angle Definition

• THETPR(1) : Low edge of zenith angle range of primary particle. THETPR(2) : High edge of zenith angle range of primary particle. The zenith angle is selected at random out of this interval in a manner which respects equal particle fluxes from all solid angle elements of the sky and a registration by a horizontal flat detector arrangement. • THETPR is the angle of incidence at a horizontal detector. THETPR(i) = 0 is vertical. • Limit are: 0. ≤ THETPR(i) ≤ 70

29/4/2015 22 Azimuth Angle Definition

• PHIPR(1) : Low edge of azimuth angle range of primary particle. • PHIPR(2) : High edge of azimuth angle range of primary particle. • The azimuth angle is selected at random out of this interval. • For φ = 0◦ the shower axis points to magnetic North, for φ = 90◦ it points to West

29/4/2015 23 Seed

• SEED ISEED(i, k), I =1... 3 • Random number generator: RANMAR • Sequence 1 for the hadron shower • Sequence 2 for the EGS4 part • Sequence 3 for the simulation of Cherenkov photons • Limit (to get independent sequences of random numbers) is: 1 ≤ ISEED(1, k) ≤ 900 000 000 • ISEED = event_number [Think about]

29/4/2015 24 Thin Sampling

• To shorten the computing times for ultra-high energy showers above 1016 eV the thin sampling option exists, by which only a fraction of the secondary particles is followed in the shower development.

29/4/2015 25 e3sim on GitHub.com

e3sim

e3sim is a python package written to perform simulations for the (Extreme Energy Events) EEE experiment.

29/4/2015 26 e3showers

~/e3sim$ ./app/e3showers.py --help usage: e3showers.py [-h] -e ENERGY -n NUMBER -s START [-a ALTITUDE] [- v]

Generate Corsika Showers at specific Energy optional arguments: -h, --help show this help message and exit -e ENERGY, --energy ENERGY Value of the energy of the Primary in Gev. (i.e. 1.E4) -n NUMBER, --number NUMBER Number of showers to generate (i.e. 10000) -s START, --start START Start number of the run (i.e. 10001) -a ALTITUDE, --altitude ALTITUDE Altitude in meters [INT] (default is 0) -v, --version show program's version number and exit

NOW adding support for multiple CPU (in streams)

29/4/2015 27