9 #include "G4Neutron.hh"
10 #include "G4SDManager.hh"
11 #include "G4VSensitiveDetector.hh"
12 #include "G4EventManager.hh"
18 : G4VFastSimulationModel(
name)
22 , m_fsSDname(fsSDname)
33 G4SDManager *sdm = G4SDManager::GetSDMpointer();
34 G4VSensitiveDetector * vsd = sdm->FindSensitiveDetector(
m_fsSDname );
36 G4cout <<
"NeutronFastSim::IsApplicable WARNING Could not get TrackFastSimSD sensitive detector. If you are not writing track records this is expected." << G4endl;
40 G4cout <<
"NeutronFastSim::IsApplicable WARNING Could not cast the SD. If you are not writing track records this is expected." << G4endl;
50 if (fastTrack.GetPrimaryTrack()->GetDefinition() == G4Neutron::NeutronDefinition() ){
51 return (
m_Energy<0?
true:fastTrack.GetPrimaryTrack()->GetKineticEnergy()<
m_Energy) || fastTrack.GetPrimaryTrack()->GetGlobalTime()>
m_timeCut;
67 fastStep.KillPrimaryTrack();