Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:17

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from DQM.TrackingMonitor.BXlumiParameters_cfi import BXlumiSetup
0004 
0005 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0006 TrackMon = DQMEDAnalyzer('TrackingMonitor',
0007     
0008     # input tags
0009     numCut           = cms.string(" pt >= 1 & quality('highPurity') "),
0010     denCut           = cms.string(" pt >= 1 "),
0011     allTrackProducer = cms.InputTag("generalTracks"),
0012     TrackProducer    = cms.InputTag("generalTracks"),
0013     SeedProducer     = cms.InputTag("initialStepSeeds"),
0014     TCProducer       = cms.InputTag("initialStepTrackCandidates"),
0015     MVAProducers     = cms.vstring("initialStepClassifier1", "initialStepClassifier2"),
0016     TrackProducerForMVA = cms.InputTag("initialStepTracks"),
0017     ClusterLabels    = cms.vstring('Tot'), # to decide which Seeds-Clusters correlation plots to have default is Total other options 'Strip', 'Pix'
0018     beamSpot         = cms.InputTag("offlineBeamSpot"),
0019     primaryVertex    = cms.InputTag('offlinePrimaryVertices'),
0020     stripCluster     = cms.InputTag('siStripClusters'),
0021     pixelCluster     = cms.InputTag('siPixelClusters'),                          
0022     BXlumiSetup      = BXlumiSetup.clone(),                              
0023     genericTriggerEventPSet = cms.PSet(),
0024 #    lumi             = cms.InputTag('lumiProducer'),
0025 #  # taken from 
0026 #  # DPGAnalysis/SiStripTools/src/DigiLumiCorrHistogramMaker.cc
0027 #  # the scale factor 6.37 should follow the lumi prescriptions
0028 #  # AS SOON AS THE CORRECTED LUMI WILL BE AVAILABLE IT HAS TO BE SET TO 1.
0029 #    lumiScale     = cms.double(6.37),
0030                           
0031     # PU monitoring
0032     primaryVertexInputTags    = cms.VInputTag(),
0033     selPrimaryVertexInputTags = cms.VInputTag(),
0034     pvLabels = cms.vstring(),
0035                           
0036     # output parameters
0037     AlgoName            = cms.string('GenTk'),
0038     Quality             = cms.string(''),
0039     FolderName          = cms.string('Tracking/GlobalParameters'),
0040     BSFolderName        = cms.string('Tracking/ParametersVsBeamSpot'),
0041     PVFolderName        = cms.string('Tracking/PrimaryVertices'),
0042 
0043     # determines where to evaluate track parameters
0044     # options: 'default'      --> straight up track parametes
0045     #          'ImpactPoint'  --> evalutate at impact point 
0046     #          'InnerSurface' --> evalutate at innermost measurement state 
0047     #          'OuterSurface' --> evalutate at outermost measurement state 
0048 
0049     MeasurementState = cms.string('ImpactPoint'),
0050     
0051     # which plots to do
0052     doTestPlots                         = cms.bool(False),
0053     doAllPlots                          = cms.bool(True),
0054     doTrackerSpecific                   = cms.bool(False),
0055     doBeamSpotPlots                     = cms.bool(False),
0056     doPrimaryVertexPlots                = cms.bool(False),
0057     doSeedParameterHistos               = cms.bool(False),
0058     doTrackCandHistos                   = cms.bool(False),
0059     doAllTrackCandHistos                = cms.bool(False),
0060     doDCAPlots                          = cms.bool(False),
0061     doDCAwrtPVPlots                     = cms.bool(False),
0062     doDCAwrt000Plots                    = cms.bool(False),
0063     doSIPPlots                          = cms.bool(False),
0064     doEffFromHitPatternVsPU             = cms.bool(False),
0065     doEffFromHitPatternVsBX             = cms.bool(False),
0066     doEffFromHitPatternVsLUMI           = cms.bool(False),
0067     pvNDOF                              = cms.int32(4),
0068     pixelCluster4lumi                   = cms.InputTag('siPixelClustersPreSplitting'),
0069     scal                                = cms.InputTag('scalersRawToDigi'),
0070     forceSCAL                           = cms.bool(True),
0071     metadata                            = cms.InputTag('onlineMetaDataDigis'),
0072     useBPixLayer1                       = cms.bool(False),
0073     minNumberOfPixelsPerCluster         = cms.int32(2), # from DQM/PixelLumi/python/PixelLumiDQM_cfi.py
0074     minPixelClusterCharge               = cms.double(15000.),
0075     doGeneralPropertiesPlots            = cms.bool(False),
0076     doHitPropertiesPlots                = cms.bool(False),              
0077 #    doGoodTrackPlots                    = cms.bool(False),
0078     doMeasurementStatePlots             = cms.bool(True),
0079     doProfilesVsLS                      = cms.bool(False),
0080     doRecHitsPerTrackProfile            = cms.bool(True),              
0081     doRecHitVsPhiVsEtaPerTrack          = cms.bool(False),
0082     doRecHitVsPtVsEtaPerTrack           = cms.bool(False),
0083 #    doGoodTrackRecHitVsPhiVsEtaPerTrack = cms.bool(False),                          
0084     doLayersVsPhiVsEtaPerTrack          = cms.bool(False),
0085 #    doGoodTrackLayersVsPhiVsEtaPerTrack = cms.bool(False),
0086 #    doGoodTrack2DChi2Plots              = cms.bool(False),
0087     doThetaPlots                        = cms.bool(False),
0088     doTrackPxPyPlots                    = cms.bool(False),
0089     doPUmonitoring                      = cms.bool(False),
0090     doPlotsVsBXlumi                     = cms.bool(False),
0091     doPlotsVsGoodPVtx                   = cms.bool(True),
0092     doPlotsVsLUMI                       = cms.bool(False),
0093     doPlotsVsBX                         = cms.bool(False),
0094     doHIPlots                           = cms.bool(False),                              
0095     doMVAPlots                          = cms.bool(False),
0096     qualityString = cms.string("highPurity"),                      
0097     #which seed plots to do
0098     doSeedNumberHisto = cms.bool(False),
0099     doSeedLumiAnalysis = cms.bool(False),
0100     doSeedVsClusterHisto = cms.bool(False),
0101     doSeedPTHisto = cms.bool(False),
0102     doSeedETAHisto = cms.bool(False),
0103     doSeedPHIHisto = cms.bool(False),
0104     doSeedPHIVsETAHisto = cms.bool(False),
0105     doSeedThetaHisto = cms.bool(False),
0106     doSeedQHisto = cms.bool(False),
0107     doSeedDxyHisto= cms.bool(False),
0108     doSeedDzHisto= cms.bool(False),
0109     doSeedNRecHitsHisto= cms.bool(False),
0110     doSeedNVsPhiProf= cms.bool(False),
0111     doSeedNVsEtaProf= cms.bool(False),
0112     doStopSource = cms.bool(False),
0113 
0114     TTRHBuilder = cms.string('WithTrackAngle'),
0115 
0116     # Luminosity based analysis
0117     doLumiAnalysis = cms.bool(False),                       
0118     # For plots vs LS
0119     LSBin = cms.int32(2000),
0120     LSMin = cms.double(0),
0121     LSMax = cms.double(2000.),
0122 
0123     # paramters of the Track
0124     # ============================================================ 
0125     
0126     # chi2
0127     Chi2Bin = cms.int32(50),
0128     Chi2Max = cms.double(199.5),
0129     Chi2Min = cms.double(-0.5),
0130 
0131     # chi2 dof
0132     Chi2NDFBin = cms.int32(50),
0133     Chi2NDFMax = cms.double(19.5),
0134     Chi2NDFMin = cms.double(-0.5),
0135 
0136     # chi^2 probability
0137     Chi2ProbBin = cms.int32(100),
0138     Chi2ProbMax = cms.double(1.0),
0139     Chi2ProbMin = cms.double(0.0),
0140 
0141     # Number of Tracks per Event
0142     TkSizeBin = cms.int32(100),
0143     TkSizeMax = cms.double(99.5),                        
0144     TkSizeMin = cms.double(-0.5),
0145 
0146     # Number of seeds per Event
0147     TkSeedSizeBin = cms.int32(200),
0148     TkSeedSizeMax = cms.double(999.5),                        
0149     TkSeedSizeMin = cms.double(-0.5),
0150 
0151     # Number of Track Cadidates per Event
0152     TCSizeBin = cms.int32(200),
0153     TCSizeMax = cms.double(999.5),
0154     TCSizeMin = cms.double(-0.5),
0155 
0156     # num rec hits
0157     TrackQBin = cms.int32(8),
0158     TrackQMax = cms.double(2.5),
0159     TrackQMin = cms.double(-2.5),
0160 
0161     # num rec hits in seed
0162     SeedHitBin = cms.int32(6),
0163     SeedHitMax = cms.double(5.5),
0164     SeedHitMin = cms.double(-0.5),
0165 
0166     # num rec hits per track candidate
0167     TCHitBin = cms.int32(40),
0168     TCHitMax = cms.double(39.5),
0169     TCHitMin = cms.double(-0.5),
0170 
0171     # num rec hits
0172     RecHitBin = cms.int32(40),
0173     RecHitMax = cms.double(39.5),                        
0174     RecHitMin = cms.double(-0.5),
0175 
0176     # mean rec hits
0177     MeanHitBin = cms.int32(30),
0178     MeanHitMax = cms.double(29.5),
0179     MeanHitMin = cms.double(-0.5),
0180 
0181     subdetectors = cms.vstring( "TIB", "TOB", "TID", "TEC", "PixBarrel", "PixEndcap", "Pixel", "Strip" ),
0182     subdetectorBin = cms.int32(25),
0183 
0184     # num rec hits lost
0185     RecLostBin = cms.int32(10),
0186     RecLostMax = cms.double(9.5),
0187     RecLostMin = cms.double(-0.5),
0188 
0189     # num layers 
0190     RecLayBin = cms.int32(25),
0191     RecLayMax = cms.double(24.5),
0192     RecLayMin = cms.double(-0.5),
0193 
0194     # mean layers
0195     MeanLayBin = cms.int32(25),
0196     MeanLayMax = cms.double(24.5),
0197     MeanLayMin = cms.double(-0.5),
0198 
0199     # num TOB Layers
0200     TOBLayBin = cms.int32(10),
0201     TOBLayMax = cms.double(9.5),
0202     TOBLayMin = cms.double(-0.5),
0203 
0204     # num TIB Layers
0205     TIBLayBin = cms.int32(6),
0206     TIBLayMax = cms.double(5.5),
0207     TIBLayMin = cms.double(-0.5),
0208 
0209     # num TID Layers
0210     TIDLayBin = cms.int32(6),
0211     TIDLayMax = cms.double(5.5),
0212     TIDLayMin = cms.double(-0.5),
0213 
0214     # num TEC Layers
0215     TECLayBin = cms.int32(15),
0216     TECLayMax = cms.double(14.5),
0217     TECLayMin = cms.double(-0.5),
0218 
0219     # num PXB Layers
0220     PXBLayBin = cms.int32(6),
0221     PXBLayMax = cms.double(5.5),
0222     PXBLayMin = cms.double(-0.5),
0223 
0224     # num PXF Layers
0225     PXFLayBin = cms.int32(6),
0226     PXFLayMax = cms.double(5.5),
0227     PXFLayMin = cms.double(-0.5),
0228 
0229     # Track |p|
0230     TrackPBin = cms.int32(100),
0231     TrackPMax = cms.double(100),
0232     TrackPMin = cms.double(0),
0233 
0234     # Track pT
0235     TrackPtBin = cms.int32(100),
0236     TrackPtMax = cms.double(100),                        
0237     TrackPtMin = cms.double(0.1),
0238     
0239     # Track px
0240     TrackPxBin = cms.int32(50),
0241     TrackPxMax = cms.double(50.0),                        
0242     TrackPxMin = cms.double(-50.0),
0243     
0244     # Track py
0245     TrackPyBin = cms.int32(50),
0246     TrackPyMax = cms.double(50.0),                        
0247     TrackPyMin = cms.double(-50.0),
0248     
0249     # Track pz
0250     TrackPzBin = cms.int32(50),
0251     TrackPzMax = cms.double(50.0),                        
0252     TrackPzMin = cms.double(-50.0),
0253                             
0254     # track theta
0255     ThetaBin = cms.int32(32),
0256     ThetaMax = cms.double(3.2),
0257     ThetaMin = cms.double(0.0),
0258 
0259     # track eta
0260     EtaBin = cms.int32(26),
0261     EtaMax = cms.double(2.5),
0262     EtaMin = cms.double(-2.5),
0263 
0264     # track phi
0265     PhiBin = cms.int32(32),
0266     PhiMax = cms.double(3.141592654),
0267     PhiMin = cms.double(-3.141592654),
0268 
0269     # Track |p| error
0270     pErrBin = cms.int32(50),
0271     pErrMax = cms.double(1.0),
0272     pErrMin = cms.double(0.0),
0273 
0274     # Track pT error
0275     ptErrBin = cms.int32(50),
0276     ptErrMax = cms.double(1.0),
0277     ptErrMin = cms.double(0.0),
0278     
0279     # Track px error
0280     pxErrBin = cms.int32(50),
0281     pxErrMax = cms.double(1.0),
0282     pxErrMin = cms.double(0.0),
0283     
0284     # Track py error
0285     pyErrBin = cms.int32(50),
0286     pyErrMax = cms.double(1.0),
0287     pyErrMin = cms.double(0.0),
0288     
0289     # Track pz error
0290     pzErrBin = cms.int32(50),
0291     pzErrMax = cms.double(1.0),
0292     pzErrMin = cms.double(0.0),
0293 
0294     # track eta error
0295     etaErrBin = cms.int32(50),
0296     etaErrMax = cms.double(0.1),
0297     etaErrMin = cms.double(0.0),
0298     
0299     # track phi Error
0300     phiErrBin = cms.int32(50),
0301     phiErrMax = cms.double(0.1),
0302     phiErrMin = cms.double(0.0),
0303 
0304     # PCA x position
0305     VXBin = cms.int32(100),
0306     VXMax = cms.double(0.5),                        
0307     VXMin = cms.double(-0.5),
0308     
0309     # PCA y position
0310     VYBin = cms.int32(100),
0311     VYMax = cms.double(0.5),                        
0312     VYMin = cms.double(-0.5),
0313     
0314     # PCA z position
0315     VZBin = cms.int32(100),
0316     VZMax = cms.double(30.0),                        
0317     VZMin = cms.double(-30.0),
0318     
0319     # PCA z position for profile
0320     VZBinProf = cms.int32(100),
0321     VZMaxProf = cms.double(0.2),                        
0322     VZMinProf = cms.double(-0.2),
0323     
0324     # PCA x position for 2D plot
0325     X0Bin = cms.int32(100),
0326     X0Max = cms.double(0.5),                        
0327     X0Min = cms.double(-0.5),
0328     
0329     # PCA y position for 2D plot
0330     Y0Bin = cms.int32(100),
0331     Y0Max = cms.double(0.5),                        
0332     Y0Min = cms.double(-0.5),
0333     
0334     # PCA z position for 2D plot
0335     Z0Bin = cms.int32(120),
0336     Z0Max = cms.double(60.0),                        
0337     Z0Min = cms.double(-60.0),
0338     
0339     # Track dxy (transverse impact parameter)
0340     DxyBin = cms.int32(100),
0341     DxyMax = cms.double(0.5),
0342     DxyMin = cms.double(-0.5),                        
0343 
0344     AbsDxyBin = cms.int32(120),
0345     AbsDxyMin = cms.double(0.),
0346     AbsDxyMax = cms.double(60.),                        
0347 
0348     # Seed dxy (transverse impact parameter)
0349     SeedDxyBin = cms.int32(100),
0350     SeedDxyMax = cms.double(0.5),
0351     SeedDxyMin = cms.double(-0.5),                        
0352 
0353     # Seed dz (longitudinal impact parameter)
0354     SeedDzBin = cms.int32(120),
0355     SeedDzMax = cms.double(30.0),
0356     SeedDzMin = cms.double(-30.0),                        
0357 
0358     # Track Candidate dxy (transverse impact parameter)
0359     TCDxyBin = cms.int32(100),
0360     TCDxyMax = cms.double(100.0),
0361     TCDxyMin = cms.double(-100.0),                                                
0362 
0363     # Track Candidate dz (transverse impact parameter)
0364     TCDzBin = cms.int32(100),
0365     TCDzMax = cms.double(400.0),
0366     TCDzMin = cms.double(-400.0),                                                
0367 
0368     # Track selection MVA
0369     MVABin  = cms.int32(100),
0370     MVAMin  = cms.double(-1),
0371     MVAMax  = cms.double(1),
0372 
0373 #######################################
0374 ## needed for tracksVScluster and seedVScluster
0375 
0376     # NCluster Pixel
0377     NClusPxBin = cms.int32(200),
0378     NClusPxMax = cms.double(49999.5),                      
0379     NClusPxMin = cms.double(-0.5),
0380 
0381     # NCluster Strip
0382     NClusStrBin = cms.int32(500),
0383     NClusStrMax = cms.double(199999.5),                      
0384     NClusStrMin = cms.double(-0.5),
0385 
0386     # NCluster Vs Tracks
0387     NTrk2D = cms.PSet(
0388         NTrk2DBin     = cms.int32(50),
0389         NTrk2DMax     = cms.double(1999.5),                      
0390         NTrk2DMin     = cms.double(-0.5),
0391     ),
0392     # PU monitoring
0393     # Nunmber of Tracks per Primary Vertices
0394     NTrkPVtx = cms.PSet(
0395         NTrkPVtxBin = cms.int32(100),
0396         NTrkPVtxMin = cms.double( 0.),
0397         NTrkPVtxMax = cms.double(100.)
0398     ),
0399 
0400     # Nunmber of Good Primary Vertices
0401     SumPtPVtx = cms.PSet(
0402         SumPtPVtxBin = cms.int32(100),
0403         SumPtPVtxMin = cms.double( 0.),
0404         SumPtPVtxMax = cms.double(500.)
0405     ),
0406     # Nunmber of Good Primary Vertices
0407     GoodPVtx = cms.PSet(
0408         GoodPVtxBin = cms.int32(200),
0409         GoodPVtxMin = cms.double( 0.),
0410         GoodPVtxMax = cms.double(200.)
0411     ),
0412 
0413     LUMIBin  = cms.int32 ( 300 ),   # irrelevant
0414     LUMIMin  = cms.double(  200.),
0415     LUMIMax  = cms.double(20000.),
0416 
0417 #    # BXlumi                          
0418 #    BXlumiBin = cms.int32(400),
0419 #    BXlumiMin = cms.double(4000),
0420 #    BXlumiMax = cms.double(20000),
0421 
0422 ###############################
0423 ################## FOR HI PLOTS#####################
0424 #######
0425 TransDCABins = cms.int32(100),
0426 TransDCAMin = cms.double(-8.0),
0427 TransDCAMax = cms.double(8.0),
0428 
0429 LongDCABins = cms.int32(100),
0430 LongDCAMin = cms.double(-8.0),
0431 LongDCAMax = cms.double(8.0),          
0432 )
0433 
0434 # Overcoming the 255 arguments limit
0435 # binning for 2D plots (identical to 1D, but in muon tracks)
0436 # track eta 2D histo
0437 TrackMon.Eta2DBin = cms.int32(26)
0438 # track phi 2D histo
0439 TrackMon.Phi2DBin = cms.int32(32)
0440 # track pt 2D histo
0441 TrackMon.TrackPt2DBin = cms.int32(100)
0442 
0443 # TrackingRegion monitoring
0444 TrackMon.PVBin = cms.int32 ( 40 )
0445 TrackMon.PVMin = cms.double( -0.5)
0446 TrackMon.PVMax = cms.double( 79.5) ## it might need to be adjust if CMS asks to have lumi levelling at lower values
0447 
0448 TrackMon.DxyErrBin = cms.int32(200)
0449 TrackMon.DxyErrMax = cms.double(0.1)
0450 
0451 TrackMon.RegionProducer = cms.InputTag("")
0452 TrackMon.RegionSeedingLayersProducer = cms.InputTag("")
0453 TrackMon.RegionCandidates = cms.InputTag("")
0454 TrackMon.doRegionPlots = cms.bool(False)
0455 TrackMon.doRegionCandidatePlots = cms.bool(False)
0456 TrackMon.RegionSizeBin = cms.int32(20)
0457 TrackMon.RegionSizeMax = cms.double(19.5)
0458 TrackMon.RegionSizeMin = cms.double(-0.5)
0459 TrackMon.RegionCandidatePtBin = cms.int32(100)
0460 TrackMon.RegionCandidatePtMax = cms.double(1000)
0461 TrackMon.RegionCandidatePtMin = cms.double(0)
0462 
0463 # Number of candidates/seed within pattern recognition
0464 TrackMon.SeedCandBin = cms.int32(20)
0465 TrackMon.SeedCandMax = cms.double(19.5)
0466 TrackMon.SeedCandMin = cms.double(-0.5)
0467 
0468 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
0469 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0470 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0471 phase1Pixel.toModify(TrackMon, EtaBin=31, EtaMin=-3., EtaMax=3.)
0472 phase1Pixel.toModify(TrackMon, LUMIBin=300, LUMIMin=200., LUMIMax=20000.)
0473 run3_common.toModify(TrackMon, forceSCAL = False)
0474 phase2_tracker.toModify(TrackMon, EtaBin=46, EtaMin=-4.5, EtaMax=4.5)
0475 phase2_tracker.toModify(TrackMon, PVBin=125, PVMin=-0.5, PVMax=249.5)
0476 phase2_tracker.toModify(TrackMon, LUMIBin=700, LUMIMin=200., LUMIMax=70000.)