CbmRoot
Loading...
Searching...
No Matches
CbmLitMapField.h
Go to the documentation of this file.
1/* Copyright (C) 2009-2012 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
13#ifndef CBMLITMAPFIELD_H_
14#define CBMLITMAPFIELD_H_
15
16#include "FairField.h"
18
20 public:
21 /* Constructor */
22 CbmLitMapField(FairField* field) : fField(field) {}
23
24 /* Destructor */
25 virtual ~CbmLitMapField(){};
26
27 /* Inherited from CbmLitField */
29 {
30 double pos[3] = {x, y, z};
31 double B[3];
32 fField->GetFieldValue(pos, B);
33 Bx = B[0];
34 By = B[1];
35 Bz = B[2];
36 }
37
38 /* Inherited from CbmLitField */
39 virtual std::string ToString() const { return "CbmLitMapField::ToString"; }
40
41 private:
42 FairField* fField; // Pointer to field map
43};
44
45#endif /* CBMLITMAPFIELD_H_ */
Interface for accessing the magnetic field.
double litfloat
Definition CbmLitFloat.h:19
Interface for accessing the magnetic field.
Definition CbmLitField.h:25
CbmLitMapField(FairField *field)
void GetFieldValue(litfloat x, litfloat y, litfloat z, litfloat &Bx, litfloat &By, litfloat &Bz) const
Return field value at (x,y,z) position.
virtual std::string ToString() const
FairField * fField
virtual ~CbmLitMapField()