CMS 3D CMS Logo

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