Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4Field.h
Go to the documentation of this file.
1#ifndef TG4_FIELD_H
2#define TG4_FIELD_H
3
4//-------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include "TG4FieldParameters.h"
19
20#include <G4MagneticField.hh>
21#include <globals.hh>
22
24
25class G4ChordFinder;
27class G4MagIntegratorStepper;
28class G4LogicalVolume;
29class G4VIntegrationDriver;
30
31class TVirtualMagField;
32
46
48{
49 public:
50 TG4Field(const TG4FieldParameters& parameters, TVirtualMagField* magField,
51 G4LogicalVolume* lv = 0);
52 ~TG4Field();
53
54 void Update(const TG4FieldParameters& parameters);
55
56 // access to field setting
57 G4Field* GetG4Field() const;
59 G4MagIntegratorStepper* GetStepper() const;
60 G4VIntegrationDriver* GetIntegrationDriver() const;
61
62 private:
63 // methods
64 G4Field* CreateG4Field(
65 const TG4FieldParameters& parameters, TVirtualMagField* magField);
67 G4MagIntegratorStepper* CreateStepper(
68 G4EquationOfMotion* equation, StepperType stepper);
69 G4VIntegrationDriver* CreateFSALStepperAndDriver(
70 G4EquationOfMotion* equation, StepperType stepper, G4double minStep);
71
72 // data
74 G4Field* fG4Field;
76 TVirtualMagField* fVirtualMagField;
78 G4LogicalVolume* fLogicalVolume;
82 G4MagIntegratorStepper* fStepper;
84 G4VIntegrationDriver* fDriver;
86 G4ChordFinder* fChordFinder;
87};
88
89// inline functions
90
91inline G4Field* TG4Field::GetG4Field() const
92{
94 return fG4Field;
95}
96
98{
100 return fEquation;
101}
102
103inline G4MagIntegratorStepper* TG4Field::GetStepper() const
104{
106 return fStepper;
107}
108
109#endif // TG4_FIELD_H
Definition of the TG4FieldParameters class.
The magnetic field parameters.
The class for constructing magnetic, electromagnetic and gravity fields which strength is defined via...
Definition TG4Field.h:48
G4EquationOfMotion * fEquation
The equation of motion.
Definition TG4Field.h:80
G4ChordFinder * fChordFinder
Chord finder.
Definition TG4Field.h:86
G4VIntegrationDriver * GetIntegrationDriver() const
G4VIntegrationDriver * CreateFSALStepperAndDriver(G4EquationOfMotion *equation, StepperType stepper, G4double minStep)
Definition TG4Field.cxx:292
G4Field * CreateG4Field(const TG4FieldParameters &parameters, TVirtualMagField *magField)
Definition TG4Field.cxx:101
G4LogicalVolume * fLogicalVolume
The associated volume (if local field)
Definition TG4Field.h:78
TVirtualMagField * fVirtualMagField
The associated TGeo magnetic field.
Definition TG4Field.h:76
TG4Field(const TG4FieldParameters &parameters, TVirtualMagField *magField, G4LogicalVolume *lv=0)
Definition TG4Field.cxx:68
G4MagIntegratorStepper * fStepper
The magnetic integrator stepper.
Definition TG4Field.h:82
G4EquationOfMotion * CreateEquation(EquationType equation)
Definition TG4Field.cxx:126
G4MagIntegratorStepper * GetStepper() const
Definition TG4Field.h:103
G4MagIntegratorStepper * CreateStepper(G4EquationOfMotion *equation, StepperType stepper)
Definition TG4Field.cxx:183
G4VIntegrationDriver * fDriver
The magnetic integrator driver.
Definition TG4Field.h:84
G4Field * GetG4Field() const
Definition TG4Field.h:91
void Update(const TG4FieldParameters &parameters)
Definition TG4Field.cxx:322
G4Field * fG4Field
Geant4 field.
Definition TG4Field.h:74
G4EquationOfMotion * GetEquation() const
Definition TG4Field.h:97