Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-22 02:45:24

0001 import FWCore.ParameterSet.Config as cms
0002 from SimCalorimetry.HcalSimProducers.hcalSimParameters_cfi import *
0003 from DataFormats.HcalCalibObjects.HFRecalibrationParameters_cff import *
0004 
0005 # make a block so other modules, such as the data mixing module, can
0006 # also run simulation
0007 
0008 hcalSimBlock = cms.PSet(    
0009     hcalSimParameters,
0010     # whether cells with MC signal get noise added
0011     doNoise = cms.bool(True),
0012     killHE = cms.bool(False),
0013     doZDCDigi = cms.bool(True),
0014     HcalPreMixStage1 = cms.bool(False),
0015     HcalPreMixStage2 = cms.bool(False),
0016     # whether cells with no MC signal get an empty signal created
0017     # These empty signals can get noise via the doNoise flag
0018     doEmpty = cms.bool(True),
0019     doIonFeedback = cms.bool(True),
0020     doThermalNoise = cms.bool(True),
0021     doTimeSlew = cms.bool(True),
0022     doHFWindow = cms.bool(False),
0023     hitsProducer = cms.string('g4SimHits'),
0024     DelivLuminosity = cms.double(0),
0025     TestNumbering = cms.bool(False),
0026     doNeutralDensityFilter = cms.bool(True),
0027     HBDarkening = cms.bool(False),
0028     HEDarkening = cms.bool(False),
0029     HFDarkening = cms.bool(False),
0030     minFCToDelay=cms.double(5.), # old TC model! set to 5 for the new one
0031     debugCaloSamples=cms.bool(False),
0032     ignoreGeantTime=cms.bool(False),
0033     # settings for SimHit test injection
0034     injectTestHits = cms.bool(False),
0035     # if no time is specified for injected hits, t = 0 will be used
0036     # (recommendation: enable "ignoreGeantTime" in that case to set t = tof)
0037     # otherwise, need 1 time value per energy value
0038     injectTestHitsEnergy = cms.vdouble(),
0039     injectTestHitsTime = cms.vdouble(),
0040     # format for cells: subdet, ieta, iphi, depth
0041     # multiple quadruplets can be specified
0042     # if instead only 1 value is given, 
0043     # it will be interpreted as an entire subdetector
0044     injectTestHitsCells = cms.vint32(),
0045     HFRecalParameterBlock = HFRecalParameterBlock,
0046 )
0047 
0048 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0049 fastSim.toModify( hcalSimBlock, hitsProducer = "fastSimProducer" )
0050 
0051 from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
0052 premix_stage1.toModify(hcalSimBlock,
0053     doNoise = False,
0054     doEmpty = False,
0055     doIonFeedback = False,
0056     doThermalNoise = False,
0057     doTimeSlew = False,
0058     HcalPreMixStage1 = True,
0059 )
0060 
0061 # test numbering not used in fastsim
0062 from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
0063 (run2_HCAL_2017 & ~fastSim).toModify( hcalSimBlock, TestNumbering = True )
0064 
0065 # remove HE processing for phase 2, completely put in HGCal land
0066 # Also inhibit ZDC digitization
0067 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
0068 phase2_hgcal.toModify(hcalSimBlock,
0069                       doZDCDigi = False,
0070                       killHE = True
0071 )
0072 
0073 # inhibit ZDC digitization
0074 from Configuration.Eras.Modifier_zdcNoDigi_cff import zdcNoDigi
0075 zdcNoDigi.toModify(hcalSimBlock, doZDCDigi = False )