CbmRoot
CbmLitMapField.h
Go to the documentation of this file.
1 
9 #ifndef CBMLITMAPFIELD_H_
10 #define CBMLITMAPFIELD_H_
11 
12 #include "interface/CbmLitField.h"
13 
14 #include "FairField.h"
15 
16 class CbmLitMapField : public CbmLitField {
17 public:
18  /* Constructor */
19  CbmLitMapField(FairField* field) : fField(field) {}
20 
21  /* Destructor */
22  virtual ~CbmLitMapField() {};
23 
24  /* Inherited from CbmLitField */
26  litfloat y,
27  litfloat z,
28  litfloat& Bx,
29  litfloat& By,
30  litfloat& Bz) const {
31  double pos[3] = {x, y, z};
32  double B[3];
33  fField->GetFieldValue(pos, B);
34  Bx = B[0];
35  By = B[1];
36  Bz = B[2];
37  }
38 
39  /* Inherited from CbmLitField */
40  virtual std::string ToString() const { return "CbmLitMapField::ToString"; }
41 
42 private:
43  FairField* fField; // Pointer to field map
44 };
45 
46 #endif /* CBMLITMAPFIELD_H_ */
CbmLitMapField
Definition: CbmLitMapField.h:16
litfloat
double litfloat
Definition: CbmLitFloat.h:15
CbmLitField
Interface for accessing the magnetic field.
Definition: CbmLitField.h:20
CbmLitMapField::fField
FairField * fField
Definition: CbmLitMapField.h:43
CbmLitField.h
Interface for accessing the magnetic field.
CbmLitMapField::~CbmLitMapField
virtual ~CbmLitMapField()
Definition: CbmLitMapField.h:22
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmLitMapField::ToString
virtual std::string ToString() const
Definition: CbmLitMapField.h:40
CbmLitMapField::CbmLitMapField
CbmLitMapField(FairField *field)
Definition: CbmLitMapField.h:19
CbmLitMapField::GetFieldValue
void GetFieldValue(litfloat x, litfloat y, litfloat z, litfloat &Bx, litfloat &By, litfloat &Bz) const
Return field value at (x,y,z) position.
Definition: CbmLitMapField.h:25