Loading...
Searching...
No Matches
Public Member Functions | List of all members
F05Field Class Reference

#include <Doxymodules_field.h>

Inheritance diagram for F05Field:
G4ElectroMagneticField G4Field

Public Member Functions

 F05Field ()=default
 
 ~F05Field () override=default
 
G4bool DoesFieldChangeEnergy () const override
 DoesFieldChangeEnergy() returns true.
 
void GetFieldValue (const G4double Point[4], G4double *Bfield) const override
 GetFieldValue() returns the field value at a given point[].
 

Detailed Description

Definition at line 136 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ F05Field()

F05Field::F05Field ( )
default

◆ ~F05Field()

F05Field::~F05Field ( )
overridedefault

Member Function Documentation

◆ DoesFieldChangeEnergy()

G4bool F05Field::DoesFieldChangeEnergy ( ) const
inlineoverride

DoesFieldChangeEnergy() returns true.

Definition at line 51 of file F05Field.hh.

51{ return true; };

◆ GetFieldValue()

void F05Field::GetFieldValue ( const G4double  Point[4],
G4double *  Bfield 
) const
override

GetFieldValue() returns the field value at a given point[].

field is really field[6]: Bx,By,Bz,Ex,Ey,Ez. point[] is in global coordinates: x,y,z,t.

Definition at line 40 of file F05Field.cc.

41{
42 // Point[0],Point[1],Point[2] are x-, y-, z-cordinates, Point[3] is time
43
44 const G4double Bz = 0.24*tesla;
45 const G4double Er = 2.113987E+6*volt/m;
46
47 G4double Ex,Ey;
48
49 G4double posR = std::sqrt(std::pow(Point[0],2) + std::pow(Point[1],2));
50 G4double cos_theta, sin_theta;
51
52 if (posR>0){
53 cos_theta = Point[0]/(G4double)posR;
54 sin_theta = Point[1]/(G4double)posR;
55 Ex = -1*Er*cos_theta;//apply radial electric field
56 Ey = -1*Er*sin_theta;
57 }else{
58 Ex=0;
59 Ey=0;
60 }
61
62 Bfield[0]=0;
63 Bfield[1]=0;
64 Bfield[2]=Bz;
65
66 Bfield[3]=Ex;
67 Bfield[4]=Ey;
68 Bfield[5]=0;
69
70 return;
71}

The documentation for this class was generated from the following files:

Applications | User Support | Publications | Collaboration