CMS 3D CMS Logo

TrackingMonitor_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from DQM.TrackingMonitor.BXlumiParameters_cfi import BXlumiSetup
4 
5 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
6 TrackMon = DQMEDAnalyzer('TrackingMonitor',
7 
8  # input tags
9  numCut = cms.string(" pt >= 1 & quality('highPurity') "),
10  denCut = cms.string(" pt >= 1 "),
11  allTrackProducer = cms.InputTag("generalTracks"),
12  TrackProducer = cms.InputTag("generalTracks"),
13  SeedProducer = cms.InputTag("initialStepSeeds"),
14  TCProducer = cms.InputTag("initialStepTrackCandidates"),
15  MVAProducers = cms.vstring("initialStepClassifier1", "initialStepClassifier2"),
16  TrackProducerForMVA = cms.InputTag("initialStepTracks"),
17  ClusterLabels = cms.vstring('Tot'), # to decide which Seeds-Clusters correlation plots to have default is Total other options 'Strip', 'Pix'
18  beamSpot = cms.InputTag("offlineBeamSpot"),
19  primaryVertex = cms.InputTag('offlinePrimaryVertices'),
20  stripCluster = cms.InputTag('siStripClusters'),
21  pixelCluster = cms.InputTag('siPixelClusters'),
22  BXlumiSetup = BXlumiSetup.clone(),
23  genericTriggerEventPSet = cms.PSet(),
24 # lumi = cms.InputTag('lumiProducer'),
25 # # taken from
26 # # DPGAnalysis/SiStripTools/src/DigiLumiCorrHistogramMaker.cc
27 # # the scale factor 6.37 should follow the lumi prescriptions
28 # # AS SOON AS THE CORRECTED LUMI WILL BE AVAILABLE IT HAS TO BE SET TO 1.
29 # lumiScale = cms.double(6.37),
30 
31  # PU monitoring
32  primaryVertexInputTags = cms.VInputTag(),
33  selPrimaryVertexInputTags = cms.VInputTag(),
34  pvLabels = cms.vstring(),
35 
36  # output parameters
37  AlgoName = cms.string('GenTk'),
38  Quality = cms.string(''),
39  FolderName = cms.string('Tracking/GlobalParameters'),
40  BSFolderName = cms.string('Tracking/ParametersVsBeamSpot'),
41  PVFolderName = cms.string('Tracking/PrimaryVertices'),
42 
43  # determines where to evaluate track parameters
44  # options: 'default' --> straight up track parametes
45  # 'ImpactPoint' --> evalutate at impact point
46  # 'InnerSurface' --> evalutate at innermost measurement state
47  # 'OuterSurface' --> evalutate at outermost measurement state
48 
49  MeasurementState = cms.string('ImpactPoint'),
50 
51  # which plots to do
52  doTestPlots = cms.bool(False),
53  doAllPlots = cms.bool(True),
54  doTrackerSpecific = cms.bool(False),
55  doBeamSpotPlots = cms.bool(False),
56  doPrimaryVertexPlots = cms.bool(False),
57  doSeedParameterHistos = cms.bool(False),
58  doTrackCandHistos = cms.bool(False),
59  doAllTrackCandHistos = cms.bool(False),
60  doDCAPlots = cms.bool(False),
61  doDCAwrtPVPlots = cms.bool(False),
62  doDCAwrt000Plots = cms.bool(False),
63  doSIPPlots = cms.bool(False),
64  doEffFromHitPatternVsPU = cms.bool(False),
65  doEffFromHitPatternVsBX = cms.bool(False),
66  doEffFromHitPatternVsLUMI = cms.bool(False),
67  pvNDOF = cms.int32(4),
68  pixelCluster4lumi = cms.InputTag('siPixelClustersPreSplitting'),
69  scal = cms.InputTag('scalersRawToDigi'),
70  forceSCAL = cms.bool(True),
71  metadata = cms.InputTag('onlineMetaDataDigis'),
72  useBPixLayer1 = cms.bool(False),
73  minNumberOfPixelsPerCluster = cms.int32(2), # from DQM/PixelLumi/python/PixelLumiDQM_cfi.py
74  minPixelClusterCharge = cms.double(15000.),
75  doGeneralPropertiesPlots = cms.bool(False),
76  doHitPropertiesPlots = cms.bool(False),
77 # doGoodTrackPlots = cms.bool(False),
78  doMeasurementStatePlots = cms.bool(True),
79  doProfilesVsLS = cms.bool(False),
80  doRecHitsPerTrackProfile = cms.bool(True),
81  doRecHitVsPhiVsEtaPerTrack = cms.bool(False),
82  doRecHitVsPtVsEtaPerTrack = cms.bool(False),
83 # doGoodTrackRecHitVsPhiVsEtaPerTrack = cms.bool(False),
84  doLayersVsPhiVsEtaPerTrack = cms.bool(False),
85 # doGoodTrackLayersVsPhiVsEtaPerTrack = cms.bool(False),
86 # doGoodTrack2DChi2Plots = cms.bool(False),
87  doThetaPlots = cms.bool(False),
88  doTrackPxPyPlots = cms.bool(False),
89  doPUmonitoring = cms.bool(False),
90  doPlotsVsBXlumi = cms.bool(False),
91  doPlotsVsGoodPVtx = cms.bool(True),
92  doPlotsVsLUMI = cms.bool(False),
93  doPlotsVsBX = cms.bool(False),
94  doHIPlots = cms.bool(False),
95  doMVAPlots = cms.bool(False),
96  qualityString = cms.string("highPurity"),
97  #which seed plots to do
98  doSeedNumberHisto = cms.bool(False),
99  doSeedLumiAnalysis = cms.bool(False),
100  doSeedVsClusterHisto = cms.bool(False),
101  doSeedPTHisto = cms.bool(False),
102  doSeedETAHisto = cms.bool(False),
103  doSeedPHIHisto = cms.bool(False),
104  doSeedPHIVsETAHisto = cms.bool(False),
105  doSeedThetaHisto = cms.bool(False),
106  doSeedQHisto = cms.bool(False),
107  doSeedDxyHisto= cms.bool(False),
108  doSeedDzHisto= cms.bool(False),
109  doSeedNRecHitsHisto= cms.bool(False),
110  doSeedNVsPhiProf= cms.bool(False),
111  doSeedNVsEtaProf= cms.bool(False),
112  doStopSource = cms.bool(False),
113 
114  TTRHBuilder = cms.string('WithTrackAngle'),
115 
116  # Luminosity based analysis
117  doLumiAnalysis = cms.bool(False),
118  # For plots vs LS
119  LSBin = cms.int32(2000),
120  LSMin = cms.double(0),
121  LSMax = cms.double(2000.),
122 
123  # paramters of the Track
124  # ============================================================
125 
126  # chi2
127  Chi2Bin = cms.int32(50),
128  Chi2Max = cms.double(199.5),
129  Chi2Min = cms.double(-0.5),
130 
131  # chi2 dof
132  Chi2NDFBin = cms.int32(50),
133  Chi2NDFMax = cms.double(19.5),
134  Chi2NDFMin = cms.double(-0.5),
135 
136  # chi^2 probability
137  Chi2ProbBin = cms.int32(100),
138  Chi2ProbMax = cms.double(1.0),
139  Chi2ProbMin = cms.double(0.0),
140 
141  # Number of Tracks per Event
142  TkSizeBin = cms.int32(100),
143  TkSizeMax = cms.double(99.5),
144  TkSizeMin = cms.double(-0.5),
145 
146  # Number of seeds per Event
147  TkSeedSizeBin = cms.int32(200),
148  TkSeedSizeMax = cms.double(999.5),
149  TkSeedSizeMin = cms.double(-0.5),
150 
151  # Number of Track Cadidates per Event
152  TCSizeBin = cms.int32(200),
153  TCSizeMax = cms.double(999.5),
154  TCSizeMin = cms.double(-0.5),
155 
156  # num rec hits
157  TrackQBin = cms.int32(8),
158  TrackQMax = cms.double(2.5),
159  TrackQMin = cms.double(-2.5),
160 
161  # num rec hits in seed
162  SeedHitBin = cms.int32(6),
163  SeedHitMax = cms.double(5.5),
164  SeedHitMin = cms.double(-0.5),
165 
166  # num rec hits per track candidate
167  TCHitBin = cms.int32(40),
168  TCHitMax = cms.double(39.5),
169  TCHitMin = cms.double(-0.5),
170 
171  # num rec hits
172  RecHitBin = cms.int32(40),
173  RecHitMax = cms.double(39.5),
174  RecHitMin = cms.double(-0.5),
175 
176  # mean rec hits
177  MeanHitBin = cms.int32(30),
178  MeanHitMax = cms.double(29.5),
179  MeanHitMin = cms.double(-0.5),
180 
181  subdetectors = cms.vstring( "TIB", "TOB", "TID", "TEC", "PixBarrel", "PixEndcap", "Pixel", "Strip" ),
182  subdetectorBin = cms.int32(25),
183 
184  # num rec hits lost
185  RecLostBin = cms.int32(10),
186  RecLostMax = cms.double(9.5),
187  RecLostMin = cms.double(-0.5),
188 
189  # num layers
190  RecLayBin = cms.int32(25),
191  RecLayMax = cms.double(24.5),
192  RecLayMin = cms.double(-0.5),
193 
194  # mean layers
195  MeanLayBin = cms.int32(25),
196  MeanLayMax = cms.double(24.5),
197  MeanLayMin = cms.double(-0.5),
198 
199  # num TOB Layers
200  TOBLayBin = cms.int32(10),
201  TOBLayMax = cms.double(9.5),
202  TOBLayMin = cms.double(-0.5),
203 
204  # num TIB Layers
205  TIBLayBin = cms.int32(6),
206  TIBLayMax = cms.double(5.5),
207  TIBLayMin = cms.double(-0.5),
208 
209  # num TID Layers
210  TIDLayBin = cms.int32(6),
211  TIDLayMax = cms.double(5.5),
212  TIDLayMin = cms.double(-0.5),
213 
214  # num TEC Layers
215  TECLayBin = cms.int32(15),
216  TECLayMax = cms.double(14.5),
217  TECLayMin = cms.double(-0.5),
218 
219  # num PXB Layers
220  PXBLayBin = cms.int32(6),
221  PXBLayMax = cms.double(5.5),
222  PXBLayMin = cms.double(-0.5),
223 
224  # num PXF Layers
225  PXFLayBin = cms.int32(6),
226  PXFLayMax = cms.double(5.5),
227  PXFLayMin = cms.double(-0.5),
228 
229  # Track |p|
230  TrackPBin = cms.int32(100),
231  TrackPMax = cms.double(100),
232  TrackPMin = cms.double(0),
233 
234  # Track pT
235  TrackPtBin = cms.int32(100),
236  TrackPtMax = cms.double(100),
237  TrackPtMin = cms.double(0.1),
238 
239  # Track px
240  TrackPxBin = cms.int32(50),
241  TrackPxMax = cms.double(50.0),
242  TrackPxMin = cms.double(-50.0),
243 
244  # Track py
245  TrackPyBin = cms.int32(50),
246  TrackPyMax = cms.double(50.0),
247  TrackPyMin = cms.double(-50.0),
248 
249  # Track pz
250  TrackPzBin = cms.int32(50),
251  TrackPzMax = cms.double(50.0),
252  TrackPzMin = cms.double(-50.0),
253 
254  # track theta
255  ThetaBin = cms.int32(32),
256  ThetaMax = cms.double(3.2),
257  ThetaMin = cms.double(0.0),
258 
259  # track eta
260  EtaBin = cms.int32(26),
261  EtaMax = cms.double(2.5),
262  EtaMin = cms.double(-2.5),
263 
264  # track phi
265  PhiBin = cms.int32(32),
266  PhiMax = cms.double(3.141592654),
267  PhiMin = cms.double(-3.141592654),
268 
269  # Track |p| error
270  pErrBin = cms.int32(50),
271  pErrMax = cms.double(1.0),
272  pErrMin = cms.double(0.0),
273 
274  # Track pT error
275  ptErrBin = cms.int32(50),
276  ptErrMax = cms.double(1.0),
277  ptErrMin = cms.double(0.0),
278 
279  # Track px error
280  pxErrBin = cms.int32(50),
281  pxErrMax = cms.double(1.0),
282  pxErrMin = cms.double(0.0),
283 
284  # Track py error
285  pyErrBin = cms.int32(50),
286  pyErrMax = cms.double(1.0),
287  pyErrMin = cms.double(0.0),
288 
289  # Track pz error
290  pzErrBin = cms.int32(50),
291  pzErrMax = cms.double(1.0),
292  pzErrMin = cms.double(0.0),
293 
294  # track eta error
295  etaErrBin = cms.int32(50),
296  etaErrMax = cms.double(0.1),
297  etaErrMin = cms.double(0.0),
298 
299  # track phi Error
300  phiErrBin = cms.int32(50),
301  phiErrMax = cms.double(0.1),
302  phiErrMin = cms.double(0.0),
303 
304  # PCA x position
305  VXBin = cms.int32(100),
306  VXMax = cms.double(0.5),
307  VXMin = cms.double(-0.5),
308 
309  # PCA y position
310  VYBin = cms.int32(100),
311  VYMax = cms.double(0.5),
312  VYMin = cms.double(-0.5),
313 
314  # PCA z position
315  VZBin = cms.int32(100),
316  VZMax = cms.double(30.0),
317  VZMin = cms.double(-30.0),
318 
319  # PCA z position for profile
320  VZBinProf = cms.int32(100),
321  VZMaxProf = cms.double(0.2),
322  VZMinProf = cms.double(-0.2),
323 
324  # PCA x position for 2D plot
325  X0Bin = cms.int32(100),
326  X0Max = cms.double(0.5),
327  X0Min = cms.double(-0.5),
328 
329  # PCA y position for 2D plot
330  Y0Bin = cms.int32(100),
331  Y0Max = cms.double(0.5),
332  Y0Min = cms.double(-0.5),
333 
334  # PCA z position for 2D plot
335  Z0Bin = cms.int32(120),
336  Z0Max = cms.double(60.0),
337  Z0Min = cms.double(-60.0),
338 
339  # Track dxy (transverse impact parameter)
340  DxyBin = cms.int32(100),
341  DxyMax = cms.double(0.5),
342  DxyMin = cms.double(-0.5),
343 
344  AbsDxyBin = cms.int32(120),
345  AbsDxyMin = cms.double(0.),
346  AbsDxyMax = cms.double(60.),
347 
348  # Seed dxy (transverse impact parameter)
349  SeedDxyBin = cms.int32(100),
350  SeedDxyMax = cms.double(0.5),
351  SeedDxyMin = cms.double(-0.5),
352 
353  # Seed dz (longitudinal impact parameter)
354  SeedDzBin = cms.int32(120),
355  SeedDzMax = cms.double(30.0),
356  SeedDzMin = cms.double(-30.0),
357 
358  # Track Candidate dxy (transverse impact parameter)
359  TCDxyBin = cms.int32(100),
360  TCDxyMax = cms.double(100.0),
361  TCDxyMin = cms.double(-100.0),
362 
363  # Track Candidate dz (transverse impact parameter)
364  TCDzBin = cms.int32(100),
365  TCDzMax = cms.double(400.0),
366  TCDzMin = cms.double(-400.0),
367 
368  # Track selection MVA
369  MVABin = cms.int32(100),
370  MVAMin = cms.double(-1),
371  MVAMax = cms.double(1),
372 
373 
375 
376  # NCluster Pixel
377  NClusPxBin = cms.int32(200),
378  NClusPxMax = cms.double(49999.5),
379  NClusPxMin = cms.double(-0.5),
380 
381  # NCluster Strip
382  NClusStrBin = cms.int32(500),
383  NClusStrMax = cms.double(199999.5),
384  NClusStrMin = cms.double(-0.5),
385 
386  # NCluster Vs Tracks
387  NTrk2D = cms.PSet(
388  NTrk2DBin = cms.int32(50),
389  NTrk2DMax = cms.double(1999.5),
390  NTrk2DMin = cms.double(-0.5),
391  ),
392  # PU monitoring
393  # Nunmber of Tracks per Primary Vertices
394  NTrkPVtx = cms.PSet(
395  NTrkPVtxBin = cms.int32(100),
396  NTrkPVtxMin = cms.double( 0.),
397  NTrkPVtxMax = cms.double(100.)
398  ),
399 
400  # Nunmber of Good Primary Vertices
401  SumPtPVtx = cms.PSet(
402  SumPtPVtxBin = cms.int32(100),
403  SumPtPVtxMin = cms.double( 0.),
404  SumPtPVtxMax = cms.double(500.)
405  ),
406  # Nunmber of Good Primary Vertices
407  GoodPVtx = cms.PSet(
408  GoodPVtxBin = cms.int32(200),
409  GoodPVtxMin = cms.double( 0.),
410  GoodPVtxMax = cms.double(200.)
411  ),
412 
413  LUMIBin = cms.int32 ( 300 ), # irrelevant
414  LUMIMin = cms.double( 200.),
415  LUMIMax = cms.double(20000.),
416 
417 # # BXlumi
418 # BXlumiBin = cms.int32(400),
419 # BXlumiMin = cms.double(4000),
420 # BXlumiMax = cms.double(20000),
421 
422 
425 TransDCABins = cms.int32(100),
426 TransDCAMin = cms.double(-8.0),
427 TransDCAMax = cms.double(8.0),
428 
429 LongDCABins = cms.int32(100),
430 LongDCAMin = cms.double(-8.0),
431 LongDCAMax = cms.double(8.0),
432 )
433 
434 # Overcoming the 255 arguments limit
435 # binning for 2D plots (identical to 1D, but in muon tracks)
436 # track eta 2D histo
437 TrackMon.Eta2DBin = cms.int32(26)
438 # track phi 2D histo
439 TrackMon.Phi2DBin = cms.int32(32)
440 # track pt 2D histo
441 TrackMon.TrackPt2DBin = cms.int32(100)
442 
443 # TrackingRegion monitoring
444 TrackMon.PVBin = cms.int32 ( 40 )
445 TrackMon.PVMin = cms.double( -0.5)
446 TrackMon.PVMax = cms.double( 79.5)
447 
448 TrackMon.DxyErrBin = cms.int32(200)
449 TrackMon.DxyErrMax = cms.double(0.1)
450 
451 TrackMon.RegionProducer = cms.InputTag("")
452 TrackMon.RegionSeedingLayersProducer = cms.InputTag("")
453 TrackMon.RegionCandidates = cms.InputTag("")
454 TrackMon.doRegionPlots = cms.bool(False)
455 TrackMon.doRegionCandidatePlots = cms.bool(False)
456 TrackMon.RegionSizeBin = cms.int32(20)
457 TrackMon.RegionSizeMax = cms.double(19.5)
458 TrackMon.RegionSizeMin = cms.double(-0.5)
459 TrackMon.RegionCandidatePtBin = cms.int32(100)
460 TrackMon.RegionCandidatePtMax = cms.double(1000)
461 TrackMon.RegionCandidatePtMin = cms.double(0)
462 
463 # Number of candidates/seed within pattern recognition
464 TrackMon.SeedCandBin = cms.int32(20)
465 TrackMon.SeedCandMax = cms.double(19.5)
466 TrackMon.SeedCandMin = cms.double(-0.5)
467 
468 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
469 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
470 from Configuration.Eras.Modifier_run3_common_cff import run3_common
471 phase1Pixel.toModify(TrackMon, EtaBin=31, EtaMin=-3., EtaMax=3.)
472 phase1Pixel.toModify(TrackMon, LUMIBin=300, LUMIMin=200., LUMIMax=20000.)
473 run3_common.toModify(TrackMon, forceSCAL = False)
474 phase2_tracker.toModify(TrackMon, EtaBin=46, EtaMin=-4.5, EtaMax=4.5)
475 phase2_tracker.toModify(TrackMon, PVBin=125, PVMin=-0.5, PVMax=249.5)
476 phase2_tracker.toModify(TrackMon, LUMIBin=700, LUMIMin=200., LUMIMax=70000.)
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1