How to run ALPGEN and prepare for production PART 1

This tutorial focuses on AlpGen Generation in CMS

  • Go to http://mlm.home.cern.ch/mlm/alpgen/ and download

     
    v213.tgz 
    
    by clicking NEW: The source code for version V.213
  • untar/zip the file by typing

    > tar -xzvf v213.tgz 
  • You see the following directory structure
    2Qlib     alplib        hjetlib   phjetwork  topwork     wjetlib     wqqlib
    2Qphlib   compare       hjetwork  prc.list   validation  wjetwork    wqqwork
    2Qphwork  compile.mk    Makefile  pylib      vbjetlib    wphjetlib   zjetlib
    2Qwork    DOCS          Njetlib   QQhlib     vbjetwork   wphjetwork  zjetwork
    4Qlib     ft90V.tar.gz  Njetwork  QQhwork    wcjetlib    wphqqlib    zqqlib
    4Qwork    herlib        phjetlib  toplib     wcjetwork   wphqqwork   zqqwork
    
  • Depending on what type of events you want to generate you pick your working directory lets prepare W+3 jets for example
    cd wjetwork
    
  • The contents of the directory are
    alpgen.inc  input  Makefile  pdflnk  wjet.inc  wjetusr.f
    
  • Compile the code - you will need a FORTRAN 77 compiler for this. Ignore the warnings.
    >make gen
    
  • You should have an executable named
    wjetgen
    
  • Running the executable interactively will ask you for the different input configurations. You can give it the default "input" file:
    1     ! imode
    w2j       ! label for files
    0 ! start with: 0=new grid, 1=previous warmup grid, 2=previous generation grid
    10000 2  ! Nevents/iteration,  N(warm-up iterations)
    100000      ! Nevents generated after warm-up
    *** The above 5 lines provide mandatory inputs for all processes
    *** (Comment lines are introduced by the three asteriscs)
    *** The lines below modify existing defaults for the hard process under study
    *** For a complete list of accessible parameters and their values,
    *** input 'print 1' (to display on the screen) or 'print 2' to write to file
    njets 2
    ptjmin 20
    drjmin 0.7 
    
    via
    ./wjetgen < input
    
    and it will generate weighted events for W+2j for proton-antiproton collisions and for 980 GeV per beam [not what we want]. It will also produce the following additional files [run and look]:
    cnfg.dat  w2j.grid1  w2j.grid2  w2j.mon  w2j.par  w2j.stat  w2j.top  w2j.wgt
    
  • So, we need to include in the input file the lines
    ih2 1
    ebeam 7000
    
    to change the parameters to proton-proton collisions at 7000 GeV per beam. This is usually automatic in the CMS-ALPGEN version (v205 of production) but not in the version picked up from the MLM ALPGEN site.
  • As a complete example: to generate tt+3 jets then we need the following input file
    1     ! generation
    tt3j   ! string labeling the output files
    0 ! start with: 0=new grid, 1=previous warmup grid, 2=previous generation grid5
    1000000 4  ! N(events)/iteration and N(iter's) for initial grid optimize
    10000000  ! number evts to generate
    *** The above 5 lines provide mandatory inputs for all processes
    *** (Comment lines are introduced by the three asterisks)
    *** The lines below modify existing defaults for the hard process under study
    *** For a complete list of accessible parameters and their values,
    *** input 'print 1' (to display on the screen) or 'print 2' to write to file
    ih2 1
    ebeam 7000
    mt 175.00
    ihvy 6
    njets 2
    ptjmin  20 
    iqopt 1
    ickkw 1
    drjmin 0.7
    etjmax 5
    itdec 1
    itdecmod 6
    

  • what is imode 0? generate weighted events, no event dump to files . We can use this to generate the phase space grid2
  • what is imode 1? generate weighted events to file for later unweighting (generation)
  • what is imode 2: read events for unweighting (unweighting)
  • number of iterations and number of events
    1000000 4  ! N(events)/iteration and N(iter's) for initial grid optimize
    10000000  ! number evts to generate
    

    Here for the tt+3 jets I have asked 4 iterations of 1M events (this will create the grid1, warmup grid) and actual generation of 10M events. The final phase space grid I get is the .grid2. This is important for CRAB-ALPGEN production and this is what constitutes the first part of the "homework" per process per jet multiplicity and for the different cuts. ALPGEN improves its grid sampling iteration by iteration, so it is a good idea to use a few iterations, eventually with a reduced number per iteration. But there should be sufficient warm ups such that they are enough to sample a large fraction of the phase space. Otherwise, the grid would be unstable for a lot of iterations and not really improving. As a rule of thumb, since the 05 production I have used a few millions per iteration and chosen the number of iterations to be N+1 or N+2 where N is the number of partons.

  • Suppose you want to go all the way through to the final sample of showered events starting generation from scratch. Initially you do not know how many weighted events you need to generate in order to reach the statistics you want. The second part of the homework is to have the weighted, unweighted and PS/matched efficiency in order to know the number of events you need to input for you to get the number you want after the showered. This is done by running interactively.

    A similar tutorial can be found at AtlasAlpgenWJets

    -- ThiagoTomei - 22 Jul 2008

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2010-09-09 - KeithEdmonds
 
    • 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