Belle II Software  release-08-01-10
ExtStepLengthLimitProcess.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <simulation/kernel/ExtStepLengthLimitProcess.h>
10 #include <G4Track.hh>
11 
12 using namespace std;
13 using namespace Belle2;
14 using namespace Belle2::Simulation;
15 
16 ExtStepLengthLimitProcess::ExtStepLengthLimitProcess(const G4String& processName) :
17  G4VDiscreteProcess(processName),
18  m_stepLimit(kInfinity) // user may change this with a geant4 UI command
19 {
20 }
21 
23 {
24 }
25 
26 G4VParticleChange* ExtStepLengthLimitProcess::PostStepDoIt(const G4Track& track, const G4Step&)
27 {
28  aParticleChange.Initialize(track);
29  aParticleChange.ProposeSteppingControl(AvoidHitInvocation);
30  return &aParticleChange;
31 }
32 
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
See if the particle has left the geant4e "target" volume.
Abstract base class for different kinds of events.