TWiki> LHCb/FAQ Web>GaussFAQ>GaussInGeneralFAQ (revision 15)EditAttachPDF

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. Look at the LHCb basic tutorial to learn how to do so and for more information.

A short summary of how to get Gauss and make the executable and how to run Gauss is available for both Gauss v25rX (DC06) and Gauss v30rX (post-DC06 development)

How do I pass options to for Gauss in MC09?

The way you steers Gauss in MC09 is via gaudirun,py. Below is an example for MC09 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.

> $APPCONFIGOPTS/Gauss/ $APPCONFIGOPTS/Conditions/  $DECFILESROOT/options/30000000.opts $LBPYTHIAROOT/options/Pythia.opts $GAUSSOPTS/
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. To shorten a little the options in Gauss a short cut for the default MC09 beam and detector conditions is available and is equivalent to the first two files, also Pythia is the default generator and you can obmit it, so the following is a shorter version of the above and the minimal set of options you will need to use:
> $GAUSSOPTS/ $DECFILESROOT/options/30000000.opts $GAUSSOPTS/

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 independant 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
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.

For example to generate minimum bias events only at the generator level you can run as follow:

> $GAUSSOPTS/ $DECFILESROOT/options/30000000.opts \
                 $GAUSSOPTS/GenStandAlone.opts $GAUSSOPTS/

or in your put the lines:


Note that you will only have the HepMC event format and no MCParticles/MCVertices in this case. We are setting up a way to fill the MCParticles/MCVertices without running the simulation phase, but this is not yet commissioned.

-- GloriaCorti - 17 Dec 2008

How can I run the nightly build of Gauss ?

You need to first set up the project as for anyother nightly build:

SetupProject --build-env --nightly lhcb1 Gauss HEAD 
you should then be in cmtuser/Gauss_HEAD and you should get the CVS head revision of Gauss:
getpack Sim/Gauss head 
(in most cases you can ignore the messages saying incompatible Gaudi_vXX and Gaudi_vXY).

You will then need to set the runtime environment and build your InstallArea. In Sim/Gauss/cmt do:

source setup.csh 
You can now run as usual: $GAUSSOPTS/ $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
  2. extract the file from the database
  3. use gaudi and dump the content of the table via the particle property service.

1. 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

Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r15 - 2015-02-27 - SamCunliffe
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb/FAQ 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