TWiki
>
LHCb/FAQ Web
>
GaussFAQ
>
GaussInGeneralFAQ
(2020-09-16,
AdamDavis
)
(raw view)
E
dit
A
ttach
P
DF
---+!! 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: %TOC% --- If you did not find an answer to you question you can add it here: %COMMENT{target="UserFAQ"}% Current user-submitted FAQ's can be found [[UserFAQ][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 [[http://cern.ch/LHCb-release-area/DOC/gauss][Gauss web page]] ---+++ How do I get and run Gauss ? You get and run Gauss exactly like any other LHCb application. <verbatim>lb-run Gauss/v49r17 gaudirun.py myOptions.py</verbatim> Look at the <a href="https://lhcb.github.io/starterkit-lessons/second-analysis-steps/simulation.html" title="https://lhcb.github.io/starterkit-lessons/second-analysis-steps/simulation.html">LHCb Starterkit</a> 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. <verbatim> > 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</verbatim> One can change for example the beam parameters (a different energy), but use the same geometry, event type and generator by just replacing <verbatim>$APPCONFIGOPTS/Gauss/Beam6500GeV-md100-2018-nu1.6.py</verbatim> with <verbatim>$APPCONFIGOPTS/Gauss/Beam6500GeV-md100-2016-nu1.6.py</verbatim> or change eventtype by replacing <verbatim>$DECFILESROOT/options/30000000.py</verbatim> 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. <verbatim> setenv CMTPROJECTPATH ${User_release_area}:${LHCBDEV}:${LHCb_release_area}:${Gaudi_release_area}:${LCG_release_area}</verbatim> 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: %SYNTAX{"python"}%GaussGen = GenInit ("GaussGen") GaussGen.FirstEventNumber = 1 GaussGen.RunNumber = 1082 %ENDSYNTAX% 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. %SYNTAX{"python"}%#in a ganga session help(GaussSplitter ()) my_job.splitter = GaussSplitter () my_job.application.script = '/path/to/some/gauss/options.py' # only set RunNumber %ENDSYNTAX% ---+++ 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 [[http://lhcb-release-area.web.cern.ch/LHCb-release-area/DOC/gauss/doc/FirstEventOptions.php][How to generate samples for first data]] ---+++ Where can I find general statistics for the generator and simulation phase of Gauss in DC06? #StatAnchor 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"). * [[LHCb.GengaussCounters][Counters used to produce generator statistic]] * [[http://lhcb-release-area.web.cern.ch/LHCb-release-area/DOC/STATISTICS/SimulationTables.pdf][Counters used to produce simulation statistics]] * [[http://cern.ch/LHCb-release-area/DOC/STATISTICS][Generator and Simulation Statistic Tables for DC06]]. ---+++ 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 <verbatim> setFilterPassed(true) </verbatim> for "interesting" events and <verbatim> setFilterPassed(false)</verbatim> for those you want to discard. You then can the add your algorithm at the end of the Simulation sequence <verbatim> Simulation.Members += { "MyFilter"};</verbatim> 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 -- Main.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 <a href="https://lhcb-nightlies.web.cern.ch/nightly/summary/" title="https://lhcb-nightlies.web.cern.ch/nightly/summary/">can be found on the LHCbNightlies page</a>. To run from the nightlies without touching the code there, you can run <br />lb-run -c x86_64-centos7-gcc9-opt --nightly lhcb-gauss-dev/Today Gauss/HEAD bash --norc<br /><br />If you want access to the whole nightly build, requiring recompilation in some cases, choose a slot (say lhcb-gauss-dev), then do<br /><br /><br />lbn-install --verbose --platforms=x86_64-centos7-gcc9-opt --projects=Geant4,Gauss lhcb-gauss-dev Today<br /><br /><br />This will install Geant4 and Gauss into the directory from the nightlies. Dont forget to append to CMAKE_PREFIX_PATH the cloned directory<br /><br /><br />cd lhcb-gauss-dev/Today/<br />source setupSearchPath.sh<br />export CMAKE_PREFIX_PATH=$PWD:$CMAKE_PREFIX_PATH<br />cd Gauss<br />make -j8 install<br /><br /><br />You can now run as usual:<br />./run gaudirun.py $GAUSSOPTS/Gauss-Job.py ...<br /><br />Where do I read/dump the file with the particle properties ?<br /><br />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).<br /><br />There are different ways of accessing it:<br /> 1 browse the database itself<br /> 1 extract the file from the database<br /> 1 use gaudi and dump the content of the table via the particle property service.<br /> To browse the database via the graphical interface<br /><br /><br />SetupProject LHCb<br />CondDBBrowser DDDB <br /><br />and then navigate to /param/ParticleTable.txt<br />2. To extract the file<br /><br />SetupProject LHCb<br />dump_db_to_files.py -c sqlite_file:$SQLITEDBPATH/DDDB.db/DDDB -s /param/ParticleTable.txt<br /><br />you will find the file in your current directory as DDDB/param/ParticleTable.txt<br /><br />-- Main.GloriaCorti - 22 Feb 2010
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r17
<
r16
<
r15
<
r14
<
r13
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r17 - 2020-09-16
-
AdamDavis
Log In
LHCb/FAQ
LHCb/FAQ Web
Create New Topic
Index
Search
Changes
Notifications
Statistics
Preferences
Public webs
Public webs
ABATBEA
ACPP
ADCgroup
AEGIS
AfricaMap
AgileInfrastructure
ALICE
AliceEbyE
AliceSPD
AliceSSD
AliceTOF
AliFemto
ALPHA
Altair
ArdaGrid
ASACUSA
AthenaFCalTBAna
Atlas
AtlasLBNL
AXIALPET
CAE
CALICE
CDS
CENF
CERNSearch
CLIC
Cloud
CloudServices
CMS
Controls
CTA
CvmFS
DB
DefaultWeb
DESgroup
DPHEP
DM-LHC
DSSGroup
EGEE
EgeePtf
ELFms
EMI
ETICS
FIOgroup
FlukaTeam
Frontier
Gaudi
GeneratorServices
GuidesInfo
HardwareLabs
HCC
HEPIX
ILCBDSColl
ILCTPC
IMWG
Inspire
IPv6
IT
ItCommTeam
ITCoord
ITdeptTechForum
ITDRP
ITGT
ITSDC
LAr
LCG
LCGAAWorkbook
Leade
LHCAccess
LHCAtHome
LHCb
LHCgas
LHCONE
LHCOPN
LinuxSupport
Main
Medipix
Messaging
MPGD
NA49
NA61
NA62
NTOF
Openlab
PDBService
Persistency
PESgroup
Plugins
PSAccess
PSBUpgrade
R2Eproject
RCTF
RD42
RFCond12
RFLowLevel
ROXIE
Sandbox
SocialActivities
SPI
SRMDev
SSM
Student
SuperComputing
Support
SwfCatalogue
TMVA
TOTEM
TWiki
UNOSAT
Virtualization
VOBox
WITCH
XTCA
Cern Search
TWiki Search
Google Search
LHCb/FAQ
All webs
Copyright &© 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