Commit 95bc1873 authored by Cyril Becot's avatar Cyril Becot
Browse files

ATLMCPROD-7988

parent e0398fb7
import MadGraphControl.MadGraph_NNPDF30NLO_Base_Fragment
from MadGraphControl.MadGraphUtils import *
nevents=runArgs.maxEvents*2
mode=0
#---------------------------------------------------------------------------
# MG5 Proc card
#---------------------------------------------------------------------------
fcard = open('proc_card_mg5.dat','w')
if runArgs.runNumber==364848:
fcard.write("""
import model sm
define p = g u c d s b u~ c~ d~ s~ b~
define j = g u c d s b u~ c~ d~ s~ b~
define l+ = e+ mu+ ta+
define l- = e- mu- ta-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
generate p p > j j w+ w- QCD=0 QED=4, w+ > l+ vl, w- > j j
add process p p > j j w+ w- QCD=0 QED=4, w- > l- vl~, w+ > j j
add process p p > j j w+ w+ QCD=0 QED=4, w+ > l+ vl, w+ > j j
add process p p > j j w- w- QCD=0 QED=4, w- > l- vl~, w- > j j
output -f
""")
fcard.close()
name="WWlvqq2jetEWK"
#----------------------------------------------------------------------------
# Run Number
#----------------------------------------------------------------------------
if not hasattr(runArgs,'runNumber'):
raise RunTimeError("No run number found.")
#----------------------------------------------------------------------------
# Random Seed
#----------------------------------------------------------------------------
randomSeed = 0
if hasattr(runArgs,'randomSeed'): randomSeed = runArgs.randomSeed
#----------------------------------------------------------------------------
# Beam energy
#----------------------------------------------------------------------------
if hasattr(runArgs,'ecmEnergy'):
beamEnergy = int(runArgs.ecmEnergy) / 2.
else:
raise RunTimeError("No center of mass energy found.")
#---------------------------------------------------------------------------
# Number of Events
#---------------------------------------------------------------------------
safefactor = 5.8*2 ## for Bveto
if hasattr(runArgs,'maxEvents') and runArgs.maxEvents > 0: nevents = int(runArgs.maxEvents)*safefactor
else: nevents = nevents*safefactor
#---------------------------------------------------------------------------
# Number of Events
#---------------------------------------------------------------------------
skip_events=0
if hasattr(runArgs,'skipEvents'): skip_events=runArgs.skipEvents
#---------------------------------------------------------------------------
# MG5 Run Card
#---------------------------------------------------------------------------
extras = {
'asrwgtflavor':"5",
'lhe_version':"3.0",
'ptj':"15",
'ptb':"15",
'pta':"0",
'ptl':"4",
'misset':"10",
'etaj':"5",
'etab':"5",
'etal':"2.8",
'drjj':"0",
'drll':"0",
'draa':"0",
'draj':"0",
'drjl':"0",
'dral':"0",
'mmjj':"10",
'mmbb':"10",
'mmll':"40",
'maxjetflavor':"5" ,
'cut_decays' :'T',
'auto_ptj_mjj': 'F', }
process_dir = new_process()
build_run_card(run_card_old=get_default_runcard(process_dir),
run_card_new='run_card.dat',
nevts=nevents,
rand_seed=randomSeed,
beamEnergy=beamEnergy,
extras=extras)
#---------------------------------------------------------------------------
# MG5 + Pythia8 setup and process (lhe) generation
#---------------------------------------------------------------------------
generate(run_card_loc='run_card.dat',param_card_loc=None,mode=mode,proc_dir=process_dir,run_name=name)
#--------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------------
stringy = 'madgraph.'+str(runArgs.runNumber)+'.MadGraph_'+str(name)
arrange_output(run_name=name,
proc_dir=process_dir,
outputDS=stringy+'._00001.events.tar.gz',
)
import os
if 'ATHENA_PROC_NUMBER' in os.environ:
evgenLog.info('Noticed that you have run with an athena MP-like whole-node setup. Will re-configure now to make sure that the remainder of the job runs serially.')
njobs = os.environ.pop('ATHENA_PROC_NUMBER')
# Try to modify the opts underfoot
if not hasattr(opts,'nprocs'): mglog.warning('Did not see option!')
else: opts.nprocs = 0
print opts
#### Shower
include("MC15JobOptions/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
include("MC15JobOptions/Pythia8_MadGraph.py")
# Dipole shower
genSeq.Pythia8.Commands += [
"SpaceShower:dipoleRecoil = on"]
evgenConfig.generators = ["MadGraph", "Pythia8", "EvtGen"]
evgenConfig.description = 'MadGraph WW->lvqq plus two EWK jets'
evgenConfig.keywords+=['SM','WW','2jet','VBS']
evgenConfig.inputfilecheck = stringy
evgenConfig.contact = ['Lailin Xu <lailin.xu@cern.ch>', 'Dimitris Varouchas <dimitris.varouchas@cern.ch>']
runArgs.inputGeneratorFile=stringy+'._00001.events.tar.gz'
## B filter/veto
include("MC15JobOptions/BHadronFilter.py")
filtSeq += HeavyFlavorBHadronFilter
filtSeq.Expression = "(not HeavyFlavorBHadronFilter)"
import MadGraphControl.MadGraph_NNPDF30NLO_Base_Fragment
from MadGraphControl.MadGraphUtils import *
nevents=runArgs.maxEvents*2
mode=0
#---------------------------------------------------------------------------
# MG5 Proc card
#---------------------------------------------------------------------------
fcard = open('proc_card_mg5.dat','w')
if runArgs.runNumber==364849:
fcard.write("""
import model sm
define p = g u c d s b u~ c~ d~ s~ b~
define j = g u c d s b u~ c~ d~ s~ b~
define l+ = e+ mu+ ta+
define l- = e- mu- ta-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
generate p p > j j w+ w- QCD=0 QED=4, w+ > l+ vl, w- > j j
add process p p > j j w+ w- QCD=0 QED=4, w- > l- vl~, w+ > j j
add process p p > j j w+ w+ QCD=0 QED=4, w+ > l+ vl, w+ > j j
add process p p > j j w- w- QCD=0 QED=4, w- > l- vl~, w- > j j
output -f
""")
fcard.close()
name="WWlvqq2jetEWK"
#----------------------------------------------------------------------------
# Run Number
#----------------------------------------------------------------------------
if not hasattr(runArgs,'runNumber'):
raise RunTimeError("No run number found.")
#----------------------------------------------------------------------------
# Random Seed
#----------------------------------------------------------------------------
randomSeed = 0
if hasattr(runArgs,'randomSeed'): randomSeed = runArgs.randomSeed
#----------------------------------------------------------------------------
# Beam energy
#----------------------------------------------------------------------------
if hasattr(runArgs,'ecmEnergy'):
beamEnergy = int(runArgs.ecmEnergy) / 2.
else:
raise RunTimeError("No center of mass energy found.")
#---------------------------------------------------------------------------
# Number of Events
#---------------------------------------------------------------------------
safefactor = 1.4 ## for Bfilter
if hasattr(runArgs,'maxEvents') and runArgs.maxEvents > 0: nevents = int(runArgs.maxEvents)*safefactor
else: nevents = nevents*safefactor
#---------------------------------------------------------------------------
# Number of Events
#---------------------------------------------------------------------------
skip_events=0
if hasattr(runArgs,'skipEvents'): skip_events=runArgs.skipEvents
#---------------------------------------------------------------------------
# MG5 Run Card
#---------------------------------------------------------------------------
extras = {
'asrwgtflavor':"5",
'lhe_version':"3.0",
'ptj':"15",
'ptb':"15",
'pta':"0",
'ptl':"4",
'misset':"10",
'etaj':"5",
'etab':"5",
'etal':"2.8",
'drjj':"0",
'drll':"0",
'draa':"0",
'draj':"0",
'drjl':"0",
'dral':"0",
'mmjj':"10",
'mmbb':"10",
'mmll':"40",
'maxjetflavor':"5" ,
'cut_decays' :'T',
'auto_ptj_mjj': 'F',}
process_dir = new_process()
build_run_card(run_card_old=get_default_runcard(process_dir),
run_card_new='run_card.dat',
nevts=nevents,
rand_seed=randomSeed,
beamEnergy=beamEnergy,
extras=extras)
#---------------------------------------------------------------------------
# MG5 + Pythia8 setup and process (lhe) generation
#---------------------------------------------------------------------------
generate(run_card_loc='run_card.dat',param_card_loc=None,mode=mode,proc_dir=process_dir,run_name=name)
#--------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------------
stringy = 'madgraph.'+str(runArgs.runNumber)+'.MadGraph_'+str(name)
arrange_output(run_name=name,
proc_dir=process_dir,
outputDS=stringy+'._00001.events.tar.gz',
)
import os
if 'ATHENA_PROC_NUMBER' in os.environ:
evgenLog.info('Noticed that you have run with an athena MP-like whole-node setup. Will re-configure now to make sure that the remainder of the job runs serially.')
njobs = os.environ.pop('ATHENA_PROC_NUMBER')
# Try to modify the opts underfoot
if not hasattr(opts,'nprocs'): mglog.warning('Did not see option!')
else: opts.nprocs = 0
print opts
#### Shower
include("MC15JobOptions/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
include("MC15JobOptions/Pythia8_MadGraph.py")
# Dipole shower
genSeq.Pythia8.Commands += [
"SpaceShower:dipoleRecoil = on"]
evgenConfig.generators = ["MadGraph", "Pythia8", "EvtGen"]
evgenConfig.description = 'MadGraph WW->lvqq plus two EWK jets'
evgenConfig.keywords+=['SM','WW','2jet','VBS']
evgenConfig.inputfilecheck = stringy
evgenConfig.contact = ['Lailin Xu <lailin.xu@cern.ch>', 'Dimitris Varouchas <dimitris.varouchas@cern.ch>']
evgenConfig.minevents = 2000
runArgs.inputGeneratorFile=stringy+'._00001.events.tar.gz'
## B filter/veto
include("MC15JobOptions/BHadronFilter.py")
filtSeq += HeavyFlavorBHadronFilter
filtSeq.Expression = "(HeavyFlavorBHadronFilter)"
import MadGraphControl.MadGraph_NNPDF30NLO_Base_Fragment
from MadGraphControl.MadGraphUtils import *
nevents=runArgs.maxEvents*2
mode=0
#---------------------------------------------------------------------------
# MG5 Proc card
#---------------------------------------------------------------------------
fcard = open('proc_card_mg5.dat','w')
if runArgs.runNumber==364850:
fcard.write("""
import model sm
define p = g u c d s b u~ c~ d~ s~ b~
define j = g u c d s b u~ c~ d~ s~ b~
define l+ = e+ mu+ ta+
define l- = e- mu- ta-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
generate p p > j j w+ z QCD=0 QED=4, w+ > l+ vl, z > j j
add process p p > j j w- z QCD=0 QED=4, w- > l- vl~, z > j j
output -f
""")
fcard.close()
name="WZlvqq2jetEWK"
#----------------------------------------------------------------------------
# Run Number
#----------------------------------------------------------------------------
if not hasattr(runArgs,'runNumber'):
raise RunTimeError("No run number found.")
#----------------------------------------------------------------------------
# Random Seed
#----------------------------------------------------------------------------
randomSeed = 0
if hasattr(runArgs,'randomSeed'): randomSeed = runArgs.randomSeed
#----------------------------------------------------------------------------
# Beam energy
#----------------------------------------------------------------------------
if hasattr(runArgs,'ecmEnergy'):
beamEnergy = int(runArgs.ecmEnergy) / 2.
else:
raise RunTimeError("No center of mass energy found.")
#---------------------------------------------------------------------------
# Number of Events
#---------------------------------------------------------------------------
safefactor = 1.1
if hasattr(runArgs,'maxEvents') and runArgs.maxEvents > 0: nevents = int(runArgs.maxEvents)*safefactor
else: nevents = nevents*safefactor
#---------------------------------------------------------------------------
# Number of Events
#---------------------------------------------------------------------------
skip_events=0
if hasattr(runArgs,'skipEvents'): skip_events=runArgs.skipEvents
#---------------------------------------------------------------------------
# MG5 Run Card
#---------------------------------------------------------------------------
extras = {
'asrwgtflavor':"5",
'lhe_version':"3.0",
'ptj':"15",
'ptb':"15",
'pta':"0",
'ptl':"4",
'misset':"10",
'etaj':"5",
'etab':"5",
'etal':"2.8",
'drjj':"0",
'drll':"0",
'draa':"0",
'draj':"0",
'drjl':"0",
'dral':"0",
'mmjj':"10",
'mmbb':"10",
'mmll':"40",
'maxjetflavor':"5" ,
'cut_decays' :'T',
'auto_ptj_mjj': 'F',}
process_dir = new_process()
build_run_card(run_card_old=get_default_runcard(process_dir),
run_card_new='run_card.dat',
nevts=nevents,
rand_seed=randomSeed,
beamEnergy=beamEnergy,
extras=extras)
#---------------------------------------------------------------------------
# MG5 + Pythia8 setup and process (lhe) generation
#---------------------------------------------------------------------------
generate(run_card_loc='run_card.dat',param_card_loc=None,mode=mode,proc_dir=process_dir,run_name=name)
#--------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------------
stringy = 'madgraph.'+str(runArgs.runNumber)+'.MadGraph_'+str(name)
arrange_output(run_name=name,
proc_dir=process_dir,
outputDS=stringy+'._00001.events.tar.gz',
)
#### Shower
include("MC15JobOptions/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
include("MC15JobOptions/Pythia8_MadGraph.py")
# Dipole shower
genSeq.Pythia8.Commands += [
"SpaceShower:dipoleRecoil = on"]
evgenConfig.generators = ["MadGraph", "Pythia8", "EvtGen"]
evgenConfig.description = 'MadGraph WZ->lvqq plus two EWK jets'
evgenConfig.keywords+=['SM','WZ','2jet','VBS']
evgenConfig.inputfilecheck = stringy
evgenConfig.contact = ['Lailin Xu <lailin.xu@cern.ch>', 'Dimitris Varouchas <dimitris.varouchas@cern.ch>']
runArgs.inputGeneratorFile=stringy+'._00001.events.tar.gz'
import MadGraphControl.MadGraph_NNPDF30NLO_Base_Fragment
from MadGraphControl.MadGraphUtils import *
nevents=runArgs.maxEvents*2
mode=0
#---------------------------------------------------------------------------
# MG5 Proc card
#---------------------------------------------------------------------------
fcard = open('proc_card_mg5.dat','w')
if runArgs.runNumber==364851:
fcard.write("""
import model sm
define p = g u c d s b u~ c~ d~ s~ b~
define j = g u c d s b u~ c~ d~ s~ b~
define l+ = e+ mu+
define l- = e- mu-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
define w = w+ w-
generate p p > j j w z QCD=0 QED=4, z > vl vl~, w > j j
output -f
""")
fcard.close()
name="WZvvqq2jetEWK"
#----------------------------------------------------------------------------
# Run Number
#----------------------------------------------------------------------------
if not hasattr(runArgs,'runNumber'):
raise RunTimeError("No run number found.")
#----------------------------------------------------------------------------
# Random Seed
#----------------------------------------------------------------------------
randomSeed = 0
if hasattr(runArgs,'randomSeed'): randomSeed = runArgs.randomSeed
#----------------------------------------------------------------------------
# Beam energy
#----------------------------------------------------------------------------
if hasattr(runArgs,'ecmEnergy'):
beamEnergy = int(runArgs.ecmEnergy) / 2.
else:
raise RunTimeError("No center of mass energy found.")
#---------------------------------------------------------------------------
# Number of Events
#---------------------------------------------------------------------------
safefactor = 1.1
if hasattr(runArgs,'maxEvents') and runArgs.maxEvents > 0: nevents = int(runArgs.maxEvents)*safefactor
else: nevents = nevents*safefactor
#---------------------------------------------------------------------------
# Number of Events
#---------------------------------------------------------------------------
skip_events=0
if hasattr(runArgs,'skipEvents'): skip_events=runArgs.skipEvents
#---------------------------------------------------------------------------
# MG5 Run Card
#---------------------------------------------------------------------------
extras = {
'asrwgtflavor':"5",
'lhe_version':"3.0",
'ptj':"15",
'ptb':"15",
'pta':"0",
'ptl':"4",
'misset':"10",
'etaj':"5",
'etab':"5",
'etal':"2.8",
'drjj':"0",
'drll':"0",
'draa':"0",
'draj':"0",
'drjl':"0",
'dral':"0",
'mmjj':"10",
'mmbb':"10",
'mmll':"40",
'maxjetflavor':"5" ,
'cut_decays' :'T',
'auto_ptj_mjj': 'F',}
process_dir = new_process()
build_run_card(run_card_old=get_default_runcard(process_dir),
run_card_new='run_card.dat',
nevts=nevents,
rand_seed=randomSeed,
beamEnergy=beamEnergy,
extras=extras)
#---------------------------------------------------------------------------
# MG5 + Pythia8 setup and process (lhe) generation
#---------------------------------------------------------------------------
generate(run_card_loc='run_card.dat',param_card_loc=None,mode=mode,proc_dir=process_dir,run_name=name)
#--------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------------
stringy = 'madgraph.'+str(runArgs.runNumber)+'.MadGraph_'+str(name)
arrange_output(run_name=name,
proc_dir=process_dir,
outputDS=stringy+'._00001.events.tar.gz',
)
#### Shower
include("MC15JobOptions/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
include("MC15JobOptions/Pythia8_MadGraph.py")
# Dipole shower
genSeq.Pythia8.Commands += [
"SpaceShower:dipoleRecoil = on"]
evgenConfig.generators = ["MadGraph", "Pythia8", "EvtGen"]
evgenConfig.description = 'MadGraph WZ->vvqq plus two EWK jets'
evgenConfig.keywords+=['SM','WZ','2jet','VBS']
evgenConfig.inputfilecheck = stringy
evgenConfig.contact = ['Lailin Xu <lailin.xu@cern.ch>', 'Dimitris Varouchas <dimitris.varouchas@cern.ch>']
runArgs.inputGeneratorFile=stringy+'._00001.events.tar.gz'
import MadGraphControl.MadGraph_NNPDF30NLO_Base_Fragment
from MadGraphControl.MadGraphUtils import *
nevents=runArgs.maxEvents*2
mode=0
#---------------------------------------------------------------------------
# MG5 Proc card
#---------------------------------------------------------------------------
fcard = open('proc_card_mg5.dat','w')
if runArgs.runNumber==364852:
fcard.write("""
import model sm
define p = g u c d s b u~ c~ d~ s~ b~
define j = g u c d s b u~ c~ d~ s~ b~
define l+ = e+ mu+
define l- = e- mu-
define vl = vt
define vl~ = vt~
define w = w+ w-
generate p p > j j w z QCD=0 QED=4, z > e+ e-, w > j j
add process p p > j j w z QCD=0 QED=4, z > mu+ mu-, w > j j
output -f
""")