Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4WrapperProcess.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4WrapperProcess
27//
28// Class description:
29//
30// Virtual class for wrapper process objects.
31
32// Author: H.Kurahige, 18 December 1996
33// --------------------------------------------------------------------
34#ifndef G4WrapperProcess_hh
35#define G4WrapperProcess_hh 1
36
37#include "globals.hh"
38#include "G4ios.hh"
39#include "G4VProcess.hh"
40
42{
43 public:
44
45 G4WrapperProcess(const G4String& aName = "Wrapped",
47 // Constructor requires the process name and type
48
50 // Copy constructor copies the name but does not copy the
51 // physics table (null pointer is assigned)
52
53 virtual ~G4WrapperProcess();
54 // Destructor
55
57
58 inline G4bool operator==(const G4WrapperProcess& right) const;
59 inline G4bool operator!=(const G4WrapperProcess& right) const;
60 // Equality operators
61
62 virtual void RegisterProcess(G4VProcess*);
63 virtual const G4VProcess* GetRegisteredProcess() const;
64
65 ////////////////////////////
66 // DoIt /////////////////
67 ///////////////////////////
68
70 const G4Track& track,
71 const G4Step& stepData
72 );
73
75 const G4Track& track,
76 const G4Step& stepData
77 );
79 const G4Track& track,
80 const G4Step& stepData
81 );
82
83 //////////////////////////
84 // GPIL //////////////
85 /////////////////////////
86
88 const G4Track& track,
89 G4double previousStepSize,
90 G4double currentMinimumStep,
91 G4double& proposedSafety,
92 G4GPILSelection* selection);
93
95 const G4Track& track,
97 );
98
100 const G4Track& track,
101 G4double previousStepSize,
103 );
104
106 // Returns true if this process object is applicable to
107 // the particle type
108 // Process will not be registered to a particle if IsApplicable is false
109
110 virtual void BuildPhysicsTable(const G4ParticleDefinition&);
111 // Messaged by the Particle definition (via the Process manager)
112 // whenever cross-section tables have to be rebuilt (i.e. if new
113 // materials have been defined).
114 // It is overloaded by individual processes when they need physics
115 // tables
116
117 // Processes which build (for example in their constructors)
118 // physics tables independent of cuts should preferably use a private
119 // void BuildThePhysicsTable() function.
120 // **Not** another BuildPhysicsTable().
121
122 virtual void PreparePhysicsTable(const G4ParticleDefinition&);
123 // Messaged by the Particle definition (via the Process manager)
124 // whenever cross-section tables have to be prepare for rebuilt
125 // (i.e. if new materials have been defined).
126 // It is overloaded by individual processes when they need physics
127 // tables
128
129
131 const G4String& directory,
132 G4bool ascii = false);
133 // Store PhysicsTable in a file.
134 // Return false in case of failure at I/O
135
137 const G4String& directory,
138 G4bool ascii = false);
139 // Retrieve Physics from a file.
140 // Return true if the Physics Table can be build by using file.
141 // Return false if the process has no functionality or in case of failure.
142 // File name should be defined by each process and the file should be
143 // placed under the directory specified by the argument
144
145 virtual void StartTracking(G4Track*);
146 virtual void EndTracking();
147 // inform Start/End of tracking for each track to the physics process
148
149 virtual void SetProcessManager(const G4ProcessManager*);
150 // A process manager sets its own pointer when the process is registered
151 // in the process Manager
152 virtual const G4ProcessManager* GetProcessManager();
153 // Get the process manager which the process belongs to
154
156 // Reset (determine the value of) NumberOfInteractionLengthLeft
157 virtual void SetMasterProcess(G4VProcess* masterP);
158 // Needed for MT, forward call to underlying process
159
160 protected:
161
163};
164
165// ------------------------
166// Inline operators
167// ------------------------
168
169inline
171{
172 return (this == &right);
173}
174
175inline
177{
178 return (this != &right);
179}
180
181#endif
G4double condition(const G4ErrorSymMatrix &m)
G4ForceCondition
G4GPILSelection
G4ProcessType
@ fNotDefined
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
Definition: G4Step.hh:62
virtual void PreparePhysicsTable(const G4ParticleDefinition &)
virtual G4VParticleChange * AtRestDoIt(const G4Track &track, const G4Step &stepData)
G4bool operator!=(const G4WrapperProcess &right) const
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition)
virtual G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
virtual void SetMasterProcess(G4VProcess *masterP)
virtual void SetProcessManager(const G4ProcessManager *)
virtual void EndTracking()
virtual G4bool IsApplicable(const G4ParticleDefinition &)
virtual const G4VProcess * GetRegisteredProcess() const
G4bool operator==(const G4WrapperProcess &right) const
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
virtual void RegisterProcess(G4VProcess *)
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
virtual ~G4WrapperProcess()
virtual void StartTracking(G4Track *)
virtual const G4ProcessManager * GetProcessManager()
G4WrapperProcess & operator=(const G4WrapperProcess &)=delete
G4VProcess * pRegProcess
virtual void ResetNumberOfInteractionLengthLeft()
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &stepData)
virtual G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
virtual G4VParticleChange * AlongStepDoIt(const G4Track &track, const G4Step &stepData)