CMS 3D CMS Logo

TrackingRecHitProducer_cfi.py
Go to the documentation of this file.
1 # Python 2 vs 3 compatibility library:
2 
3 import FWCore.ParameterSet.Config as cms
4 
5 
6 # Load the detailed configurations of pixel plugins.
7 # NB: for any new detector geometry (e.g. Phase 2 varians), we should write a new plugin
8 # config file, and import it here, and below use its own Era to load it.
9 #
10 from FastSimulation.TrackingRecHitProducer.PixelPluginsPhase0_cfi import pixelPluginsPhase0
11 from FastSimulation.TrackingRecHitProducer.PixelPluginsPhase1_cfi import pixelPluginsPhase1
12 from FastSimulation.TrackingRecHitProducer.PixelPluginsPhase2_cfi import pixelPluginsPhase2
13 
14 # The default is (for better of worse) Phase 0:
15 #
16 fastTrackerRecHits = cms.EDProducer("TrackingRecHitProducer",
17  simHits = cms.InputTag("fastSimProducer","TrackerHits"),
18  plugins = pixelPluginsPhase0
19 )
20 
21 # Phase 1 Era: replace plugins by Phase 1 plugins
22 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
23 phase1Pixel.toModify(fastTrackerRecHits, plugins = pixelPluginsPhase1)
24 
25 # Phase 2 Era: replace plugins by Phase 2 plugins, etc...
26 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
27 phase2_tracker.toModify(fastTrackerRecHits, plugins = pixelPluginsPhase2)
28 
29 # Configure strip tracker Gaussian-smearing plugins:
30 trackerStripGaussianResolutions={
31  "TIB": {
32  1: cms.double(0.00195),
33  2: cms.double(0.00191),
34  3: cms.double(0.00325),
35  4: cms.double(0.00323)
36  },
37  "TID": {
38  1: cms.double(0.00262),
39  2: cms.double(0.00354),
40  3: cms.double(0.00391)
41  },
42  "TOB": {
43  1: cms.double(0.00461),
44  2: cms.double(0.00458),
45  3: cms.double(0.00488),
46  4: cms.double(0.00491),
47  5: cms.double(0.00293),
48  6: cms.double(0.00299)
49  },
50  "TEC": {
51  1: cms.double(0.00262),
52  2: cms.double(0.00354),
53  3: cms.double(0.00391),
54  4: cms.double(0.00346),
55  5: cms.double(0.00378),
56  6: cms.double(0.00508),
57  7: cms.double(0.00422),
58  8: cms.double(0.00434),
59  9: cms.double(0.00432),
60  }
61 }
62 
63 for subdetId,trackerLayers in trackerStripGaussianResolutions.items():
64  for trackerLayer, resolutionX in trackerLayers.items():
65  pluginConfig = cms.PSet(
66  name = cms.string(subdetId+str(trackerLayer)),
67  type=cms.string("TrackingRecHitStripGSPlugin"),
68  resolutionX=resolutionX,
69  select=cms.string("(subdetId=="+subdetId+") && (layer=="+str(trackerLayer)+")"),
70  )
71  fastTrackerRecHits.plugins.append(pluginConfig)
#define str(s)