CMS 3D CMS Logo

run3scouting_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi import simpleCandidateFlatTableProducer
4 
5 
7 
8 photonScoutingTable = cms.EDProducer("SimpleRun3ScoutingPhotonFlatTableProducer",
9  src = cms.InputTag("hltScoutingEgammaPacker"),
10  cut = cms.string(""),
11  name = cms.string("ScoutingPhoton"),
12  doc = cms.string("Photon scouting information"),
13  singleton = cms.bool(False),
14  extension = cms.bool(False),
15  variables = cms.PSet(
16  pt = Var('pt', 'float', precision=10, doc='super-cluster (SC) pt'),
17  eta = Var('eta', 'float', precision=10, doc='SC eta'),
18  phi = Var('phi', 'float', precision=10, doc='SC phi'),
19  m = Var('m', 'float', precision=10, doc='SC mass'),
20  sigmaIetaIeta = Var('sigmaIetaIeta', 'float', precision=10, doc='sigmaIetaIeta of the SC, calculated with full 5x5 region, noise cleaned'),
21  hOverE = Var('hOverE', 'float', precision=10, doc='Energy in HCAL / Energy in ECAL'),
22  ecalIso = Var('ecalIso', 'float', precision=10, doc='Isolation of SC in the ECAL'),
23  hcalIso = Var('hcalIso', 'float', precision=10, doc='Isolation of SC in the HCAL'),
24  r9 = Var('r9', 'float', precision=10, doc='Photon SC r9 as defined in https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideEgammaShowerShape'),
25  sMin = Var('sMin', 'float', precision=10, doc='minor moment of the SC shower shape'),
26  sMaj = Var('sMaj', 'float', precision=10, doc='major moment of the SC shower shape'),
27  seedId = Var('seedId', 'int', doc='ECAL ID of the SC seed'),
28  )
29 )
30 
31 electronScoutingTable = cms.EDProducer("SimpleRun3ScoutingElectronFlatTableProducer",
32  src = cms.InputTag("hltScoutingEgammaPacker"),
33  cut = cms.string(""),
34  name = cms.string("ScoutingElectron"),
35  doc = cms.string("Electron scouting information"),
36  singleton = cms.bool(False),
37  extension = cms.bool(False),
38  variables = cms.PSet(
39  pt = Var('pt', 'float', precision=10, doc='super-cluster (SC) pt'),
40  eta = Var('eta', 'float', precision=10, doc='SC eta'),
41  phi = Var('phi', 'float', precision=10, doc='SC phi'),
42  m = Var('m', 'float', precision=10, doc='SC mass'),
43  dEtaIn = Var('dEtaIn', 'float', precision=10, doc='#Delta#eta(SC seed, track pixel seed)'),
44  dPhiIn = Var('dPhiIn', 'float', precision=10, doc='#Delta#phi(SC seed, track pixel seed)'),
45  sigmaIetaIeta = Var('sigmaIetaIeta', 'float', precision=10, doc='sigmaIetaIeta of the SC, calculated with full 5x5 region, noise cleaned'),
46  hOverE = Var('hOverE', 'float', precision=10, doc='Energy in HCAL / Energy in ECAL'),
47  ooEMOop = Var('ooEMOop', 'float', precision=10, doc='1/E(SC) - 1/p(track momentum)'),
48  missingHits = Var('missingHits', 'int', doc='missing hits in the tracker'),
49  ecalIso = Var('ecalIso', 'float', precision=10, doc='Isolation of SC in the ECAL'),
50  hcalIso = Var('hcalIso', 'float', precision=10, doc='Isolation of SC in the HCAL'),
51  trackIso = Var('trackIso', 'float', precision=10, doc='Isolation of electron track in the tracker'),
52  r9 = Var('r9', 'float', precision=10, doc='ELectron SC r9 as defined in https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideEgammaShowerShape'),
53  sMin = Var('sMin', 'float', precision=10, doc='minor moment of the SC shower shape'),
54  sMaj = Var('sMaj', 'float', precision=10, doc='major moment of the SC shower shape'),
55  seedId = Var('seedId', 'int', doc='ECAL ID of the SC seed'),
56  )
57 )
58 
59 muonScoutingTable = cms.EDProducer("SimpleRun3ScoutingMuonFlatTableProducer",
60  src = cms.InputTag("hltScoutingMuonPacker"),
61  cut = cms.string(""),
62  name = cms.string("ScoutingMuon"),
63  doc = cms.string("Muon scouting information"),
64  singleton = cms.bool(False),
65  extension = cms.bool(False),
66  variables = cms.PSet(
67  pt = Var('pt', 'float', precision=10, doc='pt'),
68  eta = Var('eta', 'float', precision=10, doc='eta'),
69  phi = Var('phi', 'float', precision=10, doc='phi'),
70  m = Var('m', 'float', precision=10, doc='mass'),
71  type = Var('type', 'int', doc='type of muon'),
72  charge = Var('charge', 'int', doc='track charge'),
73  normchi2 = Var('normalizedChi2', 'float', precision=10, doc='normalized chi squared'),
74  ecalIso = Var('ecalIso', 'float', precision=10, doc='PF ECAL isolation'),
75  hcalIso = Var('hcalIso', 'float', precision=10, doc='PF HCAL isolation'),
76  trackIso = Var('trackIso', 'float', precision=10, doc='track isolation'),
77  nValidStandAloneMuonHits = Var('nValidStandAloneMuonHits', 'int', doc='number of valid standalone muon hits'),
78  nStandAloneMuonMatchedStations = Var('nStandAloneMuonMatchedStations', 'int', doc='number of muon stations with valid hits'),
79  nValidRecoMuonHits = Var('nValidRecoMuonHits', 'int', doc='number of valid reco muon hits'),
80  nRecoMuonChambers = Var('nRecoMuonChambers', 'int', doc='number of reco muon chambers'),
81  nRecoMuonChambersCSCorDT = Var('nRecoMuonChambersCSCorDT', 'int', doc='number of reco muon chambers CSC or DT'),
82  nRecoMuonMatches = Var('nRecoMuonMatches', 'int', doc='number of reco muon matches'),
83  nRecoMuonMatchedStations = Var('nRecoMuonMatchedStations', 'int', doc='number of reco muon matched stations'),
84  nRecoMuonExpectedMatchedStations = Var('nRecoMuonExpectedMatchedStations', 'int', doc='number of reco muon expected matched stations'),
85  recoMuonStationMask = Var('recoMuonStationMask', 'int', doc='reco muon station mask'),
86  nRecoMuonMatchedRPCLayers = Var('nRecoMuonMatchedRPCLayers', 'int', doc='number of reco muon matched RPC layers'),
87  recoMuonRPClayerMask = Var('recoMuonRPClayerMask', 'int', doc='reco muon RPC layer mask'),
88  nValidPixelHits = Var('nValidPixelHits', 'int', doc='number of valid pixel hits'),
89  nValidStripHits = Var('nValidStripHits', 'int', doc='number of valid strip hits'),
90  nPixelLayersWithMeasurement = Var('nPixelLayersWithMeasurement', 'int', doc='number of pixel layers with measurement'),
91  nTrackerLayersWithMeasurement = Var('nTrackerLayersWithMeasurement', 'int', doc='number of tracker layer with measurements'),
92  trk_chi2 = Var('trk_chi2', 'float', precision=10, doc='track chi squared'),
93  trk_ndof = Var('trk_ndof', 'float', precision=10, doc='track number of degrees of freedom'),
94  trk_dxy = Var('trk_dxy', 'float', precision=10, doc='track dxy'),
95  trk_dz = Var('trk_dz', 'float', precision=10, doc='track dz'),
96  trk_qoverp = Var('trk_qoverp', 'float', precision=10, doc='track qoverp'),
97  trk_lambda = Var('trk_lambda', 'float', precision=10, doc='track lambda'),
98  trk_pt = Var('trk_pt', 'float', precision=10, doc='track pt'),
99  trk_phi = Var('trk_phi', 'float', precision=10, doc='track phi'),
100  trk_eta = Var('trk_eta', 'float', precision=10, doc='track eta'),
101  trk_dxyError = Var('trk_dxyError', 'float', precision=10, doc='track dxyError'),
102  trk_dzError = Var('trk_dzError', 'float', precision=10, doc='tracl dzError'),
103  trk_qoverpError = Var('trk_qoverpError', 'float', precision=10, doc='track qoverpError'),
104  trk_lambdaError = Var('trk_lambdaError', 'float', precision=10, doc='track lambdaError'),
105  trk_phiError = Var('trk_phiError', 'float', precision=10, doc='track phiError'),
106  trk_dsz = Var('trk_dsz', 'float', precision=10, doc='track dsz'),
107  trk_dszError = Var('trk_dszError', 'float', precision=10, doc='track dszError'),
108  trk_qoverp_lambda_cov = Var('trk_qoverp_lambda_cov', 'float', precision=10, doc='track qoverp lambda covariance ((0,1) element of covariance matrix)'),
109  trk_qoverp_phi_cov = Var('trk_qoverp_phi_cov', 'float', precision=10, doc='track qoverp phi covariance ((0,2) element of covariance matrix)'),
110  trk_qoverp_dxy_cov = Var('trk_qoverp_dxy_cov', 'float', precision=10, doc='track qoverp dxy covariance ((0,3) element of covariance matrix)'),
111  trk_qoverp_dsz_cov = Var('trk_qoverp_dsz_cov', 'float', precision=10, doc='track qoverp dsz covariance ((0,4) element of covariance matrix)'),
112  trk_lambda_phi_cov = Var('trk_lambda_phi_cov', 'float', precision=10, doc='track lambda phi covariance ((1,2) element of covariance matrix)'),
113  trk_lambda_dxy_cov = Var('trk_lambda_dxy_cov', 'float', precision=10, doc='track lambda dxy covariance ((1,3) element of covariance matrix)'),
114  trk_lambda_dsz_cov = Var('trk_lambda_dsz_cov', 'float', precision=10, doc='track lambda dsz covariance ((1,4) element of covariance matrix)'),
115  trk_phi_dxy_cov = Var('trk_phi_dxy_cov', 'float', precision=10, doc='track phi dxy covariance ((2,3) element of covariance matrix)'),
116  trk_phi_dsz_cov = Var('trk_phi_dsz_cov', 'float', precision=10, doc='track phi dsz covariance ((2,4) element of covariance matrix)'),
117  trk_dxy_dsz_cov = Var('trk_dxy_dsz_cov', 'float', precision=10, doc='track dxy dsz covariance ((3,4) element of covariance matrix)'),
118  trk_vx = Var('trk_vx', 'float', precision=10, doc='track vx'),
119  trk_vy = Var('trk_vy', 'float', precision=10, doc='track vy'),
120  trk_vz = Var('trk_vz', 'float', precision=10, doc='track vz'),
121  )
122 )
123 
124 trackScoutingTable = cms.EDProducer("SimpleRun3ScoutingTrackFlatTableProducer",
125  src = cms.InputTag("hltScoutingTrackPacker"),
126  cut = cms.string(""),
127  name = cms.string("ScoutingTrack"),
128  doc = cms.string("Track scouting information"),
129  singleton = cms.bool(False),
130  extension = cms.bool(False),
131  variables = cms.PSet(
132  pt = Var('tk_pt', 'float', precision=10, doc='pt'),
133  eta = Var('tk_eta', 'float', precision=10, doc='eta'),
134  phi = Var('tk_phi', 'float', precision=10, doc='phi'),
135  chi2 = Var('tk_chi2', 'float', precision=10, doc='chi squared'),
136  ndof = Var('tk_ndof', 'float', precision=10, doc='number of degrees of freedom'),
137  charge = Var('tk_charge', 'int', doc='charge'),
138  dxy = Var('tk_dxy', 'float', precision=10, doc='dxy'),
139  dz = Var('tk_dz', 'float', precision=10, doc='dz'),
140  nValidPixelHits = Var('tk_nValidPixelHits', 'int', doc='number of valid pixel hits'),
141  nValidStripHits = Var('tk_nValidStripHits', 'int', doc='number of valid strip hits'),
142  nTrackerLayersWithMeasurement = Var('tk_nTrackerLayersWithMeasurement', 'int', doc='number of tracker layers with measurements'),
143  qoverp = Var('tk_qoverp', 'float', precision=10, doc='qoverp'),
144  _lambda = Var('tk_lambda', 'float', precision=10, doc='lambda'),
145  dxyError = Var('tk_dxy_Error', 'float', precision=10, doc='dxyError'),
146  dzError = Var('tk_dz_Error', 'float', precision=10, doc='dzError'),
147  qoverpError = Var('tk_qoverp_Error', 'float', precision=10, doc='qoverpError'),
148  lambdaError = Var('tk_lambda_Error', 'float', precision=10, doc='lambdaError'),
149  phiError = Var('tk_phi_Error', 'float', precision=10, doc='phiError'),
150  dsz = Var('tk_dsz', 'float', precision=10, doc='dsz'),
151  dszError = Var('tk_dsz_Error', 'float', precision=10, doc='dszError'),
152  qoverp_lambda_cov = Var('tk_qoverp_lambda_cov', 'float', precision=10, doc='qoverp lambda covariance ((0,1) element of covariance matrix)'),
153  qoverp_phi_cov = Var('tk_qoverp_phi_cov', 'float', precision=10, doc='qoverp phi covariance ((0,2) element of covariance matrix)'),
154  qoverp_dxy_cov = Var('tk_qoverp_dxy_cov', 'float', precision=10, doc='qoverp dxy covariance ((0,3) element of covariance matrix)'),
155  qoverp_dsz_cov = Var('tk_qoverp_dsz_cov', 'float', precision=10, doc='qoverp dsz covariance ((0,4) element of covariance matrix)'),
156  lambda_phi_cov = Var('tk_lambda_phi_cov', 'float', precision=10, doc='lambda phi covariance ((1,2) element of covariance matrix)'),
157  lambda_dxy_cov = Var('tk_lambda_dxy_cov', 'float', precision=10, doc='lambda dxy covariance ((1,3) element of covariance matrix)'),
158  lambda_dsz_cov = Var('tk_lambda_dsz_cov', 'float', precision=10, doc='lambd dsz covariance ((1,4) element of covariance matrix)'),
159  phi_dxy_cov = Var('tk_phi_dxy_cov', 'float', precision=10, doc='phi dxy covariance ((2,3) element of covariance matrix)'),
160  phi_dsz_cov = Var('tk_phi_dsz_cov', 'float', precision=10, doc='phi dsz covariance ((2,4) element of covariance matrix)'),
161  dxy_dsz_cov = Var('tk_dxy_dsz_cov', 'float', precision=10, doc='dxy dsz covariance ((3,4) element of covariance matrix)'),
162  vtxInd = Var('tk_vtxInd', 'int', doc='vertex index'),
163  vx = Var('tk_vx', 'float', precision=10, doc='vx'),
164  vy = Var('tk_vy', 'float', precision=10, doc='vy'),
165  vz = Var('tk_vz', 'float', precision=10, doc='vz'),
166  )
167 )
168 
169 primaryvertexScoutingTable = cms.EDProducer("SimpleRun3ScoutingVertexFlatTableProducer",
170  src = cms.InputTag("hltScoutingPrimaryVertexPacker", "primaryVtx"),
171  cut = cms.string(""),
172  name = cms.string("ScoutingPrimaryVertex"),
173  doc = cms.string("PrimaryVertex scouting information"),
174  singleton = cms.bool(False),
175  extension = cms.bool(False),
176  variables = cms.PSet(
177  x = Var('x', 'float', precision=10, doc='position x coordinate'),
178  y = Var('y', 'float', precision=10, doc='position y coordinate'),
179  z = Var('z', 'float', precision=10, doc='position z coordinate'),
180  xError = Var('xError', 'float', precision=10, doc='x error'),
181  yError = Var('yError', 'float', precision=10, doc='y error'),
182  zError = Var('zError', 'float', precision=10, doc='z error'),
183  tracksSize = Var('tracksSize', 'int', doc='number of tracks'),
184  chi2 = Var('chi2', 'float', precision=10, doc='chi squared'),
185  ndof = Var('ndof', 'int', doc='number of degrees of freedom'),
186  isValidVtx = Var('isValidVtx', 'bool', doc='is valid'),
187  )
188 )
189 
190 displacedvertexScoutingTable = cms.EDProducer("SimpleRun3ScoutingVertexFlatTableProducer",
191  src = cms.InputTag("hltScoutingMuonPacker","displacedVtx"),
192  cut = cms.string(""),
193  name = cms.string("ScoutingDisplacedVertex"),
194  doc = cms.string("DisplacedVertex scouting information"),
195  singleton = cms.bool(False),
196  extension = cms.bool(False),
197  variables = cms.PSet(
198  x = Var('x', 'float', precision=10, doc='position x coordinate'),
199  y = Var('y', 'float', precision=10, doc='position y coordinate'),
200  z = Var('z', 'float', precision=10, doc='position z coordinate'),
201  xError = Var('xError', 'float', precision=10, doc='x error'),
202  yError = Var('yError', 'float', precision=10, doc='y error'),
203  zError = Var('zError', 'float', precision=10, doc='z error'),
204  tracksSize = Var('tracksSize', 'int', doc='number of tracks'),
205  chi2 = Var('chi2', 'float', precision=10, doc='chi squared'),
206  ndof = Var('ndof', 'int', doc='number of degrees of freedom'),
207  isValidVtx = Var('isValidVtx', 'bool', doc='is valid'),
208  )
209 )
210 
211 rhoScoutingTable = cms.EDProducer("GlobalVariablesTableProducer",
212  name = cms.string(""),
213  variables = cms.PSet(
214  ScoutingRho = ExtVar( cms.InputTag("hltScoutingPFPacker", "rho"), "double", doc = "rho from all scouting PF Candidates, used e.g. for JECs" ),
215  )
216 )
217 
218 metScoutingTable = cms.EDProducer("GlobalVariablesTableProducer",
219  name = cms.string("ScoutingMET"),
220  variables = cms.PSet(
221  pt = ExtVar( cms.InputTag("hltScoutingPFPacker", "pfMetPt"), "double", doc = "scouting MET pt"),
222  phi = ExtVar( cms.InputTag("hltScoutingPFPacker", "pfMetPhi"), "double", doc = "scouting MET phi"),
223  )
224 )
225 
226 # from 2024, there are two scouting muon collections
227 
228 # muonVtx
229 muonVtxScoutingTable = muonScoutingTable.clone(
230  src = cms.InputTag("hltScoutingMuonPackerVtx"),
231  name = cms.string("ScoutingMuonVtx"),
232  doc = cms.string("Scouting Muon Vtx information"),
233 )
234 displacedvertexVtxScoutingTable = displacedvertexScoutingTable.clone(
235  src = cms.InputTag("hltScoutingMuonPackerVtx", "displacedVtx"),
236  name = cms.string("ScoutingMuonVtxDisplacedVertex"),
237  doc = cms.string("Scouting Muon Vtx DisplacedVertex information"),
238 )
239 
240 # muonNoVtx
241 muonNoVtxScoutingTable = muonScoutingTable.clone(
242  src = cms.InputTag("hltScoutingMuonPackerNoVtx"),
243  name = cms.string("ScoutingMuonNoVtx"),
244  doc = cms.string("Scouting Muon NoVtx information"),
245 )
246 displacedvertexNoVtxScoutingTable = displacedvertexScoutingTable.clone(
247  src = cms.InputTag("hltScoutingMuonPackerNoVtx", "displacedVtx"),
248  name = cms.string("ScoutingMuonNoVtxDisplacedVertex"),
249  doc = cms.string("Scouting Muon NoVtx DisplacedVertex information"),
250 )
251 
252 
254 
255 scoutingPFCands = cms.EDProducer(
256  "Run3ScoutingParticleToRecoPFCandidateProducer",
257  scoutingparticle=cms.InputTag("hltScoutingPFPacker"),
258 )
259 
260 particleScoutingTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
261  src = cms.InputTag("scoutingPFCands"),
262  name = cms.string("ScoutingParticle"),
263  cut = cms.string(""),
264  doc = cms.string("ScoutingParticle"),
265  singleton = cms.bool(False),
266  extension = cms.bool(False), # this is the main table
267  externalVariables = cms.PSet(
268  vertexIndex = ExtVar(cms.InputTag("scoutingPFCands", "vertexIndex"), int, doc="vertex index"),
269  trkNormchi2 = ExtVar(cms.InputTag("scoutingPFCands", "normchi2"), float, doc="normalized chi squared of best track", precision=6),
270  trkDz = ExtVar(cms.InputTag("scoutingPFCands", "dz"), float, doc="dz of best track", precision=6),
271  trkDxy = ExtVar(cms.InputTag("scoutingPFCands", "dxy"), float, doc="dxy of best track", precision=6),
272  trkDzsig = ExtVar(cms.InputTag("scoutingPFCands", "dzsig"), float, doc="dzsig of best track", precision=6),
273  trkDxysig = ExtVar(cms.InputTag("scoutingPFCands", "dxysig"), float, doc="dxysig of best track", precision=6),
274  trkLostInnerHits = ExtVar(cms.InputTag("scoutingPFCands", "lostInnerHits"), int, doc="lostInnerHits of best track"),
275  trkQuality = ExtVar(cms.InputTag("scoutingPFCands", "quality"), int, doc="quality of best track"),
276  trkPt = ExtVar(cms.InputTag("scoutingPFCands", "trkPt"), float, doc="pt of best track", precision=6),
277  trkEta = ExtVar(cms.InputTag("scoutingPFCands", "trkEta"), float, doc="eta of best track", precision=6),
278  trkPhi = ExtVar(cms.InputTag("scoutingPFCands", "trkPhi"), float, doc="phi of best track", precision=6),
279  ),
280  variables = cms.PSet(
281  CandVars,
282  ),
283  )
284 
285 
287 
288 from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets
289 ak4ScoutingJets = ak4PFJets.clone(
290  src = ("scoutingPFCands"),
291  jetPtMin = 20,
292 )
293 
294 ak4ScoutingJetParticleNetJetTagInfos = cms.EDProducer("DeepBoostedJetTagInfoProducer",
295  jet_radius = cms.double( 0.4 ),
296  min_jet_pt = cms.double( 5.0 ),
297  max_jet_eta = cms.double( 2.5 ),
298  min_pt_for_track_properties = cms.double( 0.95 ),
299  min_pt_for_pfcandidates = cms.double( 0.1 ),
300  use_puppiP4 = cms.bool( False ),
301  include_neutrals = cms.bool( True ),
302  sort_by_sip2dsig = cms.bool( False ),
303  min_puppi_wgt = cms.double( -1.0 ),
304  flip_ip_sign = cms.bool( False ),
305  sip3dSigMax = cms.double( -1.0 ),
306  use_hlt_features = cms.bool( False ),
307  pf_candidates = cms.InputTag( "scoutingPFCands" ),
308  jets = cms.InputTag( "ak4ScoutingJets" ),
309  puppi_value_map = cms.InputTag( "" ),
310  use_scouting_features = cms.bool( True ),
311  normchi2_value_map = cms.InputTag("scoutingPFCands", "normchi2"),
312  dz_value_map = cms.InputTag("scoutingPFCands", "dz"),
313  dxy_value_map = cms.InputTag("scoutingPFCands", "dxy"),
314  dzsig_value_map = cms.InputTag("scoutingPFCands", "dzsig"),
315  dxysig_value_map = cms.InputTag("scoutingPFCands", "dxysig"),
316  lostInnerHits_value_map = cms.InputTag("scoutingPFCands", "lostInnerHits"),
317  quality_value_map = cms.InputTag("scoutingPFCands", "quality"),
318  trkPt_value_map = cms.InputTag("scoutingPFCands", "trkPt"),
319  trkEta_value_map = cms.InputTag("scoutingPFCands", "trkEta"),
320  trkPhi_value_map = cms.InputTag("scoutingPFCands", "trkPhi"),
321 )
322 
323 from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer
324 
325 ak4ScoutingJetParticleNetJetTags = cms.EDProducer("BoostedJetONNXJetTagsProducer",
326  jets = cms.InputTag("ak4ScoutingJets"),
327  produceValueMap = cms.untracked.bool(True),
328  src = cms.InputTag("ak4ScoutingJetParticleNetJetTagInfos"),
329  preprocess_json = cms.string("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK4/V00/preprocess.json"),
330  model_path = cms.FileInPath("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK4/V00/particle-net.onnx"),
331  flav_names = cms.vstring(["probb", "probbb","probc", "probcc", "probuds", "probg", "probundef"]),
332  debugMode = cms.untracked.bool(False),
333 )
334 
335 ak4ScoutingJetTable = cms.EDProducer("SimplePFJetFlatTableProducer",
336  src = cms.InputTag("ak4ScoutingJets"),
337  name = cms.string("ScoutingJet"),
338  cut = cms.string(""),
339  doc = cms.string("ScoutingJet"),
340  singleton = cms.bool(False),
341  extension = cms.bool(False), # this is the main table
342  externalVariables = cms.PSet(
343  particleNet_prob_b = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probb'), float, doc="ParticleNet probability of b", precision=10),
344  particleNet_prob_bb = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probbb'), float, doc="ParticleNet probability of bb", precision=10),
345  particleNet_prob_c = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probc'), float, doc="ParticleNet probability of c", precision=10),
346  particleNet_prob_cc = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probcc'), float, doc="ParticleNet probability of cc", precision=10),
347  particlenet_prob_uds = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probuds'), float, doc="particlenet probability of uds", precision=10),
348  particleNet_prob_g = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probg'), float, doc="ParticleNet probability of g", precision=10),
349  particleNet_prob_undef = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probundef'), float, doc="ParticleNet probability of undef", precision=10),
350  ),
351  variables = cms.PSet(
352  P4Vars,
353  area = Var("jetArea()", float, doc="jet catchment area, for JECs",precision=10),
354  chHEF = Var("chargedHadronEnergy()/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="charged Hadron Energy Fraction", precision= 6),
355  neHEF = Var("neutralHadronEnergy()/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="neutral Hadron Energy Fraction", precision= 6),
356  chEmEF = Var("(electronEnergy()+muonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="charged Electromagnetic Energy Fraction", precision= 6),
357  neEmEF = Var("(photonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="neutral Electromagnetic Energy Fraction", precision= 6),
358  muEF = Var("(muonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="muon Energy Fraction", precision= 6),
359  nCh = Var("chargedHadronMultiplicity()", int, doc="number of charged hadrons in the jet"),
360  nNh = Var("neutralHadronMultiplicity()", int, doc="number of neutral hadrons in the jet"),
361  nMuons = Var("muonMultiplicity()", int, doc="number of muons in the jet"),
362  nElectrons = Var("electronMultiplicity()", int, doc="number of electrons in the jet"),
363  nPhotons = Var("photonMultiplicity()", int, doc="number of photons in the jet"),
364  nConstituents = Var("numberOfDaughters()", "uint8", doc="number of particles in the jet")
365  ),
366 )
367 
368 ak4ScoutingJetMatchGen = cms.EDProducer("RecoJetToGenJetDeltaRValueMapProducer",
369  src = cms.InputTag("ak4ScoutingJets"),
370  matched = cms.InputTag("slimmedGenJets"),
371  distMax = cms.double(0.4),
372  value = cms.string("index"),
373  )
374 
375 ak4ScoutingJetExtTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
376  src = cms.InputTag("ak4ScoutingJets"),
377  name = cms.string("ScoutingJet"),
378  cut = cms.string(""),
379  singleton = cms.bool(False),
380  extension = cms.bool(True),
381  externalVariables = cms.PSet(
382  genJetIdx = ExtVar(cms.InputTag("ak4ScoutingJetMatchGen"), int, doc="gen jet idx"),
383  ),
384  variables = cms.PSet(),
385  )
386 
387 
389 
390 ak8ScoutingJets = ak4PFJets.clone(
391  src = ("scoutingPFCands"),
392  rParam = 0.8,
393  jetPtMin = 170.0,
394 )
395 
396 ak8ScoutingJetsSoftDrop = ak4PFJets.clone(
397  src = ("scoutingPFCands"),
398  rParam = 0.8,
399  jetPtMin = 170.0,
400  useSoftDrop = cms.bool(True),
401  zcut = cms.double(0.1),
402  beta = cms.double(0.0),
403  R0 = cms.double(0.8),
404  useExplicitGhosts = cms.bool(True),
405  writeCompound = cms.bool(True),
406  jetCollInstanceName=cms.string("SubJets"),
407  )
408 
409 ak8ScoutingJetsSoftDropMass = cms.EDProducer("RecoJetDeltaRValueMapProducer",
410  src = cms.InputTag("ak8ScoutingJets"),
411  matched = cms.InputTag("ak8ScoutingJetsSoftDrop"),
412  distMax = cms.double(0.8),
413  value = cms.string('mass')
414  )
415 
416 from RecoJets.JetProducers.ECF_cff import ecfNbeta1
417 ak8ScoutingJetEcfNbeta1 = ecfNbeta1.clone(src = cms.InputTag("ak8ScoutingJets"), srcWeights="")
418 
419 from RecoJets.JetProducers.nJettinessAdder_cfi import Njettiness
420 ak8ScoutingJetNjettiness = Njettiness.clone(src = cms.InputTag("ak8ScoutingJets"), srcWeights="")
421 
422 ak8ScoutingJetParticleNetJetTagInfos = cms.EDProducer("DeepBoostedJetTagInfoProducer",
423  jet_radius = cms.double( 0.8 ),
424  min_jet_pt = cms.double( 50 ),
425  max_jet_eta = cms.double( 2.5 ),
426  min_pt_for_track_properties = cms.double( 0.95 ),
427  min_pt_for_pfcandidates = cms.double( 0.1 ),
428  use_puppiP4 = cms.bool( False ),
429  include_neutrals = cms.bool( True ),
430  sort_by_sip2dsig = cms.bool( False ),
431  min_puppi_wgt = cms.double( -1.0 ),
432  flip_ip_sign = cms.bool( False ),
433  sip3dSigMax = cms.double( -1.0 ),
434  use_hlt_features = cms.bool( False ),
435  pf_candidates = cms.InputTag( "scoutingPFCands" ),
436  jets = cms.InputTag( "ak8ScoutingJets" ),
437  puppi_value_map = cms.InputTag( "" ),
438  use_scouting_features = cms.bool( True ),
439  normchi2_value_map = cms.InputTag("scoutingPFCands", "normchi2"),
440  dz_value_map = cms.InputTag("scoutingPFCands", "dz"),
441  dxy_value_map = cms.InputTag("scoutingPFCands", "dxy"),
442  dzsig_value_map = cms.InputTag("scoutingPFCands", "dzsig"),
443  dxysig_value_map = cms.InputTag("scoutingPFCands", "dxysig"),
444  lostInnerHits_value_map = cms.InputTag("scoutingPFCands", "lostInnerHits"),
445  quality_value_map = cms.InputTag("scoutingPFCands", "quality"),
446  trkPt_value_map = cms.InputTag("scoutingPFCands", "trkPt"),
447  trkEta_value_map = cms.InputTag("scoutingPFCands", "trkEta"),
448  trkPhi_value_map = cms.InputTag("scoutingPFCands", "trkPhi"),
449  )
450 
451 from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer
452 ak8ScoutingJetParticleNetJetTags = cms.EDProducer("BoostedJetONNXJetTagsProducer",
453  jets = cms.InputTag("ak8ScoutingJets"),
454  produceValueMap = cms.untracked.bool(True),
455  src = cms.InputTag("ak8ScoutingJetParticleNetJetTagInfos"),
456  preprocess_json = cms.string("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/General/V00/preprocess.json"),
457  model_path = cms.FileInPath("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/General/V00/particle-net.onnx"),
458  flav_names = cms.vstring(["probHbb", "probHcc","probHqq", "probQCDall"]),
459  debugMode = cms.untracked.bool(False),
460  )
461 
462 ak8ScoutingJetParticleNetMassRegressionJetTags = cms.EDProducer("BoostedJetONNXJetTagsProducer",
463  jets = cms.InputTag("ak8ScoutingJets"),
464  produceValueMap = cms.untracked.bool(True),
465  src = cms.InputTag("ak8ScoutingJetParticleNetJetTagInfos"),
466  preprocess_json = cms.string("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/MassRegression/V00/preprocess.json"),
467  model_path = cms.FileInPath("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/MassRegression/V00/particle-net.onnx"),
468  flav_names = cms.vstring(["mass"]),
469  debugMode = cms.untracked.bool(False),
470  )
471 
472 ak8ScoutingJetTable = cms.EDProducer("SimplePFJetFlatTableProducer",
473  src = cms.InputTag("ak8ScoutingJets"),
474  name = cms.string("ScoutingFatJet"),
475  cut = cms.string(""),
476  doc = cms.string("ScoutingFatJet"),
477  singleton = cms.bool(False),
478  extension = cms.bool(False), # this is the main table
479  externalVariables = cms.PSet(
480  #genJetAK8Idx = ExtVar(cms.InputTag("ak8ScoutingJetMatchGen"), int, doc="gen jet idx"),
481  msoftdrop = ExtVar(cms.InputTag('ak8ScoutingJetsSoftDropMass'), float, doc="Softdrop mass", precision=10),
482  n2b1 = ExtVar(cms.InputTag('ak8ScoutingJetEcfNbeta1:ecfN2'), float, doc="N2 with beta=1", precision=10),
483  n3b1 = ExtVar(cms.InputTag('ak8ScoutingJetEcfNbeta1:ecfN3'), float, doc="N3 with beta=1", precision=10),
484  tau1 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau1'), float, doc="Nsubjettiness (1 axis)", precision=10),
485  tau2 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau2'), float, doc="Nsubjettiness (2 axis)", precision=10),
486  tau3 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau3'), float, doc="Nsubjettiness (3 axis)", precision=10),
487  tau4 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau4'), float, doc="Nsubjettiness (4 axis)", precision=10),
488  particleNet_mass = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetMassRegressionJetTags:mass'), float, doc="ParticleNet regressed mass", precision=10),
489  particleNet_prob_Hbb = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHbb'), float, doc="ParticleNet probability of Hbb", precision=10),
490  particleNet_prob_Hcc = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHcc'), float, doc="ParticleNet probability of Hcc", precision=10),
491  particleNet_prob_Hqq = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHqq'), float, doc="ParticleNet probability of Hqq", precision=10),
492  particleNet_prob_QCD = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probQCDall'), float, doc="ParticleNet probability of QCD", precision=10),
493  ),
494  variables = cms.PSet(
495  P4Vars,
496  area = Var("jetArea()", float, doc="jet catchment area, for JECs",precision=10),
497  chHEF = Var("chargedHadronEnergy()/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="charged Hadron Energy Fraction", precision= 6),
498  neHEF = Var("neutralHadronEnergy()/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="neutral Hadron Energy Fraction", precision= 6),
499  chEmEF = Var("(electronEnergy()+muonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="charged Electromagnetic Energy Fraction", precision= 6),
500  neEmEF = Var("(photonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="neutral Electromagnetic Energy Fraction", precision= 6),
501  muEF = Var("(muonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="muon Energy Fraction", precision= 6),
502  nCh = Var("chargedHadronMultiplicity()", int, doc="number of charged hadrons in the jet"),
503  nNh = Var("neutralHadronMultiplicity()", int, doc="number of neutral hadrons in the jet"),
504  nMuons = Var("muonMultiplicity()", int, doc="number of muons in the jet"),
505  nElectrons = Var("electronMultiplicity()", int, doc="number of electrons in the jet"),
506  nPhotons = Var("photonMultiplicity()", int, doc="number of photons in the jet"),
507  nConstituents = Var("numberOfDaughters()", "uint8", doc="number of particles in the jet")
508  ),
509  )
510 
511 ak8ScoutingJetMatchGen = cms.EDProducer("RecoJetToGenJetDeltaRValueMapProducer",
512  src = cms.InputTag("ak8ScoutingJets"),
513  matched = cms.InputTag("slimmedGenJetsAK8"),
514  distMax = cms.double(0.8),
515  value = cms.string("index"),
516  )
517 
518 ak8ScoutingJetExtTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
519  src = cms.InputTag("ak8ScoutingJets"),
520  name = cms.string("ScoutingFatJet"),
521  cut = cms.string(""),
522  singleton = cms.bool(False),
523  extension = cms.bool(True),
524  externalVariables = cms.PSet(
525  genJetAK8Idx = ExtVar(cms.InputTag("ak8ScoutingJetMatchGen"), int, doc="gen jet idx"),
526  ),
527  variables = cms.PSet(),
528  )
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17
def ExtVar(tag, valtype, doc=None, precision=-1)
Definition: common_cff.py:28