Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
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 // $Id: F04GlobalField.hh 78551 2014-01-07 09:45:08Z gcosmo $
27 //
30 //
31 
32 #ifndef F04GlobalField_h
33 #define F04GlobalField_h 1
34 
35 #include <vector>
36 
37 #include "G4FieldManager.hh"
38 #include "G4PropagatorInField.hh"
40 #include "G4ChordFinder.hh"
41 
42 #include "G4MagneticField.hh"
44 
45 #include "G4Mag_EqRhs.hh"
46 #include "G4Mag_SpinEqRhs.hh"
47 
48 #include "G4EqMagElectricField.hh"
49 #include "G4EqEMFieldWithSpin.hh"
50 
51 #include "F04FieldMessenger.hh"
52 #include "F04ElementField.hh"
53 
55 
56 // F04GlobalField - handles the global ElectroMagnetic field
57 //
58 // There is a single G04GlobalField object.
59 //
60 // The field from each individual beamline element is given by a
61 // ElementField object. Any number of overlapping ElementField
62 // objects can be added to the global field. Any element that
63 // represents an element with an EM field must add the appropriate
64 // ElementField to the global GlobalField object.
65 
66 typedef std::vector<F04ElementField*> FieldList;
67 
69 //class F04GlobalField : public G4MagneticField {
70 
71 private:
72 
75 
77 
78  void SetupArray();
79 
80 public:
81 
82  virtual ~F04GlobalField();
83 
87  static F04GlobalField* GetObject();
88 
92  virtual void GetFieldValue(const G4double* point, G4double* field) const;
93 
95  virtual G4bool DoesFieldChangeEnergy() const { return true; }
96 
100  {
101  if (fFields) fFields->push_back(f);
102  }
103 
107  void Clear();
108 
110  void ConstructField();
111 
113  void SetStepperType( G4int i ) { fStepperType = i; }
114 
116  void SetStepper();
117 
119  void SetMinStep(G4double stp) { fMinStep = stp; }
120 
122  void SetDeltaChord(G4double dcr) { fDeltaChord = dcr; }
123 
126 
129 
132 
135 
137  FieldList* GetFields() { return fFields; }
138 
139 protected:
140 
143 
144 private:
145 
147 
150 
152 
154 
155 private:
156 
158 
165 
166 // G4Mag_EqRhs* fEquation;
167 // G4Mag_SpinEqRhs* fEquation;
168 
169 // G4EqMagElectricField* fEquation;
171 
176 
178 
180 
181 };
182 
183 #endif
G4PropagatorInField * fFieldPropagator
virtual void GetFieldValue(const G4double *point, G4double *field) const
Definition of the F04ElementField class.
void SetEpsMin(G4double eps)
Set the minimum eps length.
void ConstructField()
constructs all field tracking objects
static G4ThreadLocal F04GlobalField * fObject
#define G4ThreadLocal
Definition: tls.hh:69
G4FieldManager * GetGlobalFieldManager()
Get the global field manager.
Definition of the F04DetectorConstruction class.
G4double fDeltaChord
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
const F04ElementField ** fFp
G4EqEMFieldWithSpin * fEquation
void SetDeltaOneStep(G4double stp)
Set the delta one step length.
void SetMinStep(G4double stp)
Set the minimum step length.
Definition of the F04FieldMessenger class.
void SetDeltaIntersection(G4double its)
Set the delta intersection length.
void SetEpsMax(G4double eps)
Set the maximum eps length.
static F04GlobalField * GetObject()
void AddElementField(F04ElementField *f)
F04GlobalField(F04DetectorConstruction *const)
F04DetectorConstruction * fDetectorConstruction
G4MagIntegratorStepper * fStepper
G4double fDeltaOneStep
int G4int
Definition: G4Types.hh:78
G4double fDeltaIntersection
void SetStepperType(G4int i)
Set the Stepper types.
std::vector< F04ElementField * > FieldList
G4FieldManager * fFieldManager
FieldList * fFields
G4ChordFinder * fChordFinder
virtual G4bool DoesFieldChangeEnergy() const
DoesFieldChangeEnergy() returns true.
FieldList * GetFields()
Return the list of Element Fields.
F04FieldMessenger * fFieldMessenger
static const G4double eps
F04GlobalField & operator=(const F04GlobalField &)
void SetStepper()
Set the Stepper.
virtual ~F04GlobalField()
void SetDeltaChord(G4double dcr)
Set the delta chord length.