From ee4944681016236ce58bc2debba0342d2b3654b3 Mon Sep 17 00:00:00 2001 From: Alvaro Tolosa Delgado Date: Sat, 30 Sep 2023 21:10:50 +0200 Subject: [PATCH] Kill photons as soon they enter into a OpticalTracker --- DDG4/plugins/Geant4SDActions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DDG4/plugins/Geant4SDActions.cpp b/DDG4/plugins/Geant4SDActions.cpp index c9bc75ecd..a16796513 100644 --- a/DDG4/plugins/Geant4SDActions.cpp +++ b/DDG4/plugins/Geant4SDActions.cpp @@ -163,7 +163,7 @@ namespace dd4hep { double hit_deposit = contrib.deposit; Hit* hit = new Hit(contrib, hit_momentum, hit_deposit); - if (h.trackDef() != G4OpticalPhoton::OpticalPhotonDefinition()) { + if (h.trackDef() == G4OpticalPhoton::OpticalPhotonDefinition()) { step->GetTrack()->SetTrackStatus(fStopAndKill); } hit->cellID = cellID(step);