Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
processes
management
include
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
//
27
// $Id$
28
//
29
//
30
// ------------------------------------------------------------
31
// GEANT 4 class header file
32
//
33
// Class Description
34
//
35
// This class is the virtual class for wrapper process objects.
36
37
// ------------------------------------------------------------
38
// New Physics scheme 18 Dec. 1996 H.Kurahige
39
// ------------------------------------------------------------
40
41
#ifndef G4WrapperProcess_h
42
#define G4WrapperProcess_h 1
43
44
#include "
globals.hh
"
45
#include "
G4ios.hh
"
46
#include "
G4VProcess.hh
"
47
48
class
G4WrapperProcess
:
public
G4VProcess
49
{
50
// A virtual class for wrapper process objects.
51
52
private
:
53
// hide default constructor and assignment operator as private
54
// do not hide default constructor for alpha version
55
inline
G4WrapperProcess
& operator=(
const
G4WrapperProcess
&
right
);
56
57
public
:
// with description
58
// constructor requires the process name and type
59
G4WrapperProcess
(
const
G4String
& aName =
"Wrapped"
,
60
G4ProcessType
aType =
fNotDefined
);
61
62
// copy constructor copys the name but does not copy the
63
// physics table (0 pointer is assigned)
64
G4WrapperProcess
(
const
G4WrapperProcess
&right);
65
66
public
:
67
// destructor
68
virtual
~G4WrapperProcess
();
69
70
// equality opperators
71
inline
G4int
operator==
(
const
G4WrapperProcess
&right)
const
;
72
inline
G4int
operator!=
(
const
G4WrapperProcess
&right)
const
;
73
74
public
:
// with description
75
virtual
void
RegisterProcess
(
G4VProcess
*);
76
virtual
const
G4VProcess
*
GetRegisteredProcess
()
const
;
77
78
protected
:
79
G4VProcess
*
pRegProcess
;
80
81
public
:
// with description
83
// DoIt /////////////////
85
virtual
G4VParticleChange
*
PostStepDoIt
(
86
const
G4Track
& track,
87
const
G4Step
& stepData
88
);
89
90
virtual
G4VParticleChange
*
AlongStepDoIt
(
91
const
G4Track
& track,
92
const
G4Step
& stepData
93
);
94
virtual
G4VParticleChange
*
AtRestDoIt
(
95
const
G4Track
& track,
96
const
G4Step
& stepData
97
);
99
// GPIL //////////////
101
virtual
G4double
AlongStepGetPhysicalInteractionLength
(
102
const
G4Track
& track,
103
G4double
previousStepSize,
104
G4double
currentMinimumStep,
105
G4double
& proposedSafety,
106
G4GPILSelection
* selection);
107
108
virtual
G4double
AtRestGetPhysicalInteractionLength
(
109
const
G4Track
& track,
110
G4ForceCondition
*
condition
111
);
112
113
virtual
G4double
PostStepGetPhysicalInteractionLength
(
114
const
G4Track
& track,
115
G4double
previousStepSize,
116
G4ForceCondition
*
condition
117
) ;
118
120
virtual
G4bool
IsApplicable
(
const
G4ParticleDefinition
&);
121
// Returns true if this process object is applicable to
122
// the particle type
123
// Process will not be registered to a particle if IsApplicable is false
124
125
virtual
void
BuildPhysicsTable
(
const
G4ParticleDefinition
&);
126
// Messaged by the Particle definition (via the Process manager)
127
// whenever cross section tables have to be rebuilt (i.e. if new
128
// materials have been defined).
129
// It is overloaded by individual processes when they need physics
130
// tables.
131
132
// Processes which Build (for example in their
133
// constructors) physics tables independent of cuts
134
// should preferably use a
135
// private void BuildThePhysicsTable()
136
// function. Not another BuildPhysicsTable, please.
137
138
virtual
void
PreparePhysicsTable
(
const
G4ParticleDefinition
&);
139
// Messaged by the Particle definition (via the Process manager)
140
// whenever cross section tables have to be prepare for rebuilt
141
// (i.e. if new materials have been defined).
142
// It is overloaded by individual processes when they need physics
143
// tables.
144
145
// Processes which Build physics tables independent of cuts
146
// (for example in their constructors)
147
// should preferably use private
148
// void BuildThePhysicsTable() and void PreparePhysicsTable().
149
// Not another BuildPhysicsTable, please.
150
151
152
virtual
G4bool
StorePhysicsTable
(
const
G4ParticleDefinition
* ,
153
const
G4String
& directory,
154
G4bool
ascii =
false
);
155
// Store PhysicsTable in a file.
156
// (return false in case of failure at I/O )
157
158
virtual
G4bool
RetrievePhysicsTable
(
const
G4ParticleDefinition
* ,
159
const
G4String
& directory,
160
G4bool
ascii =
false
);
161
// Retrieve Physics from a file.
162
// (return true if the Physics Table can be build by using file)
163
// (return false if the process has no functionality or in case of failure)
164
// File name should be defined by each process
165
// and the file should be placed under the directory specifed by the argument.
167
virtual
void
StartTracking
(
G4Track
*);
168
virtual
void
EndTracking
();
169
// inform Start/End of tracking for each track to the physics process
170
171
public
:
172
virtual
void
SetProcessManager
(
const
G4ProcessManager
*);
173
// A process manager set its own pointer when the process is registered
174
// the process Manager
175
virtual
const
G4ProcessManager
*
GetProcessManager
();
176
// Get the process manager which the process belongs to
177
178
public
:
179
virtual
void
ResetNumberOfInteractionLengthLeft
();
180
// reset (determine the value of)NumberOfInteractionLengthLeft
181
182
};
183
184
inline
185
G4WrapperProcess
& G4WrapperProcess::operator=(
const
G4WrapperProcess
&)
186
{
187
G4Exception
(
"G4WrapperProcess::operator="
,
"Illegal operation"
,
188
JustWarning
,
"Assignment operator is called"
);
189
return
*
this
;
190
}
191
192
inline
193
G4int
G4WrapperProcess::operator==
(
const
G4WrapperProcess
&
right
)
const
194
{
195
return
(
this
== &right);
196
}
197
198
inline
199
G4int
G4WrapperProcess::operator!=
(
const
G4WrapperProcess
&
right
)
const
200
{
201
return
(
this
!= &right);
202
}
203
204
#endif
Generated on Sat May 25 2013 14:34:10 for Geant4 by
1.8.4