Configuration class for showering FxFx-merged LHE files from MG5_aMC@NLO.
More...
|
def | __init__ (self, genSeq, runArgs, run_name="Herwig", beams="pp") |
|
def | local_pre_commands (self) |
|
def | local_post_commands (self) |
|
def | run (self) |
| High-level function for triggering the process setup and the event generation. More...
|
|
def | 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. More...
|
|
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.
◆ __init__()
def 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"):
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']"))
33 super(Hw7ConfigFxFx, self).
__init__(genSeq, runArgs, run_name)
37 self.set_fxfx_commands =
False
◆ fxfx_commands()
def 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_scale | Merging scale in units of GeV |
[in] | njets_max | Number of (Born-level) light jets in maximum-multiplicity FxFx process |
[in] | me_pdf_order | Order of the PDF set to be used |
[in] | r_clus | Jet radius used in clustering in the merging |
[in] | eta_clus_max | Max |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] | usespin | Use 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.
108 def fxfx_commands(self,
111 lhe_filename = "events.lhe",
112 me_pdf_order = "NLO",
116 automatic_process_detection = True,
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'!"))
123 self.set_fxfx_commands =
True
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
129 set /Herwig/Shower/FxFxShowerHandler:ihrd {}
130 set /Herwig/Shower/FxFxShowerHandler:ihvy {}
134 ## ----------------------------
135 ## Read in Events from LHE File
136 ## ----------------------------
138 #library LesHouches.so
139 #create ThePEG::LesHouchesFileReader /Herwig/EventHandlers/LHEReader
142 ## Create the Handler and Reader
144 create Herwig::FxFxEventHandler /Herwig/EventHandlers/FxFxLHEHandler
145 create Herwig::FxFxFileReader /Herwig/EventHandlers/FxFxLHEReader
147 library FxFxHandler.so
148 create Herwig::FxFxHandler /Herwig/Shower/FxFxShowerHandler
149 set /Herwig/Shower/FxFxShowerHandler:ShowerModel /Herwig/Shower/ShowerModel
150 set /Herwig/Shower/FxFxShowerHandler:SplittingGenerator /Herwig/Shower/SplittingGenerator
153 ## Set up the LHE reader
154 set /Herwig/EventHandlers/FxFxLHEReader:WeightWarnings false
155 set /Herwig/EventHandlers/FxFxLHEReader:FileName {FileName}
156 set /Herwig/EventHandlers/FxFxLHEReader:MomentumTreatment RescaleEnergy
157 # set /Herwig/EventHandlers/FxFxLHEReader:IgnoreIDPRUP Yes
159 # Don't use any cuts on LHE files
160 create ThePEG::Cuts /Herwig/Cuts/NoCuts
161 set /Herwig/EventHandlers/FxFxLHEReader:Cuts /Herwig/Cuts/NoCuts
165 insert /Herwig/EventHandlers/FxFxLHEHandler:FxFxReaders 0 /Herwig/EventHandlers/FxFxLHEReader
166 set /Herwig/EventHandlers/FxFxLHEHandler:PartonExtractor /Herwig/Partons/PPExtractor
167 set /Herwig/EventHandlers/FxFxLHEHandler:CascadeHandler /Herwig/Shower/FxFxShowerHandler
168 set /Herwig/EventHandlers/FxFxLHEHandler:HadronizationHandler /Herwig/Hadronization/ClusterHadHandler
169 set /Herwig/EventHandlers/FxFxLHEHandler:DecayHandler /Herwig/Decays/DecayHandler
171 set /Herwig/EventHandlers/FxFxLHEHandler:WeightOption VarNegWeight
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
180 set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes
181 set /Herwig/Shower/ShowerHandler:RestrictPhasespace Yes
182 #set /Herwig/Shower/ShowerHandler:ReconstructionOption OffShell4
184 set /Herwig/Shower/PartnerFinder:PartnerMethod Random
185 set /Herwig/Shower/PartnerFinder:ScaleChoice Partner
186 set /Herwig/Shower/ShowerHandler:SpinCorrelations No
188 set /Herwig/Shower/ShowerHandler:MaxTry 100
191 ## Set up the FxFxShowerHandler
193 set /Herwig/Shower/FxFxShowerHandler:MPIHandler /Herwig/UnderlyingEvent/MPIHandler
194 set /Herwig/Shower/FxFxShowerHandler:RemDecayer /Herwig/Partons/RemnantDecayer
195 set /Herwig/Shower/FxFxShowerHandler:ShowerAlpha /Herwig/Shower/AlphaQCD
197 ## Use the automatic process detection
198 set /Herwig/Shower/FxFxShowerHandler:HardProcessDetection {AutomaticProcessDetection}{ProcessSelection}
200 # Number of (Born-level) light jets in maximum-multiplicity FxFx process
201 set /Herwig/Shower/FxFxShowerHandler:njetsmax {NjetsMax} # Make sure this is set correctly!
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)
205 set /Herwig/Shower/FxFxShowerHandler:drjmin 0.0
207 ## Recommended key MLM merging parameters below
209 # turn the Vetoing On or Off completely
210 set /Herwig/Shower/FxFxShowerHandler:VetoIsTurnedOff VetoingIsOn
212 set /Herwig/Shower/FxFxShowerHandler:ETClus {MergingScale}*GeV
213 # jet radius used in clustering in merging.
214 set /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)
217 set /Herwig/Shower/FxFxShowerHandler:RClusFactor 1.0
218 # Max |eta| for jets in clustering in merging.
219 set /Herwig/Shower/FxFxShowerHandler:EtaClusMax {EtaClusMax}
221 ## Setup event handlers
222 set /Herwig/Generators/EventGenerator:EventHandler /Herwig/EventHandlers/FxFxLHEHandler
225 ## UNSURE ABOUT THESE ---------------------------------------------------------
227 # set /Herwig/EventHandlers/FxFxLHEReader:IncludeSpin {IncludeSpin}
228 # set /Herwig/EventHandlers/FxFxLHEReader:AllowedToReOpen No
230 ## Set the PDF for the LHE reader.
231 set /Herwig/EventHandlers/FxFxLHEReader:PDFA /Herwig/Partons/Hard{MEPDFOrder}PDF
232 set /Herwig/EventHandlers/FxFxLHEReader:PDFB /Herwig/Partons/Hard{MEPDFOrder}PDF
233 # The PDF for beam particles A/B - overrides particle's own PDF above
234 set /Herwig/Shower/FxFxShowerHandler:PDFA /Herwig/Partons/Hard{MEPDFOrder}PDF
235 set /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,
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()
def Herwig7ConfigFxFx.Hw7ConfigFxFx.local_post_commands |
( |
|
self | ) |
|
Definition at line 51 of file Herwig7ConfigFxFx.py.
51 def local_post_commands(self):
54 ## =============================================
55 ## Local Post-Commands from Herwig7ConfigFxFx.py
56 ## =============================================
58 saverun {} /Herwig/Generators/EventGenerator
◆ local_pre_commands()
def Herwig7ConfigFxFx.Hw7ConfigFxFx.local_pre_commands |
( |
|
self | ) |
|
Definition at line 40 of file Herwig7ConfigFxFx.py.
40 def local_pre_commands(self):
43 ## ============================================
44 ## Local Pre-Commands from Herwig7ConfigFxFx.py
45 ## ============================================
47 # > no local pre-commands at the moment
◆ run()
def 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.
72 self.default_commands += self.beam_commands()
73 self.default_commands += self.random_seed_commands()
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()
84 if not self.set_fxfx_commands:
85 raise RuntimeError(hw7Utils.ansi_format_error(
"Please use 'fxfx_commands()' in the JobOptions!"))
◆ beams
Herwig7ConfigFxFx.Hw7ConfigFxFx.beams |
◆ set_fxfx_commands
Herwig7ConfigFxFx.Hw7ConfigFxFx.set_fxfx_commands |
The documentation for this class was generated from the following file: