CMS 3D CMS Logo

L1TEtSumJetOffline_cfi.py
Go to the documentation of this file.
1 from builtins import range
2 import FWCore.ParameterSet.Config as cms
3 from DQMOffline.L1Trigger.L1THistDefinitions_cff import histDefinitions
4 
5 jetEfficiencyThresholds = [36, 68, 128, 176]
6 metEfficiencyThresholds = [40, 60, 80, 100, 120]
7 mhtEfficiencyThresholds = [40, 60, 80, 100, 120]
8 ettEfficiencyThresholds = [30, 50, 90, 140]
9 httEfficiencyThresholds = [120, 160, 200, 240, 280]
10 
11 jetEfficiencyBins = []
12 jetEfficiencyBins.extend(list(range(0, 120, 10)))
13 jetEfficiencyBins.extend(list(range(120, 180, 20)))
14 jetEfficiencyBins.extend(list(range(180, 300, 40)))
15 jetEfficiencyBins.extend(list(range(300, 401, 100)))
16 
17 metEfficiencyBins = []
18 metEfficiencyBins.extend(list(range(0, 40, 4)))
19 metEfficiencyBins.extend(list(range(40, 70, 2)))
20 metEfficiencyBins.extend(list(range(70, 100, 5)))
21 metEfficiencyBins.extend(list(range(100, 160, 10)))
22 metEfficiencyBins.extend(list(range(160, 261, 20)))
23 
24 mhtEfficiencyBins = []
25 mhtEfficiencyBins.extend(list(range(30, 50, 1)))
26 mhtEfficiencyBins.extend(list(range(50, 80, 5)))
27 mhtEfficiencyBins.extend(list(range(80, 140, 10)))
28 mhtEfficiencyBins.extend(list(range(140, 200, 15)))
29 mhtEfficiencyBins.extend(list(range(200, 300, 20)))
30 mhtEfficiencyBins.extend(list(range(300, 401, 50)))
31 
32 ettEfficiencyBins = []
33 ettEfficiencyBins.extend(list(range(0, 30, 30)))
34 ettEfficiencyBins.extend(list(range(30, 50, 10)))
35 ettEfficiencyBins.extend(list(range(50, 90, 5)))
36 ettEfficiencyBins.extend(list(range(90, 141, 2)))
37 
38 httEfficiencyBins = []
39 httEfficiencyBins.extend(list(range(0, 100, 5)))
40 httEfficiencyBins.extend(list(range(100, 200, 10)))
41 httEfficiencyBins.extend(list(range(200, 400, 20)))
42 httEfficiencyBins.extend(list(range(400, 500, 50)))
43 httEfficiencyBins.extend(list(range(500, 601, 10)))
44 
45 # from https://twiki.cern.ch/twiki/bin/view/CMS/JetID13TeVRun2017
46 centralJetSelection = [
47  'abs(eta) <= 2.7',
48  'neutralHadronEnergyFraction < 0.9',
49  'neutralEmEnergyFraction < 0.9',
50  'numberOfDaughters > 1',
51  'muonEnergyFraction < 0.8'
52 ]
53 withinTrackerSelection = centralJetSelection[:]
54 withinTrackerSelection += [
55  'abs(eta) <= 2.4',
56  'chargedHadronEnergyFraction > 0',
57  'chargedMultiplicity > 0',
58  'chargedEmEnergyFraction < 0.8'
59 ]
60 forwardJetSelection = [
61  'abs(eta) > 2.7',
62  'abs(eta) <= 3.0',
63  'neutralEmEnergyFraction > 0.02',
64  'neutralEmEnergyFraction < 0.99',
65  'neutralMultiplicity > 2'
66 ]
67 veryForwardJetSelection = [
68  'abs(eta) > 3.0',
69  'neutralEmEnergyFraction < 0.99',
70  'neutralHadronEnergyFraction > 0.02',
71  'neutralMultiplicity > 10'
72 ]
73 centralJetSelection = ' && '.join(centralJetSelection)
74 withinTrackerSelection = ' && '.join(withinTrackerSelection)
75 forwardJetSelection = ' && '.join(forwardJetSelection)
76 veryForwardJetSelection = ' && '.join(veryForwardJetSelection)
77 completeSelection = 'et > 30 && (' + ' || '.join([centralJetSelection, withinTrackerSelection,
78  forwardJetSelection, veryForwardJetSelection]) + ')'
79 
80 goodPFJetsForL1T = cms.EDFilter(
81  "PFJetSelector",
82  src=cms.InputTag("ak4PFJetsCHS"),
83  cut=cms.string(completeSelection),
84  filter=cms.bool(True),
85 )
86 
87 from L1Trigger.L1TNtuples.L1TPFMetNoMuProducer_cfi import l1tPFMetNoMu
88 
89 l1tPFMetNoMuForDQM = l1tPFMetNoMu.clone(
90  pfMETCollection= 'pfMet',
91  muonCollection= 'muons'
92 )
93 
94 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
95 l1tEtSumJetOfflineDQM = DQMEDAnalyzer(
96  "L1TStage2CaloLayer2Offline",
97  electronCollection=cms.InputTag("gedGsfElectrons"),
98  pfJetCollection=cms.InputTag("goodPFJetsForL1T"),
99  caloMETCollection=cms.InputTag("caloMetBE"),
100  # MET collection including HF
101  caloETMHFCollection=cms.InputTag("caloMet"),
102  pfMETNoMuCollection=cms.InputTag('l1tPFMetNoMuForDQM'),
103  conversionsCollection=cms.InputTag("allConversions"),
104  PVCollection=cms.InputTag("offlinePrimaryVerticesWithBS"),
105  beamSpotCollection=cms.InputTag("offlineBeamSpot"),
106 
107  triggerInputTag=cms.InputTag('hltTriggerSummaryAOD', '', 'HLT'),
108  triggerProcess=cms.string('HLT'),
109  triggerResults=cms.InputTag('TriggerResults', '', 'HLT'),
110  triggerNames=cms.vstring(
111  'HLT_IsoMu18_v*',
112  'HLT_IsoMu20_v*',
113  'HLT_IsoMu22_v*',
114  'HLT_IsoMu24_v*',
115  'HLT_IsoMu27_v*',
116  'HLT_IsoMu30_v*',
117  ),
118 
119  stage2CaloLayer2JetSource=cms.InputTag("caloStage2Digis", "Jet"),
120  stage2CaloLayer2EtSumSource=cms.InputTag("caloStage2Digis", "EtSum"),
121 
122  histFolderEtSum=cms.string('L1T/L1TObjects/L1TEtSum/L1TriggerVsReco'),
123  histFolderJet=cms.string('L1T/L1TObjects/L1TJet/L1TriggerVsReco'),
124  jetEfficiencyThresholds=cms.vdouble(jetEfficiencyThresholds),
125  metEfficiencyThresholds=cms.vdouble(metEfficiencyThresholds),
126  mhtEfficiencyThresholds=cms.vdouble(mhtEfficiencyThresholds),
127  ettEfficiencyThresholds=cms.vdouble(ettEfficiencyThresholds),
128  httEfficiencyThresholds=cms.vdouble(httEfficiencyThresholds),
129 
130  jetEfficiencyBins=cms.vdouble(jetEfficiencyBins),
131  metEfficiencyBins=cms.vdouble(metEfficiencyBins),
132  mhtEfficiencyBins=cms.vdouble(mhtEfficiencyBins),
133  ettEfficiencyBins=cms.vdouble(ettEfficiencyBins),
134  httEfficiencyBins=cms.vdouble(httEfficiencyBins),
135 
136  recoHTTMaxEta=cms.double(2.5),
137  recoMHTMaxEta=cms.double(2.5),
138 
139  histDefinitions=cms.PSet(
140  nVertex=histDefinitions.nVertex.clone(),
141  ETvsET=histDefinitions.ETvsET.clone(),
142  PHIvsPHI=histDefinitions.PHIvsPHI.clone(),
143  # L1JetETvsCaloJetET_HB=histDefinitions.ETvsET.clone(
144  # name='L1JetETvsCaloJetET_HB',
145  # title='L1 Jet E_{T} vs Offline Jet E_{T} (HB); Offline Jet E_{T} (GeV); L1 Jet E_{T} (GeV)',
146  # )
147  ),
148 )
149 
150 # modifications for the pp reference run
151 jetEfficiencyThresholds_HI = [8, 16, 24, 44, 60, 80, 90]
152 jetEfficiencyBins_HI = []
153 jetEfficiencyBins_HI.extend(list(range(0, 60, 2)))
154 jetEfficiencyBins_HI.extend(list(range(60, 90, 5)))
155 jetEfficiencyBins_HI.extend(list(range(90, 120, 10)))
156 jetEfficiencyBins_HI.extend(list(range(120, 180, 20)))
157 jetEfficiencyBins_HI.extend(list(range(180, 300, 40)))
158 jetEfficiencyBins_HI.extend(list(range(300, 401, 100)))
159 
160 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
161 ppRef_2017.toModify(
162  l1tEtSumJetOfflineDQM,
163  TriggerFilter=cms.InputTag('hltEle20WPLoose1GsfTrackIsoFilter', '', 'HLT'),
164  TriggerPath=cms.string('HLT_Ele20_WPLoose_Gsf_v4'),
165  jetEfficiencyThresholds=cms.vdouble(jetEfficiencyThresholds_HI),
166  jetEfficiencyBins=cms.vdouble(jetEfficiencyBins_HI),
167 )
168 
169 # emulator module
170 l1tEtSumJetOfflineDQMEmu = l1tEtSumJetOfflineDQM.clone(
171  stage2CaloLayer2JetSource = "simCaloStage2Digis",
172  stage2CaloLayer2EtSumSource = "simCaloStage2Digis",
173 
174  histFolderEtSum = 'L1TEMU/L1TObjects/L1TEtSum/L1TriggerVsReco',
175  histFolderJet= 'L1TEMU/L1TObjects/L1TJet/L1TriggerVsReco'
176 )
177 
178 # sequences
179 l1tEtSumJetOfflineDQMSeq = cms.Sequence(
180  cms.ignore(goodPFJetsForL1T)
181  + l1tPFMetNoMuForDQM
182  + l1tEtSumJetOfflineDQM
183 )
184 
185 l1tEtSumJetOfflineDQMEmuSeq = cms.Sequence(
186  cms.ignore(goodPFJetsForL1T)
187  + l1tPFMetNoMuForDQM
188  + l1tEtSumJetOfflineDQMEmu
189 )
190 
static std::string join(char **cmd)
Definition: RemoteFile.cc:19