Gauss in general

This page will be populated with Frequently Asked Questions concerning Gauss in general, for example:

  • the framework
  • random number: independet sets and reproducibility
  • producing events in different running conditions
  • performance and validation
  • use and performance in central production (e.g. DC06)

Please feel free to add topics.


If you did not find an answer to you question you can add it here:

Current user-submitted FAQ's can be found here

What is Gauss

Gauss is the LHCb simulation program. It consist of a first phase where the events are generated (e.g. pp collisions at 14 TeV) and a second phase where the particles are propagated trough the LHCb detectors. All available documentation is linked from the Gauss web page

How do I get and run Gauss ?

You get and run Gauss exactly like any other LHCb application.

lb-run Gauss/v49r17

Look at the LHCb Starterkit for more information.

How do I pass options to for Gauss?

The way you steers Gauss is via gaudirun,py. Below is an example with full flexiblity passing the Simulation Configuration (beam releated), the Conditions (geometry related), the Eventtype, the generator to use and the part specific to a job (number of events, run number, etc.) as separate arguments.


One can change for example the beam parameters (a different energy), but use the same geometry, event type and generator by just replacing




or change eventtype by replacing


with the one you want.

How do I use a Gauss pre-release in $LHCBDEV ?

The only thing you need to do differently with respect to a released version is to introduce in the CMTPROJECTPATH the $LHCBDEV area, between your User_release_area and LHCb_release_area.

setenv CMTPROJECTPATH ${User_release_area}:${LHCBDEV}:${LHCb_release_area}:${Gaudi_release_area}:${LCG_release_area}

Remember that a version built in $LHCBDEV is a moving pre-release and as such it can change at any moment.

How do I set random number seeds to generate independent events ?

To generate independent sets of data, it is necessary to change random number seeds in Gauss. For each event, they are set using its run number and event number, for both the generator and simulation phase of Gauss. For the generation phase it is possible to set them via options by setting the property RunNumber and FirstEventNumber of the algorithm "GenInit/GaussGen". For the simulation phase they will be taken from what is in the GenHeader, that is to say they depend on the values given to GenInit above. To do that in the option file:

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

In case you run jobs through ganga, ganga has a GaussSplitter() tool which will split your job into subjobs and set FirstEventNumber for you. In this case only change RunNumber from master job to master job to if you want statistically independent samples.

#in a ganga session
help(GaussSplitter ())
my_job.splitter = GaussSplitter ()
my_job.application.script = '/path/to/some/gauss/' # only set RunNumber

How can I produce data samples in the first data taking conditions?

Options or combinations of options are available to generate data samples for first data. Predefined options can be given as argument options to the Gauss executable as in is normally done with v200601.opts

A complete review of all possible data samples, options availables and how to combined them is available from the Gauss web page How to generate samples for first data

Where can I find general statistics for the generator and simulation phase of Gauss in DC06?

Some statistics for both generator and simulation phases of Gauss are printed at the end of any Gauss job. In DC06 a script has been put in place to produce statistics and efficiency of cuts for both the generator and simulation phase of Gauss using this information from a few hundred jobs of a given production. The results are published on a web page and given as function of the Gauss version number, the DC06 configuration and the luminosity for all generated event types. The generator level cut efficiencies are provided separatly for B (in the box "particle cut efficiency") and for Bbar (in "anti-particle cut efficiency").

Is it possible to impose a condition on which of the generated events that are written to the .sim file?

Yes, it is.

And it is already done in the default configuration of Gauss: only events that were successfully processed by Geant4 (i.e. not aborted) are written out.

If you want to introduce an additional condition, you will need to have a filtering algorithm verifying if the condition is satisfied or not (e.g. at least N MCHits in the VELO) and include the line


for "interesting" events and


for those you want to discard. You then can the add your algorithm at the end of the Simulation sequence

   Simulation.Members += { "MyFilter"};

The Gauss OutputStream is configured to require the Simulation sequence to be succesfull, hence your filter will also be taken into account for writing events. In case of condition imposed at the generator level, it is more effective to not even save the event in the TES and do no process them in the simulation. For this you should instead use a FullEventCut tool that is called by the Generation algorithm

-- GloriaCorti - 17 Jan 2008

Can I run only the generator phase of Gauss ?

Yes, it is possible to run the generator phase of Gauss and options are set up for you. You will just need to give them to, either by importing them or as argument.

Please follow the example given in the Contributing section of the DecFiles package

How can I run the nightly build of Gauss?

The slots available for nightly build can be found on the LHCbNightlies page.

To run from the nightlies without touching the code there, you can run

lb-run -c x86_64-centos7-gcc9-opt --nightly lhcb-gauss-dev/Today Gauss/HEAD bash --norc

If you want access to the whole nightly build, requiring recompilation in some cases, choose a slot (say lhcb-gauss-dev), then do

lbn-install --verbose --platforms=x86_64-centos7-gcc9-opt --projects=Geant4,Gauss lhcb-gauss-dev Today

This will install Geant4 and Gauss into the directory from the nightlies. Donít forget to append to CMAKE_PREFIX_PATH the cloned directory

cd lhcb-gauss-dev/Today/
cd Gauss
make -j8 install

You can now run as usual:
./run $GAUSSOPTS/ ...

Where do I read/dump the file with the particle properties ?

All known particle names and PDG id numbers can be found in a ParticleTable.txt file. This is located in DDDB (in the past it was in $PARAMFILESROOT).

There are different ways of accessing it:
1 browse the database itself
1 extract the file from the database
1 use gaudi and dump the content of the table via the particle property service.
To browse the database via the graphical interface

SetupProject LHCb
CondDBBrowser DDDB

and then navigate to /param/ParticleTable.txt
2. To extract the file

SetupProject LHCb -c sqlite_file:$SQLITEDBPATH/DDDB.db/DDDB -s /param/ParticleTable.txt

you will find the file in your current directory as DDDB/param/ParticleTable.txt

-- GloriaCorti - 22 Feb 2010

This topic: LHCb/FAQ > WebHome > GaussFAQ > GaussInGeneralFAQ
Topic revision: r17 - 2020-09-16 - AdamDavis
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