Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:37

0001 #####################################
0002 # a bunch of handy customisation functions
0003 # author: Lukas Vanelderen
0004 # date:   Jan 21 2015
0005 #####################################
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 def disableOOTPU(process):
0010     process.mix.maxBunch = cms.int32(0)
0011     process.mix.minBunch = cms.int32(0)
0012     # set the bunch spacing
0013     # bunch spacing matters for calorimeter calibration
0014     # by convention bunchspace is set to 450 in case of no oot pu
0015     process.mix.bunchspace = 450
0016     return process
0017 
0018 # run this customisation function during the digi-step
0019 # when processing a gen-sim sample that was generated with the HCALECAL geometry
0020 def fakeSimHits_for_geometry_ECALHCAL(process):
0021     import FastSimulation.Validation.EmptySimHits_cfi
0022     process.g4SimHits = FastSimulation.Validation.EmptySimHits_cfi.emptySimHits.clone(
0023         pCaloHitInstanceLabels = ["CastorFI"],
0024         pSimHitInstanceLabels = []
0025         )
0026     for _entry  in process.mix.mixObjects.mixSH.input:
0027         process.g4SimHits.pSimHitInstanceLabels.append(_entry.getProductInstanceLabel())
0028     process.emptySimHits_step = cms.Path(process.g4SimHits)
0029     process.schedule.insert(0,process.emptySimHits_step)
0030     return process
0031 
0032 def disableMaterialInteractionsTracker(process):
0033     for layer in process.fastSimProducer.detectorDefinition.BarrelLayers: 
0034         layer.interactionModels = cms.untracked.vstring("trackerSimHits")
0035     for layer in process.fastSimProducer.detectorDefinition.ForwardLayers: 
0036         layer.interactionModels = cms.untracked.vstring("trackerSimHits")
0037     return process
0038