FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MyConstField.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 // -------------------------------------------------------------------------
10 // ----- MyConstField header file -----
11 // ----- Created 25/03/14 by M. Al-Turany -----
12 // -------------------------------------------------------------------------
13 
22 #ifndef MyConstField_H
23 #define MyConstField_H 1
24 
25 #include "FairField.h"
26 
27 class MyFieldPar;
28 
29 class MyConstField : public FairField
30 {
31 
32  public:
34  MyConstField();
35 
43  MyConstField(const char* name,
44  Double_t xMin,
45  Double_t xMax,
46  Double_t yMin,
47  Double_t yMax,
48  Double_t zMin,
49  Double_t zMax,
50  Double_t bX,
51  Double_t bY,
52  Double_t bZ);
53 
55  MyConstField(MyFieldPar* fieldPar);
56 
58  virtual ~MyConstField();
59 
65  void SetFieldRegion(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax);
66 
70  void SetField(Double_t bX, Double_t bY, Double_t bZ);
71 
75  virtual Double_t GetBx(Double_t x, Double_t y, Double_t z);
76  virtual Double_t GetBy(Double_t x, Double_t y, Double_t z);
77  virtual Double_t GetBz(Double_t x, Double_t y, Double_t z);
78 
80  Double_t GetXmin() const { return fXmin; }
81  Double_t GetXmax() const { return fXmax; }
82  Double_t GetYmin() const { return fYmin; }
83  Double_t GetYmax() const { return fYmax; }
84  Double_t GetZmin() const { return fZmin; }
85  Double_t GetZmax() const { return fZmax; }
86 
88  Double_t GetBx() const { return fBx; }
89  Double_t GetBy() const { return fBy; }
90  Double_t GetBz() const { return fBz; }
91 
93  virtual void Print();
94 
95  private:
97  Double_t fXmin;
98  Double_t fXmax;
99  Double_t fYmin;
100  Double_t fYmax;
101  Double_t fZmin;
102  Double_t fZmax;
103 
105  Double_t fBx;
106  Double_t fBy;
107  Double_t fBz;
108 
109  ClassDef(MyConstField, 1);
110 };
111 
112 #endif
Double_t GetYmax() const
Definition: MyConstField.h:83
virtual void Print()
Double_t GetXmax() const
Definition: MyConstField.h:81
Double_t GetXmin() const
Definition: MyConstField.h:80
Double_t GetZmin() const
Definition: MyConstField.h:84
void SetField(Double_t bX, Double_t bY, Double_t bZ)
Double_t GetZmax() const
Definition: MyConstField.h:85
virtual ~MyConstField()
Double_t GetBy() const
Definition: MyConstField.h:89
void SetFieldRegion(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
Double_t GetBx() const
Definition: MyConstField.h:88
Double_t GetBz() const
Definition: MyConstField.h:90
Double_t GetYmin() const
Definition: MyConstField.h:82