ATLAS Offline Software
Herwig72_LHEF.py
Go to the documentation of this file.
1 # initialize Herwig7 generator configuration object for showering of LHE files
2 include("EvgenProdTools/merge_lhe_files.py")
3 
4 from Herwig7_i.Herwig7_iConf import Herwig7
5 from Herwig7_i.Herwig7ConfigLHEF import Hw7ConfigLHEF
6 
7 genSeq += Herwig7()
8 Herwig7Config = Hw7ConfigLHEF(genSeq, runArgs)
9 
10 # handle compressed LHE files passed via runArgs.inputGeneratorFile
11 import glob
12 from AthenaCommon import Logging
13 athMsgLog = Logging.logging.getLogger('Herwig7_i/Herwig7_LHEF.py')
14 if ".tar.gz" in runArgs.inputGeneratorFile or ".tgz" in runArgs.inputGeneratorFile:
15  athMsgLog.info("inputGeneratorFile '{}' is compressed - will look for uncompressed LHE file".format(runArgs.inputGeneratorFile))
16  lhe_files = glob.glob("*._*.ev*ts")
17  athMsgLog.info("Number of lhe files {}".format(len(lhe_files)))
18  if len(lhe_files) == 0:
19  raise RuntimeError("Could not find uncompressed LHE file")
20  if len(lhe_files) > 1:
21  athMsgLog.info("Found more than one uncompressed LHE file: {}".format(lhe_files))
22 # my_lhe_file = "merged_lhef.events"
23 # skeleton.GENtoEVGEN splits the file name on "._" (in rel. 20.7.9.9.6,MCProd,
24 # so insert this in the merged file name - to make it run also for this release)
25  my_lhe_file = "merged_lhef._0.events"
26  merge_lhe_files(lhe_files, my_lhe_file )
27  lhe_files[0] = my_lhe_file
28  athMsgLog.info("Using uncompressed LHE file '{}' as inputGeneratorFile".format(lhe_files[0]))
29  runArgs.inputGeneratorFile = lhe_files[0]
30 
vtune_athena.format
format
Definition: vtune_athena.py:14
python.Include.include
include
Definition: Include.py:318
merge_lhe_files
Definition: merge_lhe_files.py:1