TWiki> LHCb/FAQ Web>GaussFAQ>GaussInGeneralFAQ (revision 16)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.


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.

lb-run Gauss/v49r17 gaudirun.py myOptions.py

Look at the LHCb Starterkit for more information.

How do I pass options to gaudirun.py 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.

> gaudirun.py $GAUSSOPTS/Gauss-Job.py $APPCONFIGOPTS/Gauss/Beam6500GeV-md100-2018-nu1.6.py $APPCONFIGOPTS/Gauss/EnableSpillover-25ns.py $APPCONFIGOPTS/Gauss/DataType-2018.py $APPCONFIGOPTS/Gauss/RICHRandomHits.py $DECFILESROOT/options/30000000.py $LBPYTHIA8ROOT/options/Pythia8.py $APPCONFIGOPTS/Gauss/G4PL_FTFP_BERT_EmNoCuts.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/Beam6500GeV-md100-2018-nu1.6.py

with

$APPCONFIGOPTS/Gauss/Beam6500GeV-md100-2016-nu1.6.py

or change eventtype by replacing

$DECFILESROOT/options/30000000.py

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

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. Choose a slot, 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/
export CMAKE_PREFIX_PATH=$PWD:$CMAKE_PREFIX_PATH
cd Gauss
make -j8 install

You can now run as usual:

./gaudirun.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:

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

Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r16 - 2020-08-31 - AdamDavis
 
    • 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