ATLAS Offline Software
Loading...
Searching...
No Matches
PowhegPythia8EvtGen_H2a4X_ctauY.py
Go to the documentation of this file.
1#--------------------------------------------------------------
2# Modify the events.lhe, since Pythia doesn't like to decay the
3# SM higgs to BSM products: 25 --> 35
4#--------------------------------------------------------------
5
6#evgenConfig.inputfilecheck = "TXT"
7#evgenConfig.inputfilecheck = "merged_lhef"
8
9import os, sys, glob
10for f in glob.glob("*.events"):
11 infile = f
12 f1 = open( infile )
13 newfile = infile+'.temp'
14 f2 = open(newfile,'w')
15 for line in f1:
16 if line.startswith(' 25 1'):
17 f2.write(line.replace(' 25 1',' 35 1'))
18 else:
19 f2.write(line)
20 f1.close()
21 f2.close()
22 os.system('mv %s %s '%(infile, infile+'.old') )
23 os.system('mv %s %s '%(newfile, infile) )
24
25nProcess = -1 # 0: WpH, 1: WmH, 2: ZH, 3: ggZH
26ma = 0. # 15, 55 GeV
27adecay = 0 # 2, 5, 15
28ctau = 0. # 1, 10, 100 mm
29
30# a->bb
31if runArgs.runNumber==309851: # WpH, ma=15GeV, a->bb, ctau=1mm
32 nProcess = 0
33 ma = 15.
34 ctau = 1.
35 adecay = 5
36elif runArgs.runNumber==309852: # WpH, ma=55GeV, a->bb, ctau=1mm
37 nProcess = 0
38 ma = 55.
39 ctau = 1.
40 adecay = 5
41elif runArgs.runNumber==309853: # WpH, ma=15GeV, a->bb, ctau=10mm
42 nProcess = 0
43 ma = 15.
44 ctau = 10.
45 adecay = 5
46elif runArgs.runNumber==309854: # WpH, ma=55GeV, a->bb, ctau=10mm
47 nProcess = 0
48 ma = 55.
49 ctau = 10.
50 adecay = 5
51elif runArgs.runNumber==309855: # WpH, ma=15GeV, a->bb, ctau=100mm
52 nProcess = 0
53 ma = 15.
54 ctau = 100.
55 adecay = 5
56elif runArgs.runNumber==309856: # WpH, ma=55GeV, a->bb, ctau=100mm
57 nProcess = 0
58 ma = 55.
59 ctau = 100.
60 adecay = 5
61elif runArgs.runNumber==309857: # WmH, ma=15GeV, a->bb, ctau=1mm
62 nProcess = 1
63 ma = 15.
64 ctau = 1.
65 adecay = 5
66elif runArgs.runNumber==309858: # WmH, ma=55GeV, a->bb, ctau=1mm
67 nProcess = 1
68 ma = 55.
69 ctau = 1.
70 adecay = 5
71elif runArgs.runNumber==309859: # WmH, ma=15GeV, a->bb, ctau=10mm
72 nProcess = 1
73 ma = 15.
74 ctau = 10.
75 adecay = 5
76elif runArgs.runNumber==309860: # WmH, ma=55GeV, a->bb, ctau=10mm
77 nProcess = 1
78 ma = 55.
79 ctau = 10.
80 adecay = 5
81elif runArgs.runNumber==309861: # WmH, ma=15GeV, a->bb, ctau=100mm
82 nProcess = 1
83 ma = 15.
84 ctau = 100.
85 adecay = 5
86elif runArgs.runNumber==309862: # WmH, ma=55GeV, a->bb, ctau=100mm
87 nProcess = 1
88 ma = 55.
89 ctau = 100.
90 adecay = 5
91
92# a->tautau
93elif runArgs.runNumber==309863: # WpH, ma=55GeV, a->tautau, ctau=100mm
94 nProcess = 0
95 ma = 55.
96 ctau = 100.
97 adecay = 15
98elif runArgs.runNumber==309864: # WmH, ma=55GeV, a->tautau, ctau=100mm
99 nProcess = 1
100 ma = 55.
101 ctau = 100.
102 adecay = 15
103
104# a->uu
105elif runArgs.runNumber==309865: # WpH, ma=55GeV, a->uu, ctau=100mm
106 nProcess = 0
107 ma = 55.
108 ctau = 100.
109 adecay = 2
110elif runArgs.runNumber==309866: # WmH, ma=55GeV, a->uu, ctau=100mm
111 nProcess = 1
112 ma = 55.
113 ctau = 100.
114 adecay = 2
115
116# ZH, a->bb
117elif runArgs.runNumber==312932: # ZH, ma=15GeV, a->bb, ctau=10mm
118 nProcess = 2
119 ma = 15.
120 ctau = 10.
121 adecay = 5
122elif runArgs.runNumber==312933: # ZH, ma=15GeV, a->bb, ctau=100mm
123 nProcess = 2
124 ma = 15.
125 ctau = 100.
126 adecay = 5
127elif runArgs.runNumber==312934: # ZH, ma=15GeV, a->bb, ctau=1000mm
128 nProcess = 2
129 ma = 15.
130 ctau = 1000.
131 adecay = 5
132elif runArgs.runNumber==312935: # ZH, ma=25GeV, a->bb, ctau=10mm
133 nProcess = 2
134 ma = 25.
135 ctau = 10.
136 adecay = 5
137elif runArgs.runNumber==312936: # ZH, ma=25GeV, a->bb, ctau=100mm
138 nProcess = 2
139 ma = 25.
140 ctau = 100.
141 adecay = 5
142elif runArgs.runNumber==312937: # ZH, ma=25GeV, a->bb, ctau=1000mm
143 nProcess = 2
144 ma = 25.
145 ctau = 1000.
146 adecay = 5
147elif runArgs.runNumber==312938: # ZH, ma=35GeV, a->bb, ctau=10mm
148 nProcess = 2
149 ma = 35.
150 ctau = 10.
151 adecay = 5
152elif runArgs.runNumber==312939: # ZH, ma=35GeV, a->bb, ctau=100mm
153 nProcess = 2
154 ma = 35.
155 ctau = 100.
156 adecay = 5
157elif runArgs.runNumber==312940: # ZH, ma=35GeV, a->bb, ctau=1000mm
158 nProcess = 2
159 ma = 35.
160 ctau = 1000.
161 adecay = 5
162elif runArgs.runNumber==312941: # ZH, ma=55GeV, a->bb, ctau=10mm
163 nProcess = 2
164 ma = 55.
165 ctau = 10.
166 adecay = 5
167elif runArgs.runNumber==312942: # ZH, ma=55GeV, a->bb, ctau=100mm
168 nProcess = 2
169 ma = 35.
170 ctau = 100.
171 adecay = 5
172elif runArgs.runNumber==312943: # ZH, ma=55GeV, a->bb, ctau=1000mm
173 nProcess = 2
174 ma = 55.
175 ctau = 1000.
176 adecay = 5
177elif runArgs.runNumber==312944: # ggZH, ma=15GeV, a->bb, ctau=10mm
178 nProcess = 3
179 ma = 15.
180 ctau = 10.
181 adecay = 5
182elif runArgs.runNumber==312945: # ggZH, ma=15GeV, a->bb, ctau=100mm
183 nProcess = 3
184 ma = 15.
185 ctau = 100.
186 adecay = 5
187elif runArgs.runNumber==312946: # ggZH, ma=15GeV, a->bb, ctau=1000mm
188 nProcess = 3
189 ma = 15.
190 ctau = 1000.
191 adecay = 5
192elif runArgs.runNumber==312947: # ggZH, ma=25GeV, a->bb, ctau=10mm
193 nProcess = 3
194 ma = 25.
195 ctau = 10.
196 adecay = 5
197elif runArgs.runNumber==312948: # ggZH, ma=25GeV, a->bb, ctau=100mm
198 nProcess = 3
199 ma = 25.
200 ctau = 100.
201 adecay = 5
202elif runArgs.runNumber==312949: # ggZH, ma=25GeV, a->bb, ctau=1000mm
203 nProcess = 3
204 ma = 25.
205 ctau = 1000.
206 adecay = 5
207elif runArgs.runNumber==312950: # ggZH, ma=35GeV, a->bb, ctau=10mm
208 nProcess = 3
209 ma = 35.
210 ctau = 10.
211 adecay = 5
212elif runArgs.runNumber==312951: # ggZH, ma=35GeV, a->bb, ctau=100mm
213 nProcess = 3
214 ma = 35.
215 ctau = 100.
216 adecay = 5
217elif runArgs.runNumber==312952: # ggZH, ma=35GeV, a->bb, ctau=1000mm
218 nProcess = 3
219 ma = 35.
220 ctau = 1000.
221 adecay = 5
222elif runArgs.runNumber==312953: # ggZH, ma=55GeV, a->bb, ctau=10mm
223 nProcess = 3
224 ma = 55.
225 ctau = 10.
226 adecay = 5
227elif runArgs.runNumber==312954: # ggZH, ma=55GeV, a->bb, ctau=100mm
228 nProcess = 3
229 ma = 55.
230 ctau = 100.
231 adecay = 5
232elif runArgs.runNumber==312955: # ggZH, ma=55GeV, a->bb, ctau=1000mm
233 nProcess = 3
234 ma = 55.
235 ctau = 1000.
236 adecay = 5
237
238#--------------------------------------------------------------
239# Pythia8 showering
240#--------------------------------------------------------------
241include('Pythia8_i/Pythia8_AZNLO_CTEQ6L1_EvtGen_Common.py')
242#--------------------------------------------------------------
243# Pythia8 main31 matching
244#--------------------------------------------------------------
245
246if nProcess==0:
247 genSeq.Pythia8.UserModes += [ 'Main31:NFinal = 3']
248elif nProcess==1:
249 genSeq.Pythia8.UserModes += [ 'Main31:NFinal = 3']
250elif nProcess==2:
251 genSeq.Pythia8.UserModes += [ 'Main31:NFinal = 3']
252elif nProcess==3:
253 genSeq.Pythia8.UserModes += [ 'Main31:NFinal = 2']
254
255#--------------------------------------------------------------
256# Higgs->bbar at Pythia8
257#--------------------------------------------------------------
258genSeq.Pythia8.Commands += [
259 'Higgs:useBSM = on',
260
261 '35:m0 = 125',
262 '35:mWidth = 0.00407',
263 '35:doForceWidth = on',
264 '35:onMode = off',
265 '35:onIfMatch = 36 36', # h->aa
266
267 '36:onMode = off', # decay of the a
268 '36:onIfAny = %d' % adecay, # decay a->XX
269 '36:m0 = %.1f' % ma, #scalar mass
270 '36:mMin = 0',
271 '36:tau0 = %.1f' % ctau, #nominal proper lifetime (in mm/c)
272 ]
273
274genSeq.Pythia8.Commands = [i for i in genSeq.Pythia8.Commands if (("limitTau0" not in i) and ("tau0Max" not in i))]
275genSeq.Pythia8.Commands += [
276 'ParticleDecays:tau0Max = 100000.0',
277 'ParticleDecays:limitTau0 = off'
278 ]
279
280testSeq.TestHepMC.MaxTransVtxDisp = 100000000 #in mm
281testSeq.TestHepMC.MaxVtxDisp = 100000000 #in mm
282
283
284#--------------------------------------------------------------
285# EVGEN configuration
286#--------------------------------------------------------------
287if nProcess==0:
288 if adecay==5:
289 evgenConfig.description = "POWHEG+MiNLO+Pythia8 H+W+jet->l+vbbbarbbbar production"
290 evgenConfig.process = "WpH, H->2a->4b, W->lv"
291 elif adecay==15:
292 evgenConfig.description = "POWHEG+MiNLO+Pythia8 H+W+jet->l+vtau+tau-tau+tau- production"
293 evgenConfig.process = "WpH, H->2a->4tau, W->lv"
294 elif adecay==2:
295 evgenConfig.description = "POWHEG+MiNLO+Pythia8 H+W+jet->l+vuubaruubar production"
296 evgenConfig.process = "WpH, H->2a->4u, W->lv"
297elif nProcess==1:
298 if adecay==5:
299 evgenConfig.description = "POWHEG+MiNLO+Pythia8 H+W+jet->l-vbbbarbbbar production"
300 evgenConfig.process = "WmH, H->2a->4b, W->lv"
301 elif adecay==15:
302 evgenConfig.description = "POWHEG+MiNLO+Pythia8 H+W+jet->l-vtau+tau-tau+tau- production"
303 evgenConfig.process = "WmH, H->2a->4tau, W->lv"
304 elif adecay==2:
305 evgenConfig.description = "POWHEG+MiNLO+Pythia8 H+W+jet->l-vuubaruubar production"
306 evgenConfig.process = "WmH, H->2a->4u, W->lv"
307elif nProcess==2:
308 if adecay==5:
309 evgenConfig.description = "POWHEG+MiNLO+Pythia8 H+Z+jet->l+l-bbbarbbbar production"
310 evgenConfig.process = "ZH, H->aa->4b, Z->ll"
311elif nProcess==3:
312 if adecay==5:
313 evgenConfig.description = "POWHEG+Pythia8 gg->H+Z->l+l-bbbarbbbar production"
314 evgenConfig.process = "gg->ZH, H->aa->4b, Z->ll"
315evgenConfig.keywords = [ "BSM", "Higgs", "BSMHiggs", "mH125"]
316evgenConfig.contact = [ 'manfredi.ronzani@cern.ch' ]
317evgenConfig.minevents = 50