3 """Functionality core of the Generate_tf transform"""
13 import os, re, string, subprocess
14 import AthenaCommon.AlgSequence
as acas
15 import AthenaCommon.AppMgr
as acam
16 from AthenaCommon.AthenaCommonFlags
import jobproperties
17 from AthenaCommon.AthenaCommonFlags
import athenaCommonFlags
18 from AthenaCommon.AthenaCommonFlags
import jobproperties
20 from xAODEventInfoCnv.xAODEventInfoCnvConf
import xAODMaker__EventInfoCnvAlg
21 acam.athMasterSeq += xAODMaker__EventInfoCnvAlg(xAODKey=
"TMPEvtInfo")
24 acam.athMasterSeq += acas.AlgSequence(
"EvgenGenSeq")
25 genSeq = acam.athMasterSeq.EvgenGenSeq
26 acam.athMasterSeq += acas.AlgSequence(
"EvgenFixSeq")
27 fixSeq = acam.athMasterSeq.EvgenFixSeq
28 acam.athMasterSeq += acas.AlgSequence(
"EvgenPreFilterSeq")
29 prefiltSeq = acam.athMasterSeq.EvgenPreFilterSeq
30 acam.athMasterSeq += acas.AlgSequence(
"EvgenTestSeq")
31 testSeq = acam.athMasterSeq.EvgenTestSeq
33 from EvgenProdTools.LogicalExpressionFilter
import LogicalExpressionFilter
35 filtSeq = acam.athMasterSeq.EvgenFilterSeq
36 topSeq = acas.AlgSequence()
38 topSeq += acas.AlgSequence(
"EvgenPostSeq")
39 postSeq = topSeq.EvgenPostSeq
45 import AthenaCommon.AtlasUnixGeneratorJob
46 include(
"PartPropSvc/PartPropSvc.py")
49 from PerfMonComps.PerfMonFlags
import jobproperties
as perfmonjp
50 perfmonjp.PerfMonFlags.doFastMonMT =
True
52 from RngComps.RngCompsConf
import AthRNGSvc
56 jobproperties.AthenaCommonFlags.AllowIgnoreConfigError =
False
59 from AthenaCommon.Logging
import logging
60 evgenLog = logging.getLogger(
'Gen_tf')
67 evgenLog.debug(
"****************** CHECKING EVENT GENERATION ARGS *****************")
68 evgenLog.debug(
str(runArgs))
69 evgenLog.info (
"****************** CHECKING EVENT GENERATION ARGS *****************")
72 if not hasattr(runArgs,
"ecmEnergy"):
73 raise RuntimeError(
"No center of mass energy provided.")
75 evgenLog.info(
' ecmEnergy = ' +
str(runArgs.ecmEnergy) )
81 evgenLog.debug(
"****************** CONFIGURING MATRIX ELEMENT GENERATION *****************")
82 evgenLog.info(
"****************** CONFIGURING MATRIX ELEMENT GENERATION *****************")
86 from EvgenJobTransforms.EvgenConfig
import evgenConfig
87 from GeneratorConfig.GenConfigHelpers
import gens_known, gen_lhef, gens_lhef, gen_sortkey, gens_testhepmc, gens_notune, gen_require_steering
91 from EvgenProdTools.EvgenProdToolsConf
import CountHepMC
92 if (runArgs.firstEvent <= 0):
93 evgenLog.warning(
"Run argument firstEvent should be > 0")
95 svcMgr.EventSelector.FirstEvent = runArgs.firstEvent
99 if not hasattr(postSeq,
"CountHepMC"):
100 postSeq +=
CountHepMC(InputEventInfo=
"TMPEvtInfo",
101 OutputEventInfo=
"EventInfo",
102 mcEventWeightsKey=
"")
104 postSeq.CountHepMC.FirstEvent = runArgs.firstEvent
105 postSeq.CountHepMC.CorrectHepMC =
True
106 postSeq.CountHepMC.CorrectEventID =
True
114 evgenLog.debug(
"****************** LOADING PRE-INCLUDES AND JOB CONFIG *****************")
115 evgenLog.info(
"****************** LOADING PRE-INCLUDES AND JOB CONFIG *****************")
118 if hasattr(runArgs,
"preInclude"):
119 for fragment
in runArgs.preInclude:
123 if hasattr(runArgs,
"preExec"):
124 evgenLog.info(
"Transform pre-exec")
125 for cmd
in runArgs.preExec:
130 return [name
for name
in os.listdir(a_dir)
131 if os.path.isdir(os.path.join(a_dir, name))]
137 if hasattr(runArgs,
"outputTXTFile"): outputTXTFile=runArgs.outputTXTFile
143 if len(runArgs.jobConfig) != 1:
144 evgenLog.info(
"runArgs.jobConfig = " + runArgs.jobConfig)
145 evgenLog.error(
"You must supply one and only one jobConfig file argument. It has to start from mc. and end with .py")
148 print (
"Using JOBOPTSEARCHPATH (as seen in skeleton) = '%s'" % (os.environ[
"JOBOPTSEARCHPATH"]))
149 FIRST_DIR = (os.environ[
'JOBOPTSEARCHPATH']).
split(
":")[0]
151 dsid_param = runArgs.jobConfig[0]
152 evgenLog.info(
"dsid_param = " + dsid_param)
153 dsid = os.path.basename(dsid_param)
154 evgenLog.info(
"dsid = " + dsid)
155 jofiles = [f
for f
in os.listdir(FIRST_DIR)
if (f.startswith(
'mc')
and f.endswith(
'.py'))]
158 evgenLog.info(
"runArgs.jobConfig wrong " + runArgs.jobConfig)
159 evgenLog.error(
"You must supply one and only one jobOption file in DSID directory. It has to start with mc. and end with .py")
162 joparts = (os.path.basename(jofile)).
split(
".")
165 if joparts[0].startswith(
"mc")
and all(c
in string.digits
for c
in joparts[0][2:]):
168 if len(joparts) != 3:
169 evgenLog.error(jofile +
" name format is wrong: must be of the form MC<xx>.<physicsShort>.py: please rename.")
173 jo_physshortpart = joparts[1]
174 max_jo_physshort_length = 50
175 if len(jo_physshortpart) > max_jo_physshort_length:
176 evgenLog.error(f
"{jofile} contains a physicsShort field of more than {max_jo_physshort_length} characters: please rename.")
179 jo_physshortparts = jo_physshortpart.split(
"_")
180 if len(jo_physshortparts) < 2:
181 evgenLog.error(jofile +
" has too few physicsShort fields separated by '_': should contain <generators>(_<tune+PDF_if_available>)_<process>. Please rename.")
184 check_jofiles=
"/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/scripts/check_jo_consistency.py"
185 if os.path.exists(check_jofiles):
186 evgenLog.info(
"Checking offical JO file name consistency")
188 check_naming(os.path.basename(jofile))
190 evgenLog.warning(
"check_jo_consistency.py not found, will proceed without JOs consistency check")
194 include(
"EvgenJobTransforms/LHEonly.py")
201 evgenLog.debug(
"****************** CHECKING EVGEN CONFIGURATION *****************")
202 evgenLog.info(
"****************** CHECKING EVGEN CONFIGURATION *****************")
205 for opt
in str(evgenConfig).
split(os.linesep):
207 evgenLog.info(
".transform = Gen_tf")
212 if evgenConfig.obsolete:
213 evgenLog.error(
"JOs or icludes are obsolete, please check them")
216 if not evgenConfig.generators:
217 evgenLog.error(
"No entries in evgenConfig.generators: invalid configuration, please check your JO")
220 if len(evgenConfig.generators) > len(
set(evgenConfig.generators)):
221 evgenLog.error(
"Duplicate entries in evgenConfig.generators: invalid configuration, please check your JO")
224 gennames =
sorted(evgenConfig.generators, key=gen_sortkey)
226 if joparts[0].startswith(
"MC"):
227 genpart = jo_physshortparts[0]
228 expectedgenpart =
''.
join(gennames)
230 expectedgenpart = expectedgenpart.replace(
"HerwigJimmy",
"Herwig")
235 return s.replace(
"Py",
"Pythia").
replace(
"MG",
"MadGraph").
replace(
"Ph",
"Powheg").
replace(
"Hpp",
"Herwigpp").
replace(
"H7",
"Herwig7").
replace(
"Sh",
"Sherpa").
replace(
"Ag",
"Alpgen").
replace(
"EG",
"EvtGen").
replace(
"PG",
"ParticleGun").
replace(
"Gva",
"Geneva")
238 return s.replace(
"Pythia",
"Py").
replace(
"MadGraph",
"MG").
replace(
"Powheg",
"Ph").
replace(
"Herwigpp",
"Hpp").
replace(
"Herwig7",
"H7").
replace(
"Sherpa",
"Sh").
replace(
"Alpgen",
"Ag").
replace(
"EvtGen",
"EG").
replace(
"PG",
"ParticleGun").
replace(
"Geneva",
"Gva")
241 if genpart !=
_norm(expectedgenpart)
and _norm2(genpart) !=
_norm(expectedgenpart):
242 evgenLog.error(
"Expected first part of JO name to be '%s' or '%s', but found '%s'" % (
_norm(expectedgenpart),
_norm(
_short2(expectedgenpart)), genpart))
243 evgenLog.error(
"gennames '%s' " %(expectedgenpart))
248 if not gens_notune(gennames)
and len(jo_physshortparts) < 3:
249 evgenLog.error(jofile +
" with generators " + expectedgenpart +
250 " has too few physicsShort fields separated by '_'." +
251 " It should contain <generators>_<tune+PDF_<process>. Please rename.")
257 if hasattr(runArgs,
"outputEVNTFile")
and not hasattr(runArgs,
"outputEVNT_PreFile"):
258 raise RuntimeError(
"'EvtGen' found in job options name, please set '--steering=afterburn'")
264 if hasattr(runArgs,
'inputGeneratorFile')
and ',' in runArgs.inputGeneratorFile: multiInput = runArgs.inputGeneratorFile.count(
',')+1
269 if not evgenConfig.nEventsPerJob:
270 evgenLog.info(
'#############################################################')
271 evgenLog.info(
' !!!! no nEventsPerJob set !!! The default 10000 used. !!! ')
272 evgenLog.info(
'#############################################################')
274 evgenLog.info(
' nEventsPerJob set to ' +
str(evgenConfig.nEventsPerJob) )
276 if evgenConfig.minevents > 0 :
277 raise RuntimeError(
"evgenConfig.minevents is obsolete and should be removed from the JOs")
279 if evgenConfig.nEventsPerJob < 1:
280 raise RunTimeError(
"evgenConfig.nEventsPerJob must be at least 1")
282 evgenLog.info(
"evgenConfig.nEventsPerJob = {}, but only {} (dummy) event(s) will be generated by Pythia8 for lhe-only production".
format(evgenConfig.nEventsPerJob, postSeq.CountHepMC.RequestedOutput))
286 if not evgenConfig.keywords:
287 evgenLog.warning(
"No entries in evgenConfig.keywords: invalid configuration, please check your JO !!")
290 if evgenConfig.keywords:
291 from GeneratorConfig.GenConfigHelpers
import checkKeywords
295 if not evgenConfig.categories:
296 evgenLog.warning(
"No entries in evgenConfig.categories: invalid configuration, please check your JO !!")
299 if evgenConfig.categories:
302 lkwfile =
"CategoryList.txt"
304 for p
in os.environ[
"DATAPATH"].
split(
":"):
305 lkwpath = os.path.join(p, lkwfile)
306 if os.path.exists(lkwpath):
312 with open(lkwpath,
'r')
as catlist:
314 allowed_list = ast.literal_eval(line)
315 allowed_cat.append(allowed_list)
319 it = iter(evgenConfig.categories)
323 if "L1:" in l2
and "L2:" in l1:
325 print(
"first",l1,
"second",l2)
326 bad_cat.extend([l1, l2])
327 for a1,a2
in allowed_cat:
328 if l1.strip().lower()==a1.strip().lower()
and l2.strip().lower()==a2.strip().lower():
331 msg =
"evgenConfig.categories contains non-standard category: %s. " %
", ".
join(bad_cat)
332 msg +=
"Please check the allowed categories list and fix."
337 evgenLog.warning(
"Could not find CategoryList.txt file %s in DATAPATH" % lkwfile)
340 dsid = os.path.basename(runArgs.jobConfig[0])
341 if not dsid.isdigit():
343 svcMgr.EventSelector.RunNumber =
int(dsid)
346 from GeneratorConfig.Versioning
import generatorsGetInitialVersionedDictionary, generatorsVersionedStringList
350 import EventInfoMgt.EventInfoMgtInit
351 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"hepmc_version":
"HepMC" +
str(os.environ[
'HEPMCVER'])})
352 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"mc_channel_number":
str(dsid)})
353 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"lhefGenerator":
'+'.
join(
filter( gen_lhef, gennames ) ) })
354 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"generators":
'+'.
join(gennamesvers)})
355 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"evgenProcess": evgenConfig.process})
356 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"evgenTune": evgenConfig.tune})
357 if hasattr( evgenConfig,
"hardPDF" ) : svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"hardPDF": evgenConfig.hardPDF})
358 if hasattr( evgenConfig,
"softPDF" ) : svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"softPDF": evgenConfig.softPDF})
359 if hasattr( runArgs,
"randomSeed") : svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"randomSeed":
str(runArgs.randomSeed)})
360 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"keywords":
", ".
join(evgenConfig.keywords).lower()})
363 evgenLog.info(
"HepMC version " +
str(os.environ[
'HEPMCVER']))
366 from PyUtils
import AMITagHelper
367 AMITagHelper.SetAMITag(runArgs=runArgs)
370 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"beam_energy":
str(
int(runArgs.ecmEnergy*Units.GeV/2.0))})
371 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"beam_type":
'collisions'})
375 include(
"EvgenJobTransforms/Generate_ecmenergies.py")
378 include(
"EvgenJobTransforms/Generate_dsid_ranseed.py")
381 if (hasattr( runArgs,
"VERBOSE")
and runArgs.VERBOSE )
or (hasattr( runArgs,
"loglevel")
and runArgs.loglevel ==
"DEBUG")
or (hasattr( runArgs,
"loglevel")
and runArgs.loglevel ==
"VERBOSE"):
382 include(
"EvgenJobTransforms/Generate_debug_level.py")
390 with open(
'/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common/BlackList_caches.txt')
as bfile:
391 for line
in bfile.readlines():
395 badRelFlav=line.split(
',')[0].strip()
397 badCache=line.split(
',')[1].strip()
399 badGens=line.split(
',')[2].strip()
401 used_gens =
','.
join(generatorName)
403 if relFlavour==badRelFlav
and cache==badCache
and re.search(badGens,used_gens)
is not None:
404 if badGens==
"": badGens=
"all generators"
405 isError=relFlavour+
","+cache+
" is blacklisted for " + badGens
411 with open(
'/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common/PurpleList_generators.txt')
as bfile:
412 for line
in bfile.readlines():
416 purpleRelFlav=line.split(
',')[0].strip()
418 purpleCache=line.split(
',')[1].strip()
420 purpleGens=line.split(
',')[2].strip()
422 purpleProcess=line.split(
',')[3].strip()
424 used_gens =
','.
join(generatorName)
426 if relFlavour==purpleRelFlav
and cache==purpleCache
and re.search(purpleGens,used_gens)
is not None:
427 isError=relFlavour+
","+cache+
" is blacklisted for " + purpleGens +
" if it uses " + purpleProcess
432 evgenLog.debug(
"****************** CHECKING RELEASE IS NOT BLACKLISTED *****************")
433 rel = os.popen(
"echo $AtlasVersion").
read()
435 if os.path.exists(
'/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common'):
438 if (hasattr( runArgs,
"ignoreBlackList")
and runArgs.ignoreBlackList):
439 evgenLog.warning(
"This run is blacklisted for this generator, please use a different one for production !! "+ errorBL )
441 raise RuntimeError(
"This run is blacklisted for this generator, please use a different one !! "+ errorBL)
445 evgenLog.warning(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
446 evgenLog.warning(
"!!! WARNING !!! "+ errorPL )
447 evgenLog.warning(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
449 msg.waring(
"No access to cvmfs, so blacklisted runs will not be checked")
453 svcMgr.TagInfoMgr.ExtraTagValuePairs.update({
"specialConfiguration": evgenConfig.specialConfig})
464 if hasattr(runArgs,
"postInclude"):
465 for fragment
in runArgs.postInclude:
468 if hasattr(runArgs,
"postExec"):
469 evgenLog.info(
"Transform post-exec")
470 for cmd
in runArgs.postExec:
477 acas.dumpMasterSequence()
485 evgenLog.debug(
"****************** HANDLING EVGEN INPUT FILES *****************")
486 print(
"****************** HANDLING EVGEN INPUT FILES *****************")
489 if "McAtNlo" in evgenConfig.generators
and "Herwig" in evgenConfig.generators:
490 datFile =
"inparmMcAtNlo.dat"
491 elif "Alpgen" in evgenConfig.generators:
492 datFile =
"inparmAlpGen.dat"
493 elif "Protos" in evgenConfig.generators:
494 datFile =
"protos.dat"
495 elif "ProtosLHEF" in evgenConfig.generators:
496 datFile =
"protoslhef.dat"
497 elif "AcerMC" in evgenConfig.generators:
498 datFile =
"inparmAcerMC.dat"
499 elif "CompHep" in evgenConfig.generators:
500 datFile =
"inparmCompHep.dat"
503 if "Alpgen" in evgenConfig.generators:
504 eventsFile =
"alpgen.unw_events"
505 elif "Protos" in evgenConfig.generators:
506 eventsFile =
"protos.events"
507 elif "ProtosLHEF" in evgenConfig.generators:
508 eventsFile =
"protoslhef.events"
509 elif "BeamHaloGenerator" in evgenConfig.generators:
510 eventsFile =
"beamhalogen.events"
511 elif "HepMCAscii" in evgenConfig.generators:
512 eventsFile =
"events.hepmc"
513 elif "ReadMcAscii" in evgenConfig.generators:
514 eventsFile =
"events.hepmc"
517 eventsFile =
"events.lhe"
522 "Return a matching file, provided it is unique"
524 files = glob.glob(pattern)
527 raise RuntimeError(
"No '%s' file found" % pattern)
529 raise RuntimeError(
"More than one '%s' file found" % pattern)
535 if(os.path.exists(outputFile)):
536 print (
"outputFile ",outputFile,
" already exists. Will rename to ",outputFile,
".OLD")
537 os.rename(outputFile,outputFile+
".OLD")
538 output =
open(outputFile,
'w')
541 for file
in listOfFiles:
542 cmd =
"grep /event "+file+
" | wc -l"
543 nevents+=
int(subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=
True))
545 for file
in listOfFiles:
548 print (
"*** Starting file ",file)
549 for line
in open(file,
"r"):
555 if(
"<event" in line
and inHeader):
557 if(len(holdHeader)<1):
563 elif(
not inHeader
and not (
"</LesHouchesEvents>" in line)):
567 if(
"nevents" in line):
569 tmp = line.split(
"=")
570 line = line.replace(tmp[0],
str(nevents))
571 elif(
"numevts" in line):
573 tmp = line.split(
" ")
575 line = line.replace(tmp[1],nnn)
577 output.write(
"</LesHouchesEvents>\n")
581 "Make a symlink safely"
583 if os.path.exists(dstfile)
and not os.path.samefile(dstfile, srcfile):
585 if not os.path.exists(dstfile):
586 evgenLog.info(
"Symlinking %s to %s" % (srcfile, dstfile))
587 os.symlink(srcfile, dstfile)
589 evgenLog.debug(
"Symlinking: %s is already the same as %s" % (dstfile, srcfile))
592 if eventsFile
or datFile:
593 if not hasattr(runArgs,
"inputGeneratorFile")
or runArgs.inputGeneratorFile ==
"NONE":
594 raise RuntimeError(
"%s needs input file (argument inputGeneratorFile)" % runArgs.jobConfig)
595 if evgenConfig.inputfilecheck
and not re.search(evgenConfig.inputfilecheck, runArgs.inputGeneratorFile):
596 raise RuntimeError(
"inputGeneratorFile=%s is incompatible with inputfilecheck '%s' in %s" %
597 (runArgs.inputGeneratorFile, evgenConfig.inputfilecheck, runArgs.jobConfig))
599 if ".tar" in os.path.basename(runArgs.inputGeneratorFile):
600 inputroot = os.path.basename(runArgs.inputGeneratorFile).
split(
".tar.")[0]
602 inputroot = os.path.basename(runArgs.inputGeneratorFile).
split(
"._")[0]
607 myinputfiles = runArgs.inputGeneratorFile
608 genInputFiles = myinputfiles.split(
',')
609 numberOfFiles = len(genInputFiles)
612 if ".tar" in os.path.basename(runArgs.inputGeneratorFile):
613 inputroot = os.path.basename(runArgs.inputGeneratorFile).
split(
".tar.")[0]
615 inputroot = os.path.basename(runArgs.inputGeneratorFile).
split(
"._")[0]
617 if "events" in inputroot :
618 inputroot = inputroot.replace(
".events",
"")
623 for file
in genInputFiles:
626 if ".tar" in os.path.basename(runArgs.inputGeneratorFile):
627 inputroot = os.path.basename(runArgs.inputGeneratorFile).
split(
".tar.")[0]
629 input0 = os.path.basename(file).
split(
"._")[0]
630 input1 = (os.path.basename(file).
split(
"._")[1]).
split(
".")[0]
631 inputroot = input0+
"._"+input1
634 with open(realEventsFile,
'r')
as f:
635 first_line = f.readline()
636 if(
not (
"LesHouche" in first_line)):
637 raise RuntimeError(
"%s is NOT a LesHouche file" % realEventsFile)
638 allFiles.append(realEventsFile)
642 if hasattr(runArgs,
"inputGeneratorFile")
and runArgs.inputGeneratorFile !=
"NONE":
643 raise RuntimeError(
"inputGeneratorFile arg specified for %s, but generators %s do not require an input file" %
644 (runArgs.jobConfig,
str(gennames)))
650 if evgenConfig.auxfiles:
652 get_files(evgenConfig.auxfiles, keepDir=
False, errorIfNotFound=
True)
659 if not hasattr(evgenConfig, attr)
or not getattr(evgenConfig, attr):
660 msg =
"evgenConfig attribute '%s' not found." % attr
662 raise RuntimeError(
"Required " + msg)
667 with open(eventsFile)
as f:
669 count_ev += line.count(
'/event')
671 evgenLog.info(
'Requested output events = '+
str(count_ev))
672 print(
"MetaData: %s = %s" % (
"Number of produced LHE events ", count_ev))
675 msg = evgenConfig.description
677 msg +=
" " + evgenConfig.notes
678 print(
"MetaData: %s = %s" % (
"physicsComment", msg))
680 print (
"MetaData: %s = %s" % (
"generatorName",
"+".
join(gennamesvers)))
682 print (
"MetaData: %s = %s" % (
"physicsProcess", evgenConfig.process))
684 print (
"MetaData: %s = %s" % (
"generatorTune", evgenConfig.tune))
686 print (
"MetaData: %s = %s" % (
"hardPDF", evgenConfig.hardPDF))
688 print (
"MetaData: %s = %s" % (
"softPDF", evgenConfig.softPDF))
690 print (
"MetaData: %s = %s" % (
"nEventsPerJob", evgenConfig.nEventsPerJob))
692 print (
"MetaData: %s = %s" % (
"keywords",
", ".
join(evgenConfig.keywords).lower() ))
694 print (
", " +
", ".
join(evgenConfig.categories))
701 print (
"MetaData: %s = %s" % (
"specialConfig", evgenConfig.specialConfig))
704 print (
"MetaData: %s = %s" % (
"contactPhysicist",
", ".
join(evgenConfig.contact)))
706 print (
"MetaData: %s = %s" % (
"randomSeed",
str(runArgs.randomSeed)))
712 filterNames = [alg.getType()
for alg
in acas.iter_algseq(filtSeq)]
713 excludedNames = [
'AthSequencer',
'PyAthena::Alg',
'TestHepMC']
714 filterNames =
list(
set(filterNames) -
set(excludedNames))
715 print (
"MetaData: %s = %s" % (
"genFilterNames",
", ".
join(filterNames)))
722 from PyJobTransformsCore.runargs
import RunArguments
723 runPars = RunArguments()
724 runPars.nEventsPerJob = evgenConfig.nEventsPerJob
725 runPars.maxeventsstrategy = evgenConfig.maxeventsstrategy
726 with open(
"config.pickle",
"wb")
as f:
728 pickle.dump(runPars, f)
735 evgenLog.debug(
"****************** STARTING EVENT GENERATION *****************")
736 print (
"****************** STARTING EVENT GENERATION *****************")
737 print (
"**************************************************************")
738 print (
"****************** PLEASE IGNORE THE LOG FROM PYTHIA ************")
739 print (
"****************** GENERATION OF ONE PYTHIA EVENT ***************")
740 print (
"******************** IS NEEDED TO MAKE *************")
741 print (
"****************** THE TRANSFORM WORK ***************************")
742 print (
"**************************************************************")