diff --git a/eas/do_sims.sh b/eas/do_sims.sh index b7566c3eba0b4a83475f8de5440ead1627dae70b..8a5e386f3ca9a6cff846181ac71d3ab6df0debd2 100755 --- a/eas/do_sims.sh +++ b/eas/do_sims.sh @@ -55,7 +55,8 @@ showhelp() { echo -e " -w <working dir> : Working directory, where bin (run) files are located" echo -e " -p <project name> : Project name (suggested format: NAMEXX)" echo -e " -v <CORSIKA version> : CORSIKA version" - echo -e " -h <HE Int Model (EPOS|QGSII)> : Define the high interaction model to be used" + echo -e " -h <HE Int Model (EPOS|QGSII)> : Define the high energy interaction model to be used. Default: QGSJET-II-04" + echo -e " -f <LE Int Model (gheisha|fluka)> : Define the lown energy interaction model to be used. Default: gheisha" echo -e " -u <user name> : User Name." echo -e " -j <procs> : Number of processors to use" echo -e @@ -89,7 +90,7 @@ cta=false debug=false highsec=false sites=false -usr="LAGO"; +usr="LAGO" vol=false alt=false altitude=0. @@ -106,8 +107,9 @@ defaults=false ecut=800 slurm=false + echo -while getopts 'w:k:p:t:v:u:h:s:j:c:b:m:n:r:i:o:q:a:?lydex' opt; do +while getopts 'w:k:p:t:v:u:f:h:s:j:c:b:m:n:r:i:o:q:a:?lydex' opt; do case $opt in w) wdir=$OPTARG @@ -138,6 +140,10 @@ while getopts 'w:k:p:t:v:u:h:s:j:c:b:m:n:r:i:o:q:a:?lydex' opt; do hig=$OPTARG echo -e "# High Energy Interaction Model = $hig" ;; + f) + lemodel=$OPTARG + echo -e "# Lew Energy Interaction Model = $lemodel" + ;; s) site=$OPTARG sites=true @@ -252,6 +258,11 @@ if [ "X$hig" == "X" ]; then echo -e "# INFO: High energy interaction model was not provided. Using default: $hig" fi +if [ "X$lemodel" == "X" ]; then + lemodel="gheisha" + echo -e "# INFO: Low energy interaction model was not provided. Using default: $lemodel" +fi + if [ "X$atm_model" == "X" ]; then atm_model="E1" echo -e "# INFO: Atmospheric Model was not provided. Using default: $atm_model" @@ -323,7 +334,7 @@ if $slurm; then echo -e "# INFO: SLURM mode is enable. Will not work in other environments." fi -corsika_bin="corsika${ver}Linux_${hig}_gheisha" +corsika_bin="corsika${ver}Linux_${hig}_${lemodel}" if [ ! -e $wdir/$corsika_bin ]; then echo; echo -e "ERROR: Can't locate corsika executable file ($corsika_bin) in the working dir you provided. Please check." showhelp @@ -421,7 +432,7 @@ if $slurm; then rain="$rain -l" fi -rain="$rain -r $wdir -v $ver -h $hig -b $prj/\$i-*.run" +rain="$rain -r $wdir -v $ver -h $hig -f $lemodel -b $prj/\$i-*.run" # echo -e "# INFO : rain command: $rain" echo -e "# INFO : Calculations done. Now run the go_${prj}_* scripts in $wdir/" basenice=19 diff --git a/eas/rain.pl b/eas/rain.pl index 2dddc388077e2a15eb68257f9d0ee590b2227517..c28279fdf317ab52005183df47a919edc033300f 100755 --- a/eas/rain.pl +++ b/eas/rain.pl @@ -89,6 +89,7 @@ my $grid = 0; my $imuaddi = 0; my $nofruns = 1; my $ecutshe = 800.; +my $lemodel = "gheisha"; sub get_answer { my $question = $_[0]; @@ -197,9 +198,13 @@ while ($_ = $ARGV[0]) { $heim = $ARGV[0]; shift; } + if (/-f$/i) { + $lemodel = $ARGV[0]; + shift; + } } -my $package="corsika".$crk_ver."Linux_".$heim."_gheisha"; +my $package="corsika".$crk_ver."Linux_".$heim."_".$lemodel; $package = $package . "_thin" if ($ithin != 0); my $usage=" $0 $VERSION\n @@ -210,6 +215,7 @@ my $usage=" -r <working directory> Specify where corsika bin files are located -v <version> Corsika version number -h <high energy interaction model> High energy interaction model used for compilation of CORSIKA (EPOS|QGSII|SIBYLL) + -f <low energy interaction model> Low energy interaction model used for compilation of CORSIKA (gheisha|fluka) -l Enables SLURM cluster compatibility (with sbatch). -t <EFRCTHN> <WMAX> <RMAX> Enables THIN Mode (see manual for pg 62 for values) -th <THINRAT> <WEITRAT> If THIN Mode, select different thining levels for Hadronic (THINH) ... @@ -438,6 +444,9 @@ for (my $i=0; $i < $nofruns; $i++) { } # LAGO ECUTS, minimum possible values as for the current corsika version my @ecuts=(0.05, 0.01, 0.00005, 0.00005); + if ($lemodel eq "fluka") { + $ecuts[0]=0.02; + } if ($highsec != 0) { @ecuts=($ecutshe, $ecutshe, $ecutshe, $ecutshe); $e_low = $ecutshe if ($e_low < $ecutshe); @@ -616,4 +625,4 @@ unless ($grid != 0) { print "###################################################################\n"; print "# BYE BYE\n"; print "###################################################################\n"; -} \ No newline at end of file +}