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

#include <ExN04SteppingAction.hh>

Inheritance diagram for ExN04SteppingAction:
Collaboration diagram for ExN04SteppingAction:

Public Member Functions

 ExN04SteppingAction ()
 
virtual ~ExN04SteppingAction ()
 
virtual void UserSteppingAction (const G4Step *)
 
 ExN04SteppingAction ()
 
virtual ~ExN04SteppingAction ()
 
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 ExN04SteppingAction.hh.

Constructor & Destructor Documentation

ExN04SteppingAction::ExN04SteppingAction ( )

Definition at line 43 of file ExN04SteppingAction.cc.

44 {
45 }
ExN04SteppingAction::~ExN04SteppingAction ( )
virtual

Definition at line 48 of file ExN04SteppingAction.cc.

49 {
50 }
ExN04SteppingAction::ExN04SteppingAction ( )
virtual ExN04SteppingAction::~ExN04SteppingAction ( )
virtual

Member Function Documentation

void ExN04SteppingAction::UserSteppingAction ( const G4Step theStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 53 of file ExN04SteppingAction.cc.

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

Here is the call graph for this function:

virtual void ExN04SteppingAction::UserSteppingAction ( const G4Step )
virtual

Reimplemented from G4UserSteppingAction.


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