#include <EnergyLossRecorder.h>
Definition at line 39 of file EnergyLossRecorder.h.
◆ EnergyLossRecorder()
| EnergyLossRecorder::EnergyLossRecorder |
( |
const Config & | config | ) |
|
◆ BeginOfEventAction()
| void EnergyLossRecorder::BeginOfEventAction |
( |
const G4Event * | | ) |
|
|
overridevirtual |
◆ BeginOfRunAction()
| void EnergyLossRecorder::BeginOfRunAction |
( |
const G4Run * | | ) |
|
|
overridevirtual |
◆ EndOfEventAction()
| void EnergyLossRecorder::EndOfEventAction |
( |
const G4Event * | | ) |
|
|
overridevirtual |
◆ EndOfRunAction()
| void EnergyLossRecorder::EndOfRunAction |
( |
const G4Run * | | ) |
|
|
overridevirtual |
◆ UserSteppingAction()
| void EnergyLossRecorder::UserSteppingAction |
( |
const G4Step * | aStep | ) |
|
|
overridevirtual |
Definition at line 54 of file EnergyLossRecorder.cxx.
55 {
56
57 if (aStep->GetTrack()->GetParentID()) {
58 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
59 return;
60 }
62
63
64
65 const G4TouchableHistory* touchHist = static_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable());
66
67 const G4LogicalVolume *lv= touchHist ? touchHist->GetVolume()->GetLogicalVolume() : nullptr;
68 const G4Material *
mat = lv ? lv->GetMaterial() :
nullptr;
69
70
71 if (mat &&
mat->GetRadlen() < 200000.) {
72
73 G4ThreeVector
pos = aStep->GetPreStepPoint()->GetPosition();
74 double px = aStep->GetPreStepPoint()->GetMomentum().x();
75 double py = aStep->GetPreStepPoint()->GetMomentum().y();
76 double pz = aStep->GetPreStepPoint()->GetMomentum().z();
79
80
82
84 double m = aStep->GetTrack()->GetDynamicParticle()->GetMass();
85 int pdgCode = aStep->GetTrack()->GetDynamicParticle()->GetPDGcode();
86 m_config.pmWriter->initializeTrack(position,momentum,m,pdgCode);
87 }
88 else {
89 m_config.pmWriter->recordTrackState(position,momentum);
90 }
91 }
92 }
Eigen::Matrix< double, 3, 1 > Vector3D
◆ m_config
| Config G4UA::EnergyLossRecorder::m_config |
|
private |
◆ m_entries
| unsigned int G4UA::EnergyLossRecorder::m_entries |
|
private |
The documentation for this class was generated from the following files: