4 // Author: I. Hrivnacova
6 // Class AliSteppingAction
7 // -----------------------
8 // See the class description in the header file.
10 #include "AliSteppingAction.h"
14 #include <G4SteppingManager.hh>
18 //_____________________________________________________________________________
19 AliSteppingAction::AliSteppingAction()
20 : TG4SteppingAction(),
25 //_____________________________________________________________________________
26 AliSteppingAction::~AliSteppingAction() {
32 //_____________________________________________________________________________
33 void AliSteppingAction::SteppingAction(const G4Step* step)
35 // Stops particle if it gets outside of user defined tracking region.
38 G4ThreeVector position
39 = step->GetPostStepPoint()->GetPosition();
41 if (position.mag() > gAlice->TrackingRmax() ||
42 abs(position.z()) > gAlice->TrackingZmax()) {
45 if (fLoopVerboseLevel > 0) {
46 G4cout << "*** Particle has reached user defined tracking region. ***"
48 if (fStandardVerboseLevel == 0) PrintTrackInfo(step->GetTrack());
52 step->GetTrack()->SetTrackStatus(fStopAndKill);