From 88560f48ff979a786a1b134cd5d7746730d086b1 Mon Sep 17 00:00:00 2001 From: mfasel Date: Wed, 14 Oct 2020 15:28:46 +0200 Subject: [PATCH] Few more bug fixes - kt-max was uninitialized - "Particle" should be spelled "Particles" when setting particles to stable - Mode without package was not working - change to eval solves the problem --- aligenmc | 1 + gen/herwig/gen.sh | 2 +- gen/herwig/generate_hwgin.py | 4 ++-- lib/tools.sh | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/aligenmc b/aligenmc index 00f4d71..0937181 100755 --- a/aligenmc +++ b/aligenmc @@ -68,6 +68,7 @@ par_k() { par_K() { help "set ktmax" + setvar KTMAX } # initialisation diff --git a/gen/herwig/gen.sh b/gen/herwig/gen.sh index dbef7cc..5bf3deb 100644 --- a/gen/herwig/gen.sh +++ b/gen/herwig/gen.sh @@ -24,7 +24,7 @@ gen_herwig(){ run_in_env 'Herwig --repo=${HERWIG_ROOT}/share/Herwig/HerwigDefaults.rpo read herwig.in' > setup.log fi - run_in_env 'Herwig --repo=${HERWIG_ROOT}/share/Herwig/HerwigDefaults.rpo run herwig.run -N ${NEV} --seed ${SEED}' > hwgen.log + run_in_env 'Herwig --repo=${HERWIG_ROOT}/share/Herwig/HerwigDefaults.rpo run herwig.run -N ${NEV} --seed=${SEED}' > hwgen.log ;; *) help "Herwig 7" diff --git a/gen/herwig/generate_hwgin.py b/gen/herwig/generate_hwgin.py index 5996e72..b97e37d 100644 --- a/gen/herwig/generate_hwgin.py +++ b/gen/herwig/generate_hwgin.py @@ -112,10 +112,10 @@ def GenerateHerwigInput(outputfile, tune, cmsenegy, events, hepmcfile, ktmin, kt # - Omega (3334) # Also set corresponding antiparticles to stable stableparticles = ["K0", "Kbar0", "Lambda0", "Lambdabar0", "Sigma0", "Sigmabar0", - "Sigma+", "Sigmabar-", "Sigma-", "Sigmabar+", "Xi0", "Xibar0" + "Sigma+", "Sigmabar-", "Sigma-", "Sigmabar+", "Xi0", "Xibar0", "Xi-", "Xibar+", "Omega-", "Omegabar+"] for particle in stableparticles: - myfile.write("set /Herwig/Particle/{}:Stable Stable".format(particle)) + myfile.write("set /Herwig/Particles/{}:Stable Stable\n".format(particle)) # In addition: stable particles with a lifetime > 10 mm (decay externally) myfile.write("set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm\n") diff --git a/lib/tools.sh b/lib/tools.sh index b3b7ce9..35c5cac 100644 --- a/lib/tools.sh +++ b/lib/tools.sh @@ -27,6 +27,6 @@ run_in_env() { fi # alienv setenv ${GEN_PACKAGES} -c "$*" else - /bin/bash -c "$*" + (eval $*) fi }