33 """Configure the derivation framework driving algorithm (kernel) for STDM16"""
34 from DerivationFrameworkBPhys.commonBPHYMethodsCfg
import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg)
44 from DerivationFrameworkMCTruth.MCTruthCommonConfig
import (
45 AddStandardTruthContentsCfg,
47 AddMiniTruthCollectionLinksCfg,
49 AddTruthCollectionNavigationDecorationsCfg,
50 TruthClassificationAugmentationsCfg)
52 from DerivationFrameworkMCTruth.TruthDerivationToolsConfig
import DFCommonTruthCharmToolCfg
55 name =
"STDM16CommonTruthCharmTool"))
56 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
57 acc.addEventAlgo(CommonAugmentation(
"STDM16CommonTruthCharmKernel",AugmentationTools=[STDM16CommonTruthCharmTool]))
62 TruthCollections=[
"TruthMuons",
72 from DerivationFrameworkInDet.InDetCommonConfig
import InDetCommonCfg
73 from DerivationFrameworkMuons.MuonsCommonConfig
import MuonsCommonCfg
74 from DerivationFrameworkEGamma.EGammaCommonConfig
import EGammaCommonCfg
79 DoVertexFinding = flags.Tracking.doVertexFinding,
80 AddPseudoTracks = flags.Tracking.doPseudoTracking,
82 DoR3LargeD0 = flags.Tracking.doLargeD0,
83 StoreSeparateLargeD0Container = flags.Tracking.storeSeparateLargeD0Container,
89 from DerivationFrameworkJetEtMiss.JetCommonConfig
import JetCommonCfg
98 from TrkConfig.TrkV0FitterConfig
import TrkV0VertexFitter_InDetExtrCfg
106 acc.addPublicTool(vkalvrt)
107 acc.addPublicTool(V0Tools)
108 acc.addPublicTool(trackselect)
109 acc.addPublicTool(vpest)
110 acc.addPublicTool(v0fitter)
117 STDM16_AugmentationTools = []
123 STDM16_Finder_D0 = CompFactory.Analysis.JpsiFinder(
124 name =
"STDM16_Finder_D0",
128 TrackAndTrack =
True,
129 assumeDiMuons =
False,
130 invMassUpper = 3000.0,
133 oppChargesOnly =
True,
134 atLeastOneComb =
False,
135 useCombinedMeasurement =
False,
136 track1Mass = massPiPlus,
137 track2Mass = massPiPlus,
138 trackThresholdPt = 1000.0,
139 muonCollectionKey =
"Muons",
140 TrackParticleCollection =
"InDetTrackParticles",
141 V0VertexFitterTool = v0fitter,
143 TrkVertexFitterTool = vkalvrt,
144 TrackSelectorTool = trackselect,
145 VertexPointEstimator = vpest,
148 acc.addPublicTool(STDM16_Finder_D0)
151 from JpsiUpsilonTools.JpsiUpsilonToolsConfig
import PrimaryVertexRefittingToolCfg
152 STDM16_Reco_D0 = CompFactory.DerivationFramework.Reco_Vertex(
153 name =
"STDM16_Reco_D0",
154 VertexSearchTool = STDM16_Finder_D0,
155 OutputVtxContainerName =
"STDM16_D0Candidates",
156 PVContainerName =
"PrimaryVertices",
160 RefPVContainerName =
"SHOULDNOTBEUSED",
163 acc.addPublicTool(STDM16_Reco_D0)
164 STDM16_AugmentationTools += [STDM16_Reco_D0]
177 STDM16_Select_D0 = CompFactory.DerivationFramework.Select_onia2mumu(
178 name =
"STDM16_Select_D0",
179 HypothesisName =
"D0",
180 InputVtxContainerName = STDM16_Reco_D0.OutputVtxContainerName,
181 TrkMasses = [massPiPlus,massKPlus],
182 VtxMassHypo = massD0,
183 MassMin = cutMinMass,
184 MassMax = cutMaxMass,
185 Chi2Max = cutMaxChiSq,
188 acc.addPublicTool(STDM16_Select_D0)
189 STDM16_AugmentationTools += [STDM16_Select_D0]
191 STDM16_Select_D0b = CompFactory.DerivationFramework.Select_onia2mumu(
192 name =
"STDM16_Select_D0b",
193 HypothesisName =
"D0b",
194 InputVtxContainerName = STDM16_Reco_D0.OutputVtxContainerName,
195 TrkMasses = [massKPlus,massPiPlus],
196 VtxMassHypo = massD0,
197 MassMin = cutMinMass,
198 MassMax = cutMaxMass,
199 Chi2Max = cutMaxChiSq,
202 acc.addPublicTool(STDM16_Select_D0b)
203 STDM16_AugmentationTools += [STDM16_Select_D0b]
212 name =
"STDM16_DStarSelectionTool",
213 InputVtxContainerName = STDM16_Reco_D0.OutputVtxContainerName,
214 DeltaMassMax = 200.0))
216 STDM16_AugmentationTools += [STDM16_DStarSelectionTool]
222 STDM16_SkimmingTools = []
229 SelectExpression =
"count(STDM16_D0Candidates.passed_Dstar) > 0"
231 STDM16_SelectEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(
232 name =
"STDM16_SelectEvent",
233 expression = SelectExpression)
234 acc.addPublicTool(STDM16_SelectEvent)
235 STDM16_SkimmingTools += [STDM16_SelectEvent]
240 STDM16_ThinningTools = []
246 STDM16_Thin_Vertex = CompFactory.DerivationFramework.Thin_vtxTrk(
247 name =
"STDM16_Thin_Vertex",
248 StreamName = streamName,
250 VertexContainerNames = [
"STDM16_D0Candidates"],
251 PassFlags = [
"passed_Dstar"] )
252 STDM16_ThinningTools += [STDM16_Thin_Vertex]
253 acc.addPublicTool(STDM16_Thin_Vertex)
260 from DerivationFrameworkTools.DerivationFrameworkToolsConfig
import GenericObjectThinningCfg
262 track_thinning_expression =
"(InDetTrackParticles.trackPassDstar == 1)"
263 STDM16_Thin_Tracks = acc.getPrimaryAndMerge(
265 name =
"STDM16_Thin_Tracks",
266 ContainerName =
"InDetTrackParticles",
267 StreamName = streamName,
268 SelectionString = track_thinning_expression))
269 STDM16_ThinningTools += [STDM16_Thin_Tracks]
270 acc.addPublicTool(STDM16_Thin_Tracks)
272 acc.addPublicTool(STDM16_SelectEvent)
273 acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel(
"STDM16Kernel",
274 SkimmingTools = STDM16_SkimmingTools,
275 ThinningTools = STDM16_ThinningTools,
276 AugmentationTools = STDM16_AugmentationTools))