51 const char* parentName,
const char* fileTypeParent,
Int_t pfTypeOfParent)
66 switch (pfTypeOfParent) {
77 Double_t zMax, Double_t bX, Double_t bY, Double_t bZ,
const char* mapName,
78 const char* pfDistortionFilename,
const char* parentname)
80 ,
fParentField(new
CbmFieldConst(parentname, xMin, xMax, yMin, yMax, zMin, zMax, bX, bY, bZ))
170 Double_t po[3], b[3];
237 TFile* oldFile = gFile;
238 TDirectory* oldDir = gDirectory;
241 if (strlen(filename)) {
248 cerr <<
"CbmFieldMapDistorted::ReadDistortionInformation Warning: file " << (
fDistortionFilename.Data())
249 <<
" not exists yet !!!" << endl;
269 cerr <<
"CbmFieldMapDistorted::ReadDistortionInformation ERROR: file " << (
fDistortionFilename.Data())
270 <<
" can not be read !!!" << endl;
284 TFile* oldFile = gFile;
285 TDirectory* oldDir = gDirectory;
288 if (strlen(filename)) {
322 TString co = component_option;
323 TString ao = action_option;
338 const char* action_option)
340 TString co = component_option;
341 TString ao = action_option;
344 if (co.Contains(
"y") && ao.Contains(
"m")) {
348 if (co.Contains(
"y") && ao.Contains(
"a")) {
353 if (co.Contains(
"x") && ao.Contains(
"m")) {
357 if (co.Contains(
"x") && ao.Contains(
"a")) {
362 if (co.Contains(
"z") && ao.Contains(
"m")) {
366 if (co.Contains(
"z") && ao.Contains(
"a")) {
374 const char* action_option)
376 TString co = component_option;
377 TString ao = action_option;
380 if (co.Contains(
"y") && ao.Contains(
"m")) {
384 if (co.Contains(
"y") && ao.Contains(
"a")) {
389 if (co.Contains(
"x") && ao.Contains(
"m")) {
393 if (co.Contains(
"x") && ao.Contains(
"a")) {
398 if (co.Contains(
"z") && ao.Contains(
"m")) {
402 if (co.Contains(
"z") && ao.Contains(
"a")) {
465 Double_t
x = point[0];
466 Double_t
y = point[1];
467 Double_t z = point[2];
481 cout <<
"=============================================================" << endl;
482 cout <<
"---- " << fTitle <<
" : " << fName << endl;
484 cout <<
"== Parent Field: ==" << endl;
486 cout <<
"==============================" << endl;
488 cout <<
"== Distortion Information File : ==" << endl;
490 cout <<
"==============================" << endl;
492 cout <<
"== Bx Distortion Formula Mult : ==" << endl;
494 cout <<
"== Bx Distortion Formula Add : ==" << endl;
496 cout <<
"==============================" << endl;
498 cout <<
"== By Distortion Formula Mult : ==" << endl;
500 cout <<
"== By Distortion Formula Add : ==" << endl;
502 cout <<
"==============================" << endl;
504 cout <<
"== Bz Distortion Formula Mult : ==" << endl;
506 cout <<
"== Bz Distortion Formula Add : ==" << endl;
508 cout <<
"==============================" << endl;
514 cout <<
"=============================================================" << endl;
543 Double_t dz = (zmax - zmin) / n0;
545 h =
new TH1D(
"hField", fName, n, zmin, zmax);
546 for (
Int_t i = 0; i < n0; i++)
547 h->SetBinContent(i + 1,
GetBy(0., 0., zmin + i * dz));
552 hp =
new TH1D(
"hFieldParent",
fParentField->GetName(), n, zmin, zmax);
553 for (
Int_t i = 0; i < n0; i++)
554 hp->SetBinContent(i + 1,
fParentField->GetBy(0., 0., zmin + i * dz));
TFormula * fBxDistortionFormulaMult
TFormula * fByDistortionFormulaMult
getter/setter options: ("x","m"), ("x","a")
void SetFromParent(FairField *field)
virtual void Print(Option_t *="") const override
TFormula * fBxDistortionFormulaAdd
TFormula * GetDistortionFormula(const char *component_option="y", const char *action_option="m")
virtual void SetScale(Double_t factor) override
TString fDistortionFilename
virtual void GetFieldValue(const Double_t point[3], Double_t *bField) override
Get the field value at a point.
void ReadDistortionInformation(const char *filename=0)
virtual Double_t GetBy(Double_t x, Double_t y, Double_t z) override
TFormula * fByDistortionFormulaAdd
virtual void SetPosition(Double_t x, Double_t y, Double_t z) override
TFormula * fBzDistortionFormulaAdd
virtual ~CbmFieldMapDistorted()
void PlotBy(Int_t n=250, Double_t zmin=-50, Double_t zmax=450)
virtual void Init() override
void WriteDistortionInformation(const char *filename=0)
Bool_t SetDistortionFormula(TFormula *parDistortionFormula, const char *component_option="y", const char *action_option="m")
TFormula * fBzDistortionFormulaMult
getter/setter options: ("y","m"), ("y","a")
Double_t GetXstep() const
Double_t GetPositionY() const
Double_t GetYstep() const
Double_t GetPositionZ() const
Double_t GetPositionX() const
Double_t fBzOrigin
y-component of the field at the origin
Double_t GetZstep() const
Double_t fByOrigin
x-component of the field at the origin
Double_t GetScale() const
Double_t GetPositionZ() const
Int_t GetTypeOfParent() const
void GetParentName(TString &parentname)
void GetDistortionFilename(TString &filename)
void MapName(TString &name)
Double_t GetPositionY() const
Double_t GetScale() const
Double_t GetPositionX() const
Data class with information on a STS local track.