From 94b059ccd64523a541d08b926386798a9b0fdbbd Mon Sep 17 00:00:00 2001 From: Andre Sailer <andre.philippe.sailer@cern.ch> Date: Thu, 9 Apr 2020 13:00:43 +0200 Subject: [PATCH] Geant4SensDetFilters: fix behaviour of ParticleReject and ParticleSelect Filters --- DDG4/plugins/Geant4SensDetFilters.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DDG4/plugins/Geant4SensDetFilters.cpp b/DDG4/plugins/Geant4SensDetFilters.cpp index feac568e9..5ba9fbd71 100644 --- a/DDG4/plugins/Geant4SensDetFilters.cpp +++ b/DDG4/plugins/Geant4SensDetFilters.cpp @@ -205,7 +205,7 @@ ParticleRejectFilter::~ParticleRejectFilter() { /// Filter action. Return true if hits should be processed bool ParticleRejectFilter::operator()(const G4Step* step) const { - return isSameType(step->GetTrack()); + return !isSameType(step->GetTrack()); } /// Constructor. @@ -221,7 +221,7 @@ ParticleSelectFilter::~ParticleSelectFilter() { /// Filter action. Return true if hits should be processed bool ParticleSelectFilter::operator()(const G4Step* step) const { - return !isSameType(step->GetTrack()); + return isSameType(step->GetTrack()); } /// Constructor. -- GitLab