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 )
35 
36 from Configuration.Eras.Modifier_fastSim_cff import fastSim
37 if fastSim.isChosen():
38  # fastsim does not model castor
39  delattr(theDigitizers,"castor")
40  # fastsim does not digitize pixel and strip hits
41  delattr(theDigitizers,"pixel")
42  delattr(theDigitizers,"strip")
43  setattr(theDigitizers,"tracks",recoTrackAccumulator)
44 
45 
46 from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import hgceeDigitizer, hgchebackDigitizer, hgchefrontDigitizer
47 
48 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
49 phase2_hgcal.toModify( theDigitizers,
50  hgceeDigitizer = cms.PSet(hgceeDigitizer),
51  hgchebackDigitizer = cms.PSet(hgchebackDigitizer),
52  hgchefrontDigitizer = cms.PSet(hgchefrontDigitizer),
53 )
54 
55 from Configuration.Eras.Modifier_run3_common_cff import run3_common
56 run3_common.toModify( theDigitizers, castor = None )
57 
58 from SimGeneral.MixingModule.ecalTimeDigitizer_cfi import ecalTimeDigitizer
59 from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
60 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
61 phase2_timing.toModify( theDigitizers,
62  ecalTime = ecalTimeDigitizer.clone() )
63 
64 from SimFastTiming.Configuration.SimFastTiming_cff import fastTimeDigitizer
65 phase2_timing_layer.toModify( theDigitizers,
66  fastTimingLayer = fastTimeDigitizer.clone() )
67 
68 theDigitizersValid = cms.PSet(
69  theDigitizers,
70  mergedtruth = cms.PSet(
71  trackingParticles
72  )
73  )
74 
75 
76 phase2_hgcal.toModify( theDigitizersValid,
77  calotruth = cms.PSet( caloParticles ) )
78 
79 
80 phase2_timing.toModify( theDigitizersValid.mergedtruth,
81  createInitialVertexCollection = cms.bool(True) )
82