CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SimIdealNeutrons_NoQuads_cff.py
Go to the documentation of this file.
1 # Modified version of
2 # Configuration/StandardSequences/python/SimIdeal_cff.py
3 
4 import FWCore.ParameterSet.Config as cms
5 
6 # CMSSW/Geant4 interface
8 
9 # rename g4SimHits so we can reuse the module label for neutron simhits collection
10 g4SimHitsNeutrons = g4SimHits.clone()
11 g4SimHitsNeutrons.Generator.HepMCProductLabel = cms.string('generatorNeutrons')
12 del g4SimHits
13 
14 # Configure G4 for neutron hits:
15 g4SimHitsNeutrons.Physics.type = 'SimG4Core/Physics/QGSP_BERT_HP'
16 g4SimHitsNeutrons.Physics.FlagBERT = True
17 g4SimHitsNeutrons.StackingAction.NeutronThreshold = 0.
18 g4SimHitsNeutrons.StackingAction.MaxTrackTime = 1e9
19 g4SimHitsNeutrons.SteppingAction.MaxTrackTime = 1e9
20 # the following two enable simulation in the Quad region
21 # (commenting them out would make debug runs faster)
22 #g4SimHitsNeutrons.StackingAction.MaxTrackTimes[2] = 1e9
23 #g4SimHitsNeutrons.SteppingAction.MaxTrackTimes[2] = 1e9
24 # cuts on generator-level particles
25 g4SimHitsNeutrons.Generator.ApplyPCuts = False
26 g4SimHitsNeutrons.Generator.ApplyEtaCuts = False
27 #only affects weighting of energy deposit, so unneeded
28 #g4SimHitsNeutrons.CaloSD.NeutronThreshold = 0.
29 
30 # special psim sequence:
31 psim_neutrons = cms.Sequence(cms.SequencePlaceholder("randomEngineStateProducer")*g4SimHitsNeutrons)