ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4MonopoleTransportation.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4MonopoleTransportation.hh
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
//
28
//
29
//
30
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
//
33
// ------------------------------------------------------------
34
// GEANT 4 include file implementation
35
// ------------------------------------------------------------
36
//
37
// Class description:
38
//
39
// G4MonopoleTransportation is a process responsible for the transportation of
40
// magnetic monopoles, i.e. the geometrical propagation encountering the
41
// geometrical sub-volumes of the detectors.
42
// It is also tasked with part of updating the "safety".
43
44
// =======================================================================
45
// Created: 3 May 2010, J. Apostolakis, B. Bozsogi
46
// =======================================================================
47
48
#ifndef G4MonopoleTransportation_hh
49
#define G4MonopoleTransportation_hh 1
50
51
#include "
G4VProcess.hh
"
52
#include "
G4FieldManager.hh
"
53
54
#include "
G4Navigator.hh
"
55
#include "
G4TransportationManager.hh
"
56
#include "
G4PropagatorInField.hh
"
57
#include "
G4Track.hh
"
58
#include "
G4Step.hh
"
59
#include "
G4ParticleChangeForTransport.hh
"
60
#include "
G4MonopoleFieldSetup.hh
"
61
62
class
G4SafetyHelper
;
63
class
G4Monopole
;
64
65
class
G4MonopoleTransportation
:
public
G4VProcess
66
{
67
// Concrete class that does the geometrical transport
68
69
public
:
// with description
70
71
G4MonopoleTransportation
(
const
G4Monopole
*
p
,
G4int
verbosityLevel= 1);
72
~G4MonopoleTransportation
();
73
74
virtual
G4double
AlongStepGetPhysicalInteractionLength
(
75
const
G4Track
&
track
,
76
G4double
previousStepSize,
77
G4double
currentMinimumStep,
78
G4double
& currentSafety,
79
G4GPILSelection
* selection
80
);
81
82
virtual
G4VParticleChange
*
AlongStepDoIt
(
83
const
G4Track
& track,
84
const
G4Step
& stepData
85
);
86
87
virtual
G4VParticleChange
*
PostStepDoIt
(
88
const
G4Track
& track,
89
const
G4Step
& stepData
90
);
91
// Responsible for the relocation.
92
93
virtual
G4double
PostStepGetPhysicalInteractionLength
(
94
const
G4Track
& ,
95
G4double
previousStepSize,
96
G4ForceCondition
* pForceCond
97
);
98
// Forces the PostStepDoIt action to be called,
99
// but does not limit the step.
100
101
G4PropagatorInField
*
GetPropagatorInField
();
102
void
SetPropagatorInField
(
G4PropagatorInField
* pFieldPropagator);
103
// Access/set the assistant class that Propagate in a Field.
104
105
inline
G4double
GetThresholdWarningEnergy
()
const
;
106
inline
G4double
GetThresholdImportantEnergy
()
const
;
107
inline
G4int
GetThresholdTrials
()
const
;
108
109
inline
void
SetThresholdWarningEnergy
(
G4double
newEnWarn );
110
inline
void
SetThresholdImportantEnergy
(
G4double
newEnImp );
111
inline
void
SetThresholdTrials
(
G4int
newMaxTrials );
112
113
// Get/Set parameters for killing loopers:
114
// Above 'important' energy a 'looping' particle in field will
115
// *NOT* be abandoned, except after fThresholdTrials attempts.
116
// Below Warning energy, no verbosity for looping particles is issued
117
118
inline
G4double
GetMaxEnergyKilled
()
const
;
119
inline
G4double
GetSumEnergyKilled
()
const
;
120
inline
void
ResetKilledStatistics
(
G4int
report = 1);
121
// Statistics for tracks killed (currently due to looping in field)
122
123
inline
void
EnableShortStepOptimisation
(
G4bool
optimise=
true
);
124
// Whether short steps < safety will avoid to call Navigator (if field=0)
125
126
public
:
// without description
127
128
virtual
G4double
AtRestGetPhysicalInteractionLength
(
129
const
G4Track
& ,
130
G4ForceCondition
*
131
) {
return
-1.0; };
132
// No operation in AtRestDoIt.
133
134
virtual
G4VParticleChange
*
AtRestDoIt
(
135
const
G4Track
& ,
136
const
G4Step
&
137
) {
return
0;};
138
// No operation in AtRestDoIt.
139
140
G4double
GetZmagFieldValue
()
const
{
return
fMagSetup
->
GetZmagFieldValue
(); }
141
142
virtual
void
StartTracking
(
G4Track
* aTrack);
143
// Reset state for new (potentially resumed) track
144
145
protected
:
146
147
G4bool
DoesGlobalFieldExist
();
148
// Checks whether a field exists for the "global" field manager.
149
150
private
:
151
152
const
G4Monopole
*
fParticleDef
;
153
154
G4MonopoleFieldSetup
*
fMagSetup
;
155
156
G4Navigator
*
fLinearNavigator
;
157
G4PropagatorInField
*
fFieldPropagator
;
158
// The Propagators used to transport the particle
159
160
G4ThreeVector
fTransportEndPosition
;
161
G4ThreeVector
fTransportEndMomentumDir
;
162
G4double
fTransportEndKineticEnergy
;
163
G4ThreeVector
fTransportEndSpin
;
164
G4bool
fMomentumChanged
;
165
// G4bool fEnergyChanged;
166
G4bool
fEndGlobalTimeComputed
;
167
G4double
fCandidateEndGlobalTime
;
168
// The particle's state after this Step, Store for DoIt
169
170
G4bool
fParticleIsLooping
;
171
172
G4TouchableHandle
fCurrentTouchableHandle
;
173
174
G4bool
fGeometryLimitedStep
;
175
// Flag to determine whether a boundary was reached.
176
177
G4ThreeVector
fPreviousSftOrigin
;
178
G4double
fPreviousSafety
;
179
// Remember last safety origin & value.
180
181
G4ParticleChangeForTransport
fParticleChange
;
182
// New ParticleChange
183
184
G4double
endpointDistance
;
185
186
// Thresholds for looping particles:
187
//
188
G4double
fThreshold_Warning_Energy
;
// Warn above this energy
189
G4double
fThreshold_Important_Energy
;
// Hesitate above this
190
G4int
fThresholdTrials
;
// for this no of trials
191
// Above 'important' energy a 'looping' particle in field will
192
// *NOT* be abandoned, except after fThresholdTrials attempts.
193
// G4double fUnimportant_Energy;
194
// Below this energy, no verbosity for looping particles is issued
195
196
// Counter for steps in which particle reports 'looping',
197
// if it is above 'Important' Energy
198
G4int
fNoLooperTrials
;
199
// Statistics for tracks abandoned
200
G4double
fSumEnergyKilled
;
201
G4double
fMaxEnergyKilled
;
202
203
// Whether to avoid calling G4Navigator for short step ( < safety)
204
// If using it, the safety estimate for endpoint will likely be smaller.
205
G4bool
fShortStepOptimisation
;
206
207
G4SafetyHelper
*
fpSafetyHelper
;
// To pass it the safety value obtained
208
G4int
noCalls
;
209
210
};
211
212
#include "G4MonopoleTransportation.icc"
213
214
#endif
geant4
tree
geant4-10.6-release
examples
extended
exoticphysics
monopole
include
G4MonopoleTransportation.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:04
using
1.8.2 with
ECCE GitHub integration