From c8ad25763b8008e7e2fc80cd730e2429e2f3b736 Mon Sep 17 00:00:00 2001 From: bistapf <79460851+bistapf@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:45:53 +0100 Subject: [PATCH] Fix jet matching with Pythia Versions later than 8.3 (#144) * add code for jet matching in pythia > v8.3 * Add a simple technial test for jet matching --------- Co-authored-by: Thomas Madlener --- .pre-commit-config.yaml | 2 +- examples/data/events.lhe | 626 ++++++++++++++++++ .../data/p8_pp_tt012j_5f_HT_25000_35000.cmd | 33 + standalone/src/DelphesPythia8Reader.h | 16 +- tests/CMakeLists.txt | 10 + 5 files changed, 679 insertions(+), 8 deletions(-) create mode 100644 examples/data/events.lhe create mode 100644 examples/data/p8_pp_tt012j_5f_HT_25000_35000.cmd diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1ce2ea3..84706861 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: hooks: - id: mixed-line-ending - id: trailing-whitespace - exclude: (doc/ReleaseNotes.md) + exclude: (doc/ReleaseNotes.md|examples/data/events.lhe) - repo: local hooks: - id: clang-format diff --git a/examples/data/events.lhe b/examples/data/events.lhe new file mode 100644 index 00000000..f8e9856d --- /dev/null +++ b/examples/data/events.lhe @@ -0,0 +1,626 @@ + +
+ + +#2.5.5 + + +#************************************************************ +#* MadGraph5_aMC@NLO * +#* * +#* * * * +#* * * * * * +#* * * * * 5 * * * * * +#* * * * * * +#* * * * +#* * +#* * +#* VERSION 2.5.5 2017-05-26 * +#* * +#* The MadGraph5_aMC@NLO Development Team - Find us at * +#* https://server06.fynu.ucl.ac.be/projects/madgraph * +#* * +#************************************************************ +#* * +#* Command File for MadGraph5_aMC@NLO * +#* * +#* run as ./bin/mg5_aMC filename * +#* * +#************************************************************ +set group_subprocesses Auto +set ignore_six_quark_processes False +set loop_optimized_output True +set low_mem_multicore_nlo_generation False +set loop_color_flows False +set gauge unitary +set complex_mass_scheme False +set max_npoint_for_channel 0 +import model sm +define p = g u c d s u~ c~ d~ s~ +define j = g u c d s u~ c~ d~ s~ +define l+ = e+ mu+ +define l- = e- mu- +define vl = ve vm vt +define vl~ = ve~ vm~ vt~ +import model sm-no_b_mass +define p = 21 2 4 1 3 -2 -4 -1 -3 5 -5 +define j = p +define lept = l+ l- vl vl~ +define bos = Z W+ W- a +define top = t t~ +define bosh = Z W+ W- +generate p p > top top $ top bos h QED=0 @0 +add process p p > top top j $ top bos h QED=0 @1 +add process p p > top top j j $ top bos h QED=0 @2 +output pp_tt012j_5f_HT_25000_35000 + + +#********************************************************************* +# MadGraph/MadEvent * +# http://madgraph.hep.uiuc.edu * +# * +# proc_card.dat * +#********************************************************************* +# * +# This Files is generated by MADGRAPH 5 * +# * +# WARNING: This Files is generated for MADEVENT (compatibility issue)* +# This files is NOT a valid MG4 proc_card.dat * +# Running this in MG4 will NEVER reproduce the result of MG5* +# * +#********************************************************************* +#********************************************************************* +# Process(es) requested : mg2 input * +#********************************************************************* +# Begin PROCESS # This is TAG. Do not modify this line +p p > top top $ top bos h @0 #Process +# Be carefull the coupling are here in MG5 convention +QED=0 + +end_coup # End the couplings input + +done # this tells MG there are no more procs +# End PROCESS # This is TAG. Do not modify this line +#********************************************************************* +# Model information * +#********************************************************************* +# Begin MODEL # This is TAG. Do not modify this line +sm-no_b_mass +# End MODEL # This is TAG. Do not modify this line +#********************************************************************* +# Start multiparticle definitions * +#********************************************************************* +# Begin MULTIPARTICLES # This is TAG. Do not modify this line + +# End MULTIPARTICLES # This is TAG. Do not modify this line + + +#********************************************************************* +# MadGraph5_aMC@NLO * +# * +# run_card.dat MadEvent * +# * +# This file is used to set the parameters of the run. * +# * +# Some notation/conventions: * +# * +# Lines starting with a '# ' are info or comments * +# * +# mind the format: value = variable ! comment * +#********************************************************************* +# +#******************* +# Running parameters +#******************* +# +#********************************************************************* +# Tag name for the run (one word) * +#********************************************************************* + tag_1 = run_tag ! name of the run +#********************************************************************* +# Number of events and rnd seed * +# Warning: Do not generate more than 1M events in a single run * +# If you want to run Pythia, avoid more than 50k events in a run. * +#********************************************************************* + 100 = nevents ! Number of unweighted events requested + 88187982 = iseed ! rnd seed (0=assigned automatically=default)) +#********************************************************************* +# Collider type and energy * +# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=photon from proton, * +# 3=photon from electron * +#********************************************************************* + 1 = lpp1 ! beam 1 type + 1 = lpp2 ! beam 2 type + 50000.0 = ebeam1 ! beam 1 total energy in GeV + 50000.0 = ebeam2 ! beam 2 total energy in GeV +#********************************************************************* +# Beam polarization from -100 (left-handed) to 100 (right-handed) * +#********************************************************************* + 0.0 = polbeam1 ! beam polarization for beam 1 + 0.0 = polbeam2 ! beam polarization for beam 2 +#********************************************************************* +# PDF CHOICE: this automatically fixes also alpha_s and its evol. * +#********************************************************************* + lhapdf = pdlabel ! PDF set + 260000 = lhaid ! if pdlabel=lhapdf, this is the lhapdf number +#********************************************************************* +# Renormalization and factorization scales * +#********************************************************************* + False = fixed_ren_scale ! if .true. use fixed ren scale + False = fixed_fac_scale ! if .true. use fixed fac scale + 91.188 = scale ! fixed ren scale + 91.188 = dsqrt_q2fact1 ! fixed fact scale for pdf1 + 91.188 = dsqrt_q2fact2 ! fixed fact scale for pdf2 + -1 = dynamical_scale_choice ! Choose one of the preselected dynamical choices + 1.0 = scalefact ! scale factor for event-by-event scales +#********************************************************************* +# Type and output format +#********************************************************************* + True = gridpack !True = setting up the grid pack + -1.0 = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written) + 3.0 = lhe_version ! Change the way clustering information pass to shower. + True = clusinfo ! include clustering tag in output + average = event_norm ! average/sum. Normalization of the weight in the LHEF + +#********************************************************************* +# Matching parameter (MLM only) +#********************************************************************* + 1 = ickkw ! 0 no matching, 1 MLM + 1.0 = alpsfact ! scale factor for QCD emission vx + False = chcluster ! cluster only according to channel diag + 5 = asrwgtflavor ! highest quark flavor for a_s reweight + False = auto_ptj_mjj ! Automatic setting of ptj and mjj if xqcut >0 + ! (turn off for VBF and single top processes) + 60.0 = xqcut ! minimum kt jet measure between partons +#********************************************************************* +# +#********************************************************************* +# handling of the helicities: +# 0: sum over all helicities +# 1: importance sampling over helicities +#********************************************************************* + 0 = nhel ! using helicities importance sampling or not. +#********************************************************************* +# Generation bias, check the wiki page below for more information: * +# 'cp3.irmp.ucl.ac.be/projects/madgraph/wiki/LOEventGenerationBias' * +#********************************************************************* + None = bias_module ! Bias type of bias, [None, ptj_bias, -custom_folder-] + {} = bias_parameters ! Specifies the parameters of the module. +# +#******************************* +# Parton level cuts definition * +#******************************* +# +# +#********************************************************************* +# BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$" and decay +#********************************************************************* + 30.0 = bwcutoff ! (M+/-bwcutoff*Gamma) +#********************************************************************* +# Apply pt/E/eta/dr/mij/kt_durham cuts on decay products or not +# (note that etmiss/ptll/ptheavy/ht/sorted cuts always apply) +#********************************************************************* + False = cut_decays ! Cut decay products +#********************************************************************* +# Standard Cuts * +#********************************************************************* +# Minimum and maximum pt's (for max, -1 means no cut) * +#********************************************************************* + 5.0 = ptj ! minimum pt for the jets + 5.0 = ptb ! minimum pt for the b + 5.0 = pta ! minimum pt for the photons + 5.0 = ptl ! minimum pt for the charged leptons + 0.0 = misset ! minimum missing Et (sum of neutrino's momenta) + 0.0 = ptheavy ! minimum pt for one heavy final state + -1.0 = ptjmax ! maximum pt for the jets + -1.0 = ptbmax ! maximum pt for the b + -1.0 = ptamax ! maximum pt for the photons + -1.0 = ptlmax ! maximum pt for the charged leptons + -1.0 = missetmax ! maximum missing Et (sum of neutrino's momenta) +#********************************************************************* +# Minimum and maximum E's (in the center of mass frame) * +#********************************************************************* + 0.0 = ej ! minimum E for the jets + 0.0 = eb ! minimum E for the b + 0.0 = ea ! minimum E for the photons + 0.0 = el ! minimum E for the charged leptons + -1.0 = ejmax ! maximum E for the jets + -1.0 = ebmax ! maximum E for the b + -1.0 = eamax ! maximum E for the photons + -1.0 = elmax ! maximum E for the charged leptons +#********************************************************************* +# Maximum and minimum absolute rapidity (for max, -1 means no cut) * +#********************************************************************* + 8.0 = etaj ! max rap for the jets + 8.0 = etab ! max rap for the b + 8.0 = etaa ! max rap for the photons + 8.0 = etal ! max rap for the charged leptons + 0.0 = etajmin ! min rap for the jets + 0.0 = etabmin ! min rap for the b + 0.0 = etaamin ! min rap for the photons + 0.0 = etalmin ! main rap for the charged leptons +#********************************************************************* +# Minimum and maximum DeltaR distance * +#********************************************************************* + 0.0 = drjj ! min distance between jets + 0.001 = drbb ! min distance between b's + 0.001 = drll ! min distance between leptons + 0.001 = draa ! min distance between gammas + 0.001 = drbj ! min distance between b and jet + 0.3 = draj ! min distance between gamma and jet + 0.0 = drjl ! min distance between jet and lepton + 0.001 = drab ! min distance between gamma and b + 0.001 = drbl ! min distance between b and lepton + 0.3 = dral ! min distance between gamma and lepton + -1.0 = drjjmax ! max distance between jets + -1.0 = drbbmax ! max distance between b's + -1.0 = drllmax ! max distance between leptons + -1.0 = draamax ! max distance between gammas + -1.0 = drbjmax ! max distance between b and jet + -1.0 = drajmax ! max distance between gamma and jet + -1.0 = drjlmax ! max distance between jet and lepton + -1.0 = drabmax ! max distance between gamma and b + -1.0 = drblmax ! max distance between b and lepton + -1.0 = dralmax ! maxdistance between gamma and lepton +#********************************************************************* +# Minimum and maximum invariant mass for pairs * +# WARNING: for four lepton final state mmll cut require to have * +# different lepton masses for each flavor! * +#********************************************************************* + 0.0 = mmjj ! min invariant mass of a jet pair + 0.0 = mmbb ! min invariant mass of a b pair + 0.0 = mmaa ! min invariant mass of gamma gamma pair + 20.0 = mmll ! min invariant mass of l+l- (same flavour) lepton pair + -1.0 = mmjjmax ! max invariant mass of a jet pair + -1.0 = mmbbmax ! max invariant mass of a b pair + -1.0 = mmaamax ! max invariant mass of gamma gamma pair + -1.0 = mmllmax ! max invariant mass of l+l- (same flavour) lepton pair +#********************************************************************* +# Minimum and maximum invariant mass for all letpons * +#********************************************************************* + 0.0 = mmnl ! min invariant mass for all letpons (l+- and vl) + -1.0 = mmnlmax ! max invariant mass for all letpons (l+- and vl) +#********************************************************************* +# Minimum and maximum pt for 4-momenta sum of leptons * +#********************************************************************* + 0.0 = ptllmin ! Minimum pt for 4-momenta sum of leptons(l and vl) + -1.0 = ptllmax ! Maximum pt for 4-momenta sum of leptons(l and vl) +#********************************************************************* +# Inclusive cuts * +#********************************************************************* + 0.0 = xptj ! minimum pt for at least one jet + 0.0 = xptb ! minimum pt for at least one b + 0.0 = xpta ! minimum pt for at least one photon + 0.0 = xptl ! minimum pt for at least one charged lepton +#********************************************************************* +# Control the pt's of the jets sorted by pt * +#********************************************************************* + 0.0 = ptj1min ! minimum pt for the leading jet in pt + 0.0 = ptj2min ! minimum pt for the second jet in pt + 0.0 = ptj3min ! minimum pt for the third jet in pt + 0.0 = ptj4min ! minimum pt for the fourth jet in pt + -1.0 = ptj1max ! maximum pt for the leading jet in pt + -1.0 = ptj2max ! maximum pt for the second jet in pt + -1.0 = ptj3max ! maximum pt for the third jet in pt + -1.0 = ptj4max ! maximum pt for the fourth jet in pt + 0 = cutuse ! reject event if fails any (0) / all (1) jet pt cuts +#********************************************************************* +# Control the pt's of leptons sorted by pt * +#********************************************************************* + 0.0 = ptl1min ! minimum pt for the leading lepton in pt + 0.0 = ptl2min ! minimum pt for the second lepton in pt + 0.0 = ptl3min ! minimum pt for the third lepton in pt + 0.0 = ptl4min ! minimum pt for the fourth lepton in pt + -1.0 = ptl1max ! maximum pt for the leading lepton in pt + -1.0 = ptl2max ! maximum pt for the second lepton in pt + -1.0 = ptl3max ! maximum pt for the third lepton in pt + -1.0 = ptl4max ! maximum pt for the fourth lepton in pt +#********************************************************************* +# Control the Ht(k)=Sum of k leading jets * +#********************************************************************* + 0.0 = htjmin ! minimum jet HT=Sum(jet pt) + -1.0 = htjmax ! maximum jet HT=Sum(jet pt) + 25000.0 = ihtmin !inclusive Ht for all partons (including b) + 35000.0 = ihtmax !inclusive Ht for all partons (including b) + 0.0 = ht2min ! minimum Ht for the two leading jets + 0.0 = ht3min ! minimum Ht for the three leading jets + 0.0 = ht4min ! minimum Ht for the four leading jets + -1.0 = ht2max ! maximum Ht for the two leading jets + -1.0 = ht3max ! maximum Ht for the three leading jets + -1.0 = ht4max ! maximum Ht for the four leading jets +#*********************************************************************** +# Photon-isolation cuts, according to hep-ph/9801442 * +# When ptgmin=0, all the other parameters are ignored * +# When ptgmin>0, pta and draj are not going to be used * +#*********************************************************************** + 0.0 = ptgmin ! Min photon transverse momentum + 0.4 = r0gamma ! Radius of isolation code + 1.0 = xn ! n parameter of eq.(3.4) in hep-ph/9801442 + 1.0 = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442 + True = isoem ! isolate photons from EM energy (photons and leptons) +#********************************************************************* +# WBF cuts * +#********************************************************************* + 0.0 = xetamin ! minimum rapidity for two jets in the WBF case + 0.0 = deltaeta ! minimum rapidity for two jets in the WBF case +#*********************************************************************** +# Turn on either the ktdurham or ptlund cut to activate * +# CKKW(L) merging with Pythia8 [arXiv:1410.3012, arXiv:1109.4829] * +#*********************************************************************** + -1.0 = ktdurham + 0.4 = dparameter + -1.0 = ptlund + 1, 2, 3, 4, 5, 6, 21 = pdgs_for_merging_cut ! PDGs for two cuts above +#********************************************************************* +# maximal pdg code for quark to be considered as a light jet * +# (otherwise b cuts are applied) * +#********************************************************************* + 5 = maxjetflavor ! Maximum jet pdg code +#********************************************************************* +# +#********************************************************************* +# Store info for systematics studies * +# WARNING: Do not use for interference type of computation * +#********************************************************************* + False = use_syst ! Enable systematics studies +# +#************************************** +# Parameter of the systematics study +# will be used by SysCalc (if installed) +#************************************** +# + 0.5 1 2 = sys_scalefact # factorization/renormalization scale factor + 0.5 1 2 = sys_alpsfact # \alpha_s emission scale factors + auto = sys_matchscale # variation of merging scale +# PDF sets and number of members (0 or none for all members). + NNPDF23_lo_as_0130_qed = sys_pdf # list of pdf sets +# MSTW2008nlo68cl.LHgrid 1 = sys_pdf +# + + +###################################################################### +## 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 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. - (aEW*cmath.pi*MZ__exp__2)/(Gf*sqrt__2))) + +################################### +## 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 + +## END BANNER## + +# Number of Events : 10000 +# Integrated weight (pb) : 0.42449E-03 +# Truncated wgt (pb) : 0.10354E-05 +# Unit wgt : 0.43121E-07 + +
+ + 2212 2212 0.50000000000E+05 0.50000000000E+05 0 0 260000 260000 -3 3 + 0.37196384888E-03 0.12645316269E-05 0.42449000000E-07 2 + 0.49329538670E-04 0.16770114079E-06 0.42449000000E-07 1 + 0.30076897500E-05 0.10224968970E-07 0.42449000000E-07 0 +please cite 1405.0301 + + + 6 2 0.4312100E-007 0.5860475E+03 0.7546771E-02 0.7282328E-01 + 21 -1 0 0 504 502 0.00000000000E+00 0.00000000000E+00 0.25046059372E+05 0.25046059372E+05 0.00000000000E+00 0. -1. + 21 -1 0 0 501 503 -0.00000000000E+00 -0.00000000000E+00 -0.10208113854E+05 0.10208113854E+05 0.00000000000E+00 0. 1. + 6 1 1 2 501 0 0.50372616568E+03 -0.24516529677E+03 -0.19756140168E+04 0.20607828164E+04 0.17300000000E+03 0. -1. + -6 1 1 2 0 505 -0.12120147394E+05 0.40568472026E+04 0.20049502309E+04 0.12938536876E+05 0.17300000000E+03 0. 1. + 21 1 1 2 504 503 0.11634380218E+05 -0.41084593191E+04 0.11291864070E+05 0.16725562329E+05 0.00000000000E+00 0. -1. + 21 1 1 2 505 502 -0.17958990348E+02 0.29677741318E+03 0.35167452342E+04 0.35292912037E+04 0.00000000000E+00 0. -1. + + + 1 6 2 -1 + 2 3 1 -1 + 1 5 2 -1 + 1 3 2 -1 + + + + 6 2 0.4312100E-007 0.1324009E+05 0.7546771E-02 0.6771010E-01 + 2 -1 0 0 501 0 -0.00000000000E+00 0.00000000000E+00 0.12132276769E+05 0.12132276769E+05 0.00000000000E+00 0. 1. + 21 -1 0 0 504 503 0.00000000000E+00 -0.00000000000E+00 -0.18237311870E+05 0.18237311870E+05 0.00000000000E+00 0. 1. + 6 1 1 2 501 0 -0.58755324563E+04 -0.31216755591E+03 0.15185337512E+04 0.60790792051E+04 0.17300000000E+03 0. 1. + -6 1 1 2 0 503 -0.70837991143E+04 -0.19393605331E+04 0.24039680349E+04 0.77298331471E+04 0.17300000000E+03 0. -1. + 21 1 1 2 504 502 0.87288424058E+03 0.12292924610E+03 -0.42870889083E+03 0.98021926632E+03 0.00000000000E+00 0. -1. + 2 1 1 2 502 0 0.12086447330E+05 0.21285988429E+04 -0.95988279962E+04 0.15580457021E+05 0.00000000000E+00 0. 1. + + + 5 6 -1 -1 + 3 4 -1 -1 + 2 5 1 -1 + 2 3 1 -1 + + + + 6 2 0.4312100E-007 0.1225719E+05 0.7546771E-02 0.7118431E-01 + 2 -1 0 0 501 0 -0.00000000000E+00 0.00000000000E+00 0.97592919360E+04 0.97592919360E+04 0.00000000000E+00 0. 1. + 21 -1 0 0 502 503 0.00000000000E+00 -0.00000000000E+00 -0.24109893019E+05 0.24109893019E+05 0.00000000000E+00 0. 1. + 6 1 1 2 501 0 -0.94017163761E+04 -0.70926253430E+04 -0.63703978956E+04 0.13390649851E+05 0.17300000000E+03 0. 1. + -6 1 1 2 0 504 0.31507054586E+03 -0.16162476302E+04 -0.49038076974E+04 0.51757883249E+04 0.17300000000E+03 0. -1. + 21 1 1 2 504 503 0.50655786153E+02 -0.88577268900E+02 -0.26834113620E+04 0.26853507180E+04 0.00000000000E+00 0. 1. + 2 1 1 2 502 0 0.90359900440E+04 0.87974502421E+04 -0.39298412760E+03 0.12617396061E+05 0.00000000000E+00 0. 1. + + + 2 5 1 -1 + 2 4 1 -1 + 1 6 2 -1 + 2 3 1 -1 + + + + 6 2 0.4312100E-007 0.1256293E+05 0.7546771E-02 0.6801343E-01 + 21 -1 0 0 504 503 0.00000000000E+00 0.00000000000E+00 0.12441601063E+05 0.12441601063E+05 0.00000000000E+00 0. -1. + 2 -1 0 0 501 0 -0.00000000000E+00 -0.00000000000E+00 -0.13411156841E+05 0.13411156841E+05 0.00000000000E+00 0. -1. + 6 1 1 2 501 0 0.42778060522E+04 -0.16412661964E+04 -0.13625207528E+04 0.47832803754E+04 0.17300000000E+03 0. -1. + -6 1 1 2 0 503 0.75212822056E+04 -0.26511155057E+04 -0.21428638252E+04 0.82595335107E+04 0.17300000000E+03 0. -1. + 21 1 1 2 504 502 -0.26230154466E+04 0.91879450887E+03 0.50988555411E+03 0.28256639328E+04 0.00000000000E+00 0. -1. + 2 1 1 2 502 0 -0.91760728112E+04 0.33735871932E+04 0.20259432458E+04 0.99842800853E+04 0.00000000000E+00 0. -1. + + + 5 6 -1 -1 + 3 4 -1 -1 + 1 5 2 -1 + 1 3 2 -1 + + + + 6 2 0.4312100E-007 0.1298679E+05 0.7546771E-02 0.6777386E-01 + 2 -1 0 0 501 0 0.00000000000E+00 0.00000000000E+00 0.27716608155E+05 0.27716608155E+05 0.00000000000E+00 0. 1. + 1 -1 0 0 502 0 -0.00000000000E+00 -0.00000000000E+00 -0.17380532381E+05 0.17380532381E+05 0.00000000000E+00 0. -1. + 6 1 1 2 501 0 0.80684495903E+03 -0.56450173895E+04 0.53659536395E+04 0.78320244878E+04 0.17300000000E+03 0. -1. + -6 1 1 2 0 503 -0.15873698128E+03 -0.73420843458E+04 0.50814051350E+04 0.89320774244E+04 0.17300000000E+03 0. 1. + 2 1 1 2 502 0 -0.69774202715E+03 0.12952515854E+05 0.11129842939E+05 0.17091749903E+05 0.00000000000E+00 0. 1. + 1 1 1 2 503 0 0.49634049400E+02 0.34585881075E+02 -0.11241125939E+05 0.11241288721E+05 0.00000000000E+00 0. -1. + + + 2 6 1 -1 + 3 4 -1 -1 + 1 5 2 -1 + 1 3 2 -1 + + + + 4 0 0.4312100E-007 0.1281633E+05 0.7546771E-02 0.6789771E-01 + 21 -1 0 0 501 502 0.00000000000E+00 0.00000000000E+00 0.12290628159E+05 0.12290628159E+05 0.00000000000E+00 0. -1. + 21 -1 0 0 502 503 -0.00000000000E+00 -0.00000000000E+00 -0.16939140998E+05 0.16939140998E+05 0.00000000000E+00 0. 1. + 6 1 1 2 501 0 0.11965001428E+05 -0.45899056202E+04 0.43894805769E+04 0.13547175407E+05 0.17300000000E+03 0. -1. + -6 1 1 2 0 503 -0.11965001428E+05 0.45899056202E+04 -0.90379934160E+04 0.15682593751E+05 0.17300000000E+03 0. 1. + + + 1 3 2 -1 + 1 3 2 -1 + + + + 6 2 0.4312100E-007 0.1297835E+04 0.7546771E-02 0.6768960E-01 + 21 -1 0 0 504 502 0.00000000000E+00 0.00000000000E+00 0.13000462525E+05 0.13000462525E+05 0.00000000000E+00 0. -1. + 21 -1 0 0 502 503 -0.00000000000E+00 -0.00000000000E+00 -0.15514145122E+05 0.15514145122E+05 0.00000000000E+00 0. 1. + 6 1 1 2 501 0 -0.37484163908E+04 -0.12357219738E+05 0.16197886582E+04 0.13015573341E+05 0.17300000000E+03 0. 1. + -6 1 1 2 0 505 0.28379360076E+04 0.13244380841E+05 -0.40403508361E+04 0.14135836322E+05 0.17300000000E+03 0. -1. + 21 1 1 2 504 501 0.89160227541E+03 -0.94487567647E+03 -0.84660145733E+02 0.13018878607E+04 0.00000000000E+00 0. -1. + 21 1 1 2 505 503 0.18878107814E+02 0.57714573790E+02 -0.84602734594E+01 0.61310123221E+02 0.00000000000E+00 0. -1. + + + 2 6 1 -1 + 1 5 2 -1 + 2 4 1 -1 + 1 3 2 -1 + + + + 6 2 0.4312100E-007 0.1289250E+05 0.7546771E-02 0.6786346E-01 + 2 -1 0 0 501 0 -0.00000000000E+00 0.00000000000E+00 0.23198251932E+05 0.23198251932E+05 0.00000000000E+00 0. -1. + 21 -1 0 0 502 503 0.00000000000E+00 -0.00000000000E+00 -0.75258238897E+04 0.75258238897E+04 0.00000000000E+00 0. -1. + 6 1 1 2 501 0 -0.26699867241E+04 0.20805451983E+04 0.16881933623E+04 0.37864790053E+04 0.17300000000E+03 0. 1. + -6 1 1 2 0 504 -0.80091498516E+04 0.44389321353E+04 0.54817496746E+04 0.10673804773E+05 0.17300000000E+03 0. -1. + 21 1 1 2 504 503 -0.56946604761E+03 0.36391082854E+03 0.37486435925E+03 0.77281689833E+03 0.00000000000E+00 0. 1. + 2 1 1 2 502 0 0.11248602623E+05 -0.68833881621E+04 0.81276206461E+04 0.15490975145E+05 0.00000000000E+00 0. -1. + + + 3 4 -1 -1 + 2 5 1 -1 + 2 6 1 -1 + 2 3 1 -1 + + +
diff --git a/examples/data/p8_pp_tt012j_5f_HT_25000_35000.cmd b/examples/data/p8_pp_tt012j_5f_HT_25000_35000.cmd new file mode 100644 index 00000000..6a7af092 --- /dev/null +++ b/examples/data/p8_pp_tt012j_5f_HT_25000_35000.cmd @@ -0,0 +1,33 @@ +! 1) Settings that will be used in a main program. +Main:numberOfEvents = 10 ! number of events to generate +Main:timesAllowErrors = 100 ! abort run after this many flawed events +Random:seed = 88187982 ! initialize random generator with a seed + +! 2) Settings related to output in init(), next() and stat() functions. +Init:showChangedSettings = on ! list changed settings +Init:showAllSettings = off ! list all settings +Init:showChangedParticleData = on ! list changed particle data +Init:showAllParticleData = off ! list all particle data +Next:numberCount = 10 ! print message every n events +Next:numberShowLHA = 1 ! print LHA information n times +Next:numberShowInfo = 1 ! print event information n times +Next:numberShowProcess = 1 ! print process record n times +Next:numberShowEvent = 1 ! print event record n times +Stat:showPartonLevel = off ! additional statistics on MPI + +! 3) Tell Pythia that LHEF input is used +Beams:frameType = 4 +Beams:setProductionScalesFromLHEF = off +! This assumes that the build directory is one below the +! top level directory of the repository +Beams:LHEF = ../../examples/data/events.lhe + +! 4) Specify jet matching parameters for MLM +! Note: Some of these settings might be read directly from the input LHE file. +JetMatching:merge = on +JetMatching:scheme = 1 +JetMatching:setMad = off +JetMatching:coneRadius = 1.0 +JetMatching:etaJetMax = 10.0 +JetMatching:nJetMax = 2 +JetMatching:qCut = 90.0 diff --git a/standalone/src/DelphesPythia8Reader.h b/standalone/src/DelphesPythia8Reader.h index f238433b..c05ac040 100644 --- a/standalone/src/DelphesPythia8Reader.h +++ b/standalone/src/DelphesPythia8Reader.h @@ -58,11 +58,17 @@ class DelphesPythia8Reader : public DelphesInputReader { // jet matching #if PYTHIA_VERSION_INTEGER < 8300 - m_matching = combined->getHook(*m_pythia); - if (!m_matching) { + Pythia8::CombineMatchingInput* combined = 0; + Pythia8::UserHooks* matching = 0; + + matching = combined->getHook(*m_pythia); + if (!matching) { throw std::runtime_error("can't do matching"); } - m_pythia->setUserHooksPtr(m_matching); + m_pythia->setUserHooksPtr(matching); +#else + Pythia8::CombineMatchingInput combined; + combined.setHook(*m_pythia); #endif if (!m_pythia) { @@ -190,10 +196,6 @@ class DelphesPythia8Reader : public DelphesInputReader { TClonesArray* m_branchParticle; TClonesArray* m_branchHepMCEvent; - // for matching - Pythia8::CombineMatchingInput* combined = 0; - Pythia8::UserHooks* m_matching = 0; - //resonance decayfilter Pythia8::ResonanceDecayFilterHook* m_resonanceDecayFilterHook{nullptr}; }; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7efe14ca..7cb63fc0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -47,6 +47,16 @@ if(DELPHES_CARD) endif() ADD_COMPARISON_TEST(DelphesRootReader_ee_91gev DelphesROOT_EDM4HEP ${DELPHES_CARD} ${OUTPUT_CONFIG} delphes_root_converter_input_reader_test.root ${PROJECT_SOURCE_DIR}/tests/data/gev91ee_zboson_100events.root ) + + # From a physics point of view this doesn't make a lot of sense, but we just + # want to see if jet matching is properly turned on + ADD_COMPARISON_TEST(DelphesPythiaJetMatching DelphesPythia8_EDM4HEP ${DELPHES_CARD} ${OUTPUT_CONFIG} pythia_jet_matching_technical_check.root ${PROJECT_SOURCE_DIR}/examples/data/p8_pp_tt012j_5f_HT_25000_35000.cmd --no-delphes) + + set_tests_properties(DelphesPythiaJetMatching + PROPERTIES + PASS_REGULAR_EXPRESSION "JetMatching Error and Warning Messages Statistics" + ) + else() message(WARNING "Cannot find IDEA delphes card from the delphes installation. Cannot use it for testing") endif()