FairShip
Loading...
Searching...
No Matches
ShipConstField.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5// -------------------------------------------------------------------------
6// ----- ShipConstField header file -----
7// ----- Created 25/03/14 by M. Al-Turany -----
8// -------------------------------------------------------------------------
9
17
18#ifndef FIELD_SHIPCONSTFIELD_H_
19#define FIELD_SHIPCONSTFIELD_H_
20
21#include "FairField.h"
22
23class ShipFieldPar;
24
25class ShipConstField : public FairField {
26 public:
29
37 explicit ShipConstField(const char* name, Double_t xMin, Double_t xMax,
38 Double_t yMin, Double_t yMax, Double_t zMin,
39 Double_t zMax, Double_t bX, Double_t bY, Double_t bZ);
40
42 explicit ShipConstField(ShipFieldPar* fieldPar);
43
45 ~ShipConstField() override;
46
52 void SetFieldRegion(Double_t xMin, Double_t xMax, Double_t yMin,
53 Double_t yMax, Double_t zMin, Double_t zMax);
54
58 void SetField(Double_t bX, Double_t bY, Double_t bZ);
59
63 Double_t GetBx(Double_t x, Double_t y, Double_t z) override;
64 Double_t GetBy(Double_t x, Double_t y, Double_t z) override;
65 Double_t GetBz(Double_t x, Double_t y, Double_t z) override;
66
73 void GetFieldValue(const Double_t point[3], Double_t* bField) override;
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 void Print(Option_t* = "") const override;
90
91 private:
93 Double_t fXmin;
94 Double_t fXmax;
95 Double_t fYmin;
96 Double_t fYmax;
97 Double_t fZmin;
98 Double_t fZmax;
99
101 Double_t fBx;
102 Double_t fBy;
103 Double_t fBz;
104
106};
107
108#endif // FIELD_SHIPCONSTFIELD_H_
~ShipConstField() override
Double_t GetXmin() const
Double_t GetBz() const
void SetFieldRegion(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
Double_t GetZmax() const
Double_t GetBy() const
Double_t GetBx() const
Double_t GetYmax() const
ClassDefOverride(ShipConstField, 1)
void GetFieldValue(const Double_t point[3], Double_t *bField) override
void Print(Option_t *="") const override
void SetField(Double_t bX, Double_t bY, Double_t bZ)
Double_t GetYmin() const
Double_t GetZmin() const
Double_t GetXmax() const