Commit d1ea739a authored by Jan Kretzschmar's avatar Jan Kretzschmar
Browse files

FxFx Zee+jets low mll

parent 5d0c52f0
Pipeline #3458227 passed with stages
in 1 minute and 12 seconds
This diff is collapsed.
import MadGraphControl.MadGraphUtils
from MadGraphControl.MadGraphUtils import *
#Job bookkeping infos
evgenConfig.description = 'aMcAtNlo Zee+3Np HT2biased FxFx, mll=10-40GeV'
evgenConfig.contact = ["francesco.giuli@cern.ch","federico.sforza@cern.ch","jan.kretzschmar@cern.ch"]
evgenConfig.keywords += ['Z','jets']
evgenConfig.generators += ["aMcAtNlo"]
# General settings
evgenConfig.nEventsPerJob = 32000
nevents = runArgs.maxEvents if runArgs.maxEvents>0 else evgenConfig.nEventsPerJob
#Madgraph run card and shower settings
# Shower/merging settings
maxjetflavor=5
parton_shower='PYTHIA8'
# MG Particle cuts
mllcut=10
gridpack_mode=True
if not is_gen_from_gridpack():
process = """
import model loop_sm-no_b_mass
define p = p b b~
define j = p
generate p p > e+ e- [QCD] @0
add process p p > e+ e- j [QCD] @1
add process p p > e+ e- j j [QCD] @2
add process p p > e+ e- j j j [QCD] @3
output -f"""
process_dir = str(new_process(process))
else:
process_dir = str(MADGRAPH_GRIDPACK_LOCATION)
MadGraphControl.MadGraphUtils.MADGRAPH_PDFSETTING={
'central_pdf':325100, # the lhapf id of the central pdf, see https://lhapdf.hepforge.org/pdfsets - NNDP31 LUXqed
'pdf_variations':[325100], # list of pdfs ids for which all variations (error sets) will be included as weights - NNDP31 LUXqed
'alternative_pdfs':[304400,13000,25300,14000,14100,14200,61200,42560,303200,27400,331500], # NNPDF31 hessian, CT14, MMHT14, CT18, CT18Z, CT18A, HERAPDF2.0, ABMP16 5FS, NNPDF30 hessian, MSHT20, NNPDF40_nnlo_as_01180_hessian
'scale_variations':[0.5,1,2], # variations of muR and muF wrt the central scale, all combinations of muF and muR will be evaluated
}
#Fetch default run_card.dat and set parameters
settings = {
'event_norm' : 'bias',
'maxjetflavor' : int(maxjetflavor),
'parton_shower' : parton_shower,
'nevents' : int(nevents),
'ickkw' : 3,
'jetradius' : 1.0,
'ptj' : 8,
'etaj' : 10,
'mll_sf' : mllcut,
'mll' : mllcut,
}
modify_run_card(process_dir=process_dir,runArgs=runArgs,settings=settings)
input_events=process_dir+'/Events/GridRun_'+str(runArgs.randomSeed)+'/events.lhe.gz'
paramToCopy = 'param_card.Torrielli.dat'
paramDestination = process_dir+'/Cards/param_card.dat'
paramfile = subprocess.Popen(['get_files','-data',paramToCopy])
paramfile.wait()
if not os.access(paramToCopy,os.R_OK):
raise RuntimeError("ERROR: Could not get %s"%(paramToCopy))
shutil.copy(paramToCopy,paramDestination)
scaleToCopy = 'cuts_HT2bias.f'
scaleDestination = process_dir+'/SubProcesses/cuts.f'
scalefile = subprocess.Popen(['get_files','-data',scaleToCopy])
scalefile.wait()
if not os.access(scaleToCopy,os.R_OK):
raise RuntimeError("ERROR: Could not get %s"%(scaleToCopy))
shutil.copy(scaleToCopy,scaleDestination)
generate(required_accuracy=0.0001,process_dir=process_dir,runArgs=runArgs,grid_pack=gridpack_mode)
arrange_output(process_dir=process_dir,runArgs=runArgs,lhe_version=3,saveProcDir=True)
/eos/user/j/jkretz/tarballs/mc_13TeV.MG_Zee_FxFx_3jets_HT2bias_10M40_LHE.GRID.tar.gz
\ No newline at end of file
######################################################################
## PARAM_CARD AUTOMATICALY GENERATED BY MG5 FOLLOWING UFO MODEL ####
######################################################################
## ##
## Width set on Auto will be computed following the information ##
## present in the decay.py files of the model. ##
## See arXiv:1402.1178 for more details. ##
## ##
######################################################################
###################################
## INFORMATION FOR LOOP
###################################
Block loop
1 9.118800e+01 # MU_R
###################################
## INFORMATION FOR MASS
###################################
Block mass
6 1.730000e+02 # MT
15 1.777000e+00 # MTA
23 9.118800e+01 # MZ
25 1.250000e+02 # MH
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
1 0.000000 # d : 0.0
2 0.000000 # u : 0.0
3 0.000000 # s : 0.0
4 0.000000 # c : 0.0
5 0.000000 # b : 0.0
11 0.000000 # e- : 0.0
12 0.000000 # ve : 0.0
13 0.000000 # mu- : 0.0
14 0.000000 # vm : 0.0
16 0.000000 # vt : 0.0
21 0.000000 # g : 0.0
22 0.000000 # a : 0.0
24 80.419002 # w+ : cmath.sqrt(MZ__exp__2/2. + cmath.sqrt(MZ__exp__4/4
###################################
## INFORMATION FOR SMINPUTS
###################################
Block sminputs
1 1.325070e+02 # aEWM1
2 1.166390e-05 # Gf
3 1.180000e-01 # aS
###################################
## INFORMATION FOR YUKAWA
###################################
Block yukawa
6 1.730000e+02 # ymt
15 1.777000e+00 # ymtau
###################################
## INFORMATION FOR DECAY
###################################
DECAY 6 1.491500e+00 # WT
DECAY 23 2.441404e+00 # WZ
DECAY 24 2.047600e+00 # WW
DECAY 25 6.382339e-03 # WH
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
DECAY 1 0.000000 # d : 0.0
DECAY 2 0.000000 # u : 0.0
DECAY 3 0.000000 # s : 0.0
DECAY 4 0.000000 # c : 0.0
DECAY 5 0.000000 # b : 0.0
DECAY 11 0.000000 # e- : 0.0
DECAY 12 0.000000 # ve : 0.0
DECAY 13 0.000000 # mu- : 0.0
DECAY 14 0.000000 # vm : 0.0
DECAY 15 0.000000 # ta- : 0.0
DECAY 16 0.000000 # vt : 0.0
DECAY 21 0.000000 # g : 0.0
DECAY 22 0.000000 # a : 0.0
evgenConfig.description = 'aMcAtNlo Zee+0,1,2,3j NLO FxFx HT2-biased BFilter, low mass mll=10-40GeV'
evgenConfig.contact = ["francesco.giuli@cern.ch","federico.sforza@cern.ch", "jan.kretzschmar@cern.ch"]
evgenConfig.keywords += ['SM', 'Z', 'electron', 'jets', 'NLO']
evgenConfig.generators += ["aMcAtNlo", "Pythia8"]
# FxFx match+merge eff: 27.4%
# BFilter+dilep eff ~4.3%
# one LHE file contains 32000 events
evgenConfig.nEventsPerJob = 1000
evgenConfig.inputFilesPerJob = 3
#### Shower: Py8 with A14 Tune, with modifications to make it simil-NLO
include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
include("Pythia8_i/Pythia8_aMcAtNlo.py")
# FxFx Matching settings, according to authors prescriptions (NB: it changes tune pars)
PYTHIA8_nJetMax=3
PYTHIA8_qCut=20.
print "PYTHIA8_nJetMax = %i"%PYTHIA8_nJetMax
print "PYTHIA8_qCut = %i"%PYTHIA8_qCut
include("Pythia8_i/Pythia8_FxFx_A14mod.py")
include("GeneratorFilters/FindJets.py")
CreateJets(prefiltSeq, 0.4)
include("GeneratorFilters/BHadronFilter.py")
HeavyFlavorBHadronFilter.BottomEtaMax = 2.9
HeavyFlavorBHadronFilter.BottomPtMin = 5*GeV
HeavyFlavorBHadronFilter.RequireTruthJet = True
HeavyFlavorBHadronFilter.JetPtMin = 10*GeV
HeavyFlavorBHadronFilter.JetEtaMax = 2.9
HeavyFlavorBHadronFilter.TruthContainerName = "AntiKt4TruthJets"
HeavyFlavorBHadronFilter.DeltaRFromTruth = 0.4
filtSeq += HeavyFlavorBHadronFilter
include("GeneratorFilters/MultiLeptonFilter.py")
MultiLeptonFilter = filtSeq.MultiLeptonFilter
MultiLeptonFilter.Ptcut = 5000.0
MultiLeptonFilter.NLeptons = 2
evgenConfig.description = 'aMcAtNlo Zee+0,1,2,3j NLO FxFx HT2-biased CFilterBVeto, low mass mll=10-40GeV'
evgenConfig.contact = ["francesco.giuli@cern.ch","federico.sforza@cern.ch", "jan.kretzschmar@cern.ch"]
evgenConfig.keywords += ['SM', 'Z', 'electron', 'jets', 'NLO']
evgenConfig.generators += ["aMcAtNlo", "Pythia8"]
# FxFx match+merge eff: 27.4%
# CFilterBVeto+dilep - eff 17.2%
# one LHE file contains 32000 events
evgenConfig.nEventsPerJob = 2000
evgenConfig.inputFilesPerJob = 2
#### Shower: Py8 with A14 Tune, with modifications to make it simil-NLO
include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
include("Pythia8_i/Pythia8_aMcAtNlo.py")
# FxFx Matching settings, according to authors prescriptions (NB: it changes tune pars)
PYTHIA8_nJetMax=3
PYTHIA8_qCut=20.
print "PYTHIA8_nJetMax = %i"%PYTHIA8_nJetMax
print "PYTHIA8_qCut = %i"%PYTHIA8_qCut
include("Pythia8_i/Pythia8_FxFx_A14mod.py")
include("GeneratorFilters/FindJets.py")
CreateJets(prefiltSeq, 0.4)
include("GeneratorFilters/BHadronFilter.py")
HeavyFlavorBHadronFilter.BottomEtaMax = 2.9
HeavyFlavorBHadronFilter.BottomPtMin = 5*GeV
HeavyFlavorBHadronFilter.RequireTruthJet = True
HeavyFlavorBHadronFilter.JetPtMin = 10*GeV
HeavyFlavorBHadronFilter.JetEtaMax = 2.9
HeavyFlavorBHadronFilter.TruthContainerName = "AntiKt4TruthJets"
HeavyFlavorBHadronFilter.DeltaRFromTruth = 0.4
filtSeq += HeavyFlavorBHadronFilter
include("GeneratorFilters/CHadronPt4Eta3_Filter.py")
filtSeq += HeavyFlavorCHadronPt4Eta3_Filter
include("GeneratorFilters/MultiLeptonFilter.py")
MultiLeptonFilter = filtSeq.MultiLeptonFilter
MultiLeptonFilter.Ptcut = 5000.0
MultiLeptonFilter.NLeptons = 2
filtSeq.Expression = "(not HeavyFlavorBHadronFilter) and (HeavyFlavorCHadronPt4Eta3_Filter) and (MultiLeptonFilter)"
evgenConfig.description = 'aMcAtNlo Zee+0,1,2,3j NLO FxFx HT2-biased CVetoBVeto, low mass mll=10-40GeV'
evgenConfig.contact = ["francesco.giuli@cern.ch","federico.sforza@cern.ch", "jan.kretzschmar@cern.ch"]
evgenConfig.keywords += ['SM', 'Z', 'electron', 'jets', 'NLO']
evgenConfig.generators += ["aMcAtNlo", "Pythia8"]
# FxFx match+merge eff: 27.4%
# CVetoBVeto+dilep eff 44.8%
# one LHE file contains 32000 events
evgenConfig.nEventsPerJob = 10000
evgenConfig.inputFilesPerJob = 3
#### Shower: Py8 with A14 Tune, with modifications to make it simil-NLO
include("Pythia8_i/Pythia8_A14_NNPDF23LO_EvtGen_Common.py")
include("Pythia8_i/Pythia8_aMcAtNlo.py")
# FxFx Matching settings, according to authors prescriptions (NB: it changes tune pars)
PYTHIA8_nJetMax=3
PYTHIA8_qCut=20.
print "PYTHIA8_nJetMax = %i"%PYTHIA8_nJetMax
print "PYTHIA8_qCut = %i"%PYTHIA8_qCut
include("Pythia8_i/Pythia8_FxFx_A14mod.py")
include("GeneratorFilters/FindJets.py")
CreateJets(prefiltSeq, 0.4)
include("GeneratorFilters/BHadronFilter.py")
HeavyFlavorBHadronFilter.BottomEtaMax = 2.9
HeavyFlavorBHadronFilter.BottomPtMin = 5*GeV
HeavyFlavorBHadronFilter.RequireTruthJet = True
HeavyFlavorBHadronFilter.JetPtMin = 10*GeV
HeavyFlavorBHadronFilter.JetEtaMax = 2.9
HeavyFlavorBHadronFilter.TruthContainerName = "AntiKt4TruthJets"
HeavyFlavorBHadronFilter.DeltaRFromTruth = 0.4
filtSeq += HeavyFlavorBHadronFilter
include("GeneratorFilters/CHadronPt4Eta3_Filter.py")
filtSeq += HeavyFlavorCHadronPt4Eta3_Filter
include("GeneratorFilters/MultiLeptonFilter.py")
MultiLeptonFilter = filtSeq.MultiLeptonFilter
MultiLeptonFilter.Ptcut = 5000.0
MultiLeptonFilter.NLeptons = 2
filtSeq.Expression = "(not HeavyFlavorBHadronFilter) and (not HeavyFlavorCHadronPt4Eta3_Filter) and (MultiLeptonFilter)"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment