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
G4IVRestDiscreteProcess.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
// $Id:
30
// ------------------------------------------------------------
31
// GEANT 4 class header file
32
//
33
//
34
// Class Description
35
// Abstract class which defines the public behavior of
36
// rest + discrete physics interactions.
37
//
38
// ------------------------------------------------------------
39
// New Physics scheme 8 Mar. 1997 H.Kurahige
40
// ------------------------------------------------------------
41
42
43
#ifndef G4IVRestDiscreteProcess_h
44
#define G4IVRestDiscreteProcess_h 1
45
46
#include <
CLHEP/Units/SystemOfUnits.h
>
47
48
#include "
globals.hh
"
49
#include "
G4ios.hh
"
50
#include "
Randomize.hh
"
51
52
#include "
G4VProcess.hh
"
53
54
#include "
G4Step.hh
"
55
#include "
G4Track.hh
"
56
#include "
G4MaterialTable.hh
"
57
#include "
G4VParticleChange.hh
"
58
59
class
G4IVRestDiscreteProcess
:
public
G4VProcess
60
{
61
// Abstract class which defines the public behavior of
62
// rest + discrete physics interactions.
63
64
public
:
// with description
65
66
// constructors
67
G4IVRestDiscreteProcess
(
const
G4String
& ,
68
G4ProcessType
aType =
fNotDefined
);
69
G4IVRestDiscreteProcess
(
G4IVRestDiscreteProcess
&);
70
71
public
:
72
virtual
~G4IVRestDiscreteProcess
();
73
74
public
:
// with description
75
// GPIL and DoIt methods derived from G4VProcess
76
virtual
G4double
PostStepGetPhysicalInteractionLength
(
77
const
G4Track
& track,
78
G4double
previousStepSize,
79
G4ForceCondition
*
condition
80
);
81
82
virtual
G4VParticleChange
*
PostStepDoIt
(
83
const
G4Track
& ,
84
const
G4Step
&
85
);
86
87
virtual
G4double
AtRestGetPhysicalInteractionLength
(
88
const
G4Track
& ,
89
G4ForceCondition
*
90
);
91
92
G4VParticleChange
*
AtRestDoIt
(
93
const
G4Track
& ,
94
const
G4Step
&
95
);
96
97
// no operation in AlongStepDoIt
98
virtual
G4double
AlongStepGetPhysicalInteractionLength
(
99
const
G4Track
&,
100
G4double
,
101
G4double
,
102
G4double
& ,
103
G4GPILSelection
*
104
){
return
-1.0; }
105
106
// no operation in AlongStepDoIt
107
virtual
G4VParticleChange
*
AlongStepDoIt
(
108
const
G4Track
& ,
109
const
G4Step
&
110
) {
return
0;}
111
112
protected
:
// with description
113
virtual
void
SubtractNumberOfInteractionLengthLeft
(
114
G4double
previousStepSize) ;
115
116
virtual
G4double
GetMeanLifeTime
(
const
G4Track
& aTrack,
G4ForceCondition
* condition)=0;
117
// Calculates the mean life-time (i.e. for decays) of the
118
// particle at rest due to the occurence of the given process,
119
// or converts the probability of interaction (i.e. for
120
// annihilation) into the life-time of the particle for the
121
// occurence of the given process.
122
123
private
:
124
// hide default constructor and assignment operator as private
125
G4IVRestDiscreteProcess
();
126
G4IVRestDiscreteProcess
& operator=(
const
G4IVRestDiscreteProcess
&
right
);
127
128
129
protected
:
130
G4PhysicsTable
*
theNlambdaTable
;
131
G4PhysicsTable
*
theInverseNlambdaTable
;
132
133
const
G4double
BIGSTEP
;
134
};
135
136
// -----------------------------------------
137
// inlined function members implementation
138
// -----------------------------------------
139
140
inline
141
void
G4IVRestDiscreteProcess::SubtractNumberOfInteractionLengthLeft
(
142
G4double
)
143
{
144
// dummy routine
145
;
146
}
147
148
inline
G4VParticleChange
*
G4IVRestDiscreteProcess::PostStepDoIt
(
149
const
G4Track
& ,
150
const
G4Step
&
151
)
152
{
153
// reset NumberOfInteractionLengthLeft
154
ClearNumberOfInteractionLengthLeft
();
155
156
return
pParticleChange
;
157
}
158
159
inline
G4double
G4IVRestDiscreteProcess::AtRestGetPhysicalInteractionLength
(
160
const
G4Track
& track,
161
G4ForceCondition
*
condition
162
)
163
{
164
// beggining of tracking
165
ResetNumberOfInteractionLengthLeft
();
166
167
// condition is set to "Not Forced"
168
*condition =
NotForced
;
169
170
// get mean life time
171
currentInteractionLength
=
GetMeanLifeTime
(track, condition);
172
173
#ifdef G4VERBOSE
174
if
((
currentInteractionLength
<0.0) || (
verboseLevel
>2)){
175
G4cout
<<
"G4IVRestDiscreteProcess::AtRestGetPhysicalInteractionLength "
;
176
G4cout
<<
"[ "
<<
GetProcessName
() <<
"]"
<<
G4endl
;
177
track.
GetDynamicParticle
()->
DumpInfo
();
178
G4cout
<<
" in Material "
<< track.
GetMaterial
()->
GetName
() <<
G4endl
;
179
G4cout
<<
"MeanLifeTime = "
<<
currentInteractionLength
/CLHEP::ns <<
"[ns]"
<<
G4endl
;
180
}
181
#endif
182
183
return
theNumberOfInteractionLengthLeft
*
currentInteractionLength
;
184
}
185
186
187
inline
G4VParticleChange
*
G4IVRestDiscreteProcess::AtRestDoIt
(
188
const
G4Track
&,
189
const
G4Step
&
190
)
191
{
192
// clear NumberOfInteractionLengthLeft
193
ClearNumberOfInteractionLengthLeft
();
194
195
return
pParticleChange
;
196
}
197
198
#endif
Generated on Sat May 25 2013 14:34:10 for Geant4 by
1.8.4