wiki:InstallingCorsika

Version 36 (modified by tbretz, 6 years ago) ( diff )

--

Installation

Get the latest version of Corsika from here (right now this is at least 7.64): https://www.ikp.kit.edu/corsika/

Extract Corsika

[0] tar xvf corsika-76400.tar.bz2

Call coconut

[1] cd corsika-76400
[2] ./coconut

You can use the defaults (just press return) for

  • Compile in 32 or 64bit mode? [64 bit]
  • Which high energy hadronic interaction model do you want to use? [QGSJET 01C]
  • Which low energy hadronic interaction model do you want to use? [GHEISHA 2002d]
  • Which detector geometry do you have? [horizontal flat]

Now you should get a long list of possible options

Which additional CORSIKA program options do you need?

Enter

(multiple selections accepted, leading '-' removes option): 1a 1c 1e 2a 7c 9 

These options correspond to: CERENKOV, IACT, CEFFIC, TRAJECT, VIEWCONE and ATMEXT.

Now you will get asked more question, answer them as follows

  • Cherenkov light vertical (longitudinal) distribution option? [No Cherenkov light distribution at all]
  • Do you want Cherenkov light emission angle wavelength dependence? [depending on wavelength] {This corresponds to the CERWLEN option}

Now, coconut can create the input files, configure the make system and make. To proceed, select *** Finish selection ***.

You should see

  Are you sure you want to continue with these current option selection:
    CERENKOV NOCLONG THIN TRAJECT VIEWCONE ATMEXT BERNLOHRDIR CERWLEN CEFFIC
     yes or no ? (default: yes) >

Which you acknowledge. Now, go ahead!

For completeness, here is the full session with Corsika 7.64

 

|===========================================================================|
|                          Welcome to COCONUT (v3.1)                        |
|                  -- the CORSIKA CONfiguration UTility --                  |
|===========================================================================|
|                                                                           |
|                                                                           |
|           create an executable of a specific CORSIKA version              |
|                                                                           |
|                                                                           |
|        Please read the documentation for a detailed description           |
|                   of the options and how to use it.                       |
|                                                                           |
|             Try './coconut -h' to get some help about COCONUT             |
|    Use './coconut --expert' to enable additional configuration steps.     |
|                                                                           |
| (press 'Enter' to select an option followed by "[DEFAULT]" or "[CACHED]") |
|                                                                           |
|===========================================================================|




---------------------------------------------------------------------------
 Compile in 32 or 64bit mode ? 
    1 - Force 32bit mode
    2 - Use compiler default ('-m64' on a 64bit machine) [DEFAULT]

    r - restart (reset all options to cached values)
    x - exit make

    (only one choice possible): 
    SELECTED         : NOM32 


---------------------------------------------------------------------------
 Which high energy hadronic interaction model do you want to use ?
    1 - DPMJET-III (2017.1) with PHOJET 1.20.0
    2 - EPOS LHC
    3 - NEXUS 3.97
    4 - QGSJET 01C (enlarged commons) [DEFAULT]
    5 - QGSJETII-04
    6 - SIBYLL 2.3c
    7 - VENUS 4.12

    r - restart (reset all options to cached values)
    x - exit make

    (only one choice possible): 
    SELECTED         : QGSJET01 


---------------------------------------------------------------------------
 Which low energy hadronic interaction model do you want to use ?
    1 - GHEISHA 2002d (double precision) [DEFAULT]
    2 - FLUKA 
    3 - URQMD 1.3cr

    r - restart (reset all options to cached values)
    x - exit make

    (only one choice possible): 
    SELECTED         : GHEISHA 


---------------------------------------------------------------------------
 Which detector geometry do you have ?
    1 - horizontal flat detector array [DEFAULT]
    2 - non-flat (volume) detector geometry
    3 - vertical string detector geometry

    r - restart (reset all options to cached values)
    x - exit make

    (only one choice possible): 
    SELECTED         : HORIZONTAL 


---------------------------------------------------------------------------
  options:   GHEISHA TIMEAUTO QGSJET01 HORIZONTAL 

 Which additional CORSIKA program options do you need ?
    1a - Cherenkov version
    1b - Cherenkov version using Bernlohr IACT routines (for telescopes)
    1c - apply atm. absorption, mirror reflectivity & quantum eff.
    1d - Auger Cherenkov longitudinal distribution
    1e - TRAJECTory version to follow motion of source on the sky
    2 - LPM-effect without thinning
    2a - THINning version (includes LPM)
    2b - MULTIple THINning version (includes LPM)
    3 - PRESHOWER version for EeV gammas
    4 - NEUTRINO version
    4a - NUPRIM primary neutrino version with HERWIG
    4b - ICECUBE1 FIFO version
    4c - ICECUBE2 gzip/pipe output
    5 - STACK INput of secondaries, no primary particle
    6 - CHARMed particle/tau lepton version with PYTHIA
    6a - TAU LEPton version with PYTHIA
    7 - SLANT depth instead of vertical depth for longi-distribution
    7a - CURVED atmosphere version
    7b - UPWARD particles version
    7c - VIEWCONE version
    8a - shower PLOT version (PLOTSH) (only for single events)
    8b - shower PLOT(C) version (PLOTSH2) (only for single events)
    8c - ANAlysis HISTos & THIN (instead of particle file)
    8d - Auger-histo file & THIN
    8e - MUON-histo file
    9 - external atmosphere functions (table interpolation)
         (using bernlohr C-routines)
    9a - EFIELD version for electrical field in atmosphere
    9b - RIGIDITY Ooty version rejecting low-energy primaries entering Earth-magnetic field
    10a - DYNamic intermediate particle STACK
    10b - Remote Control for Corsika
    a - CONEX for high energy MC and cascade equations
    b - PARALLEL treatment of subshowers (includes LPM)
    c - CoREAS Radio Simulations
    d1 - Inclined observation plane
    d2 - ROOT particle OUTput file
    e - interaction test version (only for 1st interaction)
    f - Auger-info file instead of dbase file
    g - COMPACT particle output file
    h - MUPROD to write decaying muons
    h2 - prEHISTORY of muons: mother and grandmother
    k - annitest cross-section version (obsolete)
    l - hit Auger detector (steered by AUGSCT)
      - ------------------------------------------
    y - *** Reset selection ***
    z - *** Finish selection *** [DEFAULT]

    r - restart (reset all options to cached values)
    x - exit make

    (multiple selections accepted, leading '-' removes option): 1a 1c 1e 2a 7c 9


---------------------------------------------------------------------------
 Cherenkov light vertical (longitudinal) distribution option ? 
    1 - Photons counted only in the step where emitted [DEFAULT]
    2 - Photons counted in every step down to the observation level
        (compatible with old versions but inefficient)
    3 - No Cherenkov light distribution at all

    r - restart (reset all options to cached values)
    x - exit make

    (only one choice possible): 3
    SELECTED         : NOCLONG 


---------------------------------------------------------------------------
 Do you want Cherenkov light emission angle wavelength dependence ? 
    1 - Emission angle is wavelength independent [DEFAULT]
    2 - Emission angle depending on wavelength

    r - restart (reset all options to cached values)
    x - exit make

    (only one choice possible): 2
    SELECTED         : CERWLEN 
    SELECTED         : CERENKOV 
    NOT COMPATIBLE TO: COMPACT VOLUMECORR INTTEST ANAHIST AUGERHIST MUONHIST AUGCERLONG ICECUBE1 ICECUBE2 
    SELECTED         : CEFFIC 
    NOT COMPATIBLE TO: INTTEST CURVED AUGCERLONG 
    SELECTED         : TRAJECT 
    NOT COMPATIBLE TO: INTTEST UPWARD 
    SELECTED         : THIN 
    NOT COMPATIBLE TO: ICECUBE1 INTTEST LPM 
    SELECTED         : VIEWCONE 
    NOT COMPATIBLE TO: VOLUMECORR INTTEST 
    SELECTED path to installation: "/home/tbretz/SW/corsika-764xx/bernlohr" 
    SELECTED         : ATMEXT 
    NOT COMPATIBLE TO: INTTEST 


---------------------------------------------------------------------------
  options:   GHEISHA TIMEAUTO QGSJET01 HORIZONTAL 
  selection: BERNLOHRDIR CEFFIC THIN VIEWCONE TRAJECT NOCLONG CERWLEN CERENKOV ATMEXT

 Which additional CORSIKA program options do you need ?
    1a - Cherenkov version
    1b - Cherenkov version using Bernlohr IACT routines (for telescopes)
    1c - apply atm. absorption, mirror reflectivity & quantum eff.
    1d - Auger Cherenkov longitudinal distribution
    1e - TRAJECTory version to follow motion of source on the sky
    2 - LPM-effect without thinning
    2a - THINning version (includes LPM)
    2b - MULTIple THINning version (includes LPM)
    3 - PRESHOWER version for EeV gammas
    4 - NEUTRINO version
    4a - NUPRIM primary neutrino version with HERWIG
    4b - ICECUBE1 FIFO version
    4c - ICECUBE2 gzip/pipe output
    5 - STACK INput of secondaries, no primary particle
    6 - CHARMed particle/tau lepton version with PYTHIA
    6a - TAU LEPton version with PYTHIA
    7 - SLANT depth instead of vertical depth for longi-distribution
    7a - CURVED atmosphere version
    7b - UPWARD particles version
    7c - VIEWCONE version
    8a - shower PLOT version (PLOTSH) (only for single events)
    8b - shower PLOT(C) version (PLOTSH2) (only for single events)
    8c - ANAlysis HISTos & THIN (instead of particle file)
    8d - Auger-histo file & THIN
    8e - MUON-histo file
    9 - external atmosphere functions (table interpolation)
         (using bernlohr C-routines)
    9a - EFIELD version for electrical field in atmosphere
    9b - RIGIDITY Ooty version rejecting low-energy primaries entering Earth-magnetic field
    10a - DYNamic intermediate particle STACK
    10b - Remote Control for Corsika
    a - CONEX for high energy MC and cascade equations
    b - PARALLEL treatment of subshowers (includes LPM)
    c - CoREAS Radio Simulations
    d1 - Inclined observation plane
    d2 - ROOT particle OUTput file
    e - interaction test version (only for 1st interaction)
    f - Auger-info file instead of dbase file
    g - COMPACT particle output file
    h - MUPROD to write decaying muons
    h2 - prEHISTORY of muons: mother and grandmother
    k - annitest cross-section version (obsolete)
    l - hit Auger detector (steered by AUGSCT)
      - ------------------------------------------
    y - *** Reset selection ***
    z - *** Finish selection *** [DEFAULT]

    r - restart (reset all options to cached values)
    x - exit make

    (multiple selections accepted, leading '-' removes option):
  Are you sure you want to continue with these current option selection:
    BERNLOHRDIR CEFFIC THIN VIEWCONE TRAJECT NOCLONG CERWLEN CERENKOV ATMEXT
    yes or no ? (default: yes) > 


-------------------------------------------------------------------------
  Your final selection to build CORSIKA is:

  options:   GHEISHA TIMEAUTO QGSJET01 HORIZONTAL 
  selection: BERNLOHRDIR CEFFIC THIN VIEWCONE TRAJECT NOCLONG CERWLEN CERENKOV ATMEXT



---------------------------------------------------------------------------
 Configuration is finished. How do you want to proceed ? 
    f - Compiling and remove temporary files [DEFAULT]
    k - Compile and keep extracted CORSIKA source code
    n - Just extract source code. Do not compile!

    r - restart (reset all options to cached values)
    x - exit make

    (only one choice possible): 
    SELECTED         : COMPILE 
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking to compile without optimisation and system flags... (cached) no
checking whether to generate debug... (cached) yes
checking for pgf77... no
checking for ifc... no
checking for ifort... no
checking for gfortran... gfortran
checking whether the Fortran 77 compiler works... yes
checking for Fortran 77 compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking for cc... cc
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for cpp... cpp
checking how to run the C preprocessor... cpp
checking how to get verbose linking output from gfortran... -v
checking for Fortran 77 libraries of gfortran...  -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lgfortran -lm -lquadmath
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking if gfortran supports -c -o file.o... (cached) yes
checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
./configure: line 19111: BOOST_PROGRAM_OPTIONS: command not found
checking to make dist... (cached) no
checking 32 bits compatibility... no
checking for stdint.h... (cached) yes
checking explicitly use the -m32 flag... (cached) no
checking explicitly use the -frecord-marker=4 flag... (cached) no
checking detector geometry... horizontal
checking time library... rc
checking high energy model... qgsjet01
checking for fluka... no
checking low energy model... gheisha
checking for thinning... (cached) yes
checking for Cherenkov grid detector... (cached) yes
checking for bernlohr... /home/tbretz/SW/corsika-764xx/bernlohr
checking for Cherenkov telescope detector... (cached) no
checking new Cherenkov counting... (cached) no
checking no cherenkov longitudinla profile... (cached) yes
checking Cherenkov wavelength dependent... (cached) yes
checking simulate telescope detector... (cached) yes
checking for external IACT Cherenkov file... (cached) no
checking external atmosphere... (cached) yes
checking for multiple thinning... (cached) no
checking neutrino primaries... (cached) no
checking ICECUBE FiFo... (cached) no
checking ICECUBE gzip/pipe output... (cached) no
checking BAACK modules with C++0x option... (cached) no
checking BAACK modules with C++11 option... (cached) no
checking BAACK modules with C++14 option... (cached) no
checking BAACK modules with C++1z option... (cached) no
checking for BAACK... no
checking DYNamic particle STACK... (cached) no
checking emulation of normal stack... (cached) no
checking stores every saved particle to file... (cached) no
checking reimplementation of the ICECUBE1 module... (cached) no
checking user defined intermediate particle stack... (cached) no
checking Remote acces to corsika... (cached) no
checking plot shower... (cached) no
checking plot shower C... (cached) no
checking for cernlib... no
checking interaction test... (cached) no
checking slant profile... (cached) no
checking curved atmosphere... (cached) no
checking upward particles... (cached) no
checking viewcone... (cached) yes
checking cerenkov longitudinal profile... (cached) no
checking photon preshower... (cached) no
checking MUPROD... (cached) no
checking compact output... (cached) no
checking annitest... (cached) no
checking LPM effect... (cached) no
checking stack input... (cached) no
checking for pythia... no
checking pythia charm production... (cached) no
checking for herwig... no
checking herwig neutrino production (NUPRIM)... (cached) no
checking augerhit... (cached) no
checking pythia tau lepton production... (cached) no
checking particle history... (cached) no
checking trajectory... (cached) yes
checking electrical field... (cached) no
checking rigidity... (cached) no
checking for root... no
checking particle output in root file... (cached) no
checking machine independent output... (cached) no
checking for COASTUSERLIB... no
checking External COAST user library... (cached) no
checking CoREAS radio simulations... (cached) no
checking Inclined observation level... (cached) no
checking for conex... no
checking CONEX cascade equation (CONEX)... (cached) no
checking produce analysis histograms... (cached) no
checking augerinfo... (cached) no
checking augerhist... (cached) no
checking muonhist... (cached) no
checking parallel computation... (cached) no
checking for mpirunner_lib... no
checking parallel computation with MPI... (cached) no
checking do not compile binaries, just extract CORSIKA compilefile... (cached) no
checking to keep the CORSIKA compilefile... (cached) no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating baack/Makefile
config.status: creating bernlohr/Makefile
config.status: creating conex/Makefile
config.status: creating dpmjet/Makefile
config.status: creating epos/Makefile
config.status: creating pythia/Makefile
config.status: creating herwig/Makefile
config.status: creating nexus/Makefile
config.status: creating urqmd/Makefile
config.status: creating src/Makefile
config.status: creating run/Makefile
config.status: creating doc/Makefile
config.status: creating lib/Makefile
config.status: creating coast/Makefile
config.status: creating coast/Documentation/Makefile
config.status: creating coast/CorsikaOptions/rootout/Makefile
config.status: creating coast/CorsikaOptions/CoREAS/Makefile
config.status: creating coast/CorsikaOptions/Makefile
config.status: creating coast/CorsikaOptions/InclinedPlane/Makefile
config.status: creating coast/CorsikaFileIO/Makefile
config.status: creating coast/CorsikaInterface/Makefile
config.status: creating coast/CorsikaToROOT/Makefile
config.status: creating coast/CorsikaROOT/Makefile
config.status: creating coast/CorsikaIntern/Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Compile CORSIKA in "/home/tbretz/SW/corsika-764xx/lib/unknown" and copy executable in "/home/tbretz/SW/corsika-764xx/run" 

Making install in bernlohr
make[1]: Entering directory '/home/tbretz/SW/corsika-764xx/bernlohr'
cc -DHAVE_CONFIG_H -I. -I../include     -g -D_FILE_OFFSET_BITS=64 -MT libbern_a-fileopen.o -MD -MP -MF .deps/libbern_a-fileopen.Tpo -c -o libbern_a-fileopen.o `test -f 'fileopen.c' || echo './'`fileopen.c
mv -f .deps/libbern_a-fileopen.Tpo .deps/libbern_a-fileopen.Po
cc -DHAVE_CONFIG_H -I. -I../include     -g -D_FILE_OFFSET_BITS=64 -MT libbern_a-straux.o -MD -MP -MF .deps/libbern_a-straux.Tpo -c -o libbern_a-straux.o `test -f 'straux.c' || echo './'`straux.c
mv -f .deps/libbern_a-straux.Tpo .deps/libbern_a-straux.Po
rm -f libbern.a
ar cru libbern.a libbern_a-fileopen.o libbern_a-straux.o 
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libbern.a
cc -DHAVE_CONFIG_H -I. -I../include     -g -D_FILE_OFFSET_BITS=64 -MT libatmext_a-atmo.o -MD -MP -MF .deps/libatmext_a-atmo.Tpo -c -o libatmext_a-atmo.o `test -f 'atmo.c' || echo './'`atmo.c
mv -f .deps/libatmext_a-atmo.Tpo .deps/libatmext_a-atmo.Po
cc -DHAVE_CONFIG_H -I. -I../include     -g -D_FILE_OFFSET_BITS=64 -MT libatmext_a-fileopen.o -MD -MP -MF .deps/libatmext_a-fileopen.Tpo -c -o libatmext_a-fileopen.o `test -f 'fileopen.c' || echo './'`fileopen.c
mv -f .deps/libatmext_a-fileopen.Tpo .deps/libatmext_a-fileopen.Po
cc -DHAVE_CONFIG_H -I. -I../include     -g -D_FILE_OFFSET_BITS=64 -MT libatmext_a-straux.o -MD -MP -MF .deps/libatmext_a-straux.Tpo -c -o libatmext_a-straux.o `test -f 'straux.c' || echo './'`straux.c
mv -f .deps/libatmext_a-straux.Tpo .deps/libatmext_a-straux.Po
rm -f libatmext.a
ar cru libatmext.a libatmext_a-atmo.o libatmext_a-fileopen.o libatmext_a-straux.o 
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libatmext.a
make[2]: Entering directory '/home/tbretz/SW/corsika-764xx/bernlohr'
 /bin/mkdir -p '/home/tbretz/SW/corsika-764xx/lib/unknown'
 /usr/bin/install -c -m 644  libbern.a libatmext.a '/home/tbretz/SW/corsika-764xx/lib/unknown'
 ( cd '/home/tbretz/SW/corsika-764xx/lib/unknown' && ranlib libbern.a )
 ( cd '/home/tbretz/SW/corsika-764xx/lib/unknown' && ranlib libatmext.a )
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/tbretz/SW/corsika-764xx/bernlohr'
make[1]: Leaving directory '/home/tbretz/SW/corsika-764xx/bernlohr'
Making install in src
make[1]: Entering directory '/home/tbretz/SW/corsika-764xx/src'
cpp  -DHAVE_CONFIG_H -I../include -traditional-cpp corsika.F > corsikacompilefile.f
gfortran -O0  -g -std=legacy -c -o corsika-corsikacompilefile.o `test -f 'corsikacompilefile.f' || echo './'`corsikacompilefile.f
depbase=`echo tobuf.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
cc -DHAVE_CONFIG_H -I. -I../include        -g -D_FILE_OFFSET_BITS=64 -MT tobuf.o -MD -MP -MF $depbase.Tpo -c -o tobuf.o tobuf.c &&\
mv -f $depbase.Tpo $depbase.Po
gfortran -O0  -g -std=legacy -c -o corsika-qgsjet01d.o `test -f 'qgsjet01d.f' || echo './'`qgsjet01d.f
gfortran -O0  -g -std=legacy -c -o corsika-gheisha_2002d.o `test -f 'gheisha_2002d.f' || echo './'`gheisha_2002d.f
depbase=`echo timerc.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
cc -DHAVE_CONFIG_H -I. -I../include        -g -D_FILE_OFFSET_BITS=64 -MT timerc.o -MD -MP -MF $depbase.Tpo -c -o timerc.o timerc.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/bash ../libtool  --tag=F77   --mode=link gfortran -O0  -g -std=legacy  -D_FILE_OFFSET_BITS=64 -o corsika corsika-corsikacompilefile.o tobuf.o  corsika-qgsjet01d.o    corsika-gheisha_2002d.o   timerc.o -L/home/tbretz/SW/corsika-764xx/lib/unknown -lbern -latmext      
libtool: link: gfortran -O0 -g -std=legacy -D_FILE_OFFSET_BITS=64 -o corsika corsika-corsikacompilefile.o tobuf.o corsika-qgsjet01d.o corsika-gheisha_2002d.o timerc.o  -L/home/tbretz/SW/corsika-764xx/lib/unknown -lbern -latmext
make[2]: Entering directory '/home/tbretz/SW/corsika-764xx/src'
 /bin/mkdir -p '/home/tbretz/SW/corsika-764xx/run'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c corsika '/home/tbretz/SW/corsika-764xx/run'
libtool: install: /usr/bin/install -c corsika /home/tbretz/SW/corsika-764xx/run/corsika
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/tbretz/SW/corsika-764xx/src'
make[1]: Leaving directory '/home/tbretz/SW/corsika-764xx/src'
Making install in .
make[1]: Entering directory '/home/tbretz/SW/corsika-764xx'
make[2]: Entering directory '/home/tbretz/SW/corsika-764xx'
make  install-exec-hook
make[3]: Entering directory '/home/tbretz/SW/corsika-764xx'
 
 
 
--> "corsika76400Linux_QGSJET_gheisha_thin" successfully installed in :
    /home/tbretz/SW/corsika-764xx/run/
 
--> You can run CORSIKA in /home/tbretz/SW/corsika-764xx/run/ using for instance :
    ./corsika76400Linux_QGSJET_gheisha_thin < all-inputs > output.txt
 
 
 
make[3]: Leaving directory '/home/tbretz/SW/corsika-764xx'
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/tbretz/SW/corsika-764xx'
make[1]: Leaving directory '/home/tbretz/SW/corsika-764xx'

Options description

CERENKOV[1a]: Enables production of Cherenkov photons

IACT[1b]: Redirects photons to eventio (telescope.dat) file (CER files exists, but only for one telescope and it is empty), extends wavelength range to 2000nm.

CERWLEN: Calculates a wavelength dependent refractive index for each step and replaces the production height (8-th) in the photon output by the wavelength.

IACTEXT: Write also particles to eventio file

CEFFIC[1c]: All three look-up-tables (QE, Atmabs, Mirror) are limited to 105 values between 180nm and 700nm -> This turns the extension to 2000nm in the IACT option off

TRAJECT[1e]: To be able to simulate along a trajetory (zd, az, orientation to magnetic field) with "TRAFLG T" (Turn off with "TRAFLG F")

THIN[2a]: Thinning is mainly interesting for >PeV showers and calculates average results for high densities. With CEFFIC and/or CERWLEN, the wavelength is written 8th value to the Cherenkov bunch into the CER-file instead of the weight. To turn the thinning off for the production use "THIN 0 1 0" (The production should behave like with no THIN option). To turn thinning only off for electromagnetic-particles use "THINEM 0 1"

VIEWCONE[7c]: Logically allows to simulate a cone rather than a rectangle in Alt/Az

ATMEXT[9]: To use an atmosphere from an input file rather than a built-in atmosphere

This is from the tracking of the electrons through the Earth's magnetic field

C  LIMITING FACTOR FOR STEP SIZE OF ELECTRON IN MAGNETIC FIELD
#if __CERENKOV__ && __IACT__
C  LIMIT IN DEFLECTION ANGLE IS 2.5 MILLIRADIAN = 0.143 DEG
C  WE USE A LIMIT OF ABOUT 0.05 DEG (APPROX. 1 MILLIRAD)
      BLIMIT   = 0.001D0 / BNORM
#else
C  WE USE A LIMIT OF ABOUT 11.4 DEG (0.2 RAD)
      BLIMIT   = 0.2D0 / BNORM
#endif

This is from the muon tracking (MUTRAC)

#if __CERENKOV__ && __IACT__
C  SCATTERING ANGLES OF MUONS SHOULD BE SMALLER THAN THE PIXEL SIZE.
*     AUX = MIN( 1.D0, 0.015D0*GAMMA )
C  THE SAME SHOULD HOLD FOR DEFLECTION IN THE GEOMAGNETIC FIELD.
C  HERE USING A MAXIMUM RMS SCATTERING / DEFLECTION ANGLE OF 0.05 DEG
C  AND APPROXIMATE ALL BETA*GAMMA TERMS BY GAMMA.
Cxx      Write(*,*) 'mu step old-style step=',MIN( 1.D0,0.015D0*GAMMA )
C  FOR A MEAN SCATTERING ANGLE THETA WE HAVE A STEP LENGTH OF ABOUT
C  (THETA / (13.6 MEV/(BETA*C*P))**2 RADIATION LENGTHS (PDG),
C  NOT TAKING INTO ACCOUNT THE NON-GAUSSIAN PART OF THE DISTIBUTION.
C  FOR THE MOMENT DON''T CARE ABOUT THE DIFFERENCE BETWEEN THE
C  'COULOMB SCATTERING LENGTH' 37.7 G/CM**2 (=C(21)) AND THE
C  RADIATION LENGTH OF 36.66 OR 36.62 G/CM**2 IN AIR.
C  NOTE: PI/180/(13.6 MEV/(BETA*C*P)) APPROX 0.136*GAMMA FOR MUONS.
      AUX = MIN( 1.D0, ((0.05*0.136)*GAMMA)**2 )
      IF ( BNORMC .GT. 0.D0 ) THEN
C  NOTE: PI/180*PAMA(5)*BETA*GAMMA APPROX 0.00185*GAMMA
         AUX = MIN( AUX, (0.05*0.00185)*GAMMA*RHOF(H)/(BNORMC*C(21)) )
      ENDIF
Cxx      Write(*,*) 'mu step new-style step=',AUX
#else
      AUX = MIN( 10.D0, 0.015D0*GAMMA )
#endif

For me this seems only relevant if someone wants to backtrack a single muon, i.e. determin its arrival direction.

An interesting possibility of the IACT option is:

j) Starting with version 1.25, the package has been prepared for importance sampling ofcore position offsets. This would mean that actual core offsets can be generated in anon-uniform distribution and can extend to different distances, depending on primaryenergy, primary type, zenith angle and so on. This package, however, does not provide areal implementation of importance sampling (other than for testing that the later stagesof the processing properly get the weights for each event). If you do nothing about it,you will get uniformly distributed core offsets as before. If you plan to make use ofimportance sampling, you have to replace the file ’sampling.c’ with an implementationof your choice.

A problem with the IACT option might be this:

m) Starting with version 1.38, the dynamic range in a telescope is basically unlimited dueto automatic thinning of bunches. When a detector sphere is hit by more than the givenmaximum number of bunches, the actual number of bunches is reduced by increasingpowers of two, by discarding every second bunch and increasing the bunch size of theremaining bunches by factors of two. Very large eventio buffers are now possible on64-bit machines. They were formerly limited to less than 1 GiB per telescope array andevent and now to 2 GiB on 32-bit machines but can be increased to 4 Terabytes on 64-bitmachines.

The secret of wavelength 999 and 9999 in eventio:

IACTEXT The interface to theTELOUTfunction is extended by parameters describing theemitting particle. This extended information is stored as an additional photon bunch(after the normal one) with mass, charge, energy, and emission time replacing thecx,cy,photons, andzemfields, respectively, and are identified by a wavelength of 9999.The compact output format is disabled for making that possible. In addition, all particlesarriving at the CORSIKA observation level are included in the eventio format output file,in a photon-bunch like block identified by array and detector numbers 999.

The 700nm problem

This is were Corsika checks the limits

#if __IACT__ && !__CEFFIC__
      IF ( WAVLGL .LT. 100.D0  .OR.  WAVLGU .GT. 2000.D0
     *                         .OR.  WAVLGL .GE. WAVLGU ) THEN
#else
      IF ( WAVLGL .LT. 100.D0  .OR.  WAVLGU .GT. 700.D0
     *                         .OR.  WAVLGL .GE. WAVLGU ) THEN
#endif

This is were the data is read from the files

C=======================================================================

      SUBROUTINE TPDINI( OBLECE )

C-----------------------------------------------------------------------
[...]
C  READ THE TABLE OF ATMOSPHERIC EXTINCTION AND STORE IT IN THE
C  ATMABS MATRIX.
[...]
        DO  I = 1, 105
          READ(MCERABS,21) WLT
 21       FORMAT(I4)
          READ(MCERABS,*,ERR=995,END=995) (ATMABS(I,J), J=0,50)
        ENDDO
[...]
C  CALCULATE THE ATM. EXTINCTION FOR OBS. LEVEL INTERPOLATING THE TABLE
        DO  IWL = 1, 105
          FX0 = ATMABS(IWL,X0)
          FX1 = ATMABS(IWL,X1)
          ATEOBS(IWL) = LINEAR(X,X0,X1,FX0,FX1)
        ENDDO
[...]
C  READ THE QUANTUM EFFECIENCY OF THE PMT
        OPEN(UNIT=MCERQEF,FILE=DATDIR(1:INDEX(DATDIR,' ')-1)//
     *          'quanteff.dat',STATUS='OLD',FORM='FORMATTED',ERR=996)
        READ(MCERQEF,20) TEXTQEF
        READ(MCERQEF,23,ERR=997,END=997) (QUAEFF(I),I = 1,105)
[...]
C  READ THE MIRROR REFLECTIVITY
        OPEN(UNIT=MCERMIR,FILE=DATDIR(1:INDEX(DATDIR,' ')-1)//
     *          'mirreff.dat',STATUS='OLD',FORM='FORMATTED',ERR=998)
        READ(MCERMIR,20) TEXTREF
        READ(MCERMIR,23,END=999,ERR=999) (MIRREF(I), I=1,105)

This is where the index or the y-value and the corresponding x-values are calculated for mirror and pde efficiency.

C=====================================================================

      SUBROUTINE TELEFF( ABSORB )

C-----------------------------------------------------------------------
[...]
C  CALCULATE THE REFERENCE WL AND INDEX OF WL FOR THE INTERPOLATIONS
      RIWL = 1 + INT( (WL-180.D0)/5.D0 )
      WLI0 = RIWL*5 + 175
      WLI1 = RIWL*5 + 175 + 5

This is the atmospheric absorption

*-- Author : V. de Souza Filho, Uni. Campinas   22/06/1999
C=======================================================================

      SUBROUTINE ATABSO( ABSORB )

C-----------------------------------------------------------------------
[...]
C  CALCULATE THE REFERENCE WL AND INDEX OF WL FOR THE INTERPOLATIONS
      RIWL = 1 + INT( (WL-180.D0)/5.D0 )
      WLI0 = RIWL*5 + 175
      WLI1 = RIWL*5 + 175 + 5

MMCS

The current version of MARS is NOT compatible anymore with MMCS output. Although the code is still there and can be enables, it is turned off by default (see MPhotonData.cc)

Conclusion

If we want to do any absorption in Corsika (CEFFIC), we have to patch Corsika to allow wavelength larger than 700nm or accept that we will miss photons above 700nm.

To be able to define telescope positions ("TELESCOPE"), the IACT option is not required. Plain Corsika can nowadays do that.

Enabling IACT might make sense, due to the code snippets shown above, the automatic thinning (faster) and the work on improving runtime by faster interpolation algorithms.

The disadvantage of the IACT option is that teh data of all telescopes end up in the same file and that *eventio* format has to be used. Although, the iACT options writes a temporary file for each individual telescope, they are sorted together into one file later.

Using IACT means that we have to understand the automatic thinning and implement it and to make sure eventio works.

I have the impression that eventio files are larger than the corsika output (which is a bit strange)... this has to be checked with long runs and high statistics!

Examples

Here is an example input card for gammas (not all options have yet reasonable values!)

RUNNR   100                      run number                                                                                        
EVTNR   0                        number of first shower event                                                                      
NSHOW   1                        number of showers to be generated in one run                                                      

SEED    62748   0       0        seed for hadronic part                                                                            
SEED    62749   0       0        seed for EGS4 part                                                                                
SEED    62750   0       0        seed for Cherenkov part                                                                           
SEED    62751   0       0        seed for 4. random number sequence                                                                
SEED    62752   0       0        seed for 5. random number sequence                                                                

PRMPAR  1                        primary particle code: 1 = photon, 3 = e-, 14 = p+
FIXCHI  0                        starting altitude of primary particle?
TSTART T 			 taken from IACT option (start emission at border of atmosphere)

ERANGE  10000    10000           energy range of primary particle in GeV
ESLOPE  -2                       slope of energy spectrum

PHIP    0.      0.               range of azimuth angle in deg
THETAP	60.	60.              range of zenith angle in deg
VIEWCONE 0.0    0.0              range of viewcone in deg

TRAFLG F                         TRAJECTORY option
* SRCPOS ra dec                  source position
* TRATM  y m d h m s duration    observation time
* TLAT   d m s N                 observatory latitude
* TLONG  d m s N                 observatory longitude

CWAVLG   250.  700.              simulation range of wavelength band for cherenkov radiation in nm
CWAVRANG 250.  700               input range for all three CERQEFF files
* CERFIL  1                      cherenkov output file, last item of bunch gives wavelength (part of CERWLEN)
* CERSIZ  1                      maximal bunch size of CHphotons treated together
CERQEF F T F                     quantum efficiency of PMT, atmospheric absorption of Cherenkov photons, mirror reflectivity of telescope

* ATMOD   22                     atmospheric parametrisation, here: US STD atm parametrised by Keilhauer
* MAGNET
OBSLEV  4100.E2                  observation level above sea level in cm

ATMOSPHERE 7 T

TELESCOPE  0 0 0 2.0e2 0         they must not overlap...

CSCAT 1 0 0                      number of uses of each Cherenkov event, maximum scattering of core location in cm

* ECUTS 0.3 0.3 0.03 0.03        low energy cutoffs, here are std. values in GeV

* PAROUT T F
* DATBAS F

DIRECT ./                        defines name of output directory
DATDIR corsika-76400/run         defines name of input directory
USER   tbretz

THIN 0 0.1 0                     turn off thinning
Note: See TracWiki for help on using the wiki.