You are on page 1of 4

MadGraph to UCNtuple: Generation of a

New Pro ess with MadGraph, Pythia


Showering, 4.9.0 Simulation and Produ tion,
and UCntupling.

This le is hep:/usr/lo al/WWW/hep/ df/MadGraph to UCntuple.tex, or .ps


Nov. 5 Original UKY Howto
De -14-2002 HJF: Additions:Latex
De -23-2002 HJF+Carla: xes
Mar-21-2003 UKY updated

1 Generating a pro ess with MadGraph


1.1 Setups
To run MadGraph you do not want to have setup df. No setups should be ne essary; df
you expli itly don't want.

1.2 Making a New Pro ess


To run MadGraph, follow the instru tions from Collin on
http://hep.u hi ago.edu/ df/madgraph howto.txt, rea hable from
http://hep.u hi ago.edu/ df/Run2.html.

OR (this is how I do it- you may want to make your own area with the same stru ture so
not to be s rewed by permissions, and then opy the relevant les into it):

To make a new pro ess su h as Wjj:


1. d / df/data6a/fris h/MadGnew/
2. makenew Wjj
3. d Wjj
4. edit input.dat (e.g. rst line is pro ess: e.g. pp > e + ve, 2nd is max number of QCD
verti es, 3rd is max number of EWK).
5. edit Sour e/set uts.f (see Collin's instru tions, mentioned above).
6. t sh run xx. sh (this runs it)
7. tail -f survey.log After survey has written to results.html, do next step...
8. nets ape $PWD/Subpro esses/results.html

1
1.3 Output, Mis . Tips
1. MadGraph will make the les events.dat and unweighted events.dat in the Events
subdire tory of your pro ess, and the le results.html in the Subpro esses subdire -
tory. These are as ii les whi h ontain the number of external lines, the weight, the
parti le, mother and daughter id's in verti al olumns, and then the 4-ve tors. See
"http://hep.u hi ago.edu/ df/ hadd kuma howto.html.
2. When you look at results.html in nets ape, you will see a list of the uts- you should
he k this. Then there is a list of the subpro esses; while survey is running the ross
se tion will grow as survey al ulates ea h one, and adds the al ulated ross-se tion
to the table where it falls in the ordered list (biggest at the top). You do not have the
nal answer, or even lose, until all subpro esses are done.
3. A fortran error in set uts.f will make the pro ess fail- he k the survey.log le.
4. The unweighting pro ess gives you how many and the per ent of the total weight that
was lost in the unweighting pro ess. The per entage lost should be less than 1%.
5. I have it set up for 10K unweighted events. If you want a di erent number, edit
re ne input.dat and unweight input.dat.
6. I have it set up for no optimization. If you want optimization, edit survey input.dat

2 Putting Output of MadGraph into MadGraph Pro-


esss Area
The 3 output les PROCESS events.dat, PROCESS unweighted events.dat, and
PROCESS.log (where PROCESS is Wjj, e.g.) are `put' via soft links in the area
/ df/data6a/fris h/MadGnew/DataSets, where they are easily available to the s ripts that
run Pythia, Simulation, and Produ tion.

To do this:
1. d / df/data6a/fris h/MadGnew/DataSets
2. makelinks PROCESS (e.g. makelinks Wjj).

3 Running Pythia on MadGraph Output (Les Hou hes)


to make HEPG and STDHEP Output
3.1 General Des ription
This is a re ipe for taking a le of events that are written by a matrix element generator
su h as MadGraph in Les Hou hes format, running the shower monte arlo Pythia on it to
produ e STDHEP format, onverting this le to the CDF HEPG format using Sebastian
Carron's ode, and then running 4.9.1 CDF simulation and then Produ tion on it.

2
For example, the output les of MadGraph for many W and Z pro esses are in / df/data6a/fris h/MadGnew
For ea h pro ess there are two les: e.g. Zjj events.dat, whi h ontains weighted events (ea h
event arries a weight with it, whi h an be very very small), and Zjj unweighted events.dat
(ea h event ounts as one event, like the ones we write to tape in the data). A third le,
Zjj.log, tells how many of ea h kind of event there is, and other details. (One an look at the
pro ess by looking at the le results.html in the SubPro esses subdire tory with a browser).

3.2 To use the Pythia interfa e and produ e STDHEP le


1. Che k that the PROCESS unweighted events.dat and PROCESS.log les
exist in / df/data6a/fris h/MadGnew/DataSets.
2. If the les are not in DataSets, there is a s ript in DataSets that will make the links for
you: d / df/data6a/fris h/MadGnew/DataSets, and then type makelinks PROCESS
(e.g., makelinks Zjj).
3. d / df/data38a/MC/hepg tools
4. run stdhep.t sh "PROCESS" (e.g. run stdhep.t sh Zjj)
or run stdhep.t sh "PROCESS" 1 (to make a linke to Dataset area)
If your disk spa e is less than 2GBtyte for output data (in GenData area), it exists with a
warning sign. Now you have a STDHEP output le. These are being kept in oÆ al dataset
area, / df/data10a/Datasets/MC/MadGraph/gen data/STDHEP, in ase you make a linke
to Dataset area. Real les are lo ated in \/ df/data24d/MadGraph/gen data" at present.

3.3 To make HEPG les for farm version from STDHEP le


1. d / df/data38a/MC/hepg tools
2. stdhepgfarmmad. sh "PROCESS" (e.g. stdhepgfarmmad. sh Zjj)

This s ript produ e HEPG les for every 1K events with magi run number, 151435 us-
ing Sebastian's interfa e tool. Thus, these HEPG les an be used in FARM for CDF-
SIM/Produ tion. Again, if your disk spa e is less than 2GBtyte for output data, it exists
with a warning sign. Now you have a HEPG output le. These are being kept in o -
i al dataset area, / df/data10a/Datasets/MC/MadGraph/gen data/HEPG. Real les are
lo ated in / df/data30a/ukyang/InterPa kage/ les/HEPG/"PROCESS" at present.

3.4 To run the dete tor simulation CDFSIM and Produ tion to-
gether on the HEPG input le
We re ommend to use bat h ques. It is mu h faster.
1. Login df ma hine to use bat h jobs
2. d / df/data38a/MC/sim tools
3. runMC hepg bat h.t sh "PROCESS"
or runMC hepg bat h.t sh "PROCESS" 1 (to make a link to Dataset area)

3
\runMC hepg bat h.t sh" s ript submits bat h jobs for ea h hepg le in HEPGbase area (
/ df/data30a/ukyang/InterPa kage/ les/HEPG/"PROCESS" at present). Ea h hepg data
lename will be displayed on s reen. Ea h bat h job takes about 3 hours (1000 events).
But if your disk spa e is less than 2GBtyte for output data, it exists with a warning sign. We
re ommend to make a link to our oÆ ial Dataset area (/ df/data10a/Datasets/MC/MadGraph/491/dst),
unless you are making your private or test version.
Now you have root les from CDFSIM/Produ tion on oÆ al Dataset area in ase you make
a linke to Dataset area. Real data les are lo ated in \/ df/data24d/MadGraph/prod data"
at present.

3.5 To make a UCntuple from the Produ tion Data


This runs Peter's ntupler on the output of produ tion for pro ess PROCESS, where PROC-
ESS is a pro ess name that was used to make the dataset, su h as Zjj, or ttee. For example,
to run, type `make u ntuple Zjj'

1. d fris h/ana/u ntuple/59704/


2. he k that you have already setup dfsoft2 and/or this is done in the s ript make u ntuple. sh.
3. make u ntuple. sh PROCESS

This uses the input le multi.t l to make the u ntuple, whi h at present is being written to
/ df/data6b/fris h/m /u ntuples/.
You should feel free (more than free) to swipe the s ripts and write to wherever, as you may
have some prote tion problems. On e we have nal MC samples they will be linked to the
datasets page (I hope!).

4 De . 2002 DataSets
. UnKi and I have generated and run through Pythia, CDFSIM, and Produ tion a large
number of SM pro esses, su h as W+0,1,2,3,4 jets, top, WW, WWbbbar, WZbbbar, et .
The datasets for these are available in ea h of the di erent stages in:
1. LesHou hes (MadGraph): / df/data6a/fris h/MadGnew/DataSets/
2. STDHEP and HEPG: / df/data31b/m /gen data/
3. root from CDFSIM: / df/data31b/m /simu data/
4. root from 4.9.0 Produ tion: / df/data31b/m /prod data/
5. UCntuple: / df/data31b/m /UCNtuples/ (see also / df/data6b/fris h/m /u ntuples/,
but these should be linked to 31b).

You might also like