#include <StoppedParticleFastSim.h>
Definition at line 17 of file StoppedParticleFastSim.h.
◆ StoppedParticleFastSim()
| StoppedParticleFastSim::StoppedParticleFastSim |
( |
const std::string & | name, |
|
|
G4Region * | region, |
|
|
const std::string & | fsSDname ) |
◆ ~StoppedParticleFastSim()
| StoppedParticleFastSim::~StoppedParticleFastSim |
( |
| ) |
|
|
inline |
◆ DoIt()
| void StoppedParticleFastSim::DoIt |
( |
const G4FastTrack & | fastTrack, |
|
|
G4FastStep & | fastStep ) |
|
finaloverride |
Definition at line 57 of file StoppedParticleFastSim.cxx.
58{
61
62 G4SDManager *sdm = G4SDManager::GetSDMpointer();
63 G4VSensitiveDetector * vsd = sdm->FindSensitiveDetector(
m_fsSDname );
64 if (vsd) {
65 m_fsSD =
dynamic_cast<TrackFastSimSD*
>(vsd);
68 description <<
"DoIt: Could not cast the SD into an instance of TrackFasSimSD.";
69 G4Exception(
"StoppedParticleFastSim",
"MissingTrackFastSimSD", FatalException,
description);
70 abort();
71 }
72 }
73 else {
74 G4cout << "StoppedParticleFastSim::DoIt INFO Could not get TrackFastSimSD sensitive detector. If you are not writing track records this is expected." << G4endl;
75 }
76
77 }
78 const int id = fastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding();
81 id == 1000021 ||
83 m_fsSD->WriteTrack( fastTrack.GetPrimaryTrack() ,
false ,
true );
84 }
85 fastStep.KillPrimaryTrack();
86}
std::string description
glabal timer - how long have I taken so far?
bool isSquarkLH(const T &p)
bool isRHadron(const T &p)
◆ IsApplicable()
| G4bool StoppedParticleFastSim::IsApplicable |
( |
const G4ParticleDefinition & | | ) |
|
|
finaloverride |
◆ ModelTrigger()
| G4bool StoppedParticleFastSim::ModelTrigger |
( |
const G4FastTrack & | fastTrack | ) |
|
|
finaloverridevirtual |
Definition at line 35 of file StoppedParticleFastSim.cxx.
36{
37
38 int id = fastTrack.GetPrimaryTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding();
39 if (id<1000000 || id>1100000) return true;
41 id == 1000021 ||
43 G4Material *
mat = fastTrack.GetPrimaryTrack()->GetMaterial();
44 double minA=1500000.;
45 for (
unsigned int i=0;
i<
mat->GetNumberOfElements();++
i){
46 if (
mat->GetElement(i) &&
47 minA>
mat->GetElement(i)->GetN()){
48 minA=
mat->GetElement(i)->GetN();
49 }
50 }
51 if (fastTrack.GetPrimaryTrack()->GetVelocity()<0.15*std::pow(minA,-2./3.)*CLHEP::c_light) return true;
52 return false;
53 }
54 return true;
55}
◆ m_fsSD
◆ m_fsSDname
| std::string StoppedParticleFastSim::m_fsSDname {""} |
|
protected |
◆ m_init
| bool StoppedParticleFastSim::m_init {false} |
|
protected |
The documentation for this class was generated from the following files: