From 4a3fa4443c29eb9bb1dc3c69cb073950ec68d3d5 Mon Sep 17 00:00:00 2001 From: Alexandre Laurier <alexandre.laurier@cern.ch> Date: Wed, 11 May 2022 17:11:38 +0200 Subject: [PATCH] Remove MM SimHits with 0 kin energy --- .../MuonG4/MuonG4SD/src/MicromegasSensitiveDetector.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/MicromegasSensitiveDetector.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/MicromegasSensitiveDetector.cxx index c5b281f089f..c48ca415783 100755 --- a/MuonSpectrometer/MuonG4/MuonG4SD/src/MicromegasSensitiveDetector.cxx +++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/MicromegasSensitiveDetector.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #include "MicromegasSensitiveDetector.h" @@ -47,6 +47,7 @@ G4bool MicromegasSensitiveDetector::ProcessHits(G4Step* aStep,G4TouchableHistory float globalTime=postStep->GetGlobalTime(); float eKin=postStep->GetKineticEnergy(); + if (eKin<= 0. && (!geantinoHit)) return false; Amg::Vector3D direction = Amg::Hep3VectorToEigen( postStep->GetMomentumDirection() ); float depositEnergy=post_Step->GetTotalEnergyDeposit(); -- GitLab