Last modified 4 years ago Last modified on 10/22/13 14:30:25

How do I implement my own cuts in MadEvent ?

From the web, cuts can be only set among those provided in the run_card.dat.

To add new cuts, one needs

  1. to know a bit of fortran
  2. to download the code (either after process generation or from our Download page) and run on your local machine.

If you just want to hard-code a cut, all you need to do is modify the file SubProcesses/cuts.f, where all external particle 4-momenta are given in the P(0:3,nexternal) array (energy in P(0,I) and 3-momenta in P(1:3,I)). The order of the external particles depends on the subprocess, and can be guessed from the name of the subprocess Pxxxxxxx directory or can be seen from the Pxxxxxxx/ file.

WARNING: By default, various symmetries are taken into account in the process (initial state for example). If your cut didn't agree with those symmetries, you should forbid MG to use those symmentries for the computation of the matrix-element (by doing set group_subprocesses False)

If you want to "standardize" your cuts and be able to change them from the run_card.dat as the default madgraph cuts, you need to modify the files

  • Source/setrun.f
  • SubProcesses/
  • SubProcesses/cuts.f
  • bin/internal/ (which reads the run_card.dat and convert it to a fortran file)

which appear in Template or in the process dependent code that you downloaded from the web (madevent.tar.gz). You can use e.g. the cut xptj as a template for your new cut.

-- Main.OlivierMattelaaer - 2013