CGEM BOSS 6.6.5.f
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
 
 ExtBesMagneticField ()
 
 ~ExtBesMagneticField ()
 
G4FieldManager * GetFieldManager ()
 
void GetFieldValue (const double Point[3], double *Bfield) const
 

Detailed Description

Constructor & Destructor Documentation

◆ ExtBesMagneticField() [1/2]

ExtBesMagneticField::ExtBesMagneticField ( )

Definition at line 28 of file ExtBesMagneticField.cxx.

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

◆ ~ExtBesMagneticField() [1/2]

ExtBesMagneticField::~ExtBesMagneticField ( )

Definition at line 42 of file ExtBesMagneticField.cxx.

42{}

◆ ExtBesMagneticField() [2/2]

ExtBesMagneticField::ExtBesMagneticField ( )

◆ ~ExtBesMagneticField() [2/2]

ExtBesMagneticField::~ExtBesMagneticField ( )

Member Function Documentation

◆ GetFieldManager() [1/2]

G4FieldManager * ExtBesMagneticField::GetFieldManager ( )

Definition at line 66 of file ExtBesMagneticField.cxx.

67{
68 return G4TransportationManager::GetTransportationManager()->GetFieldManager();
69}

Referenced by ExtBesMagneticField().

◆ GetFieldManager() [2/2]

G4FieldManager * ExtBesMagneticField::GetFieldManager ( )

◆ GetFieldValue() [1/2]

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

Definition at line 45 of file ExtBesMagneticField.cxx.

46{
47 double x=Point[0];
48 double y=Point[1];
49 double z=Point[2];
50
51 HepPoint3D r(x,y,z);
53
54 if(m_pIMF->ifRealField() == true)
55 m_pIMF->fieldVector(r,b);
56 else
57 m_pIMF->uniFieldVector(r,b);
58
59 Bfield[0]=b.x();
60 Bfield[1]=b.y();
61 Bfield[2]=b.z();
62}
Double_t x[10]
virtual StatusCode uniFieldVector(const HepGeom::Point3D< double > &xyz, HepGeom::Vector3D< double > &fvec) const =0
virtual StatusCode fieldVector(const HepGeom::Point3D< double > &xyz, HepGeom::Vector3D< double > &fvec) const =0
virtual bool ifRealField() const =0

◆ GetFieldValue() [2/2]

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

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