#include <BLKillTrack.hh>
Any BLElement that wants to kill tracks that enter a given physical volume (e.g. a box command with kill=1) should register an instance of this class with the BLManager, associated with the physical volume.
Public Member Functions | |
BLKillTrack (G4String &_name) | |
void | UserSteppingAction (const G4Step *step) |
Private Attributes | |
bool | verbose |
G4String | name |
BLKillTrack::BLKillTrack | ( | G4String & | _name | ) | [inline] |
References BLParam::getInt(), Param, and verbose.
00035 : BLManager::SteppingAction(), name(_name) 00036 { 00037 verbose = Param.getInt("steppingVerbose") != 0; 00038 }
void BLKillTrack::UserSteppingAction | ( | const G4Step * | step | ) | [inline, virtual] |
Implements BLManager::SteppingAction.
00039 { 00040 G4Track *track = step->GetTrack(); 00041 track->SetTrackStatus(fStopAndKill); 00042 if(verbose) printf("Track killed by '%s' with kill=1\n", 00043 name.c_str()); 00044 }
bool BLKillTrack::verbose [private] |
Referenced by BLKillTrack(), and UserSteppingAction().
G4String BLKillTrack::name [private] |
Referenced by UserSteppingAction().