From 2477ec1db4d69f5e163f6572097cf311756450aa Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Thu, 1 Sep 2022 17:44:46 +0200
Subject: [PATCH] DDSim: add printout when using default filter or no filter

---
 DDG4/python/DDSim/Helper/Filter.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/DDG4/python/DDSim/Helper/Filter.py b/DDG4/python/DDSim/Helper/Filter.py
index 10ccd2a68..354edc980 100644
--- a/DDG4/python/DDSim/Helper/Filter.py
+++ b/DDG4/python/DDSim/Helper/Filter.py
@@ -156,5 +156,10 @@ class Filter(ConfigHelper):
           logger.info("Adding filter '%s' matched with '%s' to sensitive detector for '%s' " % (filt, pattern, det))
           seq.add(self.filters[filt]['filter'])
 
-    if not foundFilter and defaultFilter:
+    if foundFilter:
+      return
+    if defaultFilter:
+      logger.info("Adding default filter '%s' to sensitive detector for '%s' " % (defaultFilter, det))
       seq.add(self.filters[defaultFilter]['filter'])
+      return
+    logger.info("Not adding any filter to sensitive detector for '%s' " % det)
-- 
GitLab