23 thinPassFlagsList = []
24 finalCandidateList = []
26 from AthenaServices.PartPropSvcConfig
import PartPropSvcCfg
27 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import (
28 BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg,
29 BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg,
31 from JpsiUpsilonTools.JpsiUpsilonToolsConfig
import PrimaryVertexRefittingToolCfg
32 acc = ComponentAccumulator()
33 PartPropSvcName = acc.getPrimaryAndMerge(PartPropSvcCfg(flags))
34 isSimulation = flags.Input.isMC
35 V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(flags, BPHYDerivationName))
36 vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName))
37 acc.addPublicTool(vkalvrt)
38 acc.addPublicTool(V0Tools)
39 trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(flags, BPHYDerivationName))
40 acc.addPublicTool(trackselect)
41 vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName))
42 acc.addPublicTool(vpest)
43 PVrefit = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags))
44 acc.addPublicTool(PVrefit)
46 bSkim =
"(count(BPHY24JpsimmKshortCascadeSV1.Bd_mass) + count(BPHY24JpsieeKshortCascadeSV1.Bd_mass)) > 0"
48 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import (
49 xAODStringSkimmingToolCfg)
50 BPHY24_Skim_Bcandidates = acc.getPrimaryAndMerge(xAODStringSkimmingToolCfg(
51 flags, name =
"BPHY24_Skim_Bcandidates", expression = bSkim ))
52 skimList += [ BPHY24_Skim_Bcandidates ]
54 BPHY24_AugOriginalCounts = acc.popToolsAndMerge(
55 AugOriginalCountsCfg(flags, name =
"BPHY24_AugOriginalCounts"))
56 augsList += [ BPHY24_AugOriginalCounts ]
58 mainIDInput =
"InDetTrackParticles"
59 originalTrackCond = [
"InDetTrackParticles",
"GSFTrackParticles"]
60 if flags.Tracking.doLargeD0:
62 from DerivationFrameworkInDet.InDetToolsConfig
import InDetLRTMergeCfg
63 acc.merge(InDetLRTMergeCfg(flags))
65 mainIDInput =
"InDetWithLRTTrackParticles"
66 originalTrackCond += [
"InDetLargeD0TrackParticles"]
68 BPHY24_Finder_DiMuon = CompFactory.Analysis.JpsiFinder( name =
"BPHY24_Finder_DiMuon",
71 TrackAndTrack =
False,
73 muonThresholdPt = 3000.,
78 oppChargesOnly =
False,
79 allChargeCombinations =
True,
80 atLeastOneComb =
True,
81 useCombinedMeasurement =
False,
82 muonCollectionKey =
"Muons",
83 TrackParticleCollection =
"InDetTrackParticles",
84 V0VertexFitterTool =
None,
86 TrkVertexFitterTool = vkalvrt,
87 TrackSelectorTool = trackselect,
88 VertexPointEstimator = vpest,
92 BPHY24_SelectAndWrite_DiMuon = CompFactory.DerivationFramework.Reco_mumu( name =
"BPHY24_SelectAndWrite_DiMuon",
93 JpsiFinder = BPHY24_Finder_DiMuon,
96 OutputVtxContainerName =
"BPHY24_DiMuon_Candidates",
97 PVContainerName =
"PrimaryVertices",
98 RefPVContainerName =
"SHOULDNOTBEUSED",
101 augsList += [ BPHY24_SelectAndWrite_DiMuon ]
103 thinTrkVtxList += [
"BPHY24_DiMuon_Candidates" ]
104 outVtxList += [
"BPHY24_DiMuon_Candidates" ]
105 thinPassFlagsList += [
"passed_Jpsi" ]
107 BPHY24_Select_DiMuons = CompFactory.DerivationFramework.Select_onia2mumu( name =
"BPHY24_Select_DiMuons",
108 HypothesisName =
"Jpsi",
109 InputVtxContainerName =
"BPHY24_DiMuon_Candidates",
111 VtxMassHypo = 3096.916,
117 augsList += [ BPHY24_Select_DiMuons ]
119 ElectronLHSelectorLHvloose = CompFactory.AsgElectronLikelihoodTool(
"ElectronLHSelectorLHvloose",
120 primaryVertexContainer =
"PrimaryVertices",
121 ConfigFile=
"ElectronPhotonSelectorTools/offline/mc20_20210514/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth.conf")
125 ElectronLHSelectorLHvloose_nod0 = CompFactory.AsgElectronLikelihoodTool(
"ElectronLHSelectorLHvloosenod0", primaryVertexContainer =
"PrimaryVertices",
126 ConfigFile=
"ElectronPhotonSelectorTools/offline/mc16_20190328_nod0/ElectronLikelihoodVeryLooseOfflineConfig2017_Smooth_nod0.conf")
130 from DerivationFrameworkEGamma.EGammaToolsConfig
import EGElectronLikelihoodToolWrapperCfg
131 ElectronPassLHvloose = acc.addPublicTool(acc.popToolsAndMerge(EGElectronLikelihoodToolWrapperCfg(flags, name =
"ElectronPassLHvloose",
132 EGammaElectronLikelihoodTool = ElectronLHSelectorLHvloose,
133 EGammaFudgeMCTool =
"",
135 StoreGateEntryName =
"DFCommonElectronsLHVeryLoose",
136 ContainerName =
"Electrons",
137 StoreTResult=
False)))
139 ElectronPassLHvloosenod0 = acc.addPublicTool(acc.popToolsAndMerge(EGElectronLikelihoodToolWrapperCfg(flags, name =
"ElectronPassLHvloosenod0",
140 EGammaElectronLikelihoodTool = ElectronLHSelectorLHvloose_nod0,
141 EGammaFudgeMCTool =
"",
143 StoreGateEntryName =
"DFCommonElectronsLHVeryLoosenod0",
144 ContainerName =
"Electrons",
145 StoreTResult=
False)))
146 augsList += [ElectronPassLHvloose, ElectronPassLHvloosenod0]
148 BPHY24DiElectronFinder = CompFactory.Analysis.JpsiFinder_ee(
149 name =
"BPHY24DiElectronFinder",
152 TrackAndTrack =
False,
153 assumeDiElectrons =
True,
154 elThresholdPt = 4000.0,
155 invMassUpper = 7000.0,
156 invMassLower = 200.0,
158 oppChargesOnly =
False,
159 allChargeCombinations =
True,
160 useElectronTrackMeasurement =
True,
161 electronCollectionKey =
"Electrons",
162 TrackParticleCollection =
"GSFTrackParticles",
163 useEgammaCuts =
True,
164 V0VertexFitterTool =
None,
166 TrkVertexFitterTool = vkalvrt,
167 TrackSelectorTool = trackselect,
168 VertexPointEstimator = vpest,
169 ElectronSelection =
"d0_or_nod0",
170 PartPropSvc = PartPropSvcName
173 BPHY24_SelectAndWrite_DiElectron = CompFactory.DerivationFramework.Reco_mumu(
174 name =
"BPHY24_SelectAndWrite_DiElectron",
175 JpsiFinder = BPHY24DiElectronFinder,
177 PVRefitter = PVrefit,
178 OutputVtxContainerName =
"BPHY24_DiElectron_Candidates",
179 PVContainerName =
"PrimaryVertices",
180 RefPVContainerName =
"SHOULDNOTBEUSED",
184 augsList += [ BPHY24_SelectAndWrite_DiElectron ]
186 BPHY24_Select_DiElectrons = CompFactory.DerivationFramework.Select_onia2mumu(
187 name =
"BPHY24_Select_DiElectrons",
188 HypothesisName =
"Jpsi",
189 InputVtxContainerName =
"BPHY24_DiElectron_Candidates",
191 VtxMassHypo = 3096.916,
198 thinTrkVtxList += [
"BPHY24_DiElectron_Candidates" ]
199 outVtxList += [
"BPHY24_DiElectron_Candidates" ]
201 augsList += [ BPHY24_Select_DiElectrons ]
203 V0ContainerName =
"BPHY24RecoV0Candidates"
204 KshortContainerName =
"BPHY24RecoKshortCandidates"
205 LambdaContainerName =
"BPHY24RecoLambdaCandidates"
206 LambdabarContainerName =
"BPHY24RecoLambdabarCandidates"
208 from DerivationFrameworkBPhys.V0ToolConfig
import (
209 BPHY_InDetV0FinderToolCfg, BPHY_Reco_V0FinderCfg)
211 BPHY24_V0FinderTool = acc.popToolsAndMerge(BPHY_InDetV0FinderToolCfg(
212 flags, BPHYDerivationName,
213 TrackParticleCollection = mainIDInput,
214 V0ContainerName = V0ContainerName,
215 KshortContainerName = KshortContainerName,
216 LambdaContainerName = LambdaContainerName,
217 LambdabarContainerName = LambdabarContainerName,
218 RelinkTracks = originalTrackCond,
219 use_innerPixHits =
True,
233 minConstrVertProb = 0.000001,
236 use_TrackSelector =
False))
238 BPHY24_Reco_V0Finder = acc.popToolsAndMerge(BPHY_Reco_V0FinderCfg(
239 flags, derivation = BPHYDerivationName,
240 V0ContainerName = V0ContainerName,
241 KshortContainerName = KshortContainerName,
242 LambdaContainerName = LambdaContainerName,
243 LambdabarContainerName = LambdabarContainerName,
244 VxPrimaryCandidateName =
"BPHY24_DiMuon_Candidates",
245 CheckVertexContainers = [
'BPHY24_DiMuon_Candidates',
246 'BPHY24_DiElectron_Candidates'],
247 V0FinderTool = BPHY24_V0FinderTool))
249 augsList += [BPHY24_Reco_V0Finder]
250 outVtxList += [
'BPHY24RecoKshortCandidates']
251 outVtxList += [
"BPHY24RecoV0Candidates"]
252 thinTrkVtxList += [
'BPHY24RecoKshortCandidates']
253 thinPassFlagsList += [
"" ]
254 finalCandidateList += [
"BPHY24RecoKshortCandidates"]
255 finalCandidateList += [
"BPHY24RecoV0Candidates"]
256 from TrkConfig.TrkVKalVrtFitterConfig
import JpsiV0VertexFitCfg
257 JpsiV0VertexFit = acc.popToolsAndMerge(JpsiV0VertexFitCfg(flags))
258 acc.addPublicTool(JpsiV0VertexFit)
260 BPHY24JpsimmKshort = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
261 name =
"BPHY24mmKshort",
263 HypothesisName =
"Bd",
264 TrkVertexFitterTool = JpsiV0VertexFit,
265 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
267 JpsiMassLowerCut = 1.,
268 JpsiMassUpperCut = 7000.,
269 ApplyJpsiMassConstraint =
False,
270 V0MassLowerCut = 400.,
271 V0MassUpperCut = 600.,
272 MassLowerCut = 4300.,
273 MassUpperCut = 6300.,
275 RefPVContainerName =
"BPHY24RefittedPrimaryVertices_mm",
276 JpsiVertices =
"BPHY24_DiMuon_Candidates",
277 CascadeVertexCollections= [
"BPHY24JpsimmKshortCascadeSV2",
"BPHY24JpsimmKshortCascadeSV1"],
278 V0Vertices =
"BPHY24RecoV0Candidates",
279 V0TrackContainerName = mainIDInput,
280 RelinkTracks = originalTrackCond)
282 augsList += [BPHY24JpsimmKshort]
283 outVtxList += BPHY24JpsimmKshort.CascadeVertexCollections
284 outVtxList += [
"BPHY24RefittedPrimaryVertices_mm"]
285 thinTrkVtxList += BPHY24JpsimmKshort.CascadeVertexCollections
286 finalCandidateList += BPHY24JpsimmKshort.CascadeVertexCollections
288 BPHY24JpsieeKshort = CompFactory.DerivationFramework.JpsiPlusV0Cascade(
289 name =
"BPHY24eeKshort",
291 HypothesisName =
"Bd",
292 TrkVertexFitterTool = JpsiV0VertexFit,
293 PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(flags)),
295 JpsiMassLowerCut = 100.,
296 JpsiMassUpperCut = 7000.,
297 ApplyJpsiMassConstraint =
False,
298 V0MassLowerCut = 400.,
299 V0MassUpperCut = 600.,
300 MassLowerCut = 4300.,
301 MassUpperCut = 6300.,
303 JpsiTrackContainerName =
"GSFTrackParticles",
305 RefPVContainerName =
"BPHY24RefittedPrimaryVertices_ee",
306 JpsiVertices =
"BPHY24_DiElectron_Candidates",
307 CascadeVertexCollections= [
"BPHY24JpsieeKshortCascadeSV2",
"BPHY24JpsieeKshortCascadeSV1"],
308 V0Vertices =
"BPHY24RecoV0Candidates",
309 V0TrackContainerName = mainIDInput,
310 RelinkTracks = originalTrackCond)
312 augsList += [BPHY24JpsieeKshort]
313 finalCandidateList += BPHY24JpsieeKshort.CascadeVertexCollections
314 outVtxList += BPHY24JpsieeKshort.CascadeVertexCollections
315 outVtxList += [
"BPHY24RefittedPrimaryVertices_ee"]
316 thinTrkVtxList += BPHY24JpsieeKshort.CascadeVertexCollections
318 from TrackVertexAssociationTool.TrackVertexAssociationToolConfig
import isoTTVAToolCfg
319 TTVATool = acc.popToolsAndMerge(isoTTVAToolCfg(flags,
320 WorkingPoint =
"Custom",
324 doUsedInFit =
False))
325 acc.addPublicTool(TTVATool)
327 from InDetTrackSelectionTool.InDetTrackSelectionToolConfig
import (
328 isoTrackSelectionToolCfg)
329 TrackSelTool = acc.popToolsAndMerge(isoTrackSelectionToolCfg(flags,
333 acc.addPublicTool(TrackSelTool)
335 from IsolationAlgs.IsoToolsConfig
import TrackIsolationToolCfg
336 TrackIsoTool = acc.popToolsAndMerge(TrackIsolationToolCfg(flags,
337 TrackSelectionTool = TrackSelTool,
338 TTVATool = TTVATool))
339 acc.addPublicTool(TrackIsoTool)
340 BPHY24TrackIsolationDecoratorBtoKee = CompFactory.DerivationFramework.VertexTrackIsolation(
341 name =
"BPHY24TrackIsolationDecoratorBtoKee",
342 TrackIsoTool = TrackIsoTool,
343 TrackContainer =
"InDetTrackParticles",
344 InputVertexContainer =
"BPHY24JpsieeKshortCascadeSV1",
345 FixElecExclusion =
True,
347 BPHY24TrackIsolationDecoratorBtoKmumu = CompFactory.DerivationFramework.VertexTrackIsolation(
348 name =
"BPHY24TrackIsolationDecoratorBtoKmumu ",
349 TrackIsoTool = TrackIsoTool,
350 TrackContainer =
"InDetTrackParticles",
351 InputVertexContainer =
"BPHY24JpsimmKshortCascadeSV1",
352 FixElecExclusion =
False,
355 BPHY24TrackIsolationDecoratorJpsiee = CompFactory.DerivationFramework.VertexTrackIsolation(
356 name =
"BPHY24TrackIsolationDecoratorJpsiee",
357 TrackIsoTool = TrackIsoTool,
358 TrackContainer =
"InDetTrackParticles",
359 InputVertexContainer =
"BPHY24_DiElectron_Candidates",
360 FixElecExclusion =
True,
363 BPHY24TrackIsolationDecoratorJpsimumu = CompFactory.DerivationFramework.VertexTrackIsolation(
364 name =
"BPHY24TrackIsolationDecoratorJpsimumu",
365 TrackIsoTool = TrackIsoTool,
366 TrackContainer =
"InDetTrackParticles",
367 InputVertexContainer =
"BPHY24_DiMuon_Candidates",
368 FixElecExclusion =
False,
371 augsList += [ BPHY24TrackIsolationDecoratorBtoKee,
372 BPHY24TrackIsolationDecoratorBtoKmumu,
373 BPHY24TrackIsolationDecoratorJpsiee,
374 BPHY24TrackIsolationDecoratorJpsimumu]
376 if flags.Trigger.EDMVersion >= 0:
378 "HLT_mu11_mu6_bDimu",
379 "HLT_mu11_mu6_bDimu2700",
380 "HLT_mu11_mu6_bDimu_L1LFV-MU11",
381 "HLT_mu11_mu6_bDimu2700_L1LFV-MU11",
382 "HLT_mu11_mu6_bBmumuxv2",
383 "HLT_mu10_mu6_bBmumuxv2",
384 "HLT_mu10_mu6_bBmumuxv2_delayed",
385 "HLT_2mu6_bBmumuxv2",
386 "HLT_2mu6_bBmumuxv2_delayed",
387 "HLT_2mu6_bBmumuxv2_L1LFV-MU6",
388 "HLT_mu6_mu4_bBmumuxv2",
389 "HLT_mu6_mu4_bBmumuxv2_delayed",
390 "HLT_2mu4_bBmumuxv2",
391 "HLT_mu11_mu6_bJpsimumu",
392 "HLT_2mu10_bJpsimumu",
393 "HLT_mu11_mu6_bJpsimumu_L1LFV-MU11",
394 "HLT_2mu6_bJpsimumu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6",
395 "HLT_2mu6_bJpsimumu_delayed_L1BPH-2M9-2MU6_BPH-2DR15-2MU6",
396 "HLT_2mu10_bJpsimumu_noL2",
397 "HLT_mu10_mu6_bJpsimumu",
398 "HLT_mu10_mu6_bJpsimumu_delayed",
399 "HLT_2mu6_bJpsimumu",
400 "HLT_2mu6_bJpsimumu_delayed",
401 "HLT_mu6_mu4_bJpsimumu",
402 "HLT_mu6_mu4_bJpsimumu_Lxy0_L1BPH-2M9-MU6MU4_BPH-0DR15-MU6MU4",
403 "HLT_2mu4_bJpsimumu",
404 "HLT_mu6_2mu4_bJpsi",
405 "HLT_mu6_2mu4_bJpsi_delayed",
409 "HLT_2e5_lhvloose_nod0_bBeexM6000t",
410 "HLT_e5_lhvloose_nod0_bBeexM6000t",
411 "HLT_e5_lhvloose_nod0_bBeexM6000t_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4",
412 "HLT_e5_lhvloose_nod0_bBeexM6000t_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6",
413 "HLT_e5_lhvloose_nod0_bBeexM6000_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6",
414 "HLT_e9_lhloose_bBeexM2700_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4",
415 "HLT_e9_lhloose_bBeexM2700_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6",
416 "HLT_e9_lhloose_bBeexM6000_2mu4_nomucomb_L1BPH-0DR3-EM7J15_2MU4",
417 "HLT_e9_lhloose_bBeexM6000_mu6_nomucomb_L1BPH-0DR3-EM7J15_MU6",
418 "HLT_e9_lhloose_e5_lhloose_bBeexM2700_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4",
419 "HLT_e9_lhloose_e5_lhloose_bBeexM2700_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6",
420 "HLT_e9_lhloose_e5_lhloose_bBeexM6000_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4",
421 "HLT_e9_lhloose_e5_lhloose_bBeexM6000_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6",
422 "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000t_2mu4_nomucomb_L1BPH-0M9-EM7-EM5_2MU4",
423 "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000t_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6",
424 "HLT_e9_lhvloose_nod0_e5_lhvloose_nod0_bBeexM6000_mu6_nomucomb_L1BPH-0M9-EM7-EM5_MU6",
427 BPHY24TrigSkimmingTool = CompFactory.DerivationFramework.TriggerSkimmingTool(
428 name =
"BPHY24TrigSkimmingTool",
429 TriggerListOR = trigger_list,
430 TriggerListORHLTOnly = [
"HLT_2e5_lhvloose_nod0_bBeexM6000t",
"HLT_e5_lhvloose_nod0_bBeexM6000t"] )
431 acc.addPublicTool(BPHY24TrigSkimmingTool)
432 skimList += [BPHY24TrigSkimmingTool]
435 BPHY24_Thin_VtxTracks = CompFactory.DerivationFramework.Thin_vtxTrk( name =
"BPHY24_Thin_VtxTracks",
436 StreamName = streamName,
437 TrackParticleContainerName =
"InDetTrackParticles",
438 VertexContainerNames = finalCandidateList,
441 thinList += [ BPHY24_Thin_VtxTracks ]
444 if flags.Tracking.doLargeD0:
445 BPHY24_Thin_VtxTracks_LRT = CompFactory.DerivationFramework.Thin_vtxTrk(
446 name =
"BPHY24_Thin_VtxTracks_LRT",
447 StreamName = streamName,
448 TrackParticleContainerName =
"InDetLargeD0TrackParticles",
449 VertexContainerNames = finalCandidateList,
451 thinList += [ BPHY24_Thin_VtxTracks_LRT ]
454 BPHY24_Thin_VtxTracks_GSF = CompFactory.DerivationFramework.Thin_vtxTrk( name =
"BPHY24_Thin_VtxTracks_GSF",
455 StreamName = streamName,
456 TrackParticleContainerName =
"GSFTrackParticles",
457 VertexContainerNames = finalCandidateList,
459 thinList += [ BPHY24_Thin_VtxTracks_GSF ]
462 BPHY24_Thin_Muons = CompFactory.DerivationFramework.MuonTrackParticleThinning( name =
"BPHY24_Thin_Muons",
464 StreamName = streamName,
465 InDetTrackParticlesKey =
"InDetTrackParticles" )
466 thinList += [ BPHY24_Thin_Muons ]
469 BPHY24_Thin_Egamma = CompFactory.DerivationFramework.EgammaTrackParticleThinning(
470 name =
"BPHY24_Thin_Egamma",
472 StreamName = streamName,
473 InDetTrackParticlesKey = mainIDInput)
474 thinList += [BPHY24_Thin_Egamma]
477 BPHY24_Thin_PV = CompFactory.DerivationFramework.BPhysPVThinningTool( name =
"BPHY24_Thin_PV",
478 CandidateCollections = finalCandidateList,
479 StreamName = streamName,
480 KeepPVTracks =
True )
481 thinList += [ BPHY24_Thin_PV ]
486 from InDetPhysValMonitoring.InDetPhysValDecorationConfig
import InDetPhysValTruthDecoratorAlgCfg
487 acc.merge(InDetPhysValTruthDecoratorAlgCfg(flags, BPHYDerivationName))
490 keepParticles = (
'abs(TruthParticles.pdgId) == 11 || '
491 'abs(TruthParticles.pdgId) == 13')
494 keepParticles += (
' || '
495 'abs(TruthParticles.pdgId) == 511 || '
496 'abs(TruthParticles.pdgId) == 513 || '
497 'abs(TruthParticles.pdgId) == 515')
500 BPHY24_Thin_TruthHadrons = CompFactory.DerivationFramework.GenericTruthThinning( name =
"BPHY24_Thin_TruthHadrons",
501 ParticleSelectionString = keepParticles,
502 PreserveDescendants =
True,
503 StreamName = streamName,
504 PreserveAncestors =
True)
505 thinList += [ BPHY24_Thin_TruthHadrons ]
508 BPHY24_Thin_TruthQuarks = CompFactory.DerivationFramework.GenericTruthThinning( name =
"BPHY24_Thin_TruthQuarks",
509 ParticleSelectionString = (
'abs(TruthParticles.pdgId) == 5 || '
510 'abs(TruthParticles.pdgId) == 12 || abs(TruthParticles.pdgId) == 14' ),
511 PreserveDescendants =
False,
512 StreamName = streamName,
513 PreserveAncestors =
False)
514 thinList += [ BPHY24_Thin_TruthQuarks ]
516 for t
in augsList + skimList + thinList: acc.addPublicTool(t)
517 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
"BPHY24Kernel",
518 AugmentationTools = augsList,
521 SkimmingTools = skimList,
522 ThinningTools = thinList))
525 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
526 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
527 BPHY24SlimmingHelper =
SlimmingHelper(
"BPHY24SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
528 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
529 from AthenaConfiguration.Enums
import MetadataCategory
530 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import getDefaultAllVariables
531 AllVariables = getDefaultAllVariables()
538 BPHY24SlimmingHelper.SmartCollections = [
"Electrons",
"Muons",
"InDetTrackParticles",
"InDetLargeD0TrackParticles" ]
541 AllVariables += [
"InDetLargeD0TrackParticles"]
542 AllVariables += [
"CombinedMuonTrackParticles" ]
543 AllVariables += [
"ExtrapolatedMuonTrackParticles" ]
544 ExtraVariables += [
"Muons.etaLayer1Hits.etaLayer2Hits.etaLayer3Hits.etaLayer4Hits.phiLayer1Hits.phiLayer2Hits.phiLayer3Hits.phiLayer4Hits",
545 "Muons.numberOfTriggerEtaLayers.numberOfPhiLayers",
546 "InDetTrackParticles.numberOfTRTHits.numberOfTRTHighThresholdHits.vx.vy.vz",
547 "InDetLargeD0TrackParticles.numberOfTRTHits.numberOfTRTHighThresholdHits.vx.vy.vz",
548 "PrimaryVertices.chiSquared.covariance",
"Electrons.deltaEta1.DFCommonElectronsLHVeryLoosenod0",
549 "egammaClusters.calE.calEta.calPhi.e_sampl.eta_sampl.etaCalo.phiCalo.ETACALOFRAME.PHICALOFRAME",
550 "HLT_xAOD__ElectronContainer_egamma_ElectronsAuxDyn.charge" ]
555 BPHY24SlimmingHelper.IncludeMuonTriggerContent =
True
556 BPHY24SlimmingHelper.IncludeEgammaTriggerContent =
True
557 BPHY24SlimmingHelper.IncludeBPhysTriggerContent =
True
560 AllVariables += [
"PrimaryVertices" ]
561 print(
"BPHY24: List of refitted-PV output: ", outRePVList)
562 for i
in outRePVList:
563 StaticContent += [
"xAOD::VertexContainer#%s" % i ]
564 StaticContent += [
"xAOD::VertexAuxContainer#%sAux." % i ]
567 print(
"BPHY24: List of B-vertexing output: ", outVtxList)
569 StaticContent += [
"xAOD::VertexContainer#%s" % i ]
570 StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % i ]
572 print(
"BPHY24: Full list of B-augmentation: ", StaticContent)
576 AllVariables += [
"TruthEvents",
579 "MuonTruthParticles" ]
580 AllVariables = list(
set(AllVariables))
582 BPHY24SlimmingHelper.AllVariables = AllVariables
583 BPHY24SlimmingHelper.StaticContent = StaticContent
584 BPHY24SlimmingHelper.ExtraVariables = ExtraVariables
585 BPHY24ItemList = BPHY24SlimmingHelper.GetItemList()
586 acc.merge(OutputStreamCfg(flags,
"DAOD_BPHY24", ItemList=BPHY24ItemList, AcceptAlgs=[
"BPHY24Kernel"]))
587 acc.merge(SetupMetaDataForStreamCfg(flags,
"DAOD_BPHY24", AcceptAlgs=[
"BPHY24Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
588 acc.printConfig(withDetails=
True, summariseProps=
True, onlyComponents = [], printDefaults=
True)