#include <ActsGeantFollower.h>
Definition at line 21 of file ActsGeantFollower.h.
◆ ActsGeantFollower()
ActsGeantFollower::ActsGeantFollower |
( |
| ) |
|
◆ BeginOfEventAction()
void ActsGeantFollower::BeginOfEventAction |
( |
const G4Event * |
| ) |
|
|
overridevirtual |
◆ BeginOfRunAction()
void ActsGeantFollower::BeginOfRunAction |
( |
const G4Run * |
| ) |
|
|
overridevirtual |
◆ EndOfEventAction()
void ActsGeantFollower::EndOfEventAction |
( |
const G4Event * |
| ) |
|
|
overridevirtual |
◆ UserSteppingAction()
void ActsGeantFollower::UserSteppingAction |
( |
const G4Step * |
aStep | ) |
|
|
overridevirtual |
Definition at line 47 of file ActsGeantFollower.cxx.
50 if (aStep->GetTrack()->GetParentID() || aStep->GetPreStepPoint()->GetMomentum().mag()<500 )
52 std::cout <<
"low pt" << std::endl;
53 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
58 if (aStep->GetPreStepPoint()->GetPosition().z()>3000 || sqrt(aStep->GetPreStepPoint()->GetPosition().x()*aStep->GetPreStepPoint()->GetPosition().x()+aStep->GetPreStepPoint()->GetPosition().y()*aStep->GetPreStepPoint()->GetPosition().y())>1050 )
60 std::cout <<
"out" << std::endl;
61 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
66 G4StepPoint * g4PreStep = aStep->GetPreStepPoint();
67 G4ThreeVector g4Momentum = g4PreStep->GetMomentum();
68 G4ThreeVector g4Position = g4PreStep->GetPosition();
70 G4Track* g4Track = aStep->GetTrack();
71 const G4DynamicParticle* g4DynParticle = g4Track->GetDynamicParticle();
74 const G4TouchableHistory* touchHist =
static_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
78 const G4LogicalVolume *lv= touchHist->GetVolume()->GetLogicalVolume();
81 const G4Material *
mat = lv->GetMaterial();
83 double steplength = aStep->GetStepLength();
85 double X0 =
mat->GetRadlen();
88 bool isSensitive =
true;
89 m_helper->trackParticle(g4Position, g4Momentum, g4DynParticle->GetPDGcode(), g4DynParticle->GetCharge(), steplength,
X0, isSensitive);
95 description <<
"ActsGeantFollower::SteppingAction NULL G4LogicalVolume pointer.";
96 G4Exception(
"ActsGeantFollower",
"ActsGeantFollower2", FatalException,
description);
102 description <<
"ActsGeantFollower::SteppingAction NULL G4TouchableHistory pointer.";
103 G4Exception(
"ActsGeantFollower",
"ActsGeantFollower3", FatalException,
description);
◆ m_helper
Initial value:=
ToolHandle<IActsGeantFollowerHelper>("ActsGeantFollowerHelper")
Definition at line 34 of file ActsGeantFollower.h.
The documentation for this class was generated from the following files: