Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE01SteppingAction Class Reference

#include <RE01SteppingAction.hh>

Inheritance diagram for RE01SteppingAction:
Collaboration diagram for RE01SteppingAction:

Public Member Functions

 RE01SteppingAction ()
 
virtual ~RE01SteppingAction ()
 
virtual void UserSteppingAction (const G4Step *)
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()
 
virtual void SetSteppingManagerPointer (G4SteppingManager *pValue)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Definition at line 38 of file RE01SteppingAction.hh.

Constructor & Destructor Documentation

RE01SteppingAction::RE01SteppingAction ( )

Definition at line 46 of file RE01SteppingAction.cc.

RE01SteppingAction::~RE01SteppingAction ( )
virtual

Definition at line 51 of file RE01SteppingAction.cc.

52 {;}

Member Function Documentation

void RE01SteppingAction::UserSteppingAction ( const G4Step theStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 55 of file RE01SteppingAction.cc.

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

Here is the call graph for this function:


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