CbmRoot
Loading...
Searching...
No Matches
CbmFieldMapSym3.h
Go to the documentation of this file.
1/* Copyright (C) 2004-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Mohammad Al-Turany, Denis Bertini [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmFieldMapSym3 header file -----
7// ----- Created 12/01/04 by M. Al/Turany (CbmField.h) -----
8// ----- Redesign 20/02/06 by V. Friese -----
9// -------------------------------------------------------------------------
10
11
27
28
29#ifndef CBMMAGFIELDMAPSYM3_H
30#define CBMMAGFIELDMAPSYM3_H 1
31
32#include "CbmFieldMap.h" // for CbmFieldMap
33
34#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
35#include <RtypesCore.h> // for Double_t, Int_t, Bool_t
36
37class CbmFieldPar;
38
40
41
42 public:
45
46
51 CbmFieldMapSym3(const char* mapName, const char* fileType = "R");
52
53
56
57
59 virtual ~CbmFieldMapSym3();
60
61
66 virtual Double_t GetBx(Double_t x, Double_t y, Double_t z) override;
67 virtual Double_t GetBy(Double_t x, Double_t y, Double_t z) override;
68 virtual Double_t GetBz(Double_t x, Double_t y, Double_t z) override;
69
74 virtual void GetFieldValue(const Double_t point[3], Double_t* bField) override;
75
76 private:
82 [[gnu::always_inline]] LocalCoordinates Global2LocalReflected(Double_t x, Double_t y, Double_t z) const
83 {
85 // Reflect the coordinates in the octant x>0, y>0, z>0
86 local.x = fabs(local.x);
87 local.y = fabs(local.y);
88 local.z = fabs(local.z);
89 return local;
90 }
91
92
93 ClassDefOverride(CbmFieldMapSym3, 1)
94};
95
96
97#endif
virtual void GetFieldValue(const Double_t point[3], Double_t *bField) override
LocalCoordinates Global2LocalReflected(Double_t x, Double_t y, Double_t z) const
Transform global coordinates into local coordinates.
virtual ~CbmFieldMapSym3()
TArrayF * GetBz() const
TArrayF * GetBx() const
LocalCoordinates Global2Local(Double_t x, Double_t y, Double_t z) const
Transform global coordinates into local coordinates.
TArrayF * GetBy() const
Structure to hold local coordinates in the field map. Local coordinates are defined as the distance f...