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
electromagnetic
dna
management
include
G4ITTransportation.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
// $Id: G4ITTransportation.hh 64374 2012-10-31 16:37:23Z gcosmo $
27
//
31
//
32
// Original Author : John Apostolakis
33
//
34
// Contact : Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
35
//
36
// WARNING : This class is released as a prototype.
37
// It might strongly evolve or even disapear in the next releases.
38
//
39
// -------------------------------------------------------------------
40
41
#ifndef G4ITTransportation_H
42
#define G4ITTransportation_H
43
44
#include <
CLHEP/Units/SystemOfUnits.h
>
45
46
#include "
G4IT.hh
"
47
#include "
G4VITProcess.hh
"
48
#include "
G4Track.hh
"
49
#include "
G4Step.hh
"
50
#include "
G4ParticleChangeForTransport.hh
"
51
52
class
G4ITNavigator
;
53
//class G4Navigator;
54
class
G4SafetyHelper
;
55
class
G4PropagatorInField
;
56
57
class
G4ITTransportation
:
public
G4VITProcess
58
{
59
// Concrete class that does the geometrical transport
60
public
:
// with description
61
62
G4ITTransportation
(
const
G4String
& aName =
"ITTransportation"
,
G4int
verbosityLevel= 1);
63
virtual
~G4ITTransportation
();
64
65
G4ITTransportation
(
const
G4ITTransportation
&);
66
67
G4IT_ADD_CLONE
(
G4VITProcess
,
G4ITTransportation
)
68
69
virtual
void
BuildPhysicsTable
(
const
G4ParticleDefinition
&){;}
70
71
virtual
void
ComputeStep
(
const
G4Track
&,
72
const
G4Step
&,
73
const
double
timeStep,
74
double
& spaceStep) ;
75
76
virtual
void
StartTracking
(
G4Track
* aTrack);
77
// Give to the track a pointer to the transportation state
78
79
//________________________________________________________
80
public
:
// without description
81
82
virtual
G4double
AtRestGetPhysicalInteractionLength
(
83
const
G4Track
& ,
84
G4ForceCondition
*
85
)
86
{
87
return
-1.0;
88
}
89
// No operation in AtRestDoIt.
90
91
virtual
G4VParticleChange
*
AtRestDoIt
(
92
const
G4Track
& ,
93
const
G4Step
&
94
)
95
{
96
return
0;
97
}
98
// No operation in AtRestDoIt.
99
100
virtual
G4double
AlongStepGetPhysicalInteractionLength
(
101
const
G4Track
& track,
102
G4double
,
// previousStepSize
103
G4double
currentMinimumStep,
104
G4double
& currentSafety,
105
G4GPILSelection
* selection);
106
107
virtual
G4double
PostStepGetPhysicalInteractionLength
(
108
const
G4Track
& ,
// track
109
G4double
,
// previousStepSize
110
G4ForceCondition
* pForceCond);
111
112
virtual
G4VParticleChange
*
AlongStepDoIt
(
const
G4Track
& track,
113
const
G4Step
& stepData );
114
115
virtual
G4VParticleChange
*
PostStepDoIt
(
const
G4Track
& track,
116
const
G4Step
& ) ;
117
118
//________________________________________________________
119
// inline virtual G4double GetTransportationTime() ;
120
121
G4PropagatorInField
*
GetPropagatorInField
();
122
void
SetPropagatorInField
(
G4PropagatorInField
* pFieldPropagator);
123
// Access/set the assistant class that Propagate in a Field.
124
125
inline
void
SetVerboseLevel
(
G4int
verboseLevel
);
126
inline
G4int
GetVerboseLevel
()
const
;
127
// Level of warnings regarding eg energy conservation
128
// in field integration.
129
130
inline
G4double
GetThresholdWarningEnergy
()
const
;
131
inline
G4double
GetThresholdImportantEnergy
()
const
;
132
inline
G4int
GetThresholdTrials
()
const
;
133
134
inline
void
SetThresholdWarningEnergy
(
G4double
newEnWarn );
135
inline
void
SetThresholdImportantEnergy
(
G4double
newEnImp );
136
inline
void
SetThresholdTrials
(
G4int
newMaxTrials );
137
138
// Get/Set parameters for killing loopers:
139
// Above 'important' energy a 'looping' particle in field will
140
// *NOT* be abandoned, except after fThresholdTrials attempts.
141
// Below Warning energy, no verbosity for looping particles is issued
142
143
inline
G4double
GetMaxEnergyKilled
()
const
;
144
inline
G4double
GetSumEnergyKilled
()
const
;
145
inline
void
ResetKilledStatistics
(
G4int
report = 1);
146
// Statistics for tracks killed (currently due to looping in field)
147
148
inline
void
EnableShortStepOptimisation
(
G4bool
optimise=
true
);
149
// Whether short steps < safety will avoid to call Navigator (if field=0)
150
151
protected
:
152
//________________________________________________________________
153
// Protected methods
154
G4bool
DoesGlobalFieldExist
();
155
// Checks whether a field exists for the "global" field manager.
156
157
//________________________________________________________________
158
// Process information
159
struct
G4ITTransportationState
:
public
G4ProcessState
160
{
161
public
:
162
G4ITTransportationState
();
163
virtual
~G4ITTransportationState
();
164
165
G4ThreeVector
fTransportEndPosition
;
166
G4ThreeVector
fTransportEndMomentumDir
;
167
G4double
fTransportEndKineticEnergy
;
168
G4ThreeVector
fTransportEndSpin
;
169
G4bool
fMomentumChanged
;
170
G4bool
fEnergyChanged
;
171
G4bool
fEndGlobalTimeComputed
;
172
G4double
fCandidateEndGlobalTime
;
173
G4bool
fParticleIsLooping
;
174
// The particle's state after this Step, Store for DoIt
175
176
G4TouchableHandle
fCurrentTouchableHandle
;
177
G4bool
fGeometryLimitedStep
;
178
// Flag to determine whether a boundary was reached.
179
180
G4ThreeVector
fPreviousSftOrigin
;
181
G4double
fPreviousSafety
;
182
// Remember last safety origin & value.
183
184
// Counter for steps in which particle reports 'looping',
185
// if it is above 'Important' Energy
186
G4int
fNoLooperTrials
;
187
188
// G4bool fFieldExists;
189
// Whether a magnetic field exists ...
190
// A data member for this is problematic: it is useful only if it
191
// can be initialised and updated -- and a scheme is not yet possible.
192
193
G4double
endpointDistance
;
194
};
195
196
G4ITTransportationState
*
const
&
fTransportationState
;
197
198
//________________________________________________________________
199
// Informations relative to the process only (meaning no information
200
// relative to the treated particle)
201
G4ITNavigator
*
fLinearNavigator
;
202
G4PropagatorInField
*
fFieldPropagator
;
203
// The Propagators used to transport the particle
204
205
// static const G4TouchableHandle nullTouchableHandle; // Points to (G4VTouchable*) 0
206
207
G4ParticleChangeForTransport
fParticleChange
;
208
// New ParticleChange
209
210
// Thresholds for looping particles:
211
//
212
G4double
fThreshold_Warning_Energy
;
// Warn above this energy
213
G4double
fThreshold_Important_Energy
;
// Hesitate above this
214
G4int
fThresholdTrials
;
// for this no of trials
215
// Above 'important' energy a 'looping' particle in field will
216
// *NOT* be abandoned, except after fThresholdTrials attempts.
217
G4double
fUnimportant_Energy
;
218
// Below this energy, no verbosity for looping particles is issued
219
220
221
// Statistics for tracks abandoned
222
G4double
fSumEnergyKilled
;
223
G4double
fMaxEnergyKilled
;
224
225
// Whether to avoid calling G4Navigator for short step ( < safety)
226
// If using it, the safety estimate for endpoint will likely be smaller.
227
G4bool
fShortStepOptimisation
;
228
229
G4SafetyHelper
*
fpSafetyHelper
;
// To pass it the safety value obtained
230
231
// Verbosity
232
G4int
fVerboseLevel
;
233
// Verbosity level for warnings
234
// eg about energy non-conservation in magnetic field.
235
236
void
SetInstantiateProcessState
(
G4bool
flag)
237
{ fInstantiateProcessState = flag; }
238
239
G4bool
InstantiateProcessState
() {
return
fInstantiateProcessState; }
240
241
private
:
242
G4bool
fInstantiateProcessState;
243
G4ITTransportation
& operator=(
const
G4ITTransportation
&);
244
};
245
246
#include "G4ITTransportation.icc"
247
#endif // G4ITTransportation_H
Generated on Sat May 25 2013 14:33:30 for Geant4 by
1.8.4