Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:30:22

0001 # Modified version of
0002 # Configuration/StandardSequences/python/SimIdeal_cff.py
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 # CMSSW/Geant4 interface
0007 from SimG4Core.Configuration.SimG4Core_cff import *
0008 
0009 # rename g4SimHits so we can reuse the module label for neutron simhits collection
0010 g4SimHitsNeutrons = g4SimHits.clone()
0011 g4SimHitsNeutrons.Generator.HepMCProductLabel = cms.string('generatorNeutrons')
0012 del g4SimHits
0013 
0014 # Configure G4 for neutron hits:
0015 g4SimHitsNeutrons.Physics.type = 'SimG4Core/Physics/QGSP_BERT_HP'
0016 g4SimHitsNeutrons.Physics.FlagBERT = True
0017 g4SimHitsNeutrons.StackingAction.NeutronThreshold = 0.
0018 g4SimHitsNeutrons.StackingAction.MaxTrackTime = 1e9
0019 g4SimHitsNeutrons.SteppingAction.MaxTrackTime = 1e9
0020 # the following two enable simulation in the Quad region
0021 # (commenting them out would make debug runs faster)
0022 #g4SimHitsNeutrons.StackingAction.MaxTrackTimes[2] = 1e9
0023 #g4SimHitsNeutrons.SteppingAction.MaxTrackTimes[2] = 1e9
0024 #  cuts on generator-level particles
0025 g4SimHitsNeutrons.Generator.ApplyPCuts = False
0026 g4SimHitsNeutrons.Generator.ApplyEtaCuts = False
0027 #only affects weighting of energy deposit, so unneeded
0028 #g4SimHitsNeutrons.CaloSD.NeutronThreshold = 0.
0029 
0030 # special psim sequence:
0031 psim_neutrons = cms.Sequence(cms.SequencePlaceholder("randomEngineStateProducer")*g4SimHitsNeutrons)