1 import FWCore.ParameterSet.Config
as cms
3 import DQM.TrackingMonitor.TrackerCollisionTrackingMonitor_cfi
4 pixelTracksMonitor = DQM.TrackingMonitor.TrackerCollisionTrackingMonitor_cfi.TrackerCollisionTrackMon.clone()
5 pixelTracksMonitor.FolderName =
'Tracking/PixelTrackParameters/pixelTracks'
6 pixelTracksMonitor.TrackProducer =
'pixelTracks'
7 pixelTracksMonitor.allTrackProducer =
'pixelTracks'
8 pixelTracksMonitor.beamSpot =
'offlineBeamSpot'
9 pixelTracksMonitor.primaryVertex =
'pixelVertices'
10 pixelTracksMonitor.pvNDOF = 1
11 pixelTracksMonitor.doAllPlots =
False
12 pixelTracksMonitor.doLumiAnalysis =
True
13 pixelTracksMonitor.doProfilesVsLS =
True
14 pixelTracksMonitor.doDCAPlots =
True
15 pixelTracksMonitor.doProfilesVsLS =
True
16 pixelTracksMonitor.doPlotsVsGoodPVtx =
True
17 pixelTracksMonitor.doEffFromHitPatternVsPU =
False
18 pixelTracksMonitor.doEffFromHitPatternVsBX =
False
19 pixelTracksMonitor.doEffFromHitPatternVsLUMI =
False
20 pixelTracksMonitor.doPlotsVsGoodPVtx =
True
21 pixelTracksMonitor.doPlotsVsLUMI =
True
22 pixelTracksMonitor.doPlotsVsBX =
True
24 _trackSelector = cms.EDFilter(
'TrackSelector',
25 src = cms.InputTag(
'pixelTracks'),
35 for key,value
in quality.items():
36 label =
"pixelTrks"+key
38 cutstring =
"quality('" + value +
"')"
40 if label
not in globals():
41 locals()[label] = _trackSelector.clone( cut = cutstring )
42 locals()[label].setLabel(label)
44 print(label,
"already configured")
46 for key,value
in quality.items():
47 label =
"pixelTrksMonitor"+key
48 locals()[label] = pixelTracksMonitor.clone(
49 TrackProducer =
"pixelTrks"+key,
50 FolderName =
"Tracking/PixelTrackParameters/"+value
52 locals()[label].setLabel(label)
58 for kN,vN
in ntuplet.items():
59 for key,value
in quality.items():
60 label =
"pixelTrks" + vN + key
63 cutstring =
"numberOfValidHits == " + kN +
" & quality('" + value +
"')"
65 locals()[label] = _trackSelector.clone( cut = cutstring )
66 locals()[label].setLabel(label)
68 for kN,vN
in ntuplet.items():
69 for key,value
in quality.items():
70 label =
"pixelTrks" + vN +
"Monitor" + key
72 locals()[label] = pixelTracksMonitor.clone(
73 TrackProducer =
"pixelTrks" + vN + key,
74 FolderName =
"Tracking/PixelTrackParameters/" + vN +
"/" + value
76 locals()[label].setLabel(label)
80 goodPixelVertices = _goodOfflinePrimaryVertices.clone(
81 src =
"pixelVertices",
85 pixelVertexResolution = _primaryVertexResolution.clone(
86 vertexSrc =
"goodPixelVertices",
87 rootFolder =
"OfflinePixelPV/Resolution",
90 pixelTracksMonitoringTask = cms.Task(
94 for category
in [
"pixelTrks",
"pixelTrks3Hits",
"pixelTrks4Hits"]:
98 pixelTracksMonitoringTask.add(locals()[label])
100 allPixelTracksMonitoring = cms.Sequence()
101 for category
in [
"pixelTrksMonitor",
"pixelTrks3HitsMonitor",
"pixelTrks4HitsMonitor" ]:
105 allPixelTracksMonitoring += locals()[label]
107 pixelTracksMonitoring = cms.Sequence(
108 allPixelTracksMonitoring +
109 pixelVertexResolution,
110 pixelTracksMonitoringTask