Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4LineCurrentMagField Class Reference

#include <G4LineCurrentMagField.hh>

Inheritance diagram for G4LineCurrentMagField:
Collaboration diagram for G4LineCurrentMagField:

Public Member Functions

 G4LineCurrentMagField (G4double pFieldConstant)
 
 ~G4LineCurrentMagField ()
 
void GetFieldValue (const G4double yTrack[], G4double B[]) const
 
G4FieldClone () const
 
- Public Member Functions inherited from G4MagneticField
 G4MagneticField ()
 
virtual ~G4MagneticField ()
 
 G4MagneticField (const G4MagneticField &r)
 
G4MagneticFieldoperator= (const G4MagneticField &p)
 
G4bool DoesFieldChangeEnergy () const
 
virtual void GetFieldValue (const G4double Point[4], G4double *Bfield) const =0
 
- Public Member Functions inherited from G4ElectroMagneticField
 G4ElectroMagneticField ()
 
virtual ~G4ElectroMagneticField ()
 
 G4ElectroMagneticField (const G4ElectroMagneticField &r)
 
G4ElectroMagneticFieldoperator= (const G4ElectroMagneticField &p)
 
- Public Member Functions inherited from G4Field
 G4Field (G4bool gravityOn=false)
 
 G4Field (const G4Field &)
 
virtual ~G4Field ()
 
G4Fieldoperator= (const G4Field &p)
 
G4bool IsGravityActive () const
 
void SetGravityActive (G4bool OnOffFlag)
 

Detailed Description

Definition at line 48 of file G4LineCurrentMagField.hh.

Constructor & Destructor Documentation

G4LineCurrentMagField::G4LineCurrentMagField ( G4double  pFieldConstant)

Definition at line 32 of file G4LineCurrentMagField.cc.

33 {
34  fFieldConstant = pFieldConstant ;
35 }

Here is the caller graph for this function:

G4LineCurrentMagField::~G4LineCurrentMagField ( )

Definition at line 44 of file G4LineCurrentMagField.cc.

45 {
46 }

Member Function Documentation

G4Field * G4LineCurrentMagField::Clone ( ) const
virtual

Reimplemented from G4Field.

Definition at line 37 of file G4LineCurrentMagField.cc.

38 {
39  return new G4LineCurrentMagField( fFieldConstant );
40 }
G4LineCurrentMagField(G4double pFieldConstant)

Here is the call graph for this function:

void G4LineCurrentMagField::GetFieldValue ( const G4double  yTrack[],
G4double  B[] 
) const

Definition at line 51 of file G4LineCurrentMagField.cc.

53 {
54  // G4double fFieldConstant = 100 ;
55  G4double a = 1.00 ; // mm
56  G4double x = a*yTrack[0], y = a*yTrack[1] ;
57  G4double x2 = x*x, y2 = y*y, r2 = x2 + y2 ;
58  G4double r = std::sqrt(r2+a*a) ;
59  G4double Br = fFieldConstant/r;
60  B[0] = -Br*y/r ;
61  B[1] = Br*x/r ;
62  B[2] = 0 ;
63 }
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
tuple x
Definition: test.py:50
double B(double temperature)
double G4double
Definition: G4Types.hh:76

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