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