8 #include "lcdd/core/UserRegionInformation.hh"
11 #include "G4SteppingManager.hh"
12 #include "G4UserSteppingAction.hh"
18 Module(
"SteppingAction", false, true) {
33 if (trackInfo == NULL)
40 trackSummary->
update(fpSteppingManager->GetTrack());
44 fpSteppingManager->GetTrack()->SetTrackStatus(fSuspend);
57 UserRegionInformation* regionInfo = UserRegionInformation::getRegionInformation(aStep->GetPreStepPoint());
58 if (regionInfo->getKillTracks()) {
61 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
68 const G4StepPoint* prePoint = step->GetPreStepPoint();
69 const G4StepPoint* postPoint = step->GetPostStepPoint();
70 const UserRegionInformation* prePointRegionInfo = (UserRegionInformation*) prePoint->GetTouchableHandle()->GetVolume()->GetLogicalVolume()->GetRegion()->GetUserInformation();
71 G4bool prePointInsideTrackerRegion = prePointRegionInfo->getStoreSecondaries();
74 G4bool postPointInsideTrackerRegion =
false;
75 if (postPoint->GetTouchableHandle()->GetVolume() != NULL) {
76 const UserRegionInformation* postPointRegionInfo = (UserRegionInformation*) postPoint->GetTouchableHandle()->GetVolume()->GetLogicalVolume()->GetRegion()->GetUserInformation();
77 postPointInsideTrackerRegion = postPointRegionInfo->getStoreSecondaries();
81 return ((!prePointInsideTrackerRegion) && postPointInsideTrackerRegion);
Base class for slic code modules that provides common functionality, such as logging to an output str...
PluginManager * m_pluginManager
void stepping(const G4Step *aStep)
void UserSteppingAction(const G4Step *step)
virtual ~SteppingAction()
bool isBackScattering(const G4Step *step)
void checkKillTrack(const G4Step *step)
Container for all information from G4Track that may be persisted to MCParticle output collection.
void update(const G4Track *track)
static UserTrackInformation * setupUserTrackInformation(const G4Track *track, G4bool save)