CMS 3D CMS Logo

digitizers_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # configuration to model pileup for initial physics phase
14 
15 theDigitizers = cms.PSet(
16  pixel = cms.PSet(
17  pixelDigitizer
18  ),
19  strip = cms.PSet(
20  stripDigitizer
21  ),
22  ecal = cms.PSet(
23  ecalDigitizer
24  ),
25  hcal = cms.PSet(
26  hcalDigitizer
27  ),
28  castor = cms.PSet(
29  castorDigitizer
30  ),
31  puVtx = cms.PSet(
32  pileupVtxDigitizer
33  ),
34  mergedtruth = cms.PSet(
35  trackingParticles
36  )
37 )
38 
39 from Configuration.Eras.Modifier_fastSim_cff import fastSim
40 if fastSim.isChosen():
41  # fastsim does not model castor
42  delattr(theDigitizers,"castor")
43  # fastsim does not digitize pixel and strip hits
44  delattr(theDigitizers,"pixel")
45  delattr(theDigitizers,"strip")
46  setattr(theDigitizers,"tracks",recoTrackAccumulator)
47 
48 
49 from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import hgceeDigitizer, hgchebackDigitizer, hgchefrontDigitizer
50 
51 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
52 phase2_hgcal.toModify( theDigitizers,
53  hgceeDigitizer = cms.PSet(hgceeDigitizer),
54  hgchebackDigitizer = cms.PSet(hgchebackDigitizer),
55  hgchefrontDigitizer = cms.PSet(hgchefrontDigitizer),
56 )
57 
58 from Configuration.Eras.Modifier_run3_common_cff import run3_common
59 run3_common.toModify( theDigitizers, castor = None )
60 
61 from SimGeneral.MixingModule.ecalTimeDigitizer_cfi import ecalTimeDigitizer
62 from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
63 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
64 phase2_timing.toModify( theDigitizers,
65  ecalTime = ecalTimeDigitizer.clone() )
66 
67 from SimFastTiming.Configuration.SimFastTiming_cff import fastTimeDigitizer
68 phase2_timing_layer.toModify( theDigitizers,
69  fastTimingLayer = fastTimeDigitizer.clone() )
70 
71 theDigitizersValid = cms.PSet(theDigitizers)
72 theDigitizers.mergedtruth.select.signalOnlyTP = cms.bool(True)
73 
74 phase2_hgcal.toModify( theDigitizersValid,
75  calotruth = cms.PSet( caloParticles ) )
76 
77 
78 phase2_timing.toModify( theDigitizersValid.mergedtruth,
79  createInitialVertexCollection = cms.bool(True) )
80