14 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_TrkVKalVrtFitterCfg)
15 from JpsiUpsilonTools.JpsiUpsilonToolsConfig
import PrimaryVertexRefittingToolCfg
17 V0Tools = acc.popToolsAndMerge(
BPHY_V0ToolCfg(flags, BPHYDerivationName))
19 acc.addPublicTool(vkalvrt)
20 acc.addPublicTool(V0Tools)
22 acc.addPublicTool(trackselect)
24 BPHY4FourMuonTool = CompFactory.DerivationFramework.FourMuonTool(
25 name =
"BPHY4FourMuonTool",
28 muonCollectionKey =
"Muons",
29 TrackParticleCollection =
"InDetTrackParticles",
30 V0VertexFitterTool =
None,
32 TrkVertexFitterTool = vkalvrt,
33 TrackSelectorTool = trackselect)
34 BPHY4_Reco_4mu = CompFactory.DerivationFramework.Reco_4mu(
35 name =
"BPHY4_Reco_4mu",
36 FourMuonTool = BPHY4FourMuonTool,
39 PairContainerName =
"BPHY4Pairs",
40 QuadrupletContainerName =
"BPHY4Quads",
41 PVContainerName =
"PrimaryVertices",
42 RefPVContainerName =
"BPHY4RefittedPrimaryVertices",
47 BPHY4MuonTPThinningTool = CompFactory.DerivationFramework.MuonTrackParticleThinning(name =
"BPHY4MuonTPThinningTool",
49 StreamName = streamName,
50 InDetTrackParticlesKey =
"InDetTrackParticles")
51 BPHY4ElectronTPThinningTool = CompFactory.DerivationFramework.EgammaTrackParticleThinning(name =
"BPHY4ElectronTPThinningTool",
53 GSFTrackParticlesKey =
"GSFTrackParticles",
54 StreamName = streamName,
55 InDetTrackParticlesKey =
"InDetTrackParticles")
58 BPHY4_SelectEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(name =
'BPHY4_SelectEvent',
59 expression =
'(count(Muons.BPHY4MuonIndex>=0)>0)')
61 BPHY4ThinningTools = [BPHY4MuonTPThinningTool, BPHY4ElectronTPThinningTool]
62 BPHY4SlimTools = [BPHY4_SelectEvent]
63 BPHY4AugTools = [BPHY4_Reco_4mu]
64 for t
in BPHY4ThinningTools + BPHY4SlimTools + BPHY4AugTools: acc.addPublicTool(t)
65 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
"BPHY4Kernel",
66 AugmentationTools= BPHY4AugTools, SkimmingTools = BPHY4SlimTools, ThinningTools = BPHY4ThinningTools ))
68 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
69 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
70 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
71 BPHY4SlimmingHelper =
SlimmingHelper(
"BPHY4SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
72 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import getDefaultAllVariables
74 BPHY4StaticContent = []
75 BPHY4SmartVariables =[]
76 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
79 BPHY4SlimmingHelper.IncludeMuonTriggerContent =
True
80 BPHY4SlimmingHelper.IncludeBPhysTriggerContent =
True
83 BPHY4AllVariables += [
"PrimaryVertices"]
84 BPHY4StaticContent += [
"xAOD::VertexContainer#BPHY4RefittedPrimaryVertices"]
85 BPHY4StaticContent += [
"xAOD::VertexAuxContainer#BPHY4RefittedPrimaryVerticesAux."]
88 BPHY4AllVariables += [
"InDetTrackParticles"]
89 BPHY4SmartVariables += [
"InDetTrackParticles"]
94 BPHY4AllVariables += [
"CombinedMuonTrackParticles"]
95 BPHY4AllVariables += [
"ExtrapolatedMuonTrackParticles"]
98 BPHY4SmartVariables += [
"Muons"]
101 BPHY4SmartVariables += [
"Electrons"]
104 BPHY4StaticContent += [
"xAOD::VertexContainer#%s" % BPHY4_Reco_4mu.PairContainerName]
105 BPHY4StaticContent += [
"xAOD::VertexContainer#%s" % BPHY4_Reco_4mu.QuadrupletContainerName]
108 BPHY4StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY4_Reco_4mu.PairContainerName]
109 BPHY4StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY4_Reco_4mu.QuadrupletContainerName]
111 BPHY4SlimmingHelper.AllVariables = BPHY4AllVariables
112 BPHY4SlimmingHelper.StaticContent = BPHY4StaticContent
113 BPHY4SlimmingHelper.SmartCollections = BPHY4SmartVariables
114 BPHY4ItemList = BPHY4SlimmingHelper.GetItemList()
115 acc.merge(
OutputStreamCfg(flags,
"DAOD_BPHY4", ItemList=BPHY4ItemList, AcceptAlgs=[
"BPHY4Kernel"]))
116 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_BPHY4", AcceptAlgs=[
"BPHY4Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
117 acc.printConfig(withDetails=
True, summariseProps=
True, onlyComponents = [], printDefaults=
True, printComponentsOnly=
False)