FairRoot/PandaRoot
PndGenfitField2.cxx
Go to the documentation of this file.
1 //modified by Elisabetta Prencipe 19/5/2014
2 #include "PndGenfitField2.h"
3 #include "FairRunAna.h"
4 #include "FairField.h"
5 
7 {
8 }
9 
10 TVector3 PndGenfitField2::get(const TVector3& pos) const
11 {
12  double x[3] = {pos.X(), pos.Y(), pos.Z()};
13  double B[3] = {0,0,0};
14  FairRunAna::Instance()->GetField()->Field(x,B);
15  return TVector3(B[0], B[1], B[2]);
16 }
17 
18 void PndGenfitField2::get(const double& posX, const double& posY, const double& posZ, double& Bx, double& By, double& Bz) const {
19  double x[3] = {posX, posY, posZ};
20  double B[3] = {0,0,0};
21  FairRunAna::Instance()->GetField()->Field(x,B);
22  Bx = B[0];
23  By = B[1];
24  Bz = B[2];
25 }
26 
TVector3 pos
Double_t x
TVector3 get(const TVector3 &pos) const
return value at position
PndGenfitField2()
define the field in this ctor (?)