MG5 takes a long time to generate events with high energy given mass cuts

Asked by Maxim Lysenko

Dear MadGraph developers,

I was running t tbar(to dilepton decay) events (for a .lhe file), and I wanted to extend these to 14 TeV by aplying invariant mass cuts each being 1TeV and then merging them later. There was no problem in time it takes, until 10 TeV, and at the interval 10 TeV - 11 TeV it took 6 hours. I wanted to consult about it since I was doing these on a personal computer, maybe I it would be better to use a cluster? Or is there a way to optimize the run time? The run card upon event generation is this:

#*********************************************************************
# 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 *
# *
# To display more options, you can type the command: *
# update to_full *
#*********************************************************************
#
#*********************************************************************
# 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 *
#*********************************************************************
  50000 = nevents ! Number of unweighted events requested
  0 = iseed ! rnd seed (0=assigned automatically=default))
#*********************************************************************
# Collider type and energy *
# lpp: 0=No PDF, 1=proton, -1=antiproton, *
# 2=elastic photon of proton/ion beam *
# +/-3=PDF of electron/positron beam *
# +/-4=PDF of muon/antimuon beam *
#*********************************************************************
     1 = lpp1 ! beam 1 type
     1 = lpp2 ! beam 2 type
     7000.0 = ebeam1 ! beam 1 total energy in GeV
     7000.0 = ebeam2 ! beam 2 total energy in GeV
# To see polarised beam options: type "update beam_pol"

#*********************************************************************
# PDF CHOICE: this automatically fixes alpha_s and its evol. *
# pdlabel: lhapdf=LHAPDF (installation needed) [1412.7420] *
# iww=Improved Weizsaecker-Williams Approx.[hep-ph/9310350] *
# eva=Effective W/Z/A Approx. [2111.02442] *
# edff=EDFF in gamma-UPC [eq.(11) in 2207.03012] *
# chff=ChFF in gamma-UPC [eq.(13) in 2207.03012] *
# none=No PDF, same as lhapdf with lppx=0 *
#*********************************************************************
     lhapdf = pdlabel ! PDF set
     315200 = lhaid ! if pdlabel=lhapdf, this is the lhapdf number
# To see heavy ion options: type "update ion_pdf"
#*********************************************************************
# 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
#*********************************************************************
  False = 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)
  average = event_norm ! average/sum. Normalization of the weight in the LHEF
# To see MLM/CKKW merging options: type "update MLM" or "update CKKW"

#*********************************************************************
#
#*********************************************************************
# Phase-Space Optimization strategy (basic options)
#*********************************************************************
   0 = nhel ! using helicities importance sampling or not.
                             ! 0: sum over helicity, 1: importance sampling
   1 = sde_strategy ! default integration strategy (hep-ph/2021.00773)
                             ! 1 is old strategy (using amp square)
        ! 2 is new strategy (using only the denominator)
# To see advanced option for Phase-Space optimization: type "update psoptim"
#*********************************************************************
# Customization (custom cuts/scale/bias/...) *
# list of files containing fortran function that overwrite default *
#*********************************************************************
  = custom_fcts ! List of files containing user hook function
#*******************************
# Parton level cuts definition *
#*******************************
  0.0 = dsqrt_shat ! minimal shat for full process
#
#
#*********************************************************************
# BW cutoff (M+/-bwcutoff*Gamma) ! Define on/off-shell for "$" and decay
#*********************************************************************
  15.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)
 #*********************************************************************
   True = cut_decays ! Cut decay products
#*********************************************************************
# Standard Cuts *
#*********************************************************************
# Minimum and maximum pt's (for max, -1 means no cut) *
#*********************************************************************
 0.0 = ptb ! minimum pt for the b
 10.0 = ptl ! minimum pt for the charged leptons
 0.0 = misset ! minimum missing Et (sum of neutrino's momenta)
 -1.0 = ptbmax ! maximum pt for the b
 -1.0 = ptlmax ! maximum pt for the charged leptons
 -1.0 = missetmax ! maximum missing Et (sum of neutrino's momenta)
 {} = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle
 {} = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50})
#
# For display option for energy cut in the partonic center of mass frame type 'update ecut'
#
#*********************************************************************
# Maximum and minimum absolute rapidity (for max, -1 means no cut) *
#*********************************************************************
 -1.0 = etab ! max rap for the b
 2.5 = etal ! max rap for the charged leptons
 0.0 = etabmin ! min rap for the b
 0.0 = etalmin ! main rap for the charged leptons
 {} = eta_min_pdg ! rap cut for other particles (use pdg code). Applied on particle and anti-particle
 {} = eta_max_pdg ! rap cut for other particles (syntax e.g. {6: 2.5, 23: 5})
#*********************************************************************
# Minimum and maximum DeltaR distance *
#*********************************************************************
 0.0 = drbb ! min distance between b's
 0.4 = drll ! min distance between leptons
 0.0 = drbl ! min distance between b and lepton
 -1.0 = drbbmax ! max distance between b's
 -1.0 = drllmax ! max distance between leptons
 -1.0 = drblmax ! max distance between b and lepton
#*********************************************************************
# Minimum and maximum invariant mass for pairs *
#*********************************************************************
 0.0 = mmbb ! min invariant mass of a b pair
 10950.0 = mmll ! min invariant mass of l+l- (same flavour) lepton pair
 -1.0 = mmbbmax ! max invariant mass of a b pair
 12550.0 = mmllmax ! max invariant mass of l+l- (same flavour) lepton pair
 {} = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})
 {'default': False} = mxx_only_part_antipart ! if True the invariant mass is applied only
                       ! to pairs of particle/antiparticle and not to pairs of the same pdg codes.
 #*********************************************************************
 # 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 / neutrino *
 # for pair of lepton includes only same flavor, opposite charge
 #*********************************************************************
 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 = xptb ! minimum pt for at least one b
 0.0 = xptl ! minimum pt for at least one charged lepton
 #*********************************************************************
 # 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
 -1.0 = ptl1max ! maximum pt for the leading lepton in pt
 -1.0 = ptl2max ! maximum pt for the second lepton in pt
 #*********************************************************************
 # Control the Ht(k)=Sum of k leading jets *
 #*********************************************************************
 0.0 = ihtmin !inclusive Ht for all partons (including b)
 -1.0 = ihtmax !inclusive Ht for all partons (including b)
#*********************************************************************
# maximal pdg code for quark to be considered as a light jet *
# (otherwise b cuts are applied) *
#*********************************************************************
 4 = maxjetflavor ! Maximum jet pdg code
#*********************************************************************
#
#*********************************************************************
# Store info for systematics studies *
# WARNING: Do not use for interference type of computation *
#*********************************************************************
   True = use_syst ! Enable systematics studies
#
systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++]
['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_arguments ! see: https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/Systematics#Systematicspythonmodule

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

I'm not surprise that such type of cut might be problematic. Please be very careful with such non trivial and strong cut.
What can happen is that madgraph might fail to populate part of the phase-space and return bias result.

So please when applying such strong cut always double check with a version with much looser version of the cut to check that you have the correct cross-section with the cuts.

In your case, do you ask for the top and W to be onshell? or do you allow also other diagram contribution (which will help the integrator with such cut)

Cheers,

Olivier

Revision history for this message
Maxim Lysenko (maximlysnk) said :
#2

Hi,

Thank you for the information! I didnt ask for the top and W to be onshell as I think the options are as below:

1. Choose the shower/hadronization program | shower = OFF | Pythia8 |
| 2. Choose the detector simulation program | detector = Not Avail. | Please install module |
| 3. Choose an analysis package (plot/convert) | analysis = OFF | MadAnalysis5 |
| 4. Decay onshell particles | madspin = OFF | ON|onshell|full |
| 5. Add weights to events for new hypp. | reweight = OFF | ON

I basically turned everything off to only focus on the .lhe file.

Best,

Maxim

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

So do you ask same flavor (i.e. generate p p > b b~ e+ e- ve ve~)
or different flavor (i.e. generate p p > b b~ e+ mu- ve vm~)
or the sum of all (i.e. generate p p > b b~ l+ l- vl vl~)
In that case did you include the tau in the lepton/neutrino definition?

Cheers,

Olivier

Revision history for this message
Maxim Lysenko (maximlysnk) said :
#4

Basically, my the decay process was: p p > t t~ -> t~ > b~ w-, t > b w+ -> w+ > l+ vl, w- > l- vl~ .

"In that case, did you include the tau in the lepton/neutrino definition? "

definitions were: l+ = e+ mu+ and vl = ve vm vt, tau was not included in the definition for leptons, I was only doing analysis with respect to mu and e.

Best,

Maxim

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#5

Hi Maxim,

Can you give the exact syntax for your generation?
p p > t t~ -> t~ > b~ w-, t > b w+ -> w+ > l+ vl, w- > l- vl~
This one does not make any sense.

If you want to say that you are using
generate p p > t t~ , (t >b w+, w+> l+ vl), (t~ >b~ w-, w-> l- vl~)
and that you ask,
10950.0 <=mmll<= 12550.0
This will be a cut that will be super difficult to honor.

My suggestion would be to only ask for "minimum" cut which are easier to handle.
(In the case of the minimum, this is already not ideal but we can impose a minimum shat to increase the efficiency, while in the case of the maximum we do not have any handle, so the only way is to try a point and check if it pass the cuts or not (and if not retry again and again)

Can you help with this problem?

Provide an answer of your own, or ask Maxim Lysenko for more information if necessary.

To post a message you must log in.