Particle Hunter

Run Gauss on lxplus


Gauss is the official simulation framework at LHCb experiment at CERN. It is used to simulate the LHCb detector and the physics processes that happen. It is basically a pre-defined custom versions of both pythia and geant4. In this post I will describe how to run Gauss on lxplus.

Quick Setup

This can be done on one command like

lb-dev Gauss/v56r3 \\
cd ./GaussDev_v56r3 \\ 
git lb-clone-pkg Gen/DecFiles \\
cd Gen/DecFiles

Hint: This will install Sim10

Run Gauss

Let’s use the example provided in LHCb starterkit. To run the startedkit example which deals with this decay $\left.D^{*+} \rightarrow D^{0}\left(\rightarrow K^{+} K^{-} \mu^{+} \mu^{-}\right) \pi^{+}\right)$. This decay is pre-defined in Gauss and is given the event type # 27175000. This is determined by the Decfiles library. The DecFile controls the decay itself (i.e. what EvtGen does) as well as provide any event-type specific configuration (e.g. generator cuts). They exist in the Gen/DecFile package. The content of the Decfile is the following:

# EventType: 27175000
# Descriptor: [D*(2010)+ -> (D0 -> {K+ K- mu+ mu-}) pi+]cc
# NickName: Dst_D0pi,KKmumu=DecProdCut
# Cuts: DaughtersInLHCb
# Documentation: Forces the D* decay in generic b-bbar / c-cbar events + Requires products to be in LHCb acceptance
# EndDocumentation
# PhysicsWG: Charm
# Tested: Yes
# Responsible: Luisa Arrabito
# Email: unknown@<nospam>
# Date: 20091215

Alias MyD0 D0
Alias MyantiD0 anti-D0
ChargeConj MyD0 MyantiD0
Decay D*+sig
  1.000 MyD0  pi+    VSS;
CDecay D*-sig
Decay MyD0
  1.000 K+ K- mu+ mu- PHSP;
CDecay MyantiD0

This Decfile code contains the Information which tells Gauss what to except when calling <event-type>.py as an option. There is a current parser online to help you with event type.

To run Gauss you need to specify the options which tells Gauss about what you need. you can pass the options using the syntax

./run option

But the best way is to include all the options in which is where you need to call things. For example

Instead of running

        '$APPCONFIGOPTS/Gauss/' \  # Sets beam energy and position
        '$APPCONFIGOPTS/Gauss/' \  # Enables spillover (only Run2)
        '$APPCONFIGOPTS/Gauss/' \ # Sets the data type (organized by year)
        '$APPCONFIGOPTS/Gauss/' \  # Random hits in RICH for occupancy
        '$DECFILESROOT/options/{eventnumber}.py' \  # Event type containing the signal
        '$LBPYTHIA8ROOT/options/' \  # Setting Pythia8 as generator
        '$APPCONFIGOPTS/Gauss/' \  # Physics simulated by Geant4

You can define your own options in As the fOllowing:

from Gauss.Configuration import *

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

from Configurables import LHCbApp
LHCbApp().DDDBtag = 'dddb-20170721-3'
LHCbApp().CondDBtag = 'sim-20170721-2-vc-md100'
LHCbApp().EvtMax = 5

To run the following Simulation you cd to Gauss dir and run the following:

./run ../

Which will be equivalent to

./run '$APPCONFIGOPTS/Gauss/'  '$LBPYTHIA8ROOT/options/' '$DECFILESROOT/options/' ../

Which of course will depend on where you have file

Hint: you will need first to run lhcb-proxy-init to obtain the permissions to run Gauss.

Hint: This will take long time ~20 minutes because we asked for a full detector simulation by Geant4 but we can only tell Gauss to run the generator phase of simulation only by adding '$GAUSSOPTS/' as an option.

Now lets give some information about the options which we told gauss to use. The following table summarize that:

'$APPCONFIGOPTS/Gauss/’Sets beam energy and position
'$APPCONFIGOPTS/Gauss/'Enables spillover (only Run2, not sure about RUN3 yet)
'$APPCONFIGOPTS/Gauss/'Tells Gauss which data category to expect (organized by year)
'$APPCONFIGOPTS/Gauss/'Random hits in RICH for occupancy
'$DECFILESROOT/options/{eventnumber}.py'Event type containing the signal
'$LBPYTHIA8ROOT/options/'This tells Gauss to use pythia as signal generator
'$APPCONFIGOPTS/Gauss/'This tells Gauss to use Geant4 as detetor simulation tool with config
'$GAUSSOPTS/'Run only signal generation part and ignore full detetor simulation

Nightly version

This is how we can run the nightly version of Gauss

The general syntax is

lb-run --nighlty lhcb-gauss-dev/SLOTID Gauss/HEAD

Where SLOTID would be Today or the one that we are interested

The default is Today and could also be used as follows

lb-run --nightly lhcb-gauss-dev Gauss/HEAD

#lxplus #Gauss #simulation #LHCb