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  useBPixLayer1 = cms.bool(False),
71  minNumberOfPixelsPerCluster = cms.int32(2), # from DQM/PixelLumi/python/PixelLumiDQM_cfi.py
72  minPixelClusterCharge = cms.double(15000.),
73  doGeneralPropertiesPlots = cms.bool(False),
74  doHitPropertiesPlots = cms.bool(False),
75 # doGoodTrackPlots = cms.bool(False),
76  doMeasurementStatePlots = cms.bool(True),
77  doProfilesVsLS = cms.bool(False),
78  doRecHitsPerTrackProfile = cms.bool(True),
79  doRecHitVsPhiVsEtaPerTrack = cms.bool(False),
80  doRecHitVsPtVsEtaPerTrack = cms.bool(False),
81 # doGoodTrackRecHitVsPhiVsEtaPerTrack = cms.bool(False),
82  doLayersVsPhiVsEtaPerTrack = cms.bool(False),
83 # doGoodTrackLayersVsPhiVsEtaPerTrack = cms.bool(False),
84 # doGoodTrack2DChi2Plots = cms.bool(False),
85  doThetaPlots = cms.bool(False),
86  doTrackPxPyPlots = cms.bool(False),
87  doPUmonitoring = cms.bool(False),
88  doPlotsVsBXlumi = cms.bool(False),
89  doPlotsVsGoodPVtx = cms.bool(True),
90  doPlotsVsLUMI = cms.bool(False),
91  doPlotsVsBX = cms.bool(False),
92  doHIPlots = cms.bool(False),
93  doMVAPlots = cms.bool(False),
94  qualityString = cms.string("highPurity"),
95  #which seed plots to do
96  doSeedNumberHisto = cms.bool(False),
97  doSeedLumiAnalysis = cms.bool(False),
98  doSeedVsClusterHisto = cms.bool(False),
99  doSeedPTHisto = cms.bool(False),
100  doSeedETAHisto = cms.bool(False),
101  doSeedPHIHisto = cms.bool(False),
102  doSeedPHIVsETAHisto = cms.bool(False),
103  doSeedThetaHisto = cms.bool(False),
104  doSeedQHisto = cms.bool(False),
105  doSeedDxyHisto= cms.bool(False),
106  doSeedDzHisto= cms.bool(False),
107  doSeedNRecHitsHisto= cms.bool(False),
108  doSeedNVsPhiProf= cms.bool(False),
109  doSeedNVsEtaProf= cms.bool(False),
110  doStopSource = cms.bool(False),
111 
112  TTRHBuilder = cms.string('WithTrackAngle'),
113 
114  # Luminosity based analysis
115  doLumiAnalysis = cms.bool(False),
116  # For plots vs LS
117  LSBin = cms.int32(2000),
118  LSMin = cms.double(0),
119  LSMax = cms.double(2000.),
120 
121  # paramters of the Track
122  # ============================================================
123 
124  # chi2
125  Chi2Bin = cms.int32(50),
126  Chi2Max = cms.double(199.5),
127  Chi2Min = cms.double(-0.5),
128 
129  # chi2 dof
130  Chi2NDFBin = cms.int32(50),
131  Chi2NDFMax = cms.double(19.5),
132  Chi2NDFMin = cms.double(-0.5),
133 
134  # chi^2 probability
135  Chi2ProbBin = cms.int32(100),
136  Chi2ProbMax = cms.double(1.0),
137  Chi2ProbMin = cms.double(0.0),
138 
139  # Number of Tracks per Event
140  TkSizeBin = cms.int32(100),
141  TkSizeMax = cms.double(99.5),
142  TkSizeMin = cms.double(-0.5),
143 
144  # Number of seeds per Event
145  TkSeedSizeBin = cms.int32(200),
146  TkSeedSizeMax = cms.double(999.5),
147  TkSeedSizeMin = cms.double(-0.5),
148 
149  # Number of Track Cadidates per Event
150  TCSizeBin = cms.int32(200),
151  TCSizeMax = cms.double(999.5),
152  TCSizeMin = cms.double(-0.5),
153 
154  # num rec hits
155  TrackQBin = cms.int32(8),
156  TrackQMax = cms.double(2.5),
157  TrackQMin = cms.double(-2.5),
158 
159  # num rec hits in seed
160  SeedHitBin = cms.int32(6),
161  SeedHitMax = cms.double(5.5),
162  SeedHitMin = cms.double(-0.5),
163 
164  # num rec hits per track candidate
165  TCHitBin = cms.int32(40),
166  TCHitMax = cms.double(39.5),
167  TCHitMin = cms.double(-0.5),
168 
169  # num rec hits
170  RecHitBin = cms.int32(40),
171  RecHitMax = cms.double(39.5),
172  RecHitMin = cms.double(-0.5),
173 
174  # mean rec hits
175  MeanHitBin = cms.int32(30),
176  MeanHitMax = cms.double(29.5),
177  MeanHitMin = cms.double(-0.5),
178 
179  subdetectors = cms.vstring( "TIB", "TOB", "TID", "TEC", "PixBarrel", "PixEndcap", "Pixel", "Strip" ),
180  subdetectorBin = cms.int32(25),
181 
182  # num rec hits lost
183  RecLostBin = cms.int32(10),
184  RecLostMax = cms.double(9.5),
185  RecLostMin = cms.double(-0.5),
186 
187  # num layers
188  RecLayBin = cms.int32(25),
189  RecLayMax = cms.double(24.5),
190  RecLayMin = cms.double(-0.5),
191 
192  # mean layers
193  MeanLayBin = cms.int32(25),
194  MeanLayMax = cms.double(24.5),
195  MeanLayMin = cms.double(-0.5),
196 
197  # num TOB Layers
198  TOBLayBin = cms.int32(10),
199  TOBLayMax = cms.double(9.5),
200  TOBLayMin = cms.double(-0.5),
201 
202  # num TIB Layers
203  TIBLayBin = cms.int32(6),
204  TIBLayMax = cms.double(5.5),
205  TIBLayMin = cms.double(-0.5),
206 
207  # num TID Layers
208  TIDLayBin = cms.int32(6),
209  TIDLayMax = cms.double(5.5),
210  TIDLayMin = cms.double(-0.5),
211 
212  # num TEC Layers
213  TECLayBin = cms.int32(15),
214  TECLayMax = cms.double(14.5),
215  TECLayMin = cms.double(-0.5),
216 
217  # num PXB Layers
218  PXBLayBin = cms.int32(6),
219  PXBLayMax = cms.double(5.5),
220  PXBLayMin = cms.double(-0.5),
221 
222  # num PXF Layers
223  PXFLayBin = cms.int32(6),
224  PXFLayMax = cms.double(5.5),
225  PXFLayMin = cms.double(-0.5),
226 
227  # Track |p|
228  TrackPBin = cms.int32(100),
229  TrackPMax = cms.double(100),
230  TrackPMin = cms.double(0),
231 
232  # Track pT
233  TrackPtBin = cms.int32(100),
234  TrackPtMax = cms.double(100),
235  TrackPtMin = cms.double(0.1),
236 
237  # Track px
238  TrackPxBin = cms.int32(50),
239  TrackPxMax = cms.double(50.0),
240  TrackPxMin = cms.double(-50.0),
241 
242  # Track py
243  TrackPyBin = cms.int32(50),
244  TrackPyMax = cms.double(50.0),
245  TrackPyMin = cms.double(-50.0),
246 
247  # Track pz
248  TrackPzBin = cms.int32(50),
249  TrackPzMax = cms.double(50.0),
250  TrackPzMin = cms.double(-50.0),
251 
252  # track theta
253  ThetaBin = cms.int32(32),
254  ThetaMax = cms.double(3.2),
255  ThetaMin = cms.double(0.0),
256 
257  # track eta
258  EtaBin = cms.int32(26),
259  EtaMax = cms.double(2.5),
260  EtaMin = cms.double(-2.5),
261 
262  # track phi
263  PhiBin = cms.int32(32),
264  PhiMax = cms.double(3.141592654),
265  PhiMin = cms.double(-3.141592654),
266 
267  # Track |p| error
268  pErrBin = cms.int32(50),
269  pErrMax = cms.double(1.0),
270  pErrMin = cms.double(0.0),
271 
272  # Track pT error
273  ptErrBin = cms.int32(50),
274  ptErrMax = cms.double(1.0),
275  ptErrMin = cms.double(0.0),
276 
277  # Track px error
278  pxErrBin = cms.int32(50),
279  pxErrMax = cms.double(1.0),
280  pxErrMin = cms.double(0.0),
281 
282  # Track py error
283  pyErrBin = cms.int32(50),
284  pyErrMax = cms.double(1.0),
285  pyErrMin = cms.double(0.0),
286 
287  # Track pz error
288  pzErrBin = cms.int32(50),
289  pzErrMax = cms.double(1.0),
290  pzErrMin = cms.double(0.0),
291 
292  # track eta error
293  etaErrBin = cms.int32(50),
294  etaErrMax = cms.double(0.1),
295  etaErrMin = cms.double(0.0),
296 
297  # track phi Error
298  phiErrBin = cms.int32(50),
299  phiErrMax = cms.double(0.1),
300  phiErrMin = cms.double(0.0),
301 
302  # PCA x position
303  VXBin = cms.int32(100),
304  VXMax = cms.double(0.5),
305  VXMin = cms.double(-0.5),
306 
307  # PCA y position
308  VYBin = cms.int32(100),
309  VYMax = cms.double(0.5),
310  VYMin = cms.double(-0.5),
311 
312  # PCA z position
313  VZBin = cms.int32(100),
314  VZMax = cms.double(30.0),
315  VZMin = cms.double(-30.0),
316 
317  # PCA z position for profile
318  VZBinProf = cms.int32(100),
319  VZMaxProf = cms.double(0.2),
320  VZMinProf = cms.double(-0.2),
321 
322  # PCA x position for 2D plot
323  X0Bin = cms.int32(100),
324  X0Max = cms.double(0.5),
325  X0Min = cms.double(-0.5),
326 
327  # PCA y position for 2D plot
328  Y0Bin = cms.int32(100),
329  Y0Max = cms.double(0.5),
330  Y0Min = cms.double(-0.5),
331 
332  # PCA z position for 2D plot
333  Z0Bin = cms.int32(120),
334  Z0Max = cms.double(60.0),
335  Z0Min = cms.double(-60.0),
336 
337  # Track dxy (transverse impact parameter)
338  DxyBin = cms.int32(100),
339  DxyMax = cms.double(0.5),
340  DxyMin = cms.double(-0.5),
341 
342  AbsDxyBin = cms.int32(120),
343  AbsDxyMin = cms.double(0.),
344  AbsDxyMax = cms.double(60.),
345 
346  # Seed dxy (transverse impact parameter)
347  SeedDxyBin = cms.int32(100),
348  SeedDxyMax = cms.double(0.5),
349  SeedDxyMin = cms.double(-0.5),
350 
351  # Seed dz (longitudinal impact parameter)
352  SeedDzBin = cms.int32(120),
353  SeedDzMax = cms.double(30.0),
354  SeedDzMin = cms.double(-30.0),
355 
356  # Track Candidate dxy (transverse impact parameter)
357  TCDxyBin = cms.int32(100),
358  TCDxyMax = cms.double(100.0),
359  TCDxyMin = cms.double(-100.0),
360 
361  # Track Candidate dz (transverse impact parameter)
362  TCDzBin = cms.int32(100),
363  TCDzMax = cms.double(400.0),
364  TCDzMin = cms.double(-400.0),
365 
366  # Track selection MVA
367  MVABin = cms.int32(100),
368  MVAMin = cms.double(-1),
369  MVAMax = cms.double(1),
370 
371 #######################################
372 ## needed for tracksVScluster and seedVScluster
373 
374  # NCluster Pixel
375  NClusPxBin = cms.int32(200),
376  NClusPxMax = cms.double(49999.5),
377  NClusPxMin = cms.double(-0.5),
378 
379  # NCluster Strip
380  NClusStrBin = cms.int32(500),
381  NClusStrMax = cms.double(199999.5),
382  NClusStrMin = cms.double(-0.5),
383 
384  # NCluster Vs Tracks
385  NTrk2DBin = cms.int32(50),
386  NTrk2DMax = cms.double(1999.5),
387  NTrk2DMin = cms.double(-0.5),
388 
389  # PU monitoring
390  # Nunmber of Good Primary Vertices
391  GoodPVtxBin = cms.int32(200),
392  GoodPVtxMin = cms.double( 0.),
393  GoodPVtxMax = cms.double(200.),
394 
395  LUMIBin = cms.int32 ( 300 ), # irrelevant
396  LUMIMin = cms.double( 200.),
397  LUMIMax = cms.double(20000.),
398 
399 # # BXlumi
400 # BXlumiBin = cms.int32(400),
401 # BXlumiMin = cms.double(4000),
402 # BXlumiMax = cms.double(20000),
403 
404 ###############################
405 ################## FOR HI PLOTS#####################
406 #######
407 TransDCABins = cms.int32(100),
408 TransDCAMin = cms.double(-8.0),
409 TransDCAMax = cms.double(8.0),
410 
411 LongDCABins = cms.int32(100),
412 LongDCAMin = cms.double(-8.0),
413 LongDCAMax = cms.double(8.0),
414 )
415 
416 # Overcoming the 255 arguments limit
417 # binning for 2D plots (identical to 1D, but in muon tracks)
418 # track eta 2D histo
419 TrackMon.Eta2DBin = cms.int32(26)
420 # track phi 2D histo
421 TrackMon.Phi2DBin = cms.int32(32)
422 # track pt 2D histo
423 TrackMon.TrackPt2DBin = cms.int32(100)
424 
425 # TrackingRegion monitoring
426 TrackMon.PVBin = cms.int32 ( 40 )
427 TrackMon.PVMin = cms.double( -0.5)
428 TrackMon.PVMax = cms.double( 79.5) ## it might need to be adjust if CMS asks to have lumi levelling at lower values
429 
430 TrackMon.DxyErrBin = cms.int32(200)
431 TrackMon.DxyErrMax = cms.double(0.1)
432 
433 TrackMon.RegionProducer = cms.InputTag("")
434 TrackMon.RegionSeedingLayersProducer = cms.InputTag("")
435 TrackMon.RegionCandidates = cms.InputTag("")
436 TrackMon.doRegionPlots = cms.bool(False)
437 TrackMon.doRegionCandidatePlots = cms.bool(False)
438 TrackMon.RegionSizeBin = cms.int32(20)
439 TrackMon.RegionSizeMax = cms.double(19.5)
440 TrackMon.RegionSizeMin = cms.double(-0.5)
441 TrackMon.RegionCandidatePtBin = cms.int32(100)
442 TrackMon.RegionCandidatePtMax = cms.double(1000)
443 TrackMon.RegionCandidatePtMin = cms.double(0)
444 
445 # Number of candidates/seed within pattern recognition
446 TrackMon.SeedCandBin = cms.int32(20)
447 TrackMon.SeedCandMax = cms.double(19.5)
448 TrackMon.SeedCandMin = cms.double(-0.5)
449 
450 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
451 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
452 phase1Pixel.toModify(TrackMon, EtaBin=31, EtaMin=-3., EtaMax=3.)
453 phase1Pixel.toModify(TrackMon, LUMIBin=300, LUMIMin=200., LUMIMax=20000.)
454 phase2_tracker.toModify(TrackMon, EtaBin=46, EtaMin=-4.5, EtaMax=4.5)
455 phase2_tracker.toModify(TrackMon, PVBin=125, PVMin=-0.5, PVMax=249.5)
456 phase2_tracker.toModify(TrackMon, LUMIBin=700, LUMIMin=0., LUMIMax=70000.)