4 evgenConfig.description =
'POWHEG+Madspin+Pythia8 ttbar production with Powheg hdamp equal 1.5*top mass, A14 tune, ME NNPDF30 NLO, A14 NNPDF23 LO, Higgs plus decays for masses from 80-160'
5 evgenConfig.keywords =[
'Higgs',
'MSSM',
'BSMHiggs',
'chargedHiggs',
'top',
'ttbar']
6 evgenConfig.contact = [
'anna.ivina@cern.ch']
7 evgenConfig.minevents = 10000
10 include(
'PowhegControl/PowhegControl_tt_Common.py')
12 if hasattr(PowhegConfig,
"topdecaymode"):
14 PowhegConfig.topdecaymode = 22222
17 PowhegConfig.decay_mode =
"t t~ > undecayed"
18 PowhegConfig.MadSpin_enabled =
False
20 PowhegConfig.hdamp = 258.75
21 DoSingleWeight =
False
23 PowhegConfig.mu_F = 1.0
24 PowhegConfig.mu_R = 1.0
25 PowhegConfig.PDF = 260000
27 PowhegConfig.mu_F = [1.0, 2.0, 0.5, 1.0, 1.0, 0.5, 2.0, 0.5, 2.0]
28 PowhegConfig.mu_R = [1.0, 1.0, 1.0, 2.0, 0.5, 0.5, 2.0, 2.0, 0.5]
29 PowhegConfig.PDF = [260000, 25200, 13165, 90900]
30 PowhegConfig.PDF.extend(
range(260001, 260101))
31 PowhegConfig.PDF.extend(
range(90901 , 90931 ))
34 PowhegConfig.generate()
40 thisDSID = runArgs.runNumber
42 madspin_card_rep =
'madspin_card.dat'
43 madspin_in =
'import run.lhe'
44 madspin_rep =
'set ms_dir MadSpin'
45 madspin_seed = runArgs.randomSeed
49 mscard =
open(madspin_card_rep,
'w')
51 set Nevents_for_max_weigth 250 # number of events for the estimate of the max. weight (default: 75)
52 set max_weight_ps_point 1000 # number of PS to estimate the maximum for each event (default: 400)
56 define l+ = e+ mu+ ta+
57 define l- = e- mu- ta-
59 define vl~ = ve~ vm~ vt~
60 define p = g u c d b s u~ c~ d~ s~ b~
61 define j = g u c d b s u~ c~ d~ s~ b~
63 """%(madspin_seed,madspin_in,madspin_rep))
68 wstr =
', w- > l- vl~'
70 t2str =
'decay t~ > b~ w-'
71 t1str =
'decay t > b h+'
72 mscard.write(
"""%s\n%s%s\nlaunch"""%(t1str,t2str,wstr))
79 mhc_str =
str(runArgs.jobConfig[0])
82 for s
in mhc_str.split(
"_"):
86 print "Charged Higgs mass set to %i"%mhc
88 raise RuntimeError(
"Charged Higgs mass not set, mhc=0, check joOption name %s"%mhc_str)
92 mh2=math.sqrt(math.pow(mhc,2)+math.pow(8.0399e+01,2))
96 masses = {
'25':
str(mh1)+
' # mh1',
97 '35':
str(mh2)+
' # mh2',
98 '36':
str(mh2)+
' # mh2',
99 '37':
str(mhc)+
' # mhc'}
100 decayss={
'37':
'DECAY 37 1.300000e+02 # whc'}
104 import shutil,os,subprocess
106 paramFileName =
'MadGraph_param_card_ttHplus_NLO.dat'
107 paramFileNameN =
'param_card.dat'
110 build_param_card(param_card_old=paramFileName,param_card_new=paramFileNameN,masses=masses,decays=decayss)
114 fin =
open(
'PowhegOTF._1.events',
'r')
116 line = fin.readline()
117 while line !=
"-->\n":
119 line = fin.readline()
125 fout.write(
'<MG5ProcCard>\n')
126 fout.write(
'import model /cvmfs/atlas.cern.ch/repo/sw/Generators/madgraph/models/latest/%s-nobmass\n'%(model))
127 fout.write(
'generate p p > t t~ [QCD] \n')
128 fout.write(
'</MG5ProcCard>\n')
131 eline =
str(PowhegConfig.nEvents)+
' = nevents\n'
132 fout.write(
'<MGRunCard>\n')
133 fout.write(
'#0.01 = req_acc_FO\n')
135 fout.write(
'50.0 = bwcutoff\n')
136 fout.write(
'</MGRunCard>\n')
141 fout.write(
'<slha>\n')
142 shutil.copyfileobj(
open(paramFileNameN,
'r'), fout)
143 fout.write(
'</slha>\n')
144 fout.write(
'<montecarlomasses>\n')
145 fout.write(
' 1 0.330000E+00\n')
146 fout.write(
' 2 0.330000E+00\n')
147 fout.write(
' 3 0.500000E+00\n')
148 fout.write(
' 4 0.1550000E+01\n')
149 fout.write(
' 5 0.470000E+01\n')
150 fout.write(
' 11 0.510999E-03\n')
151 fout.write(
' 13 0.105658E+00\n')
152 fout.write(
' 15 0.177682E+01\n')
153 fout.write(
' 21 0.000000E+00\n')
154 fout.write(
'</montecarlomasses>\n')
157 line = fin.readline()
158 while 'LesHouchesEvents' not in line:
160 line = fin.readline()
166 os.system(
'$MADPATH/MadSpin/madspin < madspin_card.dat')
169 unzip = subprocess.Popen([
'gunzip',
'run_decayed.lhe.gz'])
171 os.system(
'cp run_decayed.lhe PowhegOTF._1.events')
175 with open(
'PowhegOTF._1.events',
'r+')
as f:
177 to_delete = [
'<![CDATA[',
']]>' ]
179 for line
in t.split(
'\n'):
180 if line
not in to_delete:
187 include(
'Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py')
188 include(
"Pythia8_i/Pythia8_Powheg_Main31.py")
189 genSeq.Pythia8.Commands += [
'POWHEG:pThard = 0' ]
190 genSeq.Pythia8.Commands += [
'POWHEG:nFinal = 2' ]
191 genSeq.Pythia8.Commands += [
'POWHEG:pTdef = 2' ]
192 genSeq.Pythia8.Commands += [
'POWHEG:vetoCount = 3' ]
193 genSeq.Pythia8.Commands += [
'POWHEG:pTemt = 0' ]
194 genSeq.Pythia8.Commands += [
'POWHEG:emitted = 0' ]
195 genSeq.Pythia8.Commands += [
'POWHEG:MPIveto = 0' ]