gdynamicDigitization
Loading...
Searching...
No Matches
gPhotonDetectorDigitization.cc
Go to the documentation of this file.
1
#include "
gPhotonDetectorDigitization.h
"
2
3
// geant4
4
#include "G4OpticalPhoton.hh"
5
#include "G4Step.hh"
6
7
bool
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
21
return
GDynamicDigitization::decisionToSkipHit
(energy);
22
}
GDynamicDigitization::decisionToSkipHit
virtual bool decisionToSkipHit(double energy)
Decides whether a hit should be skipped based on deposited energy.
Definition
gdynamicdigitization.h:469
GPhotonDetectorDigitization::decisionToSkipHit
bool decisionToSkipHit(double energy, const G4Step *thisStep) override
Keeps only optical-photon steps.
Definition
gPhotonDetectorDigitization.cc:7
gPhotonDetectorDigitization.h
gPhotonDetectorDigitization.cc
Generated by
1.10.0