ATLAS Offline Software
PowhegPythia8EvtGenControl_BSM_ggH_aa_2mu2tau.py
Go to the documentation of this file.
1 
2 runconf=runArgs.jobConfig[0].split("_")
3 A_Mass=runconf[3].replace("a","").replace("p",".")
4 
5 #--------------------------------------------------------------
6 # Powheg ggH_quark_mass_effects setup
7 #--------------------------------------------------------------
8 include('PowhegControl/PowhegControl_ggF_H_Common.py')
9 
10 # Set Powheg variables, overriding defaults
11 # Note: width_H will be overwritten in case of CPS.
12 PowhegConfig.mass_H = 125.
13 PowhegConfig.width_H = 0.00407
14 
15 # Turn on the heavy quark effect
16 PowhegConfig.use_massive_b = True
17 PowhegConfig.use_massive_c = True
18 
19 # Complex pole scheme or not (1 for NWA and 3(CPS) for SM)
20 PowhegConfig.bwshape = 3
21 
22 # Dynamical scale (sqrt(pT(H)^2+mH^2) real emission contributions)
23 # Note: r2330 does not support this option. please use newer versions.
24 PowhegConfig.runningscale = 2
25 
26 # EW correction
27 if PowhegConfig.mass_H <= 1000.:
28  PowhegConfig.ew = 1
29 else:
30  PowhegConfig.ew = 0
31 
32 # Set scaling and masswindow parameters
33 hfact_scale = 1.2
34 masswindow_max = 30.
35 
36 # Calculate an appropriate masswindow and hfact
37 masswindow = masswindow_max
38 if PowhegConfig.mass_H <= 700.:
39  masswindow = min( (1799.9 - PowhegConfig.mass_H) / PowhegConfig.width_H, masswindow )
40 else:
41  masswindow = min( (1999.9 - PowhegConfig.mass_H) / PowhegConfig.width_H, masswindow )
42 PowhegConfig.masswindow = masswindow
43 PowhegConfig.hfact = PowhegConfig.mass_H / hfact_scale
44 
45 # Increase number of events requested to compensate for filter efficiency
46 PowhegConfig.nEvents *= 10.
47 
48 PowhegConfig.generateRunCard()
49 PowhegConfig.generateEvents()
50 
51 #--------------------------------------------------------------
52 # Modify the events.lhe, since Pythia doesn't like to decay the
53 # SM higgs to BSM products: 25 --> 35
54 #--------------------------------------------------------------
55 
56 import os, sys
57 infile = 'PowhegOTF._1.events'
58 f1 = open( infile )
59 newfile = infile+'.temp'
60 f2 = open(newfile,'w')
61 for line in f1:
62  if line.startswith(' 25 1'):
63  f2.write(line.replace(' 25 1',' 35 1'))
64  else:
65  f2.write(line)
66 f1.close()
67 f2.close()
68 os.system('mv %s %s '%(infile, infile+'.old') )
69 os.system('mv %s %s '%(newfile, infile) )
70 
71 
72 #--------------------------------------------------------------
73 # Pythia8 showering
74 #--------------------------------------------------------------
75 include('Pythia8_i/Pythia8_AZNLO_CTEQ6L1_EvtGen_Common.py')
76 #--------------------------------------------------------------
77 # Pythia8 main31 matching
78 #--------------------------------------------------------------
79 #include('Pythia8_i/Pythia8_Powheg_Main31.py')
80 genSeq.Pythia8.UserModes += [ 'Main31:NFinal = 1']
81 #--------------------------------------------------------------
82 # Higgs->bbar at Pythia8
83 #--------------------------------------------------------------
84 H_Mass = 125.0
85 H_Width = 0.00407
86 A_Width = ( float(A_Mass) / 100. ) * 0.1 #100 MeV width for 100 GeV a
87 A_MassMin = float(A_Mass) - 100*float(A_Width)
88 A_MassMax = float(A_Mass) + 100*float(A_Width)
89 genSeq.Pythia8.Commands += [
90  'Higgs:useBSM = on',
91 
92  '35:m0 = '+str(H_Mass),
93  '35:mWidth = '+str(H_Width),
94  '35:doForceWidth = on',
95  '35:onMode = off',
96  '35:onIfMatch = 36 36', # h->aa
97 
98  '36:onMode = off', # decay of the a
99  '36:oneChannel = 1 0.5 100 15 -15', #a->tautau
100  '36:addChannel = 1 0.5 100 13 -13', #a->mumu
101  '36:m0 = '+str(A_Mass), #scalar mass
102  '36:mWidth = '+str(A_Width), # narrow width
103  '36:mMin = '+str(A_MassMin), # narrow width
104  '36:mMax = '+str(A_MassMax), # narrow width
105  '36:tau0 0', #lifetime
106  ]
107 #--------------------------------------------------------------
108 # EVGEN configuration
109 #--------------------------------------------------------------
110 evgenConfig.description = "POWHEG+MiNLO+Pythia8 ggF H->aa->2mu2tau production, ma = %s GeV" % A_Mass
111 evgenConfig.keywords = [ "BSM", "Higgs", "BSMHiggs", "mH125" ]
112 evgenConfig.contact = [ 'benjamin.kaplan@cern.ch' ]
113 evgenConfig.generators = [ "Powheg", "Pythia8", "EvtGen"]
114 
115 if not hasattr(genSeq, "XtoVVDecayFilter"):
116  from GeneratorFilters.GeneratorFiltersConf import XtoVVDecayFilter
117  genSeq += XtoVVDecayFilter()
118 
119 
122 genSeq.XtoVVDecayFilter.PDGGrandParent = 35
123 genSeq.XtoVVDecayFilter.PDGParent = 36
124 genSeq.XtoVVDecayFilter.StatusParent = 22
125 genSeq.XtoVVDecayFilter.PDGChild1 = [13]
126 genSeq.XtoVVDecayFilter.PDGChild2 = [15]
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
python.Include.include
include
Definition: Include.py:319
min
#define min(a, b)
Definition: cfImp.cxx:40
Trk::open
@ open
Definition: BinningType.h:40
str
Definition: BTagTrackIpAccessor.cxx:11
readCCLHist.float
float
Definition: readCCLHist.py:83
Trk::split
@ split
Definition: LayerMaterialProperties.h:38