ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
Herwig7Config.Hw7Config Class Reference

Configuration base class for Herwig7. More...

Inheritance diagram for Herwig7Config.Hw7Config:
Collaboration diagram for Herwig7Config.Hw7Config:

Public Member Functions

def __init__ (self, genSeq, runArgs, run_name="Herwig")
 Constructor. More...
 
def global_pre_commands (self)
 Commands applied to all configuration classes before commands from the JobOptions. More...
 
def add_commands (self, commands)
 Add direct Herwig7 repository commands as they wo. More...
 
def random_seed_commands (self)
 Sets the seed for the random number generator. More...
 
def beam_commands (self)
 Commands specific to certain beam / collision types. More...
 
def energy_commands (self)
 Sets center-of-mass energy sqrts(s) in GeV. More...
 
def printout_commands (self)
 Sets printout verbosity and error tolerance. More...
 
def physics_parameter_commands (self)
 
def technical_parameter_commands (self)
 
def me_alphas_commands (self, order="NLO", scale=91.1876, value=0.118)
 Commands for setting the strong coupling \(\alpha_s\) in the hard process. More...
 
def me_pdf_commands (self, order="NLO", name="MMHT2014nlo68cl", member=0, max_flav=5)
 Commands for setting the PDF in the hard process. More...
 
def shower_pdf_commands (self, order="LO", name="MMHT2014lo68cl", member=0, max_flav=5)
 Commands for setting the PDF in the parton showers. More...
 
def mpi_pdf_commands (self, name="MMHT2014lo68cl", member=0, max_flav=5)
 Commands for setting the PDF in the underlying event (UE) More...
 
def remnant_pdf_commands (self, name="MMHT2014lo68cl", member=0, max_flav=5)
 Commands for setting the remnant PDF. More...
 
def tune_commands (self, ps_tune_name="H7-PS-MMHT2014LO", ue_tune_name="H7.2-Default")
 Commands for setting PS/hadronization and UE/MPI tune simultaneously. More...
 
def ps_tune_commands (self, tune_name="H7-PS-MMHT2014LO")
 Commands for only setting the PS/hadronization tune. More...
 
def load_PS_tune (self, tune_name)
 
def ue_tune_commands (self, tune_name="H7.2-Default")
 Commands for only setting the UE/MPI tune. More...
 
def load_ue_tune (self, tune_name)
 
def get_dpdf_path (self)
 
def pdf_pomeron_cmds (self, flux, pdf)
 Set pomeron structure function. More...
 
def pdf_gammagamma_cmds (self)
 Initialize Budnev Photon flux for two-photon exclusive exchange. More...
 
def set_tune_scheme (self, tune_scheme="DotProduct")
 
def enable_angularShowerScaleVariations (self, do_variations=False)
 

Public Attributes

 genSeq
 
 runArgs
 
 run_name
 
 me_pdf_name
 
 mpi_pdf_name
 
 set_printout_commands
 
 set_physics_parameter_commands
 
 set_technical_parameter_commands
 
 use_PDGparams
 
 default_commands
 
 commands
 
 beams
 
 physics_parameter_commands
 Load the dictionary and extract the values of the variables that were defined here before (top quark, W and Z boson) More...
 

Detailed Description

Configuration base class for Herwig7.

Definition at line 16 of file Herwig7Config.py.

Constructor & Destructor Documentation

◆ __init__()

def Herwig7Config.Hw7Config.__init__ (   self,
  genSeq,
  runArgs,
  run_name = "Herwig" 
)

Constructor.

Definition at line 19 of file Herwig7Config.py.

19  def __init__(self, genSeq, runArgs, run_name="Herwig"):
20 
21  # Force Herwig7 to run in single-core mode
23 
24  self.genSeq = genSeq
25  self.runArgs = runArgs
26 
27  self.run_name = run_name
28  # self.seed = runArgs.randomSeed
29  # self.energy = runArgs.ecmEnergy
30 
31  self.me_pdf_name = "MMHT2014lo68cl"
32  self.mpi_pdf_name = "MMHT2014lo68cl"
33 
34  self.set_printout_commands = False
35  self.set_physics_parameter_commands = False
36  self.set_technical_parameter_commands = False
37  self.use_PDGparams = False
38 
39  self.default_commands = hw7Utils.ConfigurationCommands()
40  self.commands = hw7Utils.ConfigurationCommands()
41 

Member Function Documentation

◆ add_commands()

def Herwig7Config.Hw7Config.add_commands (   self,
  commands 
)

Add direct Herwig7 repository commands as they wo.

Definition at line 57 of file Herwig7Config.py.

57  def add_commands(self, commands):
58 
59  self.commands += commands
60 
61 

◆ beam_commands()

def Herwig7Config.Hw7Config.beam_commands (   self)

Commands specific to certain beam / collision types.

Definition at line 71 of file Herwig7Config.py.

71  def beam_commands(self):
72 
73  if self.beams == "EE":
74  return("""
75 ## Commands for lepton-lepton collisions
76 read snippets/EECollider.in
77 set /Herwig/Shower/PartnerFinder:QEDPartner IIandFF
78 set /Herwig/Shower/ShowerHandler:MPIHandler NULL
79 set /Herwig/DipoleShower/DipoleShowerHandler:MPIHandler NULL
80 set /Herwig/Shower/PowhegShowerHandler:MPIHandler NULL
81 """)
82  elif self.beams == "EP":
83  return("""
84 ## Commands for proton-lepton collisions
85 read snippets/EPCollider.in
86 do /Herwig/Shower/SplittingGenerator:DeleteFinalSplitting e-->e-,gamma; /Herwig/Shower/LtoLGammaSudakov
87 do /Herwig/Shower/SplittingGenerator:DeleteFinalSplitting mu-->mu-,gamma; /Herwig/Shower/LtoLGammaSudakov
88 do /Herwig/Shower/SplittingGenerator:DeleteFinalSplitting tau-->tau-,gamma; /Herwig/Shower/LtoLGammaSudakov
89 set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption Colour
90 """)
91  else:
92  return("""
93 ## Commands for proton-proton collisions
94 read snippets/PPCollider.in
95 """)
96 

◆ enable_angularShowerScaleVariations()

def Herwig7Config.Hw7Config.enable_angularShowerScaleVariations (   self,
  do_variations = False 
)

Definition at line 482 of file Herwig7Config.py.

482  def enable_angularShowerScaleVariations(self, do_variations=False):
483  if do_variations:
484  self.commands += """\
485 \n## -----------------------
486 ## Shower scale variation
487 ## -----------------------
488 cd /Herwig/Shower
489 do ShowerHandler:AddVariation MUR2_MUF2_SHOWER_HARD 2 2 Hard
490 do ShowerHandler:AddVariation MUR2_MUF1_SHOWER_HARD 2 1 Hard
491 do ShowerHandler:AddVariation MUR1_MUF2_SHOWER_HARD 1 2 Hard
492 do ShowerHandler:AddVariation MUR1_MUF0.5_SHOWER_HARD 1 0.5 Hard
493 do ShowerHandler:AddVariation MUR0.5_MUF1_SHOWER_HARD 0.5 1 Hard
494 do ShowerHandler:AddVariation MUR0.5_MUF0.5_SHOWER_HARD 0.5 0.5 Hard
495 do ShowerHandler:AddVariation MUR2_MUF2_SHOWER_SEC 2 2 Secondary
496 do ShowerHandler:AddVariation MUR2_MUF1_SHOWER_SEC 2 1 Secondary
497 do ShowerHandler:AddVariation MUR1_MUF2_SHOWER_SEC 1 2 Secondary
498 do ShowerHandler:AddVariation MUR1_MUF0.5_SHOWER_SEC 1 0.5 Secondary
499 do ShowerHandler:AddVariation MUR0.5_MUF1_SHOWER_SEC 0.5 1 Secondary
500 do ShowerHandler:AddVariation MUR0.5_MUF0.5_SHOWER_SEC 0.5 0.5 Secondary
501 set SplittingGenerator:Detuning 2.0
502 """

◆ energy_commands()

def Herwig7Config.Hw7Config.energy_commands (   self)

Sets center-of-mass energy sqrts(s) in GeV.

  • 2016/10/07 Daniel Rauch (danie.nosp@m.l.ra.nosp@m.uch@d.nosp@m.esy..nosp@m.de)

    The extrapolation of the intrinsic pT /Herwig/Shower/Evolver:IntrinsicPtGaussian depending on sqrt(s) according to the formula

    \[ p_{T, intrinsic}^{default} = 1.85 \text{GeV} + \sqrt{s}*(0.1/4000.0) \]

    was removed after discussion with the authors since the intrinsic pT is tuned and the extrapolated value disagreed with the tuned value.

Definition at line 108 of file Herwig7Config.py.

108  def energy_commands(self):
109 
110  return("""
111 ## Center-of-mass energy
112 set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy {}
113 """.format(self.runArgs.ecmEnergy))
114 
115 

◆ get_dpdf_path()

def Herwig7Config.Hw7Config.get_dpdf_path (   self)

Definition at line 392 of file Herwig7Config.py.

392  def get_dpdf_path(self):
393  import os
394  cmt_path = os.environ.get("CMAKE_PREFIX_PATH")
395  cmt_dir = os.environ.get("BINARY_TAG")
396 
397  cmtPaths = cmt_path.split(':')
398 
399  for path in cmtPaths:
400  pathNow = path + "/InstallArea/" + cmt_dir + "/share/"
401  try:
402  fileList = os.listdir(pathNow)
403  except Exception:
404  fileList = []
405  if "HerwigDefaults.rpo" in fileList:
406  simSharePath = pathNow
407 
408  dpdf_path = os.path.dirname(os.path.normpath(os.path.join(simSharePath, os.readlink(simSharePath + 'HerwigDefaults.rpo')))) + "/PDF/diffraction/"
409 
410  return dpdf_path
411 
412 

◆ global_pre_commands()

def Herwig7Config.Hw7Config.global_pre_commands (   self)

Commands applied to all configuration classes before commands from the JobOptions.

Todo:
Remove AngularOrdered settungs once they are included in Herwig7 by default

Definition at line 44 of file Herwig7Config.py.

44  def global_pre_commands(self):
45  return """
46 ## =========================================
47 ## Global Pre-Commands from Herwig7Config.py
48 ## =========================================
49 
50 ## ensure JetFinder uses AntiKt with R=0.4
51 set /Herwig/Cuts/JetFinder:Variant AntiKt
52 set /Herwig/Cuts/JetFinder:ConeRadius 0.4
53 """
54 
55 

◆ load_PS_tune()

def Herwig7Config.Hw7Config.load_PS_tune (   self,
  tune_name 
)

Definition at line 355 of file Herwig7Config.py.

355  def load_PS_tune(self, tune_name):
356 
357  return """
358 ## some commands
359 """
360 
361 

◆ load_ue_tune()

def Herwig7Config.Hw7Config.load_ue_tune (   self,
  tune_name 
)

Definition at line 385 of file Herwig7Config.py.

385  def load_ue_tune(self, tune_name):
386 
387  return """
388 ## some commands
389 """
390 
391 

◆ me_alphas_commands()

def Herwig7Config.Hw7Config.me_alphas_commands (   self,
  order = "NLO",
  scale = 91.1876,
  value = 0.118 
)

Commands for setting the strong coupling \(\alpha_s\) in the hard process.

By default Herwig7 uses the world average value \(\alpha_s(M_Z=91.188~\mbox{GeV})=0.118\).

Parameters
[in]orderOrder of the evolution of the strong coupling
  • LO: 1-loop running
  • NLO: 2-loop running
[in]scaleScale at which the value of the strong coupling is specified
[in]valueValue of the strong coupling at the given scale

Definition at line 214 of file Herwig7Config.py.

214  def me_alphas_commands(self, order="NLO", scale=91.1876, value=0.118):
215 
216  if order not in ["LO", "NLO"]:
217  raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'order' must either be 'LO' or 'NLO'!"))
218 
219  self.commands += """
220 ## Configure {0} AlphaS for the hard process
221 ## (LO: 1-loop-running / NLO: 2-loop running)
222 set /Herwig/Couplings/{0}AlphaS:input_scale {1}
223 set /Herwig/Couplings/{0}AlphaS:input_alpha_s {2}
224 set /Herwig/Model:QCD/RunningAlphaS /Herwig/Couplings/{0}AlphaS
225 """.format(order, scale, value)
226 
227 

◆ me_pdf_commands()

def Herwig7Config.Hw7Config.me_pdf_commands (   self,
  order = "NLO",
  name = "MMHT2014nlo68cl",
  member = 0,
  max_flav = 5 
)

Commands for setting the PDF in the hard process.

Parameters
[in]orderperturbative order of the PDF set
[in]namename of the PDF set
[in]memberindex of the PDF member
[in]max_flavnumber of massless quark flavours

Definition at line 234 of file Herwig7Config.py.

234  def me_pdf_commands(self, order="NLO", name="MMHT2014nlo68cl", member=0, max_flav=5):
235 
236  if order not in ["LO", "NLO"]:
237  raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'order' must either be 'LO' or 'NLO'!"))
238 
239  self.me_pdf_name = name
240 
241  self.commands += """
242 ## Configure {0} PDF set for the hard process
243 set /Herwig/Partons/Hard{0}PDF:PDFName {1}
244 set /Herwig/Partons/Hard{0}PDF:Member {2}
245 set /Herwig/Partons/Hard{0}PDF:MaxFlav {3}
246 set /Herwig/Partons/Hard{0}PDF:RemnantHandler /Herwig/Partons/HadronRemnants
247 set /Herwig/Particles/p+:PDF /Herwig/Partons/Hard{0}PDF
248 set /Herwig/Particles/pbar-:PDF /Herwig/Partons/Hard{0}PDF
249 set /Herwig/Partons/PPExtractor:FirstPDF /Herwig/Partons/Hard{0}PDF
250 set /Herwig/Partons/PPExtractor:SecondPDF /Herwig/Partons/Hard{0}PDF
251 """.format(order, name, member, max_flav)
252 
253 

◆ mpi_pdf_commands()

def Herwig7Config.Hw7Config.mpi_pdf_commands (   self,
  name = "MMHT2014lo68cl",
  member = 0,
  max_flav = 5 
)

Commands for setting the PDF in the underlying event (UE)

Parameters
[in]namename of the PDF set
[in]memberindex of the PDF member
[in]max_flavnumber of massless quark flavours

Definition at line 287 of file Herwig7Config.py.

287  def mpi_pdf_commands(self, name="MMHT2014lo68cl", member=0, max_flav=5):
288 
289  self.mpi_pdf_name = name
290 
291  self.commands += """
292 ## Configure MPI PDF
293 set /Herwig/Partons/MPIPDF:PDFName {}
294 set /Herwig/Partons/MPIPDF:Member {}
295 set /Herwig/Partons/MPIPDF:MaxFlav {}
296 """.format(name, member, max_flav)
297 
298 

◆ pdf_gammagamma_cmds()

def Herwig7Config.Hw7Config.pdf_gammagamma_cmds (   self)

Initialize Budnev Photon flux for two-photon exclusive exchange.

From Pavel Ruzicka.

Definition at line 443 of file Herwig7Config.py.

443  def pdf_gammagamma_cmds(self):
444 
445  return """
446 
447 # Technical parameters for this run
448 set /Herwig/Generators/EventGenerator:EventHandler:Sampler:Ntry 100000
449 
450 # Choice of phase-space generation for PDFs
451 set /Herwig/Partons/PPExtractor:FlatSHatY 0
452 
453 # Change the proton PDFs to those for photon radiation
454 set /Herwig/Particles/p+:PDF /Herwig/Partons/BudnevPDF
455 set /Herwig/Particles/pbar-:PDF /Herwig/Partons/BudnevPDF
456 
457 # MPI doesn't work
458 # TODO: Is this a problem?
459 set /Herwig/Generators/EventGenerator:EventHandler:CascadeHandler:MPIHandler NULL
460 
461 """
462 

◆ pdf_pomeron_cmds()

def Herwig7Config.Hw7Config.pdf_pomeron_cmds (   self,
  flux,
  pdf 
)

Set pomeron structure function.

Definition at line 414 of file Herwig7Config.py.

414  def pdf_pomeron_cmds(self, flux, pdf):
415 
416  dpdf_path = self.get_dpdf_path()
417 
418  cmds = "\n"
419  cmds += "set /Herwig/Partons/PomeronPDF:RootName %s\n" % dpdf_path
420  cmds += "set /Herwig/Partons/PomeronFlux:PDFFit %s\n" % flux
421  cmds += "set /Herwig/Partons/PomeronPDF:PDFFit %s\n" % pdf
422 
423  cmds += """\
424 set /Herwig/Particles/pomeron:PDF /Herwig/Partons/PomeronPDF
425 
426 # Technical parameters for this run
427 set /Herwig/Generators/EventGenerator:EventHandler:Sampler:Ntry 100000
428 set /Herwig/Generators/EventGenerator:MaxErrors 500
429 
430 # MPI doesn't work
431 # TODO: Is this a problem?
432 set /Herwig/Generators/EventGenerator:EventHandler:CascadeHandler:MPIHandler NULL
433 
434 # Choice of phase-space generation for PDFs
435 set /Herwig/Partons/PPExtractor:FlatSHatY 0
436 
437 """
438  return cmds
439 
440 

◆ physics_parameter_commands()

def Herwig7Config.Hw7Config.physics_parameter_commands (   self)

Definition at line 139 of file Herwig7Config.py.

139  def physics_parameter_commands(self):
140  if self.use_PDGparams:
141  paramlist = []
142  self.physics_parameter_commands = True
143 
144  paramlist.append("## Masses and widths: PDG 2019 values")
145 
146 
147  from EvgenProdTools.offline_dict import parameters
148  for k,v in parameters.items():
149  if k == 'particles':
150  for key,value in v.items():
151  if int(key) == 24:
152  paramlist.append("set /Herwig/Particles/"+value['name']+"+:NominalMass "+value['mass'])
153  paramlist.append("set /Herwig/Particles/"+value['name']+"+:Width "+value['width'])
154  paramlist.append("set /Herwig/Particles/"+value['name']+"-:NominalMass "+value['mass'])
155  paramlist.append("set /Herwig/Particles/"+value['name']+"-:Width "+value['width'])
156  if int(key) == 23:
157  paramlist.append("set /Herwig/Particles/"+value['name']+"0:NominalMass "+value['mass'])
158  paramlist.append("set /Herwig/Particles/"+value['name']+"0:Width "+value['width'])
159  if int(key) == 6:
160  paramlist.append("set /Herwig/Particles/"+value['name']+"bar:NominalMass "+value['mass'])
161  paramlist.append("set /Herwig/Particles/"+value['name']+"bar:Width "+value['width'])
162  paramlist.append("set /Herwig/Particles/"+value['name']+":NominalMass "+value['mass'])
163  paramlist.append("set /Herwig/Particles/"+value['name']+":Width "+value['width'])
164 
165 
166  if k == 'EW_parameters':
167  for key,value in v.items():
168  if key[2] == "Sin2ThetaW":
169  paramlist.append("set /Herwig/Model:EW/"+str(key[2])+" "+str(value))
170  paramstring = '\n'.join(paramlist)
171  return(paramstring)
172 
173  else:
174  self.physics_parameter_commands = True
175 
176  return("""
177 ## Masses and widths: PDG 2010 values (except TOP mass; kept at PDG2007)
178 set /Herwig/Particles/t:NominalMass 172.5*GeV
179 set /Herwig/Particles/tbar:NominalMass 172.5*GeV
180 set /Herwig/Particles/W+:NominalMass 80.399*GeV
181 set /Herwig/Particles/W-:NominalMass 80.399*GeV
182 set /Herwig/Particles/Z0:NominalMass 91.1876*GeV
183 set /Herwig/Particles/W+:Width 2.085*GeV
184 set /Herwig/Particles/W-:Width 2.085*GeV
185 set /Herwig/Particles/Z0:Width 2.4952*GeV
186 
187 ## Weinberg angle
188 set /Herwig/Model:EW/Sin2ThetaW 0.23113
189 """)
190 

◆ printout_commands()

def Herwig7Config.Hw7Config.printout_commands (   self)

Sets printout verbosity and error tolerance.

As specified in https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/McProductionCommonParametersMC15 Now the PDG API is used to set the parameters via the python file Generators/EvgenProdTools/python/physics_parameters.py that generates the dictionary offline_dict.py with the parameters

Definition at line 117 of file Herwig7Config.py.

117  def printout_commands(self):
118 
119  self.set_printout_commands = True
120 
121  return("""
122 
123 ## Verbosity and printout settings
124 set /Herwig/Generators/EventGenerator:DebugLevel 1
125 set /Herwig/Generators/EventGenerator:PrintEvent 2
126 set /Herwig/Generators/EventGenerator:UseStdout Yes
127 set /Herwig/Generators/EventGenerator:NumberOfEvents 1000000000
128 set /Herwig/Generators/EventGenerator:MaxErrors 500
129 
130 ## Make sampler print out cross sections for each subprocess
131 set /Herwig/Samplers/Sampler:Verbose Yes
132 """)
133 
134 
138 

◆ ps_tune_commands()

def Herwig7Config.Hw7Config.ps_tune_commands (   self,
  tune_name = "H7-PS-MMHT2014LO" 
)

Commands for only setting the PS/hadronization tune.

Parameters
[in]tune_namename identifying the PS/hadronization tune
Returns
Nothing, adds the corresponding commands directly to the generator configuration object

Definition at line 336 of file Herwig7Config.py.

336  def ps_tune_commands(self, tune_name = "H7-PS-MMHT2014LO"):
337 
338  cmds = """
339 ## Parton shower / hadronization tune settings
340 """
341 
342  if tune_name == "H7-PS-MMHT2014LO":
343  cmds += """
344 # > The parton shower / hadronization tune "H7-MMHT2014LO" is already
345 # > configured in Herwig7 via the default settings.
346 """
347  # elif tune_name == "some-other-name":
348  # cmds += self.load_PS_tune(tune_name)
349  else:
350  raise Exception("Parton shower tune name '{}' unknown".format(tune_name))
351 
352  self.commands += cmds
353 
354 

◆ random_seed_commands()

def Herwig7Config.Hw7Config.random_seed_commands (   self)

Sets the seed for the random number generator.

Definition at line 63 of file Herwig7Config.py.

63  def random_seed_commands(self):
64 
65  return("""
66 ## Random number generator seed
67 set /Herwig/Random:Seed {}
68 """.format(self.runArgs.randomSeed))
69 

◆ remnant_pdf_commands()

def Herwig7Config.Hw7Config.remnant_pdf_commands (   self,
  name = "MMHT2014lo68cl",
  member = 0,
  max_flav = 5 
)

Commands for setting the remnant PDF.

Parameters
[in]namename of the PDF set
[in]memberindex of the PDF member
[in]max_flavnumber of massless quark flavours

Definition at line 304 of file Herwig7Config.py.

304  def remnant_pdf_commands(self, name="MMHT2014lo68cl", member=0, max_flav=5):
305 
306  self.commands += """
307 ## Configure Remnant PDF
308 set /Herwig/Partons/RemnantPDF:PDFName {}
309 set /Herwig/Partons/RemnantPDF:Member {}
310 set /Herwig/Partons/RemnantPDF:MaxFlav {}
311 """.format(name, member, max_flav)
312 
313 
314 

◆ set_tune_scheme()

def Herwig7Config.Hw7Config.set_tune_scheme (   self,
  tune_scheme = "DotProduct" 
)

Definition at line 464 of file Herwig7Config.py.

464  def set_tune_scheme(self, tune_scheme="DotProduct"):
465  tune_schemes = ["DotProduct-Veto","DotProduct","pT","Q2"]
466  if tune_scheme not in tune_schemes:
467  athMsgLog.warn("Please choose one of the supported tune-schemes! (DotProduct-Veto,DotProduct,pT,Q2)")
468  else:
469  athMsgLog.info("{tune_scheme:s} was used for the tune scheme.".format(tune_scheme=tune_scheme))
470  # create a tune-section in the config
471  self.commands += """\
472 \n## -------------
473 ## Tune Settings
474 ## -------------
475 
476 # Tune-{tune_scheme:s}
477 read snippets/EvolutionScheme-{tune_scheme:s}.in
478 read snippets/Tune-{tune_scheme:s}.in
479 """.format(tune_scheme=tune_scheme)
480 

◆ shower_pdf_commands()

def Herwig7Config.Hw7Config.shower_pdf_commands (   self,
  order = "LO",
  name = "MMHT2014lo68cl",
  member = 0,
  max_flav = 5 
)

Commands for setting the PDF in the parton showers.

Parameters
[in]orderperturbative order of the PDF set
[in]namename of the PDF set
[in]memberindex of the PDF member
[in]max_flavnumber of massless quark flavours

Definition at line 260 of file Herwig7Config.py.

260  def shower_pdf_commands(self, order="LO", name="MMHT2014lo68cl", member=0, max_flav=5):
261 
262  if order not in ["LO", "NLO"]:
263  raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'order' must either be 'LO' or 'NLO'!"))
264 
265 
267 
268  self.commands += """
269 ## Configure {0} PDF set for the parton shower
270 set /Herwig/Partons/Shower{0}PDF:PDFName {1}
271 set /Herwig/Partons/Shower{0}PDF:Member {2}
272 set /Herwig/Partons/Shower{0}PDF:MaxFlav {3}
273 set /Herwig/Shower/ShowerHandler:PDFA /Herwig/Partons/Shower{0}PDF
274 set /Herwig/Shower/ShowerHandler:PDFB /Herwig/Partons/Shower{0}PDF
275 set /Herwig/Shower/PowhegShowerHandler:PDFA /Herwig/Partons/Shower{0}PDF
276 set /Herwig/Shower/PowhegShowerHandler:PDFB /Herwig/Partons/Shower{0}PDF
277 set /Herwig/DipoleShower/DipoleShowerHandler:PDFA /Herwig/Partons/Shower{0}PDF
278 set /Herwig/DipoleShower/DipoleShowerHandler:PDFB /Herwig/Partons/Shower{0}PDF
279 """.format(order, name, member, max_flav)
280 
281 

◆ technical_parameter_commands()

def Herwig7Config.Hw7Config.technical_parameter_commands (   self)

Definition at line 191 of file Herwig7Config.py.

191  def technical_parameter_commands(self):
192 
193  self.set_technical_parameter_commands = True
194 
195  return("""
196 ## Disable default attempts to use Pomeron PDF data files, until we're worked how to do that on the Grid!
197 set /Herwig/Particles/pomeron:PDF /Herwig/Partons/NoPDF
198 
199 ## Set long-lived particles stable
200 set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm
201 """)
202 
203 
204 

◆ tune_commands()

def Herwig7Config.Hw7Config.tune_commands (   self,
  ps_tune_name = "H7-PS-MMHT2014LO",
  ue_tune_name = "H7.2-Default" 
)

Commands for setting PS/hadronization and UE/MPI tune simultaneously.

Parameters
[in]ps_tune_namename identifying the PS/hadronization tune
[in]ue_tune_namename identifying the UE/MPI tune
Returns
Nothing, adds the corresponding commands directly to the generator configuration object

Definition at line 320 of file Herwig7Config.py.

320  def tune_commands(self, ps_tune_name = "H7-PS-MMHT2014LO", ue_tune_name = "H7.2-Default"):
321 
322  cmds = """
323 ## -------------
324 ## Tune Settings
325 ## -------------
326 """
327  self.commands += cmds
328  # self.ps_tune_commands(tune_name = ps_tune_name) # the name of the default PS tune may be obsolete
329  self.ue_tune_commands(tune_name = ue_tune_name)
330 
331 

◆ ue_tune_commands()

def Herwig7Config.Hw7Config.ue_tune_commands (   self,
  tune_name = "H7.2-Default" 
)

Commands for only setting the UE/MPI tune.

Parameters
[in]tune_namename identifying the UE/MPI tune
Returns
Nothing, adds the corresponding commands directly to the generator configuration object

Definition at line 366 of file Herwig7Config.py.

366  def ue_tune_commands(self, tune_name = "H7.2-Default"):
367 
368  cmds = """
369 ## Underlying event tune settings
370 """
371 
372  if tune_name == "H7.2-Default":
373  cmds += """
374 # > The underlying event tune "H7.2-Default" is already
375 # > configured in Herwig7 via the default settings.
376 """
377  # elif tune_name == "some-other-name":
378  # cmds = self.UE_tune_commands(tune_name)
379  else:
380  raise Exception("Underlying event tune name '{}' unknown".format(tune_name))
381 
382  self.commands += cmds
383 
384 

Member Data Documentation

◆ beams

Herwig7Config.Hw7Config.beams

Definition at line 73 of file Herwig7Config.py.

◆ commands

Herwig7Config.Hw7Config.commands

Definition at line 40 of file Herwig7Config.py.

◆ default_commands

Herwig7Config.Hw7Config.default_commands

Definition at line 39 of file Herwig7Config.py.

◆ genSeq

Herwig7Config.Hw7Config.genSeq

Definition at line 24 of file Herwig7Config.py.

◆ me_pdf_name

Herwig7Config.Hw7Config.me_pdf_name

Definition at line 31 of file Herwig7Config.py.

◆ mpi_pdf_name

Herwig7Config.Hw7Config.mpi_pdf_name

Definition at line 32 of file Herwig7Config.py.

◆ physics_parameter_commands

Herwig7Config.Hw7Config.physics_parameter_commands

Load the dictionary and extract the values of the variables that were defined here before (top quark, W and Z boson)

Take the value of sin2thetaW from the EW_parameters dictionary

Definition at line 142 of file Herwig7Config.py.

◆ run_name

Herwig7Config.Hw7Config.run_name

Definition at line 27 of file Herwig7Config.py.

◆ runArgs

Herwig7Config.Hw7Config.runArgs

Definition at line 25 of file Herwig7Config.py.

◆ set_physics_parameter_commands

Herwig7Config.Hw7Config.set_physics_parameter_commands

Definition at line 35 of file Herwig7Config.py.

◆ set_printout_commands

Herwig7Config.Hw7Config.set_printout_commands

Definition at line 34 of file Herwig7Config.py.

◆ set_technical_parameter_commands

Herwig7Config.Hw7Config.set_technical_parameter_commands

Definition at line 36 of file Herwig7Config.py.

◆ use_PDGparams

Herwig7Config.Hw7Config.use_PDGparams

Definition at line 37 of file Herwig7Config.py.


The documentation for this class was generated from the following file:
python.MadGraphUtils.check_reset_proc_number
def check_reset_proc_number(opts)
Definition: MadGraphUtils.py:2577
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11