#include <NeutronFastSim.h>
Definition at line 17 of file NeutronFastSim.h.
◆ NeutronFastSim()
| NeutronFastSim::NeutronFastSim |
( |
const std::string & | name, |
|
|
G4Region * | region, |
|
|
const std::string & | fsSDname, |
|
|
const double | etaCut, |
|
|
const double | timeCut ) |
◆ ~NeutronFastSim()
| NeutronFastSim::~NeutronFastSim |
( |
| ) |
|
|
inline |
◆ DoIt()
| void NeutronFastSim::DoIt |
( |
const G4FastTrack & | fastTrack, |
|
|
G4FastStep & | fastStep ) |
|
finaloverride |
Definition at line 66 of file NeutronFastSim.cxx.
67{
68 if (
m_fsSD)
m_fsSD->WriteTrack( fastTrack.GetPrimaryTrack() ,
false ,
false );
69 fastStep.KillPrimaryTrack();
70}
◆ IsApplicable()
| G4bool NeutronFastSim::IsApplicable |
( |
const G4ParticleDefinition & | | ) |
|
|
finaloverride |
Definition at line 27 of file NeutronFastSim.cxx.
28{
31
32 G4SDManager *sdm = G4SDManager::GetSDMpointer();
33 G4VSensitiveDetector * vsd = sdm->FindSensitiveDetector(
m_fsSDname );
34 if (!vsd) {
35 G4cout << "NeutronFastSim::IsApplicable WARNING Could not get TrackFastSimSD sensitive detector. If you are not writing track records this is expected." << G4endl;
36 } else {
37 m_fsSD =
dynamic_cast<TrackFastSimSD*
>(vsd);
39 G4cout << "NeutronFastSim::IsApplicable WARNING Could not cast the SD. If you are not writing track records this is expected." << G4endl;
40 }
41 }
42 }
43 return true;
44}
◆ ModelTrigger()
| G4bool NeutronFastSim::ModelTrigger |
( |
const G4FastTrack & | fastTrack | ) |
|
|
finaloverridevirtual |
Definition at line 46 of file NeutronFastSim.cxx.
47{
48
49 if (fastTrack.GetPrimaryTrack()->GetDefinition() == G4Neutron::NeutronDefinition() ){
50 return (
m_Energy<0?
true:fastTrack.GetPrimaryTrack()->GetKineticEnergy()<
m_Energy) || fastTrack.GetPrimaryTrack()->GetGlobalTime()>
m_timeCut;
51 }
52
53
54 TrackHelper trackHelper(fastTrack.GetPrimaryTrack());
56 if (!primaryGenParticle) {
57 return false;
58 }
60 return true;
61 } else {
62 return false;
63 }
64}
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
◆ m_Energy
| G4double NeutronFastSim::m_Energy |
|
protected |
◆ m_etaCut
| double NeutronFastSim::m_etaCut |
|
protected |
◆ m_fsSD
◆ m_fsSDname
| std::string NeutronFastSim::m_fsSDname |
|
protected |
◆ m_init
| bool NeutronFastSim::m_init |
|
protected |
◆ m_timeCut
| double NeutronFastSim::m_timeCut |
|
protected |
The documentation for this class was generated from the following files: