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
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.