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
F04GlobalField.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file F04GlobalField.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
//
26
//
29
//
30
31
#ifndef F04GlobalField_h
32
#define F04GlobalField_h 1
33
34
#include <vector>
35
36
#include "
G4FieldManager.hh
"
37
#include "
G4PropagatorInField.hh
"
38
#include "
G4MagIntegratorStepper.hh
"
39
#include "
G4ChordFinder.hh
"
40
41
#include "
G4MagneticField.hh
"
42
#include "
G4ElectroMagneticField.hh
"
43
44
#include "
G4Mag_EqRhs.hh
"
45
#include "
G4Mag_SpinEqRhs.hh
"
46
47
#include "
G4EqMagElectricField.hh
"
48
#include "
G4EqEMFieldWithSpin.hh
"
49
50
#include "
F04FieldMessenger.hh
"
51
#include "
F04ElementField.hh
"
52
53
#include "
F04DetectorConstruction.hh
"
54
55
// F04GlobalField - handles the global ElectroMagnetic field
56
//
57
// There is a single G04GlobalField object.
58
//
59
// The field from each individual beamline element is given by a
60
// ElementField object. Any number of overlapping ElementField
61
// objects can be added to the global field. Any element that
62
// represents an element with an EM field must add the appropriate
63
// ElementField to the global GlobalField object.
64
65
typedef
std::vector<F04ElementField*>
FieldList
;
66
67
class
F04GlobalField
:
public
G4ElectroMagneticField
{
68
//class F04GlobalField : public G4MagneticField {
69
70
private
:
71
72
F04GlobalField
(
F04DetectorConstruction
*
const
);
73
F04GlobalField
(
const
F04GlobalField
&);
74
75
F04GlobalField
&
operator=
(
const
F04GlobalField
&);
76
77
void
SetupArray
();
78
79
public
:
80
81
virtual
~F04GlobalField
();
82
85
static
F04GlobalField
*
GetObject
(
F04DetectorConstruction
*
const
);
86
static
F04GlobalField
*
GetObject
();
87
91
virtual
void
GetFieldValue
(
const
G4double
*
point
,
G4double
* field)
const
;
92
94
virtual
G4bool
DoesFieldChangeEnergy
()
const
{
return
true
; }
95
98
void
AddElementField
(
F04ElementField
*
f
)
99
{
100
if
(
fFields
)
fFields
->push_back(f);
101
}
102
106
void
Clear
();
107
109
void
ConstructField
();
110
112
void
SetStepperType
(
G4int
i ) {
fStepperType
= i; }
113
115
void
SetStepper
();
116
118
void
SetMinStep
(
G4double
stp) {
fMinStep
= stp; }
119
121
void
SetDeltaChord
(
G4double
dcr) {
fDeltaChord
= dcr; }
122
124
void
SetDeltaOneStep
(
G4double
stp) {
fDeltaOneStep
= stp; }
125
127
void
SetDeltaIntersection
(
G4double
its) {
fDeltaIntersection
= its; }
128
130
void
SetEpsMin
(
G4double
eps
) {
fEpsMin
=
eps
; }
131
133
void
SetEpsMax
(
G4double
eps
) {
fEpsMax
=
eps
; }
134
136
FieldList
*
GetFields
() {
return
fFields
; }
137
138
protected
:
139
141
G4FieldManager
*
GetGlobalFieldManager
();
142
143
private
:
144
145
static
G4ThreadLocal
F04GlobalField
*
fObject
;
146
147
G4int
fNfp
;
148
G4bool
fFirst
;
149
150
FieldList
*
fFields
;
151
152
const
F04ElementField
**
fFp
;
153
154
private
:
155
156
G4int
fStepperType
;
157
158
G4double
fMinStep
;
159
G4double
fDeltaChord
;
160
G4double
fDeltaOneStep
;
161
G4double
fDeltaIntersection
;
162
G4double
fEpsMin
;
163
G4double
fEpsMax
;
164
165
// G4Mag_EqRhs* fEquation;
166
// G4Mag_SpinEqRhs* fEquation;
167
168
// G4EqMagElectricField* fEquation;
169
G4EqEMFieldWithSpin
*
fEquation
;
170
171
G4FieldManager
*
fFieldManager
;
172
G4PropagatorInField
*
fFieldPropagator
;
173
G4MagIntegratorStepper
*
fStepper
;
174
G4ChordFinder
*
fChordFinder
;
175
176
F04FieldMessenger
*
fFieldMessenger
;
177
178
F04DetectorConstruction
*
fDetectorConstruction
;
179
180
};
181
182
#endif
geant4
tree
geant4-10.6-release
examples
extended
field
field04
include
F04GlobalField.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:05
using
1.8.2 with
ECCE GitHub integration