Skip to content
Snippets Groups Projects
Commit c9eaae43 authored by Maximilian Emanuel Goblirsch-Kolb's avatar Maximilian Emanuel Goblirsch-Kolb Committed by Melissa Yexley
Browse files

Fixes to MUON5 for Upgrade samples

Fixes to MUON5 for Upgrade samples
parent 74430b09
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
#!/usr/bin/env python
#====================================================================
# DAOD_MUON5.py
......@@ -67,9 +67,15 @@ def MUON5KernelCfg(ConfigFlags, name='MUON5Kernel', **kwargs):
MUON5SkimmingTools = []
from DerivationFrameworkTools.DerivationFrameworkToolsConfig import xAODStringSkimmingToolCfg
# if we are running on upgrade MC (no trigger), we disable the TDT inside the skimming tool.
# The TDT is not actually used as we skim only on offline objects.
SkimArgs={}
if not (ConfigFlags.Reco.EnableTrigger or ConfigFlags.Trigger.triggerConfig == 'INFILE'):
SkimArgs["TrigDecisionTool"] = ""
MUON5SkimmingTool1 = acc.getPrimaryAndMerge(xAODStringSkimmingToolCfg(ConfigFlags,
name = "MUON5SkimmingTool1",
expression = lepSelection))
expression = lepSelection,
**SkimArgs))
MUON5SkimmingTools.append(MUON5SkimmingTool1)
# --------
......@@ -94,10 +100,15 @@ def MUON5KernelCfg(ConfigFlags, name='MUON5Kernel', **kwargs):
from DerivationFrameworkCalo.CaloCellDFGetterConfig import thinCaloCellsForDFCfg
from DerivationFrameworkMuons.MuonsToolsConfig import AnalysisMuonThinningAlgCfg
# protect against missing forward tracks in Upgrade
fwdTracks = "InDetForwardTrackParticles"
if fwdTracks not in ConfigFlags.Input.Collections:
fwdTracks = ""
acc.merge(AnalysisMuonThinningAlgCfg(ConfigFlags,
MuonPassFlags = muonThinFlags,
TrkPassFlags = trkThinFlags,
StreamName = kwargs['StreamName']))
StreamName = kwargs['StreamName'],
IdTrkFwdThinning=fwdTracks))
# keep topoclusters around muons
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/***************************************************************************
......@@ -372,10 +372,15 @@ namespace Trk
xAOD::Vertex* fittedVertex = fit( measuredPerigees, constraint );
// fit() may return nullptr, need to protect
if (fittedVertex == nullptr){
ATH_MSG_WARNING("Failed fit, returning null vertex");
return nullptr;
}
//assigning the input tracks to the fitted vertex through VxTrackAtVertices
{
if( fittedVertex->vxTrackAtVertexAvailable() ) // TODO: I don't think vxTrackAtVertexAvailable() does the same thing as a null pointer check!
// Regretful Hindsight 8 years later: No, it doesn't!
{
if(!fittedVertex->vxTrackAtVertex().empty())
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment