diff --git a/km3buu/cmd.py b/km3buu/cmd.py index f315d832a3a1080ff682ecf5037ec3317dbf74fb..bb252ef6057e0f6a0978257c984461928796b328 100755 --- a/km3buu/cmd.py +++ b/km3buu/cmd.py @@ -11,7 +11,7 @@ from os.path import join from km3buu.jobcard import generate_neutrino_jobcard from km3buu.ctrl import run_jobcard -from km3buu.geometry import CANVolume, SphericalVolume, NoVolume +from km3buu.geometry import * from km3buu.output import GiBUUOutput, write_detector_file ARGPARSE_DESC = { @@ -64,7 +64,7 @@ ARGPARSE_GENERAL_PARAMS = [{ "option_strings": ["--geometry", "-g"], "dest": "geometry", - "choices": ["no", "can", "sphere"], + "choices": ["no", "can", "sphere", "cylindrical"], "default": "no", "help": @@ -90,7 +90,7 @@ ARGPARSE_GENERAL_PARAMS = [{ "nargs": "*", "help": - "Dimensions of the geometry; sphere -> -d <radius> / can -> -d <radius> <zmin> <zmax>" + "Dimensions of the geometry; sphere -> -d <radius> / can -> -d <radius> <zmin> <zmax> / cylindrical -> -d <seawaterheight> <rockheight> <radius> <canradius> <canzmin> <canzmax>" }, { "option_strings": ["--output-dir", "-o"], "dest": "output", @@ -231,6 +231,15 @@ def main(): kwargs["zmax"] = args.dimensions[1] kwargs["radius"] = args.dimensions[2] volume = CANVolume(**kwargs) + elif args.geometry == 'cylindrical': + kwargs = {"detector_center": tuple(args.center), "zenith": args.zenith} + kwargs["sw_height"] = args.dimensions[0] + kwargs["sr_height"] = args.dimensions[1] + kwargs["radius"] = args.dimensions[2] + kwargs["can_radius"] = args.dimensions[3] + kwargs["can_zmin"] = args.dimensions[4] + kwargs["can_zmax"] = args.dimensions[5] + volume = CylindricalVolume(**kwargs) run_descriptor = "" if args.runnumber: run_descriptor = "run{:08d}_".format(args.runnumber)