23 thinPassFlagsList = []
24 finalCandidateList = []
26 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import (
27 BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg,
28 BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg,
30 from JpsiUpsilonTools.JpsiUpsilonToolsConfig
import PrimaryVertexRefittingToolCfg
31 acc = ComponentAccumulator()
32 isSimulation = flags.Input.isMC
33 V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
34 vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName))
35 acc.addPublicTool(vkalvrt)
36 acc.addPublicTool(V0Tools)
37 trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
38 acc.addPublicTool(trackselect)
39 vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
40 acc.addPublicTool(vpest)
41 PVrefit = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags))
42 acc.addPublicTool(PVrefit)
44 bSkim =
"(count(BPHY24JpsimmKshortCascadeSV1.Bd_mass) + count(BPHY24JpsieeKshortCascadeSV1.Bd_mass)) > 0"
46 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import (
47 xAODStringSkimmingToolCfg)
48 BPHY24_Skim_Bcandidates = acc.getPrimaryAndMerge(xAODStringSkimmingToolCfg(
49 flags, name =
"BPHY24_Skim_Bcandidates", expression = bSkim ))
50 skimList += [ BPHY24_Skim_Bcandidates ]
52 BPHY24_AugOriginalCounts = acc.popToolsAndMerge(
53 AugOriginalCountsCfg(flags, name =
"BPHY24_AugOriginalCounts"))
54 augsList += [ BPHY24_AugOriginalCounts ]
56 mainIDInput =
"InDetTrackParticles"
57 originalTrackCond = [
"InDetTrackParticles",
"GSFTrackParticles"]
58 if flags.Tracking.doLargeD0:
60 from DerivationFrameworkInDet.InDetToolsConfig
import InDetLRTMergeCfg
61 acc.merge(InDetLRTMergeCfg(flags))
63 mainIDInput =
"InDetWithLRTTrackParticles"
64 originalTrackCond += [
"InDetLargeD0TrackParticles"]
66 BPHY24_Finder_DiMuon = CompFactory.Analysis.JpsiFinder( name =
"BPHY24_Finder_DiMuon",
69 TrackAndTrack =
False,
71 muonThresholdPt = 3000.,
76 oppChargesOnly =
False,
77 allChargeCombinations =
True,
78 atLeastOneComb =
True,
79 useCombinedMeasurement =
False,
80 muonCollectionKey =
"Muons",
81 TrackParticleCollection =
"InDetTrackParticles",
82 TrkVertexFitterTool = vkalvrt,
83 TrackSelectorTool = trackselect,
84 VertexPointEstimator = vpest,
88 BPHY24_SelectAndWrite_DiMuon = CompFactory.DerivationFramework.Reco_mumu( name =
"BPHY24_SelectAndWrite_DiMuon",
89 JpsiFinder = BPHY24_Finder_DiMuon,
92 OutputVtxContainerName =
"BPHY24_DiMuon_Candidates",
93 PVContainerName =
"PrimaryVertices",
94 RefPVContainerName =
"SHOULDNOTBEUSED",
97 augsList += [ BPHY24_SelectAndWrite_DiMuon ]
99 thinTrkVtxList += [
"BPHY24_DiMuon_Candidates" ]
100 outVtxList += [
"BPHY24_DiMuon_Candidates" ]
101 thinPassFlagsList += [
"passed_Jpsi" ]
103 BPHY24_Select_DiMuons = CompFactory.DerivationFramework.Select_onia2mumu( name =
"BPHY24_Select_DiMuons",
104 HypothesisName =
"Jpsi",
105 InputVtxContainerName =
"BPHY24_DiMuon_Candidates",
107 VtxMassHypo = 3096.916,
113 augsList += [ BPHY24_Select_DiMuons ]
115 ElectronLHSelectorLHvloose = CompFactory.AsgElectronLikelihoodTool(
"ElectronLHSelectorLHvloose",
116 primaryVertexContainer =
"PrimaryVertices",
117 ConfigFile=
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth.conf")
121 ElectronLHSelectorLHvloose_nod0 = CompFactory.AsgElectronLikelihoodTool(
"ElectronLHSelectorLHvloosenod0", primaryVertexContainer =
"PrimaryVertices",
122 ConfigFile=
"ElectronPhotonSelectorTools/offline/mc16_20190328_nod0/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth_nod0.conf")
126 from DerivationFrameworkEGamma.EGammaToolsConfig
import EGElectronLikelihoodToolWrapperCfg
127 ElectronPassLHvloose = acc.addPublicTool(acc.popToolsAndMerge(EGElectronLikelihoodToolWrapperCfg(flags, name =
"ElectronPassLHvloose",
128 EGammaElectronLikelihoodTool = ElectronLHSelectorLHvloose,
130 StoreGateEntryName =
"DFCommonElectronsLHVeryLoose",
131 ContainerName =
"Electrons",
132 StoreTResult=
False)))
134 ElectronPassLHvloosenod0 = acc.addPublicTool(acc.popToolsAndMerge(EGElectronLikelihoodToolWrapperCfg(flags, name =
"ElectronPassLHvloosenod0",
135 EGammaElectronLikelihoodTool = ElectronLHSelectorLHvloose_nod0,
137 StoreGateEntryName =
"DFCommonElectronsLHVeryLoosenod0",
138 ContainerName =
"Electrons",
139 StoreTResult=
False)))
140 augsList += [ElectronPassLHvloose, ElectronPassLHvloosenod0]
142 BPHY24DiElectronFinder = CompFactory.Analysis.JpsiFinder_ee(
143 name =
"BPHY24DiElectronFinder",
146 TrackAndTrack =
False,
147 assumeDiElectrons =
True,
148 elThresholdPt = 4000.0,
149 invMassUpper = 7000.0,
150 invMassLower = 200.0,
152 oppChargesOnly =
False,
153 allChargeCombinations =
True,
154 useElectronTrackMeasurement =
True,
155 electronCollectionKey =
"Electrons",
156 TrackParticleCollection =
"GSFTrackParticles",
157 useEgammaCuts =
True,
158 TrkVertexFitterTool = vkalvrt,
159 TrackSelectorTool = trackselect,
160 VertexPointEstimator = vpest,
161 ElectronSelection =
"d0_or_nod0"
164 BPHY24_SelectAndWrite_DiElectron = CompFactory.DerivationFramework.Reco_mumu(
165 name =
"BPHY24_SelectAndWrite_DiElectron",
166 JpsiFinder = BPHY24DiElectronFinder,
168 PVRefitter = PVrefit,
169 OutputVtxContainerName =
"BPHY24_DiElectron_Candidates",
170 PVContainerName =
"PrimaryVertices",
171 RefPVContainerName =
"SHOULDNOTBEUSED",
175 augsList += [ BPHY24_SelectAndWrite_DiElectron ]
177 BPHY24_Select_DiElectrons = CompFactory.DerivationFramework.Select_onia2mumu(
178 name =
"BPHY24_Select_DiElectrons",
179 HypothesisName =
"Jpsi",
180 InputVtxContainerName =
"BPHY24_DiElectron_Candidates",
182 VtxMassHypo = 3096.916,
189 thinTrkVtxList += [
"BPHY24_DiElectron_Candidates" ]
190 outVtxList += [
"BPHY24_DiElectron_Candidates" ]
192 augsList += [ BPHY24_Select_DiElectrons ]
194 V0ContainerName =
"BPHY24RecoV0Candidates"
195 KshortContainerName =
"BPHY24RecoKshortCandidates"
196 LambdaContainerName =
"BPHY24RecoLambdaCandidates"
197 LambdabarContainerName =
"BPHY24RecoLambdabarCandidates"
199 from DerivationFrameworkBPhys.V0ToolConfig
import (
200 BPHY_InDetV0FinderToolCfg, BPHY_Reco_V0FinderCfg)
202 BPHY24_V0FinderTool = acc.popToolsAndMerge(BPHY_InDetV0FinderToolCfg(
203 flags, BPHYDerivationName,
204 TrackParticleCollection = mainIDInput,
205 V0ContainerName = V0ContainerName,
206 KshortContainerName = KshortContainerName,
207 LambdaContainerName = LambdaContainerName,
208 LambdabarContainerName = LambdabarContainerName,
209 RelinkTracks = originalTrackCond,
210 use_innerPixHits =
True,
224 minConstrVertProb = 0.000001,
227 use_TrackSelector =
False))
229 BPHY24_Reco_V0Finder = acc.popToolsAndMerge(BPHY_Reco_V0FinderCfg(
230 flags, derivation = BPHYDerivationName,
231 V0ContainerName = V0ContainerName,
232 KshortContainerName = KshortContainerName,
233 LambdaContainerName = LambdaContainerName,
234 LambdabarContainerName = LambdabarContainerName,
235 VxPrimaryCandidateName =
"BPHY24_DiMuon_Candidates",
236 CheckVertexContainers = [
'BPHY24_DiMuon_Candidates',
237 'BPHY24_DiElectron_Candidates'],
238 V0FinderTool = BPHY24_V0FinderTool))
240 augsList += [BPHY24_Reco_V0Finder]
241 outVtxList += [
'BPHY24RecoKshortCandidates']
242 outVtxList += [
"BPHY24RecoV0Candidates"]
243 thinTrkVtxList += [
'BPHY24RecoKshortCandidates']
244 thinPassFlagsList += [
"" ]
245 finalCandidateList += [
"BPHY24RecoKshortCandidates"]
246 finalCandidateList += [
"BPHY24RecoV0Candidates"]
247 from TrkConfig.TrkVKalVrtFitterConfig
import JpsiV0VertexFitCfg
248 JpsiV0VertexFit = acc.popToolsAndMerge(JpsiV0VertexFitCfg(flags))
249 acc.addPublicTool(JpsiV0VertexFit)
251 BPHY24JpsimmKshort = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
252 name =
"BPHY24mmKshort",
254 HypothesisName =
"Bd",
255 TrkVertexFitterTool = JpsiV0VertexFit,
256 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
258 JpsiMassLowerCut = 1.,
259 JpsiMassUpperCut = 7000.,
260 ApplyJpsiMassConstraint =
False,
261 V0MassLowerCut = 400.,
262 V0MassUpperCut = 600.,
263 MassLowerCut = 4300.,
264 MassUpperCut = 6300.,
266 RefPVContainerName =
"BPHY24RefittedPrimaryVertices_mm",
267 JpsiVertices =
"BPHY24_DiMuon_Candidates",
268 CascadeVertexCollections= [
"BPHY24JpsimmKshortCascadeSV2",
"BPHY24JpsimmKshortCascadeSV1"],
269 V0Vertices =
"BPHY24RecoV0Candidates",
270 V0TrackContainerName = mainIDInput,
271 RelinkTracks = originalTrackCond)
273 augsList += [BPHY24JpsimmKshort]
274 outVtxList += BPHY24JpsimmKshort.CascadeVertexCollections
275 outVtxList += [
"BPHY24RefittedPrimaryVertices_mm"]
276 thinTrkVtxList += BPHY24JpsimmKshort.CascadeVertexCollections
277 finalCandidateList += BPHY24JpsimmKshort.CascadeVertexCollections
279 BPHY24JpsieeKshort = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
280 name =
"BPHY24eeKshort",
282 HypothesisName =
"Bd",
283 TrkVertexFitterTool = JpsiV0VertexFit,
284 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
286 JpsiMassLowerCut = 100.,
287 JpsiMassUpperCut = 7000.,
288 ApplyJpsiMassConstraint =
False,
289 V0MassLowerCut = 400.,
290 V0MassUpperCut = 600.,
291 MassLowerCut = 4300.,
292 MassUpperCut = 6300.,
294 JpsiTrackContainerName =
"GSFTrackParticles",
296 RefPVContainerName =
"BPHY24RefittedPrimaryVertices_ee",
297 JpsiVertices =
"BPHY24_DiElectron_Candidates",
298 CascadeVertexCollections= [
"BPHY24JpsieeKshortCascadeSV2",
"BPHY24JpsieeKshortCascadeSV1"],
299 V0Vertices =
"BPHY24RecoV0Candidates",
300 V0TrackContainerName = mainIDInput,
301 RelinkTracks = originalTrackCond)
303 augsList += [BPHY24JpsieeKshort]
304 finalCandidateList += BPHY24JpsieeKshort.CascadeVertexCollections
305 outVtxList += BPHY24JpsieeKshort.CascadeVertexCollections
306 outVtxList += [
"BPHY24RefittedPrimaryVertices_ee"]
307 thinTrkVtxList += BPHY24JpsieeKshort.CascadeVertexCollections
309 from TrackVertexAssociationTool.TrackVertexAssociationToolConfig
import isoTTVAToolCfg
310 TTVATool = acc.popToolsAndMerge(isoTTVAToolCfg(flags,
311 WorkingPoint =
"Custom",
315 doUsedInFit =
False))
316 acc.addPublicTool(TTVATool)
318 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig
import (
319 isoTrackSelectionToolCfg)
320 TrackSelTool = acc.popToolsAndMerge(isoTrackSelectionToolCfg(flags,
324 acc.addPublicTool(TrackSelTool)
326 from IsolationAlgs.IsoToolsConfig
import TrackIsolationToolCfg
327 TrackIsoTool = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
328 TrackSelectionTool = TrackSelTool,
329 TTVATool = TTVATool))
330 acc.addPublicTool(TrackIsoTool)
331 BPHY24TrackIsolationDecoratorBtoKee = CompFactory.DerivationFramework.VertexTrackIsolation(
332 name =
"BPHY24TrackIsolationDecoratorBtoKee",
333 TrackIsoTool = TrackIsoTool,
334 TrackContainer =
"InDetTrackParticles",
335 InputVertexContainer =
"BPHY24JpsieeKshortCascadeSV1",
336 FixElecExclusion =
True,
338 BPHY24TrackIsolationDecoratorBtoKmumu = CompFactory.DerivationFramework.VertexTrackIsolation(
339 name =
"BPHY24TrackIsolationDecoratorBtoKmumu ",
340 TrackIsoTool = TrackIsoTool,
341 TrackContainer =
"InDetTrackParticles",
342 InputVertexContainer =
"BPHY24JpsimmKshortCascadeSV1",
343 FixElecExclusion =
False,
346 BPHY24TrackIsolationDecoratorJpsiee = CompFactory.DerivationFramework.VertexTrackIsolation(
347 name =
"BPHY24TrackIsolationDecoratorJpsiee",
348 TrackIsoTool = TrackIsoTool,
349 TrackContainer =
"InDetTrackParticles",
350 InputVertexContainer =
"BPHY24_DiElectron_Candidates",
351 FixElecExclusion =
True,
354 BPHY24TrackIsolationDecoratorJpsimumu = CompFactory.DerivationFramework.VertexTrackIsolation(
355 name =
"BPHY24TrackIsolationDecoratorJpsimumu",
356 TrackIsoTool = TrackIsoTool,
357 TrackContainer =
"InDetTrackParticles",
358 InputVertexContainer =
"BPHY24_DiMuon_Candidates",
359 FixElecExclusion =
False,
362 augsList += [ BPHY24TrackIsolationDecoratorBtoKee,
363 BPHY24TrackIsolationDecoratorBtoKmumu,
364 BPHY24TrackIsolationDecoratorJpsiee,
365 BPHY24TrackIsolationDecoratorJpsimumu]
367 if flags.Trigger.EDMVersion >= 0:
369 "HLT_mu11_mu6_bDimu",
370 "HLT_mu11_mu6_bDimu2700",
371 "HLT_mu11_mu6_bDimu_L1LFV-MU11",
372 "HLT_mu11_mu6_bDimu2700_L1LFV-MU11",
373 "HLT_mu11_mu6_bBmumuxv2",
374 "HLT_mu10_mu6_bBmumuxv2",
375 "HLT_mu10_mu6_bBmumuxv2_delayed",
376 "HLT_2mu6_bBmumuxv2",
377 "HLT_2mu6_bBmumuxv2_delayed",
378 "HLT_2mu6_bBmumuxv2_L1LFV-MU6",
379 "HLT_mu6_mu4_bBmumuxv2",
380 "HLT_mu6_mu4_bBmumuxv2_delayed",
381 "HLT_2mu4_bBmumuxv2",
382 "HLT_mu11_mu6_bJpsimumu",
383 "HLT_2mu10_bJpsimumu",
384 "HLT_mu11_mu6_bJpsimumu_L1LFV-MU11",
385 "HLT_2mu6_bJpsimumu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6",
386 "HLT_2mu6_bJpsimumu_delayed_L1BPH-2M9-2MU6_BPH-2DR15-2MU6",
387 "HLT_2mu10_bJpsimumu_noL2",
388 "HLT_mu10_mu6_bJpsimumu",
389 "HLT_mu10_mu6_bJpsimumu_delayed",
390 "HLT_2mu6_bJpsimumu",
391 "HLT_2mu6_bJpsimumu_delayed",
392 "HLT_mu6_mu4_bJpsimumu",
393 "HLT_mu6_mu4_bJpsimumu_Lxy0_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4",
394 "HLT_2mu4_bJpsimumu",
395 "HLT_mu6_2mu4_bJpsi",
396 "HLT_mu6_2mu4_bJpsi_delayed",
400 "HLT_2e5_lhvloose_nod0_bBeexM6000t",
401 "HLT_e5_lhvloose_nod0_bBeexM6000t",
402 "HLT_e5_lhvloose_nod0_bBeexM6000t_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4",
403 "HLT_e5_lhvloose_nod0_bBeexM6000t_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6",
404 "HLT_e5_lhvloose_nod0_bBeexM6000_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6",
405 "HLT_e9_lhloose_bBeexM2700_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4",
406 "HLT_e9_lhloose_bBeexM2700_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6",
407 "HLT_e9_lhloose_bBeexM6000_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4",
408 "HLT_e9_lhloose_bBeexM6000_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6",
409 "HLT_e9_lhloose_e5_lhloose_bBeexM2700_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4",
410 "HLT_e9_lhloose_e5_lhloose_bBeexM2700_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6",
411 "HLT_e9_lhloose_e5_lhloose_bBeexM6000_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4",
412 "HLT_e9_lhloose_e5_lhloose_bBeexM6000_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6",
413 "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000t_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4",
414 "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000t_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6",
415 "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6",
418 BPHY24TrigSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool(
419 name =
"BPHY24TrigSkimmingTool",
420 TriggerListOR = trigger_list,
421 TriggerListORHLTOnly = [
"HLT_2e5_lhvloose_nod0_bBeexM6000t",
"HLT_e5_lhvloose_nod0_bBeexM6000t"] )
422 acc.addPublicTool(BPHY24TrigSkimmingTool)
423 skimList += [BPHY24TrigSkimmingTool]
426 BPHY24_Thin_VtxTracks = CompFactory.DerivationFramework.Thin_vtxTrk( name =
"BPHY24_Thin_VtxTracks",
427 StreamName = streamName,
428 TrackParticleContainerName =
"InDetTrackParticles",
429 VertexContainerNames = finalCandidateList,
432 thinList += [ BPHY24_Thin_VtxTracks ]
435 if flags.Tracking.doLargeD0:
436 BPHY24_Thin_VtxTracks_LRT = CompFactory.DerivationFramework.Thin_vtxTrk(
437 name =
"BPHY24_Thin_VtxTracks_LRT",
438 StreamName = streamName,
439 TrackParticleContainerName =
"InDetLargeD0TrackParticles",
440 VertexContainerNames = finalCandidateList,
442 thinList += [ BPHY24_Thin_VtxTracks_LRT ]
445 BPHY24_Thin_VtxTracks_GSF = CompFactory.DerivationFramework.Thin_vtxTrk( name =
"BPHY24_Thin_VtxTracks_GSF",
446 StreamName = streamName,
447 TrackParticleContainerName =
"GSFTrackParticles",
448 VertexContainerNames = finalCandidateList,
450 thinList += [ BPHY24_Thin_VtxTracks_GSF ]
453 BPHY24_Thin_Muons = CompFactory.DerivationFramework.MuonTrackParticleThinning( name =
"BPHY24_Thin_Muons",
455 StreamName = streamName,
456 InDetTrackParticlesKey =
"InDetTrackParticles" )
457 thinList += [ BPHY24_Thin_Muons ]
460 BPHY24_Thin_Egamma = CompFactory.DerivationFramework.EgammaTrackParticleThinning(
461 name =
"BPHY24_Thin_Egamma",
463 StreamName = streamName,
464 InDetTrackParticlesKey = mainIDInput)
465 thinList += [BPHY24_Thin_Egamma]
468 BPHY24_Thin_PV = CompFactory.DerivationFramework.BPhysPVThinningTool( name =
"BPHY24_Thin_PV",
469 CandidateCollections = finalCandidateList,
470 StreamName = streamName,
471 KeepPVTracks =
True )
472 thinList += [ BPHY24_Thin_PV ]
477 from InDetPhysValMonitoring.InDetPhysValDecorationConfig
import InDetPhysValTruthDecoratorAlgCfg
478 acc.merge(InDetPhysValTruthDecoratorAlgCfg(flags, BPHYDerivationName))
481 keepParticles = (
'TruthParticles.isElectron || '
482 'TruthParticles.isMuon')
485 keepParticles += (
' || '
486 'abs(TruthParticles.pdgId) == 511 || '
487 'abs(TruthParticles.pdgId) == 513 || '
488 'abs(TruthParticles.pdgId) == 515')
491 BPHY24_Thin_TruthHadrons = CompFactory.DerivationFramework.GenericTruthThinning( name =
"BPHY24_Thin_TruthHadrons",
492 ParticleSelectionString = keepParticles,
493 PreserveDescendants =
True,
494 StreamName = streamName,
495 PreserveAncestors =
True)
496 thinList += [ BPHY24_Thin_TruthHadrons ]
499 BPHY24_Thin_TruthQuarks = CompFactory.DerivationFramework.GenericTruthThinning( name =
"BPHY24_Thin_TruthQuarks",
500 ParticleSelectionString = (
'abs(TruthParticles.pdgId) == 5 || '
501 'abs(TruthParticles.pdgId) == 12 || abs(TruthParticles.pdgId) == 14' ),
502 PreserveDescendants =
False,
503 StreamName = streamName,
504 PreserveAncestors =
False)
505 thinList += [ BPHY24_Thin_TruthQuarks ]
507 for t
in augsList + skimList + thinList: acc.addPublicTool(t)
508 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
"BPHY24Kernel",
509 AugmentationTools = augsList,
512 SkimmingTools = skimList,
513 ThinningTools = thinList))
516 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
517 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
518 BPHY24SlimmingHelper =
SlimmingHelper(
"BPHY24SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
519 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
520 from AthenaConfiguration.Enums
import MetadataCategory
521 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import getDefaultAllVariables
522 AllVariables = getDefaultAllVariables()
529 BPHY24SlimmingHelper.SmartCollections = [
"Electrons",
"Muons",
"InDetTrackParticles",
"InDetLargeD0TrackParticles" ]
532 AllVariables += [
"InDetLargeD0TrackParticles"]
533 AllVariables += [
"CombinedMuonTrackParticles" ]
534 AllVariables += [
"ExtrapolatedMuonTrackParticles" ]
535 ExtraVariables += [
"Muons.etaLayer1Hits.etaLayer2Hits.etaLayer3Hits.etaLayer4Hits.phiLayer1Hits.phiLayer2Hits.phiLayer3Hits.phiLayer4Hits",
536 "Muons.numberOfTriggerEtaLayers.numberOfPhiLayers",
537 "InDetTrackParticles.numberOfTRTHits.numberOfTRTHighThresholdHits.vx.vy.vz",
538 "InDetLargeD0TrackParticles.numberOfTRTHits.numberOfTRTHighThresholdHits.vx.vy.vz",
539 "PrimaryVertices.chiSquared.covariance",
"Electrons.deltaEta1.DFCommonElectronsLHVeryLoosenod0",
540 "egammaClusters.calE.calEta.calPhi.e_sampl.eta_sampl.etaCalo.phiCalo.ETACALOFRAME.PHICALOFRAME",
541 "HLT_xAOD__ElectronContainer_egamma_ElectronsAuxDyn.charge" ]
546 BPHY24SlimmingHelper.IncludeMuonTriggerContent =
True
547 BPHY24SlimmingHelper.IncludeEgammaTriggerContent =
True
548 BPHY24SlimmingHelper.IncludeBPhysTriggerContent =
True
551 AllVariables += [
"PrimaryVertices" ]
552 print(
"BPHY24: List of refitted-PV output: ", outRePVList)
553 for i
in outRePVList:
554 StaticContent += [
"xAOD::VertexContainer#%s" % i ]
555 StaticContent += [
"xAOD::VertexAuxContainer#%sAux." % i ]
558 print(
"BPHY24: List of B-vertexing output: ", outVtxList)
560 StaticContent += [
"xAOD::VertexContainer#%s" % i ]
561 StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % i ]
563 print(
"BPHY24: Full list of B-augmentation: ", StaticContent)
567 AllVariables += [
"TruthEvents",
570 "MuonTruthParticles" ]
571 AllVariables = list(
set(AllVariables))
573 BPHY24SlimmingHelper.AllVariables = AllVariables
574 BPHY24SlimmingHelper.StaticContent = StaticContent
575 BPHY24SlimmingHelper.ExtraVariables = ExtraVariables
576 BPHY24ItemList = BPHY24SlimmingHelper.GetItemList()
577 acc.merge(OutputStreamCfg(flags,
"DAOD_BPHY24", ItemList=BPHY24ItemList, AcceptAlgs=[
"BPHY24Kernel"]))
578 acc.merge(SetupMetaDataForStreamCfg(flags,
"DAOD_BPHY24", AcceptAlgs=[
"BPHY24Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
579 acc.printConfig(withDetails=
True, summariseProps=
True, onlyComponents = [], printDefaults=
True)