CbmRoot
Loading...
Searching...
No Matches
CbmBsField.cxx
Go to the documentation of this file.
1/* Copyright (C) 2006-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Elena Litvinenko, Denis Bertini [committer], Florian Uhlig */
4
5// -------------------------------------------------------------------------
6// ----- CbmBsField source file -----
7// ----- Created 12/05/06 by E.I.Litvinenko -----
8// -------------------------------------------------------------------------
9#include "CbmBsField.h"
10
11#include <FairField.h> // for FairField
12
13#include <TArrayF.h> // for TArrayF
14#include <TFile.h> // for TFile, gFile
15#include <TString.h> // for TString, operator+
16#include <TSystem.h> // for TSystem, gSystem
17
18#include <cmath> // for fabs
19#include <iostream> // for operator<<, basic_ostream, basic_istream, endl
20
21using std::cerr;
22using std::cout;
23using std::endl;
24using std::fabs;
25using std::ifstream;
26
27Int_t checked_index_max(Int_t suggested_index, Int_t array_size)
28{
29 if (suggested_index < array_size)
30 return suggested_index;
31 else
32 return (suggested_index - 5);
33}
34
35CbmBsField::CbmBsField(const char* pBsName, Int_t /*symType*/)
36 : CbmFieldMap()
37 , NDIM(0)
38 , LL1(0)
39 , LL2(0)
40 , LL3(0)
41 , II1(0)
42 , II2(0)
43 , II3(0)
44 , fBsBx(nullptr)
45 , fBsBy(nullptr)
46 , fBsBz(nullptr)
47 , fX(nullptr)
48 , fY(nullptr)
49 , fZ(nullptr)
50 , UX1(nullptr)
51 , UX2(nullptr)
52 , UX3(nullptr)
53 , F0(nullptr)
54 , G0(nullptr)
55 , U0(nullptr)
56 , fBsName(pBsName)
57{
58 fType = 6; // corresponds symType=3
59 this->SetName(pBsName);
60 this->SetTitle(pBsName);
61}
62
64 : CbmFieldMap()
65 , NDIM(0)
66 , LL1(0)
67 , LL2(0)
68 , LL3(0)
69 , II1(0)
70 , II2(0)
71 , II3(0)
72 , fBsBx(nullptr)
73 , fBsBy(nullptr)
74 , fBsBz(nullptr)
75 , fX(nullptr)
76 , fY(nullptr)
77 , fZ(nullptr)
78 , UX1(nullptr)
79 , UX2(nullptr)
80 , UX3(nullptr)
81 , F0(nullptr)
82 , G0(nullptr)
83 , U0(nullptr)
84 , fBsName("")
85{
86 fType = 0;
87}
88
89// ------------- Constructor from CbmFieldPar -------------------------
91 : CbmFieldMap(fieldPar)
92 , NDIM(0)
93 , LL1(0)
94 , LL2(0)
95 , LL3(0)
96 , II1(0)
97 , II2(0)
98 , II3(0)
99 , fBsBx(nullptr)
100 , fBsBy(nullptr)
101 , fBsBz(nullptr)
102 , fX(nullptr)
103 , fY(nullptr)
104 , fZ(nullptr)
105 , UX1(nullptr)
106 , UX2(nullptr)
107 , UX3(nullptr)
108 , F0(nullptr)
109 , G0(nullptr)
110 , U0(nullptr)
111 , fBsName("")
112{
113 fType = 6;
114}
115
117{
118 delete fX;
119 delete fY;
120 delete fY;
121 delete fBsBx;
122 delete fBsBy;
123 delete fBsBz;
124 delete (FairField*) this;
125}
126
128{
129 TString tmp_FileName;
130 TString dir = gSystem->Getenv("VMCWORKDIR"); // getenv("VMCWORKDIR");
131 tmp_FileName = dir + "/input/" + fBsName + ".root";
132 readBsRootfile(tmp_FileName);
133}
134
135
137{
138 Double_t po[3], B[3], sm = 100;
139 fNx = (pNx <= 0) ? fX->GetSize() - 3 : pNx;
140 fNy = (pNy <= 0) ? fY->GetSize() - 3 : pNy;
141 fNz = (pNz <= 0) ? fZ->GetSize() - 3 : pNz;
142 if ((fNx < 2) || (fNy < 2) || (fNz < 2)) {
143 cout << "CalculateMapFromBs ERROR [Ns]: " << fNx << " " << fNy << " " << fNz << endl;
144 return;
145 }
146 fXmin = (fX->GetArray())[3] * sm;
147 fYmin = (fY->GetArray())[3] * sm;
148 fZmin = (fZ->GetArray())[3] * sm;
149 fXmax = (fX->GetArray())[fX->GetSize() - 1] * sm;
150 fYmax = (fY->GetArray())[fY->GetSize() - 1] * sm;
151 fZmax = (fZ->GetArray())[fZ->GetSize() - 1] * sm;
152 fXstep = (fXmax - fXmin) / Double_t(fNx - 1);
153 fYstep = (fYmax - fYmin) / Double_t(fNy - 1);
154 fZstep = (fZmax - fZmin) / Double_t(fNz - 1);
155 if (fBx) delete fBx;
156 if (fBy) delete fBy;
157 if (fBz) delete fBz;
158 fBx = new TArrayF(fNx * fNy * fNz);
159 fBy = new TArrayF(fNx * fNy * fNz);
160 fBz = new TArrayF(fNx * fNy * fNz);
161
162
163 cout << "CalculateMapFromBs [Ns]: " << fNx << " " << fNy << " " << fNz << endl;
164 cout << "CalculateMapFromBs [MINs]: " << fXmin << " " << fYmin << " " << fZmin << endl;
165 cout << "CalculateMapFromBs [MAXs]: " << fXmax << " " << fYmax << " " << fZmax << endl;
166 cout << "CalculateMapFromBs [STEPs]: " << fXstep << " " << fYstep << " " << fZstep << endl;
167 cout << "CalculateMapFromBs [POSs]: " << fPosX << " " << fPosY << " " << fPosZ << endl;
168
169 // GetFieldValue (without conversion from kG to T)
170 Int_t index = 0;
171 for (Int_t ix = 0; ix < fNx; ix++) {
172 po[0] = (fXmin + fXstep * ix) + fPosX; // sm
173 for (Int_t iy = 0; iy < fNy; iy++) {
174 po[1] = (fYmin + fYstep * iy) + fPosY; // sm
175 for (Int_t iz = 0; iz < fNz; iz++) {
176 po[2] = (fZmin + fZstep * iz) + fPosZ; // sm
177 index = ix * fNy * fNz + iy * fNz + iz;
178 GetFieldValue(po, B);
179 if (fBx) (*fBx)[index] = B[0]; // kG
180 if (fBy) (*fBy)[index] = B[1]; // kG
181 if (fBz) (*fBz)[index] = B[2]; // kG
182 }
183 }
184 }
185 Print();
186}
187
188void CbmBsField::writeBsRootfile(const char* name) // Write Field Splined
189{
191 TFile* oldFile = gFile;
192 TDirectory* oldDir = gDirectory;
193
194 TFile* f = new TFile(name, "RECREATE");
195 this->Write();
196 f->Close();
197
199 gFile = oldFile;
200 gDirectory = oldDir;
201}
202
203void CbmBsField::readBsRootfile(const char* name) // Read Field Splined
204{
206 TFile* oldFile = gFile;
207 TDirectory* oldDir = gDirectory;
208
209 TFile* f = new TFile(name, "READ");
210 if (f->IsZombie()) {
211 cout << "-E- CbmBsField::readBsRootfile: can not read from file: " << endl;
212 Fatal("CbmBsField::readBsRootfile:", "Can not read from input file");
213 }
214 const char* bsname = fBsName.Data();
215 CbmBsField* fnew = new CbmBsField(bsname);
216
217 cout << "-I- CbmBsField Reading splined field : " << bsname << " from root file : " << name << endl;
218 f->GetObject(bsname, fnew);
219
220 if (fBsBx) delete fBsBx;
221 if (fBsBy) delete fBsBy;
222 if (fBsBz) delete fBsBz;
223 fBsBx = new TArrayF(*fnew->GetBsBx());
224 fBsBy = new TArrayF(*fnew->GetBsBy());
225 fBsBz = new TArrayF(*fnew->GetBsBz());
226
227 if (fX) delete fX;
228 if (fY) delete fY;
229 if (fZ) delete fZ;
230 fX = new TArrayF(*fnew->GetX());
231 fY = new TArrayF(*fnew->GetY());
232 fZ = new TArrayF(*fnew->GetZ());
233
234 f->Close();
235
237 gFile = oldFile;
238 gDirectory = oldDir;
239
240 UX1 = fX->GetArray();
241 UX2 = fY->GetArray();
242 UX3 = fZ->GetArray();
243 F0 = fBsBx->GetArray();
244 G0 = fBsBy->GetArray();
245 U0 = fBsBz->GetArray();
246
247 LL1 = fX->GetSize();
248 LL2 = fY->GetSize();
249 LL3 = fZ->GetSize();
250 NDIM = fBsBx->GetSize();
251 II1 = LL1 - 1;
252 II2 = LL2 - 1;
253 II3 = LL3 - 1;
254}
255
256void CbmBsField::GetFieldValue(const Double_t Point[3], Double_t* Bfield)
257{
258 Double_t XX, YY, ZZ, X, Y, Z, FX, FY, FZ, pfScale;
259 Float_t fHemiX = 1., fHemiY = 1., fHemiZ = 1;
260
261 X = Point[0] - fPosX;
262 Y = Point[1] - fPosY;
263 Z = Point[2] - fPosZ;
264 XX = fabs(X);
265 YY = fabs(Y);
266 ZZ = fabs(Z);
267 FX = 0.0;
268 FY = 0.0;
269 FZ = 0.0;
270
271 PALC0(XX * 0.01, YY * 0.01, ZZ * 0.01, &FX, &FY,
272 &FZ); // position for PALC0 should be in meters
273
274 pfScale = fScale * 10; // usually fScale=1;
275 FX = FX * pfScale;
276 FY = FY * pfScale;
277 FZ = FZ * pfScale;
278
279 if (fType) // 3 or 2
280 {
281 if (X < 0.) fHemiX = -1.;
282 if (Y < 0.) fHemiY = -1.;
283
284 FX = FX * fHemiX * fHemiY;
285
286 if ((fType == 3) && (Z < 0.)) // 3
287 fHemiZ = -1.;
288
289 FZ = FZ * fHemiY * fHemiZ;
290 }
291
292 Bfield[0] = FX;
293 Bfield[1] = FY;
294 Bfield[2] = FZ;
295 return;
296}
297
298Double_t CbmBsField::GetBx(Double_t x, Double_t y, Double_t z)
299{
300 Double_t Point[3];
301 Double_t Bfield[3];
302 Point[0] = x;
303 Point[1] = y;
304 Point[2] = z;
305 GetFieldValue(Point, Bfield);
306 return (Bfield[0]);
307}
308
309Double_t CbmBsField::GetBy(Double_t x, Double_t y, Double_t z)
310{
311 Double_t Point[3];
312 Double_t Bfield[3];
313 Point[0] = x;
314 Point[1] = y;
315 Point[2] = z;
316 GetFieldValue(Point, Bfield);
317 return (Bfield[1]);
318}
319
320Double_t CbmBsField::GetBz(Double_t x, Double_t y, Double_t z)
321{
322 Double_t Point[3];
323 Double_t Bfield[3];
324 Point[0] = x;
325 Point[1] = y;
326 Point[2] = z;
327 GetFieldValue(Point, Bfield);
328 return (Bfield[2]);
329}
330
331
332void CbmBsField::readFortranAsciifiles(const char* BsFortranAsciiFileName1, const char* BsFortranAsciiFileName2,
333 const char* BsFortranAsciiFileName3)
334{
335 Float_t val;
336 Int_t i;
337
338 TString fileNam1 = BsFortranAsciiFileName1;
339 ifstream fBsFortranAscii1(fileNam1);
340 if (!fBsFortranAscii1.is_open()) {
341 cerr << "ERROR: File " << BsFortranAsciiFileName1 << " not opened!" << endl;
342 }
343 else {
344 fBsFortranAscii1 >> NDIM >> LL1 >> LL2 >> LL3 >> II1 >> II2 >> II3;
345
346 fX = new TArrayF(LL1);
347 UX1 = fX->GetArray();
348 for (i = 0; i < LL1; i++) {
349 fBsFortranAscii1 >> val;
350 fX->AddAt(val, i);
351 }
352
353 fBsBx = new TArrayF(NDIM);
354 F0 = fBsBx->GetArray();
355 for (i = 0; i < NDIM; i++) {
356 fBsFortranAscii1 >> val;
357 fBsBx->AddAt(val, i);
358 }
359
360 fBsFortranAscii1.close();
361 }
362
363 TString fileNam2 = BsFortranAsciiFileName2;
364 ifstream fBsFortranAscii2(fileNam2);
365 if (!fBsFortranAscii2.is_open()) {
366 cerr << "ERROR: File " << BsFortranAsciiFileName2 << " not opened!" << endl;
367 }
368 else {
369 fBsFortranAscii2 >> NDIM >> LL1 >> LL2 >> LL3 >> II1 >> II2 >> II3;
370 fY = new TArrayF(LL2);
371 UX2 = fY->GetArray();
372 for (i = 0; i < LL2; i++) {
373 fBsFortranAscii2 >> val;
374 fY->AddAt(val, i);
375 }
376 fBsBy = new TArrayF(NDIM);
377 G0 = fBsBy->GetArray();
378 for (i = 0; i < NDIM; i++) {
379 fBsFortranAscii2 >> val;
380 fBsBy->AddAt(val, i);
381 }
382 fBsFortranAscii2.close();
383 }
384
385 TString fileNam3 = BsFortranAsciiFileName3;
386 ifstream fBsFortranAscii3(fileNam3);
387 if (!fBsFortranAscii3.is_open()) {
388 cerr << "ERROR: File " << BsFortranAsciiFileName3 << " not opened!" << endl;
389 }
390 else {
391 fBsFortranAscii3 >> NDIM >> LL1 >> LL2 >> LL3 >> II1 >> II2 >> II3;
392 fZ = new TArrayF(LL3);
393 UX3 = fZ->GetArray();
394 for (i = 0; i < LL3; i++) {
395 fBsFortranAscii3 >> val;
396 fZ->AddAt(val, i);
397 }
398 fBsBz = new TArrayF(NDIM);
399 U0 = fBsBz->GetArray();
400 for (i = 0; i < NDIM; i++) {
401 fBsFortranAscii3 >> val;
402 fBsBz->AddAt(val, i);
403 }
404 fBsFortranAscii3.close();
405 }
406}
407
408void CbmBsField::PALC0(Double_t X, Double_t Y, Double_t Z, Double_t* BX, Double_t* BY, Double_t* BZ)
409{
410 Double_t UX[4], UY[4], UZ[4], X0, X1, X2, X3, X4, X5, X6, X7, Y0, Y1, Y2, Y3, Y4, Y5, Y6, Y7, VX0, VX1, VX2, VX3, VX4,
411 VX5, VX6, VX7;
412 Long64_t INT1[4], INT2[4], INT3[4], KK, K1, K2, K3, KK1, KK2, KK3, NN0, I1, JJ0, I2, JJ1, I3, JJ2;
413 Double_t EPS = 1.0e-7, XRZYX, YRZYX, ZRZYX, XRZY, YRZY, ZRZY, XRZ, YRZ, ZRZ, SS3, SS2, SS1;
414 Int_t izero4 = 3, izero5 = 4;
415 if (X < (UX1[izero4] - EPS)) goto m100;
416 for (KK = izero5; KK < LL1; KK++) {
417 if (X <= UX1[KK]) goto m52;
418 }
419 goto m100;
420m52:
421 K1 = KK;
422 if (Y < (UX2[izero4] - EPS)) goto m100;
423 for (KK = izero5; KK < LL2; KK++) {
424 if (Y <= UX2[KK]) goto m54;
425 }
426 goto m100;
427m54:
428 K2 = KK;
429 if (Z < (UX3[izero4] - EPS)) goto m100;
430 // for (KK=izero5;KK<=LL3;KK++)
431 for (KK = izero5; KK < LL3; KK++) {
432 if (Z <= UX3[KK]) goto m56;
433 }
434 goto m100;
435m56:
436 K3 = KK;
437 X7 = UX1[checked_index_max(K1 + 3, LL1)];
438 X6 = UX1[checked_index_max(K1 + 2, LL1)];
439 X5 = UX1[checked_index_max(K1 + 1, LL1)];
440 X4 = UX1[K1];
441 X3 = UX1[K1 - 1];
442 X2 = UX1[K1 - 2];
443 X1 = UX1[K1 - 3];
444 X0 = UX1[K1 - 4];
445 UX[1 - 1] = SPL0(X, X0, X1, X2, X3, X4);
446 UX[2 - 1] = SPL0(X, X1, X2, X3, X4, X5);
447 UX[3 - 1] = SPL0(X, X2, X3, X4, X5, X6);
448 UX[4 - 1] = SPL0(X, X3, X4, X5, X6, X7);
449
450 Y7 = UX2[checked_index_max(K2 + 3, LL2)];
451 Y6 = UX2[checked_index_max(K2 + 2, LL2)];
452 Y5 = UX2[checked_index_max(K2 + 1, LL2)];
453 Y4 = UX2[K2];
454 Y3 = UX2[K2 - 1];
455 Y2 = UX2[K2 - 2];
456 Y1 = UX2[K2 - 3];
457 Y0 = UX2[K2 - 4];
458 UY[1 - 1] = SPL0(Y, Y0, Y1, Y2, Y3, Y4);
459 UY[2 - 1] = SPL0(Y, Y1, Y2, Y3, Y4, Y5);
460 UY[3 - 1] = SPL0(Y, Y2, Y3, Y4, Y5, Y6);
461 UY[4 - 1] = SPL0(Y, Y3, Y4, Y5, Y6, Y7);
462
463 VX7 = UX3[checked_index_max(K3 + 3, LL3)];
464 VX6 = UX3[checked_index_max(K3 + 2, LL3)];
465 VX5 = UX3[checked_index_max(K3 + 1, LL3)];
466 VX4 = UX3[K3];
467 VX3 = UX3[K3 - 1];
468 VX2 = UX3[K3 - 2];
469 VX1 = UX3[K3 - 3];
470 VX0 = UX3[K3 - 4];
471 UZ[1 - 1] = SPL0(Z, VX0, VX1, VX2, VX3, VX4);
472 UZ[2 - 1] = SPL0(Z, VX1, VX2, VX3, VX4, VX5);
473 UZ[3 - 1] = SPL0(Z, VX2, VX3, VX4, VX5, VX6);
474 UZ[4 - 1] = SPL0(Z, VX3, VX4, VX5, VX6, VX7);
475 KK1 = K1 - 4;
476 KK2 = K2 - 5 + 1;
477 if (KK2 < 0) KK2 = 0;
478 KK3 = K3 - 5 + 1;
479 if (KK3 < 0) KK3 = 0;
480 NN0 = KK1 + II1 * (KK2 + II2 * (KK3));
481 INT1[1 - 1] = NN0;
482 INT1[2 - 1] = NN0 + 1;
483 INT1[3 - 1] = NN0 + 2;
484 INT1[4 - 1] = NN0 + 3;
485
486 INT2[1 - 1] = 0;
487 INT2[2 - 1] = (1) * II1;
488 INT2[3 - 1] = (2) * II1;
489 INT2[4 - 1] = (3) * II1;
490
491
492 INT3[1 - 1] = 0;
493 INT3[2 - 1] = (1) * II1 * II2;
494 INT3[3 - 1] = (2) * II1 * II2;
495 INT3[4 - 1] = (3) * II1 * II2;
496
497 XRZYX = 0.;
498 YRZYX = 0.;
499 ZRZYX = 0.;
500
501 for (I1 = 1; I1 <= 4; I1++) {
502 JJ0 = INT1[I1 - 1];
503 XRZY = 0.;
504 YRZY = 0.;
505 ZRZY = 0.;
506
507 for (I2 = 1; I2 <= 4; I2++) {
508 JJ1 = JJ0 + INT2[I2 - 1];
509 XRZ = 0.;
510 YRZ = 0.;
511 ZRZ = 0.;
512 for (I3 = 1; I3 <= 4; I3++) {
513 JJ2 = JJ1 + INT3[I3 - 1];
514 SS3 = UZ[I3 - 1];
515 XRZ = XRZ + F0[JJ2] * SS3;
516 YRZ = YRZ + G0[JJ2] * SS3;
517 ZRZ = ZRZ + U0[JJ2] * SS3;
518 }
519 SS2 = UY[I2 - 1];
520 XRZY = XRZY + XRZ * SS2;
521 YRZY = YRZY + YRZ * SS2;
522 ZRZY = ZRZY + ZRZ * SS2;
523 }
524 SS1 = UX[I1 - 1];
525 XRZYX = XRZYX + XRZY * SS1;
526 YRZYX = YRZYX + YRZY * SS1;
527 ZRZYX = ZRZYX + ZRZY * SS1;
528 }
529 *BX = XRZYX;
530 *BY = YRZYX;
531 *BZ = ZRZYX;
532 return;
533m100:
534 // print *, 'ATTENTION !!! Point is out of range'
535 // cout << "PALC0 - XYZ out of range: ";
536 // cout << X << " " << Y << " " << Z << " " << ";" << endl;
537 *BX = 0;
538 *BY = 0;
539 *BZ = 0;
540 return;
541}
542
543Float_t CbmBsField::SPL0(Double_t T, Double_t X0, Double_t X1, Double_t X2, Double_t X3, Double_t X4)
544{
545 Double_t W0, C0, TT, RR, TPL, W1, W2, W3, value_SPL0;
546 if (T < X0) goto n100;
547 if (T < X1) goto n200;
548 if (T < X2) goto n300;
549 if (T < X3) goto n400;
550 if (T > X4) goto n100;
551 C0 = X4 - X0;
552 W0 = (X1 - X0) * (X2 - X0) * (X3 - X0) * (X4 - X0);
553 TT = T - X0;
554 RR = C0 / W0;
555 TPL = RR * (TT * TT * TT);
556 W1 = (X0 - X1) * (X2 - X1) * (X3 - X1) * (X4 - X1);
557 TT = T - X1;
558 RR = C0 / W1;
559 TPL = RR * (TT * TT * TT) + TPL;
560 W2 = (X0 - X2) * (X1 - X2) * (X3 - X2) * (X4 - X2);
561 TT = T - X2;
562 RR = C0 / W2;
563 TPL = RR * (TT * TT * TT) + TPL;
564 W3 = (X0 - X3) * (X1 - X3) * (X2 - X3) * (X4 - X3);
565 TT = T - X3;
566 RR = C0 / W3;
567 value_SPL0 = RR * (TT * TT * TT) + TPL;
568 return ((Float_t) value_SPL0);
569n200:
570 C0 = X4 - X0;
571 W0 = (X1 - X0) * (X2 - X0) * (X3 - X0) * (X4 - X0);
572 TT = T - X0;
573 RR = C0 / W0;
574 value_SPL0 = RR * (TT * TT * TT);
575 return ((Float_t) value_SPL0);
576n300:
577 C0 = X4 - X0;
578 W0 = (X1 - X0) * (X2 - X0) * (X3 - X0) * (X4 - X0);
579 TT = T - X0;
580 RR = C0 / W0;
581 TPL = RR * (TT * TT * TT);
582 W1 = (X0 - X1) * (X2 - X1) * (X3 - X1) * (X4 - X1);
583 TT = T - X1;
584 RR = C0 / W1;
585 value_SPL0 = RR * (TT * TT * TT) + TPL;
586 return ((Float_t) value_SPL0);
587n400:
588 C0 = X4 - X0;
589 W0 = (X1 - X0) * (X2 - X0) * (X3 - X0) * (X4 - X0);
590 TT = T - X0;
591 RR = C0 / W0;
592 TPL = RR * (TT * TT * TT);
593 W1 = (X0 - X1) * (X2 - X1) * (X3 - X1) * (X4 - X1);
594 TT = T - X1;
595 RR = C0 / W1;
596 TPL = RR * (TT * TT * TT) + TPL;
597 W2 = (X0 - X2) * (X1 - X2) * (X3 - X2) * (X4 - X2);
598 TT = T - X2;
599 RR = C0 / W2;
600 value_SPL0 = RR * (TT * TT * TT) + TPL;
601 return ((Float_t) value_SPL0);
602n100:
603 value_SPL0 = 0.0;
604 return ((Float_t) value_SPL0);
605}
Int_t checked_index_max(Int_t suggested_index, Int_t array_size)
float Float_t
int Int_t
Some class B.
void PALC0(Double_t X, Double_t Y, Double_t Z, Double_t *BX, Double_t *BY, Double_t *BZ)
TArrayF * fX
Definition CbmBsField.h:91
TArrayF * GetBsBz()
Definition CbmBsField.h:59
TArrayF * GetBsBx()
Definition CbmBsField.h:57
TString fBsName
[NDIM]
Definition CbmBsField.h:102
virtual void Init() override
TArrayF * fZ
Definition CbmBsField.h:93
virtual ~CbmBsField()
CbmBsField(const char *pBsName, Int_t symType=3)
Int_t II2
Definition CbmBsField.h:86
Float_t * U0
[NDIM]
Definition CbmBsField.h:100
void writeBsRootfile(const char *name)
Float_t SPL0(Double_t T, Double_t X0, Double_t X1, Double_t X2, Double_t X3, Double_t X4)
Float_t * UX1
Definition CbmBsField.h:95
Int_t LL1
Definition CbmBsField.h:86
Float_t * UX2
[LL1]
Definition CbmBsField.h:96
Float_t * G0
[NDIM]
Definition CbmBsField.h:99
Int_t NDIM
Definition CbmBsField.h:86
TArrayF * GetZ()
Definition CbmBsField.h:62
TArrayF * fY
Definition CbmBsField.h:92
Int_t II3
Definition CbmBsField.h:86
void readBsRootfile(const char *name)
TArrayF * fBsBz
Definition CbmBsField.h:90
TArrayF * GetY()
Definition CbmBsField.h:61
TArrayF * GetBsBy()
Definition CbmBsField.h:58
void CalculateMapFromBs(Int_t pNx=0, Int_t pNy=0, Int_t pNz=0)
void readFortranAsciifiles(const char *MapFile1, const char *MapFile2, const char *MapFile3)
Int_t II1
Definition CbmBsField.h:86
Int_t LL3
Definition CbmBsField.h:86
TArrayF * fBsBx
Definition CbmBsField.h:88
virtual void GetFieldValue(const Double_t Point[3], Double_t *Bfield) override
TArrayF * GetX()
Definition CbmBsField.h:60
Int_t LL2
Definition CbmBsField.h:86
Float_t * F0
[LL3]
Definition CbmBsField.h:98
Float_t * UX3
[LL2]
Definition CbmBsField.h:97
TArrayF * fBsBy
Definition CbmBsField.h:89
Double_t fPosZ
TArrayF * fBy
Double_t fPosY
TArrayF * GetBz() const
Double_t fYmax
Double_t fPosX
Double_t fZmin
Double_t fZmax
Double_t fYmin
TArrayF * GetBx() const
TArrayF * fBx
TArrayF * fBz
Double_t fXmin
virtual void Print(Option_t *="") const override
Double_t fYstep
Double_t fZstep
Double_t fXstep
Double_t fScale
TArrayF * GetBy() const
Double_t fXmax