ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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

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...
 

Public Attributes

 beams
 
 set_fxfx_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__()

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"):
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()

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_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.

108  def fxfx_commands(self,
109  merging_scale,
110  njets_max,
111  lhe_filename = "events.lhe",
112  me_pdf_order = "NLO",
113  r_clus = 1.0,
114  eta_clus_max = 15.0,
115  usespin = True,
116  automatic_process_detection = True,
117  ihrd = None,
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
129 set /Herwig/Shower/FxFxShowerHandler:ihrd {}
130 set /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
143 library FxFx.so
144 create Herwig::FxFxEventHandler /Herwig/EventHandlers/FxFxLHEHandler
145 create Herwig::FxFxFileReader /Herwig/EventHandlers/FxFxLHEReader
146 
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
151 
152 
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
158 
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
162 
163 
164 
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
170 
171 set /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
180 set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes
181 set /Herwig/Shower/ShowerHandler:RestrictPhasespace Yes
182 #set /Herwig/Shower/ShowerHandler:ReconstructionOption OffShell4
183 
184 set /Herwig/Shower/PartnerFinder:PartnerMethod Random
185 set /Herwig/Shower/PartnerFinder:ScaleChoice Partner
186 set /Herwig/Shower/ShowerHandler:SpinCorrelations No
187 
188 set /Herwig/Shower/ShowerHandler:MaxTry 100
189 
190 
191 ## Set up the FxFxShowerHandler
192 
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
196 
197 ## Use the automatic process detection
198 set /Herwig/Shower/FxFxShowerHandler:HardProcessDetection {AutomaticProcessDetection}{ProcessSelection}
199 
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!
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)
205 set /Herwig/Shower/FxFxShowerHandler:drjmin 0.0
206 
207 ## Recommended key MLM merging parameters below
208 
209 # turn the Vetoing On or Off completely
210 set /Herwig/Shower/FxFxShowerHandler:VetoIsTurnedOff VetoingIsOn
211 # merging scale
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}
220 
221 ## Setup event handlers
222 set /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.
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,
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()

def 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 
58 saverun {} /Herwig/Generators/EventGenerator
59 """.format(self.run_name)
60 
61 
62 

◆ local_pre_commands()

def 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()

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.

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 

Member Data Documentation

◆ beams

Herwig7ConfigFxFx.Hw7ConfigFxFx.beams

Definition at line 35 of file Herwig7ConfigFxFx.py.

◆ set_fxfx_commands

Herwig7ConfigFxFx.Hw7ConfigFxFx.set_fxfx_commands

Definition at line 37 of file Herwig7ConfigFxFx.py.


The documentation for this class was generated from the following file:
vtune_athena.format
format
Definition: vtune_athena.py:14
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18