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.
FAQs:
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 gaudirun.py 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.
> gaudirun.py $APPCONFIGOPTS/Gauss/MC09-b5TeV-md100.py $APPCONFIGOPTS/Conditions/MC09-20090602-vc-md100.py $DECFILESROOT/options/30000000.opts $LBPYTHIAROOT/options/Pythia.opts $GAUSSOPTS/Gauss-Job.py
One can change for example the beam parameters (a different energy), but use the same geometry, event type and generator by just replacing
$APPCONFIGOPTS/Gauss/MC09-b5TeV-md100.py
with
$APPCONFIGOPTS/Gauss/MC09-b7TeV-md100-nu0,7-25ns
or change eventtype by replacing
$DECFILESROOT/options/30000000.opts
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:
> gaudirun.py $GAUSSOPTS/Gauss-MC09.py $DECFILESROOT/options/30000000.opts $GAUSSOPTS/Gauss-Job.py
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
help(GaussSplitter())
my_job.splitter = GaussSplitter()
my_job.application.script = '/path/to/some/gauss/options.py' # 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
setFilterPassed(true)
for "interesting" events and
setFilterPassed(false)
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
gaudirun.py
, either by importing them or as argument.
For example to generate minimum bias events only at the generator level you can run as follow:
> gaudirun.py $GAUSSOPTS/Gauss-2008.py $DECFILESROOT/options/30000000.opts \
$GAUSSOPTS/GenStandAlone.opts $GAUSSOPTS/Gauss-Job.py
or in your Gauss-Job.py put the lines:
importOptions('$DECFILESROOT/options/30000000.opts')
importOptions('$GAUSSOPTS/GenStandAlone.opts')
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
make
You can now run as usual:
gaudirun.py $GAUSSOPTS/Gauss-2008.py $GAUSSOPTS/Gauss-Job.py
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:
- browse the database itself
- extract the file from the database
- 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
> dump_db_to_files.py -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