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#ifndef EXTSTEPLENGTHLIMITPROCESS_H_
10#define EXTSTEPLENGTHLIMITPROCESS_H_
11
12#include <globals.hh>
13#include "G4VDiscreteProcess.hh"
14
15class G4Track;
16
17namespace Belle2 {
23 namespace Simulation {
24
26 class ExtStepLengthLimitProcess: public G4VDiscreteProcess {
27
28 public:
29
31 explicit ExtStepLengthLimitProcess(const G4String& processName = "ExtStepLengthLimitProcess");
32
35
37 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
38
40 G4double PostStepGetPhysicalInteractionLength(const G4Track&, G4double, G4ForceCondition*);
41
43 G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);
44
46 G4double GetStepLimit() const { return m_stepLimit; }
47
49 void SetStepLimit(G4double val) { m_stepLimit = val; }
50
51 protected:
52
54 G4double m_stepLimit;
55
56 };
57
59 G4ForceCondition* condition)
60 {
61 *condition = Forced; // PostStepDoIt() must be called after each step
62 return m_stepLimit;
63 }
64
65 inline G4double ExtStepLengthLimitProcess::GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*)
66 {
67 return kInfinity;
68 }
69
70
71 } //end namespace Simulation
72
74} //end Belle2 namespace
75
76#endif /* EXTSTEPLENGTHLIMITPROCESS_H_ */
Defines the physics process that avoids hit invocation in sensitive volumes.
G4double GetStepLimit() const
Returns the step limit.
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.