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 <iostream> // for operator<<, basic_ostream, basic_istream, endl
19
20#include <cmath> // for fabs
21
22using std::cerr;
23using std::cout;
24using std::endl;
25using std::fabs;
26using std::ifstream;
27
28Int_t checked_index_max(Int_t suggested_index, Int_t array_size)
29{
30 if (suggested_index < array_size) 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
136void CbmBsField::CalculateMapFromBs(Int_t pNx, Int_t pNy, Int_t pNz)
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()) { cerr << "ERROR: File " << BsFortranAsciiFileName1 << " not opened!" << endl; }
341 else {
342 fBsFortranAscii1 >> NDIM >> LL1 >> LL2 >> LL3 >> II1 >> II2 >> II3;
343
344 fX = new TArrayF(LL1);
345 UX1 = fX->GetArray();
346 for (i = 0; i < LL1; i++) {
347 fBsFortranAscii1 >> val;
348 fX->AddAt(val, i);
349 }
350
351 fBsBx = new TArrayF(NDIM);
352 F0 = fBsBx->GetArray();
353 for (i = 0; i < NDIM; i++) {
354 fBsFortranAscii1 >> val;
355 fBsBx->AddAt(val, i);
356 }
357
358 fBsFortranAscii1.close();
359 }
360
361 TString fileNam2 = BsFortranAsciiFileName2;
362 ifstream fBsFortranAscii2(fileNam2);
363 if (!fBsFortranAscii2.is_open()) { cerr << "ERROR: File " << BsFortranAsciiFileName2 << " not opened!" << endl; }
364 else {
365 fBsFortranAscii2 >> NDIM >> LL1 >> LL2 >> LL3 >> II1 >> II2 >> II3;
366 fY = new TArrayF(LL2);
367 UX2 = fY->GetArray();
368 for (i = 0; i < LL2; i++) {
369 fBsFortranAscii2 >> val;
370 fY->AddAt(val, i);
371 }
372 fBsBy = new TArrayF(NDIM);
373 G0 = fBsBy->GetArray();
374 for (i = 0; i < NDIM; i++) {
375 fBsFortranAscii2 >> val;
376 fBsBy->AddAt(val, i);
377 }
378 fBsFortranAscii2.close();
379 }
380
381 TString fileNam3 = BsFortranAsciiFileName3;
382 ifstream fBsFortranAscii3(fileNam3);
383 if (!fBsFortranAscii3.is_open()) { cerr << "ERROR: File " << BsFortranAsciiFileName3 << " not opened!" << endl; }
384 else {
385 fBsFortranAscii3 >> NDIM >> LL1 >> LL2 >> LL3 >> II1 >> II2 >> II3;
386 fZ = new TArrayF(LL3);
387 UX3 = fZ->GetArray();
388 for (i = 0; i < LL3; i++) {
389 fBsFortranAscii3 >> val;
390 fZ->AddAt(val, i);
391 }
392 fBsBz = new TArrayF(NDIM);
393 U0 = fBsBz->GetArray();
394 for (i = 0; i < NDIM; i++) {
395 fBsFortranAscii3 >> val;
396 fBsBz->AddAt(val, i);
397 }
398 fBsFortranAscii3.close();
399 }
400}
401
402void CbmBsField::PALC0(Double_t X, Double_t Y, Double_t Z, Double_t* BX, Double_t* BY, Double_t* BZ)
403{
404 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,
405 VX5, VX6, VX7;
406 Long64_t INT1[4], INT2[4], INT3[4], KK, K1, K2, K3, KK1, KK2, KK3, NN0, I1, JJ0, I2, JJ1, I3, JJ2;
407 Double_t EPS = 1.0e-7, XRZYX, YRZYX, ZRZYX, XRZY, YRZY, ZRZY, XRZ, YRZ, ZRZ, SS3, SS2, SS1;
408 Int_t izero4 = 3, izero5 = 4;
409 if (X < (UX1[izero4] - EPS)) goto m100;
410 for (KK = izero5; KK < LL1; KK++) {
411 if (X <= UX1[KK]) goto m52;
412 }
413 goto m100;
414m52:
415 K1 = KK;
416 if (Y < (UX2[izero4] - EPS)) goto m100;
417 for (KK = izero5; KK < LL2; KK++) {
418 if (Y <= UX2[KK]) goto m54;
419 }
420 goto m100;
421m54:
422 K2 = KK;
423 if (Z < (UX3[izero4] - EPS)) goto m100;
424 // for (KK=izero5;KK<=LL3;KK++)
425 for (KK = izero5; KK < LL3; KK++) {
426 if (Z <= UX3[KK]) goto m56;
427 }
428 goto m100;
429m56:
430 K3 = KK;
431 X7 = UX1[checked_index_max(K1 + 3, LL1)];
432 X6 = UX1[checked_index_max(K1 + 2, LL1)];
433 X5 = UX1[checked_index_max(K1 + 1, LL1)];
434 X4 = UX1[K1];
435 X3 = UX1[K1 - 1];
436 X2 = UX1[K1 - 2];
437 X1 = UX1[K1 - 3];
438 X0 = UX1[K1 - 4];
439 UX[1 - 1] = SPL0(X, X0, X1, X2, X3, X4);
440 UX[2 - 1] = SPL0(X, X1, X2, X3, X4, X5);
441 UX[3 - 1] = SPL0(X, X2, X3, X4, X5, X6);
442 UX[4 - 1] = SPL0(X, X3, X4, X5, X6, X7);
443
444 Y7 = UX2[checked_index_max(K2 + 3, LL2)];
445 Y6 = UX2[checked_index_max(K2 + 2, LL2)];
446 Y5 = UX2[checked_index_max(K2 + 1, LL2)];
447 Y4 = UX2[K2];
448 Y3 = UX2[K2 - 1];
449 Y2 = UX2[K2 - 2];
450 Y1 = UX2[K2 - 3];
451 Y0 = UX2[K2 - 4];
452 UY[1 - 1] = SPL0(Y, Y0, Y1, Y2, Y3, Y4);
453 UY[2 - 1] = SPL0(Y, Y1, Y2, Y3, Y4, Y5);
454 UY[3 - 1] = SPL0(Y, Y2, Y3, Y4, Y5, Y6);
455 UY[4 - 1] = SPL0(Y, Y3, Y4, Y5, Y6, Y7);
456
457 VX7 = UX3[checked_index_max(K3 + 3, LL3)];
458 VX6 = UX3[checked_index_max(K3 + 2, LL3)];
459 VX5 = UX3[checked_index_max(K3 + 1, LL3)];
460 VX4 = UX3[K3];
461 VX3 = UX3[K3 - 1];
462 VX2 = UX3[K3 - 2];
463 VX1 = UX3[K3 - 3];
464 VX0 = UX3[K3 - 4];
465 UZ[1 - 1] = SPL0(Z, VX0, VX1, VX2, VX3, VX4);
466 UZ[2 - 1] = SPL0(Z, VX1, VX2, VX3, VX4, VX5);
467 UZ[3 - 1] = SPL0(Z, VX2, VX3, VX4, VX5, VX6);
468 UZ[4 - 1] = SPL0(Z, VX3, VX4, VX5, VX6, VX7);
469 KK1 = K1 - 4;
470 KK2 = K2 - 5 + 1;
471 if (KK2 < 0) KK2 = 0;
472 KK3 = K3 - 5 + 1;
473 if (KK3 < 0) KK3 = 0;
474 NN0 = KK1 + II1 * (KK2 + II2 * (KK3));
475 INT1[1 - 1] = NN0;
476 INT1[2 - 1] = NN0 + 1;
477 INT1[3 - 1] = NN0 + 2;
478 INT1[4 - 1] = NN0 + 3;
479
480 INT2[1 - 1] = 0;
481 INT2[2 - 1] = (1) * II1;
482 INT2[3 - 1] = (2) * II1;
483 INT2[4 - 1] = (3) * II1;
484
485
486 INT3[1 - 1] = 0;
487 INT3[2 - 1] = (1) * II1 * II2;
488 INT3[3 - 1] = (2) * II1 * II2;
489 INT3[4 - 1] = (3) * II1 * II2;
490
491 XRZYX = 0.;
492 YRZYX = 0.;
493 ZRZYX = 0.;
494
495 for (I1 = 1; I1 <= 4; I1++) {
496 JJ0 = INT1[I1 - 1];
497 XRZY = 0.;
498 YRZY = 0.;
499 ZRZY = 0.;
500
501 for (I2 = 1; I2 <= 4; I2++) {
502 JJ1 = JJ0 + INT2[I2 - 1];
503 XRZ = 0.;
504 YRZ = 0.;
505 ZRZ = 0.;
506 for (I3 = 1; I3 <= 4; I3++) {
507 JJ2 = JJ1 + INT3[I3 - 1];
508 SS3 = UZ[I3 - 1];
509 XRZ = XRZ + F0[JJ2] * SS3;
510 YRZ = YRZ + G0[JJ2] * SS3;
511 ZRZ = ZRZ + U0[JJ2] * SS3;
512 }
513 SS2 = UY[I2 - 1];
514 XRZY = XRZY + XRZ * SS2;
515 YRZY = YRZY + YRZ * SS2;
516 ZRZY = ZRZY + ZRZ * SS2;
517 }
518 SS1 = UX[I1 - 1];
519 XRZYX = XRZYX + XRZY * SS1;
520 YRZYX = YRZYX + YRZY * SS1;
521 ZRZYX = ZRZYX + ZRZY * SS1;
522 }
523 *BX = XRZYX;
524 *BY = YRZYX;
525 *BZ = ZRZYX;
526 return;
527m100:
528 // print *, 'ATTENTION !!! Point is out of range'
529 // cout << "PALC0 - XYZ out of range: ";
530 // cout << X << " " << Y << " " << Z << " " << ";" << endl;
531 *BX = 0;
532 *BY = 0;
533 *BZ = 0;
534 return;
535}
536
537Float_t CbmBsField::SPL0(Double_t T, Double_t X0, Double_t X1, Double_t X2, Double_t X3, Double_t X4)
538{
539 Double_t W0, C0, TT, RR, TPL, W1, W2, W3, value_SPL0;
540 if (T < X0) goto n100;
541 if (T < X1) goto n200;
542 if (T < X2) goto n300;
543 if (T < X3) goto n400;
544 if (T > X4) goto n100;
545 C0 = X4 - X0;
546 W0 = (X1 - X0) * (X2 - X0) * (X3 - X0) * (X4 - X0);
547 TT = T - X0;
548 RR = C0 / W0;
549 TPL = RR * (TT * TT * TT);
550 W1 = (X0 - X1) * (X2 - X1) * (X3 - X1) * (X4 - X1);
551 TT = T - X1;
552 RR = C0 / W1;
553 TPL = RR * (TT * TT * TT) + TPL;
554 W2 = (X0 - X2) * (X1 - X2) * (X3 - X2) * (X4 - X2);
555 TT = T - X2;
556 RR = C0 / W2;
557 TPL = RR * (TT * TT * TT) + TPL;
558 W3 = (X0 - X3) * (X1 - X3) * (X2 - X3) * (X4 - X3);
559 TT = T - X3;
560 RR = C0 / W3;
561 value_SPL0 = RR * (TT * TT * TT) + TPL;
562 return ((Float_t) value_SPL0);
563n200:
564 C0 = X4 - X0;
565 W0 = (X1 - X0) * (X2 - X0) * (X3 - X0) * (X4 - X0);
566 TT = T - X0;
567 RR = C0 / W0;
568 value_SPL0 = RR * (TT * TT * TT);
569 return ((Float_t) value_SPL0);
570n300:
571 C0 = X4 - X0;
572 W0 = (X1 - X0) * (X2 - X0) * (X3 - X0) * (X4 - X0);
573 TT = T - X0;
574 RR = C0 / W0;
575 TPL = RR * (TT * TT * TT);
576 W1 = (X0 - X1) * (X2 - X1) * (X3 - X1) * (X4 - X1);
577 TT = T - X1;
578 RR = C0 / W1;
579 value_SPL0 = RR * (TT * TT * TT) + TPL;
580 return ((Float_t) value_SPL0);
581n400:
582 C0 = X4 - X0;
583 W0 = (X1 - X0) * (X2 - X0) * (X3 - X0) * (X4 - X0);
584 TT = T - X0;
585 RR = C0 / W0;
586 TPL = RR * (TT * TT * TT);
587 W1 = (X0 - X1) * (X2 - X1) * (X3 - X1) * (X4 - X1);
588 TT = T - X1;
589 RR = C0 / W1;
590 TPL = RR * (TT * TT * TT) + TPL;
591 W2 = (X0 - X2) * (X1 - X2) * (X3 - X2) * (X4 - X2);
592 TT = T - X2;
593 RR = C0 / W2;
594 value_SPL0 = RR * (TT * TT * TT) + TPL;
595 return ((Float_t) value_SPL0);
596n100:
597 value_SPL0 = 0.0;
598 return ((Float_t) value_SPL0);
599}
Int_t checked_index_max(Int_t suggested_index, Int_t array_size)
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:85
TArrayF * GetBsBz()
Definition CbmBsField.h:61
TArrayF * GetBsBx()
Definition CbmBsField.h:59
TString fBsName
[NDIM]
Definition CbmBsField.h:96
TArrayF * fZ
Definition CbmBsField.h:87
virtual ~CbmBsField()
Int_t II2
Definition CbmBsField.h:80
Float_t * U0
[NDIM]
Definition CbmBsField.h:94
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:89
Int_t LL1
Definition CbmBsField.h:80
Float_t * UX2
[LL1]
Definition CbmBsField.h:90
Float_t * G0
[NDIM]
Definition CbmBsField.h:93
Int_t NDIM
Definition CbmBsField.h:80
TArrayF * GetZ()
Definition CbmBsField.h:64
TArrayF * fY
Definition CbmBsField.h:86
Int_t II3
Definition CbmBsField.h:80
void readBsRootfile(const char *name)
TArrayF * fBsBz
Definition CbmBsField.h:84
TArrayF * GetY()
Definition CbmBsField.h:63
TArrayF * GetBsBy()
Definition CbmBsField.h:60
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:80
void GetFieldValue(const Double_t Point[3], Double_t *Bfield)
Int_t LL3
Definition CbmBsField.h:80
TArrayF * fBsBx
Definition CbmBsField.h:82
TArrayF * GetX()
Definition CbmBsField.h:62
Int_t LL2
Definition CbmBsField.h:80
Float_t * F0
[LL3]
Definition CbmBsField.h:92
Float_t * UX3
[LL2]
Definition CbmBsField.h:91
TArrayF * fBsBy
Definition CbmBsField.h:83
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
virtual void Print(Option_t *="") const
TArrayF * GetBx() const
TArrayF * fBx
TArrayF * fBz
Double_t fXmin
Double_t fYstep
Double_t fZstep
Double_t fXstep
Double_t fScale
TArrayF * GetBy() const
Double_t fXmax