From 43199c5967a36e7768090eb8b9f61dc8d48178cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 19 Apr 2021 13:21:13 +0200 Subject: [PATCH] Hardsetting the eta range from the config file --- examples/scripts/createO2tables.py | 9 +-------- examples/scripts/default_configfile.ini | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/scripts/createO2tables.py b/examples/scripts/createO2tables.py index a8bffdf..382e8b0 100755 --- a/examples/scripts/createO2tables.py +++ b/examples/scripts/createO2tables.py @@ -154,16 +154,9 @@ def opt(entry, require=True): sigmaT = opt("sigmaT") sigmaT0 = opt("sigmaT0") radius = opt("radius") + etaMax = opt("etamax") length = opt("length") - # calculate max eta from geometry - verbose_msg("Computing maximum eta based on detector length and radius") - th = numpy.arctan2(float(radius), float(length))*0.5 - sth = numpy.sin(th) - cth = numpy.cos(th) - etaMax = -numpy.log(sth/cth) - running_options["etaMax"] = etaMax - # copy relevant files in the working directory def do_copy(in_file, out_file): in_file = os.path.expanduser(os.path.expandvars(in_file)) diff --git a/examples/scripts/default_configfile.ini b/examples/scripts/default_configfile.ini index 3ce2f5c..c4944b4 100644 --- a/examples/scripts/default_configfile.ini +++ b/examples/scripts/default_configfile.ini @@ -4,6 +4,9 @@ ### detector configuration +# Acceptance in eta +etamax = 2. + # magnetic field [kG] bfield = 5.