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

#include <Doxymodules_eventgenerator.h>

Inheritance diagram for H02Field:
G4MagneticField G4Field

Public Member Functions

 H02Field ()
 
 ~H02Field ()
 
virtual void GetFieldValue (const G4double Point[3], G4double *Bfield) const
 

Detailed Description

Definition at line 72 of file Doxymodules_eventgenerator.h.

Constructor & Destructor Documentation

◆ H02Field()

H02Field::H02Field ( )
inline

Definition at line 38 of file H02Field.hh.

◆ ~H02Field()

H02Field::~H02Field ( )
inline

Definition at line 39 of file H02Field.hh.

39{ }

Member Function Documentation

◆ GetFieldValue()

void H02Field::GetFieldValue ( const G4double  Point[3],
G4double *  Bfield 
) const
virtual

Definition at line 35 of file H02Field.cc.

36{
37 const G4double Bz= 3.0*tesla;
38 const G4double rmax_sq = sqr(1.*m);
39 const G4double zmax = 1.*m;
40
41 Bfield[0]= 0.;
42 Bfield[1] = 0.;
43 if(std::abs(Point[2])<zmax && (sqr(Point[0])+sqr(Point[1]))<rmax_sq) {
44 Bfield[2]= Bz;
45 } else {
46 Bfield[2]= 0.;
47 }
48}

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

Applications | User Support | Publications | Collaboration