CbmRoot
Loading...
Searching...
No Matches
CbmFieldMapDistorted.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2020 Justus-Liebig-Universitaet Giessen, Giessen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Elena Lebedeva [committer], Florian Uhlig */
4
5// -------------------------------------------------------------------------
6// ----- CbmFieldMapSym3Distorted header -----
7// ----- Created 18/01/08 by E.Litvinenko -----
8// -------------------------------------------------------------------------
9
10
11#ifndef CBMMAGFIELDMAPDISTORTED_H
12#define CBMMAGFIELDMAPDISTORTED_H 1
13
14#include "CbmFieldMap.h" // for CbmFieldMap
15
16#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
17#include <RtypesCore.h> // for Double_t, Int_t, Bool_t, Option_t
18#include <TString.h> // for TString
19
20class CbmFieldPar;
21class FairField;
22class TFormula;
23
25
26
27public:
30
38 CbmFieldMapDistorted(const char* mapName, const char* pfDistortionFilename, const char* parentName,
39 const char* fileTypeParent = "R", Int_t pfTypeOfParent = 3);
40
48 CbmFieldMapDistorted(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax,
49 Double_t bX, Double_t bY, Double_t bZ, const char* mapName, const char* pfDistortionFilename,
50 const char* parentName = "");
51
54
55
57 virtual ~CbmFieldMapDistorted();
58
59
61 virtual void Init();
62
63 void ReadDistortionInformation(const char* filename = 0);
64 void WriteDistortionInformation(const char* filename = 0);
65
70 virtual Double_t GetBx(Double_t x, Double_t y, Double_t z);
71 virtual Double_t GetBy(Double_t x, Double_t y, Double_t z);
72 virtual Double_t GetBz(Double_t x, Double_t y, Double_t z);
73
74 // virtual Double_t GetDistorted(Double_t b,Double_t *coords, TFormula *formula);
75
76 virtual void SetType(Int_t pfType = 0) { fType = pfType; }
77
78 virtual const char* GetDistortionFilename() { return fDistortionFilename.Data(); }
79 virtual Bool_t SetDistortionFilename(const char* filename)
80 {
81 fDistortionFilename = filename;
82 return (fDistortionFilename.Length() != 0);
83 }
84
85 virtual TFormula*
86 GetDistortionFormula(const char* component_option = "y",
87 const char* action_option = "m"); // component_opt:"x","y","z";action_opt:"m","a"
88 virtual Bool_t SetDistortionFormula(TFormula* parDistortionFormula, const char* component_option = "y",
89 const char* action_option = "m");
90 virtual Bool_t SetDistortionFormula(const char* parDistortionFormulaText, const char* component_option = "y",
91 const char* action_option = "m");
92
93
95 virtual void SetFromParent(FairField* field);
96
98 virtual FairField* GetParent() { return fParentField; }
99
101 virtual void Print(Option_t* = "") const;
102
104 virtual void SetPosition(Double_t x, Double_t y, Double_t z);
105
107 virtual void SetScale(Double_t factor);
108
110 void PlotBy(Int_t n = 250, Double_t zmin = -50, Double_t zmax = 450);
111
112protected:
114 FairField* fParentField;
115
118
121
129
130private:
133
134 ClassDef(CbmFieldMapDistorted, 1)
135};
136
137
138#endif
TFormula * fByDistortionFormulaMult
getter/setter options: ("x","m"), ("x","a")
virtual void SetFromParent(FairField *field)
virtual void SetType(Int_t pfType=0)
virtual void SetPosition(Double_t x, Double_t y, Double_t z)
virtual TFormula * GetDistortionFormula(const char *component_option="y", const char *action_option="m")
CbmFieldMapDistorted & operator=(const CbmFieldMapDistorted &)
CbmFieldMapDistorted(const CbmFieldMapDistorted &)
getter/setter options: ("z","m"), ("z","a")
virtual FairField * GetParent()
void ReadDistortionInformation(const char *filename=0)
virtual const char * GetDistortionFilename()
void PlotBy(Int_t n=250, Double_t zmin=-50, Double_t zmax=450)
void WriteDistortionInformation(const char *filename=0)
virtual void SetScale(Double_t factor)
virtual Bool_t SetDistortionFormula(TFormula *parDistortionFormula, const char *component_option="y", const char *action_option="m")
TFormula * fBzDistortionFormulaMult
getter/setter options: ("y","m"), ("y","a")
virtual void Print(Option_t *="") const
virtual Bool_t SetDistortionFilename(const char *filename)
TArrayF * GetBz() const
TArrayF * GetBx() const
TArrayF * GetBy() const