G4TUniformMagneticField is a templated version of G4UniformMagneticField.
More...
#include <G4TUniformMagneticField.hh>
G4TUniformMagneticField is a templated version of G4UniformMagneticField.
Definition at line 47 of file G4TUniformMagneticField.hh.
◆ G4TUniformMagneticField() [1/3]
| G4TUniformMagneticField::G4TUniformMagneticField |
( |
const G4ThreeVector & | FieldVector | ) |
|
|
inline |
◆ G4TUniformMagneticField() [2/3]
Definition at line 60 of file G4TUniformMagneticField.hh.
63 {
64 if ( (vField<0) || (vTheta<0) || (vTheta>pi) || (vPhi<0) || (vPhi>twopi) )
65 {
66 G4Exception(
"G4TUniformMagneticField::G4TUniformMagneticField()",
68 }
69 fFieldComponents[0] = vField*std::sin(vTheta)*std::cos(vPhi) ;
70 fFieldComponents[1] = vField*std::sin(vTheta)*std::sin(vPhi) ;
71 fFieldComponents[2] = vField*std::cos(vTheta) ;
72 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
◆ ~G4TUniformMagneticField()
| virtual G4TUniformMagneticField::~G4TUniformMagneticField |
( |
| ) |
|
|
virtualdefault |
◆ G4TUniformMagneticField() [3/3]
◆ Clone()
Interface method to implement cloning, needed by multi-threading. Here issuing a fatal exception, as expecting this to be implemented concretely in derived classes.
Reimplemented from G4Field.
Definition at line 116 of file G4TUniformMagneticField.hh.
117 {
119 this->fFieldComponents[1],
120 this->fFieldComponents[2]) );
121 }
CLHEP::Hep3Vector G4ThreeVector
◆ GetConstantFieldValue()
| G4ThreeVector G4TUniformMagneticField::GetConstantFieldValue |
( |
| ) |
const |
|
inline |
Definition at line 107 of file G4TUniformMagneticField.hh.
108 {
110 fFieldComponents[1],
111 fFieldComponents[2]);
113 }
G4double B(G4double temperature)
◆ GetFieldValue()
| void G4TUniformMagneticField::GetFieldValue |
( |
const G4double | Point[4], |
|
|
G4double * | Bfield ) const |
|
inlinevirtual |
Given the position time vector 'Point', returns the value of the field in the array 'Bfield'.
- Parameters
-
| [in] | Point | The position time vector. |
| [out] | Bfield | The field array in output. |
Implements G4MagneticField.
Definition at line 92 of file G4TUniformMagneticField.hh.
94 {
95 B[0]= fFieldComponents[0] ;
96 B[1]= fFieldComponents[1] ;
97 B[2]= fFieldComponents[2] ;
98 }
◆ operator=()
Definition at line 83 of file G4TUniformMagneticField.hh.
85 {
86 if (&p == this) return *this;
87 for (
G4int i=0; i<3; ++i)
88 fFieldComponents[i] = p.fFieldComponents[i];
89 return *this;
90 }
◆ SetFieldValue()
| void G4TUniformMagneticField::SetFieldValue |
( |
const G4ThreeVector & | newFieldVector | ) |
|
|
inline |
Definition at line 100 of file G4TUniformMagneticField.hh.
101 {
102 fFieldComponents[0] = newFieldVector.
x();
103 fFieldComponents[1] = newFieldVector.
y();
104 fFieldComponents[2] = newFieldVector.
z();
105 }
The documentation for this class was generated from the following file: