Skip to content

Commit

Permalink
Merge pull request #36524 from perrotta/updateG4SimHitsCfi
Browse files Browse the repository at this point in the history
Safer syntax for modifying the configuration parameters in g4SimHits_cfi.py
  • Loading branch information
cmsbuild committed Dec 17, 2021
2 parents a9f4483 + 45ef8d9 commit bcdf7b6
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions SimG4Core/Application/python/g4SimHits_cfi.py
Expand Up @@ -625,11 +625,11 @@
run2_HCAL_2017.toModify( g4SimHits, HCalSD = dict( TestNumberingScheme = True ) )

##
## Disable Castor from Run 3, enable PPS
## Disable Castor from Run 3, enable PPS (***temporarily disable PPS***)
##
from Configuration.Eras.Modifier_run3_common_cff import run3_common
run3_common.toModify( g4SimHits, CastorSD = dict( useShowerLibrary = False ) )
run3_common.toModify( g4SimHits, LHCTransport = True )
run3_common.toModify( g4SimHits, LHCTransport = False )

##
## Disable PPS from Run 3 PbPb runs
Expand All @@ -641,16 +641,19 @@
## Change ECAL time slices
##
from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
phase2_timing.toModify( g4SimHits.ECalSD,
StoreLayerTimeSim = cms.untracked.bool(True),
TimeSliceUnit = cms.double(0.001) )
phase2_timing.toModify( g4SimHits, ECalSD = dict(
StoreLayerTimeSim = True,
TimeSliceUnit = 0.001 )
)

##
## Change CALO Thresholds
##
from Configuration.Eras.Modifier_h2tb_cff import h2tb
h2tb.toModify(g4SimHits.CaloSD,
EminHits = cms.vdouble(0.0,0.0,0.0,0.0,0.0),
TmaxHits = cms.vdouble(1000.0,1000.0,1000.0,1000.0,2000.0) )
h2tb.toModify(g4SimHits, CaloSD = dict(
EminHits = [0.0, 0.0, 0.0, 0.0, 0.0],
TmaxHits = [1000.0, 1000.0, 1000.0, 1000.0, 2000.0] )
)

##
## DD4hep migration
Expand All @@ -664,5 +667,5 @@

from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
phase2_common.toModify(g4SimHits,
OnlySDs = ['ZdcSensitiveDetector', 'TotemT2ScintSensitiveDetector', 'TotemSensitiveDetector', 'RomanPotSensitiveDetector', 'PLTSensitiveDetector', 'MuonSensitiveDetector', 'MtdSensitiveDetector', 'BCM1FSensitiveDetector', 'EcalSensitiveDetector', 'CTPPSSensitiveDetector', 'HGCalSensitiveDetector', 'BSCSensitiveDetector', 'CTPPSDiamondSensitiveDetector', 'FP420SensitiveDetector', 'BHMSensitiveDetector', 'HFNoseSensitiveDetector', 'HGCScintillatorSensitiveDetector', 'CastorSensitiveDetector', 'CaloTrkProcessing', 'HcalSensitiveDetector', 'TkAccumulatingSensitiveDetector'] )
phase2_common.toModify( g4SimHits, LHCTransport = False )
OnlySDs = ['ZdcSensitiveDetector', 'TotemT2ScintSensitiveDetector', 'TotemSensitiveDetector', 'RomanPotSensitiveDetector', 'PLTSensitiveDetector', 'MuonSensitiveDetector', 'MtdSensitiveDetector', 'BCM1FSensitiveDetector', 'EcalSensitiveDetector', 'CTPPSSensitiveDetector', 'HGCalSensitiveDetector', 'BSCSensitiveDetector', 'CTPPSDiamondSensitiveDetector', 'FP420SensitiveDetector', 'BHMSensitiveDetector', 'HFNoseSensitiveDetector', 'HGCScintillatorSensitiveDetector', 'CastorSensitiveDetector', 'CaloTrkProcessing', 'HcalSensitiveDetector', 'TkAccumulatingSensitiveDetector'],
LHCTransport = False )

0 comments on commit bcdf7b6

Please sign in to comment.