Field for SHiP.
More...
#include <FairShipFields.h>
|
| | FairShipFields () |
| void | setField (ShipCompField *gField) |
| | set field if not gMC present
|
| TVector3 | get (const TVector3 &pos) const override |
| | return value at position
|
| void | get (const double &posX, const double &posY, const double &posZ, double &Bx, double &By, double &Bz) const override |
Field for SHiP.
- Author
- Thomas Ruf CERN
Definition at line 21 of file FairShipFields.h.
◆ FairShipFields()
| genfit::FairShipFields::FairShipFields |
( |
| ) |
|
◆ get() [1/2]
| void genfit::FairShipFields::get |
( |
const double & | posX, |
|
|
const double & | posY, |
|
|
const double & | posZ, |
|
|
double & | Bx, |
|
|
double & | By, |
|
|
double & | Bz ) const |
|
override |
Definition at line 29 of file FairShipFields.cxx.
30 {
31 Double_t
X[3] = {
x,
y,
z};
32 Double_t B[3] = {0., 0., 0.};
33 Bx = 0.;
34 By = 0.;
35 Bz = 0.;
37 cout << "no Field Manager instantiated" << endl;
38 return;
39 }
40 if (gMC) {
41 TVirtualMagField* magField =
gMC->GetMagField();
42 if (!magField) {
43 cout << "no magnetic field set in the Virtual MC" << endl;
44 return;
45 }
46 magField->Field(X, B);
47 } else {
49 }
50 Bx = B[0];
51 By = B[1];
52 Bz = B[2];
53}
◆ get() [2/2]
| TVector3 genfit::FairShipFields::get |
( |
const TVector3 & | pos | ) |
const |
|
override |
return value at position
Definition at line 22 of file FairShipFields.cxx.
22 {
23 Double_t bx, by, bz;
25 TVector3 field_(bx, by, bz);
26 return field_;
27}
TVector3 get(const TVector3 &pos) const override
return value at position
◆ setField()
◆ gField_
The documentation for this class was generated from the following files: