You are here: Foswiki>Computing Web>Tier3WebHome>MadEvent (revision 20)EditAttach
Madevent is a package derived from MadGraph (which is quite stable and has been around for a long time). It produces events according to SM and BSM processes at the parton level, but also interfaces with Pythia. This isn't new. What is unique is that this can all be originated from a web interface.

The web page is:

Detailed instructions from Reinhard, May 24, 2007:

To get started, you should get registered on the registration web page. That will generate a username-password for you which you need to produce any processes.

Then go to the "Generate Process" page and start playing around with it. You can look at the example processes that it provides for you, for

example uu~>dd~ as the input process. You can look at many other example processes as well, for example an electroweak one: ud~>e+ve. To generate something Tevatron or LHC related, you would use pp as the input particles, for example pp>e+ve. Once you enter this you'll see that there are more Feynman diagrams that can produce this process. (Note that as far as madgraph is concerned, p and p contain the same partons.)

After you click "Generate Process", the program will take a little while and then direct you to a page for this process. If you click on the "Process Information" link you get to see all of the relevant processes and links to all of the Feynman diagrams.

Play with these a little bit, and enter different processes that you can think of to get an idea. Examples that I can think of are pp>tt~ or including decays: pp>tt~>bb~w+w-.

Two processes you should look at are the two single top ones: pb>tj, which is t-channel single top quark production, and pp>tb~, which is s-channel single top quark production.

For these last two, you should not only look at the Feynman diagrams but also produce events. Here's how to do that: The button "Code Download" allows you to download a .tar.gz file that does some event generation. Download it. Untar it and follow the instructions in the README file to run it. You should edit the Cards/run_card.dat file and adjust the following parameters:
# Collider type and energy                                           *
        1     = lpp1  ! beam 1 type (0=NO PDF)
       -1     = lpp2  ! beam 2 type (0=NO PDF)
      980     = ebeam1  ! beam 1 energy in GeV
      980     = ebeam2  ! beam 2 energy in GeV 

If you are on one of the Fermilab machines, then you will need to do a "setup D0RunII" in order to get the compiler set up before you generate events. If you are anywhere else in the world, the compiler should already be set up properly. Run the ./bin/generate_events script. You should run serial and give a reasonable name, and then you just wait for events to be generated.

Then when you have an output file, you can use the web interface again to produce a root file and decay the top quark. Go to the "Tools" -> "Decay Interface" page. Browse to the Events/*_unweighted_events.lhe.gz file and load it. Select that you do want root output. Since your two single top files have a top quark in them, select the decay t > b ve e+. Then click on "Upload & Decay". After a while you'll get a page with links, one of which is the root file. Download the root file.

Download the ExRootAnalysis package from the "Downloads" tab. Follow the instructions to produce the library and then run the simple macro given in the Readme file at in order to produce your first histograms.

Once you have a histogram of jetPT and Mass as in the example macro we should talk again.

These instructions are quite long and it is likely that I missed something somewhere. There are also many steps involving topics you probably aren't familiar yet, and this is supposed to be a learning experience. Let me know if you get stuck or if you have any questions.

Emily Johnson has done a study of single top with CDF-style cuts.

-- ChipBrock - 24 May 2007 -- ReinhardSchwienhorst - 10 Sep 2007

Instructions for New Users of MadEvent (Andrew Chegwidden and Jacob Parsons 11 July 2011)

We've created these instructions as a starting point for any student using MadEvent. The scope of these instructions is limited to generating a ROOT file from MadEvent, performing cuts, and creating histograms.

They are meant as a starting point from which one can develop a more in-depth analysis of SM and BSM processes at the parton level.

The first step in the process is signing up for an account at Once your account is established you can begin to generate your processes. You have a choice of what model you want MadEvent to follow as well as the process you wish to study. There is a decent list of examples and formats in a link next to the input field. Our initial study focused on the production of the W Boson together with the top quark (p p > w- t). Once you've input your desired process you need to select your desired p and j definitions. Our study required p to stand for all possible quarks (the last line of the drop down menu).

Clicking submit will send you to a page where you can download the output code. You will get the appropriate Feynman diagram if it worked properly. On this page you can download the the output code. It will download as a "tar" file which you can use the command line "tar -xzf" to unpack it.

Once the files are unpacked you have the ability to change certain attribtues before you generate events. In our analysis we changed the beam energies in the ~/Cards/run_card.dat file (lines 38 and 39) to better represent what's coming out of the LHC.

Once you've made your changes you can generate events from the command line by "./bin/generate_events". We ran a serial run because the calculations were so short. In some instances the ~Cards/param_card.dat file may need to be edited. If this is the case you can utilize MadEvent's calculators under the Tools heading. One should use this tool as opposed to doing the editing by hand.

Once the events have been generated a locally produced output "LHE" file will be created. If a decay is requested this LHE file can be uploaded to the MadEvent site under Tools-->Decay Interface. You'll need to upload the locally produced LHE file and request a SM model decay. If you only want to look at one decay and would like a ROOT output then just click Upload & Decay. If, however, you would like to further decay the events then you will need to perform multiple decays on sucessive LHE files.

Once you've finished running the decay process you can download the final ROOT file which you can analyze and use to generate various histograms.
Edit | Attach | Print version | History: r46 | r21 < r20 < r19 < r18 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r20 - 12 Jul 2011, AndrewChegwidden

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback