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 (to PV)
320  VZ_PVMax = cms.double(30.0),
321  VZ_PVMin = cms.double(-30.0),
322 
323  # PCA z position for profile
324  VZBinProf = cms.int32(100),
325  VZMaxProf = cms.double(0.2),
326  VZMinProf = cms.double(-0.2),
327 
328  # PCA x position for 2D plot
329  X0Bin = cms.int32(100),
330  X0Max = cms.double(0.5),
331  X0Min = cms.double(-0.5),
332 
333  # PCA y position for 2D plot
334  Y0Bin = cms.int32(100),
335  Y0Max = cms.double(0.5),
336  Y0Min = cms.double(-0.5),
337 
338  # PCA z position for 2D plot
339  Z0Bin = cms.int32(120),
340  Z0Max = cms.double(60.0),
341  Z0Min = cms.double(-60.0),
342 
343  # Track dxy (transverse impact parameter)
344  DxyBin = cms.int32(100),
345  DxyMax = cms.double(0.5),
346  DxyMin = cms.double(-0.5),
347 
348  AbsDxyBin = cms.int32(120),
349  AbsDxyMin = cms.double(0.),
350  AbsDxyMax = cms.double(60.),
351 
352  # Seed dxy (transverse impact parameter)
353  SeedDxyBin = cms.int32(100),
354  SeedDxyMax = cms.double(0.5),
355  SeedDxyMin = cms.double(-0.5),
356 
357  # Seed dz (longitudinal impact parameter)
358  SeedDzBin = cms.int32(120),
359  SeedDzMax = cms.double(30.0),
360  SeedDzMin = cms.double(-30.0),
361 
362  # Track Candidate dxy (transverse impact parameter)
363  TCDxyBin = cms.int32(100),
364  TCDxyMax = cms.double(100.0),
365  TCDxyMin = cms.double(-100.0),
366 
367  # Track Candidate dz (transverse impact parameter)
368  TCDzBin = cms.int32(100),
369  TCDzMax = cms.double(400.0),
370  TCDzMin = cms.double(-400.0),
371 
372  # Track selection MVA
373  MVABin = cms.int32(100),
374  MVAMin = cms.double(-1),
375  MVAMax = cms.double(1),
376 
377 
379 
380  # NCluster Pixel
381  NClusPxBin = cms.int32(200),
382  NClusPxMax = cms.double(49999.5),
383  NClusPxMin = cms.double(-0.5),
384 
385  # NCluster Strip
386  NClusStrBin = cms.int32(500),
387  NClusStrMax = cms.double(199999.5),
388  NClusStrMin = cms.double(-0.5),
389 
390  # NCluster Vs Tracks
391  NTrk2D = cms.PSet(
392  NTrk2DBin = cms.int32(50),
393  NTrk2DMax = cms.double(1999.5),
394  NTrk2DMin = cms.double(-0.5),
395  ),
396  # PU monitoring
397  # Nunmber of Tracks per Primary Vertices
398  NTrkPVtx = cms.PSet(
399  NTrkPVtxBin = cms.int32(100),
400  NTrkPVtxMin = cms.double( 0.),
401  NTrkPVtxMax = cms.double(100.)
402  ),
403 
404  # Nunmber of Good Primary Vertices
405  SumPtPVtx = cms.PSet(
406  SumPtPVtxBin = cms.int32(100),
407  SumPtPVtxMin = cms.double( 0.),
408  SumPtPVtxMax = cms.double(500.)
409  ),
410  # Nunmber of Good Primary Vertices
411  GoodPVtx = cms.PSet(
412  GoodPVtxBin = cms.int32(200),
413  GoodPVtxMin = cms.double( 0.),
414  GoodPVtxMax = cms.double(200.)
415  ),
416 
417  LUMIBin = cms.int32 ( 300 ), # irrelevant
418  LUMIMin = cms.double( 200.),
419  LUMIMax = cms.double(20000.),
420 
421 # # BXlumi
422 # BXlumiBin = cms.int32(400),
423 # BXlumiMin = cms.double(4000),
424 # BXlumiMax = cms.double(20000),
425 
426 
429 TransDCABins = cms.int32(100),
430 TransDCAMin = cms.double(-8.0),
431 TransDCAMax = cms.double(8.0),
432 
433 LongDCABins = cms.int32(100),
434 LongDCAMin = cms.double(-8.0),
435 LongDCAMax = cms.double(8.0),
436 )
437 
438 # Overcoming the 255 arguments limit
439 # binning for 2D plots (identical to 1D, but in muon tracks)
440 # track eta 2D histo
441 TrackMon.Eta2DBin = cms.int32(26)
442 # track phi 2D histo
443 TrackMon.Phi2DBin = cms.int32(32)
444 # track pt 2D histo
445 TrackMon.TrackPt2DBin = cms.int32(100)
446 
447 # TrackingRegion monitoring
448 TrackMon.PVBin = cms.int32 ( 40 )
449 TrackMon.PVMin = cms.double( -0.5)
450 TrackMon.PVMax = cms.double( 79.5)
451 
452 TrackMon.DxyErrBin = cms.int32(200)
453 TrackMon.DxyErrMax = cms.double(0.1)
454 
455 TrackMon.RegionProducer = cms.InputTag("")
456 TrackMon.RegionSeedingLayersProducer = cms.InputTag("")
457 TrackMon.RegionCandidates = cms.InputTag("")
458 TrackMon.doRegionPlots = cms.bool(False)
459 TrackMon.doRegionCandidatePlots = cms.bool(False)
460 TrackMon.RegionSizeBin = cms.int32(20)
461 TrackMon.RegionSizeMax = cms.double(19.5)
462 TrackMon.RegionSizeMin = cms.double(-0.5)
463 TrackMon.RegionCandidatePtBin = cms.int32(100)
464 TrackMon.RegionCandidatePtMax = cms.double(1000)
465 TrackMon.RegionCandidatePtMin = cms.double(0)
466 
467 # Number of candidates/seed within pattern recognition
468 TrackMon.SeedCandBin = cms.int32(20)
469 TrackMon.SeedCandMax = cms.double(19.5)
470 TrackMon.SeedCandMin = cms.double(-0.5)
471 
472 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
473 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
474 from Configuration.Eras.Modifier_run3_common_cff import run3_common
475 phase1Pixel.toModify(TrackMon, EtaBin=31, EtaMin=-3., EtaMax=3.)
476 phase1Pixel.toModify(TrackMon, LUMIBin=300, LUMIMin=200., LUMIMax=20000.)
477 run3_common.toModify(TrackMon, forceSCAL = False)
478 run3_common.toModify(TrackMon, LUMIBin=375, LUMIMin=200., LUMIMax=25000.)
479 phase2_tracker.toModify(TrackMon, EtaBin=46, EtaMin=-4.5, EtaMax=4.5)
480 phase2_tracker.toModify(TrackMon, PVBin=125, PVMin=-0.5, PVMax=249.5)
481 phase2_tracker.toModify(TrackMon, LUMIBin=700, LUMIMin=200., LUMIMax=70000.)