CORSIKA - Air Shower Simulation
CORSIKA HOME | INSTALLATION
| USING CORSIKA | CVIEW
USING CORSIKA
The first run of CORSIKA is pretty much straight forward.
Change to the "run" directory of the installation
cd run
Open the file "all-inputs" with an editor and add
PLOTSH T
before "EXIT".
Now issue
./corsika6500Linux_QGSJET_gheisha < all-inputs > output.txt
We use the supplied configuration file "all-inputs" which provides us with values
for a nice, quick result. For details about "all-inputs", see below.
Wait for completion of the program - several files are generated:
DAT000001
DAT000001.dbase
DAT000001.em_xy.map
DAT000001.em_xz.map
DAT000001.em_yz.map
DAT000001.hd_xy.map
DAT000001.hd_xz.map
DAT000001.hd_yz.map
DAT000001.mu_xy.map
DAT000001.mu_xz.map
DAT000001.mu_yz.map
DAT000001.track_em
DAT000001.track_hd
DAT000001.track_mu
Now it's time to generated the plots shown on the CORSIKA HOME page.
PLOT #1 was produced with "map2png"
"map2png" uses the *.map files
(e.g. DAT000001.em_xy.map, DAT000001.em_xz.map, DAT000001.em_yz.map, DAT000001.hd_xy.map
DAT000001.hd_xz.map, DAT000001.hd_yz.map, DAT000001.mu_xy.map, DAT000001.mu_xz.map, DAT000001.mu_yz.map
- those are the electromagnetic, muon and hadronic map files for different coordinate planes e.g. x-z)
to generate this plot (the actual plot is 2048 x 4096 pixels in size!).
The standard plot colors are red for electromagentic, blue for hadronic and green for muons on BLACK
background, but if you want to have a white background with the same particle colors, use these
command line options with "map2png":
# ./map2png -log -em 0,-1,-1 -mu -1,0,-1 -hd -1,-1,0 -bg -1,-1,-1 DAT000001 DAT000001.png
EM track color: 0.000000/-1.000000/-1.000000
Muon track color: -1.000000/0.000000/-1.000000
Hadronic track color: -1.000000/-1.000000/0.000000
Background color: -1.000000/-1.000000/-1.000000
Reading map of 2048 x 4096 pixels.
Maximal/minimal pixel value in map: -1.0000/-4.4456; rescaling picture by 74.0073.
Writing PNG picture to 'DAT000001.png'.
PLOT #2 and #3 was produced with "plottracks"
"plottracks" uses the electromagnetic, muon and hadronic track files, e.g.
DAT000001.track_em, DAT000001.track_mu, DAT000001.track_hd to produce the plot
(images resized - the generated images are bigger).
Actually PLOT #3 is a merge of the generated muon and hadronic plot with the GIMP
image manipulation software.
muon:/home/corsika/corsika-6500/run# ./plottracks
produce a pixel graphics of a shower plot
=========================================
This program will read :
DAT.track_em,
DAT.track_mu, and
DAT.track_hd
being an integer between 0 and 999999 (input)
and being the same for all 3 files
Outputs : track.em.ppm, track.mu.ppm
track.had.ppm and the sum of all
track.all.ppm
(can be opened with xview (xv))
And now :
which projection ? (1,2,3 = x-z,y-z,x-y)
1
ipr = 1
radius range ? (in km)
5
r < 5. km
background colour ? (b/w)
w
white background
which energy cuts ? (em,mu,had)
[just press enter here or enter energy cuts in the format X.XX,X.XX,X.XX]
cuts em,mu,had = 0. 0. 0.
which run ?
6
irun = 6
..... read tracks from DAT000001.track_em
337567 tracks from DAT000001.track_em above 0.
..... store raw picture in track000001.em.raw
..... store picture in track000001.em.ppm
..... read tracks from DAT000001.track_mu
1420 tracks from DAT000001.track_mu above 0.
..... store raw picture in track000001.mu.raw
..... store picture in track000001.mu.ppm
..... read tracks from DAT000001.track_hd
142 tracks from DAT000001.track_hd above 0.
..... store raw picture in track000001.had.raw
..... store picture in track000001.had.ppm
..... merge pixel graphics of a shower plot
store it on track000001.all.ppm
eof reached
"plottracks" draws just lines, while "map2png" draws anti-aliased lines.
The plots with "map2png" actually gives you a better idea about secondary particle
density.
"all-inputs" configuration file
We already added the
PLOTSH T
option in order to generate the map and track files used by the plotting programs.
One important option is the run number:
RUNNR 7 run number
If you get an error like this
# ./corsika6500Linux_QGSJET_gheisha < all-inputs > output.txt
STOP FATAL PROBLEM statement executed
there are DAT000007 files in the same directory and you need to change the RUNNR to
another value.
Of course we want to define the type of the impacting primary particle:
PRMPAR 14 particle type of prim. particle
In this case we use a proton. See the file CORSIKA_GUIDE6500.pdf in the "doc" directory,
page 79 for other particle options.
If you want to use e.g. iron as primary particle set PRMPAR to
PRMPAR 5626 particle type of prim. particle
The formula is A*100+Z (nucleus of Z protons and A - Z neutrons with 2 <= A <= 59)
Z = 26; A = 56; PRMPAR = 56*100+26 = 5626
Also very important is the energy range of the primary particle defined with
ERANGE 1.E2 1.E3 energy range of primary particle
IMPORTANT: The range is given in GeV! The larger the energy, the longer the program
runs and the more data is produced (several 100s of MB up to GB)!
If the particle tracks start or end outside your plot, increase the values in PLAXES (only with PLOTSH2):
PLAXES -10.E5 10.E5 -10.E5 10.E5 0. 6.E6
If PLAXES is not in your all-inputs file yet, add it. The default values are
PLAXES -5.E5 5.E5 -5.E5 5.E5 0. 3.E6
(values in cm)
The height of the start of the first interaction of the primary with the atmosphere is variable
by default when "FIXHEI 0. 0". In order to set a fixed height, change the first number:
FIXHEI 3000000. 0 first interaction height & target
(value in cm). The second values determines the first interaction target -> type of molecule in
the atmosphere.
The observation level is another interesting setting. It defines the ground. You will see that
all electromagnetic particles will stop there, some hadrons will penetrate the ground, and also
some muons will penetrate the ground even more:
OBSLEV 110.E2 observation level (in cm)
Here the ground level is set to 110 meters.
Those options should be enough to try the program.
Read the CORSIKA GUIDE CORSIKA_GUIDE6500.pdf for all details.
Last-Modified: Sun, 12 Mar 2006 21:09:12 GMT
Be very careful when handling high voltages! cosmicrays.org cannot be held liable for damage of any sort!
|