FairRoot/PandaRoot
Public Member Functions | List of all members
PndGenfitField2 Class Reference

Magnetic field. More...

#include <PndGenfitField2.h>

Inheritance diagram for PndGenfitField2:
genfit::AbsBField

Public Member Functions

 PndGenfitField2 ()
 define the field in this ctor (?) More...
 
TVector3 get (const TVector3 &pos) const
 return value at position More...
 
virtual void get (const double &posX, const double &posY, const double &posZ, double &Bx, double &By, double &Bz) const
 Get the magneticField [kGauss] at position. More...
 

Detailed Description

Magnetic field.

Author
Promme (Prometeusz Jasinski) // modified by Elisabetta Prencipe 19/5/2014

Definition at line 12 of file PndGenfitField2.h.

Constructor & Destructor Documentation

PndGenfitField2::PndGenfitField2 ( )

define the field in this ctor (?)

Definition at line 6 of file PndGenfitField2.cxx.

6  : AbsBField()
7 {
8 }

Member Function Documentation

TVector3 PndGenfitField2::get ( const TVector3 &  pos) const
virtual

return value at position

Implements genfit::AbsBField.

Definition at line 10 of file PndGenfitField2.cxx.

References x.

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 }
TVector3 pos
Double_t x
void PndGenfitField2::get ( const double &  posX,
const double &  posY,
const double &  posZ,
double &  Bx,
double &  By,
double &  Bz 
) const
virtual

Get the magneticField [kGauss] at position.

Override this in your concrete implementation.

Reimplemented from genfit::AbsBField.

Definition at line 18 of file PndGenfitField2.cxx.

References x.

18  {
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 }
Double_t x

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