CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackingSourceConfig_Tier0_cff.py
Go to the documentation of this file.
2 
3 ### load which are the tracks collection 2 be monitored
5 
6 ### load the different flavour of settings of the TrackingMonitor module
8 
9 
10 ### define one EDAnalyzer per each track collection
11 ### following suggestion 2. in
12 ### https://hypernews.cern.ch/HyperNews/CMS/get/sw-develtools/1908/1.html
13 for tracks in selectedTracks :
14  label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
15  locals()[label] = TrackerCollisionTrackMonCommon.clone()
16  locals()[label].TrackProducer = cms.InputTag(tracks)
17  locals()[label].FolderName = cms.string(mainfolderName[tracks])
18  locals()[label].PVFolderName = cms.string(vertexfolderName[tracks])
19  locals()[label].TrackPtMin = trackPtMin[tracks]
20  locals()[label].TrackPtMax = trackPtMax[tracks]
21  locals()[label].TrackPMin = trackPtMin[tracks]
22  locals()[label].TrackPMax = trackPtMax[tracks]
23  locals()[label].doDCAPlots = doPlotsPCA[tracks]
24  locals()[label].doDCAwrtPVPlots = doPlotsPCA[tracks]
25  locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
26  locals()[label].setLabel(label)
27 
28 
29  label = 'TrackerCollisionSelectedTrackMonMB' + str(tracks)
30  locals()[label] = TrackerCollisionTrackMonMB.clone()
31  locals()[label].TrackProducer = cms.InputTag(tracks)
32  locals()[label].FolderName = cms.string(mainfolderName[tracks])
33  locals()[label].PVFolderName = cms.string(vertexfolderName[tracks])
34  locals()[label].TrackPtMin = trackPtMin[tracks]
35  locals()[label].TrackPtMax = trackPtMax[tracks]
36  locals()[label].TrackPMin = trackPtMin[tracks]
37  locals()[label].TrackPMax = trackPtMax[tracks]
38  locals()[label].doDCAPlots = doPlotsPCA[tracks]
39  locals()[label].doDCAwrtPVPlots = doPlotsPCA[tracks]
40  locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
41  locals()[label].setLabel(label)
42 
43 
44 #-------------------------------------------------
45 # Tracking Monitor
46 #-------------------------------------------------
47 import DQM.TrackingMonitor.TrackingMonitorSeed_cfi
48 
50 for step in selectedIterTrackingStep :
51  label = 'TrackSeedMon'+str(step)
52  locals()[label] = DQM.TrackingMonitor.TrackingMonitorSeed_cfi.TrackMonSeed.clone()
53  locals()[label].TrackProducer = cms.InputTag("generalTracks")
54  locals()[label].FolderName = cms.string("Tracking/TrackParameters/generalTracks")
55  locals()[label].SeedProducer = seedInputTag[step]
56  locals()[label].TCProducer = trackCandInputTag[step]
57  locals()[label].AlgoName = cms.string( str(step) )
58  locals()[label].TkSeedSizeBin = trackSeedSizeBin[step]
59  locals()[label].TkSeedSizeMin = trackSeedSizeMin[step]
60  locals()[label].TkSeedSizeMax = trackSeedSizeMax[step]
61  locals()[label].ClusterLabels = clusterLabel[step]
62  if clusterLabel[step] == cms.vstring('Pix') :
63  locals()[label].NClusPxBin = clusterBin[step]
64  locals()[label].NClusPxMax = clusterMax[step]
65  elif clusterLabel[step] == cms.vstring('Strip') or clusterLabel[step] == cms.vstring('Tot') :
66  locals()[label].NClusStrBin = clusterBin[step]
67  locals()[label].NClusStrMax = clusterMax[step]
68 
69 # DQM Services
70 dqmInfoTracking = cms.EDAnalyzer("DQMEventInfo",
71  subSystemFolder = cms.untracked.string('Tracking')
72 )
73 
74 # LogMessageMonitor ####
75 ### load which are the module to monitor
77 
78 ### load the different flavour of settings of the LogMessageMonitor module
80 
81 for module in selectedModules :
82  label = str(module)+'LogMessageMonCommon'
83  locals()[label] = LogMessageMonCommon.clone()
84  locals()[label].pluginsMonName = pluginsMonName[module]
85  locals()[label].modules = modulesLabel[module]
86  locals()[label].categories = categories[module]
87  locals()[label].setLabel(label)
88 
89  label = str(module)+'LogMessageMonMB'
90  locals()[label] = LogMessageMonMB.clone()
91  locals()[label].pluginsMonName = pluginsMonName[module]
92  locals()[label].modules = modulesLabel[module]
93  locals()[label].categories = categories[module]
94  locals()[label].setLabel(label)
95 
96 
97 # dEdx monitor ####
98 ### load which dedx
100 
101 ### load the different flavour of settings of the dEdxAnalyzer module
103 
104 
105 # temporary patch in order to have BXlumi
107 
108 # temporary test in order to temporary produce the "goodPrimaryVertexCollection"
109 # define with a new name if changes are necessary, otherwise simply include
110 # it from CommonTools/ParticleFlow/python/goodOfflinePrimaryVertices_cfi.py
111 # uncomment when necessary
112 from PhysicsTools.SelectorUtils.pvSelector_cfi import pvSelector
113 from CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi import goodOfflinePrimaryVertices
114 trackingDQMgoodOfflinePrimaryVertices = goodOfflinePrimaryVertices.clone()
115 trackingDQMgoodOfflinePrimaryVertices.filterParams = pvSelector.clone( minNdof = cms.double(4.0), maxZ = cms.double(24.0) )
116 trackingDQMgoodOfflinePrimaryVertices.src=cms.InputTag('offlinePrimaryVertices')
117 trackingDQMgoodOfflinePrimaryVertices.filter = cms.bool(False)
118 
119 # Sequence
120 TrackingDQMSourceTier0 = cms.Sequence()
121 # dEdx monitoring
122 TrackingDQMSourceTier0 += dedxHarmonicSequence * dEdxMonCommon
123 # # temporary patch in order to have BXlumi
124 # * lumiProducer
125 # track collections
126 for tracks in selectedTracks :
127  if tracks != 'generalTracks':
128  TrackingDQMSourceTier0 += sequenceName[tracks]
129  label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
130  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
131 # seeding monitoring
132 for step in selectedIterTrackingStep :
133  label = 'TrackSeedMon'+str(step)
134  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
135 # MessageLog
136 for module in selectedModules :
137  label = str(module)+'LogMessageMonCommon'
138  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
139 TrackingDQMSourceTier0 += dqmInfoTracking
140 
141 
142 TrackingDQMSourceTier0Common = cms.Sequence()
143 # dEdx monitoring
144 TrackingDQMSourceTier0Common += (dedxHarmonicSequence * dEdxMonCommon)
145 ## monitor track collections
146 for tracks in selectedTracks :
147  if tracks != 'generalTracks':
148  TrackingDQMSourceTier0Common+=sequenceName[tracks]
149  label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
150  TrackingDQMSourceTier0Common += cms.Sequence(locals()[label])
151 # seeding monitoring
152 for step in selectedIterTrackingStep :
153  label = 'TrackSeedMon'+str(step)
154  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
155 # MessageLog
156 for module in selectedModules :
157  label = str(module)+'LogMessageMonCommon'
158  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
159 TrackingDQMSourceTier0Common += dqmInfoTracking
160 
161 TrackingDQMSourceTier0MinBias = cms.Sequence()
162 # dEdx monitoring
163 TrackingDQMSourceTier0MinBias += dedxHarmonicSequence * dEdxMonCommon
164 # * lumiProducer
165 # * trackingDQMgoodOfflinePrimaryVertices
166 # monitor track collections
167 for tracks in selectedTracks :
168  if tracks != 'generalTracks':
169  TrackingDQMSourceTier0MinBias += sequenceName[tracks]
170  label = 'TrackerCollisionSelectedTrackMonMB' + str(tracks)
171  TrackingDQMSourceTier0MinBias += cms.Sequence(locals()[label])
172 # seeding monitoring
173 for step in selectedIterTrackingStep :
174  label = 'TrackSeedMon'+str(step)
175  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
176 # MessageLog
177 for module in selectedModules :
178  label = str(module)+'LogMessageMonMB'
179  TrackingDQMSourceTier0MinBias += cms.Sequence(locals()[label])
180 TrackingDQMSourceTier0MinBias += dqmInfoTracking
181 
load which dedx
load the different flavour of settings of the dEdxAnalyzer module
load which are the tracks collection 2 be monitored
load the different flavour of settings of the LogMessageMonitor module
load which are the module to monitor
load the different flavour of settings of the TrackingMonitor module