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.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.StandardSequences.Eras import eras
3 
4 ### load which are the tracks collection 2 be monitored
6 
7 ### load the different flavour of settings of the TrackingMonitor module
9 
10 
11 ### define one EDAnalyzer per each track collection
12 ### following suggestion 2. in
13 ### https://hypernews.cern.ch/HyperNews/CMS/get/sw-develtools/1908/1.html
14 for tracks in selectedTracks :
15  label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
16  locals()[label] = TrackerCollisionTrackMonCommon.clone()
17  locals()[label].TrackProducer = cms.InputTag(tracks)
18  locals()[label].FolderName = cms.string(mainfolderName[tracks])
19  locals()[label].PVFolderName = cms.string(vertexfolderName[tracks])
20  locals()[label].TrackPtMin = trackPtMin[tracks]
21  locals()[label].TrackPtBin = trackPtN[tracks]
22  locals()[label].TrackPtMax = trackPtMax[tracks]
23  locals()[label].TrackPBin = trackPtN[tracks]
24  locals()[label].TrackPMin = trackPtMin[tracks]
25  locals()[label].TrackPMax = trackPtMax[tracks]
26  locals()[label].doDCAPlots = doPlotsPCA[tracks]
27  locals()[label].doDCAwrtPVPlots = doPlotsPCA[tracks]
28  locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
29  locals()[label].doSIPPlots = doPlotsPCA[tracks]
30  locals()[label].numCut = numCutString[tracks]
31  locals()[label].denCut = denCutString[tracks]
32  locals()[label].doGoodTracksPlots = doGoodTracksPlots [tracks]
33  locals()[label].doTrackerSpecific = doTrackerSpecific [tracks]
34  locals()[label].doHitPropertiesPlots = doHitPropertiesPlots [tracks]
35  locals()[label].doGeneralPropertiesPlots = doGeneralPropertiesPlots [tracks]
36  locals()[label].doBeamSpotPlots = doBeamSpotPlots [tracks]
37  locals()[label].doSeedParameterHistos = doSeedParameterHistos [tracks]
38  locals()[label].doRecHitVsPhiVsEtaPerTrack = doRecHitVsPhiVsEtaPerTrack [tracks]
39  locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
40  locals()[label].doLayersVsPhiVsEtaPerTrack = doLayersVsPhiVsEtaPerTrack [tracks]
41  locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
42  locals()[label].doPUmonitoring = doPUmonitoring [tracks]
43  locals()[label].doPlotsVsBXlumi = doPlotsVsBXlumi [tracks]
44  locals()[label].doPlotsVsGoodPVtx = doPlotsVsGoodPVtx [tracks]
45  locals()[label].doEffFromHitPatternVsPU = doEffFromHitPatternVsPU [tracks]
46  locals()[label].doEffFromHitPatternVsBX = cms.bool(False)
47 # locals()[label].doStopSource = doStopSource [tracks]
48  locals()[label].setLabel(label)
49 
50 
51  label = 'TrackerCollisionSelectedTrackMonMB' + str(tracks)
52  locals()[label] = TrackerCollisionTrackMonMB.clone()
53  locals()[label].TrackProducer = cms.InputTag(tracks)
54  locals()[label].FolderName = cms.string(mainfolderName[tracks])
55  locals()[label].PVFolderName = cms.string(vertexfolderName[tracks])
56  locals()[label].TrackPtMin = trackPtMin[tracks]
57  locals()[label].TrackPtBin = trackPtN[tracks]
58  locals()[label].TrackPtMax = trackPtMax[tracks]
59  locals()[label].TrackPBin = trackPtN[tracks]
60  locals()[label].TrackPMin = trackPtMin[tracks]
61  locals()[label].TrackPMax = trackPtMax[tracks]
62  locals()[label].doDCAPlots = doPlotsPCA[tracks]
63  locals()[label].doDCAwrtPVPlots = doPlotsPCA[tracks]
64  locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
65  locals()[label].doSIPPlots = doPlotsPCA[tracks]
66  locals()[label].numCut = numCutString[tracks]
67  locals()[label].denCut = denCutString[tracks]
68  locals()[label].doGoodTracksPlots = doGoodTracksPlots [tracks]
69  locals()[label].doTrackerSpecific = doTrackerSpecific [tracks]
70  locals()[label].doHitPropertiesPlots = doHitPropertiesPlots [tracks]
71  locals()[label].doGeneralPropertiesPlots = doGeneralPropertiesPlots [tracks]
72  locals()[label].doBeamSpotPlots = doBeamSpotPlots [tracks]
73  locals()[label].doSeedParameterHistos = doSeedParameterHistos [tracks]
74  locals()[label].doRecHitVsPhiVsEtaPerTrack = doRecHitVsPhiVsEtaPerTrack [tracks]
75  locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
76  locals()[label].doLayersVsPhiVsEtaPerTrack = doLayersVsPhiVsEtaPerTrack [tracks]
77  locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
78  locals()[label].doPUmonitoring = doPUmonitoring [tracks]
79  locals()[label].doPlotsVsBXlumi = doPlotsVsBXlumi [tracks]
80  locals()[label].doPlotsVsGoodPVtx = doPlotsVsGoodPVtx [tracks]
81  locals()[label].doEffFromHitPatternVsPU = doEffFromHitPatternVsPU [tracks]
82  locals()[label].doEffFromHitPatternVsBX = doEffFromHitPatternVsBX [tracks]
83  locals()[label].doStopSource = doStopSource [tracks]
84  locals()[label].setLabel(label)
85 
86 
87 #-------------------------------------------------
88 # Tracking Monitor
89 #-------------------------------------------------
90 import DQM.TrackingMonitor.TrackingMonitorSeed_cfi
91 
93 for step in selectedIterTrackingStep :
94  label = 'TrackSeedMon'+str(step)
95  locals()[label] = DQM.TrackingMonitor.TrackingMonitorSeed_cfi.TrackMonSeed.clone(
96  doTrackCandHistos = cms.bool(True)
97  )
98  locals()[label].TrackProducer = cms.InputTag("generalTracks")
99  locals()[label].FolderName = cms.string("Tracking/TrackParameters/generalTracks")
100  locals()[label].SeedProducer = seedInputTag[step]
101  locals()[label].TCProducer = trackCandInputTag[step]
102  locals()[label].AlgoName = cms.string( str(step) )
103  locals()[label].TkSeedSizeBin = trackSeedSizeBin[step]
104  locals()[label].TkSeedSizeMin = trackSeedSizeMin[step]
105  locals()[label].TkSeedSizeMax = trackSeedSizeMax[step]
106  locals()[label].ClusterLabels = clusterLabel[step]
107  if clusterLabel[step] == cms.vstring('Pix') :
108  locals()[label].NClusPxBin = clusterBin[step]
109  locals()[label].NClusPxMax = clusterMax[step]
110  elif clusterLabel[step] == cms.vstring('Strip') or clusterLabel[step] == cms.vstring('Tot') :
111  locals()[label].NClusStrBin = clusterBin[step]
112  locals()[label].NClusStrMax = clusterMax[step]
113 
114 # DQM Services
115 dqmInfoTracking = cms.EDAnalyzer("DQMEventInfo",
116  subSystemFolder = cms.untracked.string('Tracking')
117 )
118 
119 # LogMessageMonitor ####
120 ### load which are the module to monitor
122 
123 ### load the different flavour of settings of the LogMessageMonitor module
125 
126 for module in selectedModules :
127  label = str(module)+'LogMessageMonCommon'
128  locals()[label] = LogMessageMonCommon.clone()
129  locals()[label].pluginsMonName = pluginsMonName[module]
130  locals()[label].modules = modulesLabel[module]
131  locals()[label].categories = categories[module]
132  locals()[label].setLabel(label)
133 
134  label = str(module)+'LogMessageMonMB'
135  locals()[label] = LogMessageMonMB.clone()
136  locals()[label].pluginsMonName = pluginsMonName[module]
137  locals()[label].modules = modulesLabel[module]
138  locals()[label].categories = categories[module]
139  locals()[label].setLabel(label)
140 
141 
142 # dEdx monitor ####
143 ### load which dedx
145 
146 ### load the different flavour of settings of the dEdxAnalyzer module
148 
149 
150 # temporary patch in order to have BXlumi
152 
153 # temporary test in order to temporary produce the "goodPrimaryVertexCollection"
154 # define with a new name if changes are necessary, otherwise simply include
155 # it from CommonTools/ParticleFlow/python/goodOfflinePrimaryVertices_cfi.py
156 # uncomment when necessary
157 from PhysicsTools.SelectorUtils.pvSelector_cfi import pvSelector
158 from CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi import goodOfflinePrimaryVertices
159 trackingDQMgoodOfflinePrimaryVertices = goodOfflinePrimaryVertices.clone()
160 trackingDQMgoodOfflinePrimaryVertices.filterParams = pvSelector.clone( minNdof = cms.double(4.0), maxZ = cms.double(24.0) )
161 trackingDQMgoodOfflinePrimaryVertices.src=cms.InputTag('offlinePrimaryVertices')
162 trackingDQMgoodOfflinePrimaryVertices.filter = cms.bool(False)
163 
164 # Sequence
165 TrackingDQMSourceTier0 = cms.Sequence()
166 # dEdx monitoring
167 TrackingDQMSourceTier0 += dedxHarmonicSequence * dEdxMonCommon * dEdxHitMonCommon
168 # # temporary patch in order to have BXlumi
169 # * lumiProducer
170 # track collections
171 for tracks in selectedTracks :
172  if tracks != 'generalTracks':
173  TrackingDQMSourceTier0 += sequenceName[tracks]
174  label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
175  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
176 # seeding monitoring
177 for step in selectedIterTrackingStep :
178  label = 'TrackSeedMon'+str(step)
179  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
180 eras.trackingLowPU.toReplaceWith(TrackingDQMSourceTier0, TrackingDQMSourceTier0.copyAndExclude([TrackSeedMonjetCoreRegionalStep]))
181 # MessageLog
182 for module in selectedModules :
183  label = str(module)+'LogMessageMonCommon'
184  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
185 TrackingDQMSourceTier0 += dqmInfoTracking
186 
187 
188 TrackingDQMSourceTier0Common = cms.Sequence()
189 # dEdx monitoring
190 TrackingDQMSourceTier0Common += (dedxHarmonicSequence * dEdxMonCommon * dEdxHitMonCommon)
191 ## monitor track collections
192 for tracks in selectedTracks :
193  if tracks != 'generalTracks':
194  TrackingDQMSourceTier0Common+=sequenceName[tracks]
195  label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
196  TrackingDQMSourceTier0Common += cms.Sequence(locals()[label])
197 # seeding monitoring
198 for step in selectedIterTrackingStep :
199  label = 'TrackSeedMon'+str(step)
200  TrackingDQMSourceTier0Common += cms.Sequence(locals()[label])
201 eras.trackingLowPU.toReplaceWith(TrackingDQMSourceTier0Common, TrackingDQMSourceTier0Common.copyAndExclude([TrackSeedMonjetCoreRegionalStep]))
202 # MessageLog
203 for module in selectedModules :
204  label = str(module)+'LogMessageMonCommon'
205  TrackingDQMSourceTier0Common += cms.Sequence(locals()[label])
206 TrackingDQMSourceTier0Common += dqmInfoTracking
207 
208 TrackingDQMSourceTier0MinBias = cms.Sequence()
209 # dEdx monitoring
210 TrackingDQMSourceTier0MinBias += dedxHarmonicSequence * dEdxMonCommon * dEdxHitMonCommon
211 # * lumiProducer
212 # * trackingDQMgoodOfflinePrimaryVertices
213 # monitor track collections
214 for tracks in selectedTracks :
215  if tracks != 'generalTracks':
216  TrackingDQMSourceTier0MinBias += sequenceName[tracks]
217  label = 'TrackerCollisionSelectedTrackMonMB' + str(tracks)
218  TrackingDQMSourceTier0MinBias += cms.Sequence(locals()[label])
219 # seeding monitoring
220 for step in selectedIterTrackingStep :
221  label = 'TrackSeedMon'+str(step)
222  TrackingDQMSourceTier0MinBias += cms.Sequence(locals()[label])
223 eras.trackingLowPU.toReplaceWith(TrackingDQMSourceTier0MinBias, TrackingDQMSourceTier0MinBias.copyAndExclude([TrackSeedMonjetCoreRegionalStep]))
224 # MessageLog
225 for module in selectedModules :
226  label = str(module)+'LogMessageMonMB'
227  TrackingDQMSourceTier0MinBias += cms.Sequence(locals()[label])
228 TrackingDQMSourceTier0MinBias += dqmInfoTracking
229 
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