Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-23 12:04:15

0001 from builtins import range
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 # define binning for efficiency plots
0005 # pt
0006 import itertools
0007 effVsPtBins=list(itertools.chain(range(0, 30, 1), range(30, 50, 2), 
0008                                  range(50, 70, 5), range(70, 100, 10), 
0009                                  range(100, 200, 25), range(200, 300, 50), 
0010                                  range(300, 500, 100), range(500, 700, 200), 
0011                                  range(700, 1000, 300)))
0012 effVsPtBins.append(1000)
0013 
0014 # phi
0015 nPhiBins = 34
0016 phiMin = -3.4
0017 phiMax = 3.4
0018 effVsPhiBins = [i*(phiMax-phiMin)/nPhiBins + phiMin for i in range(nPhiBins+1)]
0019 
0020 # eta
0021 nEtaBins = 50
0022 etaMin = -2.5
0023 etaMax = 2.5
0024 effVsEtaBins = [i*(etaMax-etaMin)/nEtaBins + etaMin for i in range(nEtaBins+1)]
0025 
0026 # vtx
0027 effVsVtxBins = range(0, 101)
0028 
0029 # A list of pt cut + quality cut pairs for which efficiency plots should be made
0030 ptQualCuts = [[22, 12], [15, 8], [7, 8], [3, 4]]
0031 cutsPSets = []
0032 for ptQualCut in ptQualCuts:
0033     cutsPSets.append(cms.untracked.PSet(ptCut = cms.untracked.int32(ptQualCut[0]),
0034                                         qualCut = cms.untracked.int32(ptQualCut[1])))
0035 
0036 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0037 l1tMuonDQMOffline = DQMEDAnalyzer('L1TMuonDQMOffline',
0038     histFolder = cms.untracked.string('L1T/L1TObjects/L1TMuon/L1TriggerVsReco'),
0039     tagPtCut = cms.untracked.double(26.),
0040     recoToL1PtCutFactor = cms.untracked.double(1.2),
0041     cuts = cms.untracked.VPSet(cutsPSets),
0042     useL1AtVtxCoord = cms.untracked.bool(False),
0043 
0044     muonInputTag = cms.untracked.InputTag("muons"),
0045     gmtInputTag  = cms.untracked.InputTag("gmtStage2Digis","Muon"),
0046     vtxInputTag = cms.untracked.InputTag("offlinePrimaryVertices"),
0047     bsInputTag  = cms.untracked.InputTag("offlineBeamSpot"),
0048 
0049     triggerNames = cms.untracked.vstring(
0050         "HLT_IsoMu27_v*",
0051         "HLT_IsoMu30_v*"
0052     ),
0053     trigInputTag       = cms.untracked.InputTag("hltTriggerSummaryAOD", "", "HLT"),
0054     trigProcess        = cms.untracked.string("HLT"),
0055     trigProcess_token  = cms.untracked.InputTag("TriggerResults","","HLT"),
0056 
0057     efficiencyVsPtBins = cms.untracked.vdouble(effVsPtBins),
0058     efficiencyVsPhiBins = cms.untracked.vdouble(effVsPhiBins),
0059     efficiencyVsEtaBins = cms.untracked.vdouble(effVsEtaBins),
0060     efficiencyVsVtxBins = cms.untracked.vdouble(effVsVtxBins),
0061 
0062     # muon track extrapolation to 2nd station
0063     muProp = cms.PSet(
0064         useTrack = cms.string("tracker"),  # 'none' to use Candidate P4; or 'tracker', 'muon', 'global'
0065         useState = cms.string("atVertex"), # 'innermost' and 'outermost' require the TrackExtra
0066         useSimpleGeometry = cms.bool(True),
0067         useStation2 = cms.bool(True),
0068         fallbackToME1 = cms.bool(False),
0069         cosmicPropagationHypothesis = cms.bool(False),
0070         useMB2InOverlap = cms.bool(False),
0071         propagatorAlong = cms.ESInputTag("", "SteppingHelixPropagatorAlong"),
0072         propagatorAny = cms.ESInputTag("", "SteppingHelixPropagatorAny"),
0073         propagatorOpposite = cms.ESInputTag("", "SteppingHelixPropagatorOpposite")  
0074     ),
0075 
0076     verbose   = cms.untracked.bool(False)
0077 )
0078 
0079 # emulator module
0080 l1tMuonDQMOfflineEmu = l1tMuonDQMOffline.clone(
0081     gmtInputTag  = "simGmtStage2Digis",
0082     histFolder = 'L1TEMU/L1TObjects/L1TMuon/L1TriggerVsReco'
0083 )
0084 
0085 # modifications for the pp reference run
0086 # A list of pt cut + quality cut pairs for which efficiency plots should be made
0087 ptQualCuts_HI = [[12, 12], [7, 8], [5, 4]]
0088 cutsPSets_HI = []
0089 for ptQualCut in ptQualCuts_HI:
0090     cutsPSets_HI.append(cms.untracked.PSet(ptCut = cms.untracked.int32(ptQualCut[0]),
0091                                            qualCut = cms.untracked.int32(ptQualCut[1])))
0092 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
0093 ppRef_2017.toModify(l1tMuonDQMOffline,
0094     tagPtCut = cms.untracked.double(14.),
0095     cuts = cms.untracked.VPSet(cutsPSets_HI),
0096     triggerNames = cms.untracked.vstring(
0097         "HLT_HIL3Mu12_v*",
0098     )
0099 )
0100 ppRef_2017.toModify(l1tMuonDQMOfflineEmu,
0101     tagPtCut = cms.untracked.double(14.),
0102     cuts = cms.untracked.VPSet(cutsPSets_HI),
0103     triggerNames = cms.untracked.vstring(
0104         "HLT_HIL3Mu12_v*",
0105     )
0106 )
0107 
0108