Belle II Software development
ExtStepLengthLimitProcess.h
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#pragma once
10
11#include <globals.hh>
12#include "G4VDiscreteProcess.hh"
13
14class G4Track;
15
16namespace Belle2 {
21
22 namespace Simulation {
23
25 class ExtStepLengthLimitProcess: public G4VDiscreteProcess {
26
27 public:
28
30 explicit ExtStepLengthLimitProcess(const G4String& processName = "ExtStepLengthLimitProcess");
31
34
36 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
37
39 G4double PostStepGetPhysicalInteractionLength(const G4Track&, G4double, G4ForceCondition*);
40
42 G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);
43
45 G4double GetStepLimit() const { return m_stepLimit; }
46
48 void SetStepLimit(G4double val) { m_stepLimit = val; }
49
50 protected:
51
53 G4double m_stepLimit;
54
55 };
56
58 G4ForceCondition* condition)
59 {
60 *condition = Forced; // PostStepDoIt() must be called after each step
61 return m_stepLimit;
62 }
63
64 inline G4double ExtStepLengthLimitProcess::GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*)
65 {
66 return kInfinity;
67 }
68
69
70 } //end namespace Simulation
71
73} //end Belle2 namespace
G4double GetStepLimit() const
Returns the step limit.
ExtStepLengthLimitProcess(const G4String &processName="ExtStepLengthLimitProcess")
constructor
G4double GetMeanFreePath(const G4Track &, G4double, G4ForceCondition *)
Returns the mean free path for this process.
void SetStepLimit(G4double val)
Sets the step limit.
G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double, G4ForceCondition *)
Returns the step length after each step.
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
See if the particle has left the geant4e "target" volume.
Abstract base class for different kinds of events.