CMS 3D CMS Logo

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