Loading...
Searching...
No Matches
F03FieldSetup.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//
26/// \file field/field03/include/F03FieldSetup.hh
27/// \brief Definition of the F03FieldSetup class
28//
29//
30//
31//
32//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
35#ifndef F03FieldSetup_h
36#define F03FieldSetup_h 1
37
38#include "G4MagneticField.hh"
39#include "G4UniformMagField.hh"
40
41#include "CLHEP/Units/SystemOfUnits.h"
42
43class G4FieldManager;
44class G4ChordFinder;
48
49/// A class for setting up the Magnetic Field
50///
51/// It also creates the necessary classes to control accuracy of propagation.
52/// In this example
53/// - There is a global field for most of the setup;
54/// - A local field overides it for some volume(s) and it assumed to be
55/// uniform.
56
57class F03FieldSetup
58{
59public:
60 F03FieldSetup(); // A zero field
61 virtual ~F03FieldSetup();
62
63 void SetStepperType( G4int i ) { fStepperType = i; }
64
65 void CreateSteppers();
66
67 void SetMinStep(G4double s) { fMinStep = s; }
68
69 void SetFieldValue(G4ThreeVector fieldVector);
70 void SetFieldZValue(G4double fieldValue);
71 void SetLocalFieldValue(G4ThreeVector fieldVector);
72 G4ThreeVector GetGlobalFieldValue() const { return GetConstantFieldValue(fMagneticField); }
74
75 void UpdateField();
76
78
79protected:
80
81 // Find the global Field Manager
83 G4ThreeVector GetConstantFieldValue(G4MagneticField* magneticField) const;
84
93
96 G4int fStepperType = 4; // ClassicalRK4 is default stepper;
97
98 G4double fMinStep = 0.25 * CLHEP::mm ; // minimal step of 1 mm is default;
99
101
102};
103
104#endif
A class for setting up the Magnetic Field.
virtual ~F03FieldSetup()
F03FieldMessenger * fFieldMessenger
G4Mag_UsualEqRhs * fLocalEquation
G4MagIntegratorStepper * fLocalStepper
G4double fMinStep
G4FieldManager * fFieldManager
G4ThreeVector GetGlobalFieldValue() const
G4ThreeVector GetConstantFieldValue(G4MagneticField *magneticField) const
void SetMinStep(G4double s)
G4FieldManager * GetLocalFieldManager()
void SetFieldValue(G4ThreeVector fieldVector)
G4MagneticField * fMagneticField
void SetLocalFieldValue(G4ThreeVector fieldVector)
G4FieldManager * GetGlobalFieldManager()
G4Mag_UsualEqRhs * fEquation
G4ChordFinder * fChordFinder
G4ChordFinder * fLocalChordFinder
G4FieldManager * fLocalFieldManager
G4MagIntegratorStepper * fStepper
void SetStepperType(G4int i)
G4MagneticField * fLocalMagneticField
G4ThreeVector GetLocalFieldValue() const
void SetFieldZValue(G4double fieldValue)

Applications | User Support | Publications | Collaboration