15 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
16 from JpsiUpsilonTools.JpsiUpsilonToolsConfig
import PrimaryVertexRefittingToolCfg
18 isSimulation = flags.Input.isMC
19 V0Tools = acc.popToolsAndMerge(
BPHY_V0ToolCfg(flags, BPHYDerivationName))
21 acc.addPublicTool(vkalvrt)
22 acc.addPublicTool(V0Tools)
24 acc.addPublicTool(trackselect)
26 acc.addPublicTool(vpest)
27 BPHY16JpsiFinder = CompFactory.Analysis.JpsiFinder(
28 name =
"BPHY16JpsiFinder",
31 TrackAndTrack =
False,
33 invMassUpper = 12000.0,
36 oppChargesOnly =
True,
37 atLeastOneComb =
True,
38 useCombinedMeasurement =
False,
39 muonCollectionKey =
"Muons",
40 TrackParticleCollection =
"InDetTrackParticles",
41 V0VertexFitterTool =
None,
43 TrkVertexFitterTool = vkalvrt,
44 TrackSelectorTool = trackselect,
45 VertexPointEstimator = vpest,
47 acc.addPublicTool(BPHY16JpsiFinder)
48 BPHY16_Reco_mumu = CompFactory.DerivationFramework.Reco_Vertex(
49 name =
"BPHY16_Reco_mumu",
50 VertexSearchTool = BPHY16JpsiFinder,
51 OutputVtxContainerName =
"BPHY16OniaCandidates",
52 PVContainerName =
"PrimaryVertices",
53 RefPVContainerName =
"BPHY16RefittedPrimaryVertices1",
60 BPHY16_Select_Upsi = CompFactory.DerivationFramework.Select_onia2mumu(
61 name =
"BPHY16_Select_Upsi",
62 HypothesisName =
"Upsilon",
63 InputVtxContainerName =
"BPHY16OniaCandidates",
65 VtxMassHypo = 9460.30,
71 BPHY16Plus2Tracks = CompFactory.Analysis.JpsiPlus2Tracks(name =
"BPHY16Plus2Tracks",
72 kaonkaonHypothesis =
False,
73 pionpionHypothesis =
False,
74 kaonpionHypothesis =
False,
75 ManualMassHypo = [ 105.658, 105.658, 105.658, 105.658 ],
80 oppChargesOnly =
False,
82 JpsiContainerKey =
"BPHY16OniaCandidates",
83 TrackParticleCollection =
"InDetTrackParticles",
84 MuonsUsedInJpsi =
"Muons",
85 ExcludeJpsiMuonsOnly =
True,
86 RequireNMuonTracks = 1,
87 TrkVertexFitterTool = vkalvrt,
88 TrackSelectorTool = trackselect,
89 UseMassConstraint =
False)
91 BPHY16FourTrackSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(name =
"BPHY16FourTrackSelectAndWrite",
92 VertexSearchTool = BPHY16Plus2Tracks,
93 OutputVtxContainerName =
"BPHY16FourTrack",
94 PVContainerName =
"PrimaryVertices",
95 RefPVContainerName =
"BPHY16RefittedPrimaryVertices2",
99 MaxPVrefit = 10000, DoVertexType = 7)
101 BPHY16_Select_FourTrack = CompFactory.DerivationFramework.Select_onia2mumu(
102 name =
"BPHY16_Select_FourTracks",
103 HypothesisName =
"FourTracks",
104 InputVtxContainerName =
"BPHY16FourTrack",
106 TrkMasses = [105.658, 105.658, 105.658, 105.658],
107 VtxMassHypo = 18100.0,
110 Chi2Max = BPHY16Plus2Tracks.Chi2Cut)
111 BPHY16_Revertex = CompFactory.DerivationFramework.ReVertex(
112 name =
"BPHY16_ReVertex",
113 InputVtxContainerName =
"BPHY16FourTrack",
115 TrackIndices = [ 2, 3 ],
117 TrkVertexFitterTool = vkalvrt,
118 OutputVtxContainerName =
"BPHY16TwoTrack")
119 BPHY16_Select_TwoTrack = CompFactory.DerivationFramework.Select_onia2mumu(
120 name =
"BPHY16_Select_TwoTracks",
121 HypothesisName =
"TwoTracks",
122 InputVtxContainerName =
"BPHY16TwoTrack",
124 TrkMasses = [105.658, 105.658],
125 VtxMassHypo = 18100.0,
130 BPHY16_SelectEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(name =
"BPHY16_SelectEvent",
131 expression =
"count(BPHY16FourTrack.passed_FourTracks) > 0")
134 augTools = [BPHY16_Reco_mumu, BPHY16_Select_Upsi, BPHY16FourTrackSelectAndWrite, BPHY16_Select_FourTrack, BPHY16_Revertex, BPHY16_Select_TwoTrack]
135 skimTools = [BPHY16_SelectEvent]
136 for t
in augTools +skimTools : acc.addPublicTool(t)
137 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
"BPHY16Kernel",
138 AugmentationTools = augTools,
140 SkimmingTools = skimTools,
147 from DerivationFrameworkCore.SlimmingHelper
import SlimmingHelper
148 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
149 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
150 BPHY16SlimmingHelper =
SlimmingHelper(
"BPHY16SlimmingHelper", NamesAndTypes = flags.Input.TypedCollections, flags = flags)
151 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import getDefaultAllVariables
156 BPHY16SlimmingHelper.IncludeMuonTriggerContent =
True
157 BPHY16SlimmingHelper.IncludeBPhysTriggerContent =
True
160 AllVariables += [
"PrimaryVertices"]
161 StaticContent += [
"xAOD::VertexContainer#BPHY16RefittedPrimaryVertices1"]
162 StaticContent += [
"xAOD::VertexAuxContainer#BPHY16RefittedPrimaryVertices1Aux."]
163 StaticContent += [
"xAOD::VertexContainer#BPHY16RefittedPrimaryVertices2"]
164 StaticContent += [
"xAOD::VertexAuxContainer#BPHY16RefittedPrimaryVertices2Aux."]
167 AllVariables += [
"InDetTrackParticles"]
172 AllVariables += [
"CombinedMuonTrackParticles"]
173 AllVariables += [
"ExtrapolatedMuonTrackParticles"]
176 AllVariables += [
"Muons"]
179 StaticContent += [
"xAOD::VertexContainer#%s" % BPHY16_Reco_mumu.OutputVtxContainerName]
181 StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16_Reco_mumu.OutputVtxContainerName]
183 StaticContent += [
"xAOD::VertexContainer#%s" % BPHY16FourTrackSelectAndWrite.OutputVtxContainerName]
185 StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16FourTrackSelectAndWrite.OutputVtxContainerName]
187 StaticContent += [
"xAOD::VertexContainer#%s" % BPHY16_Revertex.OutputVtxContainerName]
189 StaticContent += [
"xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16_Revertex.OutputVtxContainerName]
194 AllVariables += [
"TruthEvents",
"TruthParticles",
"TruthVertices",
"MuonTruthParticles"]
195 BPHY16SlimmingHelper.AllVariables = AllVariables
196 BPHY16SlimmingHelper.StaticContent = StaticContent
197 BPHY16ItemList = BPHY16SlimmingHelper.GetItemList()
198 acc.merge(
OutputStreamCfg(flags,
"DAOD_BPHY16", ItemList=BPHY16ItemList, AcceptAlgs=[
"BPHY16Kernel"]))
199 acc.merge(
SetupMetaDataForStreamCfg(flags,
"DAOD_BPHY16", AcceptAlgs=[
"BPHY16Kernel"], createMetadata=[MetadataCategory.CutFlowMetaData]))
200 acc.printConfig(withDetails=
True, summariseProps=
True, onlyComponents = [], printDefaults=
True, printComponentsOnly=
False)