Table of Contents

Monte Carlo Production in Zurich

Overview

At the moment Gauss, Boole, Brunel, DaVinci and Panoramix are installed in Zurich. The versions can be checked at the software page. Note that this page may not always be up-to-date.

The normal chain is: Gauss → Boole → Brunel → DaVinci (→ Panoramix)

Setting up the environment

To set up to environment for either Gauss, Boole, Brunel, DaVinci or Panoramix, execute the following steps.

export MYSITEROOT=/app/lhcb/sw
export CMTCONFIG=slc4_ia32_gcc34
export CMTPATH=$HOME/cmtuser
export PATH=$MYSITEROOT/local/gcc-3.4.6/bin:$MYSITEROOT/local/binutils-2.15.92.0.2/bin:$MYSITEROOT/scripts:$PATH
export LD_LIBRARY_PATH=$MYSITEROOT/local/gcc-3.4.6/lib:$MYSITEROOT/local/binutils-2.15.92.0.2/lib:$MYSITEROOT/lib:$LD_LIBRARY_PATH
. $MYSITEROOT/scripts/ExtCMT.sh
SetupProject myApplication version

This will work for a Kshell. Note that the line

export MYSITEROOT=/app/lhcb/sw

sets the variable MYSITEROOT to the directory where the openSuse-compiled-versions are located. It may be that for the application in question, only the slc4-binaries were copied. In the later case, you have to set

export MYSITEROOT=/app/lhcb/sw-slc4

To find out which versions were compiled and for which ones only the binaries were copied, you can browse yourself through the /app/lhcb/ directories or kindly ask a colleague in your office. Note that only one environment can be set simultaneously.

Gauss

(This refers to version v37r0)

Gauss needs two input files: Gauss.py and a Decay-Options-File.

Gauss.py

Gauss.py sets the main options to run Gauss. In order to have a better control over the output, one can add:

LHCbApp().EvtMax = 1000

tape = OutputStream("GaussTape")
tape.Output = "DATAFILE='PFN:myOutputFile.sim' TYP='POOL_ROOTTREE' OPT='RECREATE'"
ApplicationMgr( OutStream = [tape] )

GaussGen = GenInit("GaussGen")
GaussGen.FirstEventNumber = 1
GaussGen.RunNumber        = 1

and replace / add

LHCbApp( DataType = "2008", Simulation = True )
LHCbApp().DDDBtag = "head-20090112"
LHCbApp().CondDBtag = "sim-20090112" 

The important lines are:

The LHCbApp().DDDBtag and LHCbApp().CondDBtag set which description of the detector (etc. ?) is used. Note: Depending of what sort of data (2008 or 2009) you want to produce, you have to adjust these settings. You can also directly use the Gauss-2008.py or the Gauss-MC09.py file, but e.g. the output file will not be set in these files.

Decay-Options-File

The Decay-Options-File sets decay-specific options for Gauss. For most of the decays, such a file already exists in /app/lhcb/sw/lhcb/DBASE/Gen/DecFiles/v17r0/options. Note that the Decay-Options-File itself calls a dec-file, which tells EvtGen which decays have to be processed. (This should be discussed in another thread)

Execute Gauss

Gauss is then executed with: gaudirun.py Gauss-2008.py Decay-Options-File

Boole

(This refers to version v18r0)

Boole needs two input files: Boole-Default.py and MC09-Files.py.

Boole-Default.py initializes Boole, no changes need to be made. In MC09-Files.py, the important lines are:

As the name suggests, this file is used for MC09 data production. By adjusting the DDDBtag and CondDBtag, this can be changed to your needs (f.ex. 2008) and adapted to what you produced in Gauss.

Boole is executed with: gaudirun.py Boole-Default.py MC09-Files.py

Brunel

(This refers to version v34r5)

Brunel needs two input files: Brunel-MC09-WithTruth.py for MC data or Brunel-2008.py for real (2008) data and MC09-Files.py. Brunel-MC09-WithTruth.py initializes Brunel, no changes need to be made.

In MC09-Files.py the important lines are:

As for Boole and Gauss, to produce 2008 data, change the DDDBtag and the CondDBtag according to the expressions given in Boole.

Brunel is executed with: gaudirun.py Brunel-MC09-WithTruth.py MC09-Files.py

Submission to the local batch-system

To produce larger amount of data, the data should be processed on the local batch system. To speed things up, a script which executes Gauss, Boole and Brunel in one go is provided. To use it, the following steps are necessary:

The script localbatchsub.sh needs several arguments.

An example may be the following:

./localbatchsub.sh -t 10000 -j 1000 -f Bu_mumuXs.opts -q 25:00:00 -r 5

The script will then create all the files in a job on the scratch disk of the machine, in folders named after the job-ID. When the job is finished, the folder will be copied to /disk/data1/hep/myUsername.

Speed

The speed of the production depends on the number of jobs per machine and other factors. About 1000 events per day per core can be processed.

Troubleshooting

Infinite loops

Sometimes Geant (in Gauss) gets into an infinite loop. This may take several hours without a further process of events. It is therefore a good idea to allow much more time for the production than needed if these loops do not occur, to prevent these jobs to be killed by the system before they acutally have finished. This should now have changed with Gauss v37r0, so maybe this comment is obsolete.

Notes

The script localbatchsub.sh is basically a bricolage and has not been extensively tested. Always run test jobs before processing larger amount of data. Of course, suggestions to the script are always welcome.