1 import FWCore.ParameterSet.Config
as cms
4 pixelTracksMonitor = TrackerCollisionTrackMon.clone(
5 FolderName =
'Tracking/PixelTrackParameters/pixelTracks',
6 TrackProducer =
'pixelTracks',
7 allTrackProducer =
'pixelTracks',
8 beamSpot =
'offlineBeamSpot',
9 primaryVertex =
'pixelVertices',
12 doLumiAnalysis =
True,
13 doProfilesVsLS =
True,
15 doEffFromHitPatternVsPU =
False,
16 doEffFromHitPatternVsBX =
False,
17 doEffFromHitPatternVsLUMI =
False,
18 doPlotsVsGoodPVtx =
True,
23 _trackSelector = cms.EDFilter(
'TrackSelector',
24 src = cms.InputTag(
'pixelTracks'),
34 for key,value
in quality.items():
35 label =
"pixelTrks"+key
37 cutstring =
"quality('" + value +
"')"
39 if label
not in globals():
40 locals()[label] = _trackSelector.clone( cut = cutstring )
41 locals()[label].setLabel(label)
43 print(label,
"already configured")
45 for key,value
in quality.items():
46 label =
"pixelTrksMonitor"+key
47 locals()[label] = pixelTracksMonitor.clone(
48 TrackProducer =
"pixelTrks"+key,
49 FolderName =
"Tracking/PixelTrackParameters/"+value
51 locals()[label].setLabel(label)
57 for kN,vN
in ntuplet.items():
58 for key,value
in quality.items():
59 label =
"pixelTrks" + vN + key
62 cutstring =
"numberOfValidHits == " + kN +
" & quality('" + value +
"')"
64 locals()[label] = _trackSelector.clone( cut = cutstring )
65 locals()[label].setLabel(label)
67 for kN,vN
in ntuplet.items():
68 for key,value
in quality.items():
69 label =
"pixelTrks" + vN +
"Monitor" + key
71 locals()[label] = pixelTracksMonitor.clone(
72 TrackProducer =
"pixelTrks" + vN + key,
73 FolderName =
"Tracking/PixelTrackParameters/" + vN +
"/" + value
75 locals()[label].setLabel(label)
79 goodPixelVertices = _goodOfflinePrimaryVertices.clone(
84 pixelVertexResolution = _primaryVertexResolution.clone(
85 vertexSrc =
"goodPixelVertices",
86 rootFolder =
"OfflinePixelPV/Resolution"
89 pixelTracksMonitoringTask = cms.Task(
93 for category
in [
"pixelTrks",
"pixelTrks3Hits",
"pixelTrks4Hits"]:
97 pixelTracksMonitoringTask.add(locals()[label])
99 allPixelTracksMonitoring = cms.Sequence()
100 for category
in [
"pixelTrksMonitor",
"pixelTrks3HitsMonitor",
"pixelTrks4HitsMonitor" ]:
104 allPixelTracksMonitoring += locals()[label]
106 pixelTracksMonitoring = cms.Sequence(
107 allPixelTracksMonitoring +
108 pixelVertexResolution,
109 pixelTracksMonitoringTask
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)