CbmRoot
Loading...
Searching...
No Matches
CbmFieldMapSym2.h
Go to the documentation of this file.
1/* Copyright (C) 2005-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Elena Litvinenko, Denis Bertini [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmFieldMapSym2 header file -----
7// ----- Created 09/06/05 by E. Litvinenko (CbmFieldMapLIT.h) -----
8// ----- Redesign 20/02/06 by V. Friese -----
9// -------------------------------------------------------------------------
10
11
27
28
29#ifndef CBMMAGFIELDMAPSYM2_H
30#define CBMMAGFIELDMAPSYM2_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 CbmFieldMapSym2(const char* mapName, const char* fileType = "R");
52
53
56
57
59 virtual ~CbmFieldMapSym2();
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 to the quadrant x>0, y>0
86 local.x = fabs(local.x);
87 local.y = fabs(local.y);
88 return local;
89 }
90
91 ClassDefOverride(CbmFieldMapSym2, 1)
92};
93
94
95#endif
LocalCoordinates Global2LocalReflected(Double_t x, Double_t y, Double_t z) const
Transform global coordinates into local coordinates.
virtual ~CbmFieldMapSym2()
virtual void GetFieldValue(const Double_t point[3], Double_t *bField) override
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...