ATLAS Offline Software
Loading...
Searching...
No Matches
Herwig7ConfigBuiltinME.py
Go to the documentation of this file.
1# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2
3
6
7from . import Herwig7Config as hw7Config
8from . import Herwig7Control as hw7Control
9from . import Herwig7Utils as hw7Utils
10
11
12
16class Hw7ConfigBuiltinME(hw7Config.Hw7Config):
17
18
19 def __init__(self, genSeq, runArgs, run_name="Herwig", beams="pp"):
20
21 beams = beams.upper()
22 if beams not in ["EE", "EP" , "PP"]:
23 raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'beams' must be one of the following: ['EE', 'EP' , 'PP']"))
24
25
26 super(Hw7ConfigBuiltinME, self).__init__(genSeq, runArgs, run_name)
27
28 self.beams = beams
29
30
32
33 return """
34## =================================================
35## Local Pre-Commands from Herwig7ConfigBuiltinME.py
36## =================================================
37
38# > no local pre-commands at the moment
39"""
40
42
43 return """
44## ==================================================
45## Local Post-Commands from Herwig7ConfigBuiltinME.py
46## ==================================================
47
48saverun {} /Herwig/Generators/EventGenerator
49""".format(self.run_name)
50
51
52
57 def run(self, shower_var=True):
58
59
60
61 self.default_commands += self.beam_commands()
62 self.default_commands += self.energy_commands()
63 self.default_commands += self.random_seed_commands()
64
66 self.default_commands += self.printout_commands()
68 self.default_commands += self.physics_parameter_commands()
70 self.default_commands += self.technical_parameter_commands()
71
72 # add the shower scale-variations for the ME calculation
73 self.enable_angularShowerScaleVariations(shower_var)
74
75
76
77 hw7Control.run(self)
78
79
81 return """
82## Set up Powheg truncated shower
83set /Herwig/Shower/ShowerHandler:HardEmission POWHEG
84"""
Configuration class for built-in / "old-style" matrix elements.
beams
provide variables initialized by the parent class
__init__(self, genSeq, runArgs, run_name="Herwig", beams="pp")
Definition run.py:1