diff --git a/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt b/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
index c799b37dbb38c40a25a820de48872c797b63fbeb..5a2c859b9011619fd25c0479d9973382a324c1e0 100644
--- a/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODEventInfoCnv/CMakeLists.txt
@@ -5,7 +5,7 @@ atlas_subdir( xAODEventInfoCnv )
 
 # Optional dependencies:
 set( extra_libs )
-if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
+if( NOT SIMULATIONBASE AND NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
    set( extra_libs BeamSpotConditionsData LumiBlockData )
 endif()
 
@@ -30,7 +30,7 @@ atlas_add_test( EvenInfoCnvConfigTestMT
                 SCRIPT test/EventInfoCnv_test.py -n 25 -t 3
                 PROPERTIES TIMEOUT 300 )
 
-if( NOT SIMULATIONBASE AND NOT GENERATIONBASE )
+if( NOT SIMULATIONBASE AND NOT GENERATIONBASE AND NOT XAOD_ANALYSIS )
    atlas_add_test( EventInfoOverlayConfigTest
                    SCRIPT test/EventInfoOverlay_test.py
                    PROPERTIES TIMEOUT 300 )
diff --git a/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py b/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
index 65ab4f5ac488126306af4779c063ad2a4bfa5e0d..ff1996d04d630b28f3e73809e43ce971f131b396 100644
--- a/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
+++ b/Event/xAOD/xAODEventInfoCnv/python/xAODEventInfoCnvConfig.py
@@ -3,6 +3,7 @@
 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 
+from AthenaCommon.Logging import logging
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
@@ -21,9 +22,14 @@ def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg",
 
     # TODO: luminosity
 
-    if not disableBeamSpot and flags.Common.Project not in ["AthSimulation", "AthGeneration"]:
-        from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
-        acc.merge(BeamSpotCondAlgCfg(flags))
+    if not disableBeamSpot:
+        try:
+            from BeamSpotConditions.BeamSpotConditionsConfig import BeamSpotCondAlgCfg
+            acc.merge(BeamSpotCondAlgCfg(flags))
+        except ImportError:
+            log = logging.getLogger( 'EventInfoCnvAlgCfg' )
+            log.info( 'BeamSpotConditions not available, not using it' )
+            pass
 
     xAODMaker__EventInfoCnvAlg = CompFactory.xAODMaker.EventInfoCnvAlg
     alg = xAODMaker__EventInfoCnvAlg(name, **kwargs)