#include <DeadMaterialShower.h>
|
| | DeadMaterialShower (const std::string &name, G4Region *region, const double &highEnergy, const double &lowEnergy, const double &zcutoff) |
| | ~DeadMaterialShower () |
| G4bool | IsApplicable (const G4ParticleDefinition &) override final |
| void | DoIt (const G4FastTrack &, G4FastStep &) override final |
| G4bool | ModelTrigger (const G4FastTrack &) override final |
| | Determines the applicability of the fast sim model to this particular track.
|
Definition at line 16 of file DeadMaterialShower.h.
◆ DeadMaterialShower()
| DeadMaterialShower::DeadMaterialShower |
( |
const std::string & | name, |
|
|
G4Region * | region, |
|
|
const double & | highEnergy, |
|
|
const double & | lowEnergy, |
|
|
const double & | zcutoff ) |
Definition at line 19 of file DeadMaterialShower.cxx.
20 : G4VFastSimulationModel(name, region),
24{
25
26}
double m_zcutoff
!< Kill only electrons and positrons up to this energy
double m_lowEnergy
!< Kill everything but muons up to this energy
◆ ~DeadMaterialShower()
| DeadMaterialShower::~DeadMaterialShower |
( |
| ) |
|
|
inline |
◆ DoIt()
| void DeadMaterialShower::DoIt |
( |
const G4FastTrack & | , |
|
|
G4FastStep & | fastStep ) |
|
finaloverride |
Definition at line 68 of file DeadMaterialShower.cxx.
69{
70 fastStep.KillPrimaryTrack();
71 fastStep.ProposePrimaryTrackPathLength(0.0);
72}
◆ IsApplicable()
| G4bool DeadMaterialShower::IsApplicable |
( |
const G4ParticleDefinition & | particleType | ) |
|
|
finaloverride |
Definition at line 28 of file DeadMaterialShower.cxx.
29{
30
31 if ( &particleType == G4Electron::ElectronDefinition() ||
32 &particleType == G4Positron::PositronDefinition() ||
33 &particleType == G4PionPlus::PionPlusDefinition() ||
34 &particleType == G4PionMinus::PionMinusDefinition() ||
35 &particleType == G4Gamma::GammaDefinition() ||
36 &particleType == G4Neutron::NeutronDefinition()
37 )
38 {
39 return true;
40 }
41 return false;
42
43}
◆ ModelTrigger()
| G4bool DeadMaterialShower::ModelTrigger |
( |
const G4FastTrack & | fastTrack | ) |
|
|
finaloverride |
Determines the applicability of the fast sim model to this particular track.
Checks that geometric location, energy, and particle type are within bounds. Also checks for containment of the particle's shower within a specific detector region.
Definition at line 45 of file DeadMaterialShower.cxx.
46{
47 if ( fabs( fastTrack.GetPrimaryTrack()->GetPosition().z() ) <
m_zcutoff ){
48
49 if ( fastTrack.GetPrimaryTrack()->GetKineticEnergy() <
m_lowEnergy &&
50 (fastTrack.GetPrimaryTrack()->GetDefinition() == G4Electron::Definition() ||
51 fastTrack.GetPrimaryTrack()->GetDefinition() == G4Positron::Definition() ) )
52 {
53 return true;
54 }
55 return false;
56 }
57
58
59 if ( fastTrack.GetPrimaryTrack()->GetKineticEnergy() >
m_highEnergy ||
60 fastTrack.GetPrimaryTrack()->GetDefinition() == G4MuonPlus::Definition() ||
61 fastTrack.GetPrimaryTrack()->GetDefinition() == G4MuonMinus::Definition() )
62 {
63 return false;
64 }
65 return true;
66}
◆ m_highEnergy
| double DeadMaterialShower::m_highEnergy |
|
private |
◆ m_lowEnergy
| double DeadMaterialShower::m_lowEnergy |
|
private |
◆ m_zcutoff
| double DeadMaterialShower::m_zcutoff |
|
private |
The documentation for this class was generated from the following files: