MadGraph basics

The configuration of your event generation is primarily handled by three files:

  • proc_card : the actual physics process you want to generate
  • param_card : where you can override parameter values (decay widths etc) of the model you are using in your proc_card
  • run_card : primarily used to specify the generator-level cuts you want to apply

The proc_card

This is where you specify the process. You usually have to load a model first, and then use the madgraph syntax to specify the feynman diagrams. This example will use the HAHM model for exotics decays of the higgs to model decay of h boson (produced from gg initial state) to two Zd bosons, which subsequently decay to leptons:

import model HAHM_variableMW_v3_UFO
define l+ = e+ mu+
define l- = e- mu-
generate g g > h HIG=1 HIW=0 QED=0 QCD=0, (h > Zp Zp, Zp > l+ l-)

The param_card

This will appear in your process directory under the Cards subdirectory when you run madgraph with a proc_card. It has the form of blocks of parameters, e.g. in my param_card I see:

....
###################################
## INFORMATION FOR GAUGEMASS
###################################
BLOCK GAUGEMASS # 
      1 9.118800e+01 #  mzinput
###################################
## INFORMATION FOR HIDDEN
###################################
BLOCK HIDDEN # 
      1 5.000000e+01 #   mzdinput
      2 2.000000e+02 #   mhsinput
      3 1.000000e-04 #   epsilon
      4 1.000000e-04 #   kap
...

the way you should read this snippet is that the GAUGEMASS block has a parameter called mzinput, and the HIDDEN block has four parameters with nams mzdinput, mhsinput, epsilon, kap. You could speicify values for all of these in your on-the-fly joboptions (see sections below) by a dictionary of dictionaries in python:

param_card_extra = { "GAUGEMASS" : {"mzinput":"1.234"} 
                             "HIDDEN" : {"mzdinput":"3.46" , "mhsinput":'4.5' , "kap":'2.4'} #assumes we will keep default value for epsilon

The run_card

This contains generator_level cuts. And example snippet is:

....
#*******************                                                 
# Standard Cuts
#*******************                                                 
#                                                                    
#*********************************************************************
# Minimum and maximum pt's (for max, -1 means no cut)                *
#*********************************************************************
  0.0   =  ptj        ! minimum pt for the jets 
  0.0   =  ptb        ! minimum pt for the b 
  0.0   =  pta        ! minimum pt for the photons 
  0.0   =  ptl        ! minimum pt for the charged leptons 
...

Again, you can see there's a bunch of arguments here, which you can specify in the on-the-fly setup below by doing e.g:

run_card_extra = {"ptj":'1.0' , #overrides ptj in the run_card
                             "ptl",'2.0' }

Units are in GeV

MadGraph on-the-fly in ATLAS

This tutorial supposes you have figured out a proc_card you want to use, and you've decided what settings you want to have in the param_card and run_card.

Download This template file. It is a template joboption for a madgraph event generation with LO PDF. It is important that you preserve the naming convention of the file exactly (apart from the .txt extension, which you should remove), and you will replace the XXXXX and YYYYYY parts in a moment.

The template includes instructions in comments near the top, but basically you insert the proc_card content where it says, and list your param_card and run_card overrides. The template is actually an example of generating events an exotic decay of the h boson, so you should replace that proc_card code with your own proc_card.

You replace the XXXXXX in the filename with your own 6-digit 'run number', which for testing purposes could simply be 123456. The YYYYYY part is also a short description you are free to specify, but there are restrictions on the length, I think you only have about 20 characters to play with here.

To run your event generation you would just setup an appropriate release of the MCProd project, e.g.

asetup MCProd,19.2.5.26.4,here

Update (03/10/2017): The example scripts work with 19.2.5.26, i.e. instead please do:

asetup AtlasProduction,19.2.5.25,here

And then run your joboptions like this:

Generate_tf.py --ecmEnergy=13000 --runNumber=123456 --firstEvent=1 --asetup="" --maxEvents=5000 --randomSeed=1 --jobConfig="MC15.123456.MadGraphPythia8EvtGen_A14NNPDF23LO_MyDescription.py" --outputEVNTFile=my.evgen.root

Simples. If you have any problems, email me.

-- WillButtinger - 2016-10-10

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2018-09-20 - WillButtinger
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback