CMS 3D CMS Logo

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