Skip to content
Snippets Groups Projects
Commit c03de150 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'testAthAn' into 'master'

Fix jet running in AthAnalysis

See merge request atlas/athena!58696
parents 0a813550 289d12a8
No related branches found
No related tags found
No related merge requests found
......@@ -754,7 +754,7 @@ def isComponentPassingConditions(component, configflags, prereqDic):
def isAnalysisRelease():
from AthenaConfiguration.Enums import Project
return Project.determine() is Project.AnalysisBase
return Project.determine() in( Project.AnalysisBase, Project.AthAnalysis)
def reOrderAlgs(algs):
......
......@@ -15,6 +15,7 @@
########################################################################
from .JetDefinition import xAODType, JetInputConstitSeq, JetInputExternal, JetConstitModifier, JetInputConstit
from .StandardJetContext import inputsFromContext
from .JetRecConfig import isAnalysisRelease
from AthenaConfiguration.Enums import BeamType
# Prepare dictionnaries to hold all of our standard definitions.
......@@ -56,7 +57,6 @@ def standardReco(input):
"""
doNothingFunc = lambda *l:None # noqa: E731
from .JetRecConfig import isAnalysisRelease
if isAnalysisRelease():
return doNothingFunc
......@@ -78,9 +78,10 @@ def standardReco(input):
return MuonReconstructionCfg(flags) if flags.Jet.doUpstreamDependencies else None
elif input=="PFlow":
def f(jetdef,spec):
if not jetdef._cflags.Jet.doUpstreamDependencies:
return None
from eflowRec.PFRun3Config import PFCfg
flags = jetdef._cflags
return PFCfg(flags) if flags.Jet.doUpstreamDependencies else None
return PFCfg(jetdef._cflags)
else:
f = doNothingFunc
......@@ -200,7 +201,9 @@ _stdInputList = [
JetInputExternal("UFOCSSK", xAODType.FlowElement,
prereqs = ['input:GPFlowCSSK'],
# in analysis releases, we can't build UFO anyways, so don't even try to declare dependencies,
prereqs =lambda parentjdef : [] if isAnalysisRelease() else ['input:GPFlowCSSK'],
filterfn = lambda flag : ( (not isAnalysisRelease() or 'UFOCSSK' in flag.Input.Collections), "Can't build UFO in Analysis projects and not UFOCSSK in input") ,
algoBuilder = lambda jdef,_ : tcccfg.runUFOReconstruction(jdef._cflags, stdConstitDic['GPFlowCSSK'])
),
......
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
########################################################################
# #
......@@ -8,7 +8,6 @@
# #
########################################################################
import os
from AthenaCommon import Logging
jrtlog = Logging.logging.getLogger('JetRecToolsConfig')
......@@ -24,9 +23,9 @@ def getIDTrackSelectionTool(trkOpt, **userProps):
idtracksel = CompFactory.getComp("InDet::InDetTrackSelectionTool")(
"idtracksel_"+trkOpt,
**selProperties )
if os.environ.get("AtlasProject",None) != "AnalysisBase":
# thes options can not be set in AnalysisBase. (but not setting them is equivalent to set them to False)
if not isAnalysisRelease():
# thes options can not be set in AnalysisBase/AthAnalysis. (but not setting them is equivalent to set them to False)
idtracksel.UseTrkTrackTools = False
idtracksel.Extrapolator = ""
idtracksel.TrackSummaryTool = ""
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( PFlowUtils )
......@@ -22,6 +22,13 @@ if( NOT XAOD_ANALYSIS )
xAODCore PFlowUtilsLib CaloCalibHitRecLib CaloSimEvent StoreGateLib )
endif()
if( XAOD_ANALYSIS AND NOT XAOD_STANDALONE )
atlas_add_component( PFlowUtils
src/components/*.cxx
LINK_LIBRARIES AthContainers AthenaBaseComps xAODJet xAODPFlow xAODTruth
xAODCore PFlowUtilsLib )
endif()
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
#include "PFlowUtils/WeightPFOTool.h"
#if !defined(XAOD_ANALYSIS)
#include "../CombinePFO.h"
#include "../PFlowCalibPFODecoratorAlgorithm.h"
#endif
DECLARE_COMPONENT( CP::WeightPFOTool )
#if !defined(XAOD_ANALYSIS)
DECLARE_COMPONENT( CombinePFO )
DECLARE_COMPONENT( PFlowCalibPFODecoratorAlgorithm )
#endif
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