From f3be235c1c743d2b0208322145e0da2e6253793b Mon Sep 17 00:00:00 2001 From: abarton Date: Mon, 22 Aug 2022 14:38:15 +0100 Subject: [PATCH 1/4] Add CA version of BPHY10 and BPHY15 --- .../python/InDetTrackSelectorToolConfig.py | 1 + .../InDetConfig/python/InDetV0FinderConfig.py | 74 +++ .../DerivationFrameworkBPhys/python/BPHY10.py | 315 ++++++++++ .../DerivationFrameworkBPhys/python/BPHY15.py | 555 ++++++++++++++++++ .../python/V0ToolConfig.py | 36 ++ .../python/commonBPHYMethodsCfg.py | 30 +- .../src/JpsiPlusV0Cascade.cxx | 2 +- .../src/Reco_V0Finder.cxx | 1 + .../python/DerivationConfigList.py | 4 +- 9 files changed, 997 insertions(+), 21 deletions(-) create mode 100644 InnerDetector/InDetConfig/python/InDetV0FinderConfig.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY10.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY15.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/V0ToolConfig.py diff --git a/InnerDetector/InDetConfig/python/InDetTrackSelectorToolConfig.py b/InnerDetector/InDetConfig/python/InDetTrackSelectorToolConfig.py index 52ffb43b231..7cd5b9b36db 100644 --- a/InnerDetector/InDetConfig/python/InDetTrackSelectorToolConfig.py +++ b/InnerDetector/InDetConfig/python/InDetTrackSelectorToolConfig.py @@ -44,6 +44,7 @@ def V0InDetConversionTrackSelectorToolCfg(flags, name='InDetV0VxTrackSelector', kwargs.setdefault("significanceZ0_Trt", 3.) kwargs.setdefault("minPt", 400.0) kwargs.setdefault("IsConversion", False) + kwargs.setdefault("UseEventInfoBS", True) acc.setPrivateTools(CompFactory.InDet.InDetConversionTrackSelectorTool(name, **kwargs)) return acc diff --git a/InnerDetector/InDetConfig/python/InDetV0FinderConfig.py b/InnerDetector/InDetConfig/python/InDetV0FinderConfig.py new file mode 100644 index 00000000000..4886b721bea --- /dev/null +++ b/InnerDetector/InDetConfig/python/InDetV0FinderConfig.py @@ -0,0 +1,74 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + + +def V0VKalVrtFitterCfg(config, inname, **kwargs): + from TrkConfig.TrkVKalVrtFitterConfig import BPHY_TrkVKalVrtFitter_InDetExtrapCfg + kwargs.setdefault("MakeExtendedVertex", True) + kwargs.setdefault("IterationNumber", 30) + return BPHY_TrkVKalVrtFitter_InDetExtrapCfg(config, name=inname, **kwargs) + +def InDetV0FinderToolCfg(config, name, V0ContainerName, + KshortContainerName, LambdaContainerName, LambdabarContainerName, **kwargs): + + acc = ComponentAccumulator() + if "V0Tools" not in kwargs: + from TrkConfig.TrkVertexAnalysisUtilsConfig import V0ToolsNoExtrapCfg + kwargs.setdefault("V0Tools", acc.popToolsAndMerge(V0ToolsNoExtrapCfg(config, name+"_V0Tools"))) + acc.addPublicTool(kwargs["V0Tools"]) + + if "VertexPointEstimator" not in kwargs: + from TrkConfig.InDetConversionFinderToolsConfig import BPHY_VertexPointEstimatorCfg + vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(config)) + kwargs.setdefault("VertexPointEstimator", vpest) + acc.addPublicTool(kwargs["VertexPointEstimator"]) + + if "VertexFitterTool" not in kwargs: + from TrkV0Fitter.TrkV0FitterConfig import TrkV0VertexFitterCfg + kwargs.setdefault("VertexFitterTool", acc.popToolsAndMerge(TrkV0VertexFitterCfg(config))) + acc.addPublicTool(kwargs["VertexFitterTool"]) + + if "Extrapolator" not in kwargs: + from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg + kwargs.setdefault("Extrapolator", acc.popToolsAndMerge(AtlasExtrapolatorCfg(config))) + acc.addPublicTool(kwargs["Extrapolator"]) + if "TrackToVertexTool" not in kwargs: + from TrackToVertex.TrackToVertexConfig import InDetTrackToVertexCfg + kwargs.setdefault("TrackToVertexTool", acc.popToolsAndMerge(InDetTrackToVertexCfg(config))) + acc.addPublicTool(kwargs["TrackToVertexTool"]) + if "TrackSelectorTool" not in kwargs: + from InDetConfig.InDetTrackSelectorToolConfig import V0InDetConversionTrackSelectorToolCfg + kwargs.setdefault("TrackSelectorTool", acc.popToolsAndMerge(V0InDetConversionTrackSelectorToolCfg(config))) + acc.addPublicTool(kwargs["TrackSelectorTool"]) + kwargs.setdefault("useV0Fitter", True) + kwargs.setdefault("V0ContainerName", V0ContainerName) + kwargs.setdefault("KshortContainerName", KshortContainerName) + kwargs.setdefault("LambdaContainerName", LambdaContainerName) + kwargs.setdefault("LambdabarContainerName", LambdabarContainerName) + kwargs.setdefault("doSimpleV0", False) + kwargs.setdefault("useVertexCollection", True) + if "VKVertexFitterTool" not in kwargs: + kwargs.setdefault("VKVertexFitterTool", acc.popToolsAndMerge(V0VKalVrtFitterCfg(config, "_BPhysVKVFitter"))) + if "KshortFitterTool" not in kwargs: + kwargs.setdefault("KshortFitterTool", acc.popToolsAndMerge(V0VKalVrtFitterCfg(config, "_BPhysVKKVFitter", + InputParticleMasses = [139.57,139.57], + MassForConstraint = 497.672))) + if "LambdaFitterTool" not in kwargs: + kwargs.setdefault("LambdaFitterTool", acc.popToolsAndMerge(V0VKalVrtFitterCfg(config, "_BPhysVKLFitter", + InputParticleMasses = [938.272,139.57], + MassForConstraint = 1115.68))) + if "LambdabarFitterTool" not in kwargs: + kwargs.setdefault("LambdabarFitterTool",acc.popToolsAndMerge(V0VKalVrtFitterCfg(config, "_BPhysVKLbFitter", + InputParticleMasses = [139.57,938.272], + MassForConstraint = 1115.68))) + if "GammaFitterTool" not in kwargs: + kwargs.setdefault("GammaFitterTool",acc.popToolsAndMerge(V0VKalVrtFitterCfg(config, "_BPhysVKGFitter", + Robustness = 6, + usePhiCnst = True, + useThetaCnst = True, + InputParticleMasses = [0.511,0.511]))) + V0FinderTool = CompFactory.InDet.InDetV0FinderTool(name = name, **kwargs) + acc.setPrivateTools(V0FinderTool) + return acc diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY10.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY10.py new file mode 100644 index 00000000000..5777853734c --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY10.py @@ -0,0 +1,315 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +#==================================================================== +# BPHY10.py +#==================================================================== + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +BPHYDerivationName = "BPHY10" +streamName = "StreamDAOD_BPHY10" + +def BPHY10Cfg(ConfigFlags): + from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg) + from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg + from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg + acc = ComponentAccumulator() + isSimulation = ConfigFlags.Input.isMC + BPHY10_AugOriginalCounts = CompFactory.DerivationFramework.AugOriginalCounts( + name = "BPHY10_AugOriginalCounts", + VertexContainer = "PrimaryVertices", + TrackContainer = "InDetTrackParticles" ) + V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(ConfigFlags, BPHYDerivationName)) + vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(ConfigFlags, BPHYDerivationName)) # VKalVrt vertex fitter + acc.addPublicTool(vkalvrt) + acc.addPublicTool(V0Tools) + trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(ConfigFlags, BPHYDerivationName)) + acc.addPublicTool(trackselect) + vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(ConfigFlags, BPHYDerivationName)) + acc.addPublicTool(vpest) + BPHY10JpsiFinder = CompFactory.Analysis.JpsiFinder( + name = "BPHY10JpsiFinder", + muAndMu = True, + muAndTrack = False, + TrackAndTrack = False, + assumeDiMuons = True, + invMassUpper = 4000.0, + invMassLower = 2600.0, + Chi2Cut = 200., + oppChargesOnly = True, + combOnly = True, + atLeastOneComb = False, + useCombinedMeasurement = False, # Only takes effect if combOnly=True + muonCollectionKey = "Muons", + TrackParticleCollection = "InDetTrackParticles", + V0VertexFitterTool = None, # V0 vertex fitter + useV0Fitter = False, # if False a TrkVertexFitterTool will be used + TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter + TrackSelectorTool = trackselect, + VertexPointEstimator = vpest, + useMCPCuts = False) + + BPHY10JpsiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY10JpsiSelectAndWrite", + VertexSearchTool = BPHY10JpsiFinder, + OutputVtxContainerName = "BPHY10JpsiCandidates", + PVContainerName = "PrimaryVertices", + V0Tools = V0Tools, + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + RefPVContainerName = "SHOULDNOTBEUSED", + DoVertexType = 1) + BPHY10_Select_Jpsi2mumu = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY10_Select_Jpsi2mumu", + HypothesisName = "Jpsi", + InputVtxContainerName = "BPHY10JpsiCandidates", + V0Tools = V0Tools, + VtxMassHypo = 3096.916, + MassMin = 2600.0, + MassMax = 4000.0, + Chi2Max = 200, + DoVertexType =1) + + BPHY10BdJpsiKst = CompFactory.Analysis.JpsiPlus2Tracks( + name = "BPHY10BdJpsiKst", + kaonkaonHypothesis = False, + pionpionHypothesis = False, + kaonpionHypothesis = True, + trkThresholdPt = 500.0, + trkMaxEta = 3.0, + BThresholdPt = 5000., + BMassLower = 4300.0, + BMassUpper = 6300.0, + JpsiContainerKey = "BPHY10JpsiCandidates", + TrackParticleCollection = "InDetTrackParticles", + ExcludeCrossJpsiTracks = False, #setting this to False rejects the muons from J/psi candidate + TrkVertexFitterTool = vkalvrt, + TrackSelectorTool = trackselect, + VertexPointEstimator = vpest, + UseMassConstraint = True, + Chi2Cut = 10.0, + DiTrackPt = 500., + TrkQuadrupletMassLower = 3500.0, + TrkQuadrupletMassUpper = 6800.0, + FinalDiTrackPt = 500. + ) + BPHY10V0ContainerName = "BPHY10RecoV0Candidates" + BPHY10KshortContainerName = "BPHY10RecoKshortCandidates" + BPHY10LambdaContainerName = "BPHY10RecoLambdaCandidates" + BPHY10LambdabarContainerName = "BPHY10RecoLambdabarCandidates" + + V0Decorator = CompFactory.InDet.V0MainDecorator(name = "BPHY10V0Decorator", + V0Tools = V0Tools, + V0ContainerName = BPHY10V0ContainerName, + KshortContainerName = BPHY10KshortContainerName, + LambdaContainerName = BPHY10LambdaContainerName, + LambdabarContainerName = BPHY10LambdabarContainerName) + acc.addPublicTool(V0Decorator) + BPHY10BdKstSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY10BdKstSelectAndWrite", + VertexSearchTool = BPHY10BdJpsiKst, + OutputVtxContainerName = "BPHY10BdJpsiKstCandidates", + PVContainerName = "PrimaryVertices", + V0Tools = V0Tools, + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + RefPVContainerName = "BPHY10RefittedPrimaryVertices1", + RefitPV = True, + MaxPVrefit = 10000, + DoVertexType = 7) + + BPHY10_Select_Bd2JpsiKst = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY10_Select_Bd2JpsiKst", + HypothesisName = "Bd", + InputVtxContainerName = "BPHY10BdJpsiKstCandidates", + V0Tools = V0Tools, + TrkMasses = [105.658, 105.658, 493.677, 139.570], + VtxMassHypo = 5279.6, + MassMin = 100.0, #no mass cuts here + MassMax = 100000.0, #no mass cuts here + Chi2Max = 200) + + BPHY10_Select_Bd2JpsiKstbar = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY10_Select_Bd2JpsiKstbar", + HypothesisName = "Bdbar", + InputVtxContainerName = "BPHY10BdJpsiKstCandidates", + V0Tools = V0Tools, + TrkMasses = [105.658, 105.658, 139.570, 493.677], + VtxMassHypo = 5279.6, + MassMin = 100.0, #no mass cuts here + MassMax = 100000.0, #no mass cuts here + Chi2Max = 200) + + from DerivationFrameworkBPhys.V0ToolConfig import BPHY_InDetV0FinderToolCfg + BPHY10_Reco_V0Finder = CompFactory.DerivationFramework.Reco_V0Finder( + name = "BPHY10_Reco_V0Finder", + V0FinderTool = acc.popToolsAndMerge(BPHY_InDetV0FinderToolCfg(ConfigFlags,BPHYDerivationName, + V0ContainerName = BPHY10V0ContainerName, + KshortContainerName = BPHY10KshortContainerName, + LambdaContainerName = BPHY10LambdaContainerName, + LambdabarContainerName = BPHY10LambdabarContainerName)), + Decorator = V0Decorator, + V0ContainerName = BPHY10V0ContainerName, + KshortContainerName = BPHY10KshortContainerName, + LambdaContainerName = BPHY10LambdaContainerName, + LambdabarContainerName = BPHY10LambdabarContainerName, + CheckVertexContainers = ['BPHY10JpsiCandidates']) + + JpsiV0VertexFit = CompFactory.Trk.TrkVKalVrtFitter( + name = "JpsiV0VertexFit", + Extrapolator = acc.popToolsAndMerge(InDetExtrapolatorCfg(ConfigFlags)), + FirstMeasuredPoint = False, + CascadeCnstPrecision = 1e-6, + MakeExtendedVertex = True) + acc.addPublicTool(JpsiV0VertexFit) + BPHY10JpsiKshort = CompFactory.DerivationFramework.JpsiPlusV0Cascade( + name = "BPHY10JpsiKshort", + V0Tools = V0Tools, + HypothesisName = "Bd", + TrkVertexFitterTool = JpsiV0VertexFit, + V0Hypothesis = 310, + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + JpsiMassLowerCut = 2800., + JpsiMassUpperCut = 4000., + V0MassLowerCut = 400., + V0MassUpperCut = 600., + MassLowerCut = 4300., + MassUpperCut = 6300., + RefitPV = True, + RefPVContainerName = "BPHY10RefittedPrimaryVertices2", + JpsiVertices = "BPHY10JpsiCandidates", + CascadeVertexCollections= ["BPHY10JpsiKshortCascadeSV2", "BPHY10JpsiKshortCascadeSV1"], + V0Vertices = BPHY10V0ContainerName) + + BPHY10JpsiLambda = CompFactory.DerivationFramework.JpsiPlusV0Cascade( + name = "BPHY10JpsiLambda", + V0Tools = V0Tools, + HypothesisName = "Lambda_b", + TrkVertexFitterTool = JpsiV0VertexFit, + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + V0Hypothesis = 3122, + JpsiMassLowerCut = 2800., + JpsiMassUpperCut = 4000., + V0MassLowerCut = 1050., + V0MassUpperCut = 1250., + MassLowerCut = 4600., + MassUpperCut = 6600., + RefitPV = True, + RefPVContainerName = "BPHY10RefittedPrimaryVertices3", + JpsiVertices = "BPHY10JpsiCandidates", + CascadeVertexCollections= ["BPHY10JpsiLambdaCascadeSV2", "BPHY10JpsiLambdaCascadeSV1"], + V0Vertices = BPHY10V0ContainerName) + + BPHY10JpsiLambdabar = CompFactory.DerivationFramework.JpsiPlusV0Cascade( + name = "BPHY10JpsiLambdabar", + HypothesisName = "Lambda_bbar", + V0Tools = V0Tools, + TrkVertexFitterTool = JpsiV0VertexFit, + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + V0Hypothesis = -3122, + JpsiMassLowerCut = 2800., + JpsiMassUpperCut = 4000., + V0MassLowerCut = 1050., + V0MassUpperCut = 1250., + MassLowerCut = 4600., + MassUpperCut = 6600., + RefitPV = True, + RefPVContainerName = "BPHY10RefittedPrimaryVertices4", + JpsiVertices = "BPHY10JpsiCandidates", + CascadeVertexCollections= ["BPHY10JpsiLambdabarCascadeSV2", "BPHY10JpsiLambdabarCascadeSV1"], + V0Vertices = BPHY10V0ContainerName) + + CascadeCollections = [] + CascadeCollections += BPHY10JpsiKshort.CascadeVertexCollections + CascadeCollections += BPHY10JpsiLambda.CascadeVertexCollections + CascadeCollections += BPHY10JpsiLambdabar.CascadeVertexCollections + + if not isSimulation: #Only Skim Data + BPHY10_SelectBdJpsiKstEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool( + name = "BPHY10_SelectBdJpsiKstEvent", + expression = "(count(BPHY10BdJpsiKstCandidates.passed_Bd > 0) + count(BPHY10BdJpsiKstCandidates.passed_Bdbar > 0) + count(BPHY10JpsiKshortCascadeSV1.x > -999) + count(BPHY10JpsiLambdaCascadeSV1.x > -999) + count(BPHY10JpsiLambdabarCascadeSV1.x > -999) ) > 0") + BPHY10SkimmingOR = CompFactory.DerivationFramework.FilterCombinationOR( + "BPHY10SkimmingOR", + FilterList = [BPHY10_SelectBdJpsiKstEvent]) + acc.addPublicTool(BPHY10_SelectBdJpsiKstEvent) + acc.addPublicTool(BPHY10SkimmingOR) + + + augTools = [BPHY10JpsiSelectAndWrite, BPHY10_Select_Jpsi2mumu, + BPHY10BdKstSelectAndWrite, BPHY10_Select_Bd2JpsiKst, BPHY10_Select_Bd2JpsiKstbar, + BPHY10_Reco_V0Finder, BPHY10JpsiKshort, BPHY10JpsiLambda, BPHY10JpsiLambdabar, + BPHY10_AugOriginalCounts] + for t in augTools : acc.addPublicTool(t) + #from AthenaCommon.Constants import DEBUG + acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY10Kernel", + AugmentationTools = augTools, + #OutputLevel = DEBUG, + #Only skim if not MC + SkimmingTools = [BPHY10SkimmingOR] if not isSimulation else [], + ThinningTools = [])) + from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper + from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg + BPHY10SlimmingHelper = SlimmingHelper("BPHY10SlimmingHelper", NamesAndTypes = ConfigFlags.Input.TypedCollections) + AllVariables = [] + StaticContent = [] + + # Needed for trigger objects + BPHY10SlimmingHelper.IncludeMuonTriggerContent = True + BPHY10SlimmingHelper.IncludeBPhysTriggerContent = True + + ## primary vertices + AllVariables += ["PrimaryVertices"] + + for x in range(1,5): + StaticContent += ["xAOD::VertexContainer#BPHY10RefittedPrimaryVertices%s" % str(x)] + StaticContent += ["xAOD::VertexAuxContainer#BPHY10RefittedPrimaryVertices%sAux." % str(x)] + + ## ID track particles + AllVariables += ["InDetTrackParticles"] + + ## combined / extrapolated muon track particles + ## (note: for tagged muons there is no extra TrackParticle collection since the ID tracks + ## are store in InDetTrackParticles collection) + AllVariables += ["CombinedMuonTrackParticles"] + AllVariables += ["ExtrapolatedMuonTrackParticles"] + + ## muon container + AllVariables += ["Muons"] + + + ## Jpsi candidates + StaticContent += ["xAOD::VertexContainer#%s" % BPHY10JpsiSelectAndWrite.OutputVtxContainerName] + ## we have to disable vxTrackAtVertex branch since it is not xAOD compatible + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10JpsiSelectAndWrite.OutputVtxContainerName] + + StaticContent += ["xAOD::VertexContainer#%s" % BPHY10BdKstSelectAndWrite.OutputVtxContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10BdKstSelectAndWrite.OutputVtxContainerName] + + StaticContent += ["xAOD::VertexContainer#%s" % BPHY10V0ContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10V0ContainerName] + StaticContent += ["xAOD::VertexContainer#%s" % BPHY10KshortContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10KshortContainerName] + StaticContent += ["xAOD::VertexContainer#%s" % BPHY10LambdaContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10LambdaContainerName] + StaticContent += ["xAOD::VertexContainer#%s" % BPHY10LambdabarContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY10LambdabarContainerName] + + for cascades in CascadeCollections: + StaticContent += ["xAOD::VertexContainer#%s" % cascades] + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % cascades] + + # Tagging information (in addition to that already requested by usual algorithms) + AllVariables += ["GSFTrackParticles", "MuonSpectrometerTrackParticles" ] + + # Truth information for MC only + if isSimulation: + AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"] + + AllVariables = list(set(AllVariables)) # remove duplicates + + BPHY10SlimmingHelper.AllVariables = AllVariables + BPHY10SlimmingHelper.StaticContent = StaticContent + BPHY10SlimmingHelper.SmartCollections = [] + BPHY10ItemList = BPHY10SlimmingHelper.GetItemList() + acc.merge(OutputStreamCfg(ConfigFlags, "DAOD_BPHY10", ItemList=BPHY10ItemList, AcceptAlgs=["BPHY10Kernel"])) + acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True, printComponentsOnly=False) + return acc diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY15.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY15.py new file mode 100644 index 00000000000..7925ead1337 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY15.py @@ -0,0 +1,555 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +#==================================================================== +# BPHY15.py +#==================================================================== + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + + +BPHYDerivationName = "BPHY15" +streamName = "StreamDAOD_BPHY15" + +def BPHY15Cfg(ConfigFlags): + from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg) + from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg + acc = ComponentAccumulator() + V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(ConfigFlags, BPHYDerivationName)) + vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(ConfigFlags, BPHYDerivationName)) # VKalVrt vertex fitter + acc.addPublicTool(vkalvrt) + acc.addPublicTool(V0Tools) + trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(ConfigFlags, BPHYDerivationName)) + acc.addPublicTool(trackselect) + vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(ConfigFlags, BPHYDerivationName)) + acc.addPublicTool(vpest) + PVrefit = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)) + acc.addPublicTool(PVrefit) + isSimulation = ConfigFlags.Input.isMC + BPHY15_AugOriginalCounts = CompFactory.DerivationFramework.AugOriginalCounts( + name = "BPHY15_AugOriginalCounts", + VertexContainer = "PrimaryVertices", + TrackContainer = "InDetTrackParticles" ) + BPHY15JpsiFinder = CompFactory.Analysis.JpsiFinder( + name = "BPHY15JpsiFinder", + muAndMu = True, + muAndTrack = False, + TrackAndTrack = False, + assumeDiMuons = True, + muonThresholdPt = 2700, + invMassUpper = 3400.0, + invMassLower = 2800.0, + Chi2Cut = 10., + oppChargesOnly = True, + allMuons = True, + combOnly = False, + atLeastOneComb = False, + useCombinedMeasurement = False, # Only takes effect if combOnly=True + muonCollectionKey = "Muons", + TrackParticleCollection = "InDetTrackParticles", + V0VertexFitterTool = None, # V0 vertex fitter + useV0Fitter = False, + TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter + TrackSelectorTool = trackselect, + VertexPointEstimator = vpest, + useMCPCuts = False) + acc.addPublicTool(BPHY15JpsiFinder) + BPHY15JpsiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY15JpsiSelectAndWrite", + VertexSearchTool = BPHY15JpsiFinder, + OutputVtxContainerName = "BPHY15JpsiCandidates", + V0Tools = V0Tools, + PVRefitter = PVrefit, + PVContainerName = "PrimaryVertices", + RefPVContainerName = "SHOULDNOTBEUSED", + DoVertexType = 1) + + BPHY15_Select_Jpsi2mumu = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_Jpsi2mumu", + HypothesisName = "Jpsi", + InputVtxContainerName = "BPHY15JpsiCandidates", + V0Tools = V0Tools, + VtxMassHypo = 3096.900, + MassMin = 2600.0, + MassMax = 3600.0, + Chi2Max = 200, + LxyMin = 0.1, + DoVertexType = 1) + + BPHY15BcJpsipi = CompFactory.Analysis.JpsiPlus1Track( + name = "BPHY15BcJpsipi", + pionHypothesis = True, + kaonHypothesis = False, + trkThresholdPt = 2700, + trkMaxEta = 2.7, + BThresholdPt = 100.0, + BMassUpper = 6900.0, + BMassLower = 5600.0, + JpsiContainerKey = "BPHY15JpsiCandidates", + TrackParticleCollection = "InDetTrackParticles", + MuonsUsedInJpsi = "Muons", + TrkVertexFitterTool = vkalvrt, + TrackSelectorTool = trackselect, + UseMassConstraint = True, + Chi2Cut = 5, + TrkTrippletMassUpper = 6900, + TrkTrippletMassLower = 5600) + acc.addPublicTool(BPHY15BcJpsipi) + BPHY15BcJpsipiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY15BcJpsipiSelectAndWrite", + VertexSearchTool = BPHY15BcJpsipi, + V0Tools = V0Tools, + PVRefitter = PVrefit, + OutputVtxContainerName = "BPHY15BcJpsipiCandidates", + PVContainerName = "PrimaryVertices", + RefPVContainerName = "BPHY15RefittedPrimaryVertices1", + RefitPV = True, + MaxPVrefit = 1000) + BPHY15_Select_Bc2Jpsipi = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_Bc2Jpsipi", + HypothesisName = "Bc", + InputVtxContainerName = "BPHY15BcJpsipiCandidates", + V0Tools = V0Tools, + TrkMasses = [105.658, 105.658, 139.571], + VtxMassHypo = 6274.9, + MassMin = 5600.0, + MassMax = 6900.0, + Chi2Max = 200) + BPHY15JpsipiFinder = CompFactory.Analysis.JpsiPlus1Track( + name = "BPHY15JpsipiFinder", + pionHypothesis = True, + kaonHypothesis = False, + trkThresholdPt = 350.0, + trkMaxEta = 2.7, + BThresholdPt = 5000.0, + BMassUpper = 3600.0, + BMassLower = 3200.0, + TrkDeltaZ = 20., + TrkQuadrupletPt = 5000, + JpsiContainerKey = "BPHY15JpsiCandidates", + TrackParticleCollection = "InDetTrackParticles", + MuonsUsedInJpsi = "Muons", + TrkVertexFitterTool = vkalvrt, + TrackSelectorTool = trackselect, + UseMassConstraint = True, + Chi2Cut = 5, + TrkTrippletMassUpper = 3600, + TrkTrippletMassLower = 3200) + acc.addPublicTool(BPHY15JpsipiFinder) + + BPHY15JpsipiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY15JpsipiSelectAndWrite", + VertexSearchTool = BPHY15JpsipiFinder, + PVRefitter = PVrefit, + V0Tools = V0Tools, + OutputVtxContainerName = "BPHY15JpsipiCandidates", + PVContainerName = "PrimaryVertices", + RefPVContainerName = "SHOULDNOTBEUSED", + MaxPVrefit = 1000) + + BPHY15_Select_Jpsipi = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_Jpsipi", + HypothesisName = "Jpsipi", + V0Tools = V0Tools, + TrkMasses = [105.658, 105.658, 139.571], + InputVtxContainerName = "BPHY15JpsipiCandidates", + VtxMassHypo = 3396.900, + MassMin = 3200.0, + MassMax = 3600.0, + Chi2Max = 200, + LxyMin = 0.1, + DoVertexType = 1) + + BPHY15DiTrkFinder = CompFactory.Analysis.JpsiFinder( + name = "BPHY15DiTrkFinder", + muAndMu = False, + muAndTrack = False, + TrackAndTrack = True, + assumeDiMuons = False, # If true, will assume dimu hypothesis and use PDG value for mu mass + trackThresholdPt = 900, + invMassUpper = 1900.0, + invMassLower = 280.0, + Chi2Cut = 10., + oppChargesOnly = True, + atLeastOneComb = False, + useCombinedMeasurement = False, # Only takes effect if combOnly=True + muonCollectionKey = "Muons", + TrackParticleCollection = "InDetTrackParticles", + V0VertexFitterTool = None, + useV0Fitter = False, + TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter + TrackSelectorTool = trackselect, + VertexPointEstimator = vpest, + useMCPCuts = False, + track1Mass = 139.571, # Not very important, only used to calculate inv. mass cut, leave it loose here + track2Mass = 139.571) + acc.addPublicTool(BPHY15DiTrkFinder) + BPHY15DiTrkSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY15DiTrkSelectAndWrite", + VertexSearchTool = BPHY15DiTrkFinder, + OutputVtxContainerName = "BPHY15DiTrkCandidates", + PVContainerName = "PrimaryVertices", + V0Tools = V0Tools, + PVRefitter = PVrefit, + RefPVContainerName = "SHOULDNOTBEUSED", + CheckCollections = True, + CheckVertexContainers = ['BPHY15JpsiCandidates'], + DoVertexType = 1) + + BPHY15_Select_D0 = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_D0", + HypothesisName = "D0", + InputVtxContainerName = "BPHY15DiTrkCandidates", + V0Tools = V0Tools, + TrkMasses = [139.571, 493.677], + VtxMassHypo = 1864.83, + MassMin = 1864.83-170, + MassMax = 1864.83+170, + LxyMin = 0.15, + Chi2Max = 200) + + BPHY15_Select_D0b = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_D0b", + HypothesisName = "D0b", + InputVtxContainerName = "BPHY15DiTrkCandidates", + V0Tools = V0Tools, + TrkMasses = [493.677, 139.571], + VtxMassHypo = 1864.83, + MassMin = 1864.83-170, + MassMax = 1864.83+170, + LxyMin = 0.15, + Chi2Max = 200) + + BPHY15Dh3Finder = CompFactory.Analysis.JpsiPlus1Track( + name = "BPHY15Dh3Finder", + pionHypothesis = True, + kaonHypothesis = False, + trkThresholdPt = 900.0, + trkMaxEta = 2.7, # is this value fine?? default would be 102.5 + BThresholdPt = 2000.0, + BMassUpper = 1800.0, # What is this?? + BMassLower = 500.0, + TrkDeltaZ = 20., + TrkTrippletMassUpper = 1800, + TrkTrippletMassLower = 500, + TrkQuadrupletPt = 2000, + JpsiContainerKey = "BPHY15DiTrkCandidates", + TrackParticleCollection = "InDetTrackParticles", + MuonsUsedInJpsi = "NONE", # ? + ExcludeCrossJpsiTracks = False, + TrkVertexFitterTool = vkalvrt, + TrackSelectorTool = trackselect, + UseMassConstraint = False, + Chi2Cut = 5) #Cut on chi2/Ndeg_of_freedom + acc.addPublicTool(BPHY15Dh3Finder) + BPHY15Dh3SelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY15Dh3SelectAndWrite", + VertexSearchTool = BPHY15Dh3Finder, + V0Tools = V0Tools, + PVRefitter = PVrefit, + OutputVtxContainerName = "BPHY15Dh3Candidates", + PVContainerName = "PrimaryVertices", + RefPVContainerName = "SHOULDNOTBEUSED", + MaxPVrefit = 1000) + + BPHY15_Select_Ds = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_Ds", + HypothesisName = "Ds", + V0Tools = V0Tools, + TrkMasses = [493.677, 493.677, 139.571], + InputVtxContainerName = "BPHY15Dh3Candidates", + VtxMassHypo = 1968.28, + MassMin = 1968.28-200, + MassMax = 1968.28+200, + Chi2Max = 200, + LxyMin = 0.1, + DoVertexType = 1) + + BPHY15_Select_Dp = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_Dp", + HypothesisName = "Dp", + V0Tools = V0Tools, + TrkMasses = [139.571, 493.677, 139.571], + InputVtxContainerName = "BPHY15Dh3Candidates", + VtxMassHypo = 1869.59, + MassMin = 1869.59-200, + MassMax = 1869.59+200, + Chi2Max = 200, + LxyMin = 0.1, + DoVertexType = 1) + + BPHY15_Select_Dm = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_Dm", + HypothesisName = "Dm", + V0Tools = V0Tools, + TrkMasses = [493.677, 139.571, 139.571], + InputVtxContainerName = "BPHY15Dh3Candidates", + VtxMassHypo = 1869.59, + MassMin = 1869.59-200, + MassMax = 1869.59+200, + Chi2Max = 200, + LxyMin = 0.1, + DoVertexType = 1) + + BcJpsiDxVertexFit = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(ConfigFlags, BPHYDerivationName + "BcJpsiDx", CascadeCnstPrecision = 1e-6)) + acc.addPublicTool(BcJpsiDxVertexFit) + BPHY15JpsiDs = CompFactory.DerivationFramework.JpsiPlusDsCascade( + name = "BPHY15JpsiDs", + HypothesisName = "Bc", + V0Tools = V0Tools, + TrkVertexFitterTool = BcJpsiDxVertexFit, + PVRefitter = PVrefit, + DxHypothesis = 431, + ApplyDxMassConstraint = True, + ApplyJpsiMassConstraint = True, + JpsiMassLowerCut = 2600., + JpsiMassUpperCut = 3600., + DxMassLowerCut = 1968.28 - 200., + DxMassUpperCut = 1968.28 + 200., + MassLowerCut = 6274.90 - 600., + MassUpperCut = 6274.90 + 600., + Chi2Cut = 10, + RefitPV = True, + RefPVContainerName = "BPHY15RefittedPrimaryVertices2", + JpsiVertices = "BPHY15JpsiCandidates", + CascadeVertexCollections = ["BcJpsiDsCascadeSV2", "BcJpsiDsCascadeSV1"], + DxVertices = "BPHY15Dh3Candidates") + + BPHY15JpsiDp = CompFactory.DerivationFramework.JpsiPlusDsCascade( + name = "BPHY15JpsiDp", + HypothesisName = "Bc", + V0Tools = V0Tools, + TrkVertexFitterTool = BcJpsiDxVertexFit, + PVRefitter = PVrefit, + DxHypothesis = 411, + ApplyDxMassConstraint = True, + ApplyJpsiMassConstraint = True, + JpsiMassLowerCut = 2600., + JpsiMassUpperCut = 3600., + DxMassLowerCut = 1869.59 - 180., + DxMassUpperCut = 1869.59 + 180., + MassLowerCut = 6274.90 - 600., + MassUpperCut = 6274.90 + 600., + Chi2Cut = 10, + RefitPV = True, + RefPVContainerName = "BPHY15RefittedPrimaryVertices3", + JpsiVertices = "BPHY15JpsiCandidates", + CascadeVertexCollections = ["BcJpsiDpCascadeSV2", "BcJpsiDpCascadeSV1"], + DxVertices = "BPHY15Dh3Candidates") + + BcJpsiDstVertexFit = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(ConfigFlags, BPHYDerivationName + "BcJpsiDst", CascadeCnstPrecision = 1e-6)) + acc.addPublicTool(BcJpsiDstVertexFit) + + BPHY15JpsiDpst = CompFactory.DerivationFramework.JpsiPlusDpstCascade( + name = "BPHY15JpsiDpst", + HypothesisName = "Bc", + V0Tools = V0Tools, + TrkVertexFitterTool = BcJpsiDstVertexFit, + PVRefitter = PVrefit, + DxHypothesis = 421, + ApplyD0MassConstraint = True, + ApplyJpsiMassConstraint = True, + JpsiMassLowerCut = 2600., + JpsiMassUpperCut = 3600., + JpsipiMassLowerCut = 2600., + JpsipiMassUpperCut = 6800., + D0MassLowerCut = 1864.83 - 200., + D0MassUpperCut = 1864.83 + 200., + DstMassLowerCut = 2010.26 - 300., + DstMassUpperCut = 2010.26 + 300., + MassLowerCut = 5400, + MassUpperCut = 6274.90 + 600., + Chi2Cut = 10, + RefitPV = True, + RefPVContainerName = "BPHY15RefittedPrimaryVertices4", + JpsipiVertices = "BPHY15JpsipiCandidates", + CascadeVertexCollections = ["BcJpsiDpstCascadeSV2", "BcJpsiDpstCascadeSV1"], + D0Vertices = "BPHY15DiTrkCandidates") + + from TrkConfig.TrkV0FitterConfig import TrkV0VertexFitter_InDetExtrCfg + v0Vertexfit = acc.popToolsAndMerge(TrkV0VertexFitter_InDetExtrCfg(ConfigFlags)) + acc.addPublicTool(v0Vertexfit) + BPHY15K0Finder = CompFactory.Analysis.JpsiFinder( + name = "BPHY15K0Finder", + muAndMu = False, + muAndTrack = False, + TrackAndTrack = True, + assumeDiMuons = False, # If true, will assume dimu hypothesis and use PDG value for mu mass + trackThresholdPt = 400, + invMassUpper = 600.0, + invMassLower = 400.0, + Chi2Cut = 20, + oppChargesOnly = True, + atLeastOneComb = False, + useCombinedMeasurement = False, # Only takes effect if combOnly=True + muonCollectionKey = "Muons", + TrackParticleCollection = "InDetTrackParticles", + V0VertexFitterTool = v0Vertexfit, # V0 vertex fitter + useV0Fitter = True, # if False a TrkVertexFitterTool will be used + TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter + TrackSelectorTool = trackselect, + VertexPointEstimator = vpest, + useMCPCuts = False, + track1Mass = 139.571, # Not very important, only used to calculate inv. mass cut, leave it loose here + track2Mass = 139.571) + acc.addPublicTool(BPHY15K0Finder) + BPHY15K0SelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY15K0SelectAndWrite", + VertexSearchTool = BPHY15K0Finder, + OutputVtxContainerName = "BPHY15K0Candidates", + PVContainerName = "PrimaryVertices", + RefPVContainerName = "SHOULDNOTBEUSED", + V0Tools = V0Tools, + PVRefitter = PVrefit, + CheckCollections = True, + CheckVertexContainers = ['BPHY15JpsipiCandidates','BPHY15DiTrkCandidates','BcJpsiDpstCascadeSV1'], + DoVertexType = 1) + + BPHY15_Select_K0 = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY15_Select_K0", + HypothesisName = "K0", + InputVtxContainerName = "BPHY15K0Candidates", + V0Tools = V0Tools, + TrkMasses = [139.571, 139.571], + VtxMassHypo = 497.672, + MassMin = 400, + MassMax = 600, + LxyMin = 0.2, + Chi2Max = 200) + + BcJpsiDs1VertexFit = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(ConfigFlags, BPHYDerivationName + "BcJpsiDs1", CascadeCnstPrecision = 1e-6)) + acc.addPublicTool(BcJpsiDs1VertexFit) + + BPHY15JpsiDps1 = CompFactory.DerivationFramework.JpsiPlusDs1Cascade( + name = "BPHY15JpsiDps1", + HypothesisName = "Bc", + TrkVertexFitterTool = BcJpsiDs1VertexFit, + PVRefitter = PVrefit, + V0Tools = V0Tools, + DxHypothesis = 421, + ApplyD0MassConstraint = True, + ApplyK0MassConstraint = True, + ApplyJpsiMassConstraint = True, + JpsiMassLowerCut = 2600., + JpsiMassUpperCut = 3600., + JpsipiMassLowerCut = 2600., + JpsipiMassUpperCut = 6800., + D0MassLowerCut = 1864.83 - 180., + D0MassUpperCut = 1864.83 + 180., + K0MassLowerCut = 400., + K0MassUpperCut = 600., + DstMassLowerCut = 2010.26 - 300., + DstMassUpperCut = 2010.26 + 300., + MassLowerCut = 6274.90 - 600, + MassUpperCut = 6274.90 + 600., + Chi2Cut = 10, + RefitPV = True, + RefPVContainerName = "BPHY15RefittedPrimaryVertices5", + JpsipiVertices = "BPHY15JpsipiCandidates", + CascadeVertexCollections = ["BcJpsiDps1CascadeSV3", "BcJpsiDps1CascadeSV2", "BcJpsiDps1CascadeSV1"], + K0Vertices = "BPHY15K0Candidates", + D0Vertices = "BPHY15DiTrkCandidates") + + #-------------------------------------------------------------------- + + CascadeCollections = [] + + CascadeCollections += BPHY15JpsiDs.CascadeVertexCollections + CascadeCollections += BPHY15JpsiDp.CascadeVertexCollections + + CascadeCollections += BPHY15JpsiDpst.CascadeVertexCollections + CascadeCollections += BPHY15JpsiDps1.CascadeVertexCollections + + #-------------------------------------------------------------------- + if not isSimulation: #Only Skim Data + BPHY15_SelectBcJpsipiEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool( + name = "BPHY15_SelectBcJpsipiEvent", + expression = "( count(BPHY15BcJpsipiCandidates.passed_Bc > 0) + count(BcJpsiDsCascadeSV1.x > -999) + count(BcJpsiDpCascadeSV1.x > -999) + count(BcJpsiDpstCascadeSV1.x > -999) + count(BcJpsiDps1CascadeSV1.x > -999) ) > 0") + acc.addPublicTool(BPHY15_SelectBcJpsipiEvent) + #==================================================================== + # Make event selection based on an OR of the input skimming tools + #==================================================================== + + BPHY15SkimmingOR = CompFactory.DerivationFramework.FilterCombinationOR( + "BPHY15SkimmingOR", + FilterList = [BPHY15_SelectBcJpsipiEvent] ) + acc.addPublicTool(BPHY15SkimmingOR) + + augTools = [BPHY15JpsiSelectAndWrite, BPHY15_Select_Jpsi2mumu, + BPHY15BcJpsipiSelectAndWrite, BPHY15_Select_Bc2Jpsipi, + BPHY15JpsipiSelectAndWrite, BPHY15_Select_Jpsipi, + BPHY15DiTrkSelectAndWrite, BPHY15_Select_D0, BPHY15_Select_D0b, + BPHY15Dh3SelectAndWrite, BPHY15_Select_Ds, BPHY15_Select_Dp, BPHY15_Select_Dm, + BPHY15JpsiDs, + BPHY15JpsiDp, + BPHY15JpsiDpst, + BPHY15K0SelectAndWrite, BPHY15_Select_K0, + BPHY15JpsiDps1, + BPHY15_AugOriginalCounts] + for t in augTools : acc.addPublicTool(t) + acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY15Kernel", + AugmentationTools = augTools, + #Only skim if not MC + SkimmingTools = [BPHY15SkimmingOR] if not isSimulation else [], + ThinningTools = [])) + + from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper + from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg + BPHY15SlimmingHelper = SlimmingHelper("BPHY15SlimmingHelper", NamesAndTypes = ConfigFlags.Input.TypedCollections) + AllVariables = [] + StaticContent = [] + + # Needed for trigger objects + BPHY15SlimmingHelper.IncludeMuonTriggerContent = True + BPHY15SlimmingHelper.IncludeBPhysTriggerContent = True + + ## primary vertices + AllVariables += ["PrimaryVertices"] + for x in range(1,6): + StaticContent += ["xAOD::VertexContainer#BPHY15RefittedPrimaryVertices%s" % str(x)] + StaticContent += ["xAOD::VertexAuxContainer#BPHY15RefittedPrimaryVertices%sAux." % str(x)] + + ## ID track particles + AllVariables += ["InDetTrackParticles"] + + ## combined / extrapolated muon track particles + ## (note: for tagged muons there is no extra TrackParticle collection since the ID tracks + ## are store in InDetTrackParticles collection) + AllVariables += ["CombinedMuonTrackParticles"] + AllVariables += ["ExtrapolatedMuonTrackParticles"] + + ## muon container + AllVariables += ["Muons"] + + + ## Jpsi candidates + StaticContent += ["xAOD::VertexContainer#%s" % BPHY15JpsiSelectAndWrite.OutputVtxContainerName] + ## we have to disable vxTrackAtVertex branch since it is not xAOD compatible + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY15JpsiSelectAndWrite.OutputVtxContainerName] + + ## Bc+>J/psi pi+ candidates + StaticContent += ["xAOD::VertexContainer#%s" % BPHY15BcJpsipiSelectAndWrite.OutputVtxContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY15BcJpsipiSelectAndWrite.OutputVtxContainerName] + + + ## Bc+>J/psi D_(s)+/-, J/psi D*+/- and J/psi D_s1+/- candidates + for cascades in CascadeCollections: + StaticContent += ["xAOD::VertexContainer#%s" % cascades] + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % cascades] + + # Tagging information (in addition to that already requested by usual algorithms) + AllVariables += ["GSFTrackParticles", "MuonSpectrometerTrackParticles" ] + + # Truth information for MC only + if isSimulation: + AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"] + + AllVariables = list(set(AllVariables)) # remove duplicates + + BPHY15SlimmingHelper.AllVariables = AllVariables + BPHY15SlimmingHelper.StaticContent = StaticContent + + BPHY15ItemList = BPHY15SlimmingHelper.GetItemList() + acc.merge(OutputStreamCfg(ConfigFlags, "DAOD_BPHY15", ItemList=BPHY15ItemList, AcceptAlgs=["BPHY15Kernel"])) + acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True, printComponentsOnly=False) + return acc diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/V0ToolConfig.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/V0ToolConfig.py new file mode 100644 index 00000000000..9c2e2183382 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/V0ToolConfig.py @@ -0,0 +1,36 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + + +def V0VtxPointEstimatorCfg(config, derivation): + V0VtxPointEstimator = CompFactory.InDet.VertexPointEstimator(name = derivation+"_VtxPointEstimator", + MaxTrkXYDiffAtVtx = [20.,20.,20.], + MaxTrkZDiffAtVtx = [100.,100.,100.], + MaxTrkXYValue = [400.,400.,400.], + MinArcLength = [-800.,-800.,-800.], + MaxArcLength = [800.,800.,800.], + MinDeltaR = [-10000.,-10000.,-10000.], + MaxDeltaR = [10000.,10000.,10000.], + MaxPhi = [10000., 10000., 10000.], + MaxChi2OfVtxEstimation = 2000.) + acc = ComponentAccumulator() + acc.setPrivateTools(V0VtxPointEstimator) + return acc + +def BPHY_InDetV0FinderToolCfg(config, derivation, V0ContainerName, KshortContainerName, LambdaContainerName, LambdabarContainerName): + from InDetConfig.InDetV0FinderConfig import InDetV0FinderToolCfg + from TrackToVertex.TrackToVertexConfig import InDetTrackToVertexCfg + acc = ComponentAccumulator() + from TrkConfig.TrkV0FitterConfig import TrkV0VertexFitter_InDetExtrCfg + args = { "VertexPointEstimator" : acc.popToolsAndMerge(V0VtxPointEstimatorCfg(config, derivation)), + "TrackToVertexTool" : acc.popToolsAndMerge(InDetTrackToVertexCfg(config)), + "VertexFitterTool" : acc.popToolsAndMerge(TrkV0VertexFitter_InDetExtrCfg(config)) + } + V0FinderTool = acc.popToolsAndMerge(InDetV0FinderToolCfg(config, name = derivation + "_InDetV0FinderTool", V0ContainerName=V0ContainerName, + KshortContainerName=KshortContainerName, + LambdaContainerName=LambdaContainerName, + LambdabarContainerName= LambdabarContainerName, **args)) + acc.setPrivateTools(V0FinderTool) + return acc diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/commonBPHYMethodsCfg.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/commonBPHYMethodsCfg.py index 7f1d0cf6c7d..150fedf4509 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/commonBPHYMethodsCfg.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/commonBPHYMethodsCfg.py @@ -5,24 +5,25 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory -def BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName): +def BPHY_TrkVKalVrtFitterCfg(flags, BPHYDerivationName, **kwargs): acc = ComponentAccumulator() - from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg - extrap = acc.popToolsAndMerge(InDetExtrapolatorCfg(flags)) + if "Extrapolator" not in kwargs: + from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg + kwargs.setdefault("Extrapolator", acc.popToolsAndMerge(InDetExtrapolatorCfg(flags))) + if "FirstMeasuredPoint" not in kwargs: + kwargs.setdefault("FirstMeasuredPoint", False) + if "MakeExtendedVertex" not in kwargs: + kwargs.setdefault("MakeExtendedVertex", True) tool = CompFactory.Trk.TrkVKalVrtFitter( name = BPHYDerivationName+"_VKalVrtFitter", - Extrapolator = extrap, - FirstMeasuredPoint = False, - MakeExtendedVertex = True) + **kwargs) acc.setPrivateTools(tool) return acc def BPHY_V0ToolCfg(flags, BPHYDerivationName): - acc = ComponentAccumulator() - tool =CompFactory.Trk.V0Tools(name = BPHYDerivationName + "_V0Tools",Extrapolator = None, DisableExtrapolator = True) - acc.setPrivateTools(tool) - return acc + from TrkConfig.TrkVertexAnalysisUtilsConfig import V0ToolsNoExtrapCfg + return V0ToolsNoExtrapCfg(flags, BPHYDerivationName+"_V0Tools") def BPHY_VertexPointEstimatorCfg(flags, BPHYDerivationName): acc = ComponentAccumulator() @@ -65,14 +66,5 @@ def BPHY_InDetDetailedTrackSelectorToolCfg(flags,BPHYDerivationName, **kwargs): Extrapolator = extrap ) acc.setPrivateTools(InDetTrackSelectorTool) - print("UseEventInfoBS = True,") return acc - -def BPHY_TrkV0VertexFitterCfg(flags) : - acc = ComponentAccumulator() - from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg - extrap = acc.popToolsAndMerge(InDetExtrapolatorCfg(flags)) - tool = CompFactory.Trk.TrkV0VertexFitter("TrkV0VertexFitter", MaxIterations=10, Use_deltaR=False, Extrapolator=extrap ) - acc.setPrivateTools(tool) - return acc diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusV0Cascade.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusV0Cascade.cxx index 0c377d410bb..ba657079385 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusV0Cascade.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusV0Cascade.cxx @@ -391,7 +391,7 @@ namespace DerivationFramework { m_constrV0(true), m_constrJpsi(true), m_iVertexFitter("Trk::TrkVKalVrtFitter"), - m_pvRefitter("Analysis::PrimaryVertexRefitter"), + m_pvRefitter("Analysis::PrimaryVertexRefitter", this), m_V0Tools("Trk::V0Tools"), m_CascadeTools("DerivationFramework::CascadeTools") { diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/Reco_V0Finder.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/Reco_V0Finder.cxx index 20b1b10b2ea..90bf2601455 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/Reco_V0Finder.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/Reco_V0Finder.cxx @@ -32,6 +32,7 @@ namespace DerivationFramework { ATH_MSG_DEBUG("in initialize()"); // get the V0Finder tool ATH_CHECK( m_v0FinderTool.retrieve()); + ATH_CHECK( m_v0DecoTool.retrieve()); ATH_CHECK(m_vertexKey.initialize()); ATH_CHECK(m_v0Key.initialize()); diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkConfiguration/python/DerivationConfigList.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkConfiguration/python/DerivationConfigList.py index 14654a8b82e..d1e9dafd1f0 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkConfiguration/python/DerivationConfigList.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkConfiguration/python/DerivationConfigList.py @@ -47,7 +47,9 @@ from DerivationFrameworkBPhys.BPHY3 import BPHY3Cfg from DerivationFrameworkBPhys.BPHY4 import BPHY4Cfg from DerivationFrameworkBPhys.BPHY5 import BPHY5Cfg from DerivationFrameworkBPhys.BPHY6 import BPHY6Cfg +from DerivationFrameworkBPhys.BPHY10 import BPHY10Cfg from DerivationFrameworkBPhys.BPHY12 import BPHY12Cfg +from DerivationFrameworkBPhys.BPHY15 import BPHY15Cfg # TileCal derivations from DerivationFrameworkTileCal.TCAL1 import TCAL1Cfg @@ -62,6 +64,6 @@ __all__ = ['TEST1Cfg','TEST2Cfg','TEST3Cfg','TEST4Cfg','TEST5Cfg','TEST6Cfg', 'LLP1Cfg', 'BPHY1Cfg','BPHY2Cfg', 'BPHY3Cfg', 'BPHY4Cfg', 'BPHY5Cfg', 'BPHY6Cfg', - 'BPHY12Cfg', + 'BPHY10Cfg', 'BPHY12Cfg', 'BPHY15Cfg', 'TCAL1Cfg', 'TCAL2Cfg'] -- GitLab From 320653b486b9a7efef144705223d9b0c4cee569c Mon Sep 17 00:00:00 2001 From: abarton Date: Fri, 26 Aug 2022 13:38:44 +0100 Subject: [PATCH 2/4] allow InDetConversionTrackSelectorTool to run without BeamspotCondAlg --- .../InDetConversionTrackSelectorTool.h | 5 +- .../src/InDetConversionTrackSelectorTool.cxx | 53 +++++++++++++------ 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetConversionTrackSelectorTool.h b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetConversionTrackSelectorTool.h index a74ca70a0e9..44cd54fd08d 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetConversionTrackSelectorTool.h +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/InDetTrackSelectorTool/InDetConversionTrackSelectorTool.h @@ -8,6 +8,7 @@ #include "TrkToolInterfaces/ITrackSelectorTool.h" #include "AthenaBaseComps/AthAlgTool.h" #include "BeamSpotConditionsData/BeamSpotData.h" +#include "xAODEventInfo/EventInfo.h" #include "GaudiKernel/EventContext.h" #include "GaudiKernel/ToolHandle.h" #include "TrkExInterfaces/IExtrapolator.h" @@ -78,7 +79,9 @@ private: "BeamSpotData", "SG key for beam spot" }; - + SG::ReadHandleKey m_eventInfo_key{this, "EventInfo", "EventInfo", "Input event information"}; + Gaudi::Property m_useEventInfoBs{this,"UseEventInfoBS",false}; + Trk::Vertex* getBeamSpot(const EventContext& ctx) const; /** Properties for track selection:all cuts are ANDed */ double m_maxSiD0; //!< Maximal d0 at (0,0,0) for tracks with Si hits double m_maxTrtD0; //!< Maximal d0 at (0,0,0) for standalone TRT tracks diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx index 2b7ad07e895..f918b37c277 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetConversionTrackSelectorTool.cxx @@ -71,11 +71,36 @@ namespace InDet StatusCode InDetConversionTrackSelectorTool::initialize() { ATH_CHECK( m_extrapolator.retrieve() ); - ATH_CHECK(m_beamSpotKey.initialize()); + ATH_CHECK(m_beamSpotKey.initialize(!m_useEventInfoBs)); + ATH_CHECK(m_eventInfo_key.initialize(m_useEventInfoBs)); return StatusCode::SUCCESS; } + Trk::Vertex* InDetConversionTrackSelectorTool::getBeamSpot(const EventContext& ctx) const + { + if(m_useEventInfoBs){ + SG::ReadHandle evt(m_eventInfo_key, ctx); + if (evt.isValid()) { + InDet::BeamSpotData temp(evt->beamStatus(), evt->beamPosX(), evt->beamPosY(), evt->beamPosZ(), + evt->beamPosSigmaX(), evt->beamPosSigmaY(), evt->beamPosSigmaZ(), + evt->beamTiltXZ(), evt->beamTiltYZ(), evt->beamPosSigmaXY()); + return new Trk::RecVertex(temp.beamVtx()); + } else { + ATH_MSG_WARNING( " Cannot get beamSpot center from xAOD::EventInfo. Using (0,0,0)... " ); + return new Trk::Vertex(Amg::Vector3D(0,0,0)); + } + }else{ + SG::ReadCondHandle beamSpotHandle { m_beamSpotKey, ctx }; + if (beamSpotHandle.isValid()) { + return new Trk::RecVertex(beamSpotHandle->beamVtx()); + } else { + ATH_MSG_WARNING( " Cannot get beamSpot center from BeamSpotData. Using (0,0,0)... " ); + return new Trk::Vertex(Amg::Vector3D(0,0,0)); + } + } + } + unsigned int InDetConversionTrackSelectorTool::getEtaBin(const Trk::Perigee& perigee) const { @@ -102,14 +127,7 @@ namespace InDet const Trk::Vertex* myVertex=vx; //in case no Vertex is provided by the user, beam position will be used if available if (not vertexSuppliedByUser) { - SG::ReadCondHandle beamSpotHandle{ m_beamSpotKey, - ctx }; - if (beamSpotHandle.isValid()) { - myVertex=new Trk::RecVertex(beamSpotHandle->beamVtx()); - } else { - ATH_MSG_WARNING(" Cannot get beamSpot center from BeamSpotData. Using (0,0,0)... " ); - myVertex=new Trk::Vertex(Amg::Vector3D(0,0,0)); - } + myVertex = getBeamSpot(ctx); } Trk::PerigeeSurface perigeeSurface(myVertex->position()); const Trk::TrackParameters *firstmeaspar=nullptr; @@ -229,14 +247,7 @@ namespace InDet const bool vertexSuppliedByUser{vx!=nullptr}; //in case no Vertex is provided by the user, beam position will be used if available if (not vertexSuppliedByUser) { - SG::ReadCondHandle beamSpotHandle{ m_beamSpotKey, - ctx }; - if (beamSpotHandle.isValid()) { - myVertex=new Trk::RecVertex(beamSpotHandle->beamVtx()); - } else { - ATH_MSG_WARNING( " Cannot get beamSpot center from BeamSpotData. Using (0,0,0)... " ); - myVertex=new Trk::Vertex(Amg::Vector3D(0,0,0)); - } + myVertex = getBeamSpot(ctx); } Trk::PerigeeSurface perigeeSurface(myVertex->position()); @@ -350,6 +361,14 @@ namespace InDet if (vertex) { return vertex->position(); } + if(m_useEventInfoBs){ + SG::ReadHandle evt(m_eventInfo_key, ctx); + if (evt.isValid()) { + return Amg::Vector3D(evt->beamPosX(), evt->beamPosY(), evt->beamPosZ()); + }else{ + return Amg::Vector3D(0, 0, 0); + } + } SG::ReadCondHandle beamSpotHandle{ m_beamSpotKey, ctx }; if (beamSpotHandle.isValid()) { return beamSpotHandle->beamVtx().position(); -- GitLab From 69eaae6237934aca7336584ddd8f413048e02fd0 Mon Sep 17 00:00:00 2001 From: abarton Date: Mon, 29 Aug 2022 19:23:11 +0100 Subject: [PATCH 3/4] Add CA of BPHY16 and BPHY21, fix permissions --- .../DerivationFrameworkBPhys/python/BPHY12.py | 0 .../DerivationFrameworkBPhys/python/BPHY16.py | 200 ++++++++++++++++++ .../DerivationFrameworkBPhys/python/BPHY2.py | 0 .../DerivationFrameworkBPhys/python/BPHY21.py | 167 +++++++++++++++ .../DerivationFrameworkBPhys/python/BPHY3.py | 0 .../DerivationFrameworkBPhys/python/BPHY4.py | 0 .../DerivationFrameworkBPhys/python/BPHY5.py | 0 .../DerivationFrameworkBPhys/python/BPHY6.py | 0 .../DerivationFrameworkBPhys/src/ReVertex.cxx | 2 +- .../python/DerivationConfigList.py | 8 +- 10 files changed, 374 insertions(+), 3 deletions(-) mode change 100755 => 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY12.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY16.py mode change 100755 => 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY2.py create mode 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY21.py mode change 100755 => 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY3.py mode change 100755 => 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY4.py mode change 100755 => 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY5.py mode change 100755 => 100644 PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY6.py diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY12.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY12.py old mode 100755 new mode 100644 diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY16.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY16.py new file mode 100644 index 00000000000..5958531e8d2 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY16.py @@ -0,0 +1,200 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +#==================================================================== +# BPHY16.py +#==================================================================== + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + + +BPHYDerivationName = "BPHY16" +streamName = "StreamDAOD_BPHY16" + +def BPHY16Cfg(ConfigFlags): + from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg) + from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg + acc = ComponentAccumulator() + isSimulation = ConfigFlags.Input.isMC + V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(ConfigFlags, BPHYDerivationName)) + vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(ConfigFlags, BPHYDerivationName)) # VKalVrt vertex fitter + acc.addPublicTool(vkalvrt) + acc.addPublicTool(V0Tools) + trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(ConfigFlags, BPHYDerivationName)) + acc.addPublicTool(trackselect) + vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(ConfigFlags, BPHYDerivationName)) + acc.addPublicTool(vpest) + BPHY16JpsiFinder = CompFactory.Analysis.JpsiFinder( + name = "BPHY16JpsiFinder", + muAndMu = True, + muAndTrack = False, + TrackAndTrack = False, + assumeDiMuons = True, # If true, will assume dimu hypothesis and use PDG value for mu mass + invMassUpper = 12000.0, + invMassLower = 8000., + Chi2Cut = 20., + oppChargesOnly = True, + atLeastOneComb = True, + useCombinedMeasurement = False, # Only takes effect if combOnly=True + muonCollectionKey = "Muons", + TrackParticleCollection = "InDetTrackParticles", + V0VertexFitterTool = None, # V0 vertex fitter + useV0Fitter = False, # if False a TrkVertexFitterTool will be used + TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter + TrackSelectorTool = trackselect, + VertexPointEstimator = vpest, + useMCPCuts = False ) + acc.addPublicTool(BPHY16JpsiFinder) + BPHY16_Reco_mumu = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY16_Reco_mumu", + VertexSearchTool = BPHY16JpsiFinder, + OutputVtxContainerName = "BPHY16OniaCandidates", + PVContainerName = "PrimaryVertices", + RefPVContainerName = "BPHY16RefittedPrimaryVertices1", + RefitPV = True, + V0Tools = V0Tools, + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + MaxPVrefit = 100000, + DoVertexType = 7) + + BPHY16_Select_Upsi = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY16_Select_Upsi", + HypothesisName = "Upsilon", + InputVtxContainerName = "BPHY16OniaCandidates", + V0Tools = V0Tools, + VtxMassHypo = 9460.30, + MassMin = 8000., + MassMax = 12000., + Chi2Max = 200, + DoVertexType = 7) + + BPHY16Plus2Tracks = CompFactory.Analysis.JpsiPlus2Tracks(name = "BPHY16Plus2Tracks", + kaonkaonHypothesis = False, + pionpionHypothesis = False, + kaonpionHypothesis = False, + ManualMassHypo = [ 105.658, 105.658, 105.658, 105.658 ], + trkThresholdPt = 0.0, + trkMaxEta = 3.0, + BMassUpper = 50000.0, + BMassLower = 0, + oppChargesOnly = False, + Chi2Cut = 100.0, + JpsiContainerKey = "BPHY16OniaCandidates", + TrackParticleCollection = "InDetTrackParticles", + MuonsUsedInJpsi = "Muons", + ExcludeJpsiMuonsOnly = True, + RequireNMuonTracks = 1, + TrkVertexFitterTool = vkalvrt, + TrackSelectorTool = trackselect, + UseMassConstraint = False) + + BPHY16FourTrackSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex(name = "BPHY16FourTrackSelectAndWrite", + VertexSearchTool = BPHY16Plus2Tracks, + OutputVtxContainerName = "BPHY16FourTrack", + PVContainerName = "PrimaryVertices", + RefPVContainerName = "BPHY16RefittedPrimaryVertices2", + RefitPV = True, + V0Tools = V0Tools, + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + MaxPVrefit = 10000, DoVertexType = 7) + + BPHY16_Select_FourTrack = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY16_Select_FourTracks", + HypothesisName = "FourTracks", + InputVtxContainerName = "BPHY16FourTrack", + V0Tools = V0Tools, + TrkMasses = [105.658, 105.658, 105.658, 105.658], + VtxMassHypo = 18100.0, + MassMin = 0, + MassMax = 500000, + Chi2Max = BPHY16Plus2Tracks.Chi2Cut) + BPHY16_Revertex = CompFactory.DerivationFramework.ReVertex( + name = "BPHY16_ReVertex", + InputVtxContainerName = "BPHY16FourTrack", + V0Tools = V0Tools, + TrackIndices = [ 2, 3 ], + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + TrkVertexFitterTool = vkalvrt, + OutputVtxContainerName = "BPHY16TwoTrack") + BPHY16_Select_TwoTrack = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY16_Select_TwoTracks", + HypothesisName = "TwoTracks", + InputVtxContainerName = "BPHY16TwoTrack", + V0Tools = V0Tools, + TrkMasses = [105.658, 105.658], + VtxMassHypo = 18100.0, + MassMin = 1, + MassMax = 500000, + Chi2Max = 90) + + BPHY16_SelectEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool(name = "BPHY16_SelectEvent", + expression = "count(BPHY16FourTrack.passed_FourTracks) > 0") + + + augTools = [BPHY16_Reco_mumu, BPHY16_Select_Upsi, BPHY16FourTrackSelectAndWrite, BPHY16_Select_FourTrack, BPHY16_Revertex, BPHY16_Select_TwoTrack] + skimTools = [BPHY16_SelectEvent] + for t in augTools +skimTools : acc.addPublicTool(t) + acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY16Kernel", + AugmentationTools = augTools, + #Only skim if not MC + SkimmingTools = skimTools, + ThinningTools = [])) + + #==================================================================== + # Slimming + #==================================================================== + + from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper + from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg + BPHY16SlimmingHelper = SlimmingHelper("BPHY16SlimmingHelper", NamesAndTypes = ConfigFlags.Input.TypedCollections) + AllVariables = [] + StaticContent = [] + + # Needed for trigger objects + BPHY16SlimmingHelper.IncludeMuonTriggerContent = True + BPHY16SlimmingHelper.IncludeBPhysTriggerContent = True + + ## primary vertices + AllVariables += ["PrimaryVertices"] + StaticContent += ["xAOD::VertexContainer#BPHY16RefittedPrimaryVertices1"] + StaticContent += ["xAOD::VertexAuxContainer#BPHY16RefittedPrimaryVertices1Aux."] + StaticContent += ["xAOD::VertexContainer#BPHY16RefittedPrimaryVertices2"] + StaticContent += ["xAOD::VertexAuxContainer#BPHY16RefittedPrimaryVertices2Aux."] + + ## ID track particles + AllVariables += ["InDetTrackParticles"] + + ## combined / extrapolated muon track particles + ## (note: for tagged muons there is no extra TrackParticle collection since the ID tracks + ## are store in InDetTrackParticles collection) + AllVariables += ["CombinedMuonTrackParticles"] + AllVariables += ["ExtrapolatedMuonTrackParticles"] + + ## muon container + AllVariables += ["Muons"] + + + StaticContent += ["xAOD::VertexContainer#%s" % BPHY16_Reco_mumu.OutputVtxContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux." % BPHY16_Reco_mumu.OutputVtxContainerName] + ## we have to disable vxTrackAtVertex branch since it is not xAOD compatible + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16_Reco_mumu.OutputVtxContainerName] + + StaticContent += ["xAOD::VertexContainer#%s" % BPHY16FourTrackSelectAndWrite.OutputVtxContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux." % BPHY16FourTrackSelectAndWrite.OutputVtxContainerName] + ## we have to disable vxTrackAtVertex branch since it is not xAOD compatible + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16FourTrackSelectAndWrite.OutputVtxContainerName] + + StaticContent += ["xAOD::VertexContainer#%s" % BPHY16_Revertex.OutputVtxContainerName] + StaticContent += ["xAOD::VertexAuxContainer#%sAux." % BPHY16_Revertex.OutputVtxContainerName] + ## we have to disable vxTrackAtVertex branch since it is not xAOD compatible + StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY16_Revertex.OutputVtxContainerName] + + + # Truth information for MC only + if isSimulation: + AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"] + BPHY16SlimmingHelper.AllVariables = AllVariables + BPHY16SlimmingHelper.StaticContent = StaticContent + BPHY16ItemList = BPHY16SlimmingHelper.GetItemList() + acc.merge(OutputStreamCfg(ConfigFlags, "DAOD_BPHY16", ItemList=BPHY16ItemList, AcceptAlgs=["BPHY16Kernel"])) + acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True, printComponentsOnly=False) + return acc diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY2.py old mode 100755 new mode 100644 diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY21.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY21.py new file mode 100644 index 00000000000..1532c2820a1 --- /dev/null +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY21.py @@ -0,0 +1,167 @@ +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +#==================================================================== +# BPHY21.py +#==================================================================== + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + + +BPHYDerivationName = "BPHY21" +streamName = "StreamDAOD_BPHY21" + +def BPHY21Cfg(ConfigFlags): + from DerivationFrameworkBPhys.commonBPHYMethodsCfg import (BPHY_V0ToolCfg, BPHY_InDetDetailedTrackSelectorToolCfg, BPHY_VertexPointEstimatorCfg, BPHY_TrkVKalVrtFitterCfg) + from JpsiUpsilonTools.JpsiUpsilonToolsConfig import PrimaryVertexRefittingToolCfg + acc = ComponentAccumulator() + isSimulation = ConfigFlags.Input.isMC + V0Tools = acc.popToolsAndMerge(BPHY_V0ToolCfg(ConfigFlags, BPHYDerivationName)) + vkalvrt = acc.popToolsAndMerge(BPHY_TrkVKalVrtFitterCfg(ConfigFlags, BPHYDerivationName)) # VKalVrt vertex fitter + acc.addPublicTool(vkalvrt) + acc.addPublicTool(V0Tools) + trackselect = acc.popToolsAndMerge(BPHY_InDetDetailedTrackSelectorToolCfg(ConfigFlags, BPHYDerivationName)) + acc.addPublicTool(trackselect) + vpest = acc.popToolsAndMerge(BPHY_VertexPointEstimatorCfg(ConfigFlags, BPHYDerivationName)) + acc.addPublicTool(vpest) + + BPHY21_AugOriginalCounts = CompFactory.DerivationFramework.AugOriginalCounts( + name = "BPHY21_AugOriginalCounts", + VertexContainer = "PrimaryVertices", + TrackContainer = "InDetTrackParticles") + #==================================================================== + # TriggerCounting for Kernel1 + #==================================================================== + + BPHY21_triggerList = [ + "HLT_2mu10", + "HLT_2mu10_nomucomb", + "HLT_2mu14", + "HLT_2mu14_nomucomb", + "HLT_mu18_mu8noL1", + "HLT_mu18_nomucomb_mu8noL1", + "HLT_mu20_mu8noL1", + "HLT_mu20_nomucomb_mu8noL1", + "HLT_mu22_mu8noL1", + "HLT_mu22_nomucomb_mu8noL1", + "HLT_mu20_mu8noL1", + "HLT_mu24_mu8noL1", + "HLT_mu10_mu6_bJpsimumu", + "HLT_mu22_mu8noL1_calotag_0eta010_L1MU1" + ] + + BPHY21_JpsiFinder = CompFactory.Analysis.JpsiFinder( + name = "BPHY21_JpsiFinder", + muAndMu = True, + muAndTrack = False, + TrackAndTrack = False, + assumeDiMuons = True, + muonThresholdPt = 2700, + invMassUpper = 3400.0, + invMassLower = 2800.0, + Chi2Cut = 10., + oppChargesOnly = True, + combOnly = True, + atLeastOneComb = False, + useCombinedMeasurement = False, # Only takes effect if combOnly=True + muonCollectionKey = "Muons", + TrackParticleCollection = "InDetTrackParticles", + V0VertexFitterTool = None, # V0 vertex fitter + useV0Fitter = False, # if False a TrkVertexFitterTool will be used + TrkVertexFitterTool = vkalvrt, # VKalVrt vertex fitter + TrackSelectorTool = trackselect, + VertexPointEstimator = vpest, + useMCPCuts = False) + acc.addPublicTool(BPHY21_JpsiFinder) + BPHY21_JpsiSelectAndWrite = CompFactory.DerivationFramework.Reco_Vertex( + name = "BPHY21_JpsiSelectAndWrite", + VertexSearchTool = BPHY21_JpsiFinder, + OutputVtxContainerName = "BPHY21_JpsiCandidates", + V0Tools = V0Tools, + PVRefitter = acc.popToolsAndMerge(PrimaryVertexRefittingToolCfg(ConfigFlags)), + PVContainerName = "PrimaryVertices", + RefPVContainerName = "SHOULDNOTBEUSED", + DoVertexType = 1) + BPHY21_Select_Jpsi2mumu = CompFactory.DerivationFramework.Select_onia2mumu( + name = "BPHY21_Select_Jpsi2mumu", + HypothesisName = "Jpsi", + InputVtxContainerName = "BPHY21_JpsiCandidates", + V0Tools = V0Tools, + VtxMassHypo = 3096.900, + MassMin = 2600.0, + MassMax = 3600.0, + Chi2Max = 200, + LxyMin = 0.1, + DoVertexType = 1) + + if not isSimulation: #Only Skim Data + BPHY21_TriggerSkim = CompFactory.DerivationFramework.TriggerSkimmingTool(name = "BPHY21_TriggerSkim", + TriggerListOR = BPHY21_triggerList) + BPHY21_SelectJpsiEvent = CompFactory.DerivationFramework.xAODStringSkimmingTool( + name = "BPHY21_SelectJpsiEvent", + expression = "count(BPHY21_JpsiCandidates.passed_Jpsi) > 0") + + BPHY21_SkimmingOR = CompFactory.DerivationFramework.FilterCombinationOR("BPHY21_SkimmingOR", + FilterList = [ BPHY21_TriggerSkim, BPHY21_SelectJpsiEvent] ) + acc.addPublicTool(BPHY21_SelectJpsiEvent) + acc.addPublicTool(BPHY21_TriggerSkim) + acc.addPublicTool(BPHY21_SkimmingOR) + + augTools = [BPHY21_JpsiSelectAndWrite, BPHY21_Select_Jpsi2mumu, BPHY21_AugOriginalCounts] + for t in augTools : acc.addPublicTool(t) + acc.addEventAlgo(CompFactory.DerivationFramework.DerivationKernel("BPHY21Kernel", + AugmentationTools = augTools, + #Only skim if not MC + SkimmingTools = [BPHY21_SkimmingOR] if not isSimulation else [], + ThinningTools = [])) + #==================================================================== + # Slimming + #==================================================================== + from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper + from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg + BPHY21_SlimmingHelper = SlimmingHelper("BPHY21_SlimmingHelper", NamesAndTypes = ConfigFlags.Input.TypedCollections) + BPHY21_AllVariables = [] + BPHY21_StaticContent = [] + + # Needed for trigger objects + BPHY21_SlimmingHelper.IncludeMuonTriggerContent = True + BPHY21_SlimmingHelper.IncludeBPhysTriggerContent = True + + ## primary vertices + BPHY21_AllVariables += ["PrimaryVertices"] + BPHY21_StaticContent += ["xAOD::VertexContainer#BPHY21_RefittedPrimaryVertices"] + BPHY21_StaticContent += ["xAOD::VertexAuxContainer#BPHY21_RefittedPrimaryVerticesAux."] + + ## ID track particles + BPHY21_AllVariables += ["InDetTrackParticles"] + + ## combined / extrapolated muon track particles + ## (note: for tagged muons there is no extra TrackParticle collection since the ID tracks + ## are store in InDetTrackParticles collection) + BPHY21_AllVariables += ["CombinedMuonTrackParticles"] + BPHY21_AllVariables += ["ExtrapolatedMuonTrackParticles"] + + ## muon container + BPHY21_AllVariables += ["Muons"] + + + ## Jpsi candidates + BPHY21_StaticContent += ["xAOD::VertexContainer#%s" % BPHY21_JpsiSelectAndWrite.OutputVtxContainerName] + ## we have to disable vxTrackAtVertex branch since it is not xAOD compatible + BPHY21_StaticContent += ["xAOD::VertexAuxContainer#%sAux.-vxTrackAtVertex" % BPHY21_JpsiSelectAndWrite.OutputVtxContainerName] + + + # Tagging information (in addition to that already requested by usual algorithms) + #AllVariables += ["GSFTrackParticles", "MuonSpectrometerTrackParticles" ] + + # Added by ASC + # Truth information for MC only + if isSimulation: + BPHY21_AllVariables += ["TruthEvents","TruthParticles","TruthVertices","MuonTruthParticles"] + + + BPHY21_AllVariables = list(set(BPHY21_AllVariables)) # remove duplicates + BPHY21_SlimmingHelper.AllVariables = BPHY21_AllVariables + BPHY21_SlimmingHelper.StaticContent = BPHY21_StaticContent + acc.merge(OutputStreamCfg(ConfigFlags, "DAOD_BPHY21", ItemList=BPHY21_SlimmingHelper.GetItemList(), AcceptAlgs=["BPHY21Kernel"])) + acc.printConfig(withDetails=True, summariseProps=True, onlyComponents = [], printDefaults=True, printComponentsOnly=False) + return acc \ No newline at end of file diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY3.py old mode 100755 new mode 100644 diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY4.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY4.py old mode 100755 new mode 100644 diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY5.py old mode 100755 new mode 100644 diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY6.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/python/BPHY6.py old mode 100755 new mode 100644 diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/ReVertex.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/ReVertex.cxx index 2272913c7e4..3b818446546 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/ReVertex.cxx +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/ReVertex.cxx @@ -31,7 +31,7 @@ ReVertex::ReVertex(const std::string& t, m_massConst(0.), m_totalMassConst(0.), m_v0Tools("Trk::V0Tools"), - m_pvRefitter("Analysis::PrimaryVertexRefitter"), + m_pvRefitter("Analysis::PrimaryVertexRefitter", this), m_doMassConst(false), m_vertexFittingWithPV(false), m_chi2cut(-1.0), diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkConfiguration/python/DerivationConfigList.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkConfiguration/python/DerivationConfigList.py index d1e9dafd1f0..c89ceaf0a17 100644 --- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkConfiguration/python/DerivationConfigList.py +++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkConfiguration/python/DerivationConfigList.py @@ -50,6 +50,8 @@ from DerivationFrameworkBPhys.BPHY6 import BPHY6Cfg from DerivationFrameworkBPhys.BPHY10 import BPHY10Cfg from DerivationFrameworkBPhys.BPHY12 import BPHY12Cfg from DerivationFrameworkBPhys.BPHY15 import BPHY15Cfg +from DerivationFrameworkBPhys.BPHY16 import BPHY16Cfg +from DerivationFrameworkBPhys.BPHY21 import BPHY21Cfg # TileCal derivations from DerivationFrameworkTileCal.TCAL1 import TCAL1Cfg @@ -64,6 +66,8 @@ __all__ = ['TEST1Cfg','TEST2Cfg','TEST3Cfg','TEST4Cfg','TEST5Cfg','TEST6Cfg', 'LLP1Cfg', 'BPHY1Cfg','BPHY2Cfg', 'BPHY3Cfg', 'BPHY4Cfg', 'BPHY5Cfg', 'BPHY6Cfg', - 'BPHY10Cfg', 'BPHY12Cfg', 'BPHY15Cfg', - 'TCAL1Cfg', 'TCAL2Cfg'] + 'BPHY10Cfg', 'BPHY12Cfg', 'BPHY15Cfg', 'BPHY16Cfg', + 'BPHY21Cfg', + 'TCAL1Cfg', 'TCAL2Cfg' + ] -- GitLab From 5791c1757092cdba61c014c5fe41353e0b28471d Mon Sep 17 00:00:00 2001 From: abarton Date: Tue, 30 Aug 2022 15:45:07 +0100 Subject: [PATCH 4/4] Remove redundant Configfile --- .../TrkV0Fitter/CMakeLists.txt | 1 - .../TrkV0Fitter/python/TrkV0FitterConfig.py | 22 ------------------- 2 files changed, 23 deletions(-) delete mode 100644 Tracking/TrkVertexFitter/TrkV0Fitter/python/TrkV0FitterConfig.py diff --git a/Tracking/TrkVertexFitter/TrkV0Fitter/CMakeLists.txt b/Tracking/TrkVertexFitter/TrkV0Fitter/CMakeLists.txt index a712f3a5aa5..6adbce7b13a 100644 --- a/Tracking/TrkVertexFitter/TrkV0Fitter/CMakeLists.txt +++ b/Tracking/TrkVertexFitter/TrkV0Fitter/CMakeLists.txt @@ -14,4 +14,3 @@ atlas_add_component( TrkV0Fitter src/components/*.cxx LINK_LIBRARIES TrkV0FitterLib ) -atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Tracking/TrkVertexFitter/TrkV0Fitter/python/TrkV0FitterConfig.py b/Tracking/TrkVertexFitter/TrkV0Fitter/python/TrkV0FitterConfig.py deleted file mode 100644 index 3a632568901..00000000000 --- a/Tracking/TrkVertexFitter/TrkV0Fitter/python/TrkV0FitterConfig.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration -# Configuration of TrkV0Fitter package - -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -from AthenaConfiguration.ComponentFactory import CompFactory - -def InDetTrkV0VertexFitterCfg(config, name="InDetTrkV0VertexFitter", **kwargs): - acc = ComponentAccumulator() - if "Extrapolator" not in kwargs: - from TrkConfig.AtlasExtrapolatorConfig import InDetExtrapolatorCfg - kwargs.setdefault("Extrapolator", acc.popToolsAndMerge(InDetExtrapolatorCfg(config))) - acc.setPrivateTools(CompFactory.Trk.TrkV0VertexFitter(name, **kwargs)) - return acc - -def TrkV0VertexFitterCfg(config, name="TrkV0VertexFitter", **kwargs): - acc = ComponentAccumulator() - if "Extrapolator" not in kwargs: - from TrkConfig.AtlasExtrapolatorConfig import AtlasExtrapolatorCfg - kwargs.setdefault("Extrapolator", acc.popToolsAndMerge(AtlasExtrapolatorCfg(config))) - acc.setPrivateTools(CompFactory.Trk.TrkV0VertexFitter(name, **kwargs)) - return acc - -- GitLab