Geant4  10.02.p03
RE05SteppingAction Class Reference

#include <RE05SteppingAction.hh>

Inheritance diagram for RE05SteppingAction:
Collaboration diagram for RE05SteppingAction:

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Definition at line 38 of file RE05SteppingAction.hh.

Constructor & Destructor Documentation

◆ RE05SteppingAction()

RE05SteppingAction::RE05SteppingAction ( )

Definition at line 42 of file RE05SteppingAction.cc.

43 {;}

◆ ~RE05SteppingAction()

RE05SteppingAction::~RE05SteppingAction ( )
virtual

Definition at line 45 of file RE05SteppingAction.cc.

46 {;}

Member Function Documentation

◆ UserSteppingAction()

void RE05SteppingAction::UserSteppingAction ( const G4Step *  theStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 48 of file RE05SteppingAction.cc.

49 {
50  G4Track * theTrack = theStep->GetTrack();
51 
52  // check if it is alive
53  if(theTrack->GetTrackStatus()!=fAlive) { return; }
54 
55  // check if it is primary
56  if(theTrack->GetParentID()!=0) { return; }
57 
58  // check if it is NOT muon
59  G4ParticleDefinition * particleType = theTrack->GetDefinition();
60  if((particleType==G4MuonPlus::MuonPlusDefinition())
61  ||(particleType==G4MuonMinus::MuonMinusDefinition()))
62  { return; }
63 
64  // check if it is entering to the calorimeter volume
65  G4StepPoint * thePrePoint = theStep->GetPreStepPoint();
66  G4VPhysicalVolume * thePrePV = thePrePoint->GetPhysicalVolume();
67  G4String thePrePVname = thePrePV->GetName();
68  if(thePrePVname(0,4)=="calo") { return; }
69  G4StepPoint * thePostPoint = theStep->GetPostStepPoint();
70  G4VPhysicalVolume * thePostPV = thePostPoint->GetPhysicalVolume();
71  G4String thePostPVname = thePostPV->GetName();
72  if(thePostPVname(0,4)!="calo") { return; }
73 
74  // then suspend the track
75  theTrack->SetTrackStatus(fSuspend);
76 }
static G4MuonPlus * MuonPlusDefinition()
Definition: G4MuonPlus.cc:94
const G4String & GetName() const
static G4MuonMinus * MuonMinusDefinition()
Definition: G4MuonMinus.cc:95
Here is the call graph for this function:

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