#!/usr/bin/perl -w ###################################################################### # This Perl script will generate a geometry file to use # with IceCube simulations. # Author: Joakim Edsjo, edsjo@physto.se # Date: December 29, 1999 ###################################################################### use Getopt::Std; ######### SETUP and INPUT ########## $ver="1.0, December 29, 1999"; ### Parse input arguments getopts('m:s:r:R:o:v:p:h',\%opts); if ($opts{"h"}) { # Help required print<0) { # output file given $geofile=shift; } else { # generate output file name $geofile="ice.${stringspersub}-${radiusinsub}m" . "-${numberofsubs}-${radiusbetweensubs}m" . ".${omperstring}.${verticalspacing}m"; if ($pulseshape == 5) { $geofile .= ".sp.geo"; } else { $geofile .= ".${pulseshape}.geo"; } $geofile =~ s/\s+//g; } print "Welcome to gen-submod.pl\n"; print "Will create the geometry file: $geofile\n"; open(GEO,">$geofile") || die "Can't open geometry file $geofile for writing: $!\n"; geo_header(); $zlow=-($omperstring-1)*$verticalspacing/2; $omi=0; for ($subi=0; $subi<$numberofsubs; $subi++) { if ($subi==0) { $sub_x=0; $sub_y=0; } else { $phi=$subi/($numberofsubs-1.0)*2*3.1415926535; $sub_x=$radiusbetweensubs*cos($phi); $sub_y=$radiusbetweensubs*sin($phi); } geo_sub($sub_x,$sub_y); } ############### SUBROUTINES ############### sub geo_header { # Print geomtry file header to output file. $date=localtime(); print GEO <