CbmRoot
CbmFieldMapDistorted.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmFieldMapSym3Distorted header -----
3 // ----- Created 18/01/08 by E.Litvinenko -----
4 // -------------------------------------------------------------------------
5 
6 
7 #ifndef CBMMAGFIELDMAPDISTORTED_H
8 #define CBMMAGFIELDMAPDISTORTED_H 1
9 
10 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
11 #include <RtypesCore.h> // for Double_t, Int_t, Bool_t, Option_t
12 #include <TString.h> // for TString
13 
14 #include "CbmFieldMap.h" // for CbmFieldMap
15 
16 class CbmFieldPar;
17 class FairField;
18 class TFormula;
19 
21 
22 
23 public:
26 
34  CbmFieldMapDistorted(const char* mapName,
35  const char* pfDistortionFilename,
36  const char* parentName,
37  const char* fileTypeParent = "R",
38  Int_t pfTypeOfParent = 3);
39 
47  CbmFieldMapDistorted(Double_t xMin,
48  Double_t xMax,
49  Double_t yMin,
50  Double_t yMax,
51  Double_t zMin,
52  Double_t zMax,
53  Double_t bX,
54  Double_t bY,
55  Double_t bZ,
56  const char* mapName,
57  const char* pfDistortionFilename,
58  const char* parentName = "");
59 
62 
63 
65  virtual ~CbmFieldMapDistorted();
66 
67 
69  virtual void Init();
70 
71  void ReadDistortionInformation(const char* filename = 0);
72  void WriteDistortionInformation(const char* filename = 0);
73 
78  virtual Double_t GetBx(Double_t x, Double_t y, Double_t z);
79  virtual Double_t GetBy(Double_t x, Double_t y, Double_t z);
80  virtual Double_t GetBz(Double_t x, Double_t y, Double_t z);
81 
82  // virtual Double_t GetDistorted(Double_t b,Double_t *coords, TFormula *formula);
83 
84  virtual void SetType(Int_t pfType = 0) { fType = pfType; }
85 
86  virtual const char* GetDistortionFilename() {
87  return fDistortionFilename.Data();
88  }
89  virtual Bool_t SetDistortionFilename(const char* filename) {
90  fDistortionFilename = filename;
91  return (fDistortionFilename.Length() != 0);
92  }
93 
94  virtual TFormula*
95  GetDistortionFormula(const char* component_option = "y",
96  const char* action_option =
97  "m"); // component_opt:"x","y","z";action_opt:"m","a"
98  virtual Bool_t SetDistortionFormula(TFormula* parDistortionFormula,
99  const char* component_option = "y",
100  const char* action_option = "m");
101  virtual Bool_t SetDistortionFormula(const char* parDistortionFormulaText,
102  const char* component_option = "y",
103  const char* action_option = "m");
104 
105 
107  virtual void SetFromParent(FairField* field);
108 
110  virtual FairField* GetParent() { return fParentField; }
111 
113  virtual void Print(Option_t* = "") const;
114 
116  virtual void SetPosition(Double_t x, Double_t y, Double_t z);
117 
119  virtual void SetScale(Double_t factor);
120 
122  void PlotBy(Int_t n = 250, Double_t zmin = -50, Double_t zmax = 450);
123 
124 protected:
126  FairField* fParentField;
127 
130 
133 
141 
142 private:
145 
146  ClassDef(CbmFieldMapDistorted, 1)
147 };
148 
149 
150 #endif
CbmFieldMapDistorted::SetDistortionFormula
virtual Bool_t SetDistortionFormula(TFormula *parDistortionFormula, const char *component_option="y", const char *action_option="m")
Definition: CbmFieldMapDistorted.cxx:364
CbmFieldMapDistorted::SetType
virtual void SetType(Int_t pfType=0)
Definition: CbmFieldMapDistorted.h:84
CbmFieldMapDistorted::Init
virtual void Init()
Definition: CbmFieldMapDistorted.cxx:196
CbmFieldMapDistorted::fTypeOfParent
Int_t fTypeOfParent
Definition: CbmFieldMapDistorted.h:129
CbmFieldMapDistorted::fParentField
FairField * fParentField
Definition: CbmFieldMapDistorted.h:126
CbmFieldMapDistorted::fBxDistortionFormulaMult
TFormula * fBxDistortionFormulaMult
Definition: CbmFieldMapDistorted.h:135
CbmFieldMapDistorted
Definition: CbmFieldMapDistorted.h:20
CbmFieldMap::GetBy
TArrayF * GetBy() const
Definition: CbmFieldMap.h:159
CbmFieldMapDistorted::operator=
CbmFieldMapDistorted & operator=(const CbmFieldMapDistorted &)
CbmFieldMapDistorted::fByDistortionFormulaAdd
TFormula * fByDistortionFormulaAdd
Definition: CbmFieldMapDistorted.h:138
CbmFieldMapDistorted::fBzDistortionFormulaAdd
TFormula * fBzDistortionFormulaAdd
Definition: CbmFieldMapDistorted.h:140
CbmFieldMapDistorted::SetFromParent
virtual void SetFromParent(FairField *field)
Definition: CbmFieldMapDistorted.cxx:217
CbmFieldMapDistorted::GetDistortionFormula
virtual TFormula * GetDistortionFormula(const char *component_option="y", const char *action_option="m")
Definition: CbmFieldMapDistorted.cxx:344
CbmFieldMap::GetBz
TArrayF * GetBz() const
Definition: CbmFieldMap.h:160
CbmFieldMap
Definition: CbmFieldMap.h:34
CbmFieldMapDistorted::SetScale
virtual void SetScale(Double_t factor)
Definition: CbmFieldMapDistorted.cxx:538
CbmFieldMapDistorted::fBxDistortionFormulaAdd
TFormula * fBxDistortionFormulaAdd
Definition: CbmFieldMapDistorted.h:136
CbmFieldMapDistorted::fDistortionFilename
TString fDistortionFilename
Definition: CbmFieldMapDistorted.h:132
CbmFieldMapDistorted::PlotBy
void PlotBy(Int_t n=250, Double_t zmin=-50, Double_t zmax=450)
Definition: CbmFieldMapDistorted.cxx:545
CbmFieldMapDistorted::Print
virtual void Print(Option_t *="") const
Definition: CbmFieldMapDistorted.cxx:481
CbmFieldMapDistorted::CbmFieldMapDistorted
CbmFieldMapDistorted(const CbmFieldMapDistorted &)
getter/setter options: ("z","m"), ("z","a")
CbmFieldMapDistorted::CbmFieldMapDistorted
CbmFieldMapDistorted()
Definition: CbmFieldMapDistorted.cxx:28
CbmFieldMapDistorted::fByDistortionFormulaMult
TFormula * fByDistortionFormulaMult
getter/setter options: ("x","m"), ("x","a")
Definition: CbmFieldMapDistorted.h:137
CbmFieldMapDistorted::GetDistortionFilename
virtual const char * GetDistortionFilename()
Definition: CbmFieldMapDistorted.h:86
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmFieldMapDistorted::SetPosition
virtual void SetPosition(Double_t x, Double_t y, Double_t z)
Definition: CbmFieldMapDistorted.cxx:529
CbmFieldMapDistorted::WriteDistortionInformation
void WriteDistortionInformation(const char *filename=0)
Definition: CbmFieldMapDistorted.cxx:306
CbmFieldMapDistorted::fBzDistortionFormulaMult
TFormula * fBzDistortionFormulaMult
getter/setter options: ("y","m"), ("y","a")
Definition: CbmFieldMapDistorted.h:139
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmFieldMapDistorted::~CbmFieldMapDistorted
virtual ~CbmFieldMapDistorted()
Definition: CbmFieldMapDistorted.cxx:191
CbmFieldMapDistorted::SetDistortionFilename
virtual Bool_t SetDistortionFilename(const char *filename)
Definition: CbmFieldMapDistorted.h:89
CbmFieldMap.h
CbmFieldPar
Definition: CbmFieldPar.h:31
CbmFieldMapDistorted::GetParent
virtual FairField * GetParent()
Definition: CbmFieldMapDistorted.h:110
CbmFieldMapDistorted::ReadDistortionInformation
void ReadDistortionInformation(const char *filename=0)
Definition: CbmFieldMapDistorted.cxx:267
CbmFieldMap::GetBx
TArrayF * GetBx() const
Definition: CbmFieldMap.h:158