How To Recipe for ALPGEN event generation

Introduction

As of today (2008.08.29), the latest ALPGEN release is 2.13 (ALPGEN homepage). If users want to run the stand alone ALPGEN (up to matrix element outputs), the manual is the best guide line. The aim of this page is to provide the minimum short-cut instruction for new users, who want to generate the matrix element event files and read them in via Athena interface, i.e. AlpGen_i to produce evgen files (pool format).

(1st step) event generation at matrix element level

In the start up, users can get the source code of ALPGEN from the web page or from the afs, i.e. /afs/cern.ch/sw/lcg/external/MCGenerators/alpgen/2.1.3/share/alpgen-author/. Here, let us use the source code from the author's web page. In users working directory,
 $ wget http://mlm.home.cern.ch/mlm/alpgen/V2.1/v213.tgz 
 $ tar zxvf v213.tgz 
Now users can find bunch of directories named "PROCESS"lib or "PROCESS"work, other than the directories for core libraries (alplib, herlib, pylib), Documentation (DOCS), exmaples (validation). In this page, let us chose the W+jets process. The user configuration files are in the wjetwork/ directory, all the user works are carried out in this directory.
 $ cd wjetwork

try running wjet out of the box

As a first test, let's run the alpgen without changing anything (if you have a problem here, you need to check what is wrong with your system, the instruction in this page does not include trouble shooting for different machine smile

compile the code (here we use f77 compiliation, if you want to use F90 see later section)

 $ make gen
now users find the executable file wjetgen. The alpgen sample production is carried out in twp step operations. The operation mode is defined in the input file (the line with comment "imode")

produce weighted events

set the imode value = 1 (the value already set by default), then run as
 $ ./wjetgen < input >& log_mode1 & 
after about 1min, the job finishes and users would see the files named w2j.* (explanations for the meaning of each file are omitted here, full detail can be found in the manual). w2j.wgt is the weighted event file, it basically contains the random seeds and event weights.

produce unweighted events

after just changing the imode to 2 in "input" file, try the same command
 $ ./wjetgen < input >&  log_mode2 & 
After this, users can find the unweighted event file, w2j.unw which is to be used as an input file for Herwig, or Pythia in the later section. The file w2j.par contains the information of configuration parameters and event generation (number of events, cross section, etc). There are other files created for monitering of generation, users are suggested to check the manual for their meanings.

Parton Shower (PS) and Hadronization by Herwig

General procedure for ATLAS users to do the parton shower and PS-ME matching (a la MLM scheme), and hadronization is in interface, i.e. AlpGen_i and Herwig_i would take care the rest (see the later section for procedure). However, users can perform the quick and light weighted checks with Herwig and Pythia packages included in the standalone ALPGEN package. go to the directory for Herwig library (in ALPGEN v213, Hewig 6.510 is used), and make the user code for herwig. Then just run this user executable from wjetwork directory.
 $ cd ../herlib ; make hwuser
 $ cd ../wjetwork; ../herlib/hwuser
Then the interactive session starts, which in this case just require file name of unweighted file (just enter "w2j" in this case). All the events path through the PS, Hadronization with a few events print out. Users are expected to modify the hwuser.f to their own purpose. Here all events passed, meaning the PS-ME matching did not happen. To run it with MLM matching, see the next section.

try running wjet in ATLAS (MC2008) style

Let's jump from "out of the box" to the current ATLAS default configuration. Before that, users may want to know what parameters could be configured by input file (the default entries in input file are not many, indicating there are many implicit default values behind. ) to see full list of parameters and their meanings, users should try above "wjetgen" run with imode=5. Then it does not create events but only creates prc.list, which contains all the list. See the general agreements for 2008 MC production Wiki. The example input file which follow the agreement is attached (input.ATLAS). Note that the parameter iewopt is set to 3 (default) which determines the W,Z masses internally in ALPGEN, thus the their masses are different from the PDG2007 values.
  • The important change from the out-of-the-box run is the parameter ickkw which is set "1" here, by which the ME-PS matching will be performed with internal veto routine in Herwig.
  • the link to the PDF library needs to be made before the run. The script pdflnk would create all the links for all available PDF sets. (To avoid having 30-40 unused links in the working area) It is recommended not to just issue this script, but just create one link to PDF which user is using (see the contents of pdflnk).
Now when users retry the hwuser procedure, then it inquires the matching conditions after the input file specification.
  • the first question is whether this sample is treated in exclusive (1) or inclusive (0) mode. In this particular case, w2j is not highest parton multiplicity, so select exclusive (1). (In case of w5j, you may want to choose inclusive mode).
  • ET, Rseparation, Etamax of the cluster (e.g. jet) are required to be provided here. It is recommended to put those 3 values suggested in the interactive mode . Suggestion value of ET is MAX(PTJMIN+5,1.2*PTJMIN), i.e. if ptjmin is 25GeV, ET=30GeV (=ptjmin+5=1.2*ptjmin), if ptjmin is 20GeV, ET=25GeV (=ptjmin+5).
  • N.B. up to ALPGEN v206, the 3rd argument, i.e. Etamax was not required, and the suggested value for ET was ptjmin.
after the interactive session, the users can see a Herwig output. At the end of this message, there are summary numbers for the process. Due to the MLM matching scheme, some fraction of events were rejected. MLM matching efficiency is calculated from the two numbers in the summary. It is given by A/B (A="NUMBER OF EVENTS", B="NUMBER OF WEIGHTS"). N.B. somehow the "EFFICIENCY PERCENT" is calculated with (A-1)/B.

Other topics

Fortran 90 compiler

ALPGEN can be speed up by using F90 version of the compiler. General usage of the code is exactly the same (user need to configure the path etc in Makfile). The improvement of the speed is about factor 2-5, even to 20. Interested users should consult with manul Appendix C.

Quality of the unweighting, integration

With imode=1,2, the alpgen program produces w2j.top and w2j_unw.top files. These are the TopDrawer format files, which can be read and dumped on postscript format by top drawer utility (interested user can download it from here). They contains basic distributions before and after the event unweighting.

produce multiple files in parallel

In ALPGEN, the random numbers are calculated by the function described in the paper, F.JAMES, COMP PHYS COMM 60(1990)329. (see alpgen.f in alplib). The users are supposed to provide two sets for random seeds in 5 digits (4 numbers in total), for example, for weighted event generation 12345/67890, for unweighted event generation 12345/67890. The numbers could be any from 1-99999 which would produce independent random numbers in a period of 2x10^18 for 32bit machine. When users want to accelerate the event production rate, it can be easily done by running multiple jobs with different random seeds. One practical example is to use seed1=12345+10*i, seed2=67890-10*i (i=0,1,2...) for i-th jobs.Seed 3,4 could be equal to Seed 1,2.

(2nd step) running ALPGEN Athena interface

Up to the previous step, the files named 'w2j_unw.par' and 'w2j.unw' are created. We start this section with these files (for other processes, N partons, the file names are of course different.). What is done in ALPGEN athena interface is more or less similar to what was done with internal herwig interface in ALPGEN package in the previous sections, i.e. carry out Parton showers and reject events following the MLM prescription.

prepare the input files

Here we think of using JobTransform script to process whole machinery of athena side. Then the parameter file and event file need to be packed in one tar.gz file. Just for temporal test purpose, we use CSC ID of 109999, and input file base name of "alpgen.109999.w2j._00001.tar.gz". The first thing we need to do is to prepare parameter file and event file.

parameter files

-- OsamuJinnouchi - 29 Aug 2008

Topic attachments
I Attachment History Action Size DateSorted ascending Who Comment
Unknown file formatatlas input.ATLAS r1 manage 1.6 K 2008-09-01 - 17:15 OsamuJinnouchi  
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r9 - 2008-09-17 - OsamuJinnouchi
 
    • 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-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback