103 TString outFileName = fileName;
105 if (strcmp(fileName,
"") == 0) {
112 cout <<
"-E- CbmFieldMapCreator::CreateMap: "
113 <<
"Grid parameters are not specified!" << endl;
117 cout <<
"-E- CbmFieldMapCreator::CreateMap: "
118 <<
"No input field(s) specified!" << endl;
134 cout <<
"-I- CbmFieldMapCreator: Grid step sizes are " << xStep <<
", " << yStep <<
", " << zStep <<
" cm" << endl;
135 cout <<
" Using " <<
fFieldList.GetSize() <<
" input fields." << endl;
136 cout <<
" Total number of grid points is " <<
fNx *
fNy *
fNz << endl;
142 for (Int_t ix = 0; ix <
fNx; ix++) {
143 x =
fXmin + Double_t(ix) * xStep;
144 for (Int_t iy = 0; iy <
fNy; iy++) {
145 y =
fYmin + Double_t(iy) * yStep;
146 for (Int_t iz = 0; iz <
fNz; iz++) {
147 z =
fZmin + Double_t(iz) * zStep;
154 while (FairField* field = ((FairField*) next())) {
155 bx += field->GetBx(
x,
y, z);
156 by += field->GetBy(
x,
y, z);
157 bz += field->GetBz(
x,
y, z);
161 Int_t index = ix *
fNy *
fNz + iy *
fNz + iz;
162 fBx->AddAt(Float_t(bx), index);
163 fBy->AddAt(Float_t(by), index);
164 fBz->AddAt(Float_t(bz), index);
178 cout <<
"-I- CbmFieldMapCreator: Field map " <<
fMapName <<
" was stored in " << outFileName << endl;
void SetGridParameters(Int_t nx, Double_t xmin, Double_t xmax, Int_t ny, Double_t ymin, Double_t ymax, Int_t nz, Double_t zmin, Double_t zmax)