ATLAS Offline Software
Loading...
Searching...
No Matches
Herwig7ConfigFxFx.Hw7ConfigFxFx Class Reference

Configuration class for showering FxFx-merged LHE files from MG5_aMC@NLO. More...

Inheritance diagram for Herwig7ConfigFxFx.Hw7ConfigFxFx:
Collaboration diagram for Herwig7ConfigFxFx.Hw7ConfigFxFx:

Public Member Functions

 __init__ (self, genSeq, runArgs, run_name="Herwig", beams="pp")
 local_pre_commands (self)
 local_post_commands (self)
 run (self)
 High-level function for triggering the process setup and the event generation.
 fxfx_commands (self, merging_scale, njets_max, lhe_filename="events.lhe", me_pdf_order="NLO", r_clus=1.0, eta_clus_max=15.0, usespin=True, automatic_process_detection=True, ihrd=None, ihvy=None)
 Sets up reading of events from an LHE file.

Public Attributes

 beams = beams
bool set_fxfx_commands = False
 run_name
 set_printout_commands
 set_physics_parameter_commands
 set_technical_parameter_commands

Detailed Description

Configuration class for showering FxFx-merged LHE files from MG5_aMC@NLO.

Warning
Only use this for testing/debugging purposes. This run mode is neither fully implemented nor validated or supported yet.

Definition at line 23 of file Herwig7ConfigFxFx.py.

Constructor & Destructor Documentation

◆ __init__()

Herwig7ConfigFxFx.Hw7ConfigFxFx.__init__ ( self,
genSeq,
runArgs,
run_name = "Herwig",
beams = "pp" )

Definition at line 26 of file Herwig7ConfigFxFx.py.

26 def __init__(self, genSeq, runArgs, run_name="Herwig", beams="pp"):
27
28 beams = beams.upper()
29 if beams not in ["EE", "EP" , "PP"]:
30 raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'beams' must be one of the following: ['EE', 'EP' , 'PP']"))
31
32 # provide variables initialized by the parent class
33 super(Hw7ConfigFxFx, self).__init__(genSeq, runArgs, run_name)
34
35 self.beams = beams
36
37 self.set_fxfx_commands = False
38
39

Member Function Documentation

◆ fxfx_commands()

Herwig7ConfigFxFx.Hw7ConfigFxFx.fxfx_commands ( self,
merging_scale,
njets_max,
lhe_filename = "events.lhe",
me_pdf_order = "NLO",
r_clus = 1.0,
eta_clus_max = 15.0,
usespin = True,
automatic_process_detection = True,
ihrd = None,
ihvy = None )

Sets up reading of events from an LHE file.

Todo
Settings which are not FxFx-specific should be identical to the LHEF showering of MG5_aMC@NLO events. This should probably be enforced in some way
Parameters
[in]merging_scaleMerging scale in units of GeV
[in]njets_maxNumber of (Born-level) light jets in maximum-multiplicity FxFx process
[in]me_pdf_orderOrder of the PDF set to be used
[in]r_clusJet radius used in clustering in the merging
[in]eta_clus_maxMax |eta| for jets in clustering in the merging (should match the range used for jets in the hard process generation, which should normally be unrestricted
[in]usespinUse the spin of tau leptons from the LHE file (spins of other particles are ignored anyways)
Todo
Remove ihrd and ihvy parameters beginning with Herwig 7.1.0 since the hard process will be deduced automatically

Definition at line 108 of file Herwig7ConfigFxFx.py.

118 ihvy = None):
119
120 if me_pdf_order not in ["LO", "NLO"]:
121 raise RuntimeError(hw7Utils.ansi_format_error("Herwig7ConfigLHEF.py:__lhef_commands: Parameter 'me_pdf_order' must either be 'LO' or 'NLO'!"))
122
123 self.set_fxfx_commands = True
124
125 process_selection = ""
126 if not automatic_process_detection:
127 process_selection = """
128## The ihrd and ihvy parameters are Alpgen parameters to identify the hard process
129set /Herwig/Shower/FxFxShowerHandler:ihrd {}
130set /Herwig/Shower/FxFxShowerHandler:ihvy {}
131""".format(ihrd, ihvy)
132
133 self.commands += """
134## ----------------------------
135## Read in Events from LHE File
136## ----------------------------
137
138#library LesHouches.so
139#create ThePEG::LesHouchesFileReader /Herwig/EventHandlers/LHEReader
140
141
142## Create the Handler and Reader
143library FxFx.so
144create Herwig::FxFxEventHandler /Herwig/EventHandlers/FxFxLHEHandler
145create Herwig::FxFxFileReader /Herwig/EventHandlers/FxFxLHEReader
146
147library FxFxHandler.so
148create Herwig::FxFxHandler /Herwig/Shower/FxFxShowerHandler
149set /Herwig/Shower/FxFxShowerHandler:ShowerModel /Herwig/Shower/ShowerModel
150set /Herwig/Shower/FxFxShowerHandler:SplittingGenerator /Herwig/Shower/SplittingGenerator
151
152
153## Set up the LHE reader
154set /Herwig/EventHandlers/FxFxLHEReader:WeightWarnings false
155set /Herwig/EventHandlers/FxFxLHEReader:FileName {FileName}
156set /Herwig/EventHandlers/FxFxLHEReader:MomentumTreatment RescaleEnergy
157# set /Herwig/EventHandlers/FxFxLHEReader:IgnoreIDPRUP Yes
158
159# Don't use any cuts on LHE files
160create ThePEG::Cuts /Herwig/Cuts/NoCuts
161set /Herwig/EventHandlers/FxFxLHEReader:Cuts /Herwig/Cuts/NoCuts
162
163
164
165insert /Herwig/EventHandlers/FxFxLHEHandler:FxFxReaders 0 /Herwig/EventHandlers/FxFxLHEReader
166set /Herwig/EventHandlers/FxFxLHEHandler:PartonExtractor /Herwig/Partons/PPExtractor
167set /Herwig/EventHandlers/FxFxLHEHandler:CascadeHandler /Herwig/Shower/FxFxShowerHandler
168set /Herwig/EventHandlers/FxFxLHEHandler:HadronizationHandler /Herwig/Hadronization/ClusterHadHandler
169set /Herwig/EventHandlers/FxFxLHEHandler:DecayHandler /Herwig/Decays/DecayHandler
170
171set /Herwig/EventHandlers/FxFxLHEHandler:WeightOption VarNegWeight
172
173
174## MC@NLO settings
175
176#set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption General
177#set /Herwig/Shower/KinematicsReconstructor:InitialInitialBoostOption LongTransBoost
178#set /Herwig/Shower/KinematicsReconstructor:FinalStateReconOption Default
179#set /Herwig/Shower/KinematicsReconstructor:InitialStateReconOption Rapidity
180set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes
181set /Herwig/Shower/ShowerHandler:RestrictPhasespace Yes
182#set /Herwig/Shower/ShowerHandler:ReconstructionOption OffShell4
183
184set /Herwig/Shower/PartnerFinder:PartnerMethod Random
185set /Herwig/Shower/PartnerFinder:ScaleChoice Partner
186set /Herwig/Shower/ShowerHandler:SpinCorrelations No
187
188set /Herwig/Shower/ShowerHandler:MaxTry 100
189
190
191## Set up the FxFxShowerHandler
192
193set /Herwig/Shower/FxFxShowerHandler:MPIHandler /Herwig/UnderlyingEvent/MPIHandler
194set /Herwig/Shower/FxFxShowerHandler:RemDecayer /Herwig/Partons/RemnantDecayer
195set /Herwig/Shower/FxFxShowerHandler:ShowerAlpha /Herwig/Shower/AlphaQCD
196
197## Use the automatic process detection
198set /Herwig/Shower/FxFxShowerHandler:HardProcessDetection {AutomaticProcessDetection}{ProcessSelection}
199
200# Number of (Born-level) light jets in maximum-multiplicity FxFx process
201set /Herwig/Shower/FxFxShowerHandler:njetsmax {NjetsMax} # Make sure this is set correctly!
202
203# Mimimum parton-parton R-sep used for generation.
204# (legacy from MLM merging, should stay fixed to zero in FxFx as this is NLO)
205set /Herwig/Shower/FxFxShowerHandler:drjmin 0.0
206
207## Recommended key MLM merging parameters below
208
209# turn the Vetoing On or Off completely
210set /Herwig/Shower/FxFxShowerHandler:VetoIsTurnedOff VetoingIsOn
211# merging scale
212set /Herwig/Shower/FxFxShowerHandler:ETClus {MergingScale}*GeV
213# jet radius used in clustering in merging.
214set /Herwig/Shower/FxFxShowerHandler:RClus {RClus}
215# factor to multiply RClus (if DR(parton,jet)<rclusfactor*rclus
216# the parton and jet are said to have been matched)
217set /Herwig/Shower/FxFxShowerHandler:RClusFactor 1.0
218# Max |eta| for jets in clustering in merging.
219set /Herwig/Shower/FxFxShowerHandler:EtaClusMax {EtaClusMax}
220
221## Setup event handlers
222set /Herwig/Generators/EventGenerator:EventHandler /Herwig/EventHandlers/FxFxLHEHandler
223
224
225## UNSURE ABOUT THESE ---------------------------------------------------------
226
227# set /Herwig/EventHandlers/FxFxLHEReader:IncludeSpin {IncludeSpin}
228# set /Herwig/EventHandlers/FxFxLHEReader:AllowedToReOpen No
229
230## Set the PDF for the LHE reader.
231set /Herwig/EventHandlers/FxFxLHEReader:PDFA /Herwig/Partons/Hard{MEPDFOrder}PDF
232set /Herwig/EventHandlers/FxFxLHEReader:PDFB /Herwig/Partons/Hard{MEPDFOrder}PDF
233# The PDF for beam particles A/B - overrides particle's own PDF above
234set /Herwig/Shower/FxFxShowerHandler:PDFA /Herwig/Partons/Hard{MEPDFOrder}PDF
235set /Herwig/Shower/FxFxShowerHandler:PDFB /Herwig/Partons/Hard{MEPDFOrder}PDF
236""".format(MergingScale = merging_scale,
237 NjetsMax = njets_max,
238 FileName = lhe_filename,
239 MEPDFOrder = me_pdf_order,
240 RClus = r_clus,
241 EtaClusMax = eta_clus_max,
242 IncludeSpin = "Yes" if usespin is True else "No",
243 AutomaticProcessDetection = "Automatic" if automatic_process_detection else "Manual",
244 ProcessSelection = process_selection)

◆ local_post_commands()

Herwig7ConfigFxFx.Hw7ConfigFxFx.local_post_commands ( self)

Definition at line 51 of file Herwig7ConfigFxFx.py.

51 def local_post_commands(self):
52
53 return """
54## =============================================
55## Local Post-Commands from Herwig7ConfigFxFx.py
56## =============================================
57
58saverun {} /Herwig/Generators/EventGenerator
59""".format(self.run_name)
60
61
62

◆ local_pre_commands()

Herwig7ConfigFxFx.Hw7ConfigFxFx.local_pre_commands ( self)

Definition at line 40 of file Herwig7ConfigFxFx.py.

40 def local_pre_commands(self):
41
42 return """
43## ============================================
44## Local Pre-Commands from Herwig7ConfigFxFx.py
45## ============================================
46
47# > no local pre-commands at the moment
48"""
49
50

◆ run()

Herwig7ConfigFxFx.Hw7ConfigFxFx.run ( self)

High-level function for triggering the process setup and the event generation.

Warning
Please do not modify the generator configuration in the job options after calling the run() function as the modified settings would not be applied in the event generation

Definition at line 68 of file Herwig7ConfigFxFx.py.

68 def run(self):
69
70 # add default settings if they were not overwritten in the JobOptions
71
72 self.default_commands += self.beam_commands()
73 self.default_commands += self.random_seed_commands()
74
75 if not self.set_printout_commands:
76 self.default_commands += self.printout_commands()
77 if not self.set_physics_parameter_commands:
78 self.default_commands += self.physics_parameter_commands()
79 if not self.set_technical_parameter_commands:
80 self.default_commands += self.technical_parameter_commands()
81
82 # check for configuration errors
83
84 if not self.set_fxfx_commands:
85 raise RuntimeError(hw7Utils.ansi_format_error("Please use 'fxfx_commands()' in the JobOptions!"))
86
87 # exit with error message since this run mode is not yet to be used
88 # raise RuntimeError(hw7Utils.ansi_format_error("Please don't run FxFx event generation as the interface for the FxFx run mode is neither fully implemented nor validated or supported yet"))
89
90 # do read and run step in one go
91 hw7Control.run(self)
92
93
Definition run.py:1

Member Data Documentation

◆ beams

Herwig7ConfigFxFx.Hw7ConfigFxFx.beams = beams

Definition at line 35 of file Herwig7ConfigFxFx.py.

◆ run_name

Herwig7ConfigFxFx.Hw7ConfigFxFx.run_name

Definition at line 59 of file Herwig7ConfigFxFx.py.

◆ set_fxfx_commands

bool Herwig7ConfigFxFx.Hw7ConfigFxFx.set_fxfx_commands = False

Definition at line 37 of file Herwig7ConfigFxFx.py.

◆ set_physics_parameter_commands

Herwig7ConfigFxFx.Hw7ConfigFxFx.set_physics_parameter_commands

Definition at line 77 of file Herwig7ConfigFxFx.py.

◆ set_printout_commands

Herwig7ConfigFxFx.Hw7ConfigFxFx.set_printout_commands

Definition at line 75 of file Herwig7ConfigFxFx.py.

◆ set_technical_parameter_commands

Herwig7ConfigFxFx.Hw7ConfigFxFx.set_technical_parameter_commands

Definition at line 79 of file Herwig7ConfigFxFx.py.


The documentation for this class was generated from the following file: