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

#include <Doxymodules_eventgenerator.h>

Inheritance diagram for ExN04SteppingAction:
G4UserSteppingAction

Public Member Functions

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

Detailed Description

Definition at line 50 of file Doxymodules_eventgenerator.h.

Constructor & Destructor Documentation

◆ ExN04SteppingAction()

ExN04SteppingAction::ExN04SteppingAction ( )

Definition at line 42 of file ExN04SteppingAction.cc.

◆ ~ExN04SteppingAction()

ExN04SteppingAction::~ExN04SteppingAction ( )
virtual

Definition at line 48 of file ExN04SteppingAction.cc.

49{
50}

Member Function Documentation

◆ UserSteppingAction()

void ExN04SteppingAction::UserSteppingAction ( const G4Step theStep)
virtual

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.substr(0,4)=="calo") { return; }
74 G4StepPoint * thePostPoint = theStep->GetPostStepPoint();
75 G4VPhysicalVolume * thePostPV = thePostPoint->GetPhysicalVolume();
76 G4String thePostPVname = thePostPV->GetName();
77 if(thePostPVname.substr(0,4)!="calo") { return; }
78
79 // then suspend the track
80 theTrack->SetTrackStatus(fSuspend);
81}

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

Applications | User Support | Publications | Collaboration