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