FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairConstField.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  ********************************************************************************/
15 #ifndef FairConstFIELD_H
16 #define FairConstFIELD_H 1
17 
18 #include "FairField.h" // for FairField
19 
20 #include <Rtypes.h> // for Double_t, etc
21 
22 class FairConstPar;
23 
24 class FairConstField : public FairField
25 {
26  public:
29 
37  FairConstField(const char* name,
38  Double_t xMin,
39  Double_t xMax,
40  Double_t yMin,
41  Double_t yMax,
42  Double_t zMin,
43  Double_t zMax,
44  Double_t bX,
45  Double_t bY,
46  Double_t bZ);
47 
49  FairConstField(FairConstPar* fieldPar);
50 
52  virtual ~FairConstField();
53 
54  void FillParContainer();
55 
61  void SetFieldRegion(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax);
62 
66  void SetField(Double_t bX, Double_t bY, Double_t bZ);
67 
71  virtual Double_t GetBx(Double_t x, Double_t y, Double_t z);
72  virtual Double_t GetBy(Double_t x, Double_t y, Double_t z);
73  virtual Double_t GetBz(Double_t x, Double_t y, Double_t z);
74 
76  Double_t GetXmin() const { return fXmin; }
77  Double_t GetXmax() const { return fXmax; }
78  Double_t GetYmin() const { return fYmin; }
79  Double_t GetYmax() const { return fYmax; }
80  Double_t GetZmin() const { return fZmin; }
81  Double_t GetZmax() const { return fZmax; }
82 
84  Double_t GetBx() const { return fBx; }
85  Double_t GetBy() const { return fBy; }
86  Double_t GetBz() const { return fBz; }
87 
89  virtual void Print(Option_t*) const;
90 
92 
93  private:
95  Double_t fXmin;
96  Double_t fXmax;
97  Double_t fYmin;
98  Double_t fYmax;
99  Double_t fZmin;
100  Double_t fZmax;
101 
103  Double_t fBx;
104  Double_t fBy;
105  Double_t fBz;
106 };
107 
108 #endif
Double_t GetZmin() const
void SetField(Double_t bX, Double_t bY, Double_t bZ)
virtual void Print(Option_t *) const
Double_t GetXmax() const
Double_t GetBx() const
void SetFieldRegion(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
virtual ~FairConstField()
Double_t GetYmin() const
ClassDef(FairConstField, 1)
Double_t GetXmin() const
Double_t GetBz() const
Double_t GetYmax() const
Double_t GetBy() const
Double_t GetZmax() const