ATLAS Offline Software
Loading...
Searching...
No Matches
Herwig7_QED_EvtGen_ll.py
Go to the documentation of this file.
1# JobOption fragment for Herwig >=7.0.4
2
3# Common job option for gamma gamma -> ll processes in Herwig7
4# Generation in Min < M < Max window. Min/Max and lepton flavour determined
5# from the JO name, e.g. MC15.363749.Herwig7EvtGen_BudnevQED_ggTOee_20M45_LeptonFilter.py
6# Contact: Oldrich Kepka
7
8# Finnal states to be found in the JO name
9h7finalStates = {"ggTOee": "Electron", "ggTOmumu": "Muon", "ggTOtautau": "Tau" }
10
11# Assert right JO name format
12info = runArgs.jobConfig[0].split("_")
13assert (info[1] == "BudnevQED") , "JobOption name does not contain BudnevQED"
14assert (info[2] in h7finalStates), "Unknown final state key %s" % info[2]
15
16# Extract final state and mass range from the JO name
17fs = h7finalStates[info[2]]
18mrange = info[3].split('M')
19assert (len(mrange) >0), "Cannot extract mass range from the JO"
20del h7finalStates
21
22
23# Initialize Herwig7 generator configuration for built-in matrix elements
24include("Herwig7_i/Herwig7_BuiltinME.py")
25
26# Generic QED include with maximum phase-space
27include("Herwig7_i/Herwig7_QED_EvtGen_Common.py")
28
29# Mmin<M<Mmax
30command = """\
31set QCDCuts:MHatMin """+str(mrange[0])+"""*GeV\n"""
32if len(mrange) > 1 and mrange[1]!='':
33 command += "set QCDCuts:MHatMax "+str(mrange[1])+"*GeV\n"
34
35# Hard process
36command += """\
37set LeptonKtCut:MinKT 2*GeV # save minimal setting, override in upstream jo if pT-filter used
38cd /Herwig/MatrixElements
39insert SimpleQCD:MatrixElements 0 /Herwig/MatrixElements/MEgg2ff
40set /Herwig/MatrixElements/MEgg2ff:Process """+str(fs)+"""
41"""
42
43
44Herwig7Config.add_commands(command)
45del command
46del mrange
47del fs
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177