FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairField.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // -------------------------------------------------------------------------
9 // ----- FairField source file -----
10 // ----- Created 06/01/04 by M. Al/Turany -----
11 // ----- Redesign 13/02/06 by V. Friese -----
12 // -------------------------------------------------------------------------
13 
14 #include "FairField.h"
15 
17  : TVirtualMagField("FAIR Magnetic Field")
18  , fType(0)
19 {}
20 
21 FairField::FairField(const char* name, const char*)
22  : TVirtualMagField(name)
23  , fType(0)
24 {}
25 
27 
29 {
30  if (fType == 1) {
31  return kTRUE;
32  }
33  return kFALSE;
34 }
35 
37 {
38  if (fType == 2) {
39  return kTRUE;
40  }
41  return kFALSE;
42 }
43 
44 void FairField::GetFieldValue(const Double_t point[3], Double_t* bField)
45 {
46  bField[0] = GetBx(point[0], point[1], point[2]);
47  bField[1] = GetBy(point[0], point[1], point[2]);
48  bField[2] = GetBz(point[0], point[1], point[2]);
49 }
50 
virtual Double_t GetBx(Double_t, Double_t, Double_t)
Definition: FairField.h:67
virtual Double_t GetBz(Double_t, Double_t, Double_t)
Definition: FairField.h:85
Int_t fType
Definition: FairField.h:111
ClassImp(FairEventBuilder)
virtual ~FairField()
Definition: FairField.cxx:26
virtual Double_t GetBy(Double_t, Double_t, Double_t)
Definition: FairField.h:76
virtual void GetFieldValue(const Double_t point[3], Double_t *bField)
Definition: FairField.cxx:44
Bool_t IsConst()
Definition: FairField.cxx:28
Bool_t IsMap()
Definition: FairField.cxx:36