Studies with Madweight


In order to download software from the above page, you need to register.

  • For our work, we downloaded the following software: MadGraph (V5), MadWeight (V 2_5_16 it comes with MG V4), Pythia & PGS (latest), and ExRootAnalysis (V 1.0.8).
  • Both MadGraph5 and MadWeight can go to the same working space ; ExRootAnalysis was installed on our hep server (check this page for information)

Madweight: Code modification

To study the different permutations and assignment of final states to physical objects in the Feynman diagrams, I introduced a few modifications to MadWeight code. In summary, these were the files that required some modification:

  • driver.f : Source/MadWeight_File/MWP_template/
  • : Source/MadWeight_File/Tools/

How to obtain code:

All code (C++, MW modifications, and scripts) can be fetched from out SVN repository:

  svn co svn+ssh:// 


  svn co svn+ssh:// 

In addition, the MW modified files can be downloaded from here:

Madgraph / MadWeight on our Tier-3 (Uniandes)


Analysis Code

The MW modifications have the purpose to output in ascii files, useful pieces of information that otherwise cannot be found.

This code is inside MadweightMod/Source:

  • driver.f: outputs in file "details_AO.out" permutation and assignment.
  • driver.f: saves into file "perm_values_AO.out" permutation id, weight value and its error per EVENT.
  • because of the new output files, the python code in these routine had to be modified to maintain those files for all events.


The scripts are inside MadweightMod/python:

  • helps in copying a fresh MadWeight Template directory with cards from input
  • helps in copying a fresh MG Template directory with cards from input
  • analyzes the output "details_AO.out". Shows permutation and assignment
  • analyzes the output from "perm_values_AO.out". Outputs a single files with columns where we get permutation id, weights and weights error

Cpp analysis code

This code is inside MadweightCpp:

TTBar studies:

  • code00: PGSAnalyzer simple Loop over events

  • code01: PGSAnalyzer Loop over permutations

  • code02: LHEAnalyzer Loop over LHE events

  • code03: Analyze weights for sig & bkg ( discriminator )

SUSY studies:

  • In progress

TTbar studies


* The generation of events can be done in both, MG5 or MG4. It does not make a difference since MW (from now on MadWeight = MW), takes as input events in the LHCO (LHC Olympics) format. However MW's proc_card.dat has to describe the process in MG4 format.

The following process description appears in the Cards/proc_card.dat (or proc_card_mg5.dat) file is:

Version Process
V4 pp>(t>(w+>ud~)b)(t~>(w->vm~mu-)b~)
V5 generate p p > t t~ , (t > b w+ , w+ > u d~ ) , (t~ > b~ w- , w- > mu- vm~ ) QCD = 4 @0

In addition, I just let gluons to be part of the production mechanisms by adding/editing the following line:

  • in MG4: "P g"
  • In MG5: "define p g"

If all info is in place, you should get a nice output from MG:

  • Matrix - MG4:


  • For MG4 the muon leg is marked as No 8 while the MET leg is marked as No 7
  • IN MG5, this is the opposite

Basic kinematics

Permutation studies

s-Tops studies


The following process description appears in the Cards/proc_card.dat (or proc_card_mg5.dat) file is:

Version Process
V4 pp> (t1 > (t>(w+>ud~)b) n1)(t1~ > (t~>(w->vm~mu-)b~) n1)
V5 generate p p > t1 t1~ , (t1 > t n1, ( t > b w+, w+ > u d~)) , ( t1~ > t~ n1, (t~ > b~ w-, w- > mu- vm~ ))

  • Diagrams obtained with MG5 for stops:

-- AndresOsorio - 24-Sep-2012

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt r1 manage 9.5 K 2012-09-26 - 02:27 AndresOsorio modified file
Unknown file formatf driver.f r1 manage 14.8 K 2012-09-26 - 02:26 AndresOsorio modified driver.f file
PNGpng matrix-mg4.png r1 manage 43.1 K 2012-09-24 - 21:45 AndresOsorio Matrix - MG4
JPEGjpg matrix11_stops_MG5.jpg r1 manage 56.9 K 2012-09-26 - 22:21 AndresOsorio Diagrams obtained with MG5 for stops
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2012-09-27 - AndresOsorio
    • 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-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback