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 
228 
229 scoutingPFCands = cms.EDProducer(
230  "Run3ScoutingParticleToRecoPFCandidateProducer",
231  scoutingparticle=cms.InputTag("hltScoutingPFPacker"),
232 )
233 
234 particleScoutingTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
235  src = cms.InputTag("scoutingPFCands"),
236  name = cms.string("ScoutingParticle"),
237  cut = cms.string(""),
238  doc = cms.string("ScoutingParticle"),
239  singleton = cms.bool(False),
240  extension = cms.bool(False), # this is the main table
241  externalVariables = cms.PSet(
242  vertexIndex = ExtVar(cms.InputTag("scoutingPFCands", "vertexIndex"), int, doc="vertex index"),
243  trkNormchi2 = ExtVar(cms.InputTag("scoutingPFCands", "normchi2"), float, doc="normalized chi squared of best track", precision=6),
244  trkDz = ExtVar(cms.InputTag("scoutingPFCands", "dz"), float, doc="dz of best track", precision=6),
245  trkDxy = ExtVar(cms.InputTag("scoutingPFCands", "dxy"), float, doc="dxy of best track", precision=6),
246  trkDzsig = ExtVar(cms.InputTag("scoutingPFCands", "dzsig"), float, doc="dzsig of best track", precision=6),
247  trkDxysig = ExtVar(cms.InputTag("scoutingPFCands", "dxysig"), float, doc="dxysig of best track", precision=6),
248  trkLostInnerHits = ExtVar(cms.InputTag("scoutingPFCands", "lostInnerHits"), int, doc="lostInnerHits of best track"),
249  trkQuality = ExtVar(cms.InputTag("scoutingPFCands", "quality"), int, doc="quality of best track"),
250  trkPt = ExtVar(cms.InputTag("scoutingPFCands", "trkPt"), float, doc="pt of best track", precision=6),
251  trkEta = ExtVar(cms.InputTag("scoutingPFCands", "trkEta"), float, doc="eta of best track", precision=6),
252  trkPhi = ExtVar(cms.InputTag("scoutingPFCands", "trkPhi"), float, doc="phi of best track", precision=6),
253  ),
254  variables = cms.PSet(
255  CandVars,
256  ),
257  )
258 
259 
261 
262 from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets
263 ak4ScoutingJets = ak4PFJets.clone(
264  src = ("scoutingPFCands"),
265  jetPtMin = 20,
266 )
267 
268 ak4ScoutingJetParticleNetJetTagInfos = cms.EDProducer("DeepBoostedJetTagInfoProducer",
269  jet_radius = cms.double( 0.4 ),
270  min_jet_pt = cms.double( 5.0 ),
271  max_jet_eta = cms.double( 2.5 ),
272  min_pt_for_track_properties = cms.double( 0.95 ),
273  min_pt_for_pfcandidates = cms.double( 0.1 ),
274  use_puppiP4 = cms.bool( False ),
275  include_neutrals = cms.bool( True ),
276  sort_by_sip2dsig = cms.bool( False ),
277  min_puppi_wgt = cms.double( -1.0 ),
278  flip_ip_sign = cms.bool( False ),
279  sip3dSigMax = cms.double( -1.0 ),
280  use_hlt_features = cms.bool( False ),
281  pf_candidates = cms.InputTag( "scoutingPFCands" ),
282  jets = cms.InputTag( "ak4ScoutingJets" ),
283  puppi_value_map = cms.InputTag( "" ),
284  use_scouting_features = cms.bool( True ),
285  normchi2_value_map = cms.InputTag("scoutingPFCands", "normchi2"),
286  dz_value_map = cms.InputTag("scoutingPFCands", "dz"),
287  dxy_value_map = cms.InputTag("scoutingPFCands", "dxy"),
288  dzsig_value_map = cms.InputTag("scoutingPFCands", "dzsig"),
289  dxysig_value_map = cms.InputTag("scoutingPFCands", "dxysig"),
290  lostInnerHits_value_map = cms.InputTag("scoutingPFCands", "lostInnerHits"),
291  quality_value_map = cms.InputTag("scoutingPFCands", "quality"),
292  trkPt_value_map = cms.InputTag("scoutingPFCands", "trkPt"),
293  trkEta_value_map = cms.InputTag("scoutingPFCands", "trkEta"),
294  trkPhi_value_map = cms.InputTag("scoutingPFCands", "trkPhi"),
295 )
296 
297 from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer
298 
299 ak4ScoutingJetParticleNetJetTags = cms.EDProducer("BoostedJetONNXJetTagsProducer",
300  jets = cms.InputTag("ak4ScoutingJets"),
301  produceValueMap = cms.untracked.bool(True),
302  src = cms.InputTag("ak4ScoutingJetParticleNetJetTagInfos"),
303  preprocess_json = cms.string("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK4/V00/preprocess.json"),
304  model_path = cms.FileInPath("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK4/V00/particle-net.onnx"),
305  flav_names = cms.vstring(["probb", "probbb","probc", "probcc", "probuds", "probg", "probundef"]),
306  debugMode = cms.untracked.bool(False),
307 )
308 
309 ak4ScoutingJetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
310  src = cms.InputTag("ak4ScoutingJets"),
311  name = cms.string("ScoutingJet"),
312  cut = cms.string(""),
313  doc = cms.string("ScoutingJet"),
314  singleton = cms.bool(False),
315  extension = cms.bool(False), # this is the main table
316  externalVariables = cms.PSet(
317  particleNet_prob_b = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probb'), float, doc="ParticleNet probability of b", precision=10),
318  particleNet_prob_bb = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probbb'), float, doc="ParticleNet probability of bb", precision=10),
319  particleNet_prob_c = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probc'), float, doc="ParticleNet probability of c", precision=10),
320  particleNet_prob_cc = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probcc'), float, doc="ParticleNet probability of cc", precision=10),
321  particlenet_prob_uds = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probuds'), float, doc="particlenet probability of uds", precision=10),
322  particleNet_prob_g = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probg'), float, doc="ParticleNet probability of g", precision=10),
323  particleNet_prob_undef = ExtVar(cms.InputTag('ak4ScoutingJetParticleNetJetTags:probundef'), float, doc="ParticleNet probability of undef", precision=10),
324  ),
325  variables = cms.PSet(
326  P4Vars,
327  area = Var("jetArea()", float, doc="jet catchment area, for JECs",precision=10),
328  chHEF = Var("chargedHadronEnergy()/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="charged Hadron Energy Fraction", precision= 6),
329  neHEF = Var("neutralHadronEnergy()/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="neutral Hadron Energy Fraction", precision= 6),
330  chEmEF = Var("(electronEnergy()+muonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="charged Electromagnetic Energy Fraction", precision= 6),
331  neEmEF = Var("(photonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="neutral Electromagnetic Energy Fraction", precision= 6),
332  muEF = Var("(muonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="muon Energy Fraction", precision= 6),
333  nCh = Var("chargedHadronMultiplicity()", int, doc="number of charged hadrons in the jet"),
334  nNh = Var("neutralHadronMultiplicity()", int, doc="number of neutral hadrons in the jet"),
335  nMuons = Var("muonMultiplicity()", int, doc="number of muons in the jet"),
336  nElectrons = Var("electronMultiplicity()", int, doc="number of electrons in the jet"),
337  nPhotons = Var("photonMultiplicity()", int, doc="number of photons in the jet"),
338  nConstituents = Var("numberOfDaughters()", "uint8", doc="number of particles in the jet")
339  ),
340 )
341 
342 ak4ScoutingJetMatchGen = cms.EDProducer("RecoJetToGenJetDeltaRValueMapProducer",
343  src = cms.InputTag("ak4ScoutingJets"),
344  matched = cms.InputTag("slimmedGenJets"),
345  distMax = cms.double(0.4),
346  value = cms.string("index"),
347  )
348 
349 ak4ScoutingJetExtTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
350  src = cms.InputTag("ak4ScoutingJets"),
351  name = cms.string("ScoutingJet"),
352  cut = cms.string(""),
353  singleton = cms.bool(False),
354  extension = cms.bool(True),
355  externalVariables = cms.PSet(
356  genJetIdx = ExtVar(cms.InputTag("ak4ScoutingJetMatchGen"), int, doc="gen jet idx"),
357  ),
358  variables = cms.PSet(),
359  )
360 
361 
363 
364 ak8ScoutingJets = ak4PFJets.clone(
365  src = ("scoutingPFCands"),
366  rParam = 0.8,
367  jetPtMin = 170.0,
368 )
369 
370 ak8ScoutingJetsSoftDrop = ak4PFJets.clone(
371  src = ("scoutingPFCands"),
372  rParam = 0.8,
373  jetPtMin = 170.0,
374  useSoftDrop = cms.bool(True),
375  zcut = cms.double(0.1),
376  beta = cms.double(0.0),
377  R0 = cms.double(0.8),
378  useExplicitGhosts = cms.bool(True),
379  writeCompound = cms.bool(True),
380  jetCollInstanceName=cms.string("SubJets"),
381  )
382 
383 ak8ScoutingJetsSoftDropMass = cms.EDProducer("RecoJetDeltaRValueMapProducer",
384  src = cms.InputTag("ak8ScoutingJets"),
385  matched = cms.InputTag("ak8ScoutingJetsSoftDrop"),
386  distMax = cms.double(0.8),
387  value = cms.string('mass')
388  )
389 
390 from RecoJets.JetProducers.ECF_cff import ecfNbeta1
391 ak8ScoutingJetEcfNbeta1 = ecfNbeta1.clone(src = cms.InputTag("ak8ScoutingJets"), srcWeights="")
392 
393 from RecoJets.JetProducers.nJettinessAdder_cfi import Njettiness
394 ak8ScoutingJetNjettiness = Njettiness.clone(src = cms.InputTag("ak8ScoutingJets"), srcWeights="")
395 
396 ak8ScoutingJetParticleNetJetTagInfos = cms.EDProducer("DeepBoostedJetTagInfoProducer",
397  jet_radius = cms.double( 0.8 ),
398  min_jet_pt = cms.double( 50 ),
399  max_jet_eta = cms.double( 2.5 ),
400  min_pt_for_track_properties = cms.double( 0.95 ),
401  min_pt_for_pfcandidates = cms.double( 0.1 ),
402  use_puppiP4 = cms.bool( False ),
403  include_neutrals = cms.bool( True ),
404  sort_by_sip2dsig = cms.bool( False ),
405  min_puppi_wgt = cms.double( -1.0 ),
406  flip_ip_sign = cms.bool( False ),
407  sip3dSigMax = cms.double( -1.0 ),
408  use_hlt_features = cms.bool( False ),
409  pf_candidates = cms.InputTag( "scoutingPFCands" ),
410  jets = cms.InputTag( "ak8ScoutingJets" ),
411  puppi_value_map = cms.InputTag( "" ),
412  use_scouting_features = cms.bool( True ),
413  normchi2_value_map = cms.InputTag("scoutingPFCands", "normchi2"),
414  dz_value_map = cms.InputTag("scoutingPFCands", "dz"),
415  dxy_value_map = cms.InputTag("scoutingPFCands", "dxy"),
416  dzsig_value_map = cms.InputTag("scoutingPFCands", "dzsig"),
417  dxysig_value_map = cms.InputTag("scoutingPFCands", "dxysig"),
418  lostInnerHits_value_map = cms.InputTag("scoutingPFCands", "lostInnerHits"),
419  quality_value_map = cms.InputTag("scoutingPFCands", "quality"),
420  trkPt_value_map = cms.InputTag("scoutingPFCands", "trkPt"),
421  trkEta_value_map = cms.InputTag("scoutingPFCands", "trkEta"),
422  trkPhi_value_map = cms.InputTag("scoutingPFCands", "trkPhi"),
423  )
424 
425 from RecoBTag.ONNXRuntime.boostedJetONNXJetTagsProducer_cfi import boostedJetONNXJetTagsProducer
426 ak8ScoutingJetParticleNetJetTags = cms.EDProducer("BoostedJetONNXJetTagsProducer",
427  jets = cms.InputTag("ak8ScoutingJets"),
428  produceValueMap = cms.untracked.bool(True),
429  src = cms.InputTag("ak8ScoutingJetParticleNetJetTagInfos"),
430  preprocess_json = cms.string("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/General/V00/preprocess.json"),
431  model_path = cms.FileInPath("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/General/V00/particle-net.onnx"),
432  flav_names = cms.vstring(["probHbb", "probHcc","probHqq", "probQCDall"]),
433  debugMode = cms.untracked.bool(False),
434  )
435 
436 ak8ScoutingJetParticleNetMassRegressionJetTags = cms.EDProducer("BoostedJetONNXJetTagsProducer",
437  jets = cms.InputTag("ak8ScoutingJets"),
438  produceValueMap = cms.untracked.bool(True),
439  src = cms.InputTag("ak8ScoutingJetParticleNetJetTagInfos"),
440  preprocess_json = cms.string("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/MassRegression/V00/preprocess.json"),
441  model_path = cms.FileInPath("RecoBTag/Combined/data/Run3Scouting/ParticleNetAK8/MassRegression/V00/particle-net.onnx"),
442  flav_names = cms.vstring(["mass"]),
443  debugMode = cms.untracked.bool(False),
444  )
445 
446 ak8ScoutingJetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
447  src = cms.InputTag("ak8ScoutingJets"),
448  name = cms.string("ScoutingFatJet"),
449  cut = cms.string(""),
450  doc = cms.string("ScoutingFatJet"),
451  singleton = cms.bool(False),
452  extension = cms.bool(False), # this is the main table
453  externalVariables = cms.PSet(
454  #genJetAK8Idx = ExtVar(cms.InputTag("ak8ScoutingJetMatchGen"), int, doc="gen jet idx"),
455  msoftdrop = ExtVar(cms.InputTag('ak8ScoutingJetsSoftDropMass'), float, doc="Softdrop mass", precision=10),
456  n2b1 = ExtVar(cms.InputTag('ak8ScoutingJetEcfNbeta1:ecfN2'), float, doc="N2 with beta=1", precision=10),
457  n3b1 = ExtVar(cms.InputTag('ak8ScoutingJetEcfNbeta1:ecfN3'), float, doc="N3 with beta=1", precision=10),
458  tau1 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau1'), float, doc="Nsubjettiness (1 axis)", precision=10),
459  tau2 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau2'), float, doc="Nsubjettiness (2 axis)", precision=10),
460  tau3 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau3'), float, doc="Nsubjettiness (3 axis)", precision=10),
461  tau4 = ExtVar(cms.InputTag('ak8ScoutingJetNjettiness:tau4'), float, doc="Nsubjettiness (4 axis)", precision=10),
462  particleNet_mass = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetMassRegressionJetTags:mass'), float, doc="ParticleNet regressed mass", precision=10),
463  particleNet_prob_Hbb = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHbb'), float, doc="ParticleNet probability of Hbb", precision=10),
464  particleNet_prob_Hcc = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHcc'), float, doc="ParticleNet probability of Hcc", precision=10),
465  particleNet_prob_Hqq = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probHqq'), float, doc="ParticleNet probability of Hqq", precision=10),
466  particleNet_prob_QCD = ExtVar(cms.InputTag('ak8ScoutingJetParticleNetJetTags:probQCDall'), float, doc="ParticleNet probability of QCD", precision=10),
467  ),
468  variables = cms.PSet(
469  P4Vars,
470  area = Var("jetArea()", float, doc="jet catchment area, for JECs",precision=10),
471  chHEF = Var("chargedHadronEnergy()/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="charged Hadron Energy Fraction", precision= 6),
472  neHEF = Var("neutralHadronEnergy()/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="neutral Hadron Energy Fraction", precision= 6),
473  chEmEF = Var("(electronEnergy()+muonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="charged Electromagnetic Energy Fraction", precision= 6),
474  neEmEF = Var("(photonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="neutral Electromagnetic Energy Fraction", precision= 6),
475  muEF = Var("(muonEnergy())/(chargedHadronEnergy()+neutralHadronEnergy()+photonEnergy()+electronEnergy()+muonEnergy())", float, doc="muon Energy Fraction", precision= 6),
476  nCh = Var("chargedHadronMultiplicity()", int, doc="number of charged hadrons in the jet"),
477  nNh = Var("neutralHadronMultiplicity()", int, doc="number of neutral hadrons in the jet"),
478  nMuons = Var("muonMultiplicity()", int, doc="number of muons in the jet"),
479  nElectrons = Var("electronMultiplicity()", int, doc="number of electrons in the jet"),
480  nPhotons = Var("photonMultiplicity()", int, doc="number of photons in the jet"),
481  nConstituents = Var("numberOfDaughters()", "uint8", doc="number of particles in the jet")
482  ),
483  )
484 
485 ak8ScoutingJetMatchGen = cms.EDProducer("RecoJetToGenJetDeltaRValueMapProducer",
486  src = cms.InputTag("ak8ScoutingJets"),
487  matched = cms.InputTag("slimmedGenJetsAK8"),
488  distMax = cms.double(0.8),
489  value = cms.string("index"),
490  )
491 
492 ak8ScoutingJetExtTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
493  src = cms.InputTag("ak8ScoutingJets"),
494  name = cms.string("ScoutingFatJet"),
495  cut = cms.string(""),
496  singleton = cms.bool(False),
497  extension = cms.bool(True),
498  externalVariables = cms.PSet(
499  genJetAK8Idx = ExtVar(cms.InputTag("ak8ScoutingJetMatchGen"), int, doc="gen jet idx"),
500  ),
501  variables = cms.PSet(),
502  )
def ExtVar(tag, valtype, doc=None, precision=-1)
Definition: common_cff.py:27
def Var(expr, valtype, doc=None, precision=-1)
Definition: common_cff.py:16