Commit 32084319 authored by Chris Hays's avatar Chris Hays
Browse files

Merge branch '21.6_MGC_SUSY_MultipleLHE' into '21.6'

MadGraphControl SUSY: Allowing multiple input LHE files

See merge request atlas/athena!35524
parents e8c07022 ef82e982
...@@ -68,6 +68,7 @@ else: ...@@ -68,6 +68,7 @@ else:
param_card_old = process_dir+'/Cards/param_card.dat' param_card_old = process_dir+'/Cards/param_card.dat'
ktdurham = -1 ktdurham = -1
import tarfile import tarfile
if tarfile.is_tarfile(runArgs.inputGeneratorFile):
myTarball = tarfile.open(runArgs.inputGeneratorFile) myTarball = tarfile.open(runArgs.inputGeneratorFile)
myEvents = None myEvents = None
for afile in myTarball.getnames(): for afile in myTarball.getnames():
...@@ -82,6 +83,14 @@ else: ...@@ -82,6 +83,14 @@ else:
ktdurham = float(aline.split('=')[0].strip()) ktdurham = float(aline.split('=')[0].strip())
break break
myTarball.close() myTarball.close()
else:
# Assume this is already an unzipped file -- happens when we run on multiple LHEs
update_lhe_file(lhe_file_old=runArgs.inputGeneratorFile,param_card_old=param_card_old,masses=masses)
with open(runArgs.inputGeneratorFile,'r') as events_file:
for aline in events_file:
if 'ktdurham' in aline and "=" in aline:
ktdurham = float(aline.split('=')[0].strip())
break
if madspin_card is not None: if madspin_card is not None:
# Do a stupid addition of madspin - requires a dummy process # Do a stupid addition of madspin - requires a dummy process
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment