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
examples
extended
field
field04
include
F04GlobalField.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
//
28
//
29
//
30
#ifndef F04GlobalField_h
31
#define F04GlobalField_h 1
32
33
#include <vector>
34
35
#include "
G4FieldManager.hh
"
36
#include "
G4PropagatorInField.hh
"
37
#include "
G4MagIntegratorStepper.hh
"
38
#include "
G4ChordFinder.hh
"
39
40
#include "
G4MagneticField.hh
"
41
#include "
G4ElectroMagneticField.hh
"
42
43
#include "
G4Mag_EqRhs.hh
"
44
#include "
G4Mag_SpinEqRhs.hh
"
45
46
#include "
G4EqMagElectricField.hh
"
47
#include "
G4EqEMFieldWithSpin.hh
"
48
49
#include "
F04FieldMessenger.hh
"
50
#include "
F04ElementField.hh
"
51
52
// F04GlobalField - handles the global ElectroMagnetic field
53
//
54
// There is a single G04GlobalField object.
55
//
56
// The field from each individual beamline element is given by a
57
// ElementField object. Any number of overlapping ElementField
58
// objects can be added to the global field. Any element that
59
// represents an element with an EM field must add the appropriate
60
// ElementField to the global GlobalField object.
61
62
typedef
std::vector<F04ElementField*>
FieldList
;
63
64
class
F04GlobalField
:
public
G4ElectroMagneticField
{
65
//class F04GlobalField : public G4MagneticField {
66
67
private
:
68
69
F04GlobalField
();
70
F04GlobalField
(
const
F04GlobalField
&);
71
72
virtual
~
F04GlobalField
();
73
74
F04GlobalField
& operator=(
const
F04GlobalField
&);
75
76
void
SetupArray();
77
78
public
:
79
82
static
F04GlobalField
*
GetObject
();
83
87
virtual
void
GetFieldValue
(
const
G4double
* point,
G4double
* field)
const
;
88
90
virtual
G4bool
DoesFieldChangeEnergy
()
const
{
return
true
; }
91
94
void
AddElementField
(
F04ElementField
*
f
) {
if
(fFields) fFields->push_back(f); }
95
99
void
Clear
();
100
102
void
UpdateField
();
103
105
void
SetStepperType
(
G4int
i ) { fStepperType = i; }
106
108
void
SetStepper
();
109
111
void
SetMinStep
(
G4double
stp) { fMinStep = stp; }
112
114
void
SetDeltaChord
(
G4double
dcr) { fDeltaChord = dcr; }
115
117
void
SetDeltaOneStep
(
G4double
stp) { fDeltaOneStep = stp; }
118
120
void
SetDeltaIntersection
(
G4double
its) { fDeltaIntersection = its; }
121
123
void
SetEpsMin
(
G4double
eps) { fEpsMin = eps; }
124
126
void
SetEpsMax
(
G4double
eps) { fEpsMax = eps; }
127
129
FieldList
*
GetFields
() {
return
fFields; }
130
131
protected
:
132
134
G4FieldManager
*
GetGlobalFieldManager
();
135
136
private
:
137
138
static
F04GlobalField
* fObject;
139
140
G4int
fNfp;
141
G4bool
fFirst;
142
143
FieldList
* fFields;
144
145
const
F04ElementField
**fFp;
146
147
private
:
148
149
G4int
fStepperType;
150
151
G4double
fMinStep;
152
G4double
fDeltaChord;
153
G4double
fDeltaOneStep;
154
G4double
fDeltaIntersection;
155
G4double
fEpsMin;
156
G4double
fEpsMax;
157
158
// G4Mag_EqRhs* fEquation;
159
// G4Mag_SpinEqRhs* fEquation;
160
161
// G4EqMagElectricField* fEquation;
162
G4EqEMFieldWithSpin
* fEquation;
163
164
G4FieldManager
* fFieldManager;
165
G4PropagatorInField
* fFieldPropagator;
166
G4MagIntegratorStepper
* fStepper;
167
G4ChordFinder
* fChordFinder;
168
169
F04FieldMessenger
* fFieldMessenger;
170
171
};
172
173
#endif
Generated on Sat May 25 2013 14:32:25 for Geant4 by
1.8.4