The SHERPA generator in LHCb

SHERPA is a Monte Carlo event generator for the simulation of high-energy reactions of particles in lepton-lepton, lepton-photon, photon-photon, lepton-hadron and hadron-hadron collisions. You can find a detailed description of SHERPA and a lot of its features here.

Introduction

If you want to use SHERPA as a event generator in Gauss, you have to setup the newest version of the Gauss environment first,

lb-run Gauss

As Gauss splits the event generation into different stages/tools, you have three possibilities to use SHERPA:

  • SHERPA as a Production Tool only
  • SHERPA as a Decay Tool only
  • SHERPA as a complete Sample Generation Tool

The first two cases can be realized with tools called SherpaProduction and SherpaDecay. Unfortunately, there are some cases where SHERPA-like events (stored internally as so called blobs) can not be correctly converted into HepMC events. Therefore, we created a property called DoTheDecays, which induces SHERPA to care about both, generation and decay of the particles. A complete example code of this feature is specified below.

Running the Code

For your quick check of SHERPA, just copy+paste the following lines

    1### Test_Production_Sherpa.py ###
    2
    3######################
    4# CONFIGURATION GAUSS#
    5######################
    6nEvts = 1
    7idFile = 'Gauss_Sherpa_Z0bbbar_mumu'
    8#################
    9from Gauss.Configuration import *
   10
   11#--Generator phase, set random numbers
   12GaussGen = GenInit("GaussGen")
   13GaussGen.FirstEventNumber = 1
   14GaussGen.RunNumber        = 1082
   15
   16#--Number of events
   17LHCbApp().EvtMax = nEvts
   18HistogramPersistencySvc().OutputFile = idFile+'-histos.root'
   19OutputStream("GaussTape").Output = "DATAFILE='PFN:%s.xgen' TYP='POOL_ROOTTREE' OPT='RECREATE'"%idFile
   20
   21from Configurables import LHCbApp
   22LHCbApp().DDDBtag   = "Sim08-20130503-1"
   23LHCbApp().CondDBtag = "Sim08-20130503-1-vc-md100"
   24
   25#-- import options
   26importOptions('$LBSHERPAROOT/options/SherpaProduction.py')
   27importOptions('$APPCONFIGOPTS/Conditions/Sim08a-2012-md100.py')
   28importOptions('$APPCONFIGOPTS/Gauss/Sim08-Beam4000GeV-md100-2012-nu2.5.py')
   29importOptions('$APPCONFIGOPTS/Gauss/xgen.py')

    1### Sherpa_Configuration.py ###
    2
    3#######################
    4# CONFIGURATION SHERPA#
    5#######################
    6import os
    7from Configurables import Generation
    8Generation().SampleGenerationTool = "Special"
    9Generation().OutputLevel = 0
   10
   11from Configurables import Special
   12Generation().addTool(Special, name='Special')
   13
   14from Configurables import SherpaProduction
   15Generation().Special.ProductionTool = "SherpaProduction"
   16Generation().Special.ReinitializePileUpGenerator = False
   17Generation().Special.CutTool = ""
   18
   19Generation().Special.addTool(SherpaProduction, name='SherpaProduction')
   20Generation().Special.SherpaProduction.RUNDATA = os.getenv("SHERPADATFILESROOT")+"/SteeringDats/ProdToolDats/Z0bb_mumu_Production_Run.dat"

and run it:

gaudirun.py Test_Production_Sherpa.py Sherpa_Configuration.py

Executing the code for the first time, SHERPA will write libraries for each single process defined in the Z0bb_Production_Run.dat (called runcard). To compile these, one has to run ./makelibs. Once this has finished, repeat the gaudirun above step and SHERPA will start to calculate cross sections. The result will be saved in a folder called Process. Depending on the difficulty of this calculation (e.g. including loop corrections, multiple jets in the final state, etc.), this could take around a few minutes to days.

Warning: If you want to calculate new processes, always make sure that you have a clean working directory (which means without a Process folder), otherwise you could get segfaults!

Contact

If you have any wishes or trouble using SHERPA in Gauss, feel free to contact us ( Timon Schmelzer, Ramon Niet)
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2017-06-30 - TimonSchmelzer
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback