Skip to content

Commit eba8a54

Browse files
committed
Add fsrmode for codes that support it
1 parent 801b812 commit eba8a54

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

python/Generators/Pythia.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def write_run(self):
4747
else:
4848
self.add_option("PartonLevel:ISR", "off")
4949
self.add_option("PDF:lepton", "off")
50+
if self.procinfo.get("fsrmode"):
51+
self.add_option("PartonLevel:FSR", "on")
52+
else:
53+
self.add_option("PartonLevel:FSR", "off")
5054

5155
self.add_option("Main:numberOfEvents", self.procinfo.get("events"))
5256
self.run += "\n"

python/Generators/Sherpa.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ def write_run(self):
4444
self.add_run_option("PDF_LIBRARY", "PDFESherpa")
4545
else:
4646
self.add_run_option("PDF_LIBRARY", "None")
47+
if self.procinfo.get("fsrmode"):
48+
self.add_run_option("YFS_MODE", "FULL")
49+
else:
50+
self.add_run_option("YFS_MODE", "None")
4751
self.add_run_option("EVENTS", self.procinfo.get("events"))
4852
self.run += "\n\n"
4953
for p in self.procinfo.get_data_particles():
@@ -61,7 +65,7 @@ def write_run(self):
6165
self.add_run_option("EVENT_OUTPUT", eoutname)
6266

6367
elif self.procinfo.get("output_format") == "hepmc3":
64-
eoutname = "HepMC3_GenEvent[{0}.hepmc3g]".format(self.GeneratorDatacardBase)
68+
eoutname = "HepMC3_GenEvent[{0}.hepmc3]".format(self.GeneratorDatacardBase)
6569
self.add_run_option("EVENT_OUTPUT", eoutname)
6670
self.run += self.procDB.get_run_out()
6771
self.add_run_option("EVENT_GENERATION_MODE", self.procinfo.eventmode)

python/Process.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ def get_final_pdg_list(self):
8282
return list(self._finfo)
8383

8484
def get(self, name):
85-
return getattr(self, name)
85+
try:
86+
return getattr(self, name)
87+
except:
88+
return None
8689

8790
def get_args(self):
8891
return self._required_args
@@ -141,6 +144,7 @@ def __init__(self, settings):
141144
self.settings = settings
142145
self.model = settings.get_model()
143146
self.events = settings.get_event_number()
147+
print(self.events)
144148
self.output_format = settings.get_output_format()
145149
self.PythiaTune = settings.get_PythiaTune()
146150
self.ElectronPolarisation = settings.get_ElectronPolarisation()

0 commit comments

Comments
 (0)