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
src
G4VRestContinuousProcess.cc
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 implementation file
32
//
33
// History: first implementation, based on object model of
34
// 2nd December 1995, G.Cosmo
35
// --------------------------------------------------------------
36
// New Physics scheme 8 Jan. 1997 H.Kurahige
37
// ------------------------------------------------------------
38
39
#include "
G4VRestContinuousProcess.hh
"
40
#include "
G4SystemOfUnits.hh
"
41
42
#include "
G4Step.hh
"
43
#include "
G4Track.hh
"
44
#include "
G4MaterialTable.hh
"
45
#include "
G4VParticleChange.hh
"
46
47
G4VRestContinuousProcess::G4VRestContinuousProcess
()
48
:
G4VProcess
(
"No Name Discrete Process"
) ,
49
valueGPILSelection(
CandidateForSelection
)
50
{
51
G4Exception
(
"G4VRestContinuousProcess::G4VRestContinuousProcess()"
,
"ProcMan102"
,
52
JustWarning
,
"Default constructor is called"
);
53
}
54
55
G4VRestContinuousProcess::G4VRestContinuousProcess
(
const
G4String
& aName ,
G4ProcessType
aType)
56
:
G4VProcess
(aName, aType),
57
valueGPILSelection(
CandidateForSelection
)
58
{
59
enablePostStepDoIt
=
false
;
60
}
61
62
G4VRestContinuousProcess::~G4VRestContinuousProcess
()
63
{
64
}
65
66
G4VRestContinuousProcess::G4VRestContinuousProcess
(
G4VRestContinuousProcess
&
right
)
67
:
G4VProcess
(right),
68
valueGPILSelection(right.valueGPILSelection)
69
{
70
}
71
72
G4double
G4VRestContinuousProcess::AlongStepGetPhysicalInteractionLength
(
73
const
G4Track
& track,
74
G4double
previousStepSize,
75
G4double
currentMinimumStep,
76
G4double
& currentSafety,
77
G4GPILSelection
* selection
78
)
79
{
80
// GPILSelection is set to defaule value of CandidateForSelection
81
valueGPILSelection =
CandidateForSelection
;
82
83
// get Step limit proposed by the process
84
G4double
steplength =
GetContinuousStepLimit
(track,previousStepSize,currentMinimumStep, currentSafety);
85
86
// set return value for G4GPILSelection
87
*selection = valueGPILSelection;
88
#ifdef G4VERBOSE
89
if
(
verboseLevel
>1){
90
G4cout
<<
"G4VRestContinuousProcess::AlongStepGetPhysicalInteractionLength "
;
91
G4cout
<<
"[ "
<<
GetProcessName
() <<
"]"
<<
G4endl
;
92
track.
GetDynamicParticle
()->
DumpInfo
();
93
G4cout
<<
" in Material "
<< track.
GetMaterial
()->
GetName
() <<
G4endl
;
94
G4cout
<<
"IntractionLength= "
<< steplength/
cm
<<
"[cm] "
<<
G4endl
;
95
}
96
#endif
97
return
steplength ;
98
}
99
100
G4double
G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength
(
101
const
G4Track
& track,
102
G4ForceCondition
*
condition
103
)
104
{
105
// beggining of tracking
106
ResetNumberOfInteractionLengthLeft
();
107
108
// condition is set to "Not Forced"
109
*condition =
NotForced
;
110
111
// get mean life time
112
currentInteractionLength
=
GetMeanLifeTime
(track, condition);
113
114
#ifdef G4VERBOSE
115
if
((
currentInteractionLength
<0.0) || (
verboseLevel
>2)){
116
G4cout
<<
"G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength "
;
117
G4cout
<<
"[ "
<<
GetProcessName
() <<
"]"
<<
G4endl
;
118
track.
GetDynamicParticle
()->
DumpInfo
();
119
G4cout
<<
" in Material "
<< track.
GetMaterial
()->
GetName
() <<
G4endl
;
120
G4cout
<<
"MeanLifeTime = "
<<
currentInteractionLength
/
ns
<<
"[ns]"
<<
G4endl
;
121
}
122
#endif
123
124
return
theNumberOfInteractionLengthLeft
*
currentInteractionLength
;
125
}
126
127
128
G4VParticleChange
*
G4VRestContinuousProcess::AtRestDoIt
(
129
const
G4Track
&,
130
const
G4Step
&
131
)
132
{
133
// clear NumberOfInteractionLengthLeft
134
ClearNumberOfInteractionLengthLeft
();
135
136
return
pParticleChange
;
137
}
138
139
G4VParticleChange
*
G4VRestContinuousProcess::AlongStepDoIt
(
140
const
G4Track
& ,
141
const
G4Step
&
142
)
143
{
144
return
pParticleChange
;
145
}
Generated on Sat May 25 2013 14:34:10 for Geant4 by
1.8.4