ATLAS Offline Software
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 
7 from . import Herwig7Config as hw7Config
8 from . import Herwig7Control as hw7Control
9 from . import Herwig7Utils as hw7Utils
10 
11 
12 
16 class 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 
31  def local_pre_commands(self):
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 
48 saverun {} /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 
65  if not self.set_printout_commands:
66  self.default_commands += self.printout_commands()
67  if not self.set_physics_parameter_commands:
68  self.default_commands += self.physics_parameter_commands()
69  if not self.set_technical_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
83 set /Herwig/Shower/ShowerHandler:HardEmission POWHEG
84 """
vtune_athena.format
format
Definition: vtune_athena.py:14
Herwig7ConfigBuiltinME.Hw7ConfigBuiltinME.powheg_commands
def powheg_commands()
Definition: Herwig7ConfigBuiltinME.py:80
Herwig7ConfigBuiltinME.Hw7ConfigBuiltinME.__init__
def __init__(self, genSeq, runArgs, run_name="Herwig", beams="pp")
Definition: Herwig7ConfigBuiltinME.py:19
Herwig7ConfigBuiltinME.Hw7ConfigBuiltinME.beams
beams
provide variables initialized by the parent class
Definition: Herwig7ConfigBuiltinME.py:28
Herwig7ConfigBuiltinME.Hw7ConfigBuiltinME.local_pre_commands
def local_pre_commands(self)
Definition: Herwig7ConfigBuiltinME.py:31
Herwig7ConfigBuiltinME.Hw7ConfigBuiltinME.run
def run(self, shower_var=True)
High-level function for triggering the process setup and the event generation.
Definition: Herwig7ConfigBuiltinME.py:57
Herwig7ConfigBuiltinME.Hw7ConfigBuiltinME.local_post_commands
def local_post_commands(self)
Definition: Herwig7ConfigBuiltinME.py:41
Herwig7ConfigBuiltinME.Hw7ConfigBuiltinME
Configuration class for built-in / "old-style" matrix elements.
Definition: Herwig7ConfigBuiltinME.py:16