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].numCut = numCutString[tracks]
27  locals()[label].denCut = denCutString[tracks]
28  locals()[label].setLabel(label)
29 
30 
31  label = 'TrackerCollisionSelectedTrackMonMB' + str(tracks)
32  locals()[label] = TrackerCollisionTrackMonMB.clone()
33  locals()[label].TrackProducer = cms.InputTag(tracks)
34  locals()[label].FolderName = cms.string(mainfolderName[tracks])
35  locals()[label].PVFolderName = cms.string(vertexfolderName[tracks])
36  locals()[label].TrackPtMin = trackPtMin[tracks]
37  locals()[label].TrackPtMax = trackPtMax[tracks]
38  locals()[label].TrackPMin = trackPtMin[tracks]
39  locals()[label].TrackPMax = trackPtMax[tracks]
40  locals()[label].doDCAPlots = doPlotsPCA[tracks]
41  locals()[label].doDCAwrtPVPlots = doPlotsPCA[tracks]
42  locals()[label].doDCAwrt000Plots = doPlotsPCA[tracks]
43  locals()[label].numCut = numCutString[tracks]
44  locals()[label].denCut = denCutString[tracks]
45  locals()[label].setLabel(label)
46 
47 
48 #-------------------------------------------------
49 # Tracking Monitor
50 #-------------------------------------------------
51 import DQM.TrackingMonitor.TrackingMonitorSeed_cfi
52 
54 for step in selectedIterTrackingStep :
55  label = 'TrackSeedMon'+str(step)
56  locals()[label] = DQM.TrackingMonitor.TrackingMonitorSeed_cfi.TrackMonSeed.clone()
57  locals()[label].TrackProducer = cms.InputTag("generalTracks")
58  locals()[label].FolderName = cms.string("Tracking/TrackParameters/generalTracks")
59  locals()[label].SeedProducer = seedInputTag[step]
60  locals()[label].TCProducer = trackCandInputTag[step]
61  locals()[label].AlgoName = cms.string( str(step) )
62  locals()[label].TkSeedSizeBin = trackSeedSizeBin[step]
63  locals()[label].TkSeedSizeMin = trackSeedSizeMin[step]
64  locals()[label].TkSeedSizeMax = trackSeedSizeMax[step]
65  locals()[label].ClusterLabels = clusterLabel[step]
66  if clusterLabel[step] == cms.vstring('Pix') :
67  locals()[label].NClusPxBin = clusterBin[step]
68  locals()[label].NClusPxMax = clusterMax[step]
69  elif clusterLabel[step] == cms.vstring('Strip') or clusterLabel[step] == cms.vstring('Tot') :
70  locals()[label].NClusStrBin = clusterBin[step]
71  locals()[label].NClusStrMax = clusterMax[step]
72 
73 # DQM Services
74 dqmInfoTracking = cms.EDAnalyzer("DQMEventInfo",
75  subSystemFolder = cms.untracked.string('Tracking')
76 )
77 
78 # LogMessageMonitor ####
79 ### load which are the module to monitor
81 
82 ### load the different flavour of settings of the LogMessageMonitor module
84 
85 for module in selectedModules :
86  label = str(module)+'LogMessageMonCommon'
87  locals()[label] = LogMessageMonCommon.clone()
88  locals()[label].pluginsMonName = pluginsMonName[module]
89  locals()[label].modules = modulesLabel[module]
90  locals()[label].categories = categories[module]
91  locals()[label].setLabel(label)
92 
93  label = str(module)+'LogMessageMonMB'
94  locals()[label] = LogMessageMonMB.clone()
95  locals()[label].pluginsMonName = pluginsMonName[module]
96  locals()[label].modules = modulesLabel[module]
97  locals()[label].categories = categories[module]
98  locals()[label].setLabel(label)
99 
100 
101 # dEdx monitor ####
102 ### load which dedx
104 
105 ### load the different flavour of settings of the dEdxAnalyzer module
107 
108 
109 # temporary patch in order to have BXlumi
111 
112 # temporary test in order to temporary produce the "goodPrimaryVertexCollection"
113 # define with a new name if changes are necessary, otherwise simply include
114 # it from CommonTools/ParticleFlow/python/goodOfflinePrimaryVertices_cfi.py
115 # uncomment when necessary
116 from PhysicsTools.SelectorUtils.pvSelector_cfi import pvSelector
117 from CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi import goodOfflinePrimaryVertices
118 trackingDQMgoodOfflinePrimaryVertices = goodOfflinePrimaryVertices.clone()
119 trackingDQMgoodOfflinePrimaryVertices.filterParams = pvSelector.clone( minNdof = cms.double(4.0), maxZ = cms.double(24.0) )
120 trackingDQMgoodOfflinePrimaryVertices.src=cms.InputTag('offlinePrimaryVertices')
121 trackingDQMgoodOfflinePrimaryVertices.filter = cms.bool(False)
122 
123 # Sequence
124 TrackingDQMSourceTier0 = cms.Sequence()
125 # dEdx monitoring
126 TrackingDQMSourceTier0 += dedxHarmonicSequence * dEdxMonCommon
127 # # temporary patch in order to have BXlumi
128 # * lumiProducer
129 # track collections
130 for tracks in selectedTracks :
131  if tracks != 'generalTracks':
132  TrackingDQMSourceTier0 += sequenceName[tracks]
133  label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
134  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
135 # seeding monitoring
136 for step in selectedIterTrackingStep :
137  label = 'TrackSeedMon'+str(step)
138  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
139 # MessageLog
140 for module in selectedModules :
141  label = str(module)+'LogMessageMonCommon'
142  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
143 TrackingDQMSourceTier0 += dqmInfoTracking
144 
145 
146 TrackingDQMSourceTier0Common = cms.Sequence()
147 # dEdx monitoring
148 TrackingDQMSourceTier0Common += (dedxHarmonicSequence * dEdxMonCommon)
149 ## monitor track collections
150 for tracks in selectedTracks :
151  if tracks != 'generalTracks':
152  TrackingDQMSourceTier0Common+=sequenceName[tracks]
153  label = 'TrackerCollisionSelectedTrackMonCommon' + str(tracks)
154  TrackingDQMSourceTier0Common += cms.Sequence(locals()[label])
155 # seeding monitoring
156 for step in selectedIterTrackingStep :
157  label = 'TrackSeedMon'+str(step)
158  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
159 # MessageLog
160 for module in selectedModules :
161  label = str(module)+'LogMessageMonCommon'
162  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
163 TrackingDQMSourceTier0Common += dqmInfoTracking
164 
165 TrackingDQMSourceTier0MinBias = cms.Sequence()
166 # dEdx monitoring
167 TrackingDQMSourceTier0MinBias += dedxHarmonicSequence * dEdxMonCommon
168 # * lumiProducer
169 # * trackingDQMgoodOfflinePrimaryVertices
170 # monitor track collections
171 for tracks in selectedTracks :
172  if tracks != 'generalTracks':
173  TrackingDQMSourceTier0MinBias += sequenceName[tracks]
174  label = 'TrackerCollisionSelectedTrackMonMB' + str(tracks)
175  TrackingDQMSourceTier0MinBias += cms.Sequence(locals()[label])
176 # seeding monitoring
177 for step in selectedIterTrackingStep :
178  label = 'TrackSeedMon'+str(step)
179  TrackingDQMSourceTier0 += cms.Sequence(locals()[label])
180 # MessageLog
181 for module in selectedModules :
182  label = str(module)+'LogMessageMonMB'
183  TrackingDQMSourceTier0MinBias += cms.Sequence(locals()[label])
184 TrackingDQMSourceTier0MinBias += dqmInfoTracking
185 
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