CMS 3D CMS Logo

L1TMuonDQMOffline_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # define binning for efficiency plots
4 # pt
5 effVsPtBins = range(0, 30, 1)
6 effVsPtBins += range(30, 50, 2)
7 effVsPtBins += range(50, 70, 5)
8 effVsPtBins += range(70, 100, 10)
9 effVsPtBins += range(100, 200, 25)
10 effVsPtBins += range(200, 300, 50)
11 effVsPtBins += range(300, 500, 100)
12 effVsPtBins += range(500, 700, 200)
13 effVsPtBins += range(700, 1000, 300)
14 effVsPtBins.append(1000)
15 
16 # phi
17 nPhiBins = 34
18 phiMin = -3.4
19 phiMax = 3.4
20 effVsPhiBins = [i*(phiMax-phiMin)/nPhiBins + phiMin for i in range(nPhiBins+1)]
21 
22 # eta
23 nEtaBins = 50
24 etaMin = -2.5
25 etaMax = 2.5
26 effVsEtaBins = [i*(etaMax-etaMin)/nEtaBins + etaMin for i in range(nEtaBins+1)]
27 
28 # vtx
29 effVsVtxBins = range(0, 101)
30 
31 # A list of pt cut + quality cut pairs for which efficiency plots should be made
32 ptQualCuts = [[22, 12], [15, 8], [7, 8], [3, 4]]
33 cutsPSets = []
34 for ptQualCut in ptQualCuts:
35  cutsPSets.append(cms.untracked.PSet(ptCut = cms.untracked.int32(ptQualCut[0]),
36  qualCut = cms.untracked.int32(ptQualCut[1])))
37 
38 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
39 l1tMuonDQMOffline = DQMEDAnalyzer('L1TMuonDQMOffline',
40  histFolder = cms.untracked.string('L1T/L1TObjects/L1TMuon/L1TriggerVsReco'),
41  tagPtCut = cms.untracked.double(26.),
42  recoToL1PtCutFactor = cms.untracked.double(1.2),
43  cuts = cms.untracked.VPSet(cutsPSets),
44  useL1AtVtxCoord = cms.untracked.bool(False),
45 
46  muonInputTag = cms.untracked.InputTag("muons"),
47  gmtInputTag = cms.untracked.InputTag("gmtStage2Digis","Muon"),
48  vtxInputTag = cms.untracked.InputTag("offlinePrimaryVertices"),
49  bsInputTag = cms.untracked.InputTag("offlineBeamSpot"),
50 
51  triggerNames = cms.untracked.vstring(
52  "HLT_IsoMu27_v*",
53  "HLT_IsoMu30_v*"
54  ),
55  trigInputTag = cms.untracked.InputTag("hltTriggerSummaryAOD", "", "HLT"),
56  trigProcess = cms.untracked.string("HLT"),
57  trigProcess_token = cms.untracked.InputTag("TriggerResults","","HLT"),
58 
59  efficiencyVsPtBins = cms.untracked.vdouble(effVsPtBins),
60  efficiencyVsPhiBins = cms.untracked.vdouble(effVsPhiBins),
61  efficiencyVsEtaBins = cms.untracked.vdouble(effVsEtaBins),
62  efficiencyVsVtxBins = cms.untracked.vdouble(effVsVtxBins),
63 
64  # muon track extrapolation to 2nd station
65  muProp = cms.PSet(
66  useTrack = cms.string("tracker"), # 'none' to use Candidate P4; or 'tracker', 'muon', 'global'
67  useState = cms.string("atVertex"), # 'innermost' and 'outermost' require the TrackExtra
68  useSimpleGeometry = cms.bool(True),
69  useStation2 = cms.bool(True),
70  fallbackToME1 = cms.bool(False),
71  ),
72 
73  verbose = cms.untracked.bool(False)
74 )
75 
76 # emulator module
77 l1tMuonDQMOfflineEmu = l1tMuonDQMOffline.clone(
78  gmtInputTag = cms.untracked.InputTag("simGmtStage2Digis"),
79  histFolder = cms.untracked.string('L1TEMU/L1TObjects/L1TMuon/L1TriggerVsReco')
80 )
81 
82 # modifications for the pp reference run
83 # A list of pt cut + quality cut pairs for which efficiency plots should be made
84 ptQualCuts_HI = [[12, 12], [7, 8], [5, 4]]
85 cutsPSets_HI = []
86 for ptQualCut in ptQualCuts_HI:
87  cutsPSets_HI.append(cms.untracked.PSet(ptCut = cms.untracked.int32(ptQualCut[0]),
88  qualCut = cms.untracked.int32(ptQualCut[1])))
89 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
90 ppRef_2017.toModify(l1tMuonDQMOffline,
91  tagPtCut = cms.untracked.double(14.),
92  cuts = cms.untracked.VPSet(cutsPSets_HI),
93  triggerNames = cms.untracked.vstring(
94  "HLT_HIL3Mu12_v*",
95  )
96 )
97 ppRef_2017.toModify(l1tMuonDQMOfflineEmu,
98  tagPtCut = cms.untracked.double(14.),
99  cuts = cms.untracked.VPSet(cutsPSets_HI),
100  triggerNames = cms.untracked.vstring(
101  "HLT_HIL3Mu12_v*",
102  )
103 )
104 
105