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 DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
87 l1tEtSumJetOfflineDQM = DQMEDAnalyzer(
88  "L1TStage2CaloLayer2Offline",
89  electronCollection=cms.InputTag("gedGsfElectrons"),
90  pfJetCollection=cms.InputTag("goodPFJetsForL1T"),
91  caloMETCollection=cms.InputTag("caloMetBE"),
92  # MET collection including HF
93  caloETMHFCollection=cms.InputTag("caloMet"),
94  conversionsCollection=cms.InputTag("allConversions"),
95  PVCollection=cms.InputTag("offlinePrimaryVerticesWithBS"),
96  beamSpotCollection=cms.InputTag("offlineBeamSpot"),
97 
98  triggerInputTag=cms.InputTag('hltTriggerSummaryAOD', '', 'HLT'),
99  triggerProcess=cms.string('HLT'),
100  triggerResults=cms.InputTag('TriggerResults', '', 'HLT'),
101  triggerNames=cms.vstring(
102  'HLT_IsoMu18_v*',
103  'HLT_IsoMu20_v*',
104  'HLT_IsoMu22_v*',
105  'HLT_IsoMu24_v*',
106  'HLT_IsoMu27_v*',
107  'HLT_IsoMu30_v*',
108  ),
109 
110  stage2CaloLayer2JetSource=cms.InputTag("caloStage2Digis", "Jet"),
111  stage2CaloLayer2EtSumSource=cms.InputTag("caloStage2Digis", "EtSum"),
112 
113  histFolderEtSum=cms.string('L1T/L1TObjects/L1TEtSum/L1TriggerVsReco'),
114  histFolderJet=cms.string('L1T/L1TObjects/L1TJet/L1TriggerVsReco'),
115  jetEfficiencyThresholds=cms.vdouble(jetEfficiencyThresholds),
116  metEfficiencyThresholds=cms.vdouble(metEfficiencyThresholds),
117  mhtEfficiencyThresholds=cms.vdouble(mhtEfficiencyThresholds),
118  ettEfficiencyThresholds=cms.vdouble(ettEfficiencyThresholds),
119  httEfficiencyThresholds=cms.vdouble(httEfficiencyThresholds),
120 
121  jetEfficiencyBins=cms.vdouble(jetEfficiencyBins),
122  metEfficiencyBins=cms.vdouble(metEfficiencyBins),
123  mhtEfficiencyBins=cms.vdouble(mhtEfficiencyBins),
124  ettEfficiencyBins=cms.vdouble(ettEfficiencyBins),
125  httEfficiencyBins=cms.vdouble(httEfficiencyBins),
126 
127  recoHTTMaxEta=cms.double(2.5),
128  recoMHTMaxEta=cms.double(2.5),
129 
130  histDefinitions=cms.PSet(
131  nVertex=histDefinitions.nVertex.clone(),
132  ETvsET=histDefinitions.ETvsET.clone(),
133  PHIvsPHI=histDefinitions.PHIvsPHI.clone(),
134  # L1JetETvsCaloJetET_HB=histDefinitions.ETvsET.clone(
135  # name='L1JetETvsCaloJetET_HB',
136  # title='L1 Jet E_{T} vs Offline Jet E_{T} (HB); Offline Jet E_{T} (GeV); L1 Jet E_{T} (GeV)',
137  # )
138  ),
139 )
140 
141 # modifications for the pp reference run
142 jetEfficiencyThresholds_HI = [8, 16, 24, 44, 60, 80, 90]
143 jetEfficiencyBins_HI = []
144 jetEfficiencyBins_HI.extend(list(xrange(0, 60, 2)))
145 jetEfficiencyBins_HI.extend(list(xrange(60, 90, 5)))
146 jetEfficiencyBins_HI.extend(list(xrange(90, 120, 10)))
147 jetEfficiencyBins_HI.extend(list(xrange(120, 180, 20)))
148 jetEfficiencyBins_HI.extend(list(xrange(180, 300, 40)))
149 jetEfficiencyBins_HI.extend(list(xrange(300, 401, 100)))
150 
151 from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017
152 ppRef_2017.toModify(
153  l1tEtSumJetOfflineDQM,
154  TriggerFilter=cms.InputTag('hltEle20WPLoose1GsfTrackIsoFilter', '', 'HLT'),
155  TriggerPath=cms.string('HLT_Ele20_WPLoose_Gsf_v4'),
156  jetEfficiencyThresholds=cms.vdouble(jetEfficiencyThresholds_HI),
157  jetEfficiencyBins=cms.vdouble(jetEfficiencyBins_HI),
158 )
159 
160 # emulator module
161 l1tEtSumJetOfflineDQMEmu = l1tEtSumJetOfflineDQM.clone(
162  stage2CaloLayer2JetSource=cms.InputTag("simCaloStage2Digis"),
163  stage2CaloLayer2EtSumSource=cms.InputTag("simCaloStage2Digis"),
164 
165  histFolderEtSum=cms.string('L1TEMU/L1TObjects/L1TEtSum/L1TriggerVsReco'),
166  histFolderJet=cms.string('L1TEMU/L1TObjects/L1TJet/L1TriggerVsReco'),
167 )
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