ECCE @ EIC Software
 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"
39 #include "G4ChordFinder.hh"
40 
41 #include "G4MagneticField.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 
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 
68 //class F04GlobalField : public G4MagneticField {
69 
70 private:
71 
74 
76 
77  void SetupArray();
78 
79 public:
80 
81  virtual ~F04GlobalField();
82 
86  static F04GlobalField* GetObject();
87 
91  virtual void GetFieldValue(const G4double* point, G4double* field) const;
92 
94  virtual G4bool DoesFieldChangeEnergy() const { return true; }
95 
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 
125 
128 
131 
134 
136  FieldList* GetFields() { return fFields; }
137 
138 protected:
139 
142 
143 private:
144 
146 
149 
151 
153 
154 private:
155 
157 
164 
165 // G4Mag_EqRhs* fEquation;
166 // G4Mag_SpinEqRhs* fEquation;
167 
168 // G4EqMagElectricField* fEquation;
170 
175 
177 
179 
180 };
181 
182 #endif