Adding Pythia generator-level cuts on decay products to shower_card.dat?

Asked by ineute on 2018-02-27

Hi,

I am generating bbH events with aMC@NLO using the code from [1]. In the same run, aMC@NLO runs Pythia8 for showering and H decay into taus, which themselves also decay. Currently my shower_card.dat looks like this [2].

Is it possible however to add a pT cut (15 GeV) on the leading lepton (e or mu) from the decay of tau pairs, preferably by adding it to shower_card.py?

I am generating events with small masses for the Higgs boson, so removing events with low pT leptons would help a lot with disk space (~50% for a 15 GeV cut) and running time for my analysis.

Thanks!
Izaak

[1]
https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/bbH

[2] shower_card.py
#***********************************************************************
# MadGraph5_aMC@NLO *
# *
# shower_card.dat aMC@NLO *
# *
# This file is used to set the parameters for the shower. *
# *
# Some notation/conventions: *
# *
# Lines starting with a hash (#) are info or comments *
# *
# mind the format: variable = value # comment *
#***********************************************************************
#
#****************
# Shower settings
#****************
#
#***********************************************************************
# Number of events, jobs, errors, and random seeds *
#***********************************************************************
nevents = -1 # N evts to shower (< 0 = all)
nsplit_jobs = 1 # N jobs to run in parallel (< 100!!)
combine_td = T # combine the topdrawer/HwU files if nsplit_jobs>1
maxprint = 2 # N evts to print in the log
maxerrs = 0.1 # max fraction of errors
rnd_seed = 0 # 1st random seed (0 = default)
rnd_seed2 = 0 # 2nd random seed (0 = default) !ONLY FOR HWERIG6!
#***********************************************************************
# PDFs and non-perturbative modelling *
#***********************************************************************
pdfcode = 0 # 0 = internal, 1 = same as NLO, other = lhaglue
ue_enabled = F # underlying event
hadronize = T # hadronisation on/off !IGNORED BY HERWIG6!
lambda_5 = -1 # Lambda_5 (< 0 = default) !IGNORED BY PYTHIA8!
#***********************************************************************
# Stable or unstable particles *
#***********************************************************************
b_stable = T # set B hadrons stable
pi_stable = T # set pi0's stable
wp_stable = F # set w+'s stable
wm_stable = F # set w-'s stable
z_stable = F # set z0's stable
h_stable = F # set Higgs' stable
tap_stable = F # set tau+'s stable
tam_stable = F # set tau-'s stable
mup_stable = F # set mu+'s stable
mum_stable = F # set mu-'s stable
#***********************************************************************
# Mass of the b quark *
#***********************************************************************
b_mass = -1 # if < 0 = read from SubProcesses/MCmasses_*.inc
#***********************************************************************
# Special settings *
#***********************************************************************
is_4lep = F # T if 4-lepton production !ONLY FOR PYTHIA6!
is_bbar = F # T if bb~ production !ONLY FOR HERWIG6!
#***********************************************************************
# FxFx merging parameters !ONLY FOR PYTHIA8!
#***********************************************************************
Qcut = -1.0 # Merging scale
njmax = 0 # Maximal multiplicity in the merging
#***********************************************************************
# Decay channels *
# Write down the decay channels for the resonances, to be performed by *
# the shower. *
# The syntax (for a two-body decay) is *
# DM_I = M > D1 D2 @ BR @ ME *
# where I < 100, M is the decaying resonance, D1, D2 are the decay *
# products (up to D5 if such a decay is supported by the shower), BR *
# is the branching ratio (only used by the HERWIG6 shower, ignored *
# otherwise) and ME is the type of matrix element to be used in the *
# decay (only used by HERWIG6, ignored otherwise). *
# BR's are correctly understood by HERWIG6 only if they add up to 1 *
# and only if no more than three modes are required for a given *
# resonance. *
# ME corresponds to the third entry of subroutine HWMODK, see the *
# relevant manual. *
# *
# WARNING: in HERWIG6, the order of decay products in > 2-body decays *
# IS RELEVANT. *
# WARNING: in PYTHIA6, turning hadronisation off disables top decays *
# WARNING: in PYTHIA6 and PYTHIA8, 1 -> n decays (with n > 2) are *
# handled through a sequence of 1 -> 2 decays. *
# *
# Examples of syntax: *
# Z -> e+ e- or mu+ mu- with BR = 0.5 each *
# DM_1 = 23 > -11 11 @ 0.5d0 @ 100 *
# DM_2 = 23 > -13 13 @ 0.5d0 @ 100 *
# h -> tau+ tau- with BR = 1 *
DM_1 = 25 > -15 15 @ 1.0d0 @ 0 # *
# t -> nu_e e+ b with BR = 1 (HERWIG) *
# DM_4 = 6 > 12 -11 5 @ 1d0 @ 100 *
# t -> nu_e e+ b with BR = 1 (PYTHIA) *
# DM_5 = 6 > 24 5 @ 1d0 @ 100 *
# DM_6 = 24 > 12 -11 @ 1d0 @ 100 *
#***********************************************************************
# Extra Libraries/analyses *
# The following lines need to be changed if the user does not want to *
# create a StdHEP/HepMC file, but to directly run an own analysis (to *
# be placed in HWAnalyzer or analogous MCatNLO subfolders). *
# Please use files in those folders as examples. *
# Remember that if your analysis uses hbook or is in the HwU format, *
# you must also add to hbook.o or HwU.o to the ANALYSE list as well. *
#***********************************************************************
EXTRALIBS = stdhep Fmcfio dl z # Extra-libraries (not LHAPDF)
                                 # Default: "stdhep Fmcfio"
                                 # PYTHIA > 8.200 may require library dl
EXTRAPATHS = ../lib # Path to the extra-libraries
                                 # Default: "../lib"
INCLUDEPATHS = # Path to header files needed by c++
                                 # Dir names separated by white spaces
ANALYSE = # User's analysis and histogramming
                                 # routines (please use .o as extension
                                 # and use spaces to separate files)

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
Paolo Torrielli Edit question
Solved by:
ineute
Solved:
2018-02-27
Last query:
2018-02-27
Last reply:
2018-02-27

Hi,

I do not think that such cut is even possible in PY8.
But Paolo might know more than I

Cheers,

Olivier

Hi,

I do not think that such cut is even possible in PY8.
But Paolo might know more than I

Cheers,

Olivier

Dear Izaak,
I'm a bit confused: the cut you want is on the lepton pt, which is generated
by Pythia on statistical basis during its run. So at the level of LHE file, before
showering, you don't yet know if an event is going to be accepted or not,
right? The same event, showered with different random seeds, could pass
or not the cut.
So the cut you'd like to add to the shower card would in the end check
lepton pt's during the run, and discard events if below threshold, which
one can always do at the level of analysis.
Am I understanding correctly?
Regards.
Paolo

ineute (izaak-neutelings) said : #4

Hi Paolo,

Yes, your understanding is correct. I could indeed do this at the analysis-level, but it would be easier if these events with low lepton pt were already filtered/discarded at generator level (or at level of showering Pythia, like you point out).

I thought this was maybe possible because it was done for some other Pythia6 samples that were centrally produced by CMS. But I just learned that this filter is actually applied by the CMSSW framework and not Pythia6 itself.

So probably it is not possible. Might there by some way to filter hepmc file after the production to reduce file size?

Thanks,
Izaak

Since such cut in PY8 will anyway be a pure acception/rejection cut.
You will not gain in efficiency (PY8 will not learn anything in order to increase the efficiency)

So the only thing that you can hope for is to forbid the writing of the hepmc in order to apply such analysis cut
before writing the file and not after. This can probably be done via some userhook of pythia8.
(I do not know too much about that mode, so you should check the PY8 manual and/or contact the PY8 authors)

If you do not care about having a large temporary file, the easiest is proabably to not modify PY8, and filter the hepmc afterwards and recreate a smaller hepmc file in a independent step. (and after that remove the original hepmc)

Cheers,

Olivier

> On 27 Feb 2018, at 12:46, ineute <email address hidden> wrote:
>
> Question #665027 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/665027
>
> ineute posted a new comment:
> Hi Paolo,
>
> Yes, your understanding is correct. I could indeed do this at the
> analysis-level, but it would be easier if these events with low lepton
> pt were already filtered/discarded at generator level (or at level of
> showering Pythia, like you point out).
>
> I thought this was maybe possible because it was done for some other
> Pythia6 samples that were centrally produced by CMS. But I just learned
> that this filter is actually applied by the CMSSW framework and not
> Pythia6 itself.
>
> So probably it is not possible. Might there by some way to filter hepmc
> file after the production to reduce file size?
>
> Thanks,
> Izaak
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

ineute (izaak-neutelings) said : #6

Hi Paolo & Olivier,

Thanks for the quick replies and suggestions. I will see if I can figure something out or just live with it then...

Izaak