Loading...
Searching...
No Matches
Public Member Functions | List of all members
RE01SteppingAction Class Reference

#include <Doxymodules_runAndEvent.h>

Inheritance diagram for RE01SteppingAction:
G4UserSteppingAction

Public Member Functions

 RE01SteppingAction ()
 
virtual ~RE01SteppingAction ()
 
virtual void UserSteppingAction (const G4Step *)
 

Detailed Description

Definition at line 32 of file Doxymodules_runAndEvent.h.

Constructor & Destructor Documentation

◆ RE01SteppingAction()

RE01SteppingAction::RE01SteppingAction ( )

Definition at line 45 of file RE01SteppingAction.cc.

◆ ~RE01SteppingAction()

RE01SteppingAction::~RE01SteppingAction ( )
virtual

Definition at line 50 of file RE01SteppingAction.cc.

51{;}

Member Function Documentation

◆ UserSteppingAction()

void RE01SteppingAction::UserSteppingAction ( const G4Step theStep)
virtual

Definition at line 54 of file RE01SteppingAction.cc.

55{
56 // Suspend a track if it is entering into the calorimeter
57
58 // check if it is alive
59 G4Track * theTrack = theStep->GetTrack();
60 if(theTrack->GetTrackStatus()!=fAlive) { return; }
61
62 // get region information
63 G4StepPoint * thePrePoint = theStep->GetPreStepPoint();
64 G4LogicalVolume * thePreLV =
65 thePrePoint->GetPhysicalVolume()->GetLogicalVolume();
66 RE01RegionInformation* thePreRInfo
67 = (RE01RegionInformation*)(thePreLV->GetRegion()->GetUserInformation());
68 G4StepPoint * thePostPoint = theStep->GetPostStepPoint();
69 G4LogicalVolume * thePostLV =
70 thePostPoint->GetPhysicalVolume()->GetLogicalVolume();
71 RE01RegionInformation* thePostRInfo
72 = (RE01RegionInformation*)(thePostLV->GetRegion()->GetUserInformation());
73
74 // check if it is entering to the calorimeter volume
75 if(!(thePreRInfo->IsCalorimeter()) && (thePostRInfo->IsCalorimeter()))
76 {
77 // if the track had already been suspended at the previous step, let it go.
78 RE01TrackInformation* trackInfo
79 = static_cast<RE01TrackInformation*>(theTrack->GetUserInformation());
80 if(trackInfo->GetSuspendedStepID()>-1)
81 {
82 if(fpSteppingManager->GetverboseLevel()>0)
83 {
84 G4cout<<"++++ This track had already been suspended at step #"
85 <<trackInfo->GetSuspendedStepID()<<". Tracking resumed."
86 <<G4endl;
87 }
88 }
89 else
90 {
91 trackInfo->SetSuspendedStepID(theTrack->GetCurrentStepNumber());
92 theTrack->SetTrackStatus(fSuspend);
93 }
94 }
95}

The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration