User Tools

Site Tools


gauss:gauss

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
gauss:gauss [2012/04/05 11:59] – [How to write out MCParticles in Gauss] chegauss:gauss [2012/04/10 16:16] (current) che
Line 48: Line 48:
  
 These both things (running EvtGen standalone and writing out MCParticles) can of course be combined. These both things (running EvtGen standalone and writing out MCParticles) can of course be combined.
 +
 +===== Running Particle Gun =====
 +If you want to run a particle gun producing a particle type which should decay in EvtGen you have to change your options file accordingly to this prototype file (Gauss v41r1):
 +<code python>
 +# file /home/hep/che/cmtuser/Gauss_v41r0/Gen/DecFiles/options/27876001.py generated: Wed, 04 Apr 2012 11:45:14
 +#
 +# Event Type: 27876001
 +#
 +# ASCII decay Descriptor: { [ D*+ -> pi+ pi+ pi- ]cc }
 +#
 +from Configurables import ParticleGun
 +from Configurables import MomentumRange
 +ParticleGun().addTool( MomentumRange )
 +from GaudiKernel import SystemOfUnits
 +ParticleGun().MomentumRange.MomentumMin = 150.0*SystemOfUnits.GeV
 +from GaudiKernel import SystemOfUnits
 +ParticleGun().MomentumRange.MomentumMax = 1000.0*SystemOfUnits.GeV
 +ParticleGun().EventType = 27876001
 +ParticleGun().ParticleGunTool = "MomentumRange"
 +ParticleGun().NumberOfParticlesTool = "FlatNParticles"
 +ParticleGun().MomentumRange.PdgCodes = [ 413,-413 ]
 +
 +from Configurables import ToolSvc
 +from Configurables import EvtGenDecay
 +ToolSvc().addTool( EvtGenDecay )
 +ToolSvc().EvtGenDecay.UserDecayFile = "$DECFILESROOT/dkfiles/incl_Dst3body=cocktail.dec"
 +from Gaudi.Configuration import *
 +importOptions( "$DECFILESROOT/options/TrackersAcceptance.opts" )
 +ParticleGun().DecayTool = "EvtGenDecay"
 +</code>
 +
 +The numbering is incorrect as options file for Particle Guns start with 5. As the numbering scheme in case of Particle Guns aims at stable particles the official numbering scheme does not make much sense in this case. Anyhow, the numbering does not affect the performance of the option file for Particle Guns.
 +In addition you have to add the line
 +<code python>
 +Gauss().Production = 'PGUN'
 +</code>
 +to your Gauss Job file.
 +
gauss/gauss.1333619940.txt.gz · Last modified: 2012/04/05 11:59 by che