Tags:
, view all tags

Alpgen Production Workflow

Introduction

This Twiki documents a sequence on how to make a large-scale ALPGEN event production at SPRACE upon request. It assumes the following conditions:

  • Access to an account on the access server at SPRACE.
  • Know-how on setting up a CMSSW work area (here we document CMSSW 3_1_X, please modify instructions accordingly).
  • Know-how on setting up and using the CONDOR batch system.
  • Presence of grids for that given process. Grids are files used by ALPGEN to allow a more efficient exploration of the phase space. They are to be supplied by the requester.
  • Presence of efficiencies for that given process. The ALPGEN production comprises three phases> generation of weighted events, generation of unweighted events, and generation of matched events. Generally, a request is going to be made in terms of a number of MATCHED events (or, equivalently, in terms of a physical luminosity). The number of events you actually generate has to take into account all three efficiencies, see more about that below.

Main Sequence

  • Make directory and get grids. In this example, we are generating a Z + bbbar + jets sample at 7 TeV c.o.m. We get the grids and efficiencies from Maurizio Pierini.
mkdir ZbbGrids_7TeV
wget http://cmsdoc.cern.ch/~mpierini/cms/alpgen_7TeV/PRODUCTION_zbb.tar.gz
tar -xzf PRODUCTION_zbb.tar.gz 
mv PRODUCTION ZbbGrids_7TeV
rm PRODUCTION_zbb.tar.gz

  • Make subdirectories. In this example, Maurizio wants a Z + bbbar + N jets, N from 0 to 3. So we set up a structure for that.
mkdir Zbb7TeV 
mkdir Zbb7TeV/zbb_0j
mkdir Zbb7TeV/zbb_1j
mkdir Zbb7TeV/zbb_2j
mkdir Zbb7TeV/zbb_3j

  • Copy relevant files. Note that the "scripts" directory below is actually a place-holder for wherever you have the scripts shown in this page. The commands given below are just a short-handed way to copy all the relevant files to their places. The structure you're aiming for is to have, inside each subdirectory, an ALPGEN input file (usually named ''input'') and all the python (.py) files. The shell script files are to stay at the top-level directory
cp scripts/*.py scripts/*.sh Zbb7TeV
seq 0 3 | xargs -i bash -c "cp ZbbGrids_7TeV/PRODUCTION/input_zbb_{}j Zbb7TeV/zbb_{}j/input"
ls -d Zbb7TeV/*j | xargs -i bash -c "cp Zbb7TeV/*.py {}"

  • Fix input files. You usually need to fix the input files, at least for the number of warm-up iterations and number of events asked. Sometimes you need to add the random seeds setup explicitly as well. Usually you want to setup the inputs for NO warm-up iterations, and a reasonable number of events (5M is good if the farm is yours, 2.5M if you're sharing it).
emacs Zbb7TeV/zbb_0j/input 
emacs Zbb7TeV/zbb_1j/input 
emacs Zbb7TeV/zbb_2j/input 
emacs Zbb7TeV/zbb_3j/input 

  • Fix scripts. You need to fix the location of the grids and executables in the doProduction.sh script, and the number of jobs asked in the doGrandProduction.sh script. Try to not submit more than 200 jobs at a time.
emacs Zbb7TeV/doProduction.sh 
emacs Zbb7TeV/doGrandProduction.sh 

  • Run and pray.
cd Zbb7TeV
./doGrandProduction.sh
condor_q

  • Merge, shift, pack and deploy.
cd Zbb7TeV
python sprace_ALPGEN_merge.py 0
Check if the unw.par file is correctly created, and check if there are enough events. Create another batch of jobs if needed.
python sprace_ALPGEN_merge.py 1
This will create the .unw file with the actual events, and will suggest a command line for packing (.tar.gz) the original .wgt and .par files.
cmsRun test_ALPGEN_source_cfg.py
This will shift the unweighted events from .unw to .lhe files. Both .lhe and the .tar.gz created in the step above are suitable for uploading to MCDB.

Scripts

  • doGrandProduction.sh - script to run the doProduction.sh script for different channels.
  • doProduction.sh - script to submit a batch of jobs to SPRACE. Calls sprace_ALPGEN_submit.py for the heavy lifting.
  • fixFile.sh - postproduction script. Adjust and use this for your preproduction needs.
  • sprace_ALPGEN_merge.py. - merging script.
  • sprace_ALPGEN_submit.py. - main submission script.
  • testAlpgenSource_cfg.py.txt - format shift (UNW to LHE).
  • theBigScript.sh - runs all the postproduction scripts.

-- ThiagoTomei - 17 Jan 2010

Topic attachments
I Attachment History Action Size Date Who Comment
Unix shell scriptsh doGrandProduction.sh r1 manage 0.9 K 2009-11-11 - 11:18 ThiagoTomei  
Unix shell scriptsh doProduction.sh r1 manage 0.7 K 2009-11-11 - 11:18 ThiagoTomei  
Unix shell scriptsh fixFile.sh r1 manage 0.3 K 2009-11-11 - 11:19 ThiagoTomei  
Texttxt sprace_ALPGEN_merge.py.txt r1 manage 3.1 K 2009-11-11 - 11:19 ThiagoTomei  
Texttxt sprace_ALPGEN_submit.py.txt r1 manage 3.3 K 2009-11-11 - 11:19 ThiagoTomei  
Texttxt testAlpgenSource_cfg.py.txt r1 manage 0.5 K 2009-11-11 - 11:20 ThiagoTomei  
Unix shell scriptsh theBigScript.sh r1 manage 1.2 K 2009-11-11 - 11:20 ThiagoTomei  
Edit | Attach | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2010-01-17 - ThiagoTomei
 

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

antalya escort bursa escort eskisehir escort istanbul escort izmir escort