gdynamicDigitization
Loading...
Searching...
No Matches
gPhotonDetectorDigitization.cc
Go to the documentation of this file.
2
3// geant4
4#include "G4OpticalPhoton.hh"
5#include "G4Step.hh"
6
7bool GPhotonDetectorDigitization::decisionToSkipHit(double energy, const G4Step* thisStep) {
8 if (thisStep == nullptr || thisStep->GetTrack() == nullptr) {
9 return true;
10 }
11
12 const auto* particle = thisStep->GetTrack()->GetDefinition();
13 if (particle != G4OpticalPhoton::OpticalPhotonDefinition()) {
14 return true;
15 }
16
17 if (energy == 0) {
18 return false;
19 }
20
22}
virtual bool decisionToSkipHit(double energy)
Decides whether a hit should be skipped based on deposited energy.
bool decisionToSkipHit(double energy, const G4Step *thisStep) override
Keeps only optical-photon steps.