FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairField.h
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 header file -----
10 // ----- Created 06/01/04 by M. Al-Turany -----
11 // ----- Redesign 13/02/06 by V. Friese -----
12 // ----- Redesign 04/08/06 by M. Al-Turany -----
13 // -------------------------------------------------------------------------
14 
28 #ifndef FAIRFIELD_H
29 #define FAIRFIELD_H 1
30 
31 #include "FairLogger.h"
32 
33 #include <Rtypes.h> // for Double_t, Bool_t, etc
34 #include <TVirtualMagField.h>
35 
36 class FairField : public TVirtualMagField
37 {
38  public:
40  FairField();
41 
43  FairField(const char* name, const char* title = "FAIR Magnetic Field");
44 
45  FairField& operator=(const FairField&) { return *this; }
46 
48  virtual ~FairField();
49 
53  virtual void Init(){};
54 
56  Bool_t IsConst();
57 
59  Bool_t IsMap();
60 
62  Int_t GetType() const { return fType; }
63 
67  virtual Double_t GetBx(Double_t, Double_t, Double_t)
68  {
69  LOG(warn) << "FairField::GetBx Should be implemented in User class";
70  return 0;
71  }
72 
76  virtual Double_t GetBy(Double_t, Double_t, Double_t)
77  {
78  LOG(warn) << "FairField::GetBy Should be implemented in User class";
79  return 0;
80  }
81 
85  virtual Double_t GetBz(Double_t, Double_t, Double_t)
86  {
87  LOG(warn) << "FairField::GetBz Should be implemented in User class";
88  return 0;
89  }
90 
95  virtual void GetFieldValue(const Double_t point[3], Double_t* bField);
96 
97  void Field(const Double_t point[3], Double_t* B) { GetFieldValue(point, B); }
98 
100  virtual void Print(Option_t*) const { ; }
101  virtual void GetBxyz(const Double_t[3], Double_t*)
102  {
103  LOG(warn) << "FairField::GetBxyz Should be implemented in User class";
104  }
105 
107  virtual void FillParContainer() { LOG(warn) << "FairField::FillParContainer Should be implemented in User class"; }
108 
109  protected:
111  Int_t fType;
112 
113  private:
114  FairField(const FairField&);
115  // FairField& operator=(const FairField&);
116  // TODO: Check why the htrack needs this
117 
118  ClassDef(FairField, 4);
119 };
120 
121 #endif
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
void Field(const Double_t point[3], Double_t *B)
Definition: FairField.h:97
Int_t fType
Definition: FairField.h:111
FairField & operator=(const FairField &)
Definition: FairField.h:45
virtual void GetBxyz(const Double_t[3], Double_t *)
Definition: FairField.h:101
Int_t GetType() const
Definition: FairField.h:62
virtual void FillParContainer()
Definition: FairField.h:107
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
virtual void Print(Option_t *) const
Definition: FairField.h:100
Bool_t IsConst()
Definition: FairField.cxx:28
Bool_t IsMap()
Definition: FairField.cxx:36
virtual void Init()
Definition: FairField.h:53