1 #ifndef genfit_STARField_h
2 #define genfit_STARField_h
5 #include "StarMagField/StarMagField.h"
6 #include "GenFit/AbsBField.h"
14 virtual TVector3
get(
const TVector3 &position)
const {
15 double x[] = {position[0], position[1], position[2]};
16 double B[] = {0, 0, 0};
18 get( x[0], x[1], x[2], B[0], B[1], B[2] );
23 inline virtual void get(
const double &_x,
const double &_y,
const double &_z,
double &Bx,
double &By,
double &Bz)
const {
24 double x[] = {_x, _y, _z};
25 double B[] = {0, 0, 0};
27 if (StarMagField::Instance()){
30 float r = sqrt(pow(x[0],2) + pow(x[1],2));
31 if( fabs(z) < 250. && r < 50.) {
32 B[0] = 0.; B[1] = 0.; B[2] = 4.97979927;
33 }
else if ( fabs(z) > 450 ) {
34 B[0] = 0.; B[1] = 0.; B[2] = 0.;
36 StarMagField::Instance()->Field(x, B);