33def readJO(options):
34 mainJOfile = glob.glob("mc.*.py")
35 if len(mainJOfile)!=1:
36 print ("ERROR: found 0 or multiple mc.*.py files in main jobOptionDir")
37 sys.exit(2)
38 options.mainJOfile = mainJOfile[0]
39
40
41
42 global genSeq
43 global evgenConfig
44 genSeq = dotdict({"Sherpa_i":dotdict({
45 "Parameters":[],
46 "OpenLoopsLibs":[],
47 "NCores":24,
48 "RunCard":"",
49 "ExtraFiles":[],
50 "MemoryMB":1,
51 "PluginCode":"",
52 })})
53 evgenConfig = dotdict({"generators":[]})
54
55
56 global runArgs
57 global pdfgridpath
58 configname = "Sherpa.yaml" if os.environ["SHERPAVER"].startswith('3.') else "Run.dat"
59 runArgs = dotdict({"jobConfig":[configname],"ecmEnergy":1000.*float(options.ecm[0])})
60 pdfgridpath = "todo"
61
62
63 global testSeq
64 global filtSeq
65 global HeavyFlavorBHadronFilter
66 HeavyFlavorBHadronFilter = True
67 global HeavyFlavorCHadronPt4Eta3_Filter
68 HeavyFlavorCHadronPt4Eta3_Filter = True
69 testSeq = dotdict({
70 "TestHepMC":dotdict({
71 "NoDecayVertexStatuses":[]
72 }),
73 })
74 testSeq = 0
75 filtSeq = dotdict({
76 "DecaysFinalStateFilter":dotdict({
77 "NChargedLeptons":True,
78 "NQuarks":2,
79 "PDGAllowedParents":[23]
80 }),
81 "Expression":"",
82 })
83
84
85 from . import dummy
86 sys.modules["Sherpa_i.Sherpa_iConf"] = dummy
87 sys.modules["Sherpa_i"] = dummy
88
89 sys.modules["GeneratorFilters.GeneratorFiltersConf"] = dummy
90 sys.modules["GeneratorFilters"] = dummy
91
92 exec(compile(open(options.mainJOfile,
"rb").
read(), options.mainJOfile,
'exec'), globals())
93
94 if genSeq.Sherpa_i.RunCard == "":
95 print ("ERROR: no runCard found in the JO-File")
96 sys.exit(11)
97
98
99 options.Sherpa_i = genSeq.Sherpa_i