BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
ExtBesMagneticField Class Reference

#include <ExtBesMagneticField.h>

Inheritance diagram for ExtBesMagneticField:

Public Member Functions

 ExtBesMagneticField ()
 ~ExtBesMagneticField ()
G4FieldManager * GetFieldManager ()
void GetFieldValue (const double Point[3], double *Bfield) const

Detailed Description

Definition at line 10 of file ExtBesMagneticField.h.

Constructor & Destructor Documentation

◆ ExtBesMagneticField()

ExtBesMagneticField::ExtBesMagneticField ( )

Definition at line 25 of file ExtBesMagneticField.cxx.

25 {
26 GetFieldManager()->SetDetectorField( this );
27 GetFieldManager()->CreateChordFinder( this );
28 // GetFieldManager()->SetDeltaOneStep(0.5*mm);
29 // GetFieldManager()->SetDeltaIntersection(0.5*mm);
30 ISvcLocator* svcLocator = Gaudi::svcLocator();
31 StatusCode sc = svcLocator->service( "MagneticFieldSvc", m_pIMF );
32 if ( sc != StatusCode::SUCCESS )
33 { G4cout << "Unable to open Magnetic field service" << G4endl; }
34}
G4FieldManager * GetFieldManager()

◆ ~ExtBesMagneticField()

ExtBesMagneticField::~ExtBesMagneticField ( )

Definition at line 36 of file ExtBesMagneticField.cxx.

36{}

Member Function Documentation

◆ GetFieldManager()

G4FieldManager * ExtBesMagneticField::GetFieldManager ( )

Definition at line 56 of file ExtBesMagneticField.cxx.

56 {
57 return G4TransportationManager::GetTransportationManager()->GetFieldManager();
58}

Referenced by ExtBesMagneticField().

◆ GetFieldValue()

void ExtBesMagneticField::GetFieldValue ( const double Point[3],
double * Bfield ) const

Definition at line 38 of file ExtBesMagneticField.cxx.

38 {
39 double x = Point[0];
40 double y = Point[1];
41 double z = Point[2];
42
43 HepPoint3D r( x, y, z );
45
46 if ( m_pIMF->ifRealField() == true ) m_pIMF->fieldVector( r, b );
47 else m_pIMF->uniFieldVector( r, b );
48
49 Bfield[0] = b.x();
50 Bfield[1] = b.y();
51 Bfield[2] = b.z();
52}
HepGeom::Vector3D< double > HepVector3D
HepGeom::Point3D< double > HepPoint3D
Double_t x[10]

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